/** * CAIP-2 chain id helpers, scoped to the Tezos namespace (`tezos:`). * * The wire format accepts both the bare reference (`NetXsqzbfFenSTS`) and the * full CAIP-2 string (`tezos:NetXsqzbfFenSTS`); SDK code consistently stores * and routes on the full form. */ import { Network, NetworkType } from '@tezos-x/octez.connect-types'; /** * Returns `chainId` with the `tezos:` prefix added if absent. No validation * is performed; use `isValidTezosCaip2` at API boundaries. */ export declare const normalizeTezosCaip2: (chainId: string) => string; /** * Whether `value` is a syntactically valid Tezos CAIP-2 chain id * (`tezos:`). */ export declare const isValidTezosCaip2: (value: string) => boolean; /** * Build the minimal `Network` for a Tezos CAIP-2 chain id. Single source of * truth for the `{ type: CUSTOM, chainId, ... }` shape, so the network used * to derive an account identifier is constructed identically everywhere * (permission storage, operation-request lookup, stale-scheme scan). `name` * defaults to the chain id when the wallet supplies no human label. */ export declare const networkFromTezosCaip2: (chainId: string, opts?: { name?: string; rpcUrl?: string; }) => Network; /** * Canonical NetworkType → genesis chain id (CAIP-2 reference) table. * * Applied ONLY at boundaries that must translate between the named-network * vocabulary (WalletConnect session namespaces use `tezos:`) and the * genesis-keyed CAIP-2 vocabulary of the beacon v4 multi-network protocol. * * Sourcing rule: ids are read from the network's own RPC * (`/chains/main/chain_id`) and locked by unit test — never guessed. Networks * without an entry are not statically mappable and multi-network requests for * them can only travel over transports that pass chain ids through opaquely * (P2P/postmessage): * - WEEKLYNET / DAILYNET rotate their genesis on every reset. * - CUSTOM has no fixed genesis by definition. * - TALLINNNET / SEOULNET / TEZLINK_SHADOWNET / TEZOSX_PREVIEWNET / * TEZOSX_SHADOWNET currently publish no queryable RPC in the teztnets * registry; add their ids here (RPC-sourced) when available. * If a long-running network relaunches with a new genesis, its entry must be * updated in the same change that bumps the supported network. */ export declare const TEZOS_NETWORK_GENESIS_IDS: Partial>; /** * Full CAIP-2 chain id (`tezos:NetX…`) for a named network, or `undefined` * when the network has no statically known genesis (see * {@link TEZOS_NETWORK_GENESIS_IDS}). */ export declare const tezosCaip2FromNetworkType: (type: NetworkType) => string | undefined; /** * Named network for a CAIP-2 chain id (bare or `tezos:`-prefixed), or * `undefined` when the id does not belong to a statically mapped network. */ export declare const networkTypeFromTezosCaip2: (chainId: string) => NetworkType | undefined;