/** * AEGIS: Sovereign Agency Protocol Client * * Cryptographic delegation of signing authority across all 94 chains. * Enables scoped, hierarchical, revocable delegation enforced by * threshold cryptography -- not law, not smart contracts, not trust. * * Delegates can sign within their constraints without the owner's * involvement. Sub-delegation enables multi-level hierarchies * (e.g., fund -> portfolio manager -> trader). Dead-man's switches * activate authority when the owner goes silent. * * @example * ```typescript * import { AegisClient } from '@sequence0/sdk'; * * const aegis = new AegisClient({ baseUrl: 'http://agent:8080' }); * * // Delegate trading authority to an AI agent * const grant = await aegis.createDelegation('my-wallet', { * to: '0xAiAgent...', * chains: ['ethereum', 'arbitrum'], * constraints: { * maxPerTransaction: '1000000000000000000', * allowedOperations: ['swap', 'transfer'], * }, * validUntil: '2026-12-31T23:59:59Z', * }); * * // Check authority status * const status = await aegis.checkAuthority(grant.delegationId); * console.log('Active:', status.status); * ``` */ import { DelegateOptions, SubDelegateOptions, DelegationGrant, DelegationTree } from './delegation'; /** * Client for the AEGIS Sovereign Agency Protocol. * * Communicates with delegation endpoints on the agent node to create, * manage, and revoke delegation grants, query delegation trees, and * send heartbeats for dead-man's switch scenarios. */ export declare class AegisClient { private baseUrl; /** * Create a new AegisClient. * * @param options - Client configuration * @param options.baseUrl - Agent node HTTP endpoint URL */ constructor(options: { baseUrl: string; }); /** * Create a new delegation grant from the wallet owner to a delegate. * * The delegate will be able to sign transactions within the * specified constraints without the owner's involvement. The * grant is recorded on-chain in the DelegationRegistry contract. * * @param walletId - The wallet to delegate authority for * @param options - Delegation parameters (delegate address, chains, constraints, etc.) * @returns The created delegation grant * * @throws {Sequence0Error} If the parameters are invalid * @throws {NetworkError} If the agent is unreachable */ createDelegation(walletId: string, options: DelegateOptions): Promise; /** * Create a sub-delegation from an existing grant. * * A delegate with sub-delegation permission can further scope down * authority to a child delegate. Constraints can only be narrowed, * never expanded beyond the parent grant's limits. * * @param walletId - The wallet the parent grant belongs to * @param options - Sub-delegation parameters including parent grant ID * @returns The created sub-delegation grant * * @throws {Sequence0Error} If the parameters are invalid * @throws {NetworkError} If the agent is unreachable */ createSubDelegation(walletId: string, options: SubDelegateOptions): Promise; /** * Revoke a delegation grant. * * Once revoked, the delegate can no longer sign transactions * for this wallet. All sub-delegations under the revoked grant * are also automatically revoked. * * @param walletId - The wallet the delegation belongs to * @param delegationId - The delegation grant to revoke * * @throws {Sequence0Error} If the parameters are invalid * @throws {NetworkError} If the agent is unreachable */ revokeDelegation(walletId: string, delegationId: string): Promise; /** * List all active delegation grants for a wallet. * * @param walletId - The wallet to query * @returns Array of delegation grants * * @throws {Sequence0Error} If the wallet ID is invalid * @throws {NetworkError} If the agent is unreachable */ listDelegations(walletId: string): Promise; /** * Get the full delegation tree for a wallet. * * Returns a hierarchical view of all delegations and sub-delegations * rooted at the wallet owner. Useful for visualizing the authority * structure and auditing delegation chains. * * @param walletId - The wallet to query * @returns The delegation tree * * @throws {Sequence0Error} If the wallet ID is invalid * @throws {NetworkError} If the agent is unreachable */ getDelegationTree(walletId: string): Promise; /** * Send a heartbeat for a dead-man's switch delegation. * * The owner must send periodic heartbeats to prevent the dead-man's * switch from activating. If heartbeats stop for longer than the * configured grace period, the delegate's authority automatically * becomes active. * * @param delegationId - The delegation grant with a dead-man's switch * * @throws {Sequence0Error} If the delegation ID is invalid * @throws {NetworkError} If the agent is unreachable */ heartbeat(delegationId: string): Promise; /** * Check the current authority status of a delegation. * * Returns the delegation's active state, remaining budgets, and * the full grant details. Useful for delegates to check their * remaining authority before submitting a sign request. * * @param delegationId - The delegation grant to check * @returns Status string and delegation grant details * * @throws {Sequence0Error} If the delegation ID is invalid * @throws {NetworkError} If the agent is unreachable */ checkAuthority(delegationId: string): Promise<{ status: string; delegation: DelegationGrant | null; }>; private get; private post; private marshalConstraints; private mapGrantResponse; private unmarshalConstraints; private mapTreeResponse; } //# sourceMappingURL=aegis.d.ts.map