A small, focused JavaScript toolkit for common Stellar development tasks: key validation, keypair generation, Horizon balance lookups, and payment transaction building/submission. Built on the official stellar-sdk.
Many Stellar tutorials repeat the same Horizon + SDK boilerplate. This library extracts those patterns into tested helpers so apps and scripts can stay small and consistent.
- Validate Ed25519 public keys and secret seeds
- Generate keypairs
- Load account balances from Horizon (testnet or public)
- Build and sign payment transactions (native XLM or issued assets)
- Submit signed transaction XDR to Horizon
- Runnable examples, API docs, optional Express demo, and a Soroban contract scaffold
- Node.js 18+
git clone https://github.com/Dot-Voidz/Stellar-utils.git
cd Stellar-utils
npm installconst {
generateKeypair,
validateAddress,
validateSecretKey,
getBalance,
createPaymentTransaction,
} = require('./src');
const pair = generateKeypair();
console.log(pair.publicKey);
console.log(validateAddress(pair.publicKey));
console.log(validateSecretKey(pair.secretKey));
// Horizon calls (network required)
// const balances = await getBalance(pair.publicKey, 'testnet');See examples/ for runnable scripts and docs/API.md for the full API.
| Path | Purpose |
|---|---|
src/ |
Library source |
tests/ |
Jest unit tests |
examples/ |
Node scripts for common workflows |
docs/ |
API reference |
frontend/ |
Static demo UI |
backend/ |
Optional Express wrapper |
contract/ |
Soroban (Rust) scaffold |
npm test
node --check backend/index.js
node --check frontend/app.jsCI runs tests on Node 18 and 20 and checks demo script syntax on every push and pull request.
Please read CONTRIBUTING.md and the Code of Conduct before opening issues or PRs.
We prioritize impactful work: correctness, safer error handling, tests, Horizon edge cases, and clear docs. Low-effort typo-only PRs and untested LLM dumps are not accepted.
If you find a vulnerability (especially around secret-key handling), see SECURITY.md. Never paste real mainnet secret keys into issues, PRs, or examples.