@zerodev/sdk
Version:
A utility library for working with ERC-4337
34 lines • 1.04 kB
TypeScript
import type { Address, Client } from "viem";
export type GetAccountNonceParams = {
address: Address;
entryPointAddress: Address;
key?: bigint;
};
/**
* Returns the nonce of the account with the entry point.
*
* - Docs: https://docs.pimlico.io/permissionless/reference/public-actions/getAccountNonce
*
* @param client {@link client} that you created using viem's createPublicClient.
* @param args {@link GetAccountNonceParams} address, entryPoint & key
* @returns bigint nonce
*
* @example
* import { createPublicClient } from "viem"
* import { getAccountNonce } from "permissionless/actions"
*
* const client = createPublicClient({
* chain: goerli,
* transport: http("https://goerli.infura.io/v3/your-infura-key")
* })
*
* const nonce = await getAccountNonce(client, {
* address,
* entryPoint,
* key
* })
*
* // Return 0n
*/
export declare const getAccountNonce: (client: Client, args: GetAccountNonceParams) => Promise<bigint>;
//# sourceMappingURL=getAccountNonce.d.ts.map