Metadata
The Metadata API delivers off-chain information on well-known accounts and smart contracts. We curate and update a list of well-known addresses of bakers, exchanges, NFT and DeFi projects and others to help applications identify public addresses. In addition we automatically collect standard contract and token metadata published by smart contracts on-chain as well as Tezos domain names and their reverse records.
The TzPro Explorer API can embed metadata to block, operation and account endpoints when using the meta=1
query argument. The optional field metadata
will contain values for addresses (e.g. baker, sender, receiver etc.) where metadata is defined.
Available Endpoints​
The following endpoints are available to query and manage address and token metadata. Note that on the public API this metadata is read-only and curated by us. On dedicated instances customers have the ability to manage their own metadata including the definition of own schemas.
Endpoint | Comment |
---|---|
GET /metadata/{address}[_{id}] | Get structured account & token metadata |
GET /metadata/schemas | List supported JSON schema names |
GET /metadata/schemas/{schema} | Get JSON schema definition |
POST /metadata | Create new metadata entry for an address or token (private instance only) |
DELETE /metadata | Purge all metadata (private instance only) |
PUT /metadata/{address}[_{id}] | Update metadata entry (private instance only) |
DELETE /metadata/{address}[_{id}] | Remove metadata entry (private instance only) |
Pre-defined Schemas​
We provide a list of pre-defined schemas in combination with our curated list of metadata entries for public accounts and smart contracts.
Schema | Description |
---|---|
alias | Common name, logo and classification. |
asset | Generic Layer 2 asset information. |
baker | Tezos baker related information. |
tzdomain | Tezos Domains reverse record. |
tzprofile | Tezos Profiles metadata. |
location | Geographical location and coordinates. |
media | Generic media URIs and format definitions. |
payout | Baker payout address list. |
rights | Content and license rightsholder info. |
social | Social media handles. |
tz16 | Tezos TZIP-16 metadata standard. |
tz21 | Tezos TZIP-21 metadata standard. |
updated | Metadata record update information. |
Custom Schemas​
It is possible to register custom user-defined metadata schemas with us. Owners of on-demand instances can send a request to create one or more private metadata schemas to tzstats@trili.tech. The schema definition must have a unique name (ASCII, non-whitespace), be valid and compatible with JSON Schema draft 2019-09 or earlier.
Example Response (Hic et Nunc)​
GET /explorer/account/KT1HbQepzV1nVGg8QVznG7z4RcHseD5kwqBn?meta=1
{
// ...
// ... regular object data for this account
// ...
// embedded metadata for related addresses
"metadata": {
// curated contract metadata
"KT1HbQepzV1nVGg8QVznG7z4RcHseD5kwqBn": {
"address": "KT1HbQepzV1nVGg8QVznG7z4RcHseD5kwqBn",
"alias": {
"name": "Hic et Nunc Marketplace",
"kind": "nft",
"logo": "KT1Hkg5qeNhfwpKW4fXvq7HGZB9z2EnmCCA9.png"
},
"social": {
"twitter":"hicetnunc2000"
}
},
// metadata for contract creator address
"tz1Y1j7FK1X9Rrv2VdPz5bXoU7SszF8W1RnK":{
"address": "tz1Y1j7FK1X9Rrv2VdPz5bXoU7SszF8W1RnK",
"alias": {
"kind": "user"
},
"tzdomain":{
"name": "ungrund.tez",
},
"tzprofile": {
"alias": "crzypatchwork",
"description": "compsocialsci",
"logo": "https://pbs.twimg.com/profile_images/1399775960443113475/QQRAAGz3_400x400.jpg",
"serial": 2,
"twitter": "crzypatchwork",
"website": "hicetnunc.xyz"
}
}
}
}