Skip to main content

Early development · Feedback welcome

Design · lab · lifecycle · merkle proof · sighash

Transaction types

A transaction spends outputs and makes new ones. What kind of transaction it is comes down to the shape of those outputs: their scripts.

Every script on this page is real bytes. Each comes from Yours Wallet's classification vectors, is decoded by Qart's output templates, and is named by the classifier Qart uses to read a wallet. Where Qart's reading differs from Yours', the entry says so.

Cash

Sats a key can spend. Most outputs in any wallet are this.

Pay to public key hash

The ordinary payment. The lock names a key by its hash.

  1. DUP
  2. HASH160
  3. 751e76…3bd6
  4. EQUALVERIFY
  5. CHECKSIG
Holds
1,000 sats · 25 bytes
To spend
A signature and public key that hash to the one in the lock.
Yours files it as
fund · wallet payment
Qart reads it as
the same
Qart template
p2pkh
Standard
P2PKH

Objects

One sat that stands for a thing. Spending it moves the thing, so a wallet must never spend it as change.

Inscription

A P2PKH lock plus an envelope that carries a file. The file is the object; the sat carries it.

  1. DUP
  2. HASH160
  3. 751e76…3bd6
  4. EQUALVERIFY
  5. CHECKSIG
  6. FALSE
  7. IF
  8. “ord”
  9. TRUE
  10. “text/plain”
  11. FALSE
  12. “hello”
  13. ENDIF
Holds
1 sat · 51 bytes
To spend
The owner's signature, as P2PKH, sent on as 1 sat.
Yours files it as
1sat · wallet payment
Qart reads it as
the same
Qart template
ordinal

Inscription with metadata

The same, with a MAP tail after the lock naming the object's fields.

  1. DUP
  2. HASH160
  3. 751e76…3bd6
  4. EQUALVERIFY
  5. CHECKSIG
  6. FALSE
  7. IF
  8. “ord”
  9. TRUE
  10. “text/plain”
  11. FALSE
  12. “hello”
  13. ENDIF
  14. RETURN
  15. “1PuQa7K62MiKCtssSLKy1kh56WWU7MtUR5”
  16. “SET”
  17. “app”
  18. “qart”
  19. “type”
  20. “ticket”
Holds
1 sat · 112 bytes
To spend
The owner's signature, as P2PKH.
Yours files it as
1sat · wallet payment
Qart reads it as
the same

A bare 1-sat output

No envelope. Yours treats any 1-sat P2PKH as a possible object, so it is held back from coin selection.

  1. DUP
  2. HASH160
  3. 751e76…3bd6
  4. EQUALVERIFY
  5. CHECKSIG
Holds
1 sat · 25 bytes
To spend
The owner's signature.
Yours files it as
1sat · wallet payment
Qart reads it as
the same
Qart template
p2pkh

Listing (OrdLock)

An object offered for sale. The lock itself is the offer: it names the price and who gets paid.

  1. 97dfd7…f026
  2. 02ba79…0382
  3. 1008ce…266c
  4. FALSE
  5. FALSE
  6. 751e76…3bd6
  7. 881300…88ac
  8. NOP
  9. TRUE
  10. PICK
  11. 4
  12. ROLL
  13. DROP
  14. 3
  15. ROLL
  16. 3
  17. ROLL
  18. 3
  19. ROLL
  20. FALSE
  21. PICK
  22. 3
  23. ROLL
  24. DROP
  25. + 581 more
Holds
1 sat · 860 bytes
To spend
Either the seller cancels with a signature, or anyone buys by paying the price the lock names.
Yours files it as
1sat · basket insertion
Qart reads it as
the same

Tokens

An inscription whose file is a token ledger entry. The amount lives in the JSON, not in the sats.

BSV-21 deploy and mint

Creates a token and its whole supply in one output. The token's id is this output's outpoint.

  1. DUP
  2. HASH160
  3. 751e76…3bd6
  4. EQUALVERIFY
  5. CHECKSIG
  6. FALSE
  7. IF
  8. “ord”
  9. TRUE
  10. “application/bsv-20”
  11. FALSE
  12. “{"p":"bsv-20","op":"deploy+mint","sym":"…”
  13. ENDIF
Holds
1 sat · 113 bytes
To spend
The owner's signature; the transfer must account for the amount.
Yours files it as
bsv21 · wallet payment
Qart reads it as
the same
Qart template
ordinal
Standard
BSV-21

BSV-21 transfer

Moves an amount of a token, named by its id.

  1. DUP
  2. HASH160
  3. 751e76…3bd6
  4. EQUALVERIFY
  5. CHECKSIG
  6. FALSE
  7. IF
  8. “ord”
  9. TRUE
  10. “application/bsv-20”
  11. FALSE
  12. “{"p":"bsv-20","op":"transfer","id":"aaaa…”
  13. ENDIF
Holds
1 sat · 170 bytes
To spend
The owner's signature.
Yours files it as
bsv21 · wallet payment
Qart reads it as
the same
Qart template
ordinal
Standard
BSV-21

MNEE transfer

A BSV-21 transfer of the MNEE stablecoin. Yours files it in a basket of its own.

  1. DUP
  2. HASH160
  3. 751e76…3bd6
  4. EQUALVERIFY
  5. CHECKSIG
  6. FALSE
  7. IF
  8. “ord”
  9. TRUE
  10. “application/bsv-20”
  11. FALSE
  12. “{"p":"bsv-20","op":"transfer","id":"ae59…”
  13. ENDIF
Holds
1 sat · 171 bytes
To spend
The owner's signature.
Yours files it as
mnee · wallet payment
Qart reads it as
the same
Qart template
ordinal
Standard
BSV-21

BSV-20 transfer

The older, ticker-named token format. Yours reads the inscription but gives it no token basket.

  1. DUP
  2. HASH160
  3. 751e76…3bd6
  4. EQUALVERIFY
  5. CHECKSIG
  6. FALSE
  7. IF
  8. “ord”
  9. TRUE
  10. “application/bsv-20”
  11. FALSE
  12. “{"p":"bsv-20","op":"transfer","tick":"QA…”
  13. ENDIF
Holds
1 sat · 109 bytes
To spend
The owner's signature.
Yours files it as
no basket · wallet payment
Qart reads it as
the same
Qart template
ordinal
Standard
BSV-20

Data

Records with no lock. They hold 0 sats and can never be spent.

OP_RETURN

Untyped pushes. Anything at all; nothing says how to read it.

  1. FALSE
  2. RETURN
  3. “hello”
Holds
0 sats · 8 bytes
To spend
Unspendable.
Yours files it as
no basket · wallet payment
Qart reads it as
the same
Qart template
op_return
Standard
OP_RETURN

B://

A file: data, media type and encoding, under the B protocol's prefix.

  1. RETURN
  2. “19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut”
  3. “hello”
  4. “text/plain”
  5. “utf-8”
Holds
0 sats · 59 bytes
To spend
Unspendable.
Yours files it as
no basket · wallet payment
Qart reads it as
the same
Standard
Bitcom

MAP

Key-value pairs. The common way to say what a transaction is for.

  1. RETURN
  2. “1PuQa7K62MiKCtssSLKy1kh56WWU7MtUR5”
  3. “SET”
  4. “app”
  5. “qart”
  6. “type”
  7. “receipt”
Holds
0 sats · 62 bytes
To spend
Unspendable.
Yours files it as
no basket · wallet payment
Qart reads it as
the same
Standard
Bitcom

B:// | MAP

A file and its fields, piped together in one output.

  1. FALSE
  2. RETURN
  3. “19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAut”
  4. “hello”
  5. “text/plain”
  6. “utf-8”
  7. 7c
  8. “1PuQa7K62MiKCtssSLKy1kh56WWU7MtUR5”
  9. “SET”
  10. “app”
  11. “qart”
  12. “type”
  13. “post”
Holds
0 sats · 120 bytes
To spend
Unspendable.
Yours files it as
no basket · wallet payment
Qart reads it as
map — where Yours' indexers read nothing. MapIndexer skips to the next protocol with `data[0] !== 0x7c` (first single-byte push that is NOT "|"), so MAP after B:// is never found. Intended: split on "|".
Qart template
bitcom
Standard
Bitcom

MAP | SIGMA

Fields, then a signature over them, so the record names its author.

  1. FALSE
  2. RETURN
  3. “1PuQa7K62MiKCtssSLKy1kh56WWU7MtUR5”
  4. “SET”
  5. “app”
  6. “qart”
  7. “type”
  8. “post”
  9. 7c
  10. “SIGMA”
  11. “BSM”
  12. “1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH”
  13. “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx…”
  14. 30
Holds
0 sats · 175 bytes
To spend
Unspendable.
Yours files it as
no basket · wallet payment
Qart reads it as
sigma, map — where Yours' indexers read map. parseMap stops on a single-byte push that is NOT "|", so "|" and the SIGMA fields are read as MAP keys. SigmaIndexer walks chunks after OP_RETURN, but @bsv/sdk folds everything after a top-level OP_RETURN into one chunk, so Sigma never fires. Intended: map {app, type} and a sigma entry.
Qart template
bitcom
Standard
Sigma

Conditions

Locks that ask for more than one signature, or for time to pass.

Bare multisig

Lists three keys and asks for any two.

  1. 2
  2. 0279be…1798
  3. 02c604…9ee5
  4. 02f930…36f9
  5. 3
  6. CHECKMULTISIG
Holds
1,000 sats · 105 bytes
To spend
OP_0, then two signatures in the order of their keys.
Yours files it as
fund · wallet payment
Qart reads it as
the same
Qart template
multisig

Cosign

The owner signs, then a named cosigner, whose service approves each transfer.

  1. DUP
  2. HASH160
  3. 751e76…3bd6
  4. EQUALVERIFY
  5. CHECKSIGVERIFY
  6. 02c604…9ee5
  7. CHECKSIG
Holds
1,000 sats · 60 bytes
To spend
The owner's signature, then the cosigner's.
Yours files it as
fund · basket insertion
Qart reads it as
the same

Time lock

Sats the owner cannot move until block 900,000.

  1. 97dfd7…f026
  2. 02ba79…0382
  3. 1008ce…266c
  4. FALSE
  5. FALSE
  6. 751e76…3bd6
  7. a0bb0d
  8. NOP
  9. FALSE
  10. PICK
  11. 0065cd1d
  12. LESSTHAN
  13. VERIFY
  14. FALSE
  15. PICK
  16. 4
  17. ROLL
  18. DROP
  19. 3
  20. ROLL
  21. 3
  22. ROLL
  23. 3
  24. ROLL
  25. + 669 more
Holds
1,000 sats · 934 bytes
To spend
The owner's signature, in a transaction the chain will only accept after that block.
Yours files it as
fund · wallet payment
Qart reads it as
the same

Anyone can spend

OP_TRUE and nothing else. The first person to see it can take it.

  1. TRUE
Holds
1,000 sats · 1 bytes
To spend
Nothing.
Yours files it as
fund · wallet payment
Qart reads it as
the same

Transactions

Common transactions, as the outputs they spend and the outputs they make. Inputs minus outputs is the fee. Amounts are illustrative.

In the crafter

What each “+ output” button in /wallet/tx builds today, measured the same way.

+ P2PKH

As labelled: a payment to the wallet's own address.

p2pkh · 999 sats · filed as fund

  1. DUP
  2. HASH160
  3. 751e76…3bd6
  4. EQUALVERIFY
  5. CHECKSIG

+ OP_RETURN

As labelled: data, 0 sats.

op_return · 0 sats · filed as no basket · data

  1. FALSE
  2. RETURN
  3. “hello”
  4. “world2”

+ 1Sat

As labelled: a text inscription on 1 sat, behind the wallet's own P2PKH lock.

ordinal · 1 sat · filed as 1sat

  1. DUP
  2. HASH160
  3. 751e76…3bd6
  4. EQUALVERIFY
  5. CHECKSIG
  6. FALSE
  7. IF
  8. “ord”
  9. TRUE
  10. “text/plain;charset=utf-8”
  11. FALSE
  12. “i am a 1sat ordinal”
  13. ENDIF

+ 1Sat HTML

As labelled: an HTML inscription on 1 sat, behind the wallet's own P2PKH lock.

ordinal · 1 sat · filed as 1sat

  1. DUP
  2. HASH160
  3. 751e76…3bd6
  4. EQUALVERIFY
  5. CHECKSIG
  6. FALSE
  7. IF
  8. “ord”
  9. TRUE
  10. “text/html;charset=utf-8”
  11. FALSE
  12. “<html><body>gm</body></html>”
  13. ENDIF

+ Metanet

As labelled: the node (data), then 100 sats to the node's key so it can sign for its children.

metanet · 0 sats · filed as no basket · data

  1. FALSE
  2. RETURN
  3. “meta”
  4. “1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH”

p2pkh · 100 sats · filed as fund

  1. DUP
  2. HASH160
  3. 751e76…3bd6
  4. EQUALVERIFY
  5. CHECKSIG

+ Bitcoin Schema

Placeholder text, not Bitcoin Schema (MAP, B, AIP). Data, 0 sats.

op_return · 0 sats · filed as no basket · data

  1. FALSE
  2. RETURN
  3. “bitcoin schema”
  4. “object”

+ BSV-21

As labelled: a BSV-21 deploy and mint, an application/bsv-20 inscription on 1 sat to the wallet's own address.

ordinal · 1 sat · filed as bsv21

  1. DUP
  2. HASH160
  3. 751e76…3bd6
  4. EQUALVERIFY
  5. CHECKSIG
  6. FALSE
  7. IF
  8. “ord”
  9. TRUE
  10. “application/bsv-20”
  11. FALSE
  12. “{"p":"bsv-20","op":"deploy+mint","amt":"…”
  13. ENDIF

+ Twetch Post

Twetch is offline. A one-word placeholder: data, 0 sats.

op_return · 0 sats · filed as no basket · data

  1. FALSE
  2. RETURN
  3. “TWETCH POST”

+ Custom

Placeholder data, 0 sats.

op_return · 0 sats · filed as no basket · data

  1. FALSE
  2. RETURN
  3. “CUSTOM ALL DAY”