@bitgo-beta/utxo-lib
Advanced tools
Comparing version 4.0.1-alpha.17 to 4.0.1-alpha.18
@@ -33,2 +33,4 @@ /// <reference types="node" /> | ||
static fromBuffer(buffer: Buffer, opts: PsbtOpts): UtxoPsbt<UtxoTransaction<bigint>>; | ||
static fromHex(data: string, opts: PsbtOpts): UtxoPsbt<UtxoTransaction<bigint>>; | ||
toHex(): string; | ||
/** | ||
@@ -35,0 +37,0 @@ * @return true iff PSBT input is finalized |
@@ -34,2 +34,8 @@ "use strict"; | ||
} | ||
static fromHex(data, opts) { | ||
return UtxoPsbt.fromBuffer(Buffer.from(data, 'hex'), opts); | ||
} | ||
toHex() { | ||
return this.toBuffer().toString('hex'); | ||
} | ||
/** | ||
@@ -361,2 +367,2 @@ * @return true iff PSBT input is finalized | ||
exports.UtxoPsbt = UtxoPsbt; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVXR4b1BzYnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYml0Z28vVXR4b1BzYnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsbUNBQTBDO0FBRTFDLGdEQUFxRDtBQUNyRCwrREFBc0U7QUFFdEUsMEJBQTZHO0FBQzdHLHVEQUFvRDtBQUNwRCx1Q0FBZ0Q7QUFDaEQsb0RBQThDO0FBQzlDLDBEQUErQztBQUMvQyxtREFBbUQ7QUFDbkQsNkNBQThDO0FBOEI5QywyRUFBMkU7QUFDM0UsOEVBQThFO0FBQzlFLGlFQUFpRTtBQUNqRSxNQUFhLFFBQTZDLFNBQVEsUUFBSTtJQUMxRCxNQUFNLENBQUMscUJBQXFCLENBQUMsTUFBYyxFQUFFLE9BQWdCO1FBQ3JFLE9BQU8saUNBQWUsQ0FBQyxVQUFVLENBQVMsTUFBTSxFQUFFLEtBQUssRUFBRSxRQUFRLEVBQUUsT0FBTyxDQUFDLENBQUM7SUFDO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iBhIG5vbi13aXRuZXNzIFVUWE8gaXMgcHJvdmlkZWQsIGl0cyBoYXNoIG11c3QgbWF0Y2ggdGhlIGhhc2ggc3BlY2lmaWVkIGluIHRoZSBwcmV2b3V0XG4gICAgICAgIGlmICghcHJldm91dEhhc2guZXF1YWxzKHV0eG9IYXNoKSkge1xuICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgTm9uLXdpdG5lc3MgVVRYTyBoYXNoIGZvciBpbnB1dCAjJHtpfSBkb2Vzbid0IG1hdGNoIHRoZSBoYXNoIHNwZWNpZmllZCBpbiB0aGUgcHJldm91dGApO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcHJldm91dEluZGV4ID0gdHhJbnB1dHNbaV0uaW5kZXg7XG4gICAgICAgIHByZXZvdXQgPSBub25XaXRuZXNzVXR4b1R4Lm91dHNbcHJldm91dEluZGV4XTtcbiAgICAgIH0gZWxzZSBpZiAoaW5wdXQud2l0bmVzc1V0eG8pIHtcbiAgICAgICAgcHJldm91dCA9IGlucHV0LndpdG5lc3NVdHhvO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdOZWVkIGEgVXR4byBpbnB1dCBpdGVtIGZvciBzaWduaW5nJyk7XG4gICAgICB9XG4gICAgICBwcmV2b3V0U2NyaXB0cy5wdXNoKHByZXZvdXQuc2NyaXB0KTtcbiAgICAgIHByZXZvdXRWYWx1ZXMucHVzaChwcmV2b3V0LnZhbHVlKTtcbiAgICB9KTtcbiAgICBjb25zdCBoYXNoID0gdGhpcy50eC5oYXNoRm9yV2l0bmVzc1YxKGlucHV0SW5kZXgsIHByZXZvdXRTY3JpcHRzLCBwcmV2b3V0VmFsdWVzLCBzaWdoYXNoVHlwZSwgbGVhZkhhc2gpO1xuICAgIHJldHVybiB7IGhhc2gsIHNpZ2hhc2hUeXBlIH07XG4gIH1cbn1cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJm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 @@ /// <reference types="node" /> | ||
static fromBuffer(buffer: Buffer, opts: PsbtOpts): UtxoPsbt<UtxoTransaction<bigint>>; | ||
static fromHex(data: string, opts: PsbtOpts): UtxoPsbt<UtxoTransaction<bigint>>; | ||
/** | ||
@@ -21,0 +22,0 @@ * If it is a version 4 transaction, add the consensus branch id to |
@@ -54,2 +54,5 @@ "use strict"; | ||
psbt.data.globalMap.unknownKeyVals = psbt.data.globalMap.unknownKeyVals.filter(({ key }) => key !== CONSENSUS_BRANCH_ID_KEY); | ||
// Delete consensusBranchId from globalMap so that if we were to serialize the psbt again | ||
// we would not add a duplicate key into the global map | ||
psbt.data.globalMap.unknownKeyVals.pop(); | ||
return psbt; | ||
@@ -66,2 +69,5 @@ case 5: | ||
} | ||
static fromHex(data, opts) { | ||
return ZcashPsbt.fromBuffer(Buffer.from(data, 'hex'), opts); | ||
} | ||
/** | ||
@@ -131,2 +137,2 @@ * If it is a version 4 transaction, add the consensus branch id to | ||
exports.ZcashPsbt = ZcashPsbt; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiWmNhc2hQc2J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2JpdGdvL3pjYXNoL1pjYXNoUHNidC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwwQ0FBaUQ7QUFDakQseURBSTRCO0FBQzVCLDhCQUFrRDtBQUNsRCxtQ0FBMEM7QUFDMUMsaURBQWlEO0FBRWpELE1BQU0sU0FBUyxHQUFHLE9BQU8sQ0FBQyxXQUFXLENBQUMsQ0FBQztBQUV2QyxJQUFLLE9BRUo7QUFGRCxXQUFLLE9BQU87SUFDViwyRUFBOEIsQ0FBQTtBQUNoQyxDQUFDLEVBRkksT0FBTyxLQUFQLE9BQU8sUUFFWDtBQUNELE1BQU0sdUJBQXVCLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQ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h0KGV4cGlyeUhlaWdodDogbnVtYmVyKTogdm9pZCB7XG4gICAgdHlwZWZvcmNlKHR5cGVzLlVJbnQzMiwgZXhwaXJ5SGVpZ2h0KTtcbiAgICB0aGlzLnNldFByb3BlcnR5Q2hlY2tTaWduYXR1cmVzKCdleHBpcnlIZWlnaHQnLCBleHBpcnlIZWlnaHQpO1xuICB9XG59XG4iXX0= |
{ | ||
"name": "@bitgo-beta/utxo-lib", | ||
"version": "4.0.1-alpha.17", | ||
"version": "4.0.1-alpha.18", | ||
"description": "Client-side Bitcoin JavaScript library", | ||
@@ -49,3 +49,3 @@ "main": "./dist/src/index.js", | ||
"dependencies": { | ||
"@bitgo-beta/blake2b": "3.2.1-alpha.17", | ||
"@bitgo-beta/blake2b": "3.2.1-alpha.18", | ||
"@noble/secp256k1": "1.6.3", | ||
@@ -55,3 +55,3 @@ "bip174": "npm:@bitgo/bip174@3.0.0", | ||
"bitcoin-ops": "^1.3.0", | ||
"bitcoinjs-lib": "npm:@bitgo/bitcoinjs-lib@7.0.0-rc.5", | ||
"bitcoinjs-lib": "npm:@bitgo-forks/bitcoinjs-lib@7.0.0-rc.7", | ||
"bn.js": "^5.2.1", | ||
@@ -86,3 +86,3 @@ "bs58check": "^2.1.2", | ||
"license": "MIT", | ||
"gitHead": "53dedc9ba914067da22fc62f2928281a1fced3b7" | ||
"gitHead": "c23bdc490ff56808d70ae95906e73d5df3cc8fdc" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
986768
7774
+ Added@bitgo-beta/blake2b@3.2.1-alpha.18(transitive)
+ Added@bitgo-beta/blake2b-wasm@3.2.1-alpha.18(transitive)
+ Added@bitgo-forks/bitcoinjs-lib@7.0.0-rc.7(transitive)
+ Addedjson5@2.2.3(transitive)
- Removed@bitgo-beta/blake2b@3.2.1-alpha.17(transitive)
- Removed@bitgo-beta/blake2b-wasm@3.2.1-alpha.17(transitive)
- Removed@bitgo/bitcoinjs-lib@7.0.0-rc.5(transitive)
Updatedbitcoinjs-lib@npm:@bitgo-forks/bitcoinjs-lib@7.0.0-rc.7