Introduction
Connect your app to Lumina with our highly optimized SDKs. We provide full support for ED25519 security and Bech32m addresses.
Installation
npm install lumina-blockchain-sdkWallet Management
random_wallet.js
import { LuminaWallet } from 'lumina-blockchain-sdk';
// Generate a new random wallet
const wallet = LuminaWallet.createRandom();
console.log("Address:", wallet.getAddress());
import_mnemonic.js
// Import from BIP39 Mnemonic
const mnemonic = "your twelve words here...";
const wallet = LuminaWallet.fromMnemonic(mnemonic);
console.log("Private Key:", wallet.privateKey);
RPC Client
get_balance.js
const client = new LuminaClient('https://rpc1.bariscode.my.id');
// Get account balance and nonce
const state = await client.getBalance('lumina1...');
console.log("Balance:", state.balance);
network_stats.js
// Monitor network health
const stats = await client.getNetworkStats();
console.log("Current Height:", stats.height);
Sending Transactions
transfer.js
// High-level transfer method
const amount = 100.5;
const result = await client.sendTransaction(
wallet,
'lumina1target...',
amount
);
console.log("TX Hash:", result.hash);
Build it your way
Join our developer working group and help us expand the Lumina ecosystem.