THAMER

WAB Live Laboratory

Hosted WAB API examples for developers and AI agents. No local Engine installation is required when the laboratory endpoints are available.

Laboratory safety

Use a newly created disposable Testnet wallet only. Never submit existing Mainnet credentials or real funds. The hosted service receives wallet credentials; it is not a self-hosted wallet. Testnet-only examples do not enforce network restrictions on the remote Engine. Availability, isolation and retention must be verified before public use.

Read software terms before wallet creation. The permanent signed 10% inclusive fee law applies to wallet sends.

Wallet Factory

https://wab.codes — create only after explicit consent. Keep the response private.

curl -sS -X POST \
  https://wab.codes/api/v1/id/create \
  -H "Content-Type: application/json" \
  -d '{
    "consent": {
      "accepted": true,
      "law_id": "FEE",
      "statement": "I agree to the permanent 10% fee.",
      "terms_url": "https://thamer.org/tos#fee"
    }
  }' | jq .

Bitcoin Engine

https://api.wab.codes — use the credentials of your disposable test wallet. Run commands individually, not as a batch. Set ID, KEY and SECRET privately before authenticated commands. SEND and REMOVE require separate authorization.

export BASE_URL="https://api.wab.codes"

API command

curl -sS -X POST "$BASE_URL/api/v5/id/remove" \
  -H "X-BTC-KEY: $KEY" \
  -H "Content-Type: application/json" \
  --data-binary "$(jq -n \
    --arg id "$ID" \
    --arg secret "$SECRET" \
    '{btc_id:$id,btc_secret:$secret,confirm:"REMOVE"}')" | jq .

API command

curl -sS -X POST "$BASE_URL/api/v5/id/restore" \
  -H "Content-Type: application/json" \
  -d "$(jq -n \
    --arg id "$ID" \
    --arg key "$KEY" \
    --arg secret "$SECRET" \
    '{btc_id:$id,btc_key:$key,btc_secret:$secret}')" | jq .

API command

curl -sS -X POST "$BASE_URL/api/v5/id/recovery" \
  -H "X-BTC-KEY: $KEY" \
  -H "Content-Type: application/json" \
  -d '{}' | jq .

API command

curl -sS "$BASE_URL/api/v5/btc/health" | jq .
curl -sS "$BASE_URL/api/v5" | jq .

API command

curl -sS "$BASE_URL/healthz" | jq .

API command

RESP=$(curl -sS "$BASE_URL/api/v5/id/me" \
  -H "X-BTC-KEY: $KEY")
echo "$RESP" | jq .

API command

RESP=$(curl -sS -X POST "$BASE_URL/api/v5/btc/wallet/receive" \
  -H "X-BTC-KEY: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"net":"test","type":"segwit"}')
echo "$RESP" | jq .
export ADDR_TEST=$(echo "$RESP" | jq -r '.result.address')
echo "ADDR_TEST=$ADDR_TEST"

API command

RESP=$(curl -sS -X POST "$BASE_URL/api/v5/btc/wallet/balance" \
  -H "X-BTC-KEY: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"net":"test","type":"segwit"}')
echo "$RESP" | jq .

API command

RESP=$(curl -sS -X POST "$BASE_URL/api/v5/btc/wallet/utxos" \
  -H "X-BTC-KEY: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"net":"test","type":"segwit"}')
echo "$RESP" | jq .
export TXID=$(echo "$RESP" | jq -r '.result.utxos[0].txid')

API command

# For a NEW authorized payment only: generate and persist SEND_ID.
# export SEND_ID="send-$(cat /proc/sys/kernel/random/uuid)"
# On retry reuse the same SEND_ID and identical payload.
: "${SEND_ID:?Set persistent SEND_ID first}"
RESP=$(curl -sS -X POST "$BASE_URL/api/v5/btc/wallet/send" \
  -H "X-BTC-KEY: $KEY" \
  -H "X-BTC-IDEMPOTENCY: $SEND_ID" \
  -H "Content-Type: application/json" \
  -d '{"net":"test","type":"segwit","to":"tb1qDESTINATION","amount_sat":13000}')
echo "$RESP" | jq .
export TXID=$(echo "$RESP" | jq -r '.result.txid // .txid')
echo "TXID=$TXID"

API command

RESP=$(curl -sS -X POST "$BASE_URL/api/v5/btc/watch/create" \
  -H "X-BTC-KEY: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"net":"test","type":"segwit","expected_sat":50000,"ttl_sec":3600}')
echo "$RESP" | jq .
export WATCH_ID=$(echo "$RESP" | jq -r '.result.watch_id')
echo "WATCH_ID=$WATCH_ID"

API command

RESP=$(curl -sS -X POST "$BASE_URL/api/v5/btc/watch/list" \
  -H "X-BTC-KEY: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"net":"test","type":"segwit"}')
echo "$RESP" | jq .

API command

RESP=$(curl -sS -X POST "$BASE_URL/api/v5/btc/wallet/receive" \
  -H "X-BTC-KEY: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"net":"test","type":"taproot"}')
echo "$RESP" | jq .
export ADDR_TR_TEST=$(echo "$RESP" | jq -r '.result.address')
echo "ADDR_TR_TEST=$ADDR_TR_TEST"

API command

RESP=$(curl -sS -X POST "$BASE_URL/api/v5/btc/wallet/balance" \
  -H "X-BTC-KEY: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"net":"test","type":"taproot"}')
echo "$RESP" | jq .

API command

RESP=$(curl -sS -X POST "$BASE_URL/api/v5/btc/wallet/utxos" \
  -H "X-BTC-KEY: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"net":"test","type":"taproot"}')
echo "$RESP" | jq .

API command

# For a NEW authorized payment only: generate and persist SEND_ID.
# export SEND_ID="send-$(cat /proc/sys/kernel/random/uuid)"
# On retry reuse the same SEND_ID and identical payload.
: "${SEND_ID:?Set persistent SEND_ID first}"
RESP=$(curl -sS -X POST "$BASE_URL/api/v5/btc/wallet/send" \
  -H "X-BTC-KEY: $KEY" \
  -H "X-BTC-IDEMPOTENCY: $SEND_ID" \
  -H "Content-Type: application/json" \
  -d '{"net":"test","type":"taproot","to":"tb1pDESTINATION","amount_sat":13000}')
echo "$RESP" | jq .
export TXID=$(echo "$RESP" | jq -r '.result.txid // .txid')
echo "TXID=$TXID"

API command

RESP=$(curl -sS -X POST "$BASE_URL/api/v5/btc/watch/create" \
  -H "X-BTC-KEY: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"net":"test","type":"taproot","expected_sat":50000,"ttl_sec":3600}')
echo "$RESP" | jq .
export WATCH_ID=$(echo "$RESP" | jq -r '.result.watch_id')
echo "WATCH_ID=$WATCH_ID"

API command

RESP=$(curl -sS -X POST "$BASE_URL/api/v5/btc/watch/list" \
  -H "X-BTC-KEY: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"net":"test","type":"taproot"}')
echo "$RESP" | jq .

API command

RESP=$(curl -sS -X POST "$BASE_URL/api/v5/btc/tx/status" \
  -H "X-BTC-KEY: $KEY" \
  -H "Content-Type: application/json" \
  -d "{\"net\":\"test\",\"txid\":\"$TXID\"}")
echo "$RESP" | jq .

Set ID, KEY and SECRET privately from your new wallet response before authenticated commands. Set TXID and WATCH_ID from the corresponding results. Never paste secrets into public reports. For complete contracts and self-hosted installation see API reference and Engine.