/** * Proton CLI wrapper. * * Shells out to the `proton` CLI for all transaction signing. The agent * process never touches private keys — they live exclusively in the CLI's * keychain. * * Used by: * - openclaw/src/session.ts (createCliSession factory) * - openclaw/src/cli-session.ts (createCliApi factory) * - openclaw/starter/agent/skills/* (via @xpr-agents/openclaw) */ export type CliErrorCode = 'network' | 'auth' | 'serialization' | 'reverted' | 'unknown'; export declare class ProtonCliError extends Error { readonly code: CliErrorCode; readonly stderr: string; constructor(message: string, code: CliErrorCode, stderr: string); } export interface CliAction { account: string; name: string; authorization: Array<{ actor: string; permission: string; }>; data: Record; } export interface CliTransactionResult { transaction_id: string; processed?: unknown; } export interface TableQueryOpts { limit?: number; lower_bound?: string; upper_bound?: string; reverse?: boolean; index_position?: number; key_type?: string; } /** * Sign and submit a single action via `proton action`. * * @param contract - Contract account (e.g. 'agentescrow') * @param action - Action name (e.g. 'createjob') * @param data - Positional args matching the contract's action ABI * @param authorization - "account@permission" string (e.g. "alice@active") */ export declare function execAction(contract: string, action: string, data: unknown[], authorization: string): Promise; /** * Sign and submit a multi-action atomic transaction via `proton transaction:push`. * * NOTE: do NOT use the bare `proton transaction` command — it does not * JSON.parse its argument (bug in @proton/cli). Use `transaction:push` exclusively. */ export declare function execTransactionPush(tx: { actions: CliAction[]; }): Promise; /** * Read-only table query via `proton table`. No signing required. */ export declare function getTableRows(code: string, table: string, scope?: string, opts?: TableQueryOpts): Promise; /** * Verify the proton CLI is installed and on PATH. Used by startup checks. */ export declare function checkProtonCli(): Promise; /** * Verify the proton CLI keychain has at least one key registered. * Soft check — this doesn't verify any specific account, just that * a keychain exists. The CLI itself will fail with auth code if the * specific account's key is missing. */ export declare function checkKeychainPopulated(): Promise; //# sourceMappingURL=proton-cli.d.ts.map