NFT Common Structures
structures nfts_common_structures
The following structures are used in the Komodo DeFi SDK for non-fungible tokens (NFTs).
Parameter Type Required Default Description receive boolean ✗ false
If true
, only transfers where user received NFTs are included in the response. send boolean ✗ false
If true
, only transfers where user sent NFTs are included in the response. from_date integer ✗ -
A timestamp in unix epoch format . If true
, filter includes transfers from this date onwards (inclusive). to_date integer ✗ -
A timestamp in unix epoch format . If true
, filter includes transfers up to this date (inclusive). exclude_spam boolean ✗ false
If true
, only transfers which have param possible_spam:false
are included in the response. exclude_phishing boolean ✗ false
If true
, only transfers which have param possible_phishing:false
are included in the response.
The NftFilter
object includes the following items for a given coin or token:
Parameter Type Required Default Description exclude_spam boolean ✗ false
If true
, only tokens which have param possible_spam:false
are included in the response. exclude_phishing boolean ✗ false
If true
, only tokens which have param possible_phishing:false
are included in the response.
The NftInfoBasic
object includes the following items for a given token:
Parameter Type Required Description amount string ✓ The amount of this NFT the user owns (used by ERC1155
). chain string ✓ Chain name. One of AVALANCHE
, BSC
, ETH
, FANTOM
, or POLYGON
. contract_type string ✓ The type of NFT contract standard. One of ERC721
or ERC1155
. token_address string ✓ The address of the NFT contract. token_id string ✓ The token ID of the NFT.
The NftInfo
object includes the following items for a given token:
Parameter Type Required Description amount string ✓ The amount of this NFT the user owns (used by ERC1155
). block_number_minted integer ✗ The block height when the NFT was minted. May be null
. block_number integer ✓ The block height when the amount or owner changed. chain string ✓ Chain name. One of AVALANCHE
, BSC
, ETH
, FANTOM
, or POLYGON
. contract_type string ✓ The type of NFT contract standard. One of ERC721
or ERC1155
. last_token_uri_sync string ✓ When the token_uri was last updated. last_metadata_sync string ✓ When the metadata was last updated. metadata object ✗ A JSON object containing NFT metadata. May be null
. minter_address string ✗ Minter address. May be null
. owner_of string ✓ The wallet address of the owner of the NFT. possible_spam boolean ✓ If true
, the contract address has been identified as associated with spam or suspicious activities. possible_phishing boolean ✓ If true
, the token has been identified as associated with phishing, as at least one of domain fields is found in database with phishing domains. synced_at string ✓ When the token was last synced with the node. token_address string ✓ The address of the NFT contract. token_id string ✓ The token ID of the NFT. token_hash string ✗ The token hash. May be null
. token_uri string ✗ The URI to the metadata of the token. May be null
. token_domain string ✗ Token domain. May be null
. uri_meta object ✓ A standard NftMetadata object.
The NftMetadata
object includes the following items for a given coin or token:
Parameter Type Required Default Description image string ✗ - Direct URL to the NFT's image. image_url string ✗ - Url to the NFT's image. Derived from the image
or image_url
fields to prioritize the non-null value. Can be null if neither is provided. image_domain string ✗ - Extracted domain from the 'image_url', if valid. name string ✗ - Name of the token. description string ✗ - Description of the token. attributes object or array of objects ✗ - The values within this parameter will vary, and are set by the creator. Often used to store traits. animation_url string ✗ - Url to an animation to be displayed instead of a static image. animation_domain string ✗ - Extracted domain from the animation_url
, if valid. external_url string ✗ - URL to the external source related to the token. external_domain string ✗ - Extracted domain from the external_url
, if valid. image_details object ✗ - JSON containing additional details or attributes of the image.
Show Example
The NftProvider
object is used in the 'enable_nft' RPC method. It defines the NFT providers that are avaialable and their configuration.
Parameter Type Required Default Description type string ✓ - Specifies the type of the provider. info object ✓ - Additional information about the provider info.url string ✓ - URL of the provider's endpoint info.komodo_proxy boolean ✗ - Indicates whether proxy authentication is enabled for the endpoint
Show Example
The NftTransfer
object includes the following items for each token transaction:
Parameter Type Description amount string Amount of tokens transferred. block_hash string May be null
. Hash of block in which transfer occurred. block_number integer Height of block in which transfer occurred. block_timestamp integer Block time in unix epoch format . chain string Chain name. One of AVALANCHE
, BSC
, ETH
, FANTOM
, or POLYGON
. token_uri string May be null
. The URI to the metadata of the token. token_domain string May be null
. Extracted domain from the token_uri
, if valid. collection_name string May be null
. Name of collection which token belongs to. image_url string May be null
. The URI to the token image. image_domain string May be null
. Extracted domain from the image_url
, if valid. token_name string May be null
. Name of the token. contract_type string Contract type. ERC721
or ERC1155
. token_address string Address of token transferred. token_id string Token ID. possible_spam boolean If true
, the contract address has been identified as associated with spam or suspicious activities. possible_phishing boolean If true
, the token has been identified as associated with phishing, as at least one of domain fields is found in database with phishing domains. transaction_hash string Transaction ID of the transfer. transaction_index string May be null
. Transaction index of the transfer. log_index string Log index of the transfer. value string May be null
. Tranfer value. transaction_type string May be null
. Transaction type. Possible values are Single
. from_address string Address of previous owner which sent the token(s). to_address string Address of new owner which received the token(s). status string Transfer status. Will be either Send
or Receive
. When the from_address
and to_address
are the same (i.e. sending to yourself), this value will be Receive
. verified integer May be null
. A deprecated field which will be removed in future. operator string May be null
. fee_details object Optional. A standard FeeInfo object. confirmations integer The count of blocks produced since this transaction was confirmed.
The NftTransferFilter
object includes the following items for a given coin or token:
Parameter Type Required Default Description receive boolean ✗ false
If true
, only transfers where user received NFTs are included in the response. send boolean ✗ false
If true
, only transfers where user sent NFTs are included in the response. from_date integer ✗ - A timestamp in unix epoch format . If true
, filter includes transfers from this date onwards (inclusive). to_date integer ✗ - A timestamp in unix epoch format . If true
, filter includes transfers up to this date (inclusive). exclude_spam boolean ✗ false
If true
, only transfers which have param possible_spam:false
are included in the response. exclude_phishing boolean ✗ false
If true
, only transfers which have param possible_phishing:false
are included in the response.
Show Example
Parameter Type Required Description amount string ✓ The amount of this NFT the user owns (used by ERC1155
). block_number_minted integer ✗ The block height when the NFT was minted. May be null
. block_number integer ✓ The block height when the amount or owner changed. chain string ✓ Chain name. One of AVALANCHE
, BSC
, ETH
, FANTOM
, or POLYGON
. name string ✗ May be null
. An NFT collection name. contract_type string ✓ The type of NFT contract standard. One of ERC721
or ERC1155
. last_token_uri_sync string ✓ When the token_uri was last updated. metadata string ✗ May be null
or a JSON stringified object containing NFT metadata. normalized_metadata object ✗ A JSON object containing NFT metadata. possible_spam boolean ✓ Indicates if the NFT collection is flagged as spam. symbol string ✗ May be null
. The symbol of the NFT collection. synced_at string ✓ When the NFT was last synced with the node. token_address string ✓ The smart contract address of this NFT. token_hash string ✓ A hash uniquely identifying this NFT's metadata. token_id string ✓ The token ID of this NFT. token_uri string ✗ May be null
. A URI to the NFT metadata (Usually an IPFS link). possible_phishing boolean ✓ Indicates if the NFT is flagged as phishing.
Standard object structure used in token information methods like get_token_info .
Parameter Type Required Description type string ✓ Token type - e.g ERC20
for tokens on the Ethereum network protocol_data object ✓ Protocol-specific data object
Sub-object of TokenProtocol containing platform-specific token information.
Parameter Type Required Description platform string ✓ The parent coin of the token's platform - e.g MATIC
for PLG20 tokens contract_address string ✓ Must be mixed case The identifying hex string for the token's contract. Can be found on sites like EthScan , BscScan & PolygonScan
The WithdrawNftData
object is used for withdrawals of NFTs on ERC721 and ERC1155 contracts. It includes the following items for a given coin or token:
Parameter Type Required Default Description token_address string ✓ -
The contract address of the NFT token_id string ✓ -
The ID of the NFT to string ✓ -
The recipient's address amount string ✗ -
The amount to withdraw (for ERC1155 NFTs). For ERC721 NFTs, this is always 1
and can be omitted.