@aimf/wallet
v0.1.1
Published
AIMF Wallet Package - Neural Credits, escrow, staking, and reward management
Maintainers
Readme
@aimf/wallet
AIMF Wallet Package - Neural Credits, escrow, staking, and reward management for the AI-MCP Framework.
Installation
npm install @aimf/wallet
# or
pnpm add @aimf/walletFeatures
- Wallet Management: Create and manage user wallets with multiple currency support
- Ledger Service: Transaction history and balance tracking
- Escrow Service: Secure payment escrow for marketplace transactions
- Staking Service: Stake tokens for rewards and platform benefits
Usage
import { createWalletSystem, CurrencyType } from '@aimf/wallet';
// Create wallet system
const { walletService, ledgerService, escrowService, stakingService } = createWalletSystem();
// Create a wallet
const wallet = await walletService.createWallet('user-123');
// Get balance
const balance = walletService.getBalance(wallet.id, CurrencyType.NEURAL_CREDITS);
console.log(`Balance: ${balance.available}`);
// Create escrow for a transaction
const escrow = escrowService.createEscrow({
payerId: 'buyer-123',
payeeId: 'seller-456',
amount: 1000n,
currency: CurrencyType.NEURAL_CREDITS,
});API Reference
createWalletSystem()
Returns an object with:
walletService: Wallet CRUD operationsledgerService: Transaction ledgerescrowService: Escrow managementstakingService: Staking operations
License
MIT
