/** * CAIP-2 Chain Identifiers * * Chain-agnostic identifiers following the CAIP-2 specification: * https://chainagnostic.org/CAIPs/caip-2 * * Format: namespace:reference * - Stacks uses "stacks" namespace with chain ID as reference * - Bitcoin uses "bip122" namespace with genesis block hash prefix (32 chars) */ import type { Network } from "./networks.js"; /** * CAIP-2 chain identifier type */ export type ChainId = string; /** * Stacks chain IDs * - Mainnet: chain ID 1 * - Testnet: chain ID 2147483648 (0x80000000) */ export declare const STACKS_CHAIN_IDS: { readonly mainnet: "stacks:1"; readonly testnet: "stacks:2147483648"; }; /** * Bitcoin chain IDs (BIP122 namespace) * Using first 32 characters of genesis block hash as reference * - Mainnet: 000000000019d6689c085ae165831e93 * - Testnet: 000000000933ea01ad0ee984209779ba */ export declare const BITCOIN_CHAIN_IDS: { readonly mainnet: "bip122:000000000019d6689c085ae165831e93"; readonly testnet: "bip122:000000000933ea01ad0ee984209779ba"; }; /** * Get Stacks CAIP-2 chain ID for a network */ export declare function getStacksChainId(network: Network): ChainId; /** * Get Bitcoin CAIP-2 chain ID for a network */ export declare function getBitcoinChainId(network: Network): ChainId; /** * Parse CAIP-2 chain ID into namespace and reference */ export declare function parseChainId(chainId: ChainId): { namespace: string; reference: string; }; /** * Check if a chain ID is a Stacks chain */ export declare function isStacksChainId(chainId: ChainId): boolean; /** * Check if a chain ID is a Bitcoin chain */ export declare function isBitcoinChainId(chainId: ChainId): boolean; /** * Get network from Stacks chain ID */ export declare function getNetworkFromStacksChainId(chainId: ChainId): Network | null; /** * Get network from Bitcoin chain ID */ export declare function getNetworkFromBitcoinChainId(chainId: ChainId): Network | null; //# sourceMappingURL=caip.d.ts.map