Package Exports
- @stellect/wallet
- @stellect/wallet/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stellect/wallet) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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