Minor tweaks for SLP and endian pages.

This commit is contained in:
Andrew Groot
2021-05-24 14:41:38 -04:00
committed by Josh Green
parent 961201e375
commit 1e73c65b87
7 changed files with 16 additions and 8 deletions
+5 -1
View File
@@ -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) [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) ### Simple Payment Verification (SPV)
[SPV](/protocol/spv) — [Bloom Filters](/protocol/spv/bloom-filter) [SPV](/protocol/spv) — [Bloom Filters](/protocol/spv/bloom-filter)
### Simple Ledger Protocol ### 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 ### Miscellaneous
[Endian](/protocol/misc/endian) [Endian](/protocol/misc/endian)
+5 -1
View File
@@ -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.
+1 -1
View File
@@ -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. 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. 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. 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 GENESIS message defines the SLP token and issues the first batch of tokens.
The MINT message issues further batches of tokens. The MINT message issues further batches of tokens.
The SEND message denotes the number of tokens sent to each output. The SEND message denotes the number of tokens sent to each output.
+1 -1
View File
@@ -23,6 +23,6 @@ The set will be carefully chosen to satisfy the above requirements with a minima
**Transaction outputs**: **Transaction outputs**:
| v<sub>out</sub> | ScriptPubKey ("Address") | BCH amount | | v<sub>out</sub> | ScriptPubKey ("Address") | BCH amount |
|-|-|-| |--|--|--|
| 0 | OP_RETURN<br>&lt;lokad_id: 'SLP\x00'&gt; (4 bytes, ascii)<br>&lt;token_type: 1&gt; (1 to 2 byte integer)<br>&lt;transaction_type: 'COMMIT'&gt; (6 bytes, ascii)<br>&lt;token_id&gt; (32 bytes)<br>&lt;for_bitcoin_block_hash&gt; (32 bytes)<br>&lt;block_height&gt; (8 byte integer)<br>&lt;token_txn_set_hash&gt; (32 bytes)<br>&lt;txn_set_data_url&gt; (0 to ∞ bytes, ascii) [to be determined] | any | | 0 | OP_RETURN<br>&lt;lokad_id: 'SLP\x00'&gt; (4 bytes, ascii)<br>&lt;token_type: 1&gt; (1 to 2 byte integer)<br>&lt;transaction_type: 'COMMIT'&gt; (6 bytes, ascii)<br>&lt;token_id&gt; (32 bytes)<br>&lt;for_bitcoin_block_hash&gt; (32 bytes)<br>&lt;block_height&gt; (8 byte integer)<br>&lt;token_txn_set_hash&gt; (32 bytes)<br>&lt;txn_set_data_url&gt; (0 to ∞ bytes, ascii) [to be determined] | any |
| ... | Any | any | | ... | Any | any |
+1 -1
View File
@@ -29,7 +29,7 @@ The genesis transaction includes an initial minting of `initial_token_mint_quant
**Transaction outputs**: **Transaction outputs**:
| v<sub>out</sub> | ScriptPubKey ("Address")| BCH amount| Implied token amount (base units) | | v<sub>out</sub> | ScriptPubKey ("Address")| BCH amount| Implied token amount (base units) |
| - | - | - | - | |--|--|--|--|
| 0 | OP_RETURN<br>&lt;lokad_id: 'SLP\x00'&gt; (4 bytes, ascii)<sup>1</sup><br>&lt;token_type: 1&gt; (1 to 2 byte integer)<br>&lt;transaction_type: 'GENESIS'&gt; (7 bytes, ascii)<br>&lt;token_ticker&gt; (0 to ∞ bytes, suggested utf-8)<br>&lt;token_name&gt; (0 to ∞ bytes, suggested utf-8)<br>&lt;token_document_url&gt; (0 to ∞ bytes, suggested ascii)<br>&lt;token_document_hash&gt; (0 bytes or 32 bytes)<br>&lt;decimals&gt; (1 byte in range 0x00-0x09)<br>&lt;mint_baton_vout&gt; (0 bytes, or 1 byte in range 0x02-0xff)<br>&lt;initial_token_mint_quantity&gt; (8 byte integer)<br> | any<sup>2</sup> | 0 | | 0 | OP_RETURN<br>&lt;lokad_id: 'SLP\x00'&gt; (4 bytes, ascii)<sup>1</sup><br>&lt;token_type: 1&gt; (1 to 2 byte integer)<br>&lt;transaction_type: 'GENESIS'&gt; (7 bytes, ascii)<br>&lt;token_ticker&gt; (0 to ∞ bytes, suggested utf-8)<br>&lt;token_name&gt; (0 to ∞ bytes, suggested utf-8)<br>&lt;token_document_url&gt; (0 to ∞ bytes, suggested ascii)<br>&lt;token_document_hash&gt; (0 bytes or 32 bytes)<br>&lt;decimals&gt; (1 byte in range 0x00-0x09)<br>&lt;mint_baton_vout&gt; (0 bytes, or 1 byte in range 0x02-0xff)<br>&lt;initial_token_mint_quantity&gt; (8 byte integer)<br> | any<sup>2</sup> | 0 |
| 1 | Initial mint receiver | any<sup>2</sup> | initial_token_mint_quantity | | 1 | Initial mint receiver | any<sup>2</sup> | initial_token_mint_quantity |
| ... | Any | any<sup>2</sup> | 0 | | ... | Any | any<sup>2</sup> | 0 |
+1 -1
View File
@@ -11,7 +11,7 @@ This makes it possible to prove end-of-minting capabilities for a token even aft
**Transaction outputs**: **Transaction outputs**:
| v<sub>out</sub> | ScriptPubKey ("Address") | BCH amount | Implied token amount (base units) | | v<sub>out</sub> | ScriptPubKey ("Address") | BCH amount | Implied token amount (base units) |
|-|-|-|-| |--|--|--|--|
| 0 | OP_RETURN<br>&lt; lokad_id: 'SLP\x00'&gt; (4 bytes, ascii)<br>&lt; token_type: 1&gt; (1 to 2 byte integer)<br>&lt; transaction_type: 'MINT'&gt; (4 bytes, ascii)<br>&lt; token_id&gt; (32 bytes)<br>&lt; mint_baton_vout&gt; (0 bytes or 1 byte between 0x02-0xff)<br>&lt; additional_token_quantity&gt; (8 byte integer) | any | 0 | | 0 | OP_RETURN<br>&lt; lokad_id: 'SLP\x00'&gt; (4 bytes, ascii)<br>&lt; token_type: 1&gt; (1 to 2 byte integer)<br>&lt; transaction_type: 'MINT'&gt; (4 bytes, ascii)<br>&lt; token_id&gt; (32 bytes)<br>&lt; mint_baton_vout&gt; (0 bytes or 1 byte between 0x02-0xff)<br>&lt; additional_token_quantity&gt; (8 byte integer) | any | 0 |
| 1 | Token mint receiver | any | additional_token_quantity | | 1 | Token mint receiver | any | additional_token_quantity |
| ... | Any | any | 0 | | ... | Any | any | 0 |
+2 -2
View File
@@ -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. 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. 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**: **Transaction outputs**:
| v<sub>out</sub> | ScriptPubKey ("Address") | BCH amount | Implied token amount (base units) | | v<sub>out</sub> | ScriptPubKey ("Address") | BCH amount | Implied token amount (base units) |
|-|-|-|-| |--|--|--|--|
| 0 | OP_RETURN<br>&lt;lokad id: 'SLP\x00'&gt; (4 bytes, ascii)<br>&lt;token_type: 1&gt; (1 to 2 byte integer)<br>&lt;transaction_type: 'SEND'&gt; (4 bytes, ascii)<br>&lt;token_id&gt; (32 bytes)<br>&lt;token_output_quantity1&gt; (required, 8 byte integer)<br>&lt;token_output_quantity2&gt; (optional, 8 byte integer)<br>...<br>&lt;token_output_quantity19&gt; (optional, 8 byte integer)<br>| any | 0 | | 0 | OP_RETURN<br>&lt;lokad id: 'SLP\x00'&gt; (4 bytes, ascii)<br>&lt;token_type: 1&gt; (1 to 2 byte integer)<br>&lt;transaction_type: 'SEND'&gt; (4 bytes, ascii)<br>&lt;token_id&gt; (32 bytes)<br>&lt;token_output_quantity1&gt; (required, 8 byte integer)<br>&lt;token_output_quantity2&gt; (optional, 8 byte integer)<br>...<br>&lt;token_output_quantity19&gt; (optional, 8 byte integer)<br>| any | 0 |
| 1 | Receiver 1 | any | token_output_quantity1 | | 1 | Receiver 1 | any | token_output_quantity1 |
| ... | ... | any | ... | | ... | ... | any | ... |