@avalanche-sdk/client
Version:
A TypeScript SDK for interacting with the Avalanche network through JSON-RPC APIs. This SDK provides a comprehensive set of tools to interact with all Avalanche chains (P-Chain, X-Chain, C-Chain) and various APIs, including wallet functionality for transa
26 lines • 866 B
TypeScript
import { Chain, Client, Transport } from "viem";
import { BaseFeeReturnType } from "./types/baseFee.js";
/**
* Get the base fee for the next block.
*
* - Docs: https://build.avax.network/docs/api-reference/c-chain/api#eth_basefee
*
* @param client - The client to use.
* @returns The base fee for the next block. {@link BaseFeeReturnType}
*
* @example
* ```ts
* import { createClient, http } from '@avalanche-sdk/client'
* import { avalanche } from '@avalanche-sdk/client/chains'
* import { baseFee } from '@avalanche-sdk/client/methods/public'
*
* const client = createClient({
* chain: avalanche,
* transport: http(),
* })
*
* const baseFee = await baseFee(client)
* ```
*/
export declare function baseFee<chain extends Chain | undefined>(client: Client<Transport, chain>): Promise<BaseFeeReturnType>;
//# sourceMappingURL=baseFee.d.ts.map