@aite550659/hedera-agent-wallet
v0.2.0
Published
Lightweight Hedera wallet creation for autonomous AI agents - create wallets on the fly without existing accounts
Maintainers
Readme
hedera-agent-wallet
Lightweight Hedera wallet creation for autonomous AI agents.
Create new Hedera wallets on the fly — no existing account required.
Why This Exists
The official hedera-agent-kit is great for agents that already have wallets. But what if your agent needs to spawn a fresh wallet autonomously?
This tiny package (9 KB vs 8.3 MB) provides:
createWallet()— Generate a new keypair + account ID- Basic operations: balance, transfer, HCS messaging
Perfect for:
- Multi-agent systems where each agent needs its own wallet
- Autonomous agents that create sub-accounts
- Testing/dev workflows needing disposable wallets
Installation
npm install @aite550659/hedera-agent-walletQuick Start
const { createWallet, loadWallet, getBalance, sendHbar, submitMessage } = require('@aite550659/hedera-agent-wallet');
// Create a brand new wallet (generates keypair)
const wallet = createWallet();
console.log('New Account ID:', wallet.accountId);
console.log('Public Key:', wallet.publicKey);
// Note: Account needs funding before use on mainnet
// Or load an existing wallet
const existingWallet = loadWallet('your-private-key-here');
// Get balance
const balance = await getBalance(wallet, 'mainnet');
console.log('Balance:', balance, 'HBAR');
// Send HBAR
const txId = await sendHbar(wallet, '0.0.123456', 10, 'mainnet');
// Submit HCS message
const msgTxId = await submitMessage(wallet, '0.0.topicId', 'Hello from agent!', 'mainnet');API
createWallet()
Generate a new wallet with fresh keypair.
Returns: { accountId, publicKey, privateKey, client }
loadWallet(privateKey)
Load wallet from existing private key.
Returns: { accountId, publicKey, privateKey, client }
getBalance(wallet, network)
Get HBAR balance. Network: 'mainnet' | 'testnet'
sendHbar(wallet, toAccountId, amount, network)
Transfer HBAR to another account.
submitMessage(wallet, topicId, message, network)
Submit message to HCS topic.
Comparison with hedera-agent-kit
| | hedera-agent-kit | hedera-agent-wallet | |---|---|---| | Size | 8.3 MB | 9 KB | | Dependencies | 12 (LangChain, etc) | 1 (@hashgraph/sdk) | | Create new wallet | ❌ | ✅ | | Token operations | ✅ | ❌ | | Plugin ecosystem | ✅ | ❌ |
Use hedera-agent-kit for full-featured agent development. Use hedera-agent-wallet when you need lightweight wallet creation.
Contributing
This feature (autonomous wallet creation) would be valuable in the official hedera-agent-kit. PR pending: hashgraph/hedera-agent-kit-js
License
MIT
