import type { SessionData } from '@metamask/connect-multichain'; import type { Address, Hex } from '../types'; /** * Result of parsing a CAIP scope string. */ type ParsedScope = { namespace?: string; reference?: string; }; /** * Parses a CAIP-217 scope string (`namespace` or `namespace:reference`) into * its components. See file header for upstream reference. * * @param scopeString - The scope string to parse. * @returns An object containing `namespace` and (optionally) `reference`. * Returns an empty object if the input is neither a valid CAIP namespace nor * a valid CAIP-2 chain ID. */ export declare const parseScopeString: (scopeString: string) => ParsedScope; /** * Get the unique Ethereum (EIP-155) accounts from the session scopes. * * Walks every scope's `accounts` array, keeps CAIP-10 account IDs whose chain * is EIP-155 (or the `wallet:eip155` cross-chain wallet scope), and returns * the unique 0x addresses. * * @param sessionScopes - The session scopes from `wallet_createSession` / * `wallet_getSession` / `wallet_sessionChanged`. * @returns The unique Ethereum addresses across all EIP-155 scopes. */ export declare const getEthAccounts: (sessionScopes: SessionData["sessionScopes"] | undefined) => Address[]; /** * Get the unique permitted Ethereum (EIP-155) chain IDs from the session * scopes. * * Iterates the scope keys, keeps the `eip155:` ones, converts each * decimal `reference` to a `0x`-prefixed hex chain ID, and returns the unique * set. * * @param sessionScopes - The session scopes from `wallet_createSession` / * `wallet_getSession` / `wallet_sessionChanged`. * @returns The unique EIP-155 chain IDs as `0x`-prefixed hex strings. */ export declare const getPermittedEthChainIds: (sessionScopes: SessionData["sessionScopes"] | undefined) => Hex[]; export {}; //# sourceMappingURL=caip.d.ts.map