Signing a multisig transaction via phantom signPSBT() for bitcoin #284
-
Hello! I have a multisig rest api setup, and I want to send the api a signed version of a PSBT without needing the private key of the phantom wallet, but everytime I use the function provider.signPSBT(), it gives me an "Unexpected Error" The phantom popup appears, but all it does is give me this error, I'm wondering if it's possible to just sign a PSBT and not let it try and send the transaction, or do I have to use signMessage() in some way to sign my PSBT? Here is the code im using: const signedPSBTBytes = await provider.signPSBT(
fromHexString("70736274ff01005302000000014e9eea08962a72f4010bfd5492554024f094ee459111ebc5a1b9856ebd1053ab0000000000ffffffff01010000000000000017a9140bdeb6fd00d0ed5bbbb0574c694b21116b50c7e88700000000000100fd53010200000001142518051e93a80e1c31cab2d6230a42c2758b6afef08c2b589f5fdb2476759800000000fdfe0000483045022100d241090d87173d4ca369c4c49848338dcd78374b4a0560091b1c5eaef2f9cea80220151ad40ee33d5471e9e8d29e78d286b724267053c3635f1865d153fe7966f61d01483045022100b2d5d39c7446c15a87a5ec05ba63dad931a917f056ecf83d6ca3fed07defacb202203631dc55fda679197bcf16b48a94b563bf8e74b90a3bb2ec34ae5d05e266cfbe014c69522103d15ffbc5f655ad8ae632902296b032da1b751413e681ed3e96f3ed2b1eaaf3942102aadc8e0ded033e0f0e7ea7d0a6040a8fc14431cb0283a37a2590c1a80d7cca2721021ba070a29cece8582cbcf57874f383a1abfd19a10bbff9e281f0d3fb8c62801253aeffffffff01e80300000000000017a9140bdeb6fd00d0ed5bbbb0574c694b21116b50c7e88700000000010469522103d15ffbc5f655ad8ae632902296b032da1b751413e681ed3e96f3ed2b1eaaf3942102aadc8e0ded033e0f0e7ea7d0a6040a8fc14431cb0283a37a2590c1a80d7cca2721021ba070a29cece8582cbcf57874f383a1abfd19a10bbff9e281f0d3fb8c62801253ae0000"),
{
inputsToSign: [
{
address: "32mnA9cduXawz15EmqsHtrzZQKr4SW23N5",
signingIndexes: [0],
sigHash: 0,
},
],
},
); Let me know if you guys need any more information! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Anyone got any idea on how to fix this? I'd really appericiate some help/ideas would also be useful. |
Beta Was this translation helpful? Give feedback.
-
Solved by inputting my own publickey instead of the one in the transaction, I'm stupid, I apologise... |
Beta Was this translation helpful? Give feedback.
Solved by inputting my own publickey instead of the one in the transaction, I'm stupid, I apologise...