Documentation
¶
Overview ¶
Command devchain is a local stand-in chain for trying bstore without a node, a settlement service or any coin: it serves a node's JSON-RPC (generatetoaddress, sendrawtransaction, getinfo) at /rpc, a node's asset API under /api/v1/, and a header source (/v1/root/<height>, /v1/tip) that the bstore commands, the providers and the overlay hosts check proofs against. Every transaction it accepts is mined at once, in a block of its own.
It is bcommon's testchain package served over HTTP. It checks what it is sent the way a node would (inputs exist and are unspent, coinbase is mature, scripts verify, nothing non-final is mined) but it has no proof of work and no peers: its proofs mean nothing outside it, and nothing it mines is money. It is for a laptop, never for a network.
With -journal FILE every accepted RPC call is appended to FILE and replayed at the next start, so the chain survives a restart with the same blocks, and the hosts' and the homes' state still matches it.
`devchain certs -dir DIR -names a,b` writes a throwaway certificate authority and a server certificate for each name, and exits: a provider's advertised URL must be https, so a laptop needs one. The CA's key is not kept. Never for a network.