import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
network: "mainnet",
});
async function run() {
const result = await avalanche.data.primaryNetwork.getChainIdsForAddresses({
addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg",
});
console.log(result);
}
run();{
"addresses": [
{
"address": "<string>",
"blockchainIds": [
"11111111111111111111111111111111LpoYY"
]
}
]
}Returns Primary Network chains that each address has touched in the form of an address mapped array. If an address has had any on-chain interaction for a chain, that chain’s chain id will be returned.
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
network: "mainnet",
});
async function run() {
const result = await avalanche.data.primaryNetwork.getChainIdsForAddresses({
addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg",
});
console.log(result);
}
run();{
"addresses": [
{
"address": "<string>",
"blockchainIds": [
"11111111111111111111111111111111LpoYY"
]
}
]
}Documentation Index
Fetch the complete documentation index at: https://developers.avacloud.io/llms.txt
Use this file to discover all available pages before exploring further.
Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.
Either mainnet or testnet/fuji.
mainnet, fuji, testnet A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
Successful response
Show child attributes
Was this page helpful?