Installation
Package
npm install @weavrn/sdk ethersThe 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
| Chain | ID | Status |
|---|---|---|
| Base Sepolia | 84532 | Live (default) |
| Base Mainnet | 8453 | Coming soon |
The SDK defaults to Base Sepolia. To use mainnet (when available), pass chainId: 8453 to the constructor.
Last updated on