/** * CLI-backed session factories. * * Provides two shapes from the same underlying proton CLI wrapper: * * 1. createCliSession() → ProtonSession (SDK shape) * Used by openclaw/src/session.ts and downstream tools/registries. * Preserves the SDK's public ProtonSession interface — no changes to * sdk/src/types.ts, no breaking changes for SDK consumers. * * 2. createCliApi() → eosjs-Api lookalike + auth metadata * Used by skill files (defi, nft, lending, governance, xmd) that * previously called `await session.api.transact({actions}, options)`. * The .transact() signature matches eosjs so handler bodies need no * changes — only the session factory swaps. * * Both shapes route every signed action through `proton transaction:push`. * Neither holds, reads, or transmits private key material. */ import { JsonRpc } from '@proton/js'; import type { ProtonSession, TransactArgs, TransactionResult } from '@xpr-agents/sdk'; export interface CliSessionOptions { account: string; permission?: string; rpcEndpoint?: string; /** XPR transfer cap in smallest units; defaults to MAX_TRANSFER_AMOUNT env (see util/transfer-cap). */ maxTransferAmount?: number; } /** * Create a ProtonSession (SDK shape) backed by the proton CLI. * No private key required — the CLI signs internally via its keychain. */ export declare function createCliSession(opts: CliSessionOptions): { rpc: JsonRpc; session: ProtonSession; }; /** * Lightweight Api lookalike returned by createCliApi(). Matches the subset * of eosjs Api that the 5 signing skills use. */ export interface CliApi { transact(tx: { actions: TransactArgs['actions']; }, options?: { blocksBehind?: number; expireSeconds?: number; }): Promise; } /** * Create an eosjs-Api lookalike backed by the proton CLI. * Drop-in replacement for the `api` returned by skill `getSession()` * functions that used to construct `new Api({ rpc, signatureProvider })`. * * The blocksBehind/expireSeconds options are accepted but ignored — * proton CLI manages tx headers internally. Skill code remains unchanged. */ export declare function createCliApi(opts: CliSessionOptions): { api: CliApi; account: string; permission: string; }; //# sourceMappingURL=cli-session.d.ts.map