Avalanche SDK Client
    Preparing search index...

    Type Alias InfoAPIActions

    type InfoAPIActions = {
        acps: () => Promise<AcpsReturnType>;
        getBlockchainID: (args: GetBlockchainIDParameters) => Promise<GetBlockchainIDReturnType>;
        getNetworkID: () => Promise<GetNetworkIDReturnType>;
        getNetworkName: () => Promise<GetNetworkNameReturnType>;
        getNodeID: () => Promise<GetNodeIDReturnType>;
        getNodeIP: () => Promise<GetNodeIPReturnType>;
        getNodeVersion: () => Promise<GetNodeVersionReturnType>;
        getTxFee: () => Promise<GetTxFeeReturnType>;
        getVMs: () => Promise<GetVMsReturnType>;
        isBootstrapped: (args: IsBootstrappedParameters) => Promise<IsBootstrappedReturnType>;
        peers: (args: PeersParameters) => Promise<PeersReturnType>;
        upgrades: () => Promise<UpgradesReturnType>;
        uptime: () => Promise<UptimeReturnType>;
    }
    Index

    Properties

    acps: () => Promise<AcpsReturnType>

    Returns peer preferences for Avalanche Community Proposals (ACPs).

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const acpPreferences = await client.info.acps()
    getBlockchainID: (args: GetBlockchainIDParameters) => Promise<GetBlockchainIDReturnType>

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const blockchainID = await client.info.getBlockchainID({
    alias: "X"
    })
    getNetworkID: () => Promise<GetNetworkIDReturnType>

    Get the ID of the network this node is participating in. Network ID of 1 = Mainnet, Network ID of 5 = Fuji (testnet).

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const networkID = await client.info.getNetworkID()
    getNetworkName: () => Promise<GetNetworkNameReturnType>

    Get the name of the network this node is participating in.

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const networkName = await client.info.getNetworkName()
    getNodeID: () => Promise<GetNodeIDReturnType>

    Get the ID, the BLS key, and the proof of possession of this node. Note: This endpoint is only available on specific nodes, not on public servers.

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const nodeInfo = await client.info.getNodeID()
    getNodeIP: () => Promise<GetNodeIPReturnType>

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const nodeIP = await client.info.getNodeIP()
    getNodeVersion: () => Promise<GetNodeVersionReturnType>

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const nodeVersion = await client.info.getNodeVersion()
    getTxFee: () => Promise<GetTxFeeReturnType>

    Get the transaction fee for this node.

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const txFee = await client.info.getTxFee()
    getVMs: () => Promise<GetVMsReturnType>

    Get the virtual machines (VMs) this node is running.

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const vms = await client.info.getVMs()
    isBootstrapped: (args: IsBootstrappedParameters) => Promise<IsBootstrappedReturnType>

    Check whether a given chain is done bootstrapping.

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const isBootstrapped = await client.info.isBootstrapped({
    chain: "X"
    })
    peers: (args: PeersParameters) => Promise<PeersReturnType>

    Get a description of peer connections.

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const peers = await client.info.peers({
    nodeIDs: []
    })
    upgrades: () => Promise<UpgradesReturnType>

    Returns the upgrade history and configuration of the network.

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const upgrades = await client.info.upgrades()
    uptime: () => Promise<UptimeReturnType>

    Returns the network's observed uptime of this node. This is the only reliable source of data for your node's uptime.

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const uptime = await client.info.uptime()