WAB Stage 2: SEND CURL and JSON Response Reference
Taproot source → SegWit destination
curl -sS -X POST "$BASE_URL/api/v5/btc/wallet/send" \
-H "X-BTC-KEY: $KEY" \
-H "X-BTC-IDEMPOTENCY: taproot-send-$(date +%s)" \
-H "Content-Type: application/json" \
-d '{"net":"test","type":"taproot","to":"tb1qvydflx7ahrjdztx0p2t8lhmzvhq6fzlcfpu7s8","amount_sat":200000}' | jq .Response excerpt:
{"ok":true,"result":{"requested_sat":200000,"recipient_sat":180000,"sent_sat":180000,"change_sat":9582,"inputs":10,"outputs":3,"txid":"e4b840e1a0053962c926bad51d1cd9dac611c13d112d4c531144c487b6eb5ff8","net":"test","type":"taproot"}}
SegWit source → Taproot destination
curl -sS -X POST "$BASE_URL/api/v5/btc/wallet/send" \
-H "X-BTC-KEY: $KEY" \
-H "X-BTC-IDEMPOTENCY: send-$(date +%s)" \
-H "Content-Type: application/json" \
-d '{"net":"test","type":"segwit","to":"tb1p5csnwnmeku962fw5ewmy0qng5zfmnml3u0h20xr9deqth3lvkzksfyw3xe","amount_sat":50000}' | jq .Response excerpt:
{"ok":true,"result":{"requested_sat":50000,"recipient_sat":45000,"sent_sat":45000,"change_sat":130000,"inputs":1,"outputs":3,"txid":"6a0c20d75170144a10e57b555a6439b69175457840841d6361a611ca0794a8e7","net":"test","type":"segwit"}}X-BTC-KEY is a secret authorization credential: never publish its real value. Do not infer the miner fee or treasury split from these abbreviated responses. Source: test2.txt, lines 130–156 and 283–309.
