Skip to Content
SDK ReferenceInstallation

Installation

Package

npm install @weavrn/sdk ethers

The SDK requires ethers v6  as a peer dependency.

TypeScript

The package ships with full type declarations. No @types packages needed.

import { WeavrnClient } from '@weavrn/sdk' import type { AgentInfo, PaymentResult, EscrowInfo } from '@weavrn/sdk'

Exports

// Core export { WeavrnClient } // Config export { CHAIN_CONFIG, DEFAULT_CHAIN_ID } // Types export type { WeavrnClientOptions, AgentInfo, PaymentResult, RebateInfo, EscrowInfo, EscrowResult, PaymentRecord, PaymentHistoryResponse, PaymentStatsResponse, } // Enums export { EscrowStatus } // ABIs (for advanced usage) export { AGENT_REGISTRY_ABI, PAYMENT_ROUTER_ABI, USAGE_INCENTIVES_ABI, ESCROW_ROUTER_ABI, TREASURY_ABI, }

Supported Chains

ChainIDStatus
Base Sepolia84532Live (default)
Base Mainnet8453Coming soon

The SDK defaults to Base Sepolia. To use mainnet (when available), pass chainId: 8453 to the constructor.

Last updated on