diff --git a/home.md b/home.md index a81d65e..80dd52e 100644 --- a/home.md +++ b/home.md @@ -67,8 +67,12 @@ [sendcmpct](/protocol/network/messages/sendcmpct) — [get_xthin](/protocol/network/messages/get_xthin) — [xthinblock](/protocol/network/messages/xthinblock) — [thinblock](/protocol/network/messages/thinblock) — [get_xblocktx](/protocol/network/messages/get_xblocktx) — [xblocktx](/protocol/network/messages/xblocktx) — [xupdate](/protocol/network/messages/xupdate) — [xversion](/protocol/network/messages/xversion) — [xverack](/protocol/network/messages/xverack) ### Simple Payment Verification (SPV) + [SPV](/protocol/spv) — [Bloom Filters](/protocol/spv/bloom-filter) + ### Simple Ledger Protocol -[SLP](/protocol/slp) + +[SLP Overview](/protocol/slp) — [GENESIS](/protocol/slp/genesis) — [MINT](/protocol/slp/mint) — [SEND](/protocol/slp/send) — [COMMIT](/protocol/slp/commit) + ### Miscellaneous [Endian](/protocol/misc/endian) diff --git a/protocol/misc/endian.md b/protocol/misc/endian.md index 2560296..9d6affc 100644 --- a/protocol/misc/endian.md +++ b/protocol/misc/endian.md @@ -1 +1,5 @@ -# Endianness +# Endian + +[Endianness](https://en.wikipedia.org/wiki/Endianness) refers to the implies order of bytes for a given value. + +Values are generally either [big-endian](/protocol/misc/endian/big), with the most significant bytes come first, or [little-endian](/protocol/misc/endian/little), with the least significant values first. Bitcoin Cash used a mix of little- and big-endian values, with little-endian byte order generally being used for integers. \ No newline at end of file diff --git a/protocol/slp.md b/protocol/slp.md index ede6bc0..7426397 100644 --- a/protocol/slp.md +++ b/protocol/slp.md @@ -20,7 +20,7 @@ Users and creators of the tokens can utilize the computational power and other b Simple Ledger Protocol (SLP) is one of the most prevalent token systems on Bitcoin Cash. SLP employs a “colored coins” design that associates token amounts with BCH [transaction](/protocol/blockchain/transaction) outputs. An SLP transaction will utilize a [data output](/protocol/blockchain/transaction/locking-script#data-output) to include a message in one of four predefined formats to annotate the SLP transaction information associated with each transaction output in the same transaction. -The predefined formats include: [GENESIS](/protocol/slp/genesis), [MINT](protocol/slp/mint), [SEND](/protocol/slp/send), and [COMMIT](/protocol/slp/commit). +The predefined formats include: [GENESIS](/protocol/slp/genesis), [MINT](/protocol/slp/mint), [SEND](/protocol/slp/send), and [COMMIT](/protocol/slp/commit). The GENESIS message defines the SLP token and issues the first batch of tokens. The MINT message issues further batches of tokens. The SEND message denotes the number of tokens sent to each output. diff --git a/protocol/slp/commit.md b/protocol/slp/commit.md index 5191cb9..e4534c1 100644 --- a/protocol/slp/commit.md +++ b/protocol/slp/commit.md @@ -23,6 +23,6 @@ The set will be carefully chosen to satisfy the above requirements with a minima **Transaction outputs**: | vout | ScriptPubKey ("Address") | BCH amount | -|-|-|-| +|--|--|--| | 0 | OP_RETURN
<lokad_id: 'SLP\x00'> (4 bytes, ascii)
<token_type: 1> (1 to 2 byte integer)
<transaction_type: 'COMMIT'> (6 bytes, ascii)
<token_id> (32 bytes)
<for_bitcoin_block_hash> (32 bytes)
<block_height> (8 byte integer)
<token_txn_set_hash> (32 bytes)
<txn_set_data_url> (0 to ∞ bytes, ascii) [to be determined] | any | | ... | Any | any | diff --git a/protocol/slp/genesis.md b/protocol/slp/genesis.md index 1d9654b..e054377 100644 --- a/protocol/slp/genesis.md +++ b/protocol/slp/genesis.md @@ -29,7 +29,7 @@ The genesis transaction includes an initial minting of `initial_token_mint_quant **Transaction outputs**: | vout | ScriptPubKey ("Address")| BCH amount| Implied token amount (base units) | -| - | - | - | - | +|--|--|--|--| | 0 | OP_RETURN
<lokad_id: 'SLP\x00'> (4 bytes, ascii)1
<token_type: 1> (1 to 2 byte integer)
<transaction_type: 'GENESIS'> (7 bytes, ascii)
<token_ticker> (0 to ∞ bytes, suggested utf-8)
<token_name> (0 to ∞ bytes, suggested utf-8)
<token_document_url> (0 to ∞ bytes, suggested ascii)
<token_document_hash> (0 bytes or 32 bytes)
<decimals> (1 byte in range 0x00-0x09)
<mint_baton_vout> (0 bytes, or 1 byte in range 0x02-0xff)
<initial_token_mint_quantity> (8 byte integer)
| any2 | 0 | | 1 | Initial mint receiver | any2 | initial_token_mint_quantity | | ... | Any | any2 | 0 | diff --git a/protocol/slp/mint.md b/protocol/slp/mint.md index f4c079d..1b548c7 100644 --- a/protocol/slp/mint.md +++ b/protocol/slp/mint.md @@ -11,7 +11,7 @@ This makes it possible to prove end-of-minting capabilities for a token even aft **Transaction outputs**: | vout | ScriptPubKey ("Address") | BCH amount | Implied token amount (base units) | -|-|-|-|-| +|--|--|--|--| | 0 | OP_RETURN
< lokad_id: 'SLP\x00'> (4 bytes, ascii)
< token_type: 1> (1 to 2 byte integer)
< transaction_type: 'MINT'> (4 bytes, ascii)
< token_id> (32 bytes)
< mint_baton_vout> (0 bytes or 1 byte between 0x02-0xff)
< additional_token_quantity> (8 byte integer) | any | 0 | | 1 | Token mint receiver | any | additional_token_quantity | | ... | Any | any | 0 | diff --git a/protocol/slp/send.md b/protocol/slp/send.md index 77a69db..e50e8c7 100644 --- a/protocol/slp/send.md +++ b/protocol/slp/send.md @@ -6,12 +6,12 @@ Tokens will be assigned to the outputs with indexes 1 to 19 as indicated within Any number of additional BCH-only outputs will be allowed. A BCH-only output can come before token outputs, but a token quantity of 0 must be specified for this output. -**Transaction inputs**: Any number of inputs or content of inputs, in any order, but must include sufficient tokens coming from valid token transactions of matching `token_id`, `token_type` (see [Consensus Rules](/protocol/slp#Consensus-Rules)). +**Transaction inputs**: Any number of inputs or content of inputs, in any order, but must include sufficient tokens coming from valid token transactions of matching `token_id`, `token_type` (see [SLP consensus rules](/protocol/slp#consensus-rules)). **Transaction outputs**: | vout | ScriptPubKey ("Address") | BCH amount | Implied token amount (base units) | -|-|-|-|-| +|--|--|--|--| | 0 | OP_RETURN
<lokad id: 'SLP\x00'> (4 bytes, ascii)
<token_type: 1> (1 to 2 byte integer)
<transaction_type: 'SEND'> (4 bytes, ascii)
<token_id> (32 bytes)
<token_output_quantity1> (required, 8 byte integer)
<token_output_quantity2> (optional, 8 byte integer)
...
<token_output_quantity19> (optional, 8 byte integer)
| any | 0 | | 1 | Receiver 1 | any | token_output_quantity1 | | ... | ... | any | ... |