Getting coins
Before we can spend any coins, we need to receive some first. On the old SV Node we asked the node’s own wallet for them, with bitcoin-cli sendtoaddress. Teranode has no wallet: there is no sendtoaddress, getnewaddress or getbalance. Our coins come from the faucet, or from mining to our own key.
Regtest Addresses and WIFs use the testnet prefixes: Addresses start with
morn, and WIFs withc. In DartSV and Bitcoin4J that isNetworkType.REGTEST.
From the faucet
Section titled “From the faucet”This is the usual way. We give the faucet an Address and an amount in satoshis:
./scripts/faucet.sh send <address> 250000 --arcade./scripts/mine.sh 1The faucet tells us what it did, including the raw Transaction:
arcade RECEIVEDtxid 869063a7…d026sent 250000 sats to mw2VZ95dDExvEvn6AUhrF7Xn5dSCSsVHSGhex 0100000001…We will need that hex. Arcade only takes Transactions in Extended Format, where each Input carries the amount and the Locking Script of the Output it spends, and the faucet’s Transaction is where our coin’s Output lives.
Always use --arcade when the receiving wallet will need a merkle proof of the payment. With --arcade the faucet broadcasts through Arcade, which registers the Transaction with Merkle Service, and so GET /tx/{txid} on Arcade returns its merkle path once it is mined. Without it, the faucet broadcasts through the node’s RPC. The payment is mined just the same, but Arcade never hears of it and has no proof for it, and Teranode serves no proofs of its own.
Do note that the faucet is a command-line program over local state (
faucet/key.wifandfaucet/state.json). Run it from one process at a time. Two sends at once can pick the same coin, and the second is rejected as a double spend.
./scripts/faucet.sh balance shows what the faucet has left. When it runs low, we mine a few blocks: ./scripts/mine.sh 10.
Mining to our own key
Section titled “Mining to our own key”Sometimes a test wants coins it controls from the very start, including a coinbase it can prove itself. We can mine a block reward straight to our own Address:
./scripts/mine.sh 1 <our-address> # the coinbase pays our Address in full./scripts/mine.sh 100 # mature it, paying these 100 to the faucetThe coinbase has a single Output, paying the whole subsidy to our Address. We find it in GET http://127.0.0.1:18090/api/v1/block/height/<h>/json, under coinbase_tx, which has its txid, hex and outputs.
Arcade never sees a coinbase, so it has no proof for one. A wallet that needs a merkle proof of its coinbase has to build it from the block’s Transactions. Most of the time it is rather more straightforward to fund the wallet through the faucet instead.
The chain facts that matter
Section titled “The chain facts that matter”| Coinbase maturity | 100 blocks: a block reward can be spent 100 blocks after it is mined |
| Block subsidy | 50 BSV, halving every 150 blocks (25 BSV from height 150, 12.5 from 300, and so on) |
| Genesis and Chronicle | activate at heights 100 and 200 |
| Fees | Teranode accepts any fee, but Arcade enforces 100 sat/kB (see GET /policy) |
| Genesis block | 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206, the standard regtest genesis |
It should be noted that the fork heights are low. start.sh leaves a fresh chain at height 101, before Chronicle, and the autominer takes it past height 200 in about 16 hours. A test that depends on the rules before Chronicle has to run before then, or after a reset.

