import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
network: "mainnet",
});
async function run() {
const result = await avalanche.data.primaryNetwork.getAssetDetails({
blockchainId: "x-chain",
assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
});
console.log(result);
}
run();{
"assetId": "<string>",
"name": "<string>",
"symbol": "<string>",
"denomination": 123,
"type": "secp256k1",
"createdAtTimestamp": 123,
"cap": "fixed"
}Gets asset details corresponding to the given asset id on the X-Chain.
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
network: "mainnet",
});
async function run() {
const result = await avalanche.data.primaryNetwork.getAssetDetails({
blockchainId: "x-chain",
assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
});
console.log(result);
}
run();{
"assetId": "<string>",
"name": "<string>",
"symbol": "<string>",
"denomination": 123,
"type": "secp256k1",
"createdAtTimestamp": 123,
"cap": "fixed"
}Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.
A primary network blockchain id or alias.
2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM, 2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm, x-chain Either mainnet or testnet/fuji.
mainnet, fuji, testnet Asset ID for any asset on X-Chain
Successful response
Unique ID for an asset.
"th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof"
Name of this asset.
"Avalanche"
Symbol for this asset (max 4 characters).
"AVAX"
Denomination of this asset to represent fungibility.
9
Type of asset like SECP256K1 or NFT.
secp256k1, nft "secp256k1"
Timestamp in seconds this asset was created on.
1675444720
Cap represents if an asset is a variable or fixed cap asset.
fixed, variable "fixed"
Was this page helpful?