On this page

latest contributor to this doc

Last Edit:

@smk762

NFT Common Structures

structuresnfts_common_structures

The following structures are used in the Komodo DeFi SDK for non-fungible tokens (NFTs).

ParameterTypeRequiredDefaultDescription
receivebooleanfalseIf true, only transfers where user received NFTs are included in the response.
sendbooleanfalseIf true, only transfers where user sent NFTs are included in the response.
from_dateinteger-A timestamp in unix epoch format. If true, filter includes transfers from this date onwards (inclusive).
to_dateinteger-A timestamp in unix epoch format. If true, filter includes transfers up to this date (inclusive).
exclude_spambooleanfalseIf true, only transfers which have param possible_spam:false are included in the response.
exclude_phishingbooleanfalseIf 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:

ParameterTypeRequiredDefaultDescription
exclude_spambooleanfalseIf true, only tokens which have param possible_spam:false are included in the response.
exclude_phishingbooleanfalseIf 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:

ParameterTypeRequiredDescription
amountstringThe amount of this NFT the user owns (used by ERC1155).
chainstringChain name. One of AVALANCHE, BSC, ETH, FANTOM, or POLYGON.
contract_typestringThe type of NFT contract standard. One of ERC721 or ERC1155.
token_addressstringThe address of the NFT contract.
token_idstringThe token ID of the NFT.

The NftInfo object includes the following items for a given token:

ParameterTypeRequiredDescription
amountstringThe amount of this NFT the user owns (used by ERC1155).
block_number_mintedintegerThe block height when the NFT was minted. May be null.
block_numberintegerThe block height when the amount or owner changed.
chainstringChain name. One of AVALANCHE, BSC, ETH, FANTOM, or POLYGON.
contract_typestringThe type of NFT contract standard. One of ERC721 or ERC1155.
last_token_uri_syncstringWhen the token_uri was last updated.
last_metadata_syncstringWhen the metadata was last updated.
metadataobjectA JSON object containing NFT metadata. May be null.
minter_addressstringMinter address. May be null.
owner_ofstringThe wallet address of the owner of the NFT.
possible_spambooleanIf true, the contract address has been identified as associated with spam or suspicious activities.
possible_phishingbooleanIf 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_atstringWhen the token was last synced with the node.
token_addressstringThe address of the NFT contract.
token_idstringThe token ID of the NFT.
token_hashstringThe token hash. May be null.
token_uristringThe URI to the metadata of the token. May be null.
token_domainstringToken domain. May be null.
uri_metaobjectA standard NftMetadata object.

The NftMetadata object includes the following items for a given coin or token:

ParameterTypeRequiredDefaultDescription
imagestring-Direct URL to the NFT's image.
image_urlstring-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_domainstring-Extracted domain from the 'image_url', if valid.
namestring-Name of the token.
descriptionstring-Description of the token.
attributesobject or array of objects-The values within this parameter will vary, and are set by the creator. Often used to store traits.
animation_urlstring-Url to an animation to be displayed instead of a static image.
animation_domainstring-Extracted domain from the animation_url, if valid.
external_urlstring-URL to the external source related to the token.
external_domainstring-Extracted domain from the external_url, if valid.
image_detailsobject-JSON containing additional details or attributes of the image.

The NftProvider object is used in the 'enable_nft' RPC method. It defines the NFT providers that are avaialable and their configuration.

ParameterTypeRequiredDefaultDescription
typestring-Specifies the type of the provider.
infoobject-Additional information about the provider
info.urlstring-URL of the provider's endpoint
info.komodo_proxyboolean-Indicates whether proxy authentication is enabled for the endpoint

The NftTransfer object includes the following items for each token transaction:

ParameterTypeDescription
amountstringAmount of tokens transferred.
block_hashstringMay be null. Hash of block in which transfer occurred.
block_numberintegerHeight of block in which transfer occurred.
block_timestampintegerBlock time in unix epoch format.
chainstringChain name. One of AVALANCHE, BSC, ETH, FANTOM, or POLYGON.
token_uristringMay be null. The URI to the metadata of the token.
token_domainstringMay be null. Extracted domain from the token_uri, if valid.
collection_namestringMay be null. Name of collection which token belongs to.
image_urlstringMay be null. The URI to the token image.
image_domainstringMay be null. Extracted domain from the image_url, if valid.
token_namestringMay be null. Name of the token.
contract_typestringContract type. ERC721 or ERC1155.
token_addressstringAddress of token transferred.
token_idstringToken ID.
possible_spambooleanIf true, the contract address has been identified as associated with spam or suspicious activities.
possible_phishingbooleanIf 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_hashstringTransaction ID of the transfer.
transaction_indexstringMay be null. Transaction index of the transfer.
log_indexstringLog index of the transfer.
valuestringMay be null. Tranfer value.
transaction_typestringMay be null. Transaction type. Possible values are Single.
from_addressstringAddress of previous owner which sent the token(s).
to_addressstringAddress of new owner which received the token(s).
statusstringTransfer 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.
verifiedintegerMay be null. A deprecated field which will be removed in future.
operatorstringMay be null.
fee_detailsobjectOptional. A standard FeeInfo object.
confirmationsintegerThe count of blocks produced since this transaction was confirmed.

The NftTransferFilter object includes the following items for a given coin or token:

ParameterTypeRequiredDefaultDescription
receivebooleanfalseIf true, only transfers where user received NFTs are included in the response.
sendbooleanfalseIf true, only transfers where user sent NFTs are included in the response.
from_dateinteger-A timestamp in unix epoch format. If true, filter includes transfers from this date onwards (inclusive).
to_dateinteger-A timestamp in unix epoch format. If true, filter includes transfers up to this date (inclusive).
exclude_spambooleanfalseIf true, only transfers which have param possible_spam:false are included in the response.
exclude_phishingbooleanfalseIf true, only transfers which have param possible_phishing:false are included in the response.

ParameterTypeRequiredDescription
amountstringThe amount of this NFT the user owns (used by ERC1155).
block_number_mintedintegerThe block height when the NFT was minted. May be null.
block_numberintegerThe block height when the amount or owner changed.
chainstringChain name. One of AVALANCHE, BSC, ETH, FANTOM, or POLYGON.
namestringMay be null. An NFT collection name.
contract_typestringThe type of NFT contract standard. One of ERC721 or ERC1155.
last_token_uri_syncstringWhen the token_uri was last updated.
metadatastringMay be null or a JSON stringified object containing NFT metadata.
normalized_metadataobjectA JSON object containing NFT metadata.
possible_spambooleanIndicates if the NFT collection is flagged as spam.
symbolstringMay be null. The symbol of the NFT collection.
synced_atstringWhen the NFT was last synced with the node.
token_addressstringThe smart contract address of this NFT.
token_hashstringA hash uniquely identifying this NFT's metadata.
token_idstringThe token ID of this NFT.
token_uristringMay be null. A URI to the NFT metadata (Usually an IPFS link).
possible_phishingbooleanIndicates if the NFT is flagged as phishing.

Standard object structure used in token information methods like get_token_info.

ParameterTypeRequiredDescription
typestringToken type - e.g ERC20 for tokens on the Ethereum network
protocol_dataobjectProtocol-specific data object

Sub-object of TokenProtocol containing platform-specific token information.

ParameterTypeRequiredDescription
platformstringThe parent coin of the token's platform - e.g MATIC for PLG20 tokens
contract_addressstringMust 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:

ParameterTypeRequiredDefaultDescription
token_addressstring-The contract address of the NFT
token_idstring-The ID of the NFT
tostring-The recipient's address
amountstring-The amount to withdraw (for ERC1155 NFTs). For ERC721 NFTs, this is always 1 and can be omitted.