UNPKG

@coinbase/cdp-sdk

Version:

SDK for interacting with the Coinbase Developer Platform Wallet API

46 lines • 2.23 kB
/** * Maps EIP-155 chain IDs to CDP SDK network names for SCW typed-data signing. * * EVM CAIP-2 identifiers are derived from these chain IDs using `toEip155Caip2`. */ export declare const CHAIN_ID_TO_CDP_NETWORK: Record<number, string>; /** CAIP-2 network identifiers for CDP-supported chains. */ export declare const baseMainnetCaip2: "eip155:8453"; export declare const baseSepoliaCaip2: "eip155:84532"; export declare const polygonCaip2: "eip155:137"; export declare const arbitrumCaip2: "eip155:42161"; export declare const worldCaip2: "eip155:480"; export declare const worldSepoliaCaip2: "eip155:4801"; export declare const solanaMainnetCaip2: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"; export declare const solanaDevnetCaip2: "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"; /** * Maps CDP SDK network names to their EIP-155 CAIP-2 identifiers. * * Derived by inverting CHAIN_ID_TO_CDP_NETWORK. Used by network-scoped account * builders to validate that an accepted x402 requirement targets the scoped network. * Networks not present here (e.g. raw RPC URLs) cause the scoped check to be skipped. */ export declare const CDP_NETWORK_TO_CAIP2: Record<string, string>; /** * Resolves the default EVM RPC URLs used for x402 payment signing, keyed by * CAIP-2 network identifier. * * Only Base and Base Sepolia get a default: both are backed by the CDP * project's own authenticated node endpoint (via {@link getBaseNodeRpcUrl}), * so no shared public infrastructure sits on the payment-signing path and no * extra configuration is required to use them. * * All other networks (Polygon, Arbitrum, World, etc.) have no default RPC. * RPC URLs are optional for core payload signing on those networks — they're * only needed to backfill optional extension capabilities (for example, * `eip2612` gas-sponsoring enrichment) — so callers that need one must supply * it explicitly via the `rpcUrls` config option or `CDP_X402_RPC_URLS` * environment variable. * * @returns CAIP-2 keyed RPC configuration map containing only the networks * that resolved successfully. */ export declare function getDefaultEvmRpcUrls(): Promise<Record<string, { rpcUrl: string; }>>; //# sourceMappingURL=constants.d.ts.map