You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/descriptors.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ Output descriptors currently support:
39
39
40
40
## Reference
41
41
42
-
Descriptors consist of several types of expressions. The top level expression is always a `SCRIPT`.
42
+
Descriptors consist of several types of expressions. The top level expression is either a `SCRIPT`, or `SCRIPT#CHECKSUM` where `CHECKSUM` is an 8-character alphanumeric descriptor checksum.
43
43
44
44
`SCRIPT` expressions:
45
45
-`sh(SCRIPT)` (top level only): P2SH embed the argument.
@@ -169,3 +169,20 @@ existing Bitcoin Core wallets, a convenience function `combo` is
169
169
provided, which takes as input a public key, and describes a set of P2PK,
170
170
P2PKH, P2WPKH, and P2SH-P2WPH scripts for that key. In case the key is
171
171
uncompressed, the set only includes P2PK and P2PKH scripts.
172
+
173
+
### Checksums
174
+
175
+
Descriptors can optionally be suffixed with a checksum to protect against
176
+
typos or copy-paste errors.
177
+
178
+
These checksums consist of 8 alphanumeric characters. As long as errors are
179
+
restricted to substituting characters in `0123456789()[],'/*abcdefgh@:$%{}`
180
+
for others in that set and changes in letter case, up to 4 errors will always
181
+
be detected in descriptors up to 501 characters, and up to 3 errors in longer
182
+
ones. For larger numbers of errors, or other types of errors, there is a
183
+
roughly 1 in a trillion chance of not detecting the errors.
184
+
185
+
All RPCs in Bitcoin Core will include the checksum in their output. Only
186
+
certain RPCs require checksums on input, including `deriveaddress` and
187
+
`importmulti`. The checksum for a descriptor without one can be computed
0 commit comments