- Intro
- History
- State
- Tokens
- Submit new transaction
Info of on-chain entities
POST
https://api.trait.tech/state/entity_info
State
Provided info contains URI to entity metadata (if set by owner) with the info of supported traits.
Request
Body Params application/json
Request params for the endpoint `/state/entity_info`.
block
Block
Any of
>= 66 characters<= 66 characters
Default:
blockchain_head
Match pattern:
^0x[0-9abcdefABCDEF]{64}$
entities
object (FilterBlockchainEntityId)
required
app_agents
App Agents
fungible_tokens
Fungible Tokens
nft_collections
Nft Collections
nft_items
Nft Items
native_token
boolean
Native Token
true
to receive info about token TRAIT
Default:
false
Example
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.trait.tech/state/entity_info' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢200OK
application/json
Body
Response schema for the endpoint `/state/entity_info`.
metadata
object (ResponseMetadata)
required
request_context
object (ResponseBlockId)
required
blockchain_head
object (ResponseBlockId)
required
data
object (BlockchainEntitiesInfo)
required
app_agents
array[object (AppAgentInfo) {4}]
App Agents
fungible_tokens
array[object (FungibleTokenInfo) {7}]
Fungible Tokens
nft_collections
array[object (NftCollectionInfo) {5}]
Nft Collections
nft_items
array[object (NftItemInfo) {3}]
Nft Items
native_token
Native Token
TRAIT
.Example
{
"metadata": {
"request_context": {
"block_hash": "0xab8006019066f080402ab43da043127b930ef0ffb3349a333222d67c0f542338",
"block_index": 29702,
"block_timestamp": 1727581488000
},
"blockchain_head": {
"block_hash": "0xab8006019066f080402ab43da043127b930ef0ffb3349a333222d67c0f542338",
"block_index": 29702,
"block_timestamp": 1727581488000
}
},
"data": {
"app_agents": [
{
"app_agent_id": 1017,
"app_agent_address": {
"address": "ttrnYjkipbBQVVvpcx349CsAvbQvF35JrXHosmbAULSZa7Uyv",
"account_id": "0xf903000001d19712b1c73aa01de7b7764c220ed3d23403f9ef8052e5d2fcc16e",
"address_type": "app_agent",
"app_agent_id": 1017,
"ta_id": null,
"address_name": null
},
"app_agent_owner": {
"address": "ttmcLgs3b7tegED6wRMFAA6WLYWhYeCL1TgHv6u4VDWptiz8L",
"account_id": "0x140cd0b779f4418ec25a5d97572e29ead9afcc4112974c923ee796702338830b",
"address_type": "regular",
"app_agent_id": null,
"ta_id": null,
"address_name": null
},
"metadata": "https://trait-wallet-demo-account.trait.tech/game-c/app-agent-c/app-agent-c.json"
},
{
"app_agent_id": 1033,
"app_agent_address": {
"address": "ttmMsYRqsnrKY5DNTZY3rBCUHq7s191wKvWQXnrfb7xeADJGC",
"account_id": "0x0904000001d5006fd044601bad51baedee11be3f4247c688310084e17d778170",
"address_type": "app_agent",
"app_agent_id": 1033,
"ta_id": null,
"address_name": null
},
"app_agent_owner": {
"address": "ttqUHa4SJ5JE5mCcx9PkWNo4AkDAgyqeBLoaHxdCeY5rsq8E5",
"account_id": "0xbed94ac6f0fdf9a8b24c3a16ae861eb4f776d819f6c6316a0ae866c9238d2078",
"address_type": "regular",
"app_agent_id": null,
"ta_id": null,
"address_name": null
},
"metadata": "http://trait-wallet-demo-account-staging.trait.tech/game-a/app-agent-a/app-agent-a.json"
}
],
"fungible_tokens": [
{
"fungible_token_id": 32,
"fungible_token_manager": {
"address": "ttmMsYRqsnrKY5DNTZY3rBCUHq7s191wKvWQXnrfb7xeADJGC",
"account_id": "0x0904000001d5006fd044601bad51baedee11be3f4247c688310084e17d778170",
"address_type": "app_agent",
"app_agent_id": 1033,
"ta_id": null,
"address_name": null
},
"supply": 1000000000000000,
"min_amount": 1,
"accounts": 3,
"status": "Live",
"metadata": "http://trait-wallet-demo-account-staging.trait.tech/game-a/fungible-a-a/fungible-a-a.json"
}
],
"nft_collections": [
{
"nft_collection_id": 17,
"nft_collection_manager": {
"address": "ttrnYjkipbBQVVvpcx349CsAvbQvF35JrXHosmbAULSZa7Uyv",
"account_id": "0xf903000001d19712b1c73aa01de7b7764c220ed3d23403f9ef8052e5d2fcc16e",
"address_type": "app_agent",
"app_agent_id": 1017,
"ta_id": null,
"address_name": null
},
"manager_deposit": 1011130100000000,
"items": 10,
"metadata": "https://trait-wallet-demo-account.trait.tech/game-c/nft-collection-c-d/nft-collection-c-d/nft-collection-c-d.json"
}
],
"nft_items": [
{
"nft_collection_id": 17,
"nft_item_id": 754266,
"metadata": "https://trait-wallet-demo-account.trait.tech/game-c/nft-collection-c-d/nft-token-c-d-j/nft-token-c-d-j.json"
}
],
"native_token": {
"name": "TRAIT",
"symbol": "TRAIT",
"decimals": 12,
"min_amount": 1000000000000
}
}
}
🟠422Parameter Error
Modified at 2024-11-21 18:59:09