mirror of
https://github.com/bitcoin/bips.git
synced 2026-10-19 19:29:18 +00:00
bip138: generalize key-selection test vectors
Rename keys_types.json to recipient_keys.json and generalize the format to support multiple descriptors and multiple recipient keys: - "key": a single key-expression string becomes "descriptors": an array of complete descriptor strings. - "expected": an x-only key string becomes "expected_keys": an array containing that key; null remains null. Convert the nine existing cases by wrapping each key expression in tr(), except the uncompressed literal uses pk(), since tr() does not accept it. Each case has one descriptor.
This commit is contained in:
1 parent
d1d2042c85
commit
5fc05e2b17
3 files changed
+80
-49
No files matched your search
+5
-2
@@ -590,8 +590,11 @@ The version field enables possible future enhancements:
|
||||
|
||||
### Test Vectors
|
||||
|
||||
[key_types.json](./bip-0138/test_vectors/keys_types.json) contains test
|
||||
vectors for key serialisations.
|
||||
[recipient_keys.json](./bip-0138/test_vectors/recipient_keys.json) contains
|
||||
test vectors for recipient selection. `descriptors` lists the payload's descriptor
|
||||
strings; `expected_keys` lists the sorted, deduplicated x-only recipient roots
|
||||
before application-specific exclusions. `null` requires refusing to encode.
|
||||
|
||||
[content_type.json](./bip-0138/test_vectors/content_type.json) contains test
|
||||
vectors for content types serialisations.
|
||||
[payload.json](./bip-0138/test_vectors/payload.json) contains test vectors for payload parsing.
|
||||
|
||||
Reference in new issue
Block a user