viem
Version:
30 lines • 1.36 kB
TypeScript
import type { Account } from '../../accounts/types.js';
import type { Client } from '../../clients/createClient.js';
import type { Transport } from '../../clients/transports/createTransport.js';
import type { ErrorType } from '../../errors/utils.js';
import type { Chain } from '../../types/chain.js';
import type { RequestErrorType } from '../../utils/buildRequest.js';
export type GetBlobBaseFeeReturnType = bigint;
export type GetBlobBaseFeeErrorType = RequestErrorType | ErrorType;
/**
* Returns the base fee per blob gas in wei.
*
* - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee
* - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee)
*
* @param client - Client to use
* @returns The blob base fee (in wei). {@link GetBlobBaseFeeReturnType}
*
* @example
* import { createPublicClient, http } from 'viem'
* import { mainnet } from 'viem/chains'
* import { getBlobBaseFee } from 'viem/public'
*
* const client = createPublicClient({
* chain: mainnet,
* transport: http(),
* })
* const blobBaseFee = await getBlobBaseFee(client)
*/
export declare function getBlobBaseFee<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>): Promise<GetBlobBaseFeeReturnType>;
//# sourceMappingURL=getBlobBaseFee.d.ts.map