Skip to content

Commit

Permalink
fix: multisig support for indirect keystore interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
chadchapnick committed Aug 29, 2024
1 parent 3448d95 commit dd6ce2b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/caravan-psbt/src/psbtv0/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
};
};

Expand Down

0 comments on commit dd6ce2b

Please sign in to comment.