SATS20

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

the user's signing key (32 bytes)

Identity address

BIP86 P2TR, no script. Same in every program. Balances and $tx.inputs[0].address.

Program account · program A

P2TR, leaf:
cmr_A OP_DROP pubkey OP_CHECKSIG

Program account · program B

P2TR, leaf:
cmr_B OP_DROP pubkey OP_CHECKSIG
One x-only public key, one identity address, and one program account per program.

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.

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.

leaf script (68 bytes)
<cmr> OP_DROP <32-byte x-only pubkey> OP_CHECKSIG

Minimum 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.