Static configs

All of the static constants that are relevant for the chain have been aggregated into a single file.

This includes, but is not limited to:

  • Chain info and its relevant configs
  • All supported assets on each chain

The configuration documents are versioned so you will know if the object changes.

You can access the configs in one of two ways:

Alternatively, you can use the hooks, i.e.

The package can be installed into your dApp as a project dependency with:

Terminal window
npm i @axelarjs/api

Then run

import { createAxelarConfigClient } from "@axelarjs/api";
import { ENVIRONMENTS } from "@axelarjs/core";
const test = async () => {
const api = createAxelarConfigClient(ENVIRONMENTS.testnet);
const configs = await api.getAxelarConfigs(ENVIRONMENTS.testnet);
Object.entries(configs.chains).forEach((v) =>
console.log(`config for chain ${v[0]}: ${v[1]}`),
);
};
test();

Each of the relevant properties in the schema are typed out in the following Typescript interfaces: https://github.com/axelarnetwork/axelarjs/blob/main/packages/api/src/axelar-config/types.ts

Edit on GitHub