import type { BrowserWalletRpcMethod } from '@origintrail-official/dkg-chain'; export interface RestrictedEthCallAuthorization { available: boolean; error?: string | null; } export interface RestrictedEthCall { to: string; data: string; transaction: Readonly>; } /** * Feature-owned policy for the shared, read-only browser-wallet JSON-RPC * executor. The executor owns the global method allowlist, request-envelope * validation, transport classification, and error shape. Each feature still * owns its narrower parameter and contract-selector authorization policy. */ export interface RestrictedBrowserWalletRpcPolicy { unavailableMessage: string; methodErrorPrefix: string; /** PCA receipt reconciliation deliberately needs full exact-block payloads. */ allowFullTransactionsForExactBlocks?: boolean; authorizeEthCall?: (call: RestrictedEthCall, params: unknown[] | undefined) => Promise; request: (method: Method, params: unknown[]) => Promise; isUnavailableError?: (error: unknown, sanitizedMessage: string) => boolean; readErrorPrefix: string; } export interface RestrictedBrowserWalletRpcHttpResult { status: 200 | 400; body: unknown; } export declare function executeRestrictedBrowserWalletRpc(raw: unknown, policy: RestrictedBrowserWalletRpcPolicy): Promise>; /** * Parse and execute one bounded JSON-RPC HTTP body. Both wallet features use * this entry point so envelope parsing, batch limits, method membership, * nullability, and common parameter schemas cannot drift between routes. */ export declare function executeRestrictedBrowserWalletRpcBody(rawBody: string, policy: RestrictedBrowserWalletRpcPolicy): Promise; //# sourceMappingURL=restricted-browser-wallet-rpc.d.ts.map