Skip to content

Commit 952a755

Browse files
committed
Add sigHash support
1 parent 1b69926 commit 952a755

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/sado-connect/src/lib/signPsbt.ts

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export interface SignPsbtOptionsParams {
66
finalize?: boolean;
77
extractTx?: boolean;
88
signingIndexes?: number[];
9+
sigHash?: number;
910
}
1011

1112
interface SignPsbtParams {
@@ -45,6 +46,7 @@ export default async function signPsbt({
4546
});
4647
return signedUnisatPsbt;
4748
}
49+
4850
if (wallet === Wallet.XVERSE) {
4951
const getAllInputIndices = () =>
5052
psbt.data.inputs.map((value, index) => index);
@@ -55,6 +57,7 @@ export default async function signPsbt({
5557
{
5658
address,
5759
signingIndexes: options?.signingIndexes ?? getAllInputIndices(), // If signingIndexes is not provided, just sign everything
60+
sigHash: options?.sigHash,
5861
},
5962
],
6063
finalize,

0 commit comments

Comments
 (0)