UNPKG

@account-kit/infra

Version:

adapters for @aa-sdk/core for interacting with alchemy services

74 lines (73 loc) 3.23 kB
import { type Address, type Chain, type Hex } from "viem"; import type { EntryPointVersion } from "@aa-sdk/core"; export declare const AlchemyPaymasterAddressV06Unify = "0x0000000000ce04e2359130e7d0204A5249958921"; export declare const AlchemyPaymasterAddressV07Unify = "0x00000000000667F27D4DB42334ec11a25db7EBb4"; export declare const AlchemyPaymasterAddressV4 = "0xEaf0Cde110a5d503f2dD69B3a49E031e29b3F9D2"; export declare const AlchemyPaymasterAddressV3 = "0x4f84a207A80c39E9e8BaE717c1F25bA7AD1fB08F"; export declare const AlchemyPaymasterAddressV2 = "0x4Fd9098af9ddcB41DA48A1d78F91F1398965addc"; export declare const ArbSepoliaPaymasterAddress = "0x0804Afe6EEFb73ce7F93CD0d5e7079a5a8068592"; export declare const AlchemyPaymasterAddressV1 = "0xc03aac639bb21233e0139381970328db8bceeb67"; export declare const AlchemyPaymasterAddressV07V2 = "0x2cc0c7981D846b9F2a16276556f6e8cb52BfB633"; export declare const AlchemyPaymasterAddressV07V1 = "0xEF725Aa22d43Ea69FB22bE2EBe6ECa205a6BCf5B"; /** * Retrieves the Alchemy paymaster address for the given chain. Returns different addresses based on the chain ID. * * @example * ```ts * import { sepolia, getAlchemyPaymasterAddress } from "@account-kit/infra"; * * const paymasterAddress = getAlchemyPaymasterAddress(sepolia, "0.6.0"); * ``` * * @param {Chain} chain The chain for which the paymaster address is required * @param {EntryPointVersion} version The version of the entry point * @returns {Address} The Alchemy paymaster address corresponding to the specified chain */ export declare const getAlchemyPaymasterAddress: (chain: Chain, version: EntryPointVersion) => Address; export declare const PermitTypes: { readonly EIP712Domain: readonly [{ readonly name: "name"; readonly type: "string"; }, { readonly name: "version"; readonly type: "string"; }, { readonly name: "chainId"; readonly type: "uint256"; }, { readonly name: "verifyingContract"; readonly type: "address"; }]; readonly Permit: readonly [{ readonly name: "owner"; readonly type: "address"; }, { readonly name: "spender"; readonly type: "address"; }, { readonly name: "value"; readonly type: "uint256"; }, { readonly name: "nonce"; readonly type: "uint256"; }, { readonly name: "deadline"; readonly type: "uint256"; }]; }; export declare const ERC20Abis: readonly ["function decimals() public view returns (uint8)", "function balanceOf(address owner) external view returns (uint256)", "function allowance(address owner, address spender) external view returns (uint256)", "function approve(address spender, uint256 amount) external returns (bool)"]; export declare const EIP7597Abis: readonly ["function nonces(address owner) external view returns (uint)"]; export declare const approveTokenCallData: (paymasterAddress: Address, allowance: BigInt) => `0x${string}`; export type PermitMessage = { owner: Hex; spender: Hex; value: bigint; nonce: bigint; deadline: bigint; }; export type PermitDomain = { name: string; version: string; chainId: bigint; verifyingContract: Hex; };