Skip to content
LogoLogo

Quick start

Run a regtest node, mine spendable coins, and send a payment with the SDK. Regtest has no retargeting (blocks are instant to mine), its own address prefix rarrk, and its API on port 28332. See Network parameters.

1. Start a node

# From the repository root: one .env with fresh secrets and a devnet miner key
./all_svc/arrekta-compose.sh init-env
./all_svc/arrekta-compose.sh build core core-rs
# 3 nodes: 2 Rust (node-1 mines every 10 s), 1 Python reference
./all_svc/arrekta-compose.sh up
# End-to-end check, including cross-implementation agreement
./all_svc/arrekta-compose.sh smoke

Both implementations read the same ARREKTA_* environment variables (full list in Run a node). The Compose devnet publishes node-1's API on 127.0.0.1:28332, node-2 on 28342 and the Python node on 28352.

Check it is up:

curl -s http://127.0.0.1:28332/v1/chain

2. Create a key and mine to it

Coinbase outputs mature after 100 blocks, so mine 101 blocks to get one spendable coinbase.

# The reference wallet CLI (installed with core/)
core/.venv/bin/arrekta-wallet new-seed alice.seed
ADDR=$(core/.venv/bin/arrekta-wallet --seed alice.seed address)
 
# Admin route, protected by ARREKTA_ADMIN_TOKEN (regtest/testnet only)
curl -s -X POST http://127.0.0.1:28332/v1/admin/mine \
  -H "Authorization: Bearer changeme" -H 'content-type: application/json' \
  -d "{\"address\": \"$ADDR\", \"blocks\": 101}"
 
core/.venv/bin/arrekta-wallet --seed alice.seed balance

On the Compose devnet the admin token is in the generated .env (ARREKTA_ADMIN_TOKEN), and node-1 already mines to the devnet miner key.

3. Send a payment with the SDK

Install the SDK (TypeScript or Python), then run the example against your node. It builds a transaction, signs it with ML-DSA-65 and submits it to POST /v1/txs.

/**
 * Send a payment: derive a wallet, fund it on regtest, pay 1.5 ARRK, confirm.
 *
 *   ARREKTA_URL=http://127.0.0.1:28332 ARREKTA_ADMIN_TOKEN=... npx tsx examples/send-payment.ts
 */
import { createClient, formatArrk, fromHex, generateSeed, getAddress, getChain, getCoins, keychainFromSeed, mine, sendPayment } from 'arrekta-sdk';
 
const URL = process.env.ARREKTA_URL ?? 'http://127.0.0.1:28332';
const ADMIN = process.env.ARREKTA_ADMIN_TOKEN; // regtest mining for the demo
const SEED = fromHex(process.env.ARREKTA_SEED ?? 'a1'.repeat(32));
 
// 1. Connect and read the chain.
const client = createClient({ url: URL, adminToken: ADMIN });
const chain = await getChain(client);
console.log(`connected to ${chain.network} at height ${chain.height}`);
 
// 2. Alice's wallet from her seed; Bob gets a fresh one.
const alice = keychainFromSeed(SEED, { network: chain.network });
const bob = keychainFromSeed(generateSeed(), { network: chain.network });
 
// 3. Fund Alice (regtest: mine past coinbase maturity).
if ((await getCoins(client, { wallet: alice })).length === 0) await mine(client, alice.address(0), 101);
 
// 4. Pay Bob 1.5 ARRK (fee rate from the node's estimate).
const sent = await sendPayment(client, { wallet: alice, to: bob.address(0), amount: '1.5' });
console.log(`sent ${sent.txid} (fee ${formatArrk(sent.fee)} ARRK)`);
 
// 5. Confirm and check Bob's balance.
await mine(client, alice.address(0), 1);
const balance = (await getAddress(client, { address: bob.address(0) })).balances[0]!;
console.log(`bob has ${formatArrk(balance.spendable)} ARRK`);

Source: sdk/typescript/examples/send-payment.ts (updated 2026-11-02) · sdk/python/examples/send_payment.py (updated 2026-11-02). Runnable against a regtest node; CI runs every example.

Mine one more block to confirm it, then look it up:

curl -s http://127.0.0.1:28332/v1/txs/<txid>

Next steps