Overview
The Agentic Wallet SDK provides a fully-typed TypeScript client for interacting with all platform capabilities. It wraps the REST API with convenient methods and handles authentication, error normalization, and response parsing.Installation
The SDK is available as@agentic-wallet/sdk in the monorepo.
Install in Monorepo
Quick Start
Basic Usage
Client Creation
Create a client instance with authentication and configuration.Client Configuration
baseUrl: API Gateway URL (e.g.,http://localhost:3000)options.apiKey: API key for authentication (sent asx-api-keyheader)options.tenantId: Optional tenant identifier (sent asx-tenant-idheader)options.headers: Additional custom headers
SDK Modules
The SDK client exposes the following modules:wallet
Wallet creation, balance, tokens, signing
policy
Policy creation, evaluation, versioning
transaction
Transaction lifecycle, proofs, approvals
agent
Agent management, execution, capabilities
protocol
Protocol adapters, DeFi operations
risk
Risk controls, chaos engineering
strategy
Backtesting, paper trading
treasury
Budget allocation, rebalancing
audit
Audit events, metrics
mcp
MCP tools and invocation
Wallet Module
Manage wallet creation, balances, tokens, and signing operations.Policy Module
Create and manage wallet policies with versioning and evaluation.Transaction Module
Manage the complete transaction lifecycle from creation to confirmation.Agent Module
Create and manage AI agents with capabilities and execution modes.Protocol Module
Interact with protocol adapters for DeFi operations.Risk Module
Manage protocol risk profiles, portfolio controls, and chaos engineering.Strategy Module
Backtest strategies and execute paper trades.Treasury Module
Manage agent budgets and treasury operations.Treasury Operations
Audit Module
Query audit events and metrics.MCP Module
Invoke MCP tools for AI agent integration.Error Handling
The SDK normalizes errors using the stable envelope format.Error Handling
VALIDATION_ERROR- Input validation failurePOLICY_VIOLATION- Policy denied the operationPIPELINE_ERROR- Build/sign/send/runtime failureCONFIRMATION_FAILED- Transaction confirmation failure
validation- Input validationpolicy- Policy evaluationbuild- Transaction constructionsign- Signing operationsend- RPC submissionconfirm- Transaction confirmationgateway- Gateway-level error
TypeScript Types
The SDK is fully typed with interfaces from@agentic-wallet/common.
Common Types
Next Steps
CLI Integration
Use the command-line interface
MCP Tools
Integrate with MCP server
SKILLS Contract
Review agent integration contract
API Reference
Explore REST API endpoints