diff --git a/src/test/descriptor_tests.cpp b/src/test/descriptor_tests.cpp index 9abf0ad00f..9f3d507693 100644 --- a/src/test/descriptor_tests.cpp +++ b/src/test/descriptor_tests.cpp @@ -284,30 +284,30 @@ BOOST_FIXTURE_TEST_SUITE(descriptor_tests, BasicTestingSetup) BOOST_AUTO_TEST_CASE(descriptor_test) { // Basic single-key compressed - Check("combo(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)", "combo(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)", SIGNABLE, {{"2102a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cac","76a9149a1c78a507689f6f54b847ad1cef1e614ee23f1e88ac","00149a1c78a507689f6f54b847ad1cef1e614ee23f1e","a91484ab21b1b2fd065d4504ff693d832434b6108d7b87"}}, nullopt); + Check("combo(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)", "combo(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)", SIGNABLE, {{"2102a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cac","76a9140c13eca58177d726d65b8556f351d081b1103bf088ac","00140c13eca58177d726d65b8556f351d081b1103bf0","a9147bdb0f7aa46efb97e699cef65234d80481fab37287"}}, nullopt); Check("pk(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)", "pk(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)", SIGNABLE, {{"2102a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cac"}}, nullopt); - Check("pkh([deadbeef/1/2'/3/4']T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)", "pkh([deadbeef/1/2'/3/4']02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)", SIGNABLE, {{"76a9149a1c78a507689f6f54b847ad1cef1e614ee23f1e88ac"}}, OutputType::LEGACY, {{1,0x80000002UL,3,0x80000004UL}}); - Check("wpkh(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)", "wpkh(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)", SIGNABLE, {{"00149a1c78a507689f6f54b847ad1cef1e614ee23f1e"}}, OutputType::BECH32); - Check("sh(wpkh(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte))", "sh(wpkh(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c))", SIGNABLE, {{"a91484ab21b1b2fd065d4504ff693d832434b6108d7b87"}}, OutputType::P2SH_SEGWIT); + Check("pkh([deadbeef/1/2'/3/4']T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)", "pkh([deadbeef/1/2'/3/4']02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)", SIGNABLE, {{"76a9140c13eca58177d726d65b8556f351d081b1103bf088ac"}}, OutputType::LEGACY, {{1,0x80000002UL,3,0x80000004UL}}); + Check("wpkh(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)", "wpkh(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)", SIGNABLE, {{"00140c13eca58177d726d65b8556f351d081b1103bf0"}}, OutputType::BECH32); + Check("sh(wpkh(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte))", "sh(wpkh(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c))", SIGNABLE, {{"a9147bdb0f7aa46efb97e699cef65234d80481fab37287"}}, OutputType::P2SH_SEGWIT); CheckUnparsable("sh(wpkh(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY2))", "sh(wpkh(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5))", "Pubkey '03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5' is invalid"); // Invalid pubkey CheckUnparsable("pkh(deadbeef/1/2'/3/4']T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)", "pkh(deadbeef/1/2'/3/4']02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)", "Key origin start '[ character expected but not found, got 'd' instead"); // Missing start bracket in key origin CheckUnparsable("pkh([deadbeef]/1/2'/3/4']T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)", "pkh([deadbeef]/1/2'/3/4']02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)", "Multiple ']' characters found for a single pubkey"); // Multiple end brackets in key origin - - // Basic single-key uncompressed - Check("combo(5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss)", "combo(04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235)", SIGNABLE, {{"4104a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235ac","76a914b5bd079c4d57cc7fc28ecf8213a6b791625b818388ac"}}, nullopt); - Check("pk(5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss)", "pk(04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235)", SIGNABLE, {{"4104a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235ac"}}, nullopt); - Check("pkh(5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss)", "pkh(04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235)", SIGNABLE, {{"76a914b5bd079c4d57cc7fc28ecf8213a6b791625b818388ac"}}, OutputType::LEGACY); - CheckUnparsable("wpkh(5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss)", "wpkh(04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235)", "Uncompressed keys are not allowed"); // No uncompressed keys in witness - CheckUnparsable("wsh(pk(5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss))", "wsh(pk(04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235))", "Uncompressed keys are not allowed"); // No uncompressed keys in witness - CheckUnparsable("sh(wpkh(5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss))", "sh(wpkh(04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235))", "Uncompressed keys are not allowed"); // No uncompressed keys in witness - + + // Basic single-key uncompressed + Check("combo(6uWuTLr7s7iTXhh3semxLf3w4BxzpXbwzbrYzHENHCbeWiqiD9S)", "combo(04a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c1762)", SIGNABLE, {{"4104a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c1762ac","76a91419c13841a49884bd124fed9f4e036ec2462403fd88ac"}}, nullopt); + Check("pk(6uWuTLr7s7iTXhh3semxLf3w4BxzpXbwzbrYzHENHCbeWiqiD9S)", "pk(04a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c1762)", SIGNABLE, {{"4104a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c1762ac"}}, nullopt); + Check("pkh(6uWuTLr7s7iTXhh3semxLf3w4BxzpXbwzbrYzHENHCbeWiqiD9S)", "pkh(04a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c1762)", SIGNABLE, {{"76a91419c13841a49884bd124fed9f4e036ec2462403fd88ac"}}, OutputType::LEGACY); + CheckUnparsable("wpkh(6uWuTLr7s7iTXhh3semxLf3w4BxzpXbwzbrYzHENHCbeWiqiD9S)", "wpkh(04a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c1762)", "Uncompressed keys are not allowed"); // No uncompressed keys in witness + CheckUnparsable("wsh(pk(6uWuTLr7s7iTXhh3semxLf3w4BxzpXbwzbrYzHENHCbeWiqiD9S))", "wsh(pk(04a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c1762))", "Uncompressed keys are not allowed"); // No uncompressed keys in witness + CheckUnparsable("sh(wpkh(6uWuTLr7s7iTXhh3semxLf3w4BxzpXbwzbrYzHENHCbeWiqiD9S))", "sh(wpkh(04a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c1762))", "Uncompressed keys are not allowed"); // No uncompressed keys in witness + // Some unconventional single-key constructions - Check("sh(pk(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte))", "sh(pk(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c))", SIGNABLE, {{"a9141857af51a5e516552b3086430fd8ce55f7c1a52487"}}, OutputType::LEGACY); - Check("sh(pkh(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte))", "sh(pkh(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c))", SIGNABLE, {{"a9141a31ad23bf49c247dd531a623c2ef57da3c400c587"}}, OutputType::LEGACY); - Check("wsh(pk(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte))", "wsh(pk(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c))", SIGNABLE, {{"00202e271faa2325c199d25d22e1ead982e45b64eeb4f31e73dbdf41bd4b5fec23fa"}}, OutputType::BECH32); - Check("wsh(pkh(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte))", "wsh(pkh(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c))", SIGNABLE, {{"0020338e023079b91c58571b20e602d7805fb808c22473cbc391a41b1bd3a192e75b"}}, OutputType::BECH32); - Check("sh(wsh(pk(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)))", "sh(wsh(pk(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)))", SIGNABLE, {{"a91472d0c5a3bfad8c3e7bd5303a72b94240e80b6f1787"}}, OutputType::P2SH_SEGWIT); - Check("sh(wsh(pkh(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)))", "sh(wsh(pkh(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)))", SIGNABLE, {{"a914b61b92e2ca21bac1e72a3ab859a742982bea960a87"}}, OutputType::P2SH_SEGWIT); + Check("sh(pk(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte))", "sh(pk(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c))", SIGNABLE, {{"a914de92af19990cd11b293afd89b9d1985fa0b8166f87"}}, OutputType::LEGACY); + Check("sh(pkh(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte))", "sh(pkh(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c))", SIGNABLE, {{"a91401c62701a59dea1cf6d8b834a994f77575df782487"}}, OutputType::LEGACY); + Check("wsh(pk(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte))", "wsh(pk(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c))", SIGNABLE, {{"0020f971e2b302ee0977ddb08d4150e50acabda3f53478fbd474a866b616ce041868"}}, OutputType::BECH32); + Check("wsh(pkh(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte))", "wsh(pkh(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c))", SIGNABLE, {{"002099dba00720686a1275aae85494e4eafc1744ba11d4eb6059e83e383e49fe7274"}}, OutputType::BECH32); + Check("sh(wsh(pk(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)))", "sh(wsh(pk(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)))", SIGNABLE, {{"a914bd45baff235b772370d6265d268b1ddb08917b0e87"}}, OutputType::P2SH_SEGWIT); + Check("sh(wsh(pkh(T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)))", "sh(wsh(pkh(02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)))", SIGNABLE, {{"a914c36470aa22c4026cf75d377d3611f86225f7676c87"}}, OutputType::P2SH_SEGWIT); // Versions with BIP32 derivations Check("combo([01234567]xprvA1RpRA33e1JQ7ifknakTFpgNXPmW2YvmhqLQYMmrj4xJXXWYpDPS3xz7iAxn8L39njGVyuoseXzU6rcxFLJ8HFsTjSyQbLYnMpCqE2VbFWc)", "combo([01234567]xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL)", SIGNABLE, {{"2102d2b36900396c9282fa14628566582f206a5dd0bcc8d5e892611806cafb0301f0ac","76a91431a507b815593dfc51ffc7245ae7e5aee304246e88ac","001431a507b815593dfc51ffc7245ae7e5aee304246e","a9142aafb926eb247cb18240a7f4c07983ad1f37922687"}}, nullopt); @@ -321,22 +321,23 @@ BOOST_AUTO_TEST_CASE(descriptor_test) CheckUnparsable("pkh(xprv9s21ZrQH143K31xYSDQpPDxsXRTUcvj2iNHm5NUtrGiGG5e2DtALGdso3pGz6ssrdK4PFmM8NSpSBHNqPqm55Qn3LqFtT2emdEXVYsCzC2U/1aa)", "pkh(xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1aa)", "Key path value '1aa' is not a valid uint32"); // Path is not valid uint // Multisig constructions - Check("multi(1,T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte,5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss)", "multi(1,02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c,04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235)", SIGNABLE, {{"512102a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c4104a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea23552ae"}}, nullopt); - Check("sortedmulti(1,T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte,5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss)", "sortedmulti(1,02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c,04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235)", SIGNABLE, {{"512102a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c4104a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea23552ae"}}, nullopt); - Check("sortedmulti(1,5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss,T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)", "sortedmulti(1,04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235,02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)", SIGNABLE, {{"512102a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c4104a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea23552ae"}}, nullopt); + + Check("multi(1,T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte,6uWuTLr7s7iTXhh3semxLf3w4BxzpXbwzbrYzHENHCbeWiqiD9S)", "multi(1,02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c,04a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c1762)", SIGNABLE, {{"512102a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c4104a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c176252ae"}}, nullopt); + Check("sortedmulti(1,T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte,6uWuTLr7s7iTXhh3semxLf3w4BxzpXbwzbrYzHENHCbeWiqiD9S)", "sortedmulti(1,02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c,04a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c1762)", SIGNABLE, {{"512102a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c4104a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c176252ae"}}, nullopt); + Check("sortedmulti(1,6uWuTLr7s7iTXhh3semxLf3w4BxzpXbwzbrYzHENHCbeWiqiD9S,T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte)", "sortedmulti(1,04a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c1762,02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c)", SIGNABLE, {{"512102a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c4104a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c176252ae"}}, nullopt); Check("sh(multi(2,[00000000/111'/222]xprvA1RpRA33e1JQ7ifknakTFpgNXPmW2YvmhqLQYMmrj4xJXXWYpDPS3xz7iAxn8L39njGVyuoseXzU6rcxFLJ8HFsTjSyQbLYnMpCqE2VbFWc,xprv9uPDJpEQgRQfDcW7BkF7eTya6RPxXeJCqCJGHuCJ4GiRVLzkTXBAJMu2qaMWPrS7AANYqdq6vcBcBUdJCVVFceUvJFjaPdGZ2y9WACViL4L/0))", "sh(multi(2,[00000000/111'/222]xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL,xpub68NZiKmJWnxxS6aaHmn81bvJeTESw724CRDs6HbuccFQN9Ku14VQrADWgqbhhTHBaohPX4CjNLf9fq9MYo6oDaPPLPxSb7gwQN3ih19Zm4Y/0))", DEFAULT, {{"a91445a9a622a8b0a1269944be477640eedc447bbd8487"}}, OutputType::LEGACY, {{0x8000006FUL,222},{0}}); Check("sortedmulti(2,xprvA1RpRA33e1JQ7ifknakTFpgNXPmW2YvmhqLQYMmrj4xJXXWYpDPS3xz7iAxn8L39njGVyuoseXzU6rcxFLJ8HFsTjSyQbLYnMpCqE2VbFWc/*,xprv9uPDJpEQgRQfDcW7BkF7eTya6RPxXeJCqCJGHuCJ4GiRVLzkTXBAJMu2qaMWPrS7AANYqdq6vcBcBUdJCVVFceUvJFjaPdGZ2y9WACViL4L/0/0/*)", "sortedmulti(2,xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL/*,xpub68NZiKmJWnxxS6aaHmn81bvJeTESw724CRDs6HbuccFQN9Ku14VQrADWgqbhhTHBaohPX4CjNLf9fq9MYo6oDaPPLPxSb7gwQN3ih19Zm4Y/0/0/*)", RANGE, {{"5221025d5fc65ebb8d44a5274b53bac21ff8307fec2334a32df05553459f8b1f7fe1b62102fbd47cc8034098f0e6a94c6aeee8528abf0a2153a5d8e46d325b7284c046784652ae"}, {"52210264fd4d1f5dea8ded94c61e9641309349b62f27fbffe807291f664e286bfbe6472103f4ece6dfccfa37b211eb3d0af4d0c61dba9ef698622dc17eecdf764beeb005a652ae"}, {"5221022ccabda84c30bad578b13c89eb3b9544ce149787e5b538175b1d1ba259cbb83321024d902e1a2fc7a8755ab5b694c575fce742c48d9ff192e63df5193e4c7afe1f9c52ae"}}, nullopt, {{0}, {1}, {2}, {0, 0, 0}, {0, 0, 1}, {0, 0, 2}}); Check("wsh(multi(2,xprv9s21ZrQH143K31xYSDQpPDxsXRTUcvj2iNHm5NUtrGiGG5e2DtALGdso3pGz6ssrdK4PFmM8NSpSBHNqPqm55Qn3LqFtT2emdEXVYsCzC2U/2147483647'/0,xprv9vHkqa6EV4sPZHYqZznhT2NPtPCjKuDKGY38FBWLvgaDx45zo9WQRUT3dKYnjwih2yJD9mkrocEZXo1ex8G81dwSM1fwqWpWkeS3v86pgKt/1/2/*,xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi/10/20/30/40/*'))", "wsh(multi(2,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/2147483647'/0,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/1/2/*,xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8/10/20/30/40/*'))", HARDENED | RANGE | DERIVE_HARDENED, {{"0020b92623201f3bb7c3771d45b2ad1d0351ea8fbf8cfe0a0e570264e1075fa1948f"},{"002036a08bbe4923af41cf4316817c93b8d37e2f635dd25cfff06bd50df6ae7ea203"},{"0020a96e7ab4607ca6b261bfe3245ffda9c746b28d3f59e83d34820ec0e2b36c139c"}}, OutputType::BECH32, {{0xFFFFFFFFUL,0}, {1,2,0}, {1,2,1}, {1,2,2}, {10, 20, 30, 40, 0x80000000UL}, {10, 20, 30, 40, 0x80000001UL}, {10, 20, 30, 40, 0x80000002UL}}); - Check("sh(wsh(multi(16,KzoAz5CanayRKex3fSLQ2BwJpN7U52gZvxMyk78nDMHuqrUxuSJy,KwGNz6YCCQtYvFzMtrC6D3tKTKdBBboMrLTsjr2NYVBwapCkn7Mr,KxogYhiNfwxuswvXV66eFyKcCpm7dZ7TqHVqujHAVUjJxyivxQ9X,L2BUNduTSyZwZjwNHynQTF14mv2uz2NRq5n5sYWTb4FkkmqgEE9f,L1okJGHGn1kFjdXHKxXjwVVtmCMR2JA5QsbKCSpSb7ReQjezKeoD,KxDCNSST75HFPaW5QKpzHtAyaCQC7p9Vo3FYfi2u4dXD1vgMiboK,L5edQjFtnkcf5UWURn6UuuoFrabgDQUHdheKCziwN42aLwS3KizU,KzF8UWFcEC7BYTq8Go1xVimMkDmyNYVmXV5PV7RuDicvAocoPB8i,L3nHUboKG2w4VSJ5jYZ5CBM97oeK6YuKvfZxrefdShECcjEYKMWZ,KyjHo36dWkYhimKmVVmQTq3gERv3pnqA4xFCpvUgbGDJad7eS8WE,KwsfyHKRUTZPQtysN7M3tZ4GXTnuov5XRgjdF2XCG8faAPmFruRF,KzCUbGhN9LJhdeFfL9zQgTJMjqxdBKEekRGZX24hXdgCNCijkkap,KzgpMBwwsDLwkaC5UrmBgCYaBD2WgZ7PBoGYXR8KT7gCA9UTN5a3,KyBXTPy4T7YG4q9tcAM3LkvfRpD1ybHMvcJ2ehaWXaSqeGUxEdkP,KzJDe9iwJRPtKP2F2AoN6zBgzS7uiuAwhWCfGdNeYJ3PC1HNJ8M8,L1xbHrxynrqLKkoYc4qtoQPx6uy5qYXR5ZDYVYBSRmCV5piU3JG9)))","sh(wsh(multi(16,03669b8afcec803a0d323e9a17f3ea8e68e8abe5a278020a929adbec52421adbd0,0260b2003c386519fc9eadf2b5cf124dd8eea4c4e68d5e154050a9346ea98ce600,0362a74e399c39ed5593852a30147f2959b56bb827dfa3e60e464b02ccf87dc5e8,0261345b53de74a4d721ef877c255429961b7e43714171ac06168d7e08c542a8b8,02da72e8b46901a65d4374fe6315538d8f368557dda3a1dcf9ea903f3afe7314c8,0318c82dd0b53fd3a932d16e0ba9e278fcc937c582d5781be626ff16e201f72286,0297ccef1ef99f9d73dec9ad37476ddb232f1238aff877af19e72ba04493361009,02e502cfd5c3f972fe9a3e2a18827820638f96b6f347e54d63deb839011fd5765d,03e687710f0e3ebe81c1037074da939d409c0025f17eb86adb9427d28f0f7ae0e9,02c04d3a5274952acdbc76987f3184b346a483d43be40874624b29e3692c1df5af,02ed06e0f418b5b43a7ec01d1d7d27290fa15f75771cb69b642a51471c29c84acd,036d46073cbb9ffee90473f3da429abc8de7f8751199da44485682a989a4bebb24,02f5d1ff7c9029a80a4e36b9a5497027ef7f3e73384a4a94fbfe7c4e9164eec8bc,02e41deffd1b7cce11cde209a781adcffdabd1b91c0ba0375857a2bfd9302419f3,02d76625f7956a7fc505ab02556c23ee72d832f1bac391bcd2d3abce5710a13d06,0399eb0a5487515802dc14544cf10b3666623762fbed2ec38a3975716e2c29c232)))", SIGNABLE, {{"a9147fc63e13dc25e8a95a3cee3d9a714ac3afd96f1e87"}}, OutputType::P2SH_SEGWIT); + Check("sh(wsh(multi(16,TAf9F3b4zyzkypAZdxuANwTK7rQ1zZ1UANzLEoBmGpD62KFBya11,T6561bd1Rb3SmcPBAXuA1eBxjELeuJieSFtGAHCSxRkNcgQPm7z7,T6i9NKx85hkDcDJ5YMmZrhNreHaAcN56WrtzyHyxVsko1zbJRBdk,T3VcqHoFsbA6PAFtDS6P8LLWcmjWRduhEowHAMwaaVSCijzhQbQR,TBLPRzGYQ1xvN3rT7g9jvcmzQpXuRpFkRAaEQvVT1t7HqLwTFEB5,T8FCx3oLynpPkvMr1RKBJSEZCzkMudDrDCpGkFumK6S9MR5EzdPd,TAxZhPGg88xt3f7j9ZAppJvYQ8hek26Y3kijx7n13MCE9po6cK8s,TB2UddAb7JyPpXC6fathUhdchoSywt9C2uaEqMLaLr4dm3PQVVUi,T51c6PHXCYSA4kvLiDG6PWiRWKJFDwTMt1KRh4KhUyHUAT94ugYD,T6VnK1h7jrVmKiLuBwvh5mYzeP3PcgwTxxGTgpB96j1KeE6Qv4x2,T3qLuf78utL2TJMCgdhFCpqHozDN3zVMkS6e2FMyPPhbawG7KnWL,T6qqDEyaHaNbLRmeyQY9X4hyC4G3fMdxdyAG23XwiRRbyHpXkHDk,TA6EN8Lm7m7FDVcBxiaRBMkyd4wK4MNi4JWhWtktLAJVubRLC125,T6uo9ne56G3aDCYRk3DpTnZTph2QPKhEVKecSAEykHdDdz75akQ2,TBZ73tU5RYaVf6wyWLiXLhmF5Vcdzcy15KUnCXi8LjThaT3aPAod,T6iHVFsP9PHWMqkZNHjqGH5ZdySXBB6qtFVayy6dsnZkzYEPA1tZ)))","sh(wsh(multi(16,028efd34c41e28bb2cfea70611f81d05f10fc38f74f1293f290892f97cb5ebc2e2,02955a0848ac4f4d6a9335bae723652931959aff5c98352bd1c4fc7a1952f30820,035d767016855ea58a94ab5d1dd90f47396b647b31e31a130bada62e156c0a0602,02b34c46466f57a967850e4ab99b483990430011a4c618163cfbf1874a423fd91f,020bec74d47d3ff6de0dde6120bbe3f1df0d473ccf4f5b4d58b95d93a5f51d9ca0,036a2f831e3f57dfe5b1b096139e0d9d63cbfda585327658d9008969473a39e27e,028a06fe1b6521aa1dad38e0bfb5db526e9fbd5dcbd96629a05767116b763980de,03536e727875e0c63b993512d65941aeff9ec41aff2185c2623d959f03ff52a1a1,03e9027817347cb801baf6c94cdc884778f4a6c49de093bf9b9af057a62c29285f,025e0d8b108cd7cf32bbcb3f634823e713d39ccf55c88d9f2348e91e9e47e4b8ff,03ea735c72c0d0d398f23cd8e2ed9055b876a02cba8af809475c36ffc7159740ca,0289286273cb1da95c75b5ac64a39b293ec83e2c20b36b65318318885222cf4f42,026949f2ae270ac8795a232727daf4fb87808e280e4628ffa7c999425730ba2a23,02ff70b460fcc3c3ca88df3a408c5bd41a8114782699e543e8c5140be9366f5503,03fdd51fda82b2b2e5d5b4f8757810f071f1c6569b55ee18b73db168c22d6fa4e4,02a2d3cd71d0e342eabae548becd25256d508031c23a6fdfc39183c8b4dab9d611)))", SIGNABLE, {{"a914110bf0af71c7ab0f383d0fd89f13518a539c8aeb87"}}, OutputType::P2SH_SEGWIT); CheckUnparsable("sh(multi(16,KzoAz5CanayRKex3fSLQ2BwJpN7U52gZvxMyk78nDMHuqrUxuSJy,KwGNz6YCCQtYvFzMtrC6D3tKTKdBBboMrLTsjr2NYVBwapCkn7Mr,KxogYhiNfwxuswvXV66eFyKcCpm7dZ7TqHVqujHAVUjJxyivxQ9X,L2BUNduTSyZwZjwNHynQTF14mv2uz2NRq5n5sYWTb4FkkmqgEE9f,L1okJGHGn1kFjdXHKxXjwVVtmCMR2JA5QsbKCSpSb7ReQjezKeoD,KxDCNSST75HFPaW5QKpzHtAyaCQC7p9Vo3FYfi2u4dXD1vgMiboK,L5edQjFtnkcf5UWURn6UuuoFrabgDQUHdheKCziwN42aLwS3KizU,KzF8UWFcEC7BYTq8Go1xVimMkDmyNYVmXV5PV7RuDicvAocoPB8i,L3nHUboKG2w4VSJ5jYZ5CBM97oeK6YuKvfZxrefdShECcjEYKMWZ,KyjHo36dWkYhimKmVVmQTq3gERv3pnqA4xFCpvUgbGDJad7eS8WE,KwsfyHKRUTZPQtysN7M3tZ4GXTnuov5XRgjdF2XCG8faAPmFruRF,KzCUbGhN9LJhdeFfL9zQgTJMjqxdBKEekRGZX24hXdgCNCijkkap,KzgpMBwwsDLwkaC5UrmBgCYaBD2WgZ7PBoGYXR8KT7gCA9UTN5a3,KyBXTPy4T7YG4q9tcAM3LkvfRpD1ybHMvcJ2ehaWXaSqeGUxEdkP,KzJDe9iwJRPtKP2F2AoN6zBgzS7uiuAwhWCfGdNeYJ3PC1HNJ8M8,L1xbHrxynrqLKkoYc4qtoQPx6uy5qYXR5ZDYVYBSRmCV5piU3JG9))","sh(multi(16,03669b8afcec803a0d323e9a17f3ea8e68e8abe5a278020a929adbec52421adbd0,0260b2003c386519fc9eadf2b5cf124dd8eea4c4e68d5e154050a9346ea98ce600,0362a74e399c39ed5593852a30147f2959b56bb827dfa3e60e464b02ccf87dc5e8,0261345b53de74a4d721ef877c255429961b7e43714171ac06168d7e08c542a8b8,02da72e8b46901a65d4374fe6315538d8f368557dda3a1dcf9ea903f3afe7314c8,0318c82dd0b53fd3a932d16e0ba9e278fcc937c582d5781be626ff16e201f72286,0297ccef1ef99f9d73dec9ad37476ddb232f1238aff877af19e72ba04493361009,02e502cfd5c3f972fe9a3e2a18827820638f96b6f347e54d63deb839011fd5765d,03e687710f0e3ebe81c1037074da939d409c0025f17eb86adb9427d28f0f7ae0e9,02c04d3a5274952acdbc76987f3184b346a483d43be40874624b29e3692c1df5af,02ed06e0f418b5b43a7ec01d1d7d27290fa15f75771cb69b642a51471c29c84acd,036d46073cbb9ffee90473f3da429abc8de7f8751199da44485682a989a4bebb24,02f5d1ff7c9029a80a4e36b9a5497027ef7f3e73384a4a94fbfe7c4e9164eec8bc,02e41deffd1b7cce11cde209a781adcffdabd1b91c0ba0375857a2bfd9302419f3,02d76625f7956a7fc505ab02556c23ee72d832f1bac391bcd2d3abce5710a13d06,0399eb0a5487515802dc14544cf10b3666623762fbed2ec38a3975716e2c29c232))", "P2SH script is too large, 547 bytes is larger than 520 bytes"); // P2SH does not fit 16 compressed pubkeys in a redeemscript CheckUnparsable("wsh(multi(2,[aaaaaaaa][aaaaaaaa]xprv9s21ZrQH143K31xYSDQpPDxsXRTUcvj2iNHm5NUtrGiGG5e2DtALGdso3pGz6ssrdK4PFmM8NSpSBHNqPqm55Qn3LqFtT2emdEXVYsCzC2U/2147483647'/0,xprv9vHkqa6EV4sPZHYqZznhT2NPtPCjKuDKGY38FBWLvgaDx45zo9WQRUT3dKYnjwih2yJD9mkrocEZXo1ex8G81dwSM1fwqWpWkeS3v86pgKt/1/2/*,xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi/10/20/30/40/*'))", "wsh(multi(2,[aaaaaaaa][aaaaaaaa]xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/2147483647'/0,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/1/2/*,xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8/10/20/30/40/*'))", "Multiple ']' characters found for a single pubkey"); // Double key origin descriptor CheckUnparsable("wsh(multi(2,[aaaagaaa]xprv9s21ZrQH143K31xYSDQpPDxsXRTUcvj2iNHm5NUtrGiGG5e2DtALGdso3pGz6ssrdK4PFmM8NSpSBHNqPqm55Qn3LqFtT2emdEXVYsCzC2U/2147483647'/0,xprv9vHkqa6EV4sPZHYqZznhT2NPtPCjKuDKGY38FBWLvgaDx45zo9WQRUT3dKYnjwih2yJD9mkrocEZXo1ex8G81dwSM1fwqWpWkeS3v86pgKt/1/2/*,xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi/10/20/30/40/*'))", "wsh(multi(2,[aaagaaaa]xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/2147483647'/0,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/1/2/*,xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8/10/20/30/40/*'))", "Fingerprint 'aaagaaaa' is not hex"); // Non hex fingerprint CheckUnparsable("wsh(multi(2,[aaaaaaaa],xprv9vHkqa6EV4sPZHYqZznhT2NPtPCjKuDKGY38FBWLvgaDx45zo9WQRUT3dKYnjwih2yJD9mkrocEZXo1ex8G81dwSM1fwqWpWkeS3v86pgKt/1/2/*,xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi/10/20/30/40/*'))", "wsh(multi(2,[aaaaaaaa],xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/1/2/*,xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8/10/20/30/40/*'))", "No key provided"); // No public key with origin CheckUnparsable("wsh(multi(2,[aaaaaaa]xprv9s21ZrQH143K31xYSDQpPDxsXRTUcvj2iNHm5NUtrGiGG5e2DtALGdso3pGz6ssrdK4PFmM8NSpSBHNqPqm55Qn3LqFtT2emdEXVYsCzC2U/2147483647'/0,xprv9vHkqa6EV4sPZHYqZznhT2NPtPCjKuDKGY38FBWLvgaDx45zo9WQRUT3dKYnjwih2yJD9mkrocEZXo1ex8G81dwSM1fwqWpWkeS3v86pgKt/1/2/*,xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi/10/20/30/40/*'))", "wsh(multi(2,[aaaaaaa]xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/2147483647'/0,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/1/2/*,xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8/10/20/30/40/*'))", "Fingerprint is not 4 bytes (7 characters instead of 8 characters)"); // Too short fingerprint CheckUnparsable("wsh(multi(2,[aaaaaaaaa]xprv9s21ZrQH143K31xYSDQpPDxsXRTUcvj2iNHm5NUtrGiGG5e2DtALGdso3pGz6ssrdK4PFmM8NSpSBHNqPqm55Qn3LqFtT2emdEXVYsCzC2U/2147483647'/0,xprv9vHkqa6EV4sPZHYqZznhT2NPtPCjKuDKGY38FBWLvgaDx45zo9WQRUT3dKYnjwih2yJD9mkrocEZXo1ex8G81dwSM1fwqWpWkeS3v86pgKt/1/2/*,xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi/10/20/30/40/*'))", "wsh(multi(2,[aaaaaaaaa]xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/2147483647'/0,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/1/2/*,xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8/10/20/30/40/*'))", "Fingerprint is not 4 bytes (9 characters instead of 8 characters)"); // Too long fingerprint - CheckUnparsable("multi(a,T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte,5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss)", "multi(a,02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c,04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235)", "Multi threshold 'a' is not valid"); // Invalid threshold - CheckUnparsable("multi(0,T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte,5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss)", "multi(0,02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c,04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235)", "Multisig threshold cannot be 0, must be at least 1"); // Threshold of 0 - CheckUnparsable("multi(3,T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte,5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss)", "multi(3,02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c,04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235)", "Multisig threshold cannot be larger than the number of keys; threshold is 3 but only 2 keys specified"); // Threshold larger than number of keys + CheckUnparsable("multi(a,T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte,6uWuTLr7s7iTXhh3semxLf3w4BxzpXbwzbrYzHENHCbeWiqiD9S)", "multi(a,02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c,04a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c1762)", "Multi threshold 'a' is not valid"); // Invalid threshold + CheckUnparsable("multi(0,T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte,6uWuTLr7s7iTXhh3semxLf3w4BxzpXbwzbrYzHENHCbeWiqiD9S)", "multi(0,02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c,04a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c1762)", "Multisig threshold cannot be 0, must be at least 1"); // Threshold of 0 + CheckUnparsable("multi(3,T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte,6uWuTLr7s7iTXhh3semxLf3w4BxzpXbwzbrYzHENHCbeWiqiD9S)", "multi(3,02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c,04a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8cf2858b37e9ef7162964cfaf304f859350af59745166f1a9345916c7ba43c1762)", "Multisig threshold cannot be larger than the number of keys; threshold is 3 but only 2 keys specified"); // Threshold larger than number of keys CheckUnparsable("multi(3,KzoAz5CanayRKex3fSLQ2BwJpN7U52gZvxMyk78nDMHuqrUxuSJy,KwGNz6YCCQtYvFzMtrC6D3tKTKdBBboMrLTsjr2NYVBwapCkn7Mr,KxogYhiNfwxuswvXV66eFyKcCpm7dZ7TqHVqujHAVUjJxyivxQ9X,L2BUNduTSyZwZjwNHynQTF14mv2uz2NRq5n5sYWTb4FkkmqgEE9f)", "multi(3,03669b8afcec803a0d323e9a17f3ea8e68e8abe5a278020a929adbec52421adbd0,0260b2003c386519fc9eadf2b5cf124dd8eea4c4e68d5e154050a9346ea98ce600,0362a74e399c39ed5593852a30147f2959b56bb827dfa3e60e464b02ccf87dc5e8,0261345b53de74a4d721ef877c255429961b7e43714171ac06168d7e08c542a8b8)", "Cannot have 4 pubkeys in bare multisig; only at most 3 pubkeys"); // Threshold larger than number of keys CheckUnparsable("sh(multi(16,KzoAz5CanayRKex3fSLQ2BwJpN7U52gZvxMyk78nDMHuqrUxuSJy,KwGNz6YCCQtYvFzMtrC6D3tKTKdBBboMrLTsjr2NYVBwapCkn7Mr,KxogYhiNfwxuswvXV66eFyKcCpm7dZ7TqHVqujHAVUjJxyivxQ9X,L2BUNduTSyZwZjwNHynQTF14mv2uz2NRq5n5sYWTb4FkkmqgEE9f,L1okJGHGn1kFjdXHKxXjwVVtmCMR2JA5QsbKCSpSb7ReQjezKeoD,KxDCNSST75HFPaW5QKpzHtAyaCQC7p9Vo3FYfi2u4dXD1vgMiboK,L5edQjFtnkcf5UWURn6UuuoFrabgDQUHdheKCziwN42aLwS3KizU,KzF8UWFcEC7BYTq8Go1xVimMkDmyNYVmXV5PV7RuDicvAocoPB8i,L3nHUboKG2w4VSJ5jYZ5CBM97oeK6YuKvfZxrefdShECcjEYKMWZ,KyjHo36dWkYhimKmVVmQTq3gERv3pnqA4xFCpvUgbGDJad7eS8WE,KwsfyHKRUTZPQtysN7M3tZ4GXTnuov5XRgjdF2XCG8faAPmFruRF,KzCUbGhN9LJhdeFfL9zQgTJMjqxdBKEekRGZX24hXdgCNCijkkap,KzgpMBwwsDLwkaC5UrmBgCYaBD2WgZ7PBoGYXR8KT7gCA9UTN5a3,KyBXTPy4T7YG4q9tcAM3LkvfRpD1ybHMvcJ2ehaWXaSqeGUxEdkP,KzJDe9iwJRPtKP2F2AoN6zBgzS7uiuAwhWCfGdNeYJ3PC1HNJ8M8,L1xbHrxynrqLKkoYc4qtoQPx6uy5qYXR5ZDYVYBSRmCV5piU3JG9,T4nzXGboJCdz6WbmgZjRFkwwb5QACn5FjEqiBpdzvWBva3PMLwte))","sh(multi(16,03669b8afcec803a0d323e9a17f3ea8e68e8abe5a278020a929adbec52421adbd0,0260b2003c386519fc9eadf2b5cf124dd8eea4c4e68d5e154050a9346ea98ce600,0362a74e399c39ed5593852a30147f2959b56bb827dfa3e60e464b02ccf87dc5e8,0261345b53de74a4d721ef877c255429961b7e43714171ac06168d7e08c542a8b8,02da72e8b46901a65d4374fe6315538d8f368557dda3a1dcf9ea903f3afe7314c8,0318c82dd0b53fd3a932d16e0ba9e278fcc937c582d5781be626ff16e201f72286,0297ccef1ef99f9d73dec9ad37476ddb232f1238aff877af19e72ba04493361009,02e502cfd5c3f972fe9a3e2a18827820638f96b6f347e54d63deb839011fd5765d,03e687710f0e3ebe81c1037074da939d409c0025f17eb86adb9427d28f0f7ae0e9,02c04d3a5274952acdbc76987f3184b346a483d43be40874624b29e3692c1df5af,02ed06e0f418b5b43a7ec01d1d7d27290fa15f75771cb69b642a51471c29c84acd,036d46073cbb9ffee90473f3da429abc8de7f8751199da44485682a989a4bebb24,02f5d1ff7c9029a80a4e36b9a5497027ef7f3e73384a4a94fbfe7c4e9164eec8bc,02e41deffd1b7cce11cde209a781adcffdabd1b91c0ba0375857a2bfd9302419f3,02d76625f7956a7fc505ab02556c23ee72d832f1bac391bcd2d3abce5710a13d06,0399eb0a5487515802dc14544cf10b3666623762fbed2ec38a3975716e2c29c232,02a5e85e848c4107607d7b8522018d6dffa6b40aad853ae634f95cded666dd1d8c))", "Cannot have 17 keys in multisig; must have between 1 and 16 keys, inclusive"); // Cannot have more than 16 keys in a multisig