utxo-lib 1.1.2 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +16 -19
- package/dist/src/bitgo/PsbtUtil.d.ts +0 -5
- package/dist/src/bitgo/PsbtUtil.d.ts.map +1 -1
- package/dist/src/bitgo/PsbtUtil.js +2 -15
- package/dist/src/bitgo/UtxoPsbt.d.ts +0 -9
- package/dist/src/bitgo/UtxoPsbt.d.ts.map +1 -1
- package/dist/src/bitgo/UtxoPsbt.js +12 -42
- package/dist/src/bitgo/index.d.ts +0 -1
- package/dist/src/bitgo/index.d.ts.map +1 -1
- package/dist/src/bitgo/index.js +2 -3
- package/dist/src/bitgo/parseInput.js +2 -2
- package/dist/src/bitgo/wallet/Psbt.d.ts +0 -14
- package/dist/src/bitgo/wallet/Psbt.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/Psbt.js +3 -71
- package/dist/src/bitgo/wallet/WalletOutput.d.ts +1 -17
- package/dist/src/bitgo/wallet/WalletOutput.d.ts.map +1 -1
- package/dist/src/bitgo/wallet/WalletOutput.js +23 -64
- package/dist/src/bitgo/wallet/chains.d.ts +1 -1
- package/dist/src/bitgo/zcash/ZcashPsbt.d.ts +1 -0
- package/dist/src/bitgo/zcash/ZcashPsbt.d.ts.map +1 -1
- package/dist/src/bitgo/zcash/ZcashPsbt.js +12 -3
- package/dist/src/testutil/keys.d.ts +0 -3
- package/dist/src/testutil/keys.d.ts.map +1 -1
- package/dist/src/testutil/keys.js +2 -17
- package/dist/src/testutil/psbt.d.ts +5 -23
- package/dist/src/testutil/psbt.d.ts.map +1 -1
- package/dist/src/testutil/psbt.js +13 -16
- package/dist/src/testutil/transaction.d.ts +5 -14
- package/dist/src/testutil/transaction.d.ts.map +1 -1
- package/dist/src/testutil/transaction.js +9 -9
- package/package.json +5 -5
- package/dist/src/base_crypto.d.ts +0 -14
- package/dist/src/base_crypto.d.ts.map +0 -1
- package/dist/src/base_crypto.js +0 -215
- package/dist/src/bitgo/legacysafe/index.d.ts +0 -15
- package/dist/src/bitgo/legacysafe/index.d.ts.map +0 -1
- package/dist/src/bitgo/legacysafe/index.js +0 -61
- package/dist/src/musig.d.ts +0 -390
- package/dist/src/musig.d.ts.map +0 -1
- package/dist/src/musig.js +0 -447
package/README.md
CHANGED
@@ -3,13 +3,12 @@
|
|
3
3
|
This library is a wrapper around [bitcoinjs-lib](https://github.com/bitcoinjs/bitcoinjs-lib) adding altcoin support.
|
4
4
|
|
5
5
|
## Features
|
6
|
-
|
7
6
|
- Multicoin support: Configurable behaviour based on [network](https://github.com/BitGo/bitgo-utxo-lib/blob/master/src/networks.js) objects.
|
8
7
|
- Backed by [BitGo](https://www.bitgo.com/info/)
|
9
8
|
|
10
9
|
## Installation
|
11
10
|
|
12
|
-
```bash
|
11
|
+
``` bash
|
13
12
|
# using npm
|
14
13
|
npm install @bitgo/utxo-lib
|
15
14
|
|
@@ -20,22 +19,20 @@ yarn add @bitgo/utxo-lib
|
|
20
19
|
## Setup
|
21
20
|
|
22
21
|
JavaScript (ESM)
|
23
|
-
|
24
|
-
|
25
|
-
import * as utxolib from '@bitgo/utxo-lib';
|
22
|
+
``` javascript
|
23
|
+
import * as utxolib from '@bitgo/utxo-lib'
|
26
24
|
```
|
27
25
|
|
28
26
|
NodeJS (CJS)
|
29
|
-
|
30
|
-
|
31
|
-
const utxolib = require('@bitgo/utxo-lib');
|
27
|
+
``` javascript
|
28
|
+
const utxolib = require('@bitgo/utxo-lib')
|
32
29
|
```
|
33
30
|
|
34
31
|
## Usage
|
35
32
|
|
36
33
|
Support for parsing and building altcoin transactions is provided by the following methods
|
37
34
|
|
38
|
-
```typescript
|
35
|
+
``` typescript
|
39
36
|
utxolib.bitgo.createTransactionFromBuffer(buffer, network): UtxoTransaction
|
40
37
|
// (similarly `createTransactionFromHex(string, network)`)
|
41
38
|
|
@@ -48,15 +45,15 @@ The `UtxoTransaction(Builder)` classes have the same interface as the `Transacti
|
|
48
45
|
|
49
46
|
## Supported coins
|
50
47
|
|
51
|
-
|
|
52
|
-
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
48
|
+
|Network|Mainnet|Testnet|
|
49
|
+
|---|---|---|
|
50
|
+
|Bitcoin|`utxolib.networks.bitcoin`|`utxolib.networks.testnet`|
|
51
|
+
|Bitcoin Cash|`utxolib.networks.bitcoincash`|`utxolib.networks.bitcoincashTestnet`|
|
52
|
+
|Bitcoin Gold|`utxolib.networks.bitcoingold`|`utxolib.networks.bitcoingoldTestnet`|
|
53
|
+
|Bitcoin SV (Satoshi Vision)|`utxolib.networks.bitcoinsv`|`utxolib.networks.bitcoinsvTestnet`|
|
54
|
+
|Dash|`utxolib.networks.dash`|`utxolib.networks.dash`|
|
55
|
+
|eCash|`utxolib.networks.ecash`|`utxolib.networks.ecashTestnet`|
|
56
|
+
|Litecoin|`utxolib.networks.litecoin`|`utxolib.networks.litecoinTest`|
|
57
|
+
|Zcash|`utxolib.networks.zcash`|`utxolib.networks.zcashTest`|
|
61
58
|
|
62
59
|
> [Bitcoin SV](https://blog.bitgo.com/bsv-deprecation-6b3fff4df34c) no longer supports sending funds to BitGo wallets. Existing customers with Bitcoin SV in BitGo wallets will still be able to access and sweep funds to an external Bitcoin SV wallet.
|
@@ -1,7 +1,6 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { ProprietaryKey } from 'bip174/src/lib/proprietaryKeyVal';
|
3
3
|
import { PsbtInput } from 'bip174/src/lib/interfaces';
|
4
|
-
import { Psbt } from 'bitcoinjs-lib/src/psbt';
|
5
4
|
/**
|
6
5
|
* bitgo proprietary key identifier
|
7
6
|
*/
|
@@ -52,8 +51,4 @@ export declare function isPsbtInputFinalized(input: PsbtInput): boolean;
|
|
52
51
|
* @param data byte array or hex string
|
53
52
|
* */
|
54
53
|
export declare function isPsbt(data: Buffer | string): boolean;
|
55
|
-
/**
|
56
|
-
* This function allows signing or validating a psbt with non-segwit inputs those do not contain nonWitnessUtxo.
|
57
|
-
*/
|
58
|
-
export declare function withUnsafeNonSegwit<T>(psbt: Psbt, fn: () => T, unsafe?: boolean): T;
|
59
54
|
//# sourceMappingURL=PsbtUtil.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PsbtUtil.d.ts","sourceRoot":"","sources":["../../../src/bitgo/PsbtUtil.ts"],"names":[],"mappings":";AAAA,OAAO,EAAwB,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;
|
1
|
+
{"version":3,"file":"PsbtUtil.d.ts","sourceRoot":"","sources":["../../../src/bitgo/PsbtUtil.ts"],"names":[],"mappings":";AAAA,OAAO,EAAwB,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,2BAA2B,UAAU,CAAC;AAEnD;;GAEG;AACH,oBAAY,qBAAqB;IAC/B,uBAAuB,IAAO;IAC9B,2BAA2B,IAAO;IAClC,gBAAgB,IAAO;IACvB,kBAAkB,IAAO;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,cAAc,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,cAAc,CAAC;CACrC;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,SAAS,EAChB,SAAS,CAAC,EAAE,oBAAoB,GAC/B,mBAAmB,EAAE,CAmBvB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAYnE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAE9D;AAED;;;KAGK;AACL,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAUrD"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.isPsbt = exports.isPsbtInputFinalized = exports.getPsbtInputSignatureCount = exports.getPsbtInputProprietaryKeyVals = exports.ProprietaryKeySubtype = exports.PSBT_PROPRIETARY_IDENTIFIER = void 0;
|
4
4
|
const proprietaryKeyVal_1 = require("bip174/src/lib/proprietaryKeyVal");
|
5
5
|
/**
|
6
6
|
* bitgo proprietary key identifier
|
@@ -76,17 +76,4 @@ function isPsbt(data) {
|
|
76
76
|
return 5 <= data.length && data.readUInt32BE(0) === 0x70736274 && data.readUInt8(4) === 0xff;
|
77
77
|
}
|
78
78
|
exports.isPsbt = isPsbt;
|
79
|
-
|
80
|
-
* This function allows signing or validating a psbt with non-segwit inputs those do not contain nonWitnessUtxo.
|
81
|
-
*/
|
82
|
-
function withUnsafeNonSegwit(psbt, fn, unsafe = true) {
|
83
|
-
psbt.__CACHE.__UNSAFE_SIGN_NONSEGWIT = unsafe;
|
84
|
-
try {
|
85
|
-
return fn();
|
86
|
-
}
|
87
|
-
finally {
|
88
|
-
psbt.__CACHE.__UNSAFE_SIGN_NONSEGWIT = false;
|
89
|
-
}
|
90
|
-
}
|
91
|
-
exports.withUnsafeNonSegwit = withUnsafeNonSegwit;
|
92
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHNidFV0aWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYml0Z28vUHNidFV0aWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsd0VBQXdGO0FBSXhGOztHQUVHO0FBQ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Jykge1xuICAgIGlmIChkYXRhLmxlbmd0aCA8IDEwKSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICAgIGRhdGEgPSBCdWZmZXIuZnJvbShkYXRhLnNsaWNlKDAsIDEwKSwgJ2hleCcpO1xuICB9XG4gIHJldHVybiA1IDw9IGRhdGEubGVuZ3RoICYmIGRhdGEucmVhZFVJbnQzMkJFKDApID09PSAweDcwNzM2Mjc0ICYmIGRhdGEucmVhZFVJbnQ4KDQpID09PSAweGZmO1xufVxuIl19
|
@@ -77,14 +77,6 @@ export declare class UtxoPsbt<Tx extends UtxoTransaction<bigint> = UtxoTransacti
|
|
77
77
|
static deriveKeyPairForInput(bip32: BIP32Interface, input: PsbtInput): Buffer | undefined;
|
78
78
|
get network(): Network;
|
79
79
|
toHex(): string;
|
80
|
-
/**
|
81
|
-
* It is expensive to attempt to compute every output address using psbt.txOutputs[outputIndex]
|
82
|
-
* to then just get the script. Here, we are doing the same thing as what txOutputs() does in
|
83
|
-
* bitcoinjs-lib, but without iterating over each output.
|
84
|
-
* @param outputIndex
|
85
|
-
* @returns output script at the given index
|
86
|
-
*/
|
87
|
-
getOutputScript(outputIndex: number): Buffer;
|
88
80
|
getNonWitnessPreviousTxids(): string[];
|
89
81
|
addNonWitnessUtxos(txBufs: Record<string, Buffer>): this;
|
90
82
|
static fromTransaction(transaction: UtxoTransaction<bigint>, prevOutputs: TxOutput<bigint>[]): UtxoPsbt;
|
@@ -106,7 +98,6 @@ export declare class UtxoPsbt<Tx extends UtxoTransaction<bigint> = UtxoTransacti
|
|
106
98
|
* @returns true if the input at inputIndex is a taproot
|
107
99
|
*/
|
108
100
|
isTaprootInput(inputIndex: number): boolean;
|
109
|
-
private isMultisigTaprootScript;
|
110
101
|
/**
|
111
102
|
* Mostly copied from bitcoinjs-lib/ts_src/psbt.ts
|
112
103
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UtxoPsbt.d.ts","sourceRoot":"","sources":["../../../src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