NFT Common Structures
The following structures are used in the Komodo DeFi SDK for non-fungible tokens (NFTs).
| Parameter* = required | Type | Description |
|---|---|---|
| exclude_phishing | booleandefault: false | Optional. If true, only transfers which have param possible_phishing:false are included in the response. |
| exclude_spam | booleandefault: false | Optional. If true, only transfers which have param possible_spam:false are included in the response. |
| from_date | integer | Optional. A timestamp in unix epoch format. If true, filter includes transfers from this date onwards (inclusive). |
| receive | booleandefault: false | Optional. If true, only transfers where user received NFTs are included in the response. |
| send | booleandefault: false | Optional. If true, only transfers where user sent NFTs are included in the response. |
| to_date | integer | Optional. A timestamp in unix epoch format. If true, filter includes transfers up to this date (inclusive). |
The NftFilter object includes the following items for a given coin or token:
| Parameter* = required | Type | Description |
|---|---|---|
| exclude_phishing | booleandefault: false | Optional, defaults to false. If true, only tokens which have param possible_phishing:false are included in the response. |
| exclude_spam | booleandefault: false | Optional, defaults to false. If true, only tokens which have param possible_spam:false are included in the response. |
The NftInfoBasic object includes the following items for a given token:
| Parameter* = required | Type | 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* = required | Type | Description |
|---|---|---|
| amount* | string | The amount of this NFT the user owns (used by ERC1155). |
| 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_metadata_sync* | string | When the metadata was last updated. |
| last_token_uri_sync* | string | When the token_uri was last updated. |
| owner_of* | string | The wallet address of the owner of the NFT. |
| 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. |
| possible_spam* | boolean | If true, the contract address has been identified as associated with spam or suspicious activities. |
| 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. |
| uri_meta* | object | A standard NftMetadata object. |
| block_number_minted | integer | Optional. The block height when the NFT was minted. May be null. |
| metadata | object | Optional. A JSON object containing NFT metadata. May be null. |
| minter_address | string | Optional. Minter address. May be null. |
| token_domain | string | Optional. Token domain. May be null. |
| token_hash | string | Optional. The token hash. May be null. |
| token_uri | string | Optional. The URI to the metadata of the token. May be null. |
The NftMetadata object includes the following items for a given coin or token:
| Parameter* = required | Type | Description |
|---|---|---|
| animation_domain | string | Optional. Extracted domain from the animation_url, if valid. |
| animation_url | string | Optional. Url to an animation to be displayed instead of a static image. |
| attributes | object or array of objects | Optional. The values within this parameter will vary, and are set by the creator. Often used to store traits. |
| description | string | Optional. Description of the token. |
| external_domain | string | Optional. Extracted domain from the external_url, if valid. |
| external_url | string | Optional. URL to the external source related to the token. |
| image | string | Optional. Direct URL to the NFT's image. |
| image_details | object | Optional. JSON containing additional details or attributes of the image. |
| image_domain | string | Optional. Extracted domain from the 'image_url', if valid. |
| image_url | string | Optional. 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. |
| name | string | Optional. Name of the token. |
[
{
"trait_type": "Specialization",
"value": "Thief"
},
{
"trait_type": "Skin Tone",
"value": "#0013b0"
},
{
"trait_type": "Weapon",
"value": "Crossbow"
},
{
"trait_type": "Species",
"value": "Dark Elf"
},
{
"trait_type": "Gender",
"value": "Female"
},
{
"trait_type": "Strength",
"value": "8"
},
{
"trait_type": "Dexterity",
"value": "12"
},
{
"trait_type": "Intelligence",
"value": "10"
},
{
"trait_type": "Perks",
"value": ["Steath", "Eagle Eye", "Lockpicking", "Pickpocketing", "Fire resistance"]
},
{
"trait_type": "Weakness",
"value": ["Slow healing", "Elfbark Addict", "Lockpicking", "Fear of cats", "Unconvincing liar"]
},
{
"trait_type": "Personality",
"value": "Aggressive"
}
]
The NftProvider object is used in the 'enable_nft' RPC method. It defines the NFT providers that are avaialable and their configuration.
| Parameter* = required | Type | Description |
|---|---|---|
| info* | object | Additional information about the provider |
| info.url* | string | URL of the provider's endpoint |
| type* | string | Specifies the type of the provider. |
| info.komodo_proxy | boolean | Optional. Indicates whether proxy authentication is enabled for the endpoint |
{
"type": "Moralis",
"info": {
"url": "https://moralis-proxy.komodo.earth",
"komodo_proxy": true
}
}
The NftTransfer object includes the following items for each token transaction:
| Parameter* = required | Type | Description |
|---|---|---|
| amount* | string | Amount of tokens transferred. |
| 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. |
| confirmations* | integer | The count of blocks produced since this transaction was confirmed. |
| contract_type* | string | Contract type. ERC721 or ERC1155. |
| from_address* | string | Address of previous owner which sent the token(s). |
| log_index* | string | Log index of the transfer. |
| 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. |
| possible_spam* | boolean | If true, the contract address has been identified as associated with spam or suspicious activities. |
| 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. |
| to_address* | string | Address of new owner which received the token(s). |
| token_address* | string | Address of token transferred. |
| token_id* | string | Token ID. |
| transaction_hash* | string | Transaction ID of the transfer. |
| block_hash | string | Optional. May be null. Hash of block in which transfer occurred. |
| collection_name | string | Optional. May be null. Name of collection which token belongs to. |
| fee_details | object | Optional. A standard FeeInfo object. |
| image_domain | string | Optional. May be null. Extracted domain from the image_url, if valid. |
| image_url | string | Optional. May be null. The URI to the token image. |
| operator | string | Optional. May be null. |
| token_domain | string | Optional. May be null. Extracted domain from the token_uri, if valid. |
| token_name | string | Optional. May be null. Name of the token. |
| token_uri | string | Optional. May be null. The URI to the metadata of the token. |
| transaction_index | string | Optional. May be null. Transaction index of the transfer. |
| transaction_type | string | Optional. May be null. Transaction type. Possible values are Single. |
| value | string | Optional. May be null. Tranfer value. |
| verified | integer | Optional. May be null. A deprecated field which will be removed in future. |
The NftTransferFilter object includes the following items for a given coin or token:
| Parameter* = required | Type | Description |
|---|---|---|
| exclude_phishing | booleandefault: false | Optional. If true, only transfers which have param possible_phishing:false are included in the response. |
| exclude_spam | booleandefault: false | Optional. If true, only transfers which have param possible_spam:false are included in the response. |
| from_date | integer | Optional. A timestamp in unix epoch format. If true, filter includes transfers from this date onwards (inclusive). |
| receive | booleandefault: false | Optional. If true, only transfers where user received NFTs are included in the response. |
| send | booleandefault: false | Optional. If true, only transfers where user sent NFTs are included in the response. |
| to_date | integer | Optional. A timestamp in unix epoch format. If true, filter includes transfers up to this date (inclusive). |
{
"ticker": "MINDS-ERC20",
"required_confirmations": 4
}
| Parameter* = required | Type | Description |
|---|---|---|
| amount* | string | The amount of this NFT the user owns (used by ERC1155). |
| 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. |
| possible_phishing* | boolean | Indicates if the NFT is flagged as phishing. |
| possible_spam* | boolean | Indicates if the NFT collection is flagged as spam. |
| 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. |
| block_number_minted | integer | Optional. The block height when the NFT was minted. May be null. |
| metadata | string | Optional. May be null or a JSON stringified object containing NFT metadata. |
| name | string | Optional. May be null. An NFT collection name. |
| normalized_metadata | object | Optional. A JSON object containing NFT metadata. |
| symbol | string | Optional. May be null. The symbol of the NFT collection. |
| token_uri | string | Optional. May be null. A URI to the NFT metadata (Usually an IPFS link). |
Standard object structure used in token information methods like get_token_info.
| Parameter* = required | Type | Description |
|---|---|---|
| protocol_data* | object | Protocol-specific data object |
| type* | string | Token type - e.g ERC20 for tokens on the Ethereum network |
Sub-object of TokenProtocol containing platform-specific token information.
| Parameter* = required | Type | Description |
|---|---|---|
| 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 |
| platform* | string | The parent coin of the token's platform - e.g MATIC for PLG20 tokens |
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* = required | Type | Description |
|---|---|---|
| to* | string | The recipient's address |
| token_address* | string | The contract address of the NFT |
| token_id* | string | The ID of the NFT |
| amount | string | Optional. The amount to withdraw (for ERC1155 NFTs). For ERC721 NFTs, this is always 1 and can be omitted. |