Skip to content

Commit ae43aef

Browse files
authored
chore: update bitcoin ledger generated docs (#34)
1 parent 6eb2530 commit ae43aef

3 files changed

Lines changed: 78 additions & 1 deletion

File tree

pages/_meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"title": "Ledgers"
2626
},
2727
"cardano": "Cardano Module",
28+
"bitcoin": "Bitcoin Module",
2829
"-- SDK --": {
2930
"type": "separator",
3031
"title": "SDK"

pages/bitcoin.mdx

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Bitcoin Module
2+
3+
<a name="bitcoin-v1-Block"></a>
4+
5+
## Block
6+
7+
Represents a block in the Bitcoin blockchain.
8+
9+
| Field | Type | Label | Description |
10+
| --------------- | -------------------------------------- | -------- | ------------------------------------------- |
11+
| version | [uint32](#uint32) | | Block version number |
12+
| prev_block_hash | [bytes](#bytes) | | Hash of the previous block |
13+
| merkle_root | [bytes](#bytes) | | Root hash of the Merkle tree |
14+
| timestamp | [uint32](#uint32) | | Time when the block was created |
15+
| bits | [uint32](#uint32) | | Target difficulty value |
16+
| nonce | [uint32](#uint32) | | Value used for Proof-of-Work |
17+
| transactions | [Transaction](#bitcoin-v1-Transaction) | repeated | List of transactions included in the block |
18+
19+
20+
<a name="bitcoin-v1-Transaction"></a>
21+
22+
## Transaction
23+
24+
Represents a transaction in the Bitcoin network.
25+
26+
| Field | Type | Label | Description |
27+
| ---------- | -------------------------------- | -------- | --------------------------------------------------- |
28+
| version | [uint32](#uint32) | | Transaction version number. Currently 1 |
29+
| inputs | [TxInput](#bitcoin-v1-TxInput) | repeated | List of transaction inputs |
30+
| outputs | [TxOutput](#bitcoin-v1-TxOutput) | repeated | List of transaction outputs |
31+
| locktime | [uint32](#uint32) | | Block height or timestamp when transaction is final |
32+
| hash | [bytes](#bytes) | | |
33+
| block_hash | [bytes](#bytes) | | Transactions reference their block |
34+
| timestamp | [uint32](#uint32) | | |
35+
36+
37+
<a name="bitcoin-v1-TxInput"></a>
38+
39+
## TxInput
40+
41+
Represents an input in a Bitcoin transaction.
42+
43+
| Field | Type | Label | Description |
44+
| ---------- | ----------------- | -------- | ------------------------------------------------------------- |
45+
| tx_id | [bytes](#bytes) | | Hash of the previous transaction output |
46+
| script_sig | [bytes](#bytes) | | Unlocking script for spending the UTXO |
47+
| sequence | [uint32](#uint32) | | Used for relative timelocks |
48+
| coinbase | [bytes](#bytes) | | Coinbase transactions have this instead of txid and scriptSig |
49+
| witnesses | [bytes](#bytes) | repeated | |
50+
51+
52+
<a name="bitcoin-v1-TxOutput"></a>
53+
54+
## TxOutput
55+
56+
Represents an output in a Bitcoin transaction.
57+
58+
| Field | Type | Label | Description |
59+
| -------------- | ---------------------------------------- | ----- | ------------------------------------- |
60+
| value | [uint64](#uint64) | | Amount of Bitcoin in Satoshis |
61+
| script_pub_key | [ScriptPubKey](#bitcoin-v1-ScriptPubKey) | | Locking script defining spendability |
62+
63+
64+
<a name="bitcoin-v1-ScriptPubKey"></a>
65+
66+
## ScriptPubKey
67+
68+
Represents a script pub key in the output.
69+
70+
| Field | Type | Label | Description |
71+
| ----------- | -------------------- | ----- | ------------------------------- |
72+
| asm | [bytes](#bytes) | | Script in human-readable format |
73+
| hex | [bytes](#bytes) | | Script in hexadecimal format |
74+
| script_type | [ScriptType](#bytes) | | Can be ScriptHash, Multsig, etc |
75+

pages/introduction.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ The interface is divided into different modules that represent specific use-case
2626
Modules are blockchain-agnostic, they need to be paired with a specific ledger to be used. A ledger represents a set of primitive structures that are specific to a particular blockchain ecosystem.
2727

2828
<Callout type="info">
29-
So far, the spec focuses only on Cardano. Other UTxO-based blockchains will follow.
29+
So far, the spec focuses on Cardano and Bitcoin. Other UTxO-based blockchains will follow.
3030
</Callout>
3131

3232
<Cards>
3333
<Card title="Cardano Ledger" href="cardano" />
34+
<Card title="Bitcoin Ledger" href="bitcoin" />
3435
</Cards>
3536

3637
## SDKs

0 commit comments

Comments
 (0)