diff --git a/.changeset/thirty-dolls-type.md b/.changeset/thirty-dolls-type.md new file mode 100644 index 00000000..d5be85ff --- /dev/null +++ b/.changeset/thirty-dolls-type.md @@ -0,0 +1,5 @@ +--- +"@caravan/psbt": patch +--- + +Restore multisig support for indirect keystore interactions diff --git a/packages/caravan-psbt/src/psbtv0/utils.ts b/packages/caravan-psbt/src/psbtv0/utils.ts index c432197a..3988014a 100644 --- a/packages/caravan-psbt/src/psbtv0/utils.ts +++ b/packages/caravan-psbt/src/psbtv0/utils.ts @@ -93,6 +93,12 @@ export interface LegacyMultisig { path: string; pubkey: Buffer; }[]; + redeem?: { + output: Buffer; + }; + witness?: { + output: Buffer; + }; } // This may be incomplete as the fixture objects are extremely opaque. @@ -137,8 +143,8 @@ export const convertLegacyOutput = (output: LegacyOutput): PsbtOutput => { value: new BigNumber(output.amountSats).toNumber(), bip32Derivation: output.bip32Derivation || getBip32Derivation(output.multisig), - witnessScript: output.witnessScript, - redeemScript: output.redeemScript, + witnessScript: output.witnessScript || output.multisig?.witness?.output, + redeemScript: output.redeemScript || output.multisig?.redeem?.output, }; };