Skip to content

Commit 411f3b8

Browse files
Codespell doc fixes
1 parent 6e690e4 commit 411f3b8

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

doc/bitcoin.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Once the user approves, the `REGISTER_WALLET` returns to the client a 32-byte HM
6565
| 0xE000 | `SW_INTERRUPTED_EXECUTION` | The command is interrupted, and requires the client's response |
6666
| 0x9000 | `SW_OK` | Success |
6767

68-
<!-- TODO: add an introduction section explaining the comand reference notations (e.g. the Bitcoin style varint) -->
68+
<!-- TODO: add an introduction section explaining the command reference notations (e.g. the Bitcoin style varint) -->
6969

7070
## Commands
7171

@@ -106,7 +106,7 @@ The paths defined in [BIP-44](https://github.com/bitcoin/bips/blob/master/bip-00
106106

107107
If the `display` parameter is `0` and the path is not standard, an error is returned.
108108

109-
If the `display` parameter is `1`, the result is also shown on the secure screen for verification. The UX flow shows on the device screen the exact path and the complete serialized extended pubkey as defined in [BIP-32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) for that path. If the path is not standard, an additional warning is shown to the user.
109+
If the `display` parameter is `1`, the result is also shown on the secure screen for verification. The UX flow shows on the device screen the exact path and the complete serialized extended pubkey as defined in [BIP-32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) for that path. If the path is not standard, an additional warning is shown to the user.
110110

111111
### REGISTER_WALLET
112112

@@ -214,9 +214,9 @@ Given a PSBTv2 and a registered wallet (or a standard one), sign all the inputs
214214
| `<var>` | `global_map_size` | The number of key/value pairs of the global map of the psbt |
215215
| `32` | `global_map_keys_root` | The Merkle root of the keys of the global map |
216216
| `32` | `global_map_vals_root` | The Merkle root of the values of the global map |
217-
| `<var>` | `n_inputs` | The number of inputs of the psbt |
217+
| `<var>` | `n_inputs` | The number of inputs of the psbt |
218218
| `32` | `inputs_maps_root` | The Merkle root of the vector of Merkleized map commitments for the input maps |
219-
| `<var>` | `n_outputs` | The number of outputs of the psbt |
219+
| `<var>` | `n_outputs` | The number of outputs of the psbt |
220220
| `32` | `outputs_maps_root` | The Merkle root of the vector of Merkleized map commitments for the output maps |
221221
| `32` | `wallet_id` | The id of the wallet |
222222
| `32` | `wallet_hmac` | The hmac of a registered wallet, or exactly 32 0 bytes |
@@ -382,7 +382,7 @@ The response must contain:
382382
- `1` byte: a 1-byte unsigned integer `b`, the length of the prefix of the pre-image that is part of the response;
383383
- `b` bytes: corresponding to the first `b` bytes of the preimage.
384384

385-
If the pre-image is too long to be contained in a single response, the client should choose `b` to be as large as possible; subsequent bytes are enqueued as single-byte elements that the Hardware Wallet will request with one ore more `GET_MORE_ELEMENTS` requests.
385+
If the pre-image is too long to be contained in a single response, the client should choose `b` to be as large as possible; subsequent bytes are enqueued as single-byte elements that the Hardware Wallet will request with one or more `GET_MORE_ELEMENTS` requests.
386386

387387
### GET_MERKLE_LEAF_PROOF
388388

doc/merkle.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Operations on Merkle trees are composed to create commitments to more complex da
99
## Merkle trees
1010
### Definition
1111

12-
A Merkle tree allows to create a commitment to an arbitrarily large list of values; short membership proofs can be provided that can be verified solely withthe knowledge of a single hash (the Merkle tree root)
12+
A Merkle tree allows to create a commitment to an arbitrarily large list of values; short membership proofs can be provided that can be verified solely with the knowledge of a single hash (the Merkle tree root)
1313

1414
Our implementation of Merkle trees loosely follow the structure defined in [RFC 6962](https://www.rfc-editor.org/rfc/pdfrfc/rfc6962.txt.pdf), using SHA-256 as the hash function. We refer to the linked document for a more detailed description. Only one difference (the hash of the empty list) is defined below.
1515

1616
We call a *byte string* an arbitrary array of bytes, where each byte is a value between `0` and `255`. A *hash function* takes as input an arbitrary length byte string, and produces a fixed-length output. Outputs of SHA-256 are 32 bytes long.
1717

1818
Following the notation of RFC 6962, we are given an ordered list of inputs `D[n] = {d(0), d(1), ..., d(n-1)}`, where each element `d(i)` is a byte string. We denote with `||` the concatenation operator, and with `D[a:b]` the list `{d(a), d(a+1), ..., d(b - 1)}`.
1919

20-
We define the Merkle Tree Hash (MTH) (also called the *Merkle root*) as follows.
20+
We define the Merkle Tree Hash (MTH) (also called the *Merkle root*) as follows.
2121

2222
The hash of the empty list is `MTH({}) = 0`, a string of 32 bytes identically equal to `0`. *This definition differs from RFC 6962*.
2323

doc/v0/bitcoin.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Once the user approves, the `REGISTER_WALLET` returns to the client a 32-byte HM
6262
| 0xE000 | `SW_INTERRUPTED_EXECUTION` | The command is interrupted, and requires the client's response |
6363
| 0x9000 | `SW_OK` | Success |
6464

65-
<!-- TODO: add an introduction section explaining the comand reference notations (e.g. the Bitcoin style varint) -->
65+
<!-- TODO: add an introduction section explaining the command reference notations (e.g. the Bitcoin style varint) -->
6666

6767
## Commands
6868

@@ -103,7 +103,7 @@ The paths defined in [BIP-44](https://github.com/bitcoin/bips/blob/master/bip-00
103103

104104
If the `display` parameter is `0` and the path is not standard, an error is returned.
105105

106-
If the `display` parameter is `1`, the result is also shown on the secure screen for verification. The UX flow shows on the device screen the exact path and the complete serialized extended pubkey as defined in [BIP-32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) for that path. If the path is not standard, an additional warning is shown to the user.
106+
If the `display` parameter is `1`, the result is also shown on the secure screen for verification. The UX flow shows on the device screen the exact path and the complete serialized extended pubkey as defined in [BIP-32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) for that path. If the path is not standard, an additional warning is shown to the user.
107107

108108
### REGISTER_WALLET
109109

@@ -209,9 +209,9 @@ Given a PSBTv2 and a registered wallet (or a standard one), sign all the inputs
209209
| `<var>` | `global_map_size` | The number of key/value pairs of the global map of the psbt |
210210
| `32` | `global_map_keys_root` | The Merkle root of the keys of the global map |
211211
| `32` | `global_map_vals_root` | The Merkle root of the values of the global map |
212-
| `<var>` | `n_inputs` | The number of inputs of the psbt |
212+
| `<var>` | `n_inputs` | The number of inputs of the psbt |
213213
| `32` | `inputs_maps_root` | The Merkle root of the vector of Merkleized map commitments for the input maps |
214-
| `<var>` | `n_outputs` | The number of outputs of the psbt |
214+
| `<var>` | `n_outputs` | The number of outputs of the psbt |
215215
| `32` | `outputs_maps_root` | The Merkle root of the vector of Merkleized map commitments for the output maps |
216216
| `32` | `wallet_id` | The id of the wallet |
217217
| `32` | `wallet_hmac` | The hmac of a registered wallet, or exactly 32 0 bytes |
@@ -352,7 +352,7 @@ The response must contain:
352352
- `1` byte: a 1-byte unsigned integer `b`, the length of the prefix of the pre-image that is part of the response;
353353
- `b` bytes: corresponding to the first `b` bytes of the preimage.
354354

355-
If the pre-image is too long to be contained in a single response, the client should choose `b` to be as large as possible; subsequent bytes are enqueued as single-byte elements that the Hardware Wallet will request with one ore more `GET_MORE_ELEMENTS` requests.
355+
If the pre-image is too long to be contained in a single response, the client should choose `b` to be as large as possible; subsequent bytes are enqueued as single-byte elements that the Hardware Wallet will request with one or more `GET_MORE_ELEMENTS` requests.
356356

357357
### GET_MERKLE_LEAF_PROOF
358358

@@ -414,4 +414,4 @@ All the current commands use a commit-and-reveal approach: the APDU that starts
414414
- If a Merkle proof is asked via `GET_MERKLE_LEAF_PROOF`, the proof is verified.
415415
- If the index of a leaf is asked `GET_MERKLE_LEAF_INDEX`, the proof for that element is requested via `GET_MERKLE_LEAF_PROOF` and the proof verified, *even if the leaf value is known*.
416416

417-
Care needs to be taken in designing protocols, as the client might lie by omission (for example, fail to reveal that a leaf of a Merkle tree is present during a call to `GET_MERKLE_LEAF_INDEX`).
417+
Care needs to be taken in designing protocols, as the client might lie by omission (for example, fail to reveal that a leaf of a Merkle tree is present during a call to `GET_MERKLE_LEAF_INDEX`).

doc/v0/wallet.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Key placeholder `KP` expressions consist of
2727
- a single character `@`
2828
- followed by a non-negative decimal number, with no leading zeros (except for `@0`).
2929

30-
The placeholder `@i` for some number *i* represents the *i*-th key in the vector of key orgin informations (which must be of size at least *i* + 1, or the wallet is invalid.
30+
The placeholder `@i` for some number *i* represents the *i*-th key in the vector of key origin information (which must be of size at least *i* + 1, or the wallet is invalid.
3131

32-
Each element of the *key origin informations* list is a `KEY` expression.
32+
Each element of the *key origin information* list is a `KEY` expression.
3333
`KEY` expressions:
3434

3535
- Key origin information, consisting of:
@@ -61,7 +61,7 @@ The app supports a number of features related to wallet policies. In order to se
6161

6262
- register a wallet, validating all the information (policy and keys involved) with the user on the trusted screen;
6363
- show the addresses for a registered wallet on the trusted screen;
64-
- sign spends from the wallet.
64+
- sign spends from the wallet.
6565

6666
Since the application is stateless, wallet registration is not persisted on device. In order to make it possible to use a registered wallet in future requests, the device returns a hmac-sha256 (32 bytes long) for the wallet upon a successful registration. The client side is responsible for persisting the wallet policy *and* the returned hmac-sha256, and to provide this information in future requests.
6767

@@ -122,4 +122,4 @@ A few policies that correspond to standardized single-key wallets can be used wi
122122
- ``sh(wpkh(@0))`` - nested segwit addresses as per [BIP-49](https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki)
123123
- ``tr(@0)`` - single Key P2TR as per [BIP-86](https://github.com/bitcoin/bips/blob/master/bip-0086.mediawiki)
124124

125-
Note that the wallet policy is considered standard (and therefore usable for signing without prior registration) only if the signing paths (defined in the key origin information) adheres to the corresponding BIP.
125+
Note that the wallet policy is considered standard (and therefore usable for signing without prior registration) only if the signing paths (defined in the key origin information) adheres to the corresponding BIP.

doc/wallet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ a wallet descriptor template and the vector of key placeholder expressions.
55

66
A _wallet descriptor template_ follows language very similar to output descriptor, with a few differences; the biggest one is that each `KEY` expression with a key placeholder `KP` expression, that refers to one of the keys in the _keys information vector_, plus the additional derivation steps to use for that key. Contextually, the keys information vector contains all the relevant _xpubs_, and possibly their key origin information.
77

8-
Each entry in the key information vector contains an _xpub_ (other types of keys supported in output script descriptors are not allowed), possible preceeded by the key origin information. The key origin information is compulsory for internal keys.
8+
Each entry in the key information vector contains an _xpub_ (other types of keys supported in output script descriptors are not allowed), possible preceded by the key origin information. The key origin information is compulsory for internal keys.
99

1010
This section formally defines wallet policies, and how they relate to
1111
output script descriptors.
@@ -127,7 +127,7 @@ The app supports a number of features related to wallet policies. In order to se
127127

128128
- register a wallet, validating all the information (policy and keys involved) with the user on the trusted screen;
129129
- show the addresses for a registered wallet on the trusted screen;
130-
- sign spends from the wallet.
130+
- sign spends from the wallet.
131131

132132
Since the application is stateless, wallet registration is not persisted on device. In order to make it possible to use a registered wallet in future requests, the device returns a hmac-sha256 (32 bytes long) for the wallet upon a successful registration. The client side is responsible for persisting the wallet policy *and* the returned hmac-sha256, and to provide this information in future requests.
133133

0 commit comments

Comments
 (0)