Arguments

A quick reference for some important arguments used in the Enjin API Schema.

📘

Please note: This is an introductory reference

For the most up-to-date information, refer to the GraphQL Playground and Apollo API Reference.

🚧 The information provided in this section cannot be programmatically updated and may be subject to inconsistencies over time.

This is a detailed reference guide that explains most common arguments within the Enjin API Schema.

id

The id argument is a unique identifier used to specifically identify a query or mutation that occurred on the Enjin Platform.

It helps pinpoint a particular operation when you want to reference it or perform actions related to that operation.

This identifier is typically generated by the Enjin API and serves as a reference point for interacting with specific operations.

transactionId

A convenient way to rapidly reference blockchain transactions in a sequential order.

It is structured in the format xxxxxx-y, where xxxxxx denotes the block number, and y indicates the position of the transaction within that block.

transactionHash

The "transactionHash" argument in GraphQL serves as a unique identifier for a particular blockchain transaction.

It is generated using a cryptographic hash function, guaranteeing that each "transactionHash" is entirely distinct and cannot resemble an identifier from a different blockchain network.

idempotencyKey

A special key that prevents the same operation from being accidentally carried out more than once. It ensures that if you send the same request multiple times, it has the same effect as sending it once, avoiding unintended duplicates.

verificationId

A unique identifier that is returned once you verify a user's ownership over a specific wallet.

You will need to use the verificationId to find a wallet address once it's been verified but you can also use it to find other important information regarding the wallet.

after

Used as a cursor to specify a starting point for fetching data in a paginated list.

It helps you retrieve data after a specific item or position in the list.

first

Used to specify the number of results or items you want to return per page when dealing with paginated data.

Simply provide it with a numeric value that represents the desired number of results you want to retrieve in a single page.

account

Your "Enjin Blockchain account" that acts like your digital identity on the blockchain.

It allows you to interact with the blockchain, such as sending or receiving tokens.

Think of it as your account on the blockchain network.

address

A human-readable representation of your Enjin Blockchain account.

Users typically interact with and see the address as their primary identifier in wallets and marketplaces.

It's often in the form of a long alphanumeric string, making it easier for people to send you tokens.

Your address is derived from your public key and serves as a more user-friendly way to identify your account.

publicKey

A cryptographic key associated with your Enjin Blockchain account.

It serves as your unique identifier on the blockchain.

When someone wants to send you tokens or verify your transactions, they use your public key to do so. It's like your digital fingerprint.

hashes

Allows you to filter blockchain transactions based on their unique transaction hashes.

Transaction hashes are cryptographic representations of individual transactions on the blockchain, ensuring their immutability and uniqueness.

numbers

Used for filtering transactions by block numbers, allows you to specify the block numbers from which you want to retrieve transactions.

This is useful when you want to narrow down and retrieve transactions from specific blocks on the blockchain.

collectionId

A defining identifier for token collections on the Enjin Blockchain. It is automatically generated by the blockchain when a new collection is created.

Token collections play a pivotal role in organizing and managing related tokens, simplifying their accessibility and interaction within wallets and on marketplaces.

acknowledgeEvents

Controls whether to automatically acknowledge events that were broadcast to the blockchain but have not yet been acknowledged by the blockchain itself.

When events are acknowledged before finalization on the blockchain, the operation's result is set as EXTRINSIC_FAILED, indicating a failure in the blockchain's processing.

tokenId

Used to request specific information about a particular token on the Enjin Blockchain.

It allows you to retrieve details, properties, and attributes of the token identified by its unique token ID.

integer

A straightforward numerical identifier for a token. It's a simple and efficient way to represent tokens.

You might choose integer when you want a basic, numeric representation of tokens without additional complexity.

It's useful for scenarios where simplicity and efficiency are more important than encoding additional information in the ID.

stringId

Derived from a string, such as a name or label. It you to choose human-readable representations of tokens.

You might choose stringId when you want to represent tokens with user-friendly names or labels.

It's useful for mapping easily recognizable names.

hash

A hash is created using a cryptographic hash function, ensuring uniqueness and collision resistance.

It's suitable when uniqueness across collections is critical.

It's often used in cases where tokens must be resistant to duplication or tampering.

ERC1155

Designed to facilitate seamless conversion between tokens Ethereum Virtual Machine (EVM) chains and tokens on Enjin Blockchain.

Particularly useful for projects that require interoperability between blockchain ecosystems.

It enables tokens to be converted from one chain to another while retaining their essential properties, making it a valuable tool for cross-chain token management and exchange.

index

A 16-bit integer that represents a specific instance or variation of a token type within an ERC-1155 contract.

It is used in combination with the base token ID to uniquely identify individual tokens of the same type within the contract.

tokenId

A unique identifier used within the ERC-1155 token standard.

It combines two components: a 16-bit hexadecimal base token ID and a 16-bit integer index.

When these components are combined, they create a 128-bit integer that serves as a distinct identifier for a specific token within an ERC-1155 contract.

method

Enables precise and efficient retrieval of transaction-specific method.

This targeted approach offers a clear and detailed understanding of the exact actions performed within a transaction, simplifying debugging, security auditing, and user interaction.

It streamlines data retrieval by focusing on the essential method details, making it a powerful tool for developers, auditors, analysts, and end-users to gain insights, enhance security, and improve the overall user experience in blockchain applications.

signedAtBlock

Specifies the exact block at which a transaction was signed on the blockchain.

It serves as a historical reference point, indicating precisely when the transaction was initiated and digitally signed within the blockchain's timeline.

This information is particularly useful when there is a need find a transaction within a block, verify the authenticity of a digital signature, or ensure compliance with timestamp-related requirements.

It enables users, developers, and auditors to track the temporal context of blockchain interactions, offering a clear historical record that can be crucial for auditing, legal, regulatory, and security purposes.

state

Used for tracking and monitoring the progress of Enjin Platform queries and mutations, offering insights into their current status and history. Here are the various states and why they are useful:

  • ABANDONED: Indicates that the operation couldn't be sent, often due to encoding issues or insufficient funds.
  • PENDING: Represents a newly created operation that is awaiting approval by a wallet.
  • PROCESSING: Signifies that the Enjin Wallet Daemon has picked up the transaction and is actively processing it.
  • BROADCAST: Indicates that the transaction has successfully sent the transaction to the Enjin Blockchain.
  • FINALIZED: Denotes that the transaction has been successfully included in a block on the blockchain. Although, it doesn't specify whether the on-chain transaction succeeded or failed. That data can be queried by using the result field.

result

Indicates whether a transaction has succeeded (ExtrinsicSuccess) or failed (ExtrinsicFailed).

This is invaluable for transaction verification and error handling.

It offers transparency and user confidence in blockchain interactions, aids in security audits and compliance checks, and enables automated processes to make decisions based on transaction outcomes.

This single piece of information is pivotal for ensuring the reliability, integrity, and functionality of blockchain-based applications and systems, making it an essential component in blockchain transaction processing.

externalId

You can utilize the externalId argument to establish a connection between an account in database and an Enjin Platform Account.

It's worth noting that you have control over setting a user's externalId, so it's advisable to choose an identifier that aligns with your existing database, making "externalId" a valuable and versatile option for processing requests.

signature

Allows for message authentication, ensuring that data remains unaltered during transmission, and guarantees the integrity of blockchain-stored data.

Additionally, signature serves as a means of verifying user identity and authorization, providing non-repudiation, enhancing security, and confirming the legitimacy of blockchain transactions.

Overall, this argument is indispensable for maintaining trust, security, and data reliability in cryptographic and blockchain environments.

uuids

You would use the "uuids" argument in an argument to acknowledge and remove specific events from a cache, ensuring cache integrity and efficient system operation by eliminating unnecessary data.

expiration

You use the expiration argument when authorizing another account to manage tokens from a specific collection for a limited time, ensuring that the approval automatically expires at the specified block number, providing control and security in scenarios involving NFTs or tokenized assets without a permanent transfer of ownership.

operator

Use the operator argument to grant specific accounts the authorization to manage and operate a token collection, allowing for delegated token management without transferring ownership.

signingAccount

Use the signingaccount argument to specify the account responsible for signing and authorizing a particular action or transaction, ensuring security, accountability and traceability in the process.

simulate

You would use the simulate parameter set to true when you want to test and validate the outcome of a transaction without actually executing it on the blockchain network.

It provides a valuable way to safely experiment with transactions and prevent unintended consequences, especially in scenarios where accuracy and precision are critical.

recipients

You can use the recipients parameter for transferring or minting tokens, to specify the accounts to which the tokens will be transferred, enabling targeted and controlled token transfers to designated recipients.

attributes

use on-chain attributes to assign and manage metadata, enabling detailed and comprehensive token metadata definition, which is valuable for providing rich and descriptive information about the token on the blockchain.

key

A "key" serves as the identifier or label for a specific attribute.

value

A "value" represents the corresponding information or data associated with that attribute.

hasRoyalty

Royalties are effectively enforced by the core blockchain, ensuring you receive your entitled earnings whenever the token is involved in transactions, providing a transparent and automated system for royalty distribution.

beneficiary

The recipient or entity designated to receive a portion of the proceeds from token transactions

percentage

Represents the specific portion or share of the transaction value that is allocated to the beneficiary.

isCurrency

This concept is used by the marketplace to determine what assets are allowed to be listed, and which side of the listing is charged fees.

cap

Employed to limit the maximum supply of tokens, creating scarcity and rarity by setting an upper bound on the number of tokens that can ever be created.

type

defines the token's minting behavior, where INFINITE allows unlimited minting, SINGLE_MINT enables minting of a single token, and SUPPLY specifies a fixed supply of tokens.

amount

Represents a numerical value associated with the quantity of a token, such as the quantity available, the total supply, or the number of tokens to be minted, depending on the context of its use.

freezeState

Allows you to define the duration of the suspension of transferability, with PERMANENT indicating a long-term freeze, TEMPORARY signifying a short-term suspension, and NEVER indicating that the token or collection will never be frozen, providing flexibility in asset management.

initialSupply

Specifies the quantity of tokens that will be minted and delivered to the designated recipient.

listingForbidden

Setting listingForbidden to true indicates that the token is restricted from being listed on a marketplace, providing control over its availability and preventing it from being traded or displayed on external platforms.

unitPrice

The unitPrice of a token is critical as it determines the cost structure, ENJ backing, and accessibility of the token, with the added significance that it can be increased but never decreased, requiring alignment with the token's distribution goals.

signingAccount

The "signingAccount" parameter should be configured with the address of the wallet that owns the token, ensuring that the actions and transactions associated with the token are appropriately authorized and executed by the correct account.

skipValidation

The skipValidation option, when set to true, allows for the bypassing of validation checks, which should be exercised with caution and only in scenarios where custom validation or specific requirements necessitate the bypassing of standard validation rules.

continueOnFailure

The continueOnFailure parameter, when set to true, indicates that the system should proceed with the transaction even if it encounters a failure or error during execution, offering a graceful handling of errors and allowing the transaction to continue despite issues. When set to false, any failure during execution will result in the transaction being halted and not proceeding further.

keepAlive

When conducting Enjin Coin (ENJ) transfers, utilizing the "keepAlive" option with a value of true is advisable if you intend to preserve the sender's Enjin Coin Account, even when its balance drops below the minimum threshold of 0.1 ENJ.

It's important to recognize that Enjin Coin Accounts and Token Accounts are distinct entities, meaning that a wallet can still hold tokens and NFTs even if the Enjin Coin Account is removed.

source

The source parameter refers to the address from which the tokens will be transferred, representing the ownership address of the tokens and the origin of the transfer.

mintPolicy

The "mintPolicy" parameter allows you to define the minting policy for tokens within a collection, with the following sub-parameters:

forceCollapsingSupply

Determines whether the tokens in this collection will be minted as CollapsingSupply types. This supply type allows the collection owner to mint new tokens as long as the token's circulating supply does not exceed it's max supply. Burning tokens reduces the max supply, meaning that in collapsing supply type, burned tokens cannot be re-minted.

maxTokenCount

Specifies the maximum number of tokens that can be issued within this collection, setting an upper limit on the total token count.

maxTokenSupply

Sets the maximum quantity of each unique token within this collection that can be minted, establishing an upper limit on the available supply for individual tokens.

freezeType

"Freezing" refers to the process of temporarily suspending the transferability of a collection or a specific token.

The freezeType parameter offers flexibility in specifying what can be frozen within the blockchain system, with the following options:

  • "COLLECTION": Indicates that an entire collection of tokens can be frozen.

  • "COLLECTION_ACCOUNT": Allows for the freezing of an entire collection account.

  • "TOKEN": Permits the freezing of individual tokens.

  • "TOKEN_ACCOUNT": Allows for the freezing of an entire token account.

markAsProcessing

The "markAsProcessing" action involves retrieving a list of newly pending transactions and subsequently marking them as "processing," indicating that they are currently being handled or executed within the blockchain system.

explicitRoyaltyCurrencies

The explicitRoyaltyCurrencies field within a collection serves the purpose of specifying which currencies are permitted to be accepted as royalties.

By including specific currencies in this field, a collection restricts the acceptance of royalties to only those currencies, ensuring that any listing created that intends to pay royalties in an unaccepted currency will result in a failed listing creation process.

This feature enhances control and compliance in managing royalties within the collection.

owner

The term "owner" can be employed in various contexts, depending on the specific action being performed.

For example, when unapproving a collection, "owner" refers to the account from which the collection approval will be removed, signifying the entity or account that holds ownership or control over the approval status of the collection.