@bitgo/abstract-utxo 1.3.0-dev.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +126 -0
- package/dist/src/abstractUtxoCoin.d.ts +31 -38
- package/dist/src/abstractUtxoCoin.d.ts.map +1 -1
- package/dist/src/abstractUtxoCoin.js +33 -29
- package/dist/src/config.d.ts +1 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +6 -5
- package/dist/src/recovery/RecoveryProvider.d.ts +1 -0
- package/dist/src/recovery/RecoveryProvider.d.ts.map +1 -1
- package/dist/src/recovery/RecoveryProvider.js +2 -1
- package/dist/src/recovery/backupKeyRecovery.d.ts +9 -9
- package/dist/src/recovery/backupKeyRecovery.d.ts.map +1 -1
- package/dist/src/recovery/backupKeyRecovery.js +36 -19
- package/dist/src/recovery/crossChainRecovery.d.ts +9 -8
- package/dist/src/recovery/crossChainRecovery.d.ts.map +1 -1
- package/dist/src/recovery/crossChainRecovery.js +40 -22
- package/dist/src/recovery/smartbitApi.d.ts +1 -1
- package/dist/src/recovery/smartbitApi.d.ts.map +1 -1
- package/dist/src/recovery/smartbitApi.js +1 -1
- package/dist/src/replayProtection.d.ts +1 -4
- package/dist/src/replayProtection.d.ts.map +1 -1
- package/dist/src/replayProtection.js +1 -1
- package/dist/src/sign.d.ts +9 -9
- package/dist/src/sign.d.ts.map +1 -1
- package/dist/src/sign.js +1 -1
- package/dist/tsconfig.tsbuildinfo +3513 -2700
- package/package.json +10 -9
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
# [1.4.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.1.0-rc.6...@bitgo/abstract-utxo@1.4.0) (2022-10-18)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **core:** fix bip32/ecpair, API vs Interface ([bec9c1e](https://github.com/BitGo/BitGoJS/commit/bec9c1e6ff0c23108dc27e171abdd3e4d2cfdfb1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **abstract-utxo:** add support for bigints from new utxo-lib ([77c60dd](https://github.com/BitGo/BitGoJS/commit/77c60ddd4d0ddd1e82a8b1bb041686a9c7f39fae))
|
|
17
|
+
* **abstract-utxo:** backup key recovery service for doge ([612be53](https://github.com/BitGo/BitGoJS/commit/612be533836f33fdecb9584ddc0f5674df31dcb0))
|
|
18
|
+
* **abstract-utxo:** cross chain recovery support for bigint coins (doge) ([ad6bf71](https://github.com/BitGo/BitGoJS/commit/ad6bf71f58a4bae79f3bb014ee947a878f4b89d2))
|
|
19
|
+
* **sdk-core:** added large value support while calling WP ([870621e](https://github.com/BitGo/BitGoJS/commit/870621e2bc93d15ed6f040379353d039eb17e609))
|
|
20
|
+
* **utxo-lib:** export BIP32/ECPair interfaces ([8628507](https://github.com/BitGo/BitGoJS/commit/862850781b2e8b36c71608c5ae71424b9ebe9dee))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# [1.1.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.1.0-rc.6...@bitgo/abstract-utxo@1.1.0) (2022-07-19)
|
|
27
|
+
|
|
28
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
29
|
+
|
|
30
|
+
# [1.1.0-rc.6](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.1.0-rc.4...@bitgo/abstract-utxo@1.1.0-rc.6) (2022-07-19)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
33
|
+
|
|
34
|
+
# [1.1.0-rc.5](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.1.0-rc.4...@bitgo/abstract-utxo@1.1.0-rc.5) (2022-07-18)
|
|
35
|
+
|
|
36
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
37
|
+
|
|
38
|
+
# [1.1.0-rc.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.1.0-rc.3...@bitgo/abstract-utxo@1.1.0-rc.4) (2022-07-15)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
41
|
+
|
|
42
|
+
# [1.1.0-rc.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.1.0-rc.1...@bitgo/abstract-utxo@1.1.0-rc.3) (2022-07-15)
|
|
43
|
+
|
|
44
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
45
|
+
|
|
46
|
+
# [1.1.0-rc.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.1.0-rc.1...@bitgo/abstract-utxo@1.1.0-rc.2) (2022-07-14)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
49
|
+
|
|
50
|
+
# [1.1.0-rc.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.1.0-rc.0...@bitgo/abstract-utxo@1.1.0-rc.1) (2022-07-12)
|
|
51
|
+
|
|
52
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
53
|
+
|
|
54
|
+
# [1.1.0-rc.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.15...@bitgo/abstract-utxo@1.1.0-rc.0) (2022-07-11)
|
|
55
|
+
|
|
56
|
+
### Features
|
|
57
|
+
|
|
58
|
+
- check network argument in AbstractUtxoCoin constructor ([4a36223](https://github.com/BitGo/BitGoJS/commit/4a3622341ed4011ba04acab0a5d799b79941d1c4))
|
|
59
|
+
|
|
60
|
+
## [1.0.1-rc.15](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.14...@bitgo/abstract-utxo@1.0.1-rc.15) (2022-07-07)
|
|
61
|
+
|
|
62
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
63
|
+
|
|
64
|
+
## [1.0.1-rc.14](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.13...@bitgo/abstract-utxo@1.0.1-rc.14) (2022-07-05)
|
|
65
|
+
|
|
66
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
67
|
+
|
|
68
|
+
## [1.0.1-rc.13](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.12...@bitgo/abstract-utxo@1.0.1-rc.13) (2022-07-01)
|
|
69
|
+
|
|
70
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
71
|
+
|
|
72
|
+
## [1.0.1-rc.12](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.11...@bitgo/abstract-utxo@1.0.1-rc.12) (2022-06-30)
|
|
73
|
+
|
|
74
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
75
|
+
|
|
76
|
+
## [1.0.1-rc.11](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.10...@bitgo/abstract-utxo@1.0.1-rc.11) (2022-06-30)
|
|
77
|
+
|
|
78
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
79
|
+
|
|
80
|
+
## [1.0.1-rc.10](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.8...@bitgo/abstract-utxo@1.0.1-rc.10) (2022-06-29)
|
|
81
|
+
|
|
82
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
83
|
+
|
|
84
|
+
## [1.0.1-rc.9](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.8...@bitgo/abstract-utxo@1.0.1-rc.9) (2022-06-29)
|
|
85
|
+
|
|
86
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
87
|
+
|
|
88
|
+
## [1.0.1-rc.8](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.7...@bitgo/abstract-utxo@1.0.1-rc.8) (2022-06-27)
|
|
89
|
+
|
|
90
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
91
|
+
|
|
92
|
+
## [1.0.1-rc.7](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.6...@bitgo/abstract-utxo@1.0.1-rc.7) (2022-06-23)
|
|
93
|
+
|
|
94
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
95
|
+
|
|
96
|
+
## [1.0.1-rc.6](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.5...@bitgo/abstract-utxo@1.0.1-rc.6) (2022-06-22)
|
|
97
|
+
|
|
98
|
+
### Bug Fixes
|
|
99
|
+
|
|
100
|
+
- add dependency check to fix current and future dependency resolutions ([3074335](https://github.com/BitGo/BitGoJS/commit/30743356cff4ebb6d9e185f1a493b187614a1ea9))
|
|
101
|
+
|
|
102
|
+
## [1.0.1-rc.5](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.4...@bitgo/abstract-utxo@1.0.1-rc.5) (2022-06-21)
|
|
103
|
+
|
|
104
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
105
|
+
|
|
106
|
+
## [1.0.1-rc.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.3...@bitgo/abstract-utxo@1.0.1-rc.4) (2022-06-16)
|
|
107
|
+
|
|
108
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
109
|
+
|
|
110
|
+
## [1.0.1-rc.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.2...@bitgo/abstract-utxo@1.0.1-rc.3) (2022-06-14)
|
|
111
|
+
|
|
112
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
113
|
+
|
|
114
|
+
## [1.0.1-rc.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.1...@bitgo/abstract-utxo@1.0.1-rc.2) (2022-06-14)
|
|
115
|
+
|
|
116
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
117
|
+
|
|
118
|
+
## [1.0.1-rc.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.0.1-rc.0...@bitgo/abstract-utxo@1.0.1-rc.1) (2022-06-13)
|
|
119
|
+
|
|
120
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
121
|
+
|
|
122
|
+
## 1.0.1-rc.0 (2022-06-10)
|
|
123
|
+
|
|
124
|
+
### Bug Fixes
|
|
125
|
+
|
|
126
|
+
- **abstract-utxo:** add bsv replay protection case ([5e166cb](https://github.com/BitGo/BitGoJS/commit/5e166cbbc89ff10bd59308debf8f43dd18de0c47))
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* @prettier
|
|
4
|
+
*/
|
|
2
5
|
import * as utxolib from '@bitgo/utxo-lib';
|
|
3
6
|
import { bitgo } from '@bitgo/utxo-lib';
|
|
4
7
|
import { backupKeyRecovery, RecoverParams } from './recovery/backupKeyRecovery';
|
|
@@ -6,7 +9,7 @@ import { CrossChainRecoverySigned, CrossChainRecoveryUnsigned } from './recovery
|
|
|
6
9
|
import { AddressCoinSpecific, BaseCoin, BitGoBase, ExtraPrebuildParamsOptions, HalfSignedUtxoTransaction, IRequestTracer, ITransactionExplanation as BaseTransactionExplanation, IWallet, Keychain, KeychainsTriplet, ParsedTransaction as BaseParsedTransaction, ParseTransactionOptions as BaseParseTransactionOptions, PrecreateBitGoOptions, PresignTransactionOptions, RequestTracer, SignedTransaction, SignTransactionOptions as BaseSignTransactionOptions, SupplementGenerateWalletOptions, TransactionParams as BaseTransactionParams, TransactionPrebuild as BaseTransactionPrebuild, Triple, VerificationOptions, VerifyAddressOptions as BaseVerifyAddressOptions, VerifyTransactionOptions as BaseVerifyTransactionOptions } from '@bitgo/sdk-core';
|
|
7
10
|
import { CustomChangeOptions } from './parseOutput';
|
|
8
11
|
import ScriptType2Of3 = utxolib.bitgo.outputScripts.ScriptType2Of3;
|
|
9
|
-
declare type Unspent = bitgo.Unspent
|
|
12
|
+
declare type Unspent<TNumber extends number | bigint = number> = bitgo.Unspent<TNumber>;
|
|
10
13
|
export interface VerifyAddressOptions extends BaseVerifyAddressOptions {
|
|
11
14
|
chain: number;
|
|
12
15
|
index: number;
|
|
@@ -17,7 +20,7 @@ export interface Output {
|
|
|
17
20
|
external?: boolean;
|
|
18
21
|
needsCustomChangeKeySignatureVerification?: boolean;
|
|
19
22
|
}
|
|
20
|
-
export interface TransactionExplanation extends BaseTransactionExplanation<string,
|
|
23
|
+
export interface TransactionExplanation extends BaseTransactionExplanation<string, string> {
|
|
21
24
|
locktime: number;
|
|
22
25
|
outputs: Output[];
|
|
23
26
|
changeOutputs: Output[];
|
|
@@ -30,35 +33,35 @@ export interface TransactionExplanation extends BaseTransactionExplanation<strin
|
|
|
30
33
|
*/
|
|
31
34
|
signatures: number;
|
|
32
35
|
}
|
|
33
|
-
export interface TransactionInfo {
|
|
36
|
+
export interface TransactionInfo<TNumber extends number | bigint = number> {
|
|
34
37
|
/** Maps txid to txhex. Required for offline signing. */
|
|
35
38
|
txHexes?: Record<string, string>;
|
|
36
39
|
changeAddresses?: string[];
|
|
37
|
-
unspents: Unspent[];
|
|
40
|
+
unspents: Unspent<TNumber>[];
|
|
38
41
|
}
|
|
39
|
-
export interface ExplainTransactionOptions {
|
|
42
|
+
export interface ExplainTransactionOptions<TNumber extends number | bigint = number> {
|
|
40
43
|
txHex: string;
|
|
41
|
-
txInfo?: TransactionInfo
|
|
44
|
+
txInfo?: TransactionInfo<TNumber>;
|
|
42
45
|
feeInfo?: string;
|
|
43
46
|
pubs?: Triple<string>;
|
|
44
47
|
}
|
|
45
48
|
export declare type UtxoNetwork = utxolib.Network;
|
|
46
|
-
export interface TransactionPrebuild extends BaseTransactionPrebuild {
|
|
47
|
-
txInfo?: TransactionInfo
|
|
49
|
+
export interface TransactionPrebuild<TNumber extends number | bigint = number> extends BaseTransactionPrebuild {
|
|
50
|
+
txInfo?: TransactionInfo<TNumber>;
|
|
48
51
|
blockHeight?: number;
|
|
49
52
|
}
|
|
50
53
|
export interface TransactionParams extends BaseTransactionParams {
|
|
51
54
|
walletPassphrase?: string;
|
|
52
55
|
changeAddress?: string;
|
|
53
56
|
}
|
|
54
|
-
export interface ParseTransactionOptions extends BaseParseTransactionOptions {
|
|
57
|
+
export interface ParseTransactionOptions<TNumber extends number | bigint = number> extends BaseParseTransactionOptions {
|
|
55
58
|
txParams: TransactionParams;
|
|
56
|
-
txPrebuild: TransactionPrebuild
|
|
59
|
+
txPrebuild: TransactionPrebuild<TNumber>;
|
|
57
60
|
wallet: IWallet;
|
|
58
61
|
verification?: VerificationOptions;
|
|
59
62
|
reqId?: IRequestTracer;
|
|
60
63
|
}
|
|
61
|
-
export interface ParsedTransaction extends BaseParsedTransaction {
|
|
64
|
+
export interface ParsedTransaction<TNumber extends number | bigint = number> extends BaseParsedTransaction {
|
|
62
65
|
keychains: {
|
|
63
66
|
user?: Keychain;
|
|
64
67
|
backup?: Keychain;
|
|
@@ -73,8 +76,8 @@ export interface ParsedTransaction extends BaseParsedTransaction {
|
|
|
73
76
|
explicitExternalOutputs: Output[];
|
|
74
77
|
implicitExternalOutputs: Output[];
|
|
75
78
|
changeOutputs: Output[];
|
|
76
|
-
explicitExternalSpendAmount:
|
|
77
|
-
implicitExternalSpendAmount:
|
|
79
|
+
explicitExternalSpendAmount: TNumber;
|
|
80
|
+
implicitExternalSpendAmount: TNumber;
|
|
78
81
|
needsCustomChangeKeySignatureVerification: boolean;
|
|
79
82
|
customChange?: CustomChangeOptions;
|
|
80
83
|
}
|
|
@@ -98,11 +101,11 @@ export interface AddressDetails {
|
|
|
98
101
|
coinSpecific: AddressCoinSpecific;
|
|
99
102
|
addressType?: string;
|
|
100
103
|
}
|
|
101
|
-
export interface SignTransactionOptions extends BaseSignTransactionOptions {
|
|
104
|
+
export interface SignTransactionOptions<TNumber extends number | bigint = number> extends BaseSignTransactionOptions {
|
|
102
105
|
/** Transaction prebuild from bitgo server */
|
|
103
106
|
txPrebuild: {
|
|
104
107
|
txHex: string;
|
|
105
|
-
txInfo: TransactionInfo
|
|
108
|
+
txInfo: TransactionInfo<TNumber>;
|
|
106
109
|
};
|
|
107
110
|
/** xprv of user key or backup key */
|
|
108
111
|
prv: string;
|
|
@@ -133,10 +136,6 @@ export interface RecoverFromWrongChainOptions {
|
|
|
133
136
|
recoveryCoin?: AbstractUtxoCoin;
|
|
134
137
|
signed?: boolean;
|
|
135
138
|
}
|
|
136
|
-
export interface AddressInfo {
|
|
137
|
-
txCount: number;
|
|
138
|
-
totalBalance: number;
|
|
139
|
-
}
|
|
140
139
|
export interface VerifyKeySignaturesOptions {
|
|
141
140
|
userKeychain?: Keychain;
|
|
142
141
|
keychainToVerify?: Keychain;
|
|
@@ -147,21 +146,15 @@ export interface VerifyUserPublicKeyOptions {
|
|
|
147
146
|
disableNetworking: boolean;
|
|
148
147
|
txParams: TransactionParams;
|
|
149
148
|
}
|
|
150
|
-
export interface VerifyTransactionOptions extends BaseVerifyTransactionOptions {
|
|
151
|
-
txPrebuild: TransactionPrebuild
|
|
152
|
-
}
|
|
153
|
-
export interface UnspentParams {
|
|
154
|
-
id: string;
|
|
155
|
-
value: number;
|
|
156
|
-
valueString: string;
|
|
157
|
-
address: string;
|
|
158
|
-
blockHeight: number;
|
|
149
|
+
export interface VerifyTransactionOptions<TNumber extends number | bigint = number> extends BaseVerifyTransactionOptions {
|
|
150
|
+
txPrebuild: TransactionPrebuild<TNumber>;
|
|
159
151
|
}
|
|
160
152
|
export declare abstract class AbstractUtxoCoin extends BaseCoin {
|
|
161
153
|
altScriptHash?: number;
|
|
162
154
|
supportAltScriptDestination?: boolean;
|
|
155
|
+
readonly amountType: 'number' | 'bigint';
|
|
163
156
|
private readonly _network;
|
|
164
|
-
protected constructor(bitgo: BitGoBase, network: utxolib.Network);
|
|
157
|
+
protected constructor(bitgo: BitGoBase, network: utxolib.Network, amountType?: 'number' | 'bigint');
|
|
165
158
|
get network(): utxolib.Network;
|
|
166
159
|
sweepWithSendMany(): boolean;
|
|
167
160
|
/** @deprecated */
|
|
@@ -205,7 +198,7 @@ export declare abstract class AbstractUtxoCoin extends BaseCoin {
|
|
|
205
198
|
* Run custom coin logic after a transaction prebuild has been received from BitGo
|
|
206
199
|
* @param prebuild
|
|
207
200
|
*/
|
|
208
|
-
postProcessPrebuild(prebuild: TransactionPrebuild): Promise<TransactionPrebuild
|
|
201
|
+
postProcessPrebuild<TNumber extends number | bigint>(prebuild: TransactionPrebuild<TNumber>): Promise<TransactionPrebuild<TNumber>>;
|
|
209
202
|
/**
|
|
210
203
|
* Find outputs that are within expected outputs but not within actual outputs, including duplicates
|
|
211
204
|
* @param expectedOutputs
|
|
@@ -220,13 +213,13 @@ export declare abstract class AbstractUtxoCoin extends BaseCoin {
|
|
|
220
213
|
static inferAddressType(addressDetails: {
|
|
221
214
|
chain: number;
|
|
222
215
|
}): ScriptType2Of3 | null;
|
|
223
|
-
createTransactionFromHex(hex: string): utxolib.bitgo.UtxoTransaction
|
|
216
|
+
createTransactionFromHex<TNumber extends number | bigint = number>(hex: string): utxolib.bitgo.UtxoTransaction<TNumber>;
|
|
224
217
|
/**
|
|
225
218
|
* Extract and fill transaction details such as internal/change spend, external spend (explicit vs. implicit), etc.
|
|
226
219
|
* @param params
|
|
227
220
|
* @returns {*}
|
|
228
221
|
*/
|
|
229
|
-
parseTransaction(params: ParseTransactionOptions): Promise<ParsedTransaction
|
|
222
|
+
parseTransaction<TNumber extends number | bigint = number>(params: ParseTransactionOptions<TNumber>): Promise<ParsedTransaction<TNumber>>;
|
|
230
223
|
/**
|
|
231
224
|
* Decrypt the wallet's user private key and verify that the claimed public key matches
|
|
232
225
|
* @param {VerifyUserPublicKeyOptions} params
|
|
@@ -249,7 +242,7 @@ export declare abstract class AbstractUtxoCoin extends BaseCoin {
|
|
|
249
242
|
* @return {boolean}
|
|
250
243
|
* @protected
|
|
251
244
|
*/
|
|
252
|
-
protected verifyCustomChangeKeySignatures(tx: ParsedTransaction
|
|
245
|
+
protected verifyCustomChangeKeySignatures<TNumber extends number | bigint>(tx: ParsedTransaction<TNumber>, userKeychain: Keychain): boolean;
|
|
253
246
|
/**
|
|
254
247
|
* Get the maximum percentage limit for pay-as-you-go outputs
|
|
255
248
|
*
|
|
@@ -270,7 +263,7 @@ export declare abstract class AbstractUtxoCoin extends BaseCoin {
|
|
|
270
263
|
* @param params.verification.addresses Address details to pass in for out-of-band verification
|
|
271
264
|
* @returns {boolean}
|
|
272
265
|
*/
|
|
273
|
-
verifyTransaction(params: VerifyTransactionOptions): Promise<boolean>;
|
|
266
|
+
verifyTransaction<TNumber extends number | bigint = number>(params: VerifyTransactionOptions<TNumber>): Promise<boolean>;
|
|
274
267
|
/**
|
|
275
268
|
* Make sure an address is valid and throw an error if it's not.
|
|
276
269
|
* @param params.address The address string on the network
|
|
@@ -319,12 +312,12 @@ export declare abstract class AbstractUtxoCoin extends BaseCoin {
|
|
|
319
312
|
* @param params - {@see SignTransactionOptions}
|
|
320
313
|
* @returns {Promise<SignedTransaction | HalfSignedUtxoTransaction>}
|
|
321
314
|
*/
|
|
322
|
-
signTransaction(params: SignTransactionOptions): Promise<SignedTransaction | HalfSignedUtxoTransaction>;
|
|
315
|
+
signTransaction<TNumber extends number | bigint = number>(params: SignTransactionOptions<TNumber>): Promise<SignedTransaction | HalfSignedUtxoTransaction>;
|
|
323
316
|
/**
|
|
324
317
|
* @param unspent
|
|
325
318
|
* @returns {boolean}
|
|
326
319
|
*/
|
|
327
|
-
isBitGoTaintedUnspent(unspent: Unspent): boolean;
|
|
320
|
+
isBitGoTaintedUnspent<TNumber extends number | bigint>(unspent: Unspent<TNumber>): boolean;
|
|
328
321
|
/**
|
|
329
322
|
* @deprecated - use utxolib.bitgo.getDefaultSigHash(network) instead
|
|
330
323
|
* @returns {number}
|
|
@@ -342,7 +335,7 @@ export declare abstract class AbstractUtxoCoin extends BaseCoin {
|
|
|
342
335
|
* change amounts, and transaction outputs.
|
|
343
336
|
* @param params
|
|
344
337
|
*/
|
|
345
|
-
explainTransaction(params: ExplainTransactionOptions): Promise<TransactionExplanation>;
|
|
338
|
+
explainTransaction<TNumber extends number | bigint = number>(params: ExplainTransactionOptions<TNumber>): Promise<TransactionExplanation>;
|
|
346
339
|
/**
|
|
347
340
|
* Create a multisig address of a given type from a list of keychains and a signing threshold
|
|
348
341
|
* @param addressType
|
|
@@ -368,7 +361,7 @@ export declare abstract class AbstractUtxoCoin extends BaseCoin {
|
|
|
368
361
|
* @param params.xprv the unencrypted xprv (used instead of wallet passphrase)
|
|
369
362
|
* @returns {*}
|
|
370
363
|
*/
|
|
371
|
-
recoverFromWrongChain(params: RecoverFromWrongChainOptions): Promise<CrossChainRecoverySigned | CrossChainRecoveryUnsigned
|
|
364
|
+
recoverFromWrongChain<TNumber extends number | bigint = number>(params: RecoverFromWrongChainOptions): Promise<CrossChainRecoverySigned<TNumber> | CrossChainRecoveryUnsigned<TNumber>>;
|
|
372
365
|
/**
|
|
373
366
|
* Generate bip32 key pair
|
|
374
367
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstractUtxoCoin.d.ts","sourceRoot":"","sources":["../../src/abstractUtxoCoin.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"abstractUtxoCoin.d.ts","sourceRoot":"","sources":["../../src/abstractUtxoCoin.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAy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