import { describe, it, expect } from "vitest"; import { verifyBTCSignature } from "../bitcoin"; import { type SignatureProof, ProofStatus, ProofTypes, } from "@notabene/javascript-sdk"; const bitcoinP2WPKHProof: SignatureProof = { type: ProofTypes.BIP137, wallet_provider: "Manual Wallet Signature", status: ProofStatus.PENDING, address: "bip122:000000000019d6689c085ae165831e93:3Q9jfjfbMDuatto7wZ6Tz2aKaDCRHqWWys", did: "did:pkh:bip122:000000000019d6689c085ae165831e93:3Q9jfjfbMDuatto7wZ6Tz2aKaDCRHqWWys", attestation: "I certify that the blockchain address 3Q9jfjfbMDuatto7wZ6Tz2aKaDCRHqWWys belongs to did:pkh:bip122:000000000019d6689c085ae165831e93:3Q9jfjfbMDuatto7wZ6Tz2aKaDCRHqWWys on Wed, 09 Jul 2025 20:17:12 GMT", proof: "HxPmbzvEnvgu0RYIPYl5bWySkFNXwOF/Jegq3NvzjFZ/Ik/koTdV9rh2A7osXefhzTlniUw8YbZNmCeXB9V9qC8=", }; const bitcoinP2shProof: SignatureProof = { type: ProofTypes.BIP137, wallet_provider: "Manual Wallet Signature", status: ProofStatus.PENDING, address: "bip122:000000000019d6689c085ae165831e93:1ANiqVALaKwadxA9nvmCUHpBhaopVniuVS", did: "did:pkh:bip122:000000000019d6689c085ae165831e93:1ANiqVALaKwadxA9nvmCUHpBhaopVniuVS", attestation: "I certify that the blockchain address 1ANiqVALaKwadxA9nvmCUHpBhaopVniuVS belongs to did:pkh:bip122:000000000019d6689c085ae165831e93:1ANiqVALaKwadxA9nvmCUHpBhaopVniuVS on Wed, 02 Jul 2025 16:01:44 GMT", proof: "IBo2Im6O5NyuXzBJ+coiTMqmUsqG9bv8NzM3+B5e+5XMB2Xp1n/sIsE/73Jy0EdSvcb334t49+3tdjE/X+sXjFw=", }; const bip322SegwitTestnetProof: SignatureProof = { type: ProofTypes.BIP137, address: "bip122:000000000019d6689c085ae165831e93:tb1q0apvgsh48f3rmw224na3ye5rrg37fd796cm0xf", did: "did:pkh:bip122:000000000019d6689c085ae165831e93:tb1q0apvgsh48f3rmw224na3ye5rrg37fd796cm0xf", attestation: "I certify that the blockchain address tb1q0apvgsh48f3rmw224na3ye5rrg37fd796cm0xf belongs to did:pkh:bip122:000000000019d6689c085ae165831e93:tb1q0apvgsh48f3rmw224na3ye5rrg37fd796cm0xf on Tue, 29 Apr 2025 15:33:26 GMT", proof: "AkcwRAIgXzKIOGjVp8qrqpUM+e/2BkbITsbGpjTFxgfHjk/Bt+sCIGueO3l6/cvfZYSggu2F4WKj1K97p32NivFwKdOHg9cgASEDtJ0tfDgrGYO4OSuYjyiehIoY1dEUkPo8XZQJ3Yqo//8=", status: ProofStatus.PENDING, wallet_provider: "Manual Wallet Signature", }; const bip322SegwitProof: SignatureProof = { did: "did:pkh:bip122:000000000019d6689c085ae165831e93:bc1qcxm70pg5yk9c8pupj93uys5azw5xpt6qeu2z0u", status: ProofStatus.PENDING, attestation: "I certify that bip122:000000000019d6689c085ae165831e93 account bc1qcxm70pg5yk9c8pupj93uys5azw5xpt6qeu2z0u belonged to did:key:z6Mket9c5r7VXswBGVrYX2t67hkh15D8CNpWJScX7ERKVWwD on Tue, 18 Feb 2025 18:29:27 GMT", address: "bip122:000000000019d6689c085ae165831e93:bc1qcxm70pg5yk9c8pupj93uys5azw5xpt6qeu2z0u", proof: "AkgwRQIhAIZlTevsH5hTsz8DOFT6hkNCNf+gBH8gjvRaI2x0T1YLAiAuzVHP+T05IO+URv/kJLjb0wDCiZwDA5DUiJPX4O7+aQEhAv9X2d9QIHF2C29QFUk5jWygaMbU3TAhzG+DfrgpI8EU", wallet_provider: "Phantom (Wallet Connect)", type: ProofTypes.BIP322, }; const segwitProof: SignatureProof = { type: ProofTypes.BIP137, address: "bip122:000000000019d6689c085ae165831e93:bc1qnf4kpa62dwhpwm0stsas5yv0skatt3v9s040p8", did: "did:pkh:bip122:000000000019d6689c085ae165831e93:bc1qnf4kpa62dwhpwm0stsas5yv0skatt3v9s040p8", attestation: "This is an example of a signed message.", proof: "J796FDv8f8w3syiaMSGoL6SAwPLRf6t13S+fYNjYA9EnJy3T0jZOY1eHBaGTBufOuW78FVFSwXKyUnrEjYOT9EU=", status: ProofStatus.PENDING, wallet_provider: "BitMask", }; const legacyProof: SignatureProof = { type: ProofTypes.BIP137, address: "bip122:000000000019d6689c085ae165831e93:1F5VhMHukdnUES9kfXqzPzMeF1GPHKiF64", did: "did:pkh:bip122:000000000019d6689c085ae165831e93:1F5VhMHukdnUES9kfXqzPzMeF1GPHKiF64", attestation: "This is an example of a signed message.", proof: "H796FDv8f8w3syiaMSGoL6SAwPLRf6t13S+fYNjYA9EnJy3T0jZOY1eHBaGTBufOuW78FVFSwXKyUnrEjYOT9EU=", status: ProofStatus.PENDING, wallet_provider: "BitMask", }; const uncompressedProof: SignatureProof = { type: ProofTypes.BIP137, address: "bip122:000000000019d6689c085ae165831e93:13W4xRkFbbeDnZA3T7G9MRxcznLwv3UVVQ", did: "did:pkh:bip122:000000000019d6689c085ae165831e93:13W4xRkFbbeDnZA3T7G9MRxcznLwv3UVVQ", attestation: "A message signed by an uncompressed legacy Bitcoin address", proof: "HNBf9Xd4eSTBeuq6WXISKM5NqazBW3O546Jq7AaHnGowVtt8I1Ndng4EVlgJl0CPrfeaUxU0QSu73jwzfyOVnWk=", status: ProofStatus.PENDING, wallet_provider: "BitMask", }; const dogeProof: SignatureProof = { type: ProofTypes.BIP137, address: "bip122:1a91e3dace36e2be3bf030a65679fe821:DUPSs55GNRZUUUKJu4zxTJU7oTd7MHRgY6", did: "did:pkh:bip122:1a91e3dace36e2be3bf030a65679fe821:DUPSs55GNRZUUUKJu4zxTJU7oTd7MHRgY6", attestation: "A message signed by dogecoin address", proof: "ILY5fRTcA4rss44H+JoHZ7Ab5N6rMGkEAU0Q/Co0zXdcGXDOQLQoy7Tdb1a2oJz1xzFGiyzO1+eDcIG7ebqxvBM=", status: ProofStatus.PENDING, wallet_provider: "Doge", }; const zcashProof: SignatureProof = { type: ProofTypes.BIP137, address: "bip122:000000000019d6689c085ae165831e93:t1NmCz1oRS3e84NrUHsbHPJnz8a6KgZvbHL", did: "did:pkh:bip122:000000000019d6689c085ae165831e93:t1NmCz1oRS3e84NrUHsbHPJnz8a6KgZvbHL", attestation: "I certify that the blockchain address t1NmCz1oRS3e84NrUHsbHPJnz8a6KgZvbHL belongs to did:pkh:bip122:000000000019d6689c085ae165831e93:t1NmCz1oRS3e84NrUHsbHPJnz8a6KgZvbHL on Mon, 30 Jun 2025 08:41:29 GMT", proof: "HzPW+q7EXixhtV/rBQ0sOtoXCDOml7C6P6rtIxLkBy3tenP978po7tuwj997DvJRiakL65Qw7xADK5hHs1Vu7es=", status: ProofStatus.PENDING, wallet_provider: "Manual Wallet Signature", }; describe("verifyBTCSignature", () => { it("handles bitcoin p2sh addresses", async () => { const result = await verifyBTCSignature(bitcoinP2shProof); expect(result).toEqual({ ...bitcoinP2shProof, status: ProofStatus.VERIFIED, }); }); it("handles bitcoin p2wpkh addresses", async () => { const result = await verifyBTCSignature(bitcoinP2WPKHProof); expect(result).toEqual({ ...bitcoinP2WPKHProof, status: ProofStatus.VERIFIED, }); }); it("handles bip322 segwit testnet addresses", async () => { const result = await verifyBTCSignature(bip322SegwitTestnetProof); expect(result).toEqual({ ...bip322SegwitTestnetProof, status: ProofStatus.VERIFIED, }); }); it("handles bip322 segwit addresses", async () => { const result = await verifyBTCSignature(bip322SegwitProof); expect(result).toEqual({ ...bip322SegwitProof, status: ProofStatus.VERIFIED, }); }); it("handles native segwit addresses", async () => { const result = await verifyBTCSignature(segwitProof); expect(result).toEqual({ ...segwitProof, status: ProofStatus.VERIFIED }); }); it("verifies legacy bitcoin address signature", async () => { const result = await verifyBTCSignature(legacyProof); expect(result).toEqual({ ...legacyProof, status: ProofStatus.VERIFIED }); }); it("verifies dogecoin address signature", async () => { const result = await verifyBTCSignature(dogeProof); expect(result).toEqual({ ...dogeProof, status: ProofStatus.VERIFIED }); }); it("verifies zcash address signature", async () => { const result = await verifyBTCSignature(zcashProof); expect(result).toEqual({ ...zcashProof, status: ProofStatus.VERIFIED }); }); it("fails for invalid bitcoin signature", async () => { const proof: SignatureProof = { ...legacyProof, proof: "invalitd" }; const result = await verifyBTCSignature(proof); expect(result).toEqual({ ...proof, status: ProofStatus.FAILED, }); }); it("returns failed proof for non-BIP122 address", async () => { const proof: SignatureProof = { ...legacyProof, address: "eip155:1:0x1234567890123456789012345678901234567890", }; const result = await verifyBTCSignature(proof); expect(result).toEqual({ ...proof, status: ProofStatus.FAILED }); }); it("verifies an uncompressed legacy bitcoin address signature", async () => { const result = await verifyBTCSignature(uncompressedProof); expect(result).toEqual({ ...uncompressedProof, status: ProofStatus.VERIFIED, }); }); it("handles litecoin addresses", async () => { const litecoinProof: SignatureProof = { type: ProofTypes.BIP137, address: "bip122:12a765e31ffd4059bada1e25190f6e98:ltc1qp3la5p5wf8wnfg7hc3nga8kq0xs6tk5fn6v3r3", did: "did:pkh:bip122:12a765e31ffd4059bada1e25190f6e98:ltc1qp3la5p5wf8wnfg7hc3nga8kq0xs6tk5fn6v3r3", attestation: "Message signed by Litecoin address", proof: "HzdyCcPqCIo7288qY/6jBWtnzzcEeO/R3KJtcf099gSVMHqAC7VwmO6pizjguYqwfcZ/M8E98h6UlG7VGjeIoh0=", status: ProofStatus.PENDING, wallet_provider: "LiteWallet", }; const result = await verifyBTCSignature(litecoinProof); expect(result).toEqual({ ...litecoinProof, status: ProofStatus.VERIFIED }); }); it("handles dash addresses", async () => { const dashProof: SignatureProof = { type: ProofTypes.BIP137, address: "bip122:9d4e2ba8a29995befa0e1e04b99c8331:XhUP4tkUy5gwVWxsWTXNMhK5ss7uDHWR2c", did: "did:pkh:bip122:9d4e2ba8a29995befa0e1e04b99c8331:XhUP4tkUy5gwVWxsWTXNMhK5ss7uDHWR2c", attestation: "Message signed by Dash address", proof: "HxlEomN4BV/Mg+Gxjzy37UxSwpZtFbb0qcfppoMFK+/NKWqH9X7WMnZAwz6Iti1032Oz0YeHZNk5NUV8rdtPbPc=", status: ProofStatus.PENDING, wallet_provider: "DashWallet", }; const result = await verifyBTCSignature(dashProof); expect(result).toEqual({ ...dashProof, status: ProofStatus.VERIFIED }); }); it("fails for invalid BIP322 signature", async () => { const invalidBip322Proof: SignatureProof = { ...bip322SegwitProof, proof: "InvalidSignatureFormat", }; const result = await verifyBTCSignature(invalidBip322Proof); expect(result).toEqual({ ...invalidBip322Proof, status: ProofStatus.FAILED, }); }); it("fails for invalid signature length", async () => { const invalidLengthProof: SignatureProof = { ...legacyProof, proof: "TooShortSig", }; const result = await verifyBTCSignature(invalidLengthProof); expect(result).toEqual({ ...invalidLengthProof, status: ProofStatus.FAILED, }); }); it("fails for invalid signature flag byte", async () => { const invalidFlagProof: SignatureProof = { ...legacyProof, proof: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", }; const result = await verifyBTCSignature(invalidFlagProof); expect(result).toEqual({ ...invalidFlagProof, status: ProofStatus.FAILED }); }); it("fails for unsupported proof type", async () => { const unsupportedProof: SignatureProof = { ...legacyProof, type: ProofTypes.SIWX, }; const result = await verifyBTCSignature(unsupportedProof); expect(result).toEqual({ ...unsupportedProof, status: ProofStatus.FAILED }); }); it("throws error for unsupported address format", async () => { const invalidAddressProof: SignatureProof = { ...legacyProof, address: "bip122:000000000019d6689c085ae165831e93:Y123456789", // Invalid prefix }; const result = await verifyBTCSignature(invalidAddressProof); expect(result).toEqual({ ...invalidAddressProof, status: ProofStatus.FAILED, }); }); it("handles P2WPKH segwit type without bech32 support", async () => { const p2wpkhProof: SignatureProof = { ...legacyProof, proof: "INjxKyXqYtsPWqP+zYvZUtADMLR8IC8jBMQ029hutdcoSkss3B1Iv79x5u6Zo6Fn168H8PuiySOtk8cDU4uZUBU=", address: "bip122:1a91e3dace36e2be3bf030a65679fe821:16qcANyseCYSnSZHJFMSbsD5Z1Qns8jbe4", }; const result = await verifyBTCSignature(p2wpkhProof); expect(result).toEqual({ ...p2wpkhProof, status: ProofStatus.VERIFIED }); }); it("handles bech32 encoding errors", async () => { const invalidBech32Proof: SignatureProof = { ...segwitProof, address: "bip122:000000000019d6689c085ae165831e93:bc1qcxm70pg5yk9c8pupj93uys5azw5xpt6qeu2z0u", proof: "H1234567890123456789012345678901234567890123456789012345678901234567890123456789012345=", }; const result = await verifyBTCSignature(invalidBech32Proof); expect(result).toEqual({ ...invalidBech32Proof, status: ProofStatus.FAILED, }); }); it("handles testnet addresses", async () => { const testnetProof: SignatureProof = { ...legacyProof, address: "bip122:000000000019d6689c085ae165831e93:17sKZt6r5jrTHMLB5AydhLSdkU4kf5UUPv", proof: "HLwgqPIywFd8Ukk/XJ1ANwwRXBIFCXVMB6HCwjVaKeCdBuzUS2wOupes+OKIt/t1Y+YMzNVo/rLRyEflDsiF2DY=", }; const result = await verifyBTCSignature(testnetProof); expect(result).toEqual({ ...testnetProof, status: ProofStatus.VERIFIED }); }); it("handles legacy multisig addresses", async () => { const multisigProof: SignatureProof = { ...legacyProof, address: "bip122:000000000019d6689c085ae165831e93:1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm", proof: "G9Em+RLOt1e7afThYiLZ2wd1e6jKfs4PR3BR6IgN2wzDIr65JQCekTXdQ/edzqLvRdpaypsQiHtfvZ1cAt1VR6k=", }; const result = await verifyBTCSignature(multisigProof); expect(result).toEqual({ ...multisigProof, status: ProofStatus.VERIFIED }); }); // it("handles litecoin M addresses", async () => { // const litecoinMProof: SignatureProof = { // ...legacyProof, // address: "bip122:12a765e31ffd4059bada1e25190f6e98:ltc1qp3la5p5wf8wnfg7hc3nga8kq0xs6tk5fn6v3r3", // proof: "H8twSn5iDrRY1LZ5C7kEdLAsQoS94LddA9ddmAaEZwI8U2WFZJnccnya2a79+rx5zIWHkZwLlu/HscXAc+XOQ+w=", // }; // const result = await verifyBTCSignature(litecoinMProof); // expect(result).toEqual({ ...litecoinMProof, status: ProofStatus.VERIFIED }); // }); it("handles non-standard signature recovery values", async () => { const nonStandardProof: SignatureProof = { ...legacyProof, proof: "H1234567890123456789012345678901234567890123456789012345678901234567890123456789012345=", }; const result = await verifyBTCSignature(nonStandardProof); expect(result).toEqual({ ...nonStandardProof, status: ProofStatus.FAILED }); }); // it("handles zcash addresses", async () => { // const zcashProof: SignatureProof = { // type: ProofTypes.BIP137, // address: "bip122:00000000000000000019d6689c085ae165831e93:520a61f0106fdaf9f0846a0ab5f5acb1734fc8c1", // did: "did:pkh:bip122:00000000000000000019d6689c085ae165831e93:520a61f0106fdaf9f0846a0ab5f5acb1734fc8c1", // attestation: "This is an example of a signed message.", // proof: "MEUCIQCuqL3ms6NwaZIEiP4uDjmqgGG3hhqIZUt7zGe9yxywbQIgbFjjTZmsMm5tq0PB4SKTt9xbI5U1V6O3sROe4OoiP44", // status: ProofStatus.PENDING, // wallet_provider: "Electron Cash ZEC" // }; // const result = await verifyBTCSignature(zcashProof); // expect(result).toEqual({ ...zcashProof, status: ProofStatus.VERIFIED }); // }); it("handles bitcoin cash addresses", async () => { const bchProof: SignatureProof = { type: ProofTypes.BIP137, address: "bip122:00000000000000000019d6689c085ae165831e93:qrxxxgvmsqa7qzhd6dsnne3udc7u34fg8g56pzx2hy", did: "did:pkh:bip122:00000000000000000019d6689c085ae165831e93:qrxxxgvmsqa7qzhd6dsnne3udc7u34fg8g56pzx2hy", attestation: "This is an example of a signed message.", proof: "H0qNIXAv3YA5+Y6I4p/lD03v8VEHZzTw+JAzfeoSKHydXhKsXgtPDaftjr3h3Bs8R2FqS9C6GOBvk+RISJK5lcU=", status: ProofStatus.PENDING, wallet_provider: "Electron Cash BCH", }; const result = await verifyBTCSignature(bchProof); expect(result).toEqual({ ...bchProof, status: ProofStatus.VERIFIED }); }); it("handles unknown address formats", async () => { const unknownProof: SignatureProof = { type: ProofTypes.BIP137, address: "bip122:000000000019d6689c085ae165831e93:x123456789", // Unknown prefix did: "did:pkh:bip122:000000000019d6689c085ae165831e93:x123456789", attestation: "Message signed by unknown address", proof: "H1234567890123456789012345678901234567890123456789012345678901234567890123456789012345=", status: ProofStatus.PENDING, wallet_provider: "Unknown", }; const result = await verifyBTCSignature(unknownProof); expect(result).toEqual({ ...unknownProof, status: ProofStatus.FAILED }); }); it("handles P2SH-P2WPKH segwit type", async () => { const p2shP2wpkhProof: SignatureProof = { ...legacyProof, proof: "G0/EqZbcoZgrrLO09k8cK7MzTjrw5mHM4EiXWLCDgnH4d+rvMc1X2rGTPbHCKn8GGRLi7JDiTJflX+pxxCwtebA=", address: "bip122:000000000019d6689c085ae165831e93:18vqVNQi9fobKZcJWCjZNoDzBxronENfZr", }; const result = await verifyBTCSignature(p2shP2wpkhProof); expect(result).toEqual({ ...p2shP2wpkhProof, status: ProofStatus.VERIFIED, }); }); it("handles sparrow wallet p2tr taproot addresses", async () => { const taprootProof: SignatureProof = { type: ProofTypes.BIP322, address: "bip122:000000000019d6689c085ae165831e93:bc1ppxwwc2hvpcfftkt08qf5rqdduw7j9dxskpugk438a7uvmqx7u5nqfdtacv", did: "did:pkh:bip122:000000000019d6689c085ae165831e93:bc1ppxwwc2hvpcfftkt08qf5rqdduw7j9dxskpugk438a7uvmqx7u5nqfdtacv", attestation: "example", proof: "AUFBIMYTvgwZX5oQLE8TmIdOITYB20CarEVU9JJJo1RTIh7RWyoYpMG2REkkqEz7zBLVK9nBu5JXM17/Boxdh8cWAQ==", status: ProofStatus.PENDING, wallet_provider: "TaprootWallet", }; const result = await verifyBTCSignature(taprootProof); expect(result.status).toBe(ProofStatus.VERIFIED); }); it("handles an unknown wallet p2tr taproot addresses", async () => { const taprootProof: SignatureProof = { type: ProofTypes.BIP322, address: "bip122:000000000019d6689c085ae165831e93:bc1p6rvvgjwj594jr4sr3e8gd0nhvkr63ujwdm6g2mv9fqx4lv60suwsa9ff6w", did: "did:pkh:bip122:000000000019d6689c085ae165831e93:bc1p6rvvgjwj594jr4sr3e8gd0nhvkr63ujwdm6g2mv9fqx4lv60suwsa9ff6w", attestation: "I certify that the blockchain address bc1p6rvvgjwj594jr4sr3e8gd0nhvkr63ujwdm6g2mv9fqx4lv60suwsa9ff6w belongs to did:pkh:bip122:000000000019d6689c085ae165831e93:bc1p6rvvgjwj594jr4sr3e8gd0nhvkr63ujwdm6g2mv9fqx4lv60suwsa9ff6w on Thu, 17 Jul 2025 16:08:33 GMT", proof: "AUFqBSD6l9VStmdpN3mcPRb6sb/LxuwonL4JNHQ3BH1DlOdhxbUVbyNFHpGoqFuhlZjjCWkjt6SpdGzIGgcW2mClAQ==", status: ProofStatus.PENDING, wallet_provider: "TaprootWallet", }; const result = await verifyBTCSignature(taprootProof); expect(result.status).toBe(ProofStatus.VERIFIED); }); it("fails for invalid taproot signature", async () => { const taprootProof: SignatureProof = { type: ProofTypes.BIP322, address: "bip122:000000000019d6689c085ae165831e93:bc1p6rvvgjwj594jr4sr3e8gd0nhvkr63ujwdm6g2mv9fqx4lv60suwsa9ff6w", did: "did:pkh:bip122:000000000019d6689c085ae165831e93:bc1p6rvvgjwj594jr4sr3e8gd0nhvkr63ujwdm6g2mv9fqx4lv60suwsa9ff6w", attestation: "I certify that the blockchain address bc1p6rvvgjwj594jr4sr3e8gd0nhvkr63ujwdm6g2mv9fqx4lv60suwsa9ff6w belongs to did:pkh:bip122:000000000019d6689c085ae165831e93:bc1p6rvvgjwj594jr4sr3e8gd0nhvkr63ujwdm6g2mv9fqx4lv60suwsa9ff6w on Thu, 17 Jul 2025 16:08:33 GMT", proof: "AUFBIMYTvgwZX5oQLE8TmIdOITYB20CarEVU9JJJo1RTIh7RWyoYpMG2REkkqEz7zBLVK9nBu5JXM17/Boxdh8cWAQ==", status: ProofStatus.PENDING, wallet_provider: "Sparrow Wallet", }; const result = await verifyBTCSignature(taprootProof); expect(result.status).toBe(ProofStatus.FAILED); }); it("it verifies sparrow wallet btc wallet proof", async () => { const sparrowWalletProof: SignatureProof = { type: ProofTypes.BIP137, status: ProofStatus.PENDING, did: "did:pkh:bip122:000000000019d6689c085ae165831e93:bc1p6rvvgjwj594jr4sr3e8gd0nhvkr63ujwdm6g2mv9fqx4lv60suwsa9ff6w", address: "bip122:000000000019d6689c085ae165831e93:bc1p6rvvgjwj594jr4sr3e8gd0nhvkr63ujwdm6g2mv9fqx4lv60suwsa9ff6w", proof: "AUHV/fUKDdHSdP90WwkLBRq0miuMOnfBtlLvG7HqC013vWfj+wWuDRD0bvg5LLHd/IQUqMtgyZZs96IX8E3EtauLAQ==", attestation: "I certify that the blockchain address bc1p6rvvgjwj594jr4sr3e8gd0nhvkr63ujwdm6g2mv9fqx4lv60suwsa9ff6w belongs to did:pkh:bip122:000000000019d6689c085ae165831e93:bc1p6rvvgjwj594jr4sr3e8gd0nhvkr63ujwdm6g2mv9fqx4lv60suwsa9ff6w on Thu, 11 Sep 2025 13:19:19 GMT", wallet_provider: "Manual Wallet Signature", }; const result = await verifyBTCSignature(sparrowWalletProof); expect(result.status).toBe(ProofStatus.VERIFIED); }); });