@@ -23,32 +23,36 @@ export function signAndVerifyPsbt(
2323 psbt : utxolib . bitgo . UtxoPsbt ,
2424 signerKeychain : bip32 . BIP32Interface | BIP32 ,
2525 rootWalletKeys : fixedScriptWallet . RootWalletKeys | undefined ,
26- replayProtection : ReplayProtectionKeys | undefined
26+ replayProtection : ReplayProtectionKeys | undefined ,
27+ options ?: { writeSignedWith ?: boolean }
2728) : utxolib . bitgo . UtxoPsbt ;
2829export function signAndVerifyPsbt (
2930 psbt : fixedScriptWallet . BitGoPsbt ,
3031 signerKeychain : bip32 . BIP32Interface | BIP32 ,
3132 rootWalletKeys : fixedScriptWallet . RootWalletKeys ,
32- replayProtection : ReplayProtectionKeys
33+ replayProtection : ReplayProtectionKeys ,
34+ options ?: { writeSignedWith ?: boolean }
3335) : fixedScriptWallet . BitGoPsbt ;
3436export function signAndVerifyPsbt (
3537 psbt : utxolib . bitgo . UtxoPsbt | fixedScriptWallet . BitGoPsbt ,
3638 signerKeychain : bip32 . BIP32Interface | BIP32 ,
3739 rootWalletKeys : fixedScriptWallet . RootWalletKeys ,
38- replayProtection : ReplayProtectionKeys
40+ replayProtection : ReplayProtectionKeys ,
41+ options ?: { writeSignedWith ?: boolean }
3942) : utxolib . bitgo . UtxoPsbt | fixedScriptWallet . BitGoPsbt ;
4043export function signAndVerifyPsbt (
4144 psbt : utxolib . bitgo . UtxoPsbt | fixedScriptWallet . BitGoPsbt ,
4245 signerKeychain : bip32 . BIP32Interface | BIP32 ,
4346 rootWalletKeys : fixedScriptWallet . RootWalletKeys | undefined ,
44- replayProtection : ReplayProtectionKeys | undefined
47+ replayProtection : ReplayProtectionKeys | undefined ,
48+ options : { writeSignedWith ?: boolean } = { }
4549) : utxolib . bitgo . UtxoPsbt | fixedScriptWallet . BitGoPsbt {
4650 if ( psbt instanceof bitgo . UtxoPsbt ) {
4751 return signAndVerifyPsbtUtxolib ( psbt , toUtxolibBIP32 ( signerKeychain ) ) ;
4852 }
4953 assert ( rootWalletKeys , 'rootWalletKeys required for wasm-utxo signing' ) ;
5054 assert ( replayProtection , 'replayProtection required for wasm-utxo signing' ) ;
51- return signAndVerifyPsbtWasm ( psbt , signerKeychain , rootWalletKeys , replayProtection ) ;
55+ return signAndVerifyPsbtWasm ( psbt , signerKeychain , rootWalletKeys , replayProtection , options ) ;
5256}
5357
5458export async function signTransaction <
@@ -69,6 +73,7 @@ export async function signTransaction<
6973 cosignerPub : string | undefined ;
7074 /** When true (default), extract finalized PSBT to legacy transaction format. When false, return finalized PSBT. */
7175 extractTransaction ?: boolean ;
76+ writeSignedWith ?: boolean ;
7277 }
7378) : Promise <
7479 utxolib . bitgo . UtxoPsbt | utxolib . bitgo . UtxoTransaction < bigint | number > | fixedScriptWallet . BitGoPsbt | Buffer
@@ -115,6 +120,7 @@ export async function signTransaction<
115120 } ,
116121 signingStep : params . signingStep ,
117122 walletId : params . walletId ,
123+ writeSignedWith : params . writeSignedWith ,
118124 }
119125 ) ;
120126 if ( isLastSignature ) {
0 commit comments