@bitgo-beta/utxo-lib
Advanced tools
Comparing version 2.4.2-beta.110 to 2.4.2-beta.111
@@ -0,1 +1,2 @@ | ||
/// <reference types="node" /> | ||
import { Network } from '../..'; | ||
@@ -36,3 +37,4 @@ import { UtxoTransactionBuilder } from '../UtxoTransactionBuilder'; | ||
} | ||
export declare function addReplayProtectionUnspentToPsbt(psbt: UtxoPsbt<UtxoTransaction<bigint>>, u: Unspent<bigint>, redeemScript: Buffer, network: Network): void; | ||
export declare function addWalletUnspentToPsbt(psbt: UtxoPsbt<UtxoTransaction<bigint>>, u: WalletUnspent<bigint>, rootWalletKeys: RootWalletKeys, signer: KeyName, cosigner: KeyName, network: Network): void; | ||
//# sourceMappingURL=Unspent.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addWalletUnspentToPsbt = exports.verifySignatureWithUnspent = exports.signInputWithUnspent = exports.isWalletUnspent = void 0; | ||
exports.addWalletUnspentToPsbt = exports.addReplayProtectionUnspentToPsbt = exports.verifySignatureWithUnspent = exports.signInputWithUnspent = exports.isWalletUnspent = void 0; | ||
const outputScripts_1 = require("../outputScripts"); | ||
@@ -42,2 +42,15 @@ const address_1 = require("../../address"); | ||
exports.verifySignatureWithUnspent = verifySignatureWithUnspent; | ||
function addReplayProtectionUnspentToPsbt(psbt, u, redeemScript, network) { | ||
const { txid, vout } = Unspent_1.toPrevOutput(u, network); | ||
if (!Unspent_1.isUnspentWithPrevTx(u)) { | ||
throw new Error('Error, require previous tx to add to PSBT'); | ||
} | ||
psbt.addInput({ | ||
hash: txid, | ||
index: vout, | ||
nonWitnessUtxo: u.prevTx, | ||
redeemScript, | ||
}); | ||
} | ||
exports.addReplayProtectionUnspentToPsbt = addReplayProtectionUnspentToPsbt; | ||
function addWalletUnspentToPsbt(psbt, u, rootWalletKeys, signer, cosigner, network) { | ||
@@ -95,2 +108,2 @@ const { txid, vout, script, value } = Unspent_1.toPrevOutput(u, network); | ||
exports.addWalletUnspentToPsbt = addW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xo-lib", | ||
"version": "2.4.2-beta.110", | ||
"version": "2.4.2-beta.111", | ||
"description": "Client-side Bitcoin JavaScript library", | ||
@@ -49,3 +49,3 @@ "main": "./dist/src/index.js", | ||
"dependencies": { | ||
"@bitgo-beta/blake2b": "3.0.4-beta.110", | ||
"@bitgo-beta/blake2b": "3.0.4-beta.111", | ||
"@noble/secp256k1": "1.6.3", | ||
@@ -85,3 +85,3 @@ "bip174": "npm:@bitgo/bip174@3.0.0", | ||
"license": "MIT", | ||
"gitHead": "7b0b079859e27b263bb4eb2e1ab6ec8ad3d486a1" | ||
"gitHead": "31c46c674b4b15f636fd56b3150d1c64fb6a512e" | ||
} |
Sorry, the diff of this file is not supported yet
984418
7759
+ Added@bitgo-beta/blake2b@3.0.4-beta.111(transitive)
+ Added@bitgo-beta/blake2b-wasm@3.0.4-beta.111(transitive)
- Removed@bitgo-beta/blake2b@3.0.4-beta.110(transitive)
- Removed@bitgo-beta/blake2b-wasm@3.0.4-beta.110(transitive)