UNPKG

@biconomy/abstractjs

Version:

SDK for Biconomy integration with support for account abstraction, smart accounts, ERC-4337.

67 lines 2.77 kB
import type { Address, Prettify } from "viem"; import type { MultichainSmartAccount } from "../account/toMultiChainNexusAccount"; import { type HttpClient, type Url } from "./createHttpClient"; import { type GetInfoPayload } from "./decorators/mee"; export declare const getDefaultMEENetworkUrl: (isStaging?: boolean) => "https://staging-network.biconomy.io/v1" | "https://network.biconomy.io/v1"; export declare const getDefaultMEENetworkApiKey: (isStaging?: boolean) => "mee_3ZhZhHx3hmKrBQxacr283dHt" | "mee_3ZZmXCSod4xVXDRCZ5k5LTHg"; /** * Default URL for the MEE node service */ export declare const DEFAULT_PATHFINDER_URL: string; /** * Default API key for the MEE node service */ export declare const DEFAULT_PATHFINDER_API_KEY: string; /** * Constants for sponshorship */ export declare const DEFAULT_MEE_SPONSORSHIP_PAYMASTER_ACCOUNT: Address; export declare const DEFAULT_MEE_SPONSORSHIP_CHAIN_ID = 8453; export declare const DEFAULT_MEE_SPONSORSHIP_TOKEN_ADDRESS: Address; export declare const DEFAULT_MEE_TESTNET_SPONSORSHIP_PAYMASTER_ACCOUNT: Address; export declare const DEFAULT_MEE_TESTNET_SPONSORSHIP_CHAIN_ID = 84532; export declare const DEFAULT_MEE_TESTNET_SPONSORSHIP_TOKEN_ADDRESS: Address; export declare const getDefaultMeeGasTank: (isTestnet?: boolean) => { address: `0x${string}`; token: `0x${string}`; chainId: number; }; /** * Parameters for creating a Mee client */ export type CreateMeeClientParams = { /** URL for the MEE node service */ url?: Url; /** Polling interval for the Mee client */ pollingInterval?: number; /** Account to use for the Mee client */ account: MultichainSmartAccount; /** Auth key for the Mee client */ apiKey?: string; /** Debug mode which prints some useful console logs for errors */ isDebugMode?: boolean; }; export type BaseMeeClient = Prettify<HttpClient & { pollingInterval: number; account: MultichainSmartAccount; info: GetInfoPayload; }>; export type MeeClient = Awaited<ReturnType<typeof createMeeClient>>; export declare const createMeeClient: (params: CreateMeeClientParams) => Promise<import("./decorators/mee").MeeActions & { request: <T>(params: { path: string; method?: "GET" | "POST"; body?: object; params?: Record<string, string>; headers?: Record<string, string>; }) => Promise<T>; extend: <const client extends { [x: string]: unknown; request?: undefined; extend?: undefined; }, const extendedHttpClient extends HttpClient>(fn: (base: extendedHttpClient) => client) => client & extendedHttpClient; pollingInterval: number; account: MultichainSmartAccount; info: GetInfoPayload; }>; //# sourceMappingURL=createMeeClient.d.ts.map