@stellect/wallet
v0.1.0
Published
Pure TypeScript interface definitions for Stellect wallet adapters
Maintainers
Readme
@stellect/wallet
Pure TypeScript interface definitions for Stellect wallet adapters. Zero runtime dependencies.
Purpose
This package defines the WalletProvider contract that all wallet adapters must implement. Other packages import types from here — they never depend on a specific adapter directly.
Install
npm install @stellect/walletKey Exports
WalletProvider Interface
interface WalletProvider {
createWallet(name: string, options?: CreateWalletOptions): Promise<WalletDescriptor>
loadWallet(name: string): Promise<WalletDescriptor>
listWallets(): Promise<WalletDescriptor[]>
sign(walletName: string, request: SignRequest): Promise<SignResult>
getBalance(walletName: string, asset?: string): Promise<Balance>
setPolicy(walletName: string, policy: SpendingPolicy): Promise<void>
getHistory(walletName: string, options?: HistoryOptions): Promise<Transaction[]>
}Error Classes
PolicyRejectionError— Policy denied the transactionKeystoreError— Encryption/decryption failureInsufficientBalanceError— Not enough balanceFacilitatorError— OpenZeppelin facilitator errorX402Error— x402 handshake failureServiceNotFoundError— Service not in registry
Types
WalletDescriptor, SignRequest, SignResult, SignContext, PolicyEvaluation, SpendingPolicy, Balance, AssetBalance, Transaction, HistoryOptions, StellarNetwork
License
MIT
