1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-02-23 15:38:22 +00:00

descriptors: add test vectors

This commit is contained in:
Andrew Chow
2023-06-29 16:15:14 -04:00
parent 648eb37f1a
commit bb562aa8e9
8 changed files with 285 additions and 7 deletions

View File

@@ -44,7 +44,25 @@ The output script produced by this descriptor is the output script produced by t
==Test Vectors==
TBD
Valid descriptors followed by the scripts they produce.
* <tt>raw(deadbeef)</tt>
** <tt>deadbeef</tt>
* <tt>raw(512103a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd4104a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea23552ae)</tt>
** <tt>512103a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd4104a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea23552ae</tt>
* <tt>raw(a9149a4d9901d6af519b2a23d4a2f51650fcba87ce7b87)</tt>
** <tt>a9149a4d9901d6af519b2a23d4a2f51650fcba87ce7b87</tt>
* <tt>addr(3PUNyaW7M55oKWJ3kDukwk9bsKvryra15j)</tt>
** <tt>a914eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee87</tt>
Invalid descriptors
* Non-hex script: <tt>raw(asdf)</tt>
* Invalid address: <tt>addr(asdf)</tt>
* <tt>raw</tt> nested in <tt>sh</tt>: <tt>sh(raw(deadbeef))</tt>
* <tt>raw</tt> nested in <tt>wsh</tt>: <tt>wsh(raw(deadbeef))</tt>
* <tt>addr</tt> nested in <tt>sh</tt>: <tt>sh(addr(3PUNyaW7M55oKWJ3kDukwk9bsKvryra15j))</tt>
* <tt>addr</tt> nested in <tt>wsh</tt>: <tt>wsh(addr(3PUNyaW7M55oKWJ3kDukwk9bsKvryra15j))</tt>
==Backwards Compatibility==