@bitgo-beta/abstract-utxo 1.1.1-beta.25 → 1.1.1-beta.251
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 +147 -0
- package/dist/src/abstractUtxoCoin.d.ts +38 -15
- package/dist/src/abstractUtxoCoin.d.ts.map +1 -1
- package/dist/src/abstractUtxoCoin.js +102 -74
- package/dist/src/config.d.ts +1 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +4 -3
- package/dist/src/parseOutput.d.ts.map +1 -1
- package/dist/src/parseOutput.js +20 -8
- package/dist/src/recovery/RecoveryProvider.d.ts +6 -5
- package/dist/src/recovery/RecoveryProvider.d.ts.map +1 -1
- package/dist/src/recovery/RecoveryProvider.js +1 -1
- package/dist/src/recovery/backupKeyRecovery.d.ts +6 -3
- package/dist/src/recovery/backupKeyRecovery.d.ts.map +1 -1
- package/dist/src/recovery/backupKeyRecovery.js +6 -3
- package/dist/src/recovery/crossChainRecovery.d.ts +11 -23
- package/dist/src/recovery/crossChainRecovery.d.ts.map +1 -1
- package/dist/src/recovery/crossChainRecovery.js +21 -65
- package/dist/src/sign.d.ts +26 -3
- package/dist/src/sign.d.ts.map +1 -1
- package/dist/src/sign.js +71 -2
- package/dist/tsconfig.tsbuildinfo +1711 -902
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,153 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.1.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@2.1.1...@bitgo/abstract-utxo@2.1.2) (2023-04-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
9
|
+
|
|
10
|
+
## [2.1.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@2.1.0...@bitgo/abstract-utxo@2.1.1) (2023-04-20)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
13
|
+
|
|
14
|
+
# [2.1.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@2.0.1...@bitgo/abstract-utxo@2.1.0) (2023-04-13)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
- **sdk-coin-btc:** get rootwalletkeys for inscription transfer ([b160186](https://github.com/BitGo/BitGoJS/commit/b16018643273e20ea6908f51149139def7209932))
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
- **utxo-lib:** create p2tr address using musig2 ([699e829](https://github.com/BitGo/BitGoJS/commit/699e8291f4a205ba0b2071c6369f2c8843b8a945))
|
|
23
|
+
|
|
24
|
+
## [2.0.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@2.0.0...@bitgo/abstract-utxo@2.0.1) (2023-02-17)
|
|
25
|
+
|
|
26
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
27
|
+
|
|
28
|
+
# [2.0.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.10.5...@bitgo/abstract-utxo@2.0.0) (2023-02-16)
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
- accept apiKey for recoverFromWrongChain ([3f27775](https://github.com/BitGo/BitGoJS/commit/3f2777506326ae08d0e5d211146522af0d15c3f2))
|
|
33
|
+
- convert addr to canonical addr during wrongChainRecovery ([2089596](https://github.com/BitGo/BitGoJS/commit/20895964eeac1eedc9f859f0ce9b607313cc6568))
|
|
34
|
+
- **sdk-core:** mark pub as optional in Keychain interface ([7d6012c](https://github.com/BitGo/BitGoJS/commit/7d6012cf1058e43d96e129dc2b1607b5316dca1c))
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
- update tests for crossChainRecovery ([6cdd3a9](https://github.com/BitGo/BitGoJS/commit/6cdd3a94baa4427412d06e3e151096feea5e26ff))
|
|
39
|
+
- use UtxoApi to facilitate cross chain recoveries ([61151aa](https://github.com/BitGo/BitGoJS/commit/61151aa2634b7fa89f995a85940fd680f87cf854))
|
|
40
|
+
|
|
41
|
+
### BREAKING CHANGES
|
|
42
|
+
|
|
43
|
+
- **sdk-core:** Keychain.pub is now optional
|
|
44
|
+
|
|
45
|
+
# [1.12.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.10.5...@bitgo/abstract-utxo@1.12.0) (2023-02-08)
|
|
46
|
+
|
|
47
|
+
### Bug Fixes
|
|
48
|
+
|
|
49
|
+
- accept apiKey for recoverFromWrongChain ([3f27775](https://github.com/BitGo/BitGoJS/commit/3f2777506326ae08d0e5d211146522af0d15c3f2))
|
|
50
|
+
- convert addr to canonical addr during wrongChainRecovery ([2089596](https://github.com/BitGo/BitGoJS/commit/20895964eeac1eedc9f859f0ce9b607313cc6568))
|
|
51
|
+
|
|
52
|
+
### Features
|
|
53
|
+
|
|
54
|
+
- update tests for crossChainRecovery ([6cdd3a9](https://github.com/BitGo/BitGoJS/commit/6cdd3a94baa4427412d06e3e151096feea5e26ff))
|
|
55
|
+
- use UtxoApi to facilitate cross chain recoveries ([61151aa](https://github.com/BitGo/BitGoJS/commit/61151aa2634b7fa89f995a85940fd680f87cf854))
|
|
56
|
+
|
|
57
|
+
# [1.11.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.10.5...@bitgo/abstract-utxo@1.11.0) (2023-01-30)
|
|
58
|
+
|
|
59
|
+
### Features
|
|
60
|
+
|
|
61
|
+
- update tests for crossChainRecovery ([6cdd3a9](https://github.com/BitGo/BitGoJS/commit/6cdd3a94baa4427412d06e3e151096feea5e26ff))
|
|
62
|
+
- use UtxoApi to facilitate cross chain recoveries ([61151aa](https://github.com/BitGo/BitGoJS/commit/61151aa2634b7fa89f995a85940fd680f87cf854))
|
|
63
|
+
|
|
64
|
+
## [1.10.5](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.10.4...@bitgo/abstract-utxo@1.10.5) (2023-01-25)
|
|
65
|
+
|
|
66
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
67
|
+
|
|
68
|
+
## [1.10.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.10.3...@bitgo/abstract-utxo@1.10.4) (2022-12-23)
|
|
69
|
+
|
|
70
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
71
|
+
|
|
72
|
+
## [1.10.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.10.2...@bitgo/abstract-utxo@1.10.3) (2022-12-20)
|
|
73
|
+
|
|
74
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
75
|
+
|
|
76
|
+
## [1.10.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.10.1...@bitgo/abstract-utxo@1.10.2) (2022-12-09)
|
|
77
|
+
|
|
78
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
79
|
+
|
|
80
|
+
## [1.10.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.10.0...@bitgo/abstract-utxo@1.10.1) (2022-12-06)
|
|
81
|
+
|
|
82
|
+
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
83
|
+
|
|
84
|
+
# [1.10.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.9.0...@bitgo/abstract-utxo@1.10.0) (2022-12-01)
|
|
85
|
+
|
|
86
|
+
### Features
|
|
87
|
+
|
|
88
|
+
- **abstract-utxo:** add valueString to unspents for doge recovery flow ([439f95c](https://github.com/BitGo/BitGoJS/commit/439f95c4e337e33a0812ac28b03e46b52e4a9fde))
|
|
89
|
+
|
|
90
|
+
# [1.9.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.4.0...@bitgo/abstract-utxo@1.9.0) (2022-11-29)
|
|
91
|
+
|
|
92
|
+
### Bug Fixes
|
|
93
|
+
|
|
94
|
+
- fix unit-test-all errors ([4adab4d](https://github.com/BitGo/BitGoJS/commit/4adab4dd363cdd4c21bd964fd3b6d5581bd63e46))
|
|
95
|
+
- **sdk-coin-doge:** minor change in types ([db18dd9](https://github.com/BitGo/BitGoJS/commit/db18dd9f8a62432c89db76a9dbd81c7b3c586fc2))
|
|
96
|
+
- **utxo-lib:** fixed unchecked cast to Number ([2f1d962](https://github.com/BitGo/BitGoJS/commit/2f1d9628bd9ec51a12d0c8dc0adeb60e94f32b1d))
|
|
97
|
+
|
|
98
|
+
### Features
|
|
99
|
+
|
|
100
|
+
- **abstract-utxo:** allow for override in isValidAddress ([1d02d98](https://github.com/BitGo/BitGoJS/commit/1d02d988401b6abc00336f67687a7b01d682989e))
|
|
101
|
+
- **root:** add support for cross chain recovery for bcha ([f9ab941](https://github.com/BitGo/BitGoJS/commit/f9ab941055eaf79f6623b40e9aac982124f78843))
|
|
102
|
+
- **utxo-lib:** bigintify dogecoin specific functions ([d5830a6](https://github.com/BitGo/BitGoJS/commit/d5830a6d6c17de5cefb138a639b94c0cbb37f5f0))
|
|
103
|
+
- **utxo-lib:** simplify isValidAddress ([cf826fe](https://github.com/BitGo/BitGoJS/commit/cf826fe4d0a32f09888d2218028b24ce33a6aa92))
|
|
104
|
+
|
|
105
|
+
# [1.8.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.4.0...@bitgo/abstract-utxo@1.8.0) (2022-11-04)
|
|
106
|
+
|
|
107
|
+
### Bug Fixes
|
|
108
|
+
|
|
109
|
+
- fix unit-test-all errors ([4adab4d](https://github.com/BitGo/BitGoJS/commit/4adab4dd363cdd4c21bd964fd3b6d5581bd63e46))
|
|
110
|
+
- **sdk-coin-doge:** minor change in types ([db18dd9](https://github.com/BitGo/BitGoJS/commit/db18dd9f8a62432c89db76a9dbd81c7b3c586fc2))
|
|
111
|
+
- **utxo-lib:** fixed unchecked cast to Number ([2f1d962](https://github.com/BitGo/BitGoJS/commit/2f1d9628bd9ec51a12d0c8dc0adeb60e94f32b1d))
|
|
112
|
+
|
|
113
|
+
### Features
|
|
114
|
+
|
|
115
|
+
- **utxo-lib:** bigintify dogecoin specific functions ([d5830a6](https://github.com/BitGo/BitGoJS/commit/d5830a6d6c17de5cefb138a639b94c0cbb37f5f0))
|
|
116
|
+
|
|
117
|
+
# [1.6.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.4.0...@bitgo/abstract-utxo@1.6.0) (2022-10-27)
|
|
118
|
+
|
|
119
|
+
### Bug Fixes
|
|
120
|
+
|
|
121
|
+
- **sdk-coin-doge:** minor change in types ([db18dd9](https://github.com/BitGo/BitGoJS/commit/db18dd9f8a62432c89db76a9dbd81c7b3c586fc2))
|
|
122
|
+
- **utxo-lib:** fixed unchecked cast to Number ([2f1d962](https://github.com/BitGo/BitGoJS/commit/2f1d9628bd9ec51a12d0c8dc0adeb60e94f32b1d))
|
|
123
|
+
|
|
124
|
+
### Features
|
|
125
|
+
|
|
126
|
+
- **utxo-lib:** bigintify dogecoin specific functions ([d5830a6](https://github.com/BitGo/BitGoJS/commit/d5830a6d6c17de5cefb138a639b94c0cbb37f5f0))
|
|
127
|
+
|
|
128
|
+
# [1.5.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-utxo@1.4.0...@bitgo/abstract-utxo@1.5.0) (2022-10-25)
|
|
129
|
+
|
|
130
|
+
### Bug Fixes
|
|
131
|
+
|
|
132
|
+
- **sdk-coin-doge:** minor change in types ([db18dd9](https://github.com/BitGo/BitGoJS/commit/db18dd9f8a62432c89db76a9dbd81c7b3c586fc2))
|
|
133
|
+
- **utxo-lib:** fixed unchecked cast to Number ([2f1d962](https://github.com/BitGo/BitGoJS/commit/2f1d9628bd9ec51a12d0c8dc0adeb60e94f32b1d))
|
|
134
|
+
|
|
135
|
+
### Features
|
|
136
|
+
|
|
137
|
+
- **utxo-lib:** bigintify dogecoin specific functions ([d5830a6](https://github.com/BitGo/BitGoJS/commit/d5830a6d6c17de5cefb138a639b94c0cbb37f5f0))
|
|
138
|
+
|
|
139
|
+
# [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)
|
|
140
|
+
|
|
141
|
+
### Bug Fixes
|
|
142
|
+
|
|
143
|
+
- **core:** fix bip32/ecpair, API vs Interface ([bec9c1e](https://github.com/BitGo/BitGoJS/commit/bec9c1e6ff0c23108dc27e171abdd3e4d2cfdfb1))
|
|
144
|
+
|
|
145
|
+
### Features
|
|
146
|
+
|
|
147
|
+
- **abstract-utxo:** add support for bigints from new utxo-lib ([77c60dd](https://github.com/BitGo/BitGoJS/commit/77c60ddd4d0ddd1e82a8b1bb041686a9c7f39fae))
|
|
148
|
+
- **abstract-utxo:** backup key recovery service for doge ([612be53](https://github.com/BitGo/BitGoJS/commit/612be533836f33fdecb9584ddc0f5674df31dcb0))
|
|
149
|
+
- **abstract-utxo:** cross chain recovery support for bigint coins (doge) ([ad6bf71](https://github.com/BitGo/BitGoJS/commit/ad6bf71f58a4bae79f3bb014ee947a878f4b89d2))
|
|
150
|
+
- **sdk-core:** added large value support while calling WP ([870621e](https://github.com/BitGo/BitGoJS/commit/870621e2bc93d15ed6f040379353d039eb17e609))
|
|
151
|
+
- **utxo-lib:** export BIP32/ECPair interfaces ([8628507](https://github.com/BitGo/BitGoJS/commit/862850781b2e8b36c71608c5ae71424b9ebe9dee))
|
|
152
|
+
|
|
6
153
|
# [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)
|
|
7
154
|
|
|
8
155
|
**Note:** Version bump only for package @bitgo/abstract-utxo
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import * as utxolib from '@bitgo-beta/utxo-lib';
|
|
6
6
|
import { bitgo } from '@bitgo-beta/utxo-lib';
|
|
7
7
|
import { backupKeyRecovery, RecoverParams } from './recovery/backupKeyRecovery';
|
|
8
|
-
import { CrossChainRecoverySigned, CrossChainRecoveryUnsigned } from './recovery';
|
|
9
|
-
import { AddressCoinSpecific, BaseCoin, BitGoBase, ExtraPrebuildParamsOptions, HalfSignedUtxoTransaction, IRequestTracer, ITransactionExplanation as BaseTransactionExplanation,
|
|
8
|
+
import { CrossChainRecoverySigned, CrossChainRecoveryUnsigned, RecoveryProvider } from './recovery';
|
|
9
|
+
import { AddressCoinSpecific, BaseCoin, BitGoBase, ExtraPrebuildParamsOptions, HalfSignedUtxoTransaction, IBaseCoin, IRequestTracer, ITransactionExplanation as BaseTransactionExplanation, 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, Wallet, WalletData } from '@bitgo-beta/sdk-core';
|
|
10
10
|
import { CustomChangeOptions } from './parseOutput';
|
|
11
11
|
import ScriptType2Of3 = utxolib.bitgo.outputScripts.ScriptType2Of3;
|
|
12
12
|
declare type Unspent<TNumber extends number | bigint = number> = bitgo.Unspent<TNumber>;
|
|
@@ -37,7 +37,8 @@ export interface TransactionInfo<TNumber extends number | bigint = number> {
|
|
|
37
37
|
/** Maps txid to txhex. Required for offline signing. */
|
|
38
38
|
txHexes?: Record<string, string>;
|
|
39
39
|
changeAddresses?: string[];
|
|
40
|
-
unspents
|
|
40
|
+
/** psbt does not require unspents. */
|
|
41
|
+
unspents?: Unspent<TNumber>[];
|
|
41
42
|
}
|
|
42
43
|
export interface ExplainTransactionOptions<TNumber extends number | bigint = number> {
|
|
43
44
|
txHex: string;
|
|
@@ -54,10 +55,21 @@ export interface TransactionParams extends BaseTransactionParams {
|
|
|
54
55
|
walletPassphrase?: string;
|
|
55
56
|
changeAddress?: string;
|
|
56
57
|
}
|
|
58
|
+
export interface AbstractUtxoCoinWalletData extends WalletData {
|
|
59
|
+
customChangeKeySignatures: {
|
|
60
|
+
user: string;
|
|
61
|
+
backup: string;
|
|
62
|
+
bitgo: string;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export declare class AbstractUtxoCoinWallet extends Wallet {
|
|
66
|
+
_wallet: AbstractUtxoCoinWalletData;
|
|
67
|
+
constructor(bitgo: BitGoBase, baseCoin: IBaseCoin, walletData: any);
|
|
68
|
+
}
|
|
57
69
|
export interface ParseTransactionOptions<TNumber extends number | bigint = number> extends BaseParseTransactionOptions {
|
|
58
70
|
txParams: TransactionParams;
|
|
59
71
|
txPrebuild: TransactionPrebuild<TNumber>;
|
|
60
|
-
wallet:
|
|
72
|
+
wallet: AbstractUtxoCoinWallet;
|
|
61
73
|
verification?: VerificationOptions;
|
|
62
74
|
reqId?: IRequestTracer;
|
|
63
75
|
}
|
|
@@ -104,6 +116,7 @@ export interface AddressDetails {
|
|
|
104
116
|
export interface SignTransactionOptions<TNumber extends number | bigint = number> extends BaseSignTransactionOptions {
|
|
105
117
|
/** Transaction prebuild from bitgo server */
|
|
106
118
|
txPrebuild: {
|
|
119
|
+
walletId: string;
|
|
107
120
|
txHex: string;
|
|
108
121
|
txInfo: TransactionInfo<TNumber>;
|
|
109
122
|
};
|
|
@@ -131,6 +144,7 @@ export interface RecoverFromWrongChainOptions {
|
|
|
131
144
|
wallet: string;
|
|
132
145
|
walletPassphrase?: string;
|
|
133
146
|
xprv?: string;
|
|
147
|
+
apiKey?: string;
|
|
134
148
|
/** @deprecated */
|
|
135
149
|
coin?: AbstractUtxoCoin;
|
|
136
150
|
recoveryCoin?: AbstractUtxoCoin;
|
|
@@ -148,6 +162,13 @@ export interface VerifyUserPublicKeyOptions {
|
|
|
148
162
|
}
|
|
149
163
|
export interface VerifyTransactionOptions<TNumber extends number | bigint = number> extends BaseVerifyTransactionOptions {
|
|
150
164
|
txPrebuild: TransactionPrebuild<TNumber>;
|
|
165
|
+
wallet: AbstractUtxoCoinWallet;
|
|
166
|
+
}
|
|
167
|
+
export interface SignPsbtRequest {
|
|
168
|
+
psbt: string;
|
|
169
|
+
}
|
|
170
|
+
export interface SignPsbtResponse {
|
|
171
|
+
psbt: string;
|
|
151
172
|
}
|
|
152
173
|
export declare abstract class AbstractUtxoCoin extends BaseCoin {
|
|
153
174
|
altScriptHash?: number;
|
|
@@ -168,20 +189,14 @@ export declare abstract class AbstractUtxoCoin extends BaseCoin {
|
|
|
168
189
|
* @deprecated
|
|
169
190
|
*/
|
|
170
191
|
getCoinLibrary(): typeof utxolib;
|
|
171
|
-
/**
|
|
172
|
-
* Helper to get the version number for an address
|
|
173
|
-
*/
|
|
174
|
-
protected getAddressVersion(address: string): number | undefined;
|
|
175
|
-
/**
|
|
176
|
-
* Helper to get the bech32 prefix for an address
|
|
177
|
-
*/
|
|
178
|
-
protected getAddressPrefix(address: string): string | undefined;
|
|
179
192
|
/**
|
|
180
193
|
* Check if an address is valid
|
|
181
194
|
* @param address
|
|
182
|
-
* @param
|
|
195
|
+
* @param param
|
|
183
196
|
*/
|
|
184
|
-
isValidAddress(address: string,
|
|
197
|
+
isValidAddress(address: string, param?: {
|
|
198
|
+
anyFormat: boolean;
|
|
199
|
+
} | /* legacy parameter */ boolean): boolean;
|
|
185
200
|
/**
|
|
186
201
|
* Return boolean indicating whether input is valid public key for the coin.
|
|
187
202
|
*
|
|
@@ -276,7 +291,7 @@ export declare abstract class AbstractUtxoCoin extends BaseCoin {
|
|
|
276
291
|
* @throws {InvalidAddressDerivationPropertyError}
|
|
277
292
|
* @throws {UnexpectedAddressError}
|
|
278
293
|
*/
|
|
279
|
-
isWalletAddress(params: VerifyAddressOptions): boolean
|
|
294
|
+
isWalletAddress(params: VerifyAddressOptions): Promise<boolean>;
|
|
280
295
|
/**
|
|
281
296
|
* Indicates whether coin supports a block target
|
|
282
297
|
* @returns {boolean}
|
|
@@ -307,6 +322,12 @@ export declare abstract class AbstractUtxoCoin extends BaseCoin {
|
|
|
307
322
|
* @returns {{chain: number, index: number, coin: number, coinSpecific: {outputScript, redeemScript}}}
|
|
308
323
|
*/
|
|
309
324
|
generateAddress(params: GenerateAddressOptions): AddressDetails;
|
|
325
|
+
/**
|
|
326
|
+
* @returns input psbt added with deterministic MuSig2 nonce for bitgo key for each MuSig2 inputs.
|
|
327
|
+
* @param psbtHex all MuSig2 inputs should contain user MuSig2 nonce
|
|
328
|
+
* @param walletId
|
|
329
|
+
*/
|
|
330
|
+
signPsbt(psbtHex: string, walletId: string): Promise<SignPsbtResponse>;
|
|
310
331
|
/**
|
|
311
332
|
* Assemble keychain and half-sign prebuilt transaction
|
|
312
333
|
* @param params - {@see SignTransactionOptions}
|
|
@@ -359,6 +380,7 @@ export declare abstract class AbstractUtxoCoin extends BaseCoin {
|
|
|
359
380
|
* @param params.signed return a half-signed transaction (default=true)
|
|
360
381
|
* @param params.walletPassphrase the wallet passphrase
|
|
361
382
|
* @param params.xprv the unencrypted xprv (used instead of wallet passphrase)
|
|
383
|
+
* @param params.apiKey for utxo coins other than [BTC,TBTC] this is a Block Chair api key
|
|
362
384
|
* @returns {*}
|
|
363
385
|
*/
|
|
364
386
|
recoverFromWrongChain<TNumber extends number | bigint = number>(params: RecoverFromWrongChainOptions): Promise<CrossChainRecoverySigned<TNumber> | CrossChainRecoveryUnsigned<TNumber>>;
|
|
@@ -378,6 +400,7 @@ export declare abstract class AbstractUtxoCoin extends BaseCoin {
|
|
|
378
400
|
supplementGenerateWallet(walletParams: SupplementGenerateWalletOptions, keychains: KeychainsTriplet): Promise<any>;
|
|
379
401
|
transactionDataAllowed(): boolean;
|
|
380
402
|
valuelessTransferAllowed(): boolean;
|
|
403
|
+
getRecoveryProvider(apiToken?: string): RecoveryProvider;
|
|
381
404
|
}
|
|
382
405
|
export {};
|
|
383
406
|
//# sourceMappingURL=abstractUtxoCoin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstractUtxoCoin.d.ts","sourceRoot":"","sources":["../../src/abstractUtxoCoin.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAyB,KAAK,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"abstractUtxoCoin.d.ts","sourceRoot":"","sources":["../../src/abstractUtxoCoin.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAyB,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAQpE,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAG1B,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,mBAAmB,EAEnB,QAAQ,EACR,SAAS,EACT,0BAA0B,EAC1B,yBAAyB,EACzB,SAAS,EAIT,cAAc,EACd,uBAAuB,IAAI,0BAA0B,EAErD,QAAQ,EACR,gBAAgB,EAMhB,iBAAiB,IAAI,qBAAqB,EAC1C,uBAAuB,IAAI,2BAA2B,EACtD,qBAAqB,EACrB,yBAAyB,EAEzB,aAAa,EAEb,iBAAiB,EACjB,sBAAsB,IAAI,0BAA0B,EACpD,+BAA+B,EAC/B,iBAAiB,IAAI,qBAAqB,EAC1C,mBAAmB,IAAI,uBAAuB,EAE9C,MAAM,EAGN,mBAAmB,EACnB,oBAAoB,IAAI,wBAAwB,EAChD,wBAAwB,IAAI,4BAA4B,EACxD,MAAM,EACN,UAAU,EACX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,mBAAmB,EAAe,MAAM,eAAe,CAAC;AAIjE,OAAO,cAAc,GAAG,OAAO,CA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