Prototype docs. APIs may change while SDKs and verifier libraries harden.
Hello Char
This is the shortest end-to-end path:
- schedule a domain,
- submit a vote,
- publish an attestation,
- fetch the resulting roll.
Prerequisites
- A Char-enabled node.
- A loaded wallet.
- Enough active stake to finalize the ballot.
For local development, use a network where one bond controls the active stake.
App shape
The manual commands below map to the same responsibilities a domain app implements:
- choose the domain and ballot,
- produce the ballot payload,
- submit only when the loaded wallet controls the selected leader,
- observe the resulting roll,
- apply it once and advance the stored cursor.
A ZMQ runner can wake the app for leader and roll events. A polling runner can do the same work by repeatedly reading node state.
1. Schedule a domain
Choose a stable domain preimage and schedule it:
bitcoin-cli domain_registry schedule \
"<domain_preimage_hex>" \
"Hello Char demo domain"
2. Check the leader
bitcoin-cli get_leader_for_ballot_current_block \
'[{"key":"<domain_preimage_hex>","start_ballot":0,"end_ballot":0}]'
If the selected bond is not yours, wait for a ballot where you are the leader or use a local network where your bond controls the stake.
3. Submit a vote
bitcoin-cli addreferendumvote \
'[{"<domain_preimage_hex>":"<vote_payload_hex>"}]'
Keep payloads small and application-defined. See /docs/guides/votes.
4. Publish an attestation
bitcoin-cli attestbonds false true false
5. Fetch the result
bitcoin-cli getreferendumresolution \
"<domain_preimage_hex>" \
0 \
1
If the ballot finalized, the response contains the decided payload and roll metadata.
Next
- Consume rolls safely: /docs/guides/roll-consumption
- Verify roll semantics: /docs/tutorials/verify-a-roll