Skip to main content

Send your first OMBRA transfer

This walkthrough creates a wallet, queries balance, then signs and broadcasts a TRANSFER transaction.

You'll need a funded address. For testnet, request faucet on chat.ombra-net.com (1 free OMBRA per IP).

import { OmbraClient, Wallet, buildTransferTx } from "@ombrachain/sdk";

const client = new OmbraClient({ endpoint: "https://api.ombra-net.com" });

// 1. Restore wallet
const wallet = Wallet.fromMnemonic("your twelve word mnemonic ...");
console.log("address:", wallet.address);

// 2. Check balance + nonce
const acct = await client.chain.getAccount(wallet.address);
console.log("balance:", acct.balance, "micro-OMBRA · nonce:", acct.nonce);

// 3. Build + sign TRANSFER
const tx = buildTransferTx(
wallet.address,
"0xrecipient_address_40_hex...",
1_000_000n, // 1 OMBRA in micro
1_000n, // 0.001 OMBRA fee
acct.nonce,
wallet.privateKey,
);

// 4. Broadcast
const { hash } = await client.chain.submitTx(tx);
console.log("tx hash:", hash);

What just happened

  1. Wallet derivation — your mnemonic deterministically derives a 32-byte Ed25519 seed. Public key = Ed25519 pubkey. Address = sha256(publicKey)[:20] hex.
  2. Nonce lookup — every transfer needs an incrementing nonce per sender (replay protection).
  3. Canonical JSON signing — the SDK builds the tx, serializes fields in insertion order, sha256 the bytes, signs the hash hex string with Ed25519. See Tx Types › Overview.
  4. BroadcastPOST /api/chain/tx adds the tx to mempool. It will be included in the next block (~15s).

Verify

curl https://api.ombra-net.com/api/chain/tx/YOUR_TX_HASH

Or open https://ombra-net.com/tx/YOUR_TX_HASH in the explorer.

Next: Submit an AI task →