From d115620881878d8431e466562e44f84578f9e82e Mon Sep 17 00:00:00 2001 From: pythcoiner Date: Thu, 18 Jun 2026 06:36:38 -0400 Subject: [PATCH] bip-138: make BIP380 backup content JSON-only --- bip-0138.md | 20 ++++--------------- .../test_vectors/bip380_descriptor_backup.txt | 2 -- 2 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 bip-0138/test_vectors/bip380_descriptor_backup.txt diff --git a/bip-0138.md b/bip-0138.md index 38c50cc5..410cbbb6 100644 --- a/bip-0138.md +++ b/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. diff --git a/bip-0138/test_vectors/bip380_descriptor_backup.txt b/bip-0138/test_vectors/bip380_descriptor_backup.txt deleted file mode 100644 index 4ce5adaa..00000000 --- a/bip-0138/test_vectors/bip380_descriptor_backup.txt +++ /dev/null @@ -1,2 +0,0 @@ -# BIP380 descriptor backup text vector -wpkh([d34db33f/84h/1h/0h]tpubDC5FSnBiZDMmhiuCmWAYsLwgLYrrT9rAqvTySfuCCrgsWz8wxMXUS9Tb9iVMvcRbvFcAHGkMD5Kx8koh4GquNGNTfohfk7pgjhaPCdXpoba/<0;1>/*)