1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-05-04 16:41:51 +00:00

BIP-352: test vectors: allow to check found output count for receiving

Introduce an optional "n_outputs" field as alternative to the detailed
"outputs" objects (the field was already specified, but not used so
far). Also update the documentation of the fields.
This commit is contained in:
Sebastian Falbesoner
2026-02-26 20:40:33 +01:00
parent 3aa17caaa3
commit f14132fc77
2 changed files with 10 additions and 5 deletions

View File

@@ -422,7 +422,7 @@ A [[bip-0352/send_and_receive_test_vectors.json|collection of test vectors in JS
},
"expected": {
"addresses": [<array of bech32m strings, one for the silent payment address and each labeled address (if used)>],
"outputs": [<array of outputs with tweak and signature; contains all possible output sets, tester must match a subset of size `n_outputs`>
"outputs": [<optional array of outputs with tweak and signature, tester must match this set (alternatively, "n_outputs" can be specified)>
{
"priv_key_tweak": <hex encoded private key tweak data>,
"pub_key": <hex encoded X-only public key>,
@@ -430,7 +430,7 @@ A [[bip-0352/send_and_receive_test_vectors.json|collection of test vectors in JS
},
...
],
"n_outputs": <integer for the exact number of expected outputs>
"n_outputs": <optional integer for the number of expected found outputs (alternative to "outputs")>
}
}