Docs · 02 / 8
Concepts
Identity address, program account, program, action and indexer.
Two kinds of address for one key
Every user key maps to two kinds of address: one identity address, and one program account per program.
x-only public key
Identity address
Program account · program A
cmr_A OP_DROP pubkey OP_CHECKSIG
Program account · program B
cmr_B OP_DROP pubkey OP_CHECKSIG
Identity address
The standard BIP86 taproot (P2TR) address of a user's x-only public key, with no script. It is the same in every program.
- Programs see it as
$tx.inputs[0].address. - Token balances are keyed by it.
Program account
A P2TR address for one (program, key) pair. It is where a user keeps the sats they spend on actions of that program.
- Internal key: the user's x-only public key.
- A single script leaf:
<cmr> OP_DROP <32-byte x-only pubkey> OP_CHECKSIGMinimum value of a program-account output: 330 sats (taproot dust).
cmr
cmr is the SHA-256 of the program's canonical form. Putting it in the leaf binds a signature to exactly one program.
Program
A JSON smart contract: storage layout, constants, read methods, write methods and optional init steps. It is published once by a deploy and identified by the id of its reveal transaction. See Program format.
Action
A Bitcoin transaction that calls a write method of a program. Its inputs spend program accounts, and output 0 carries the call as JSON. See Actions.
Indexer
Software that reads every block, decides whether each transaction is a deploy or an action, verifies it, runs it in the deterministic VM and stores the resulting state. See Execution.