mirror of
https://github.com/bitcoin/bips.git
synced 2026-10-19 19:29:18 +00:00
bip-138: make BIP380 backup content JSON-only
This commit is contained in:
20
bip-0138.md
20
bip-0138.md
@@ -354,26 +354,15 @@ payload.[^type-upgrade]
|
||||
#### BIP380 Descriptor Backup Content
|
||||
|
||||
When `CONTENT` is `TYPE = 0x01` with `DATA = 0x017c` (BIP380), `PLAINTEXT`
|
||||
is UTF-8 encoded BIP380 descriptor backup content. It is either:
|
||||
|
||||
- A text descriptor backup document.
|
||||
- A JSON descriptor backup document, if the first character is `{`.
|
||||
is a UTF-8 JSON descriptor backup document. A bare descriptor string is not a
|
||||
valid document.
|
||||
|
||||
Test vectors are in
|
||||
[`bip380_descriptor_backup.txt`](./bip-0138/test_vectors/bip380_descriptor_backup.txt)
|
||||
and
|
||||
[`bip380_descriptor_backup.json`](./bip-0138/test_vectors/bip380_descriptor_backup.json).
|
||||
|
||||
Descriptor strings MUST NOT contain private key material and SHOULD include a
|
||||
checksum.
|
||||
|
||||
##### Text Descriptor Backup Documents
|
||||
|
||||
A text descriptor backup document contains one BIP380 output script descriptor
|
||||
per line. Empty lines and lines starting with `#` MUST be ignored. Each
|
||||
descriptor MUST use BIP389 multipath key expressions, where `/<0;1>` means
|
||||
receive and change, respectively.
|
||||
|
||||
##### JSON Descriptor Backup Documents
|
||||
|
||||
The descriptor backup document is a JSON object with the following fields:
|
||||
@@ -509,9 +498,8 @@ contains test vectors for ciphertexts generated using CHACHA20-POLY1305.
|
||||
[encrypted_backup.json](./bip-0138/test_vectors/encrypted_backup.json)
|
||||
contains test vectors for generation of complete encrypted backups, including
|
||||
BIP380 and BIP388 content.
|
||||
[bip380_descriptor_backup.txt](./bip-0138/test_vectors/bip380_descriptor_backup.txt)
|
||||
and [bip380_descriptor_backup.json](./bip-0138/test_vectors/bip380_descriptor_backup.json)
|
||||
contain test vectors for BIP380 descriptor backup documents.
|
||||
[bip380_descriptor_backup.json](./bip-0138/test_vectors/bip380_descriptor_backup.json)
|
||||
contains test vectors for BIP380 descriptor backup documents.
|
||||
[bip388.json](./bip-0138/test_vectors/bip388.json)
|
||||
contains test vectors for BIP388 wallet policy backup documents.
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# BIP380 descriptor backup text vector
|
||||
wpkh([d34db33f/84h/1h/0h]tpubDC5FSnBiZDMmhiuCmWAYsLwgLYrrT9rAqvTySfuCCrgsWz8wxMXUS9Tb9iVMvcRbvFcAHGkMD5Kx8koh4GquNGNTfohfk7pgjhaPCdXpoba/<0;1>/*)
|
||||
Reference in New Issue
Block a user