Avalanche SDK Client
    Preparing search index...

    Function getAllBalances

    • Get the balances of all assets controlled by given addresses.

      Type Parameters

      • chain extends undefined | Chain

      Parameters

      Returns Promise<GetAllBalancesReturnType>

      The balances of all assets. GetAllBalancesReturnType

      import { createAvalancheCoreClient } from '@avalanche-sdk/client'
      import { avalanche } from '@avalanche-sdk/client/chains'
      import { getAllBalances } from '@avalanche-sdk/client/methods/xChain'

      const client = createAvalancheCoreClient({
      chain: avalanche,
      transport: {
      type: "http",
      url: "<url>",
      },
      })

      const balances = await getAllBalances(client, {
      addresses: ["X-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5"]
      })