Avalanche SDK Client
    Preparing search index...

    Function getTxFee

    • Get the transaction fee for this node.

      Type Parameters

      • chain extends undefined | Chain

      Parameters

      • client: { extend: <const client extends { [key: string]: unknown }>(fn: (client: { extend: ... }) => client) => { [K in (...) | (...) | (...)]: (...)[(...)] } }

        The client to use. AvalancheCoreClient

      Returns Promise<GetTxFeeReturnType>

      The transaction fee. GetTxFeeReturnType

      import { createAvalancheCoreClient } from '@avalanche-sdk/client'
      import { avalanche } from '@avalanche-sdk/client/chains'
      import { getTxFee } from '@avalanche-sdk/client/methods/info'

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

      const txFee = await getTxFee(client)