@bitgo-beta/abstract-eth 1.2.3-alpha.47 → 1.2.3-alpha.470

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.
Files changed (154) hide show
  1. package/dist/src/abstractEthLikeCoin.d.ts +18 -9
  2. package/dist/src/abstractEthLikeCoin.d.ts.map +1 -1
  3. package/dist/src/abstractEthLikeCoin.js +39 -15
  4. package/dist/src/abstractEthLikeNewCoins.d.ts +846 -0
  5. package/dist/src/abstractEthLikeNewCoins.d.ts.map +1 -0
  6. package/dist/src/abstractEthLikeNewCoins.js +2528 -0
  7. package/dist/src/ethLikeToken.d.ts +36 -6
  8. package/dist/src/ethLikeToken.d.ts.map +1 -1
  9. package/dist/src/ethLikeToken.js +286 -10
  10. package/dist/src/index.d.ts +2 -0
  11. package/dist/src/index.d.ts.map +1 -1
  12. package/dist/src/index.js +8 -2
  13. package/dist/src/lib/contractCall.d.ts +8 -0
  14. package/dist/src/lib/contractCall.d.ts.map +1 -0
  15. package/dist/src/lib/contractCall.js +17 -0
  16. package/dist/src/lib/iface.d.ts +133 -0
  17. package/dist/src/lib/iface.d.ts.map +1 -0
  18. package/dist/src/lib/iface.js +8 -0
  19. package/dist/src/lib/index.d.ts +16 -0
  20. package/dist/src/lib/index.d.ts.map +1 -0
  21. package/dist/src/lib/index.js +57 -0
  22. package/dist/src/lib/keyPair.d.ts +26 -0
  23. package/dist/src/lib/keyPair.d.ts.map +1 -0
  24. package/dist/src/lib/keyPair.js +65 -0
  25. package/dist/src/lib/messages/eip191/eip191Message.d.ts +12 -0
  26. package/dist/src/lib/messages/eip191/eip191Message.d.ts.map +1 -0
  27. package/dist/src/lib/messages/eip191/eip191Message.js +25 -0
  28. package/dist/src/lib/messages/eip191/eip191MessageBuilder.d.ts +19 -0
  29. package/dist/src/lib/messages/eip191/eip191MessageBuilder.d.ts.map +1 -0
  30. package/dist/src/lib/messages/eip191/eip191MessageBuilder.js +27 -0
  31. package/dist/src/lib/messages/eip191/index.d.ts +3 -0
  32. package/dist/src/lib/messages/eip191/index.d.ts.map +1 -0
  33. package/dist/src/lib/messages/eip191/index.js +19 -0
  34. package/dist/src/lib/messages/eip712/eip712Message.d.ts +6 -0
  35. package/dist/src/lib/messages/eip712/eip712Message.d.ts.map +1 -0
  36. package/dist/src/lib/messages/eip712/eip712Message.js +27 -0
  37. package/dist/src/lib/messages/eip712/eip712MessageBuilder.d.ts +7 -0
  38. package/dist/src/lib/messages/eip712/eip712MessageBuilder.d.ts.map +1 -0
  39. package/dist/src/lib/messages/eip712/eip712MessageBuilder.js +15 -0
  40. package/dist/src/lib/messages/eip712/index.d.ts +3 -0
  41. package/dist/src/lib/messages/eip712/index.d.ts.map +1 -0
  42. package/dist/src/lib/messages/eip712/index.js +19 -0
  43. package/dist/src/lib/messages/index.d.ts +4 -0
  44. package/dist/src/lib/messages/index.d.ts.map +1 -0
  45. package/dist/src/lib/messages/index.js +20 -0
  46. package/dist/src/lib/messages/messageBuilderFactory.d.ts +7 -0
  47. package/dist/src/lib/messages/messageBuilderFactory.d.ts.map +1 -0
  48. package/dist/src/lib/messages/messageBuilderFactory.js +23 -0
  49. package/dist/src/lib/transaction.d.ts +67 -0
  50. package/dist/src/lib/transaction.d.ts.map +1 -0
  51. package/dist/src/lib/transaction.js +142 -0
  52. package/dist/src/lib/transactionBuilder.d.ts +270 -0
  53. package/dist/src/lib/transactionBuilder.d.ts.map +1 -0
  54. package/dist/src/lib/transactionBuilder.js +822 -0
  55. package/dist/src/lib/transferBuilder.d.ts +76 -0
  56. package/dist/src/lib/transferBuilder.d.ts.map +1 -0
  57. package/dist/src/lib/transferBuilder.js +307 -0
  58. package/dist/src/lib/transferBuilders/baseNFTTransferBuilder.d.ts +54 -0
  59. package/dist/src/lib/transferBuilders/baseNFTTransferBuilder.d.ts.map +1 -0
  60. package/dist/src/lib/transferBuilders/baseNFTTransferBuilder.js +120 -0
  61. package/dist/src/lib/transferBuilders/index.d.ts +4 -0
  62. package/dist/src/lib/transferBuilders/index.d.ts.map +1 -0
  63. package/dist/src/lib/transferBuilders/index.js +20 -0
  64. package/dist/src/lib/transferBuilders/transferBuilderERC1155.d.ts +17 -0
  65. package/dist/src/lib/transferBuilders/transferBuilderERC1155.d.ts.map +1 -0
  66. package/dist/src/lib/transferBuilders/transferBuilderERC1155.js +96 -0
  67. package/dist/src/lib/transferBuilders/transferBuilderERC721.d.ts +16 -0
  68. package/dist/src/lib/transferBuilders/transferBuilderERC721.d.ts.map +1 -0
  69. package/dist/src/lib/transferBuilders/transferBuilderERC721.js +81 -0
  70. package/dist/src/lib/types.d.ts +39 -0
  71. package/dist/src/lib/types.d.ts.map +1 -0
  72. package/dist/src/lib/types.js +137 -0
  73. package/dist/src/lib/utils.d.ts +310 -0
  74. package/dist/src/lib/utils.d.ts.map +1 -0
  75. package/dist/src/lib/utils.js +829 -0
  76. package/dist/src/lib/walletUtil.d.ts +40 -0
  77. package/dist/src/lib/walletUtil.d.ts.map +1 -0
  78. package/dist/src/lib/walletUtil.js +43 -0
  79. package/dist/src/types.d.ts +9 -0
  80. package/dist/src/types.d.ts.map +1 -0
  81. package/dist/src/types.js +3 -0
  82. package/dist/test/index.d.ts +2 -0
  83. package/dist/test/index.d.ts.map +1 -0
  84. package/dist/test/index.js +18 -0
  85. package/dist/test/unit/coin.d.ts +8 -0
  86. package/dist/test/unit/coin.d.ts.map +1 -0
  87. package/dist/test/unit/coin.js +577 -0
  88. package/dist/test/unit/index.d.ts +6 -0
  89. package/dist/test/unit/index.d.ts.map +1 -0
  90. package/dist/test/unit/index.js +22 -0
  91. package/dist/test/unit/messages/abstractEthMessageBuilderTests.d.ts +3 -0
  92. package/dist/test/unit/messages/abstractEthMessageBuilderTests.d.ts.map +1 -0
  93. package/dist/test/unit/messages/abstractEthMessageBuilderTests.js +110 -0
  94. package/dist/test/unit/messages/abstractEthMessageTestTypes.d.ts +43 -0
  95. package/dist/test/unit/messages/abstractEthMessageTestTypes.d.ts.map +1 -0
  96. package/dist/test/unit/messages/abstractEthMessageTestTypes.js +3 -0
  97. package/dist/test/unit/messages/abstractEthMessagesTests.d.ts +3 -0
  98. package/dist/test/unit/messages/abstractEthMessagesTests.d.ts.map +1 -0
  99. package/dist/test/unit/messages/abstractEthMessagesTests.js +129 -0
  100. package/dist/test/unit/messages/eip191/eip191Message.d.ts +2 -0
  101. package/dist/test/unit/messages/eip191/eip191Message.d.ts.map +1 -0
  102. package/dist/test/unit/messages/eip191/eip191Message.js +15 -0
  103. package/dist/test/unit/messages/eip191/eip191MessageBuilder.d.ts +2 -0
  104. package/dist/test/unit/messages/eip191/eip191MessageBuilder.d.ts.map +1 -0
  105. package/dist/test/unit/messages/eip191/eip191MessageBuilder.js +16 -0
  106. package/dist/test/unit/messages/eip191/fixtures.d.ts +109 -0
  107. package/dist/test/unit/messages/eip191/fixtures.d.ts.map +1 -0
  108. package/dist/test/unit/messages/eip191/fixtures.js +63 -0
  109. package/dist/test/unit/messages/eip712/eip712Message.d.ts +2 -0
  110. package/dist/test/unit/messages/eip712/eip712Message.d.ts.map +1 -0
  111. package/dist/test/unit/messages/eip712/eip712Message.js +15 -0
  112. package/dist/test/unit/messages/eip712/eip712MessageBuilder.d.ts +2 -0
  113. package/dist/test/unit/messages/eip712/eip712MessageBuilder.d.ts.map +1 -0
  114. package/dist/test/unit/messages/eip712/eip712MessageBuilder.js +16 -0
  115. package/dist/test/unit/messages/eip712/fixtures.d.ts +76 -0
  116. package/dist/test/unit/messages/eip712/fixtures.d.ts.map +1 -0
  117. package/dist/test/unit/messages/eip712/fixtures.js +120 -0
  118. package/dist/test/unit/messages/index.d.ts +4 -0
  119. package/dist/test/unit/messages/index.d.ts.map +1 -0
  120. package/dist/test/unit/messages/index.js +20 -0
  121. package/dist/test/unit/messages/messageBuilderFactory.d.ts +2 -0
  122. package/dist/test/unit/messages/messageBuilderFactory.d.ts.map +1 -0
  123. package/dist/test/unit/messages/messageBuilderFactory.js +52 -0
  124. package/dist/test/unit/token.d.ts +2 -0
  125. package/dist/test/unit/token.d.ts.map +1 -0
  126. package/dist/test/unit/token.js +37 -0
  127. package/dist/test/unit/transaction.d.ts +3 -0
  128. package/dist/test/unit/transaction.d.ts.map +1 -0
  129. package/dist/test/unit/transaction.js +60 -0
  130. package/dist/test/unit/transactionBuilder/addressInitialization.d.ts +8 -0
  131. package/dist/test/unit/transactionBuilder/addressInitialization.d.ts.map +1 -0
  132. package/dist/test/unit/transactionBuilder/addressInitialization.js +95 -0
  133. package/dist/test/unit/transactionBuilder/flushNft.d.ts +2 -0
  134. package/dist/test/unit/transactionBuilder/flushNft.d.ts.map +1 -0
  135. package/dist/test/unit/transactionBuilder/flushNft.js +381 -0
  136. package/dist/test/unit/transactionBuilder/index.d.ts +5 -0
  137. package/dist/test/unit/transactionBuilder/index.d.ts.map +1 -0
  138. package/dist/test/unit/transactionBuilder/index.js +21 -0
  139. package/dist/test/unit/transactionBuilder/send.d.ts +3 -0
  140. package/dist/test/unit/transactionBuilder/send.d.ts.map +1 -0
  141. package/dist/test/unit/transactionBuilder/send.js +197 -0
  142. package/dist/test/unit/transactionBuilder/walletInitialization.d.ts +10 -0
  143. package/dist/test/unit/transactionBuilder/walletInitialization.d.ts.map +1 -0
  144. package/dist/test/unit/transactionBuilder/walletInitialization.js +124 -0
  145. package/dist/test/unit/transferBuilder.d.ts +2 -0
  146. package/dist/test/unit/transferBuilder.d.ts.map +1 -0
  147. package/dist/test/unit/transferBuilder.js +76 -0
  148. package/dist/test/unit/utils.d.ts +2 -0
  149. package/dist/test/unit/utils.d.ts.map +1 -0
  150. package/dist/test/unit/utils.js +184 -0
  151. package/dist/tsconfig.tsbuildinfo +1 -8436
  152. package/package.json +34 -10
  153. package/.eslintignore +0 -5
  154. package/CHANGELOG.md +0 -178
@@ -0,0 +1,846 @@
1
+ /**
2
+ * @prettier
3
+ */
4
+ import { AddressCoinSpecific, BitGoBase, BuildNftTransferDataOptions, FeeEstimateOptions, FullySignedTransaction, HalfSignedTransaction, IWallet, KeyPair, MPCSweepRecoveryOptions, MPCSweepTxs, MPCTxs, ParsedTransaction, ParseTransactionOptions, PrebuildTransactionResult, PresignTransactionOptions as BasePresignTransactionOptions, Recipient, SignTransactionOptions as BaseSignTransactionOptions, TransactionParams, TransactionPrebuild as BaseTransactionPrebuild, TransactionRecipient, TypedData, UnsignedTransactionTss, VerifyAddressOptions as BaseVerifyAddressOptions, VerifyTransactionOptions, Wallet, TssVerifyAddressOptions } from '@bitgo-beta/sdk-core';
5
+ import { BaseCoin as StaticsBaseCoin, EthereumNetwork as EthLikeNetwork } from '@bitgo-beta/statics';
6
+ import type * as EthLikeCommon from '@ethereumjs/common';
7
+ import type * as EthLikeTxLib from '@ethereumjs/tx';
8
+ import BN from 'bn.js';
9
+ import { AbstractEthLikeCoin } from './abstractEthLikeCoin';
10
+ import { SendCrossChainRecoveryOptions } from './types';
11
+ /**
12
+ * The prebuilt hop transaction returned from the HSM
13
+ */
14
+ interface HopPrebuild {
15
+ tx: string;
16
+ id: string;
17
+ signature: string;
18
+ paymentId: string;
19
+ gasPrice: number;
20
+ gasLimit: number;
21
+ amount: number;
22
+ recipient: string;
23
+ nonce: number;
24
+ userReqSig: string;
25
+ gasPriceMax: number;
26
+ }
27
+ /**
28
+ * The extra parameters to send to platform build route for hop transactions
29
+ */
30
+ interface HopParams {
31
+ hopParams: {
32
+ gasPriceMax: number;
33
+ userReqSig: string;
34
+ paymentId: string;
35
+ gasLimit: number;
36
+ };
37
+ }
38
+ export interface EIP1559 {
39
+ maxPriorityFeePerGas: number;
40
+ maxFeePerGas: number;
41
+ }
42
+ export interface ReplayProtectionOptions {
43
+ chain: string | number;
44
+ hardfork: string;
45
+ }
46
+ export interface TransactionPrebuild extends BaseTransactionPrebuild {
47
+ hopTransaction?: HopPrebuild;
48
+ buildParams: {
49
+ recipients: Recipient[];
50
+ };
51
+ recipients: TransactionRecipient[];
52
+ nextContractSequenceId: number;
53
+ gasPrice: number;
54
+ gasLimit: number;
55
+ isBatch: boolean;
56
+ coin: string;
57
+ token?: string;
58
+ }
59
+ export interface SignFinalOptions {
60
+ txPrebuild: {
61
+ eip1559?: EIP1559;
62
+ replayProtectionOptions?: ReplayProtectionOptions;
63
+ gasPrice?: string;
64
+ gasLimit?: string;
65
+ recipients?: Recipient[];
66
+ halfSigned?: {
67
+ expireTime: number;
68
+ contractSequenceId: number;
69
+ backupKeyNonce?: number;
70
+ signature: string;
71
+ txHex?: string;
72
+ };
73
+ nextContractSequenceId?: number;
74
+ hopTransaction?: string;
75
+ backupKeyNonce?: number;
76
+ isBatch?: boolean;
77
+ txHex?: string;
78
+ expireTime?: number;
79
+ };
80
+ signingKeyNonce?: number;
81
+ walletContractAddress?: string;
82
+ prv: string;
83
+ recipients?: Recipient[];
84
+ common?: EthLikeCommon.default;
85
+ }
86
+ export interface SignTransactionOptions extends BaseSignTransactionOptions, SignFinalOptions {
87
+ isLastSignature?: boolean;
88
+ expireTime?: number;
89
+ sequenceId?: number;
90
+ gasLimit?: number;
91
+ gasPrice?: number;
92
+ custodianTransactionId?: string;
93
+ common?: EthLikeCommon.default;
94
+ walletVersion?: number;
95
+ }
96
+ export type SignedTransaction = HalfSignedTransaction | FullySignedTransaction;
97
+ export interface FeesUsed {
98
+ gasPrice: number;
99
+ gasLimit: number;
100
+ }
101
+ interface PrecreateBitGoOptions {
102
+ enterprise?: string;
103
+ newFeeAddress?: string;
104
+ }
105
+ export interface OfflineVaultTxInfo {
106
+ nextContractSequenceId?: string;
107
+ contractSequenceId?: string;
108
+ tx?: string;
109
+ txHex?: string;
110
+ userKey?: string;
111
+ backupKey?: string;
112
+ coin: string;
113
+ gasPrice: number;
114
+ gasLimit: number;
115
+ recipients: Recipient[];
116
+ walletContractAddress: string;
117
+ amount: string;
118
+ backupKeyNonce: number;
119
+ eip1559?: EIP1559;
120
+ replayProtectionOptions?: ReplayProtectionOptions;
121
+ halfSigned?: HalfSignedTransaction;
122
+ feesUsed?: FeesUsed;
123
+ isEvmBasedCrossChainRecovery?: boolean;
124
+ walletVersion?: number;
125
+ }
126
+ interface UnformattedTxInfo {
127
+ recipient: Recipient;
128
+ }
129
+ export type UnsignedSweepTxMPCv2 = {
130
+ txRequests: {
131
+ transactions: [
132
+ {
133
+ unsignedTx: UnsignedTransactionTss;
134
+ nonce: number;
135
+ signatureShares: [];
136
+ }
137
+ ];
138
+ walletCoin: string;
139
+ }[];
140
+ };
141
+ export type UnsignedBuilConsolidation = {
142
+ transactions: MPCSweepTxs[] | UnsignedSweepTxMPCv2[] | RecoveryInfo[] | OfflineVaultTxInfo[];
143
+ lastScanIndex: number;
144
+ };
145
+ export type RecoverOptionsWithBytes = {
146
+ isTss: true;
147
+ /**
148
+ * @deprecated this is no longer used
149
+ */
150
+ openSSLBytes?: Uint8Array;
151
+ };
152
+ export type NonTSSRecoverOptions = {
153
+ isTss?: false | undefined;
154
+ };
155
+ export type TSSRecoverOptions = RecoverOptionsWithBytes | NonTSSRecoverOptions;
156
+ export type RecoverOptions = {
157
+ userKey: string;
158
+ backupKey: string;
159
+ walletPassphrase?: string;
160
+ walletContractAddress: string;
161
+ recoveryDestination: string;
162
+ krsProvider?: string;
163
+ gasPrice?: number;
164
+ gasLimit?: number;
165
+ eip1559?: EIP1559;
166
+ replayProtectionOptions?: ReplayProtectionOptions;
167
+ bitgoFeeAddress?: string;
168
+ bitgoDestinationAddress?: string;
169
+ tokenContractAddress?: string;
170
+ intendedChain?: string;
171
+ common?: EthLikeCommon.default;
172
+ derivationSeed?: string;
173
+ apiKey?: string;
174
+ isUnsignedSweep?: boolean;
175
+ } & TSSRecoverOptions;
176
+ export type GetBatchExecutionInfoRT = {
177
+ values: [string[], string[]];
178
+ totalAmount: string;
179
+ };
180
+ export interface BuildTransactionParams {
181
+ to: string;
182
+ nonce?: number;
183
+ value: number;
184
+ data?: Buffer;
185
+ gasPrice?: number;
186
+ gasLimit?: number;
187
+ eip1559?: EIP1559;
188
+ replayProtectionOptions?: ReplayProtectionOptions;
189
+ }
190
+ export interface RecoveryInfo {
191
+ id: string;
192
+ tx: string;
193
+ backupKey?: string;
194
+ coin?: string;
195
+ }
196
+ export interface RecoverTokenTransaction {
197
+ halfSigned: {
198
+ recipient: Recipient;
199
+ expireTime: number;
200
+ contractSequenceId: number;
201
+ operationHash: string;
202
+ signature: string;
203
+ gasLimit: number;
204
+ gasPrice: number;
205
+ tokenContractAddress: string;
206
+ walletId: string;
207
+ };
208
+ }
209
+ export interface RecoverTokenOptions {
210
+ tokenContractAddress: string;
211
+ wallet: Wallet;
212
+ recipient: string;
213
+ broadcast?: boolean;
214
+ walletPassphrase?: string;
215
+ prv?: string;
216
+ }
217
+ export interface GetSendMethodArgsOptions {
218
+ recipient: Recipient;
219
+ expireTime: number;
220
+ contractSequenceId: number;
221
+ signature: string;
222
+ }
223
+ export interface SendMethodArgs {
224
+ name: string;
225
+ type: string;
226
+ value: any;
227
+ }
228
+ interface HopTransactionBuildOptions {
229
+ wallet: Wallet;
230
+ recipients: Recipient[];
231
+ walletPassphrase: string;
232
+ }
233
+ export interface BuildOptions {
234
+ hop?: boolean;
235
+ wallet?: Wallet;
236
+ recipients?: Recipient[];
237
+ walletPassphrase?: string;
238
+ [index: string]: unknown;
239
+ }
240
+ interface FeeEstimate {
241
+ gasLimitEstimate: number;
242
+ feeEstimate: number;
243
+ }
244
+ interface EthTransactionParams extends TransactionParams {
245
+ gasPrice?: number;
246
+ gasLimit?: number;
247
+ hopParams?: HopParams;
248
+ hop?: boolean;
249
+ prebuildTx?: PrebuildTransactionResult;
250
+ tokenName?: string;
251
+ }
252
+ export interface VerifyEthTransactionOptions extends VerifyTransactionOptions {
253
+ txPrebuild: TransactionPrebuild;
254
+ txParams: EthTransactionParams;
255
+ }
256
+ interface PresignTransactionOptions extends TransactionPrebuild, BasePresignTransactionOptions {
257
+ wallet: Wallet;
258
+ }
259
+ interface EthAddressCoinSpecifics extends AddressCoinSpecific {
260
+ forwarderVersion: number;
261
+ salt?: string;
262
+ feeAddress?: string;
263
+ }
264
+ export declare const DEFAULT_SCAN_FACTOR = 20;
265
+ export interface EthConsolidationRecoveryOptions {
266
+ coinName?: string;
267
+ walletContractAddress?: string;
268
+ apiKey?: string;
269
+ isTss?: boolean;
270
+ userKey?: string;
271
+ backupKey?: string;
272
+ walletPassphrase?: string;
273
+ recoveryDestination?: string;
274
+ krsProvider?: string;
275
+ gasPrice?: number;
276
+ gasLimit?: number;
277
+ eip1559?: EIP1559;
278
+ replayProtectionOptions?: ReplayProtectionOptions;
279
+ bitgoFeeAddress?: string;
280
+ bitgoDestinationAddress?: string;
281
+ tokenContractAddress?: string;
282
+ intendedChain?: string;
283
+ common?: EthLikeCommon.default;
284
+ derivationSeed?: string;
285
+ bitgoKey?: string;
286
+ startingScanIndex?: number;
287
+ endingScanIndex?: number;
288
+ ignoreAddressTypes?: unknown;
289
+ }
290
+ export interface VerifyEthAddressOptions extends BaseVerifyAddressOptions {
291
+ baseAddress: string;
292
+ coinSpecific: EthAddressCoinSpecifics;
293
+ forwarderVersion?: number;
294
+ walletVersion?: number;
295
+ }
296
+ export type TssVerifyEthAddressOptions = TssVerifyAddressOptions & VerifyEthAddressOptions;
297
+ /**
298
+ * Keychain with ethAddress for BIP32 wallet verification (V1, V2, V4)
299
+ * Used for wallets that derive addresses using Ethereum addresses from keychains
300
+ */
301
+ export interface KeychainWithEthAddress {
302
+ ethAddress: string;
303
+ pub: string;
304
+ }
305
+ /**
306
+ * BIP32 wallet base address verification options
307
+ * Supports V1, V2, and V4 wallets that use ethAddress-based derivation
308
+ */
309
+ export interface VerifyContractBaseAddressOptions extends VerifyEthAddressOptions {
310
+ walletVersion: number;
311
+ keychains: KeychainWithEthAddress[];
312
+ }
313
+ /**
314
+ * Type guard to check if params are for BIP32 base address verification (V1, V2, V4)
315
+ * These wallet versions use ethAddress for address derivation
316
+ */
317
+ export declare function isVerifyContractBaseAddressOptions(params: VerifyEthAddressOptions | TssVerifyEthAddressOptions): params is VerifyContractBaseAddressOptions;
318
+ export declare const optionalDeps: {
319
+ readonly ethAbi: any;
320
+ readonly ethUtil: any;
321
+ readonly EthTx: typeof EthLikeTxLib;
322
+ readonly EthCommon: typeof EthLikeCommon;
323
+ };
324
+ export declare abstract class AbstractEthLikeNewCoins extends AbstractEthLikeCoin {
325
+ static hopTransactionSalt: string;
326
+ protected readonly sendMethodName: 'sendMultiSig' | 'sendMultiSigToken';
327
+ readonly staticsCoin?: Readonly<StaticsBaseCoin>;
328
+ protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>);
329
+ /**
330
+ * Method to return the coin's network object
331
+ * @returns {EthLikeNetwork | undefined}
332
+ */
333
+ getNetwork(): EthLikeNetwork | undefined;
334
+ /**
335
+ * Evaluates whether an address string is valid for this coin
336
+ * @param {string} address
337
+ * @returns {boolean} True if address is the valid ethlike adderss
338
+ */
339
+ isValidAddress(address: string): boolean;
340
+ /**
341
+ * Flag for sending data along with transactions
342
+ * @returns {boolean} True if okay to send tx data (ETH), false otherwise
343
+ */
344
+ transactionDataAllowed(): boolean;
345
+ /** @inheritDoc */
346
+ supportsMessageSigning(): boolean;
347
+ /** @inheritDoc */
348
+ supportsSigningTypedData(): boolean;
349
+ /**
350
+ * Default expire time for a contract call (1 week)
351
+ * @returns {number} Time in seconds
352
+ */
353
+ getDefaultExpireTime(): number;
354
+ /**
355
+ * Method to get the custom chain common object based on params from recovery
356
+ * @param {number} chainId - the chain id of the custom chain
357
+ * @returns {EthLikeCommon.default}
358
+ */
359
+ static getCustomChainCommon(chainId: number): EthLikeCommon.default;
360
+ /**
361
+ * Gets correct Eth Common object based on params from either recovery or tx building
362
+ * @param {EIP1559} eip1559 - configs that specify whether we should construct an eip1559 tx
363
+ * @param {ReplayProtectionOptions} replayProtectionOptions - check if chain id supports replay protection
364
+ * @returns {EthLikeCommon.default}
365
+ */
366
+ private static getEthLikeCommon;
367
+ /**
368
+ * Method to build the tx object
369
+ * @param {BuildTransactionParams} params - params to build transaction
370
+ * @returns {EthLikeTxLib.FeeMarketEIP1559Transaction | EthLikeTxLib.Transaction}
371
+ */
372
+ static buildTransaction(params: BuildTransactionParams): EthLikeTxLib.FeeMarketEIP1559Transaction | EthLikeTxLib.Transaction;
373
+ /**
374
+ * Query explorer for the balance of an address
375
+ * @param {String} address - the ETHLike address
376
+ * @param {String} apiKey - optional API key to use instead of the one from the environment
377
+ * @returns {BigNumber} address balance
378
+ */
379
+ queryAddressBalance(address: string, apiKey?: string): Promise<any>;
380
+ /**
381
+ * @param {Recipient[]} recipients - the recipients of the transaction
382
+ * @param {number} expireTime - the expire time of the transaction
383
+ * @param {number} contractSequenceId - the contract sequence id of the transaction
384
+ * @returns {string}
385
+ */
386
+ getOperationSha3ForExecuteAndConfirm(recipients: Recipient[], expireTime: number, contractSequenceId: number): string;
387
+ /**
388
+ * Get transfer operation for coin
389
+ * @param {Recipient} recipient - recipient info
390
+ * @param {number} expireTime - expiry time
391
+ * @param {number} contractSequenceId - sequence id
392
+ * @returns {Array} operation array
393
+ */
394
+ getOperation(recipient: Recipient, expireTime: number, contractSequenceId: number): (string | Buffer)[][];
395
+ /**
396
+ * Queries the contract (via explorer API) for the next sequence ID
397
+ * @param {String} address - address of the contract
398
+ * @param {String} apiKey - optional API key to use instead of the one from the environment
399
+ * @returns {Promise<Number>} sequence ID
400
+ */
401
+ querySequenceId(address: string, apiKey?: string): Promise<number>;
402
+ /**
403
+ * Recover an unsupported token from a BitGo multisig wallet
404
+ * This builds a half-signed transaction, for which there will be an admin route to co-sign and broadcast. Optionally
405
+ * the user can set params.broadcast = true and the half-signed tx will be sent to BitGo for cosigning and broadcasting
406
+ * @param {RecoverTokenOptions} params
407
+ * @param {Wallet} params.wallet - the wallet to recover the token from
408
+ * @param {string} params.tokenContractAddress - the contract address of the unsupported token
409
+ * @param {string} params.recipient - the destination address recovered tokens should be sent to
410
+ * @param {string} params.walletPassphrase - the wallet passphrase
411
+ * @param {string} params.prv - the xprv
412
+ * @param {boolean} params.broadcast - if true, we will automatically submit the half-signed tx to BitGo for cosigning and broadcasting
413
+ * @returns {Promise<RecoverTokenTransaction>}
414
+ */
415
+ recoverToken(params: RecoverTokenOptions): Promise<RecoverTokenTransaction>;
416
+ /**
417
+ * Ensure either enterprise or newFeeAddress is passed, to know whether to create new key or use enterprise key
418
+ * @param {PrecreateBitGoOptions} params
419
+ * @param {string} params.enterprise {String} the enterprise id to associate with this key
420
+ * @param {string} params.newFeeAddress {Boolean} create a new fee address (enterprise not needed in this case)
421
+ * @returns {void}
422
+ */
423
+ preCreateBitGo(params: PrecreateBitGoOptions): void;
424
+ /**
425
+ * Queries public block explorer to get the next ETHLike coin's nonce that should be used for the given ETH address
426
+ * @param {string} address
427
+ * @param {string} apiKey - optional API key to use instead of the one from the environment
428
+ * @returns {Promise<number>}
429
+ */
430
+ getAddressNonce(address: string, apiKey?: string): Promise<number>;
431
+ /**
432
+ * Helper function for recover()
433
+ * This transforms the unsigned transaction information into a format the BitGo offline vault expects
434
+ * @param {UnformattedTxInfo} txInfo - tx info
435
+ * @param {EthLikeTxLib.Transaction | EthLikeTxLib.FeeMarketEIP1559Transaction} ethTx - the ethereumjs tx object
436
+ * @param {string} userKey - the user's key
437
+ * @param {string} backupKey - the backup key
438
+ * @param {Buffer} gasPrice - gas price for the tx
439
+ * @param {number} gasLimit - gas limit for the tx
440
+ * @param {EIP1559} eip1559 - eip1559 params
441
+ * @param {ReplayProtectionOptions} replayProtectionOptions - replay protection options
442
+ * @param {apiKey} apiKey - optional apiKey to use when retrieving block chain data
443
+ * @returns {Promise<OfflineVaultTxInfo>}
444
+ */
445
+ formatForOfflineVault(txInfo: UnformattedTxInfo, ethTx: EthLikeTxLib.Transaction | EthLikeTxLib.FeeMarketEIP1559Transaction, userKey: string, backupKey: string, gasPrice: Buffer, gasLimit: number, eip1559?: EIP1559, replayProtectionOptions?: ReplayProtectionOptions, apiKey?: string): Promise<OfflineVaultTxInfo>;
446
+ /**
447
+ * Helper function for recover()
448
+ * This transforms the unsigned transaction information into a format the BitGo offline vault expects
449
+ * @param {UnformattedTxInfo} txInfo - tx info
450
+ * @param {EthLikeTxLib.Transaction | EthLikeTxLib.FeeMarketEIP1559Transaction} ethTx - the ethereumjs tx object
451
+ * @param {string} userKey - the user's key
452
+ * @param {string} backupKey - the backup key
453
+ * @param {Buffer} gasPrice - gas price for the tx
454
+ * @param {number} gasLimit - gas limit for the tx
455
+ * @param {number} backupKeyNonce - the nonce of the backup key address
456
+ * @param {EIP1559} eip1559 - eip1559 params
457
+ * @param {ReplayProtectionOptions} replayProtectionOptions - replay protection options
458
+ * @returns {Promise<OfflineVaultTxInfo>}
459
+ */
460
+ formatForOfflineVaultTSS(txInfo: UnformattedTxInfo, ethTx: EthLikeTxLib.Transaction | EthLikeTxLib.FeeMarketEIP1559Transaction, userKey: string, backupKey: string, gasPrice: Buffer, gasLimit: number, backupKeyNonce: number, eip1559?: EIP1559, replayProtectionOptions?: ReplayProtectionOptions): OfflineVaultTxInfo;
461
+ /**
462
+ * Check whether the gas price passed in by user are within our max and min bounds
463
+ * If they are not set, set them to the defaults
464
+ * @param {number} userGasPrice - user defined gas price
465
+ * @returns {number} the gas price to use for this transaction
466
+ */
467
+ setGasPrice(userGasPrice?: number): number;
468
+ /**
469
+ * Check whether gas limit passed in by user are within our max and min bounds
470
+ * If they are not set, set them to the defaults
471
+ * @param {number} userGasLimit user defined gas limit
472
+ * @returns {number} the gas limit to use for this transaction
473
+ */
474
+ setGasLimit(userGasLimit?: number): number;
475
+ /**
476
+ * Helper function for signTransaction for the rare case that SDK is doing the second signature
477
+ * Note: we are expecting this to be called from the offline vault
478
+ * @param {SignFinalOptions.txPrebuild} params.txPrebuild
479
+ * @param {string} params.prv
480
+ * @returns {{txHex: string}}
481
+ */
482
+ signFinalEthLike(params: SignFinalOptions): Promise<FullySignedTransaction>;
483
+ /**
484
+ * Assemble half-sign prebuilt transaction
485
+ * @param {SignTransactionOptions} params
486
+ */
487
+ signTransaction(params: SignTransactionOptions): Promise<SignedTransaction>;
488
+ /**
489
+ * Method to validate recovery params
490
+ * @param {RecoverOptions} params
491
+ * @returns {void}
492
+ */
493
+ validateRecoveryParams(params: RecoverOptions): void;
494
+ /**
495
+ * Helper which Adds signatures to tx object and re-serializes tx
496
+ * @param {EthLikeCommon.default} ethCommon
497
+ * @param {EthLikeTxLib.FeeMarketEIP1559Transaction | EthLikeTxLib.Transaction} tx
498
+ * @param {ECDSAMethodTypes.Signature} signature
499
+ * @returns {EthLikeTxLib.FeeMarketEIP1559Transaction | EthLikeTxLib.Transaction}
500
+ */
501
+ private getSignedTxFromSignature;
502
+ /**
503
+ * Builds a funds recovery transaction without BitGo
504
+ * @param params
505
+ * @param {string} params.userKey - [encrypted] xprv
506
+ * @param {string} params.backupKey - [encrypted] xprv or xpub if the xprv is held by a KRS provider
507
+ * @param {string} params.walletPassphrase - used to decrypt userKey and backupKey
508
+ * @param {string} params.walletContractAddress - the ETH address of the wallet contract
509
+ * @param {string} params.krsProvider - necessary if backup key is held by KRS
510
+ * @param {string} params.recoveryDestination - target address to send recovered funds to
511
+ * @param {string} params.bitgoFeeAddress - wrong chain wallet fee address for evm based cross chain recovery txn
512
+ * @param {string} params.bitgoDestinationAddress - target bitgo address where fee will be sent for evm based cross chain recovery txn
513
+ */
514
+ recover(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo | UnsignedSweepTxMPCv2>;
515
+ generateForwarderAddress(baseAddress: string, feeAddress: string, forwarderFactoryAddress: string, forwarderImplementationAddress: string, index: number): string;
516
+ deriveAddressFromPublicKey(commonKeychain: string, index: number): string;
517
+ getConsolidationAddress(params: EthConsolidationRecoveryOptions, index: number): string[];
518
+ recoverConsolidations(params: EthConsolidationRecoveryOptions): Promise<UnsignedBuilConsolidation>;
519
+ /**
520
+ * Builds a funds recovery transaction without BitGo for non-TSS transaction
521
+ * @param params
522
+ * @param {string} params.userKey [encrypted] xprv or xpub
523
+ * @param {string} params.backupKey [encrypted] xprv or xpub if the xprv is held by a KRS provider
524
+ * @param {string} params.walletPassphrase used to decrypt userKey and backupKey
525
+ * @param {string} params.walletContractAddress the EthLike address of the wallet contract
526
+ * @param {string} params.krsProvider necessary if backup key is held by KRS
527
+ * @param {string} params.recoveryDestination target address to send recovered funds to
528
+ * @param {string} params.bitgoFeeAddress wrong chain wallet fee address for evm based cross chain recovery txn
529
+ * @param {string} params.bitgoDestinationAddress target bitgo address where fee will be sent for evm based cross chain recovery txn
530
+ * @returns {Promise<RecoveryInfo | OfflineVaultTxInfo>}
531
+ */
532
+ protected recoverEthLike(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
533
+ /**
534
+ * Extract recipients from transaction hex
535
+ * @param txHex - The transaction hex string
536
+ * @returns Array of recipients with address and amount
537
+ */
538
+ private extractRecipientsFromTxHex;
539
+ sendCrossChainRecoveryTransaction(params: SendCrossChainRecoveryOptions): Promise<{
540
+ coin: string;
541
+ txHex?: string;
542
+ txid: string;
543
+ }>;
544
+ buildCrossChainRecoveryTransaction(recoveryId: string): Promise<{
545
+ coin: string;
546
+ txHex: string;
547
+ txid: string;
548
+ walletVersion?: number;
549
+ recipients: Array<{
550
+ address: string;
551
+ amount: string;
552
+ }>;
553
+ }>;
554
+ /**
555
+ * Builds a unsigned (for cold, custody wallet) or
556
+ * half-signed (for hot wallet) evm cross chain recovery transaction with
557
+ * same expected arguments as recover method.
558
+ * This helps recover funds from evm based wrong chain.
559
+ * @param {RecoverOptions} params
560
+ * @returns {Promise<RecoveryInfo | OfflineVaultTxInfo>}
561
+ */
562
+ protected recoverEthLikeforEvmBasedRecovery(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
563
+ /**
564
+ * Query explorer for the balance of an address for a token
565
+ * @param {string} tokenContractAddress - address where the token smart contract is hosted
566
+ * @param {string} walletContractAddress - address of the wallet
567
+ * @param {string} apiKey - optional API key to use instead of the one from the environment
568
+ * @returns {BigNumber} token balaance in base units
569
+ */
570
+ queryAddressTokenBalance(tokenContractAddress: string, walletContractAddress: string, apiKey?: string): Promise<any>;
571
+ recoverEthLikeTokenforEvmBasedRecovery(params: RecoverOptions, bitgoFeeAddressNonce: number, gasLimit: any, gasPrice: any, userKey: any, userSigningKey: any, apiKey?: string): Promise<OfflineVaultTxInfo>;
572
+ /**
573
+ * Validate evm based cross chain recovery params
574
+ * @param params {RecoverOptions}
575
+ * @returns {void}
576
+ */
577
+ validateEvmBasedRecoveryParams(params: RecoverOptions): void;
578
+ /**
579
+ * Return types, values, and total amount in wei to send in a batch transaction, using the method signature
580
+ * `distributeBatch(address[], uint256[])`
581
+ * @param {Recipient[]} recipients - transaction recipients
582
+ * @returns {GetBatchExecutionInfoRT} information needed to execute the batch transaction
583
+ */
584
+ getBatchExecutionInfo(recipients: Recipient[]): GetBatchExecutionInfoRT;
585
+ /**
586
+ * Get the data required to make an ETH function call defined by the given types and values
587
+ *
588
+ * @param {string} functionName - The name of the function being called, e.g. transfer
589
+ * @param types The types of the function call in order
590
+ * @param values The values of the function call in order
591
+ * @return {Buffer} The combined data for the function call
592
+ */
593
+ getMethodCallData: (functionName: any, types: any, values: any) => Buffer<ArrayBuffer>;
594
+ /**
595
+ * Build arguments to call the send method on the wallet contract
596
+ * @param txInfo
597
+ */
598
+ getSendMethodArgs(txInfo: GetSendMethodArgsOptions): SendMethodArgs[];
599
+ /**
600
+ * Recovers a tx with TSS key shares
601
+ * same expected arguments as recover method, but with TSS key shares
602
+ */
603
+ protected recoverTSS(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo | UnsignedSweepTxMPCv2>;
604
+ private getGasValues;
605
+ protected buildUnsignedSweepTxnTSS(params: RecoverOptions): Promise<OfflineVaultTxInfo | UnsignedSweepTxMPCv2>;
606
+ protected buildUnsignedSweepTxnMPCv2(params: RecoverOptions): Promise<UnsignedSweepTxMPCv2>;
607
+ createBroadcastableSweepTransaction(params: MPCSweepRecoveryOptions): Promise<MPCTxs>;
608
+ /**
609
+ * Method to validate recovery params
610
+ * @param {RecoverOptions} params
611
+ * @returns {void}
612
+ */
613
+ private validateUnsignedSweepTSSParams;
614
+ /**
615
+ * Helper function for recover()
616
+ * This transforms the unsigned transaction information into a format the BitGo offline vault expects
617
+ * @param {UnformattedTxInfo} txInfo - tx info
618
+ * @param {LegacyTransaction | FeeMarketEIP1559Transaction} ethTx - the ethereumjs tx object
619
+ * @param {string} derivationPath - the derivationPath
620
+ * @param {number} nonce - the nonce of the backup key address
621
+ * @param {Buffer} gasPrice - gas price for the tx
622
+ * @param {number} gasLimit - gas limit for the tx
623
+ * @param {EIP1559} eip1559 - eip1559 params
624
+ * @param replayProtectionOptions
625
+ * @param commonKeyChain
626
+ * @returns {Promise<OfflineVaultTxInfo>}
627
+ */
628
+ private buildTxRequestForOfflineVaultMPCv2;
629
+ private buildTssRecoveryTxn;
630
+ validateBalanceAndGetTxAmount(baseAddress: string, gasPrice: BN, gasLimit: BN, apiKey?: string): Promise<any>;
631
+ /**
632
+ * Make a query to blockchain explorer for information such as balance, token balance, solidity calls
633
+ * @param query {Object} key-value pairs of parameters to append after /api
634
+ * @param apiKey {string} optional API key to use instead of the one from the environment
635
+ * @returns {Object} response from the blockchain explorer
636
+ */
637
+ recoveryBlockchainExplorerQuery(query: Record<string, string>, apiKey?: string): Promise<any>;
638
+ /**
639
+ * Creates the extra parameters needed to build a hop transaction
640
+ * @param buildParams The original build parameters
641
+ * @returns extra parameters object to merge with the original build parameters object and send to the platform
642
+ */
643
+ createHopTransactionParams(buildParams: HopTransactionBuildOptions): Promise<HopParams>;
644
+ /**
645
+ * Validates that the hop prebuild from the HSM is valid and correct
646
+ * @param {IWallet} wallet - The wallet that the prebuild is for
647
+ * @param {HopPrebuild} hopPrebuild - The prebuild to validate
648
+ * @param {Object} originalParams - The original parameters passed to prebuildTransaction
649
+ * @param {Recipient[]} originalParams.recipients - The original recipients array
650
+ * @returns {void}
651
+ * @throws Error if The prebuild is invalid
652
+ */
653
+ validateHopPrebuild(wallet: IWallet, hopPrebuild: HopPrebuild, originalParams?: {
654
+ recipients: Recipient[];
655
+ }): Promise<void>;
656
+ /**
657
+ * Gets the hop digest for the user to sign. This is validated in the HSM to prove that the user requested this tx
658
+ * @param {string[]} paramsArr - The parameters to hash together for the digest
659
+ * @returns {Buffer}
660
+ */
661
+ static getHopDigest(paramsArr: string[]): Buffer;
662
+ /**
663
+ * Modify prebuild before sending it to the server. Add things like hop transaction params
664
+ * @param {BuildOptions} buildParams - The whitelisted parameters for this prebuild
665
+ * @param {boolean} buildParams.hop - True if this should prebuild a hop tx, else false
666
+ * @param {Recipient[]} buildParams.recipients - The recipients array of this transaction
667
+ * @param {Wallet} buildParams.wallet - The wallet sending this tx
668
+ * @param {string} buildParams.walletPassphrase - the passphrase for this wallet
669
+ * @returns {Promise<BuildOptions>}
670
+ */
671
+ getExtraPrebuildParams(buildParams: BuildOptions): Promise<BuildOptions>;
672
+ /**
673
+ * Modify prebuild after receiving it from the server. Add things like nlocktime
674
+ * @param {TransactionPrebuild} params - The prebuild to modify
675
+ * @returns {TransactionPrebuild} The modified prebuild
676
+ */
677
+ postProcessPrebuild(params: TransactionPrebuild): Promise<TransactionPrebuild>;
678
+ /**
679
+ * Coin-specific things done before signing a transaction, i.e. verification
680
+ * @param {PresignTransactionOptions} params
681
+ * @returns {Promise<PresignTransactionOptions>}
682
+ */
683
+ presignTransaction(params: PresignTransactionOptions): Promise<PresignTransactionOptions>;
684
+ /**
685
+ * Fetch fee estimate information from the server
686
+ * @param {Object} params - The params passed into the function
687
+ * @param {boolean} [params.hop] - True if we should estimate fee for a hop transaction
688
+ * @param {string} [params.recipient] - The recipient of the transaction to estimate a send to
689
+ * @param {string} [params.data] - The ETH tx data to estimate a send for
690
+ * @returns {Object} The fee info returned from the server
691
+ */
692
+ feeEstimate(params: FeeEstimateOptions): Promise<FeeEstimate>;
693
+ /**
694
+ * Generate secp256k1 key pair
695
+ *
696
+ * @param {Buffer} seed
697
+ * @returns {KeyPair} object with generated pub and prv
698
+ */
699
+ generateKeyPair(seed: Buffer): KeyPair;
700
+ parseTransaction(params: ParseTransactionOptions): Promise<ParsedTransaction>;
701
+ /**
702
+ * Get forwarder factory and implementation addresses for deposit address verification.
703
+ * Forwarders are smart contracts that forward funds to the base wallet address.
704
+ *
705
+ * @param {number | undefined} forwarderVersion - The wallet version
706
+ * @returns {object} Factory and implementation addresses for forwarders
707
+ */
708
+ getForwarderFactoryAddressesAndForwarderImplementationAddress(forwarderVersion: number | undefined): {
709
+ forwarderFactoryAddress: string;
710
+ forwarderImplementationAddress: string;
711
+ };
712
+ /**
713
+ * Get wallet base address factory and implementation addresses.
714
+ * This is used for base address verification for V1, V2, V4, and V5 wallets.
715
+ * The base address is the main wallet contract deployed via CREATE2.
716
+ *
717
+ * @param {number} walletVersion - The wallet version (1, 2, 4, or 5)
718
+ * @returns {object} Factory and implementation addresses for the wallet base address
719
+ * @throws {Error} if wallet version addresses are not configured
720
+ */
721
+ getWalletAddressFactoryAddressesAndImplementationAddress(walletVersion: number): {
722
+ walletFactoryAddress: string;
723
+ walletImplementationAddress: string;
724
+ };
725
+ /**
726
+ * Helper method to create a salt buffer from hex string.
727
+ * Converts a hex salt string to a 32-byte buffer.
728
+ *
729
+ * @param {string} salt - The hex salt string
730
+ * @returns {Buffer} 32-byte salt buffer
731
+ */
732
+ private createSaltBuffer;
733
+ /**
734
+ * Verify BIP32 wallet base address (V1, V2, V4).
735
+ * These wallets use a wallet factory to deploy base addresses with CREATE2.
736
+ * The address is derived from the keychains' ethAddresses and a salt.
737
+ *
738
+ * @param {VerifyBip32BaseAddressOptions} params - Verification parameters
739
+ * @returns {object} Expected and actual addresses for comparison
740
+ */
741
+ private verifyCreate2BaseAddress;
742
+ /**
743
+ * Verify forwarder receive address (deposit address).
744
+ * Forwarder addresses are derived using CREATE2 from the base address and salt.
745
+ *
746
+ * @param {VerifyEthAddressOptions} params - Verification parameters
747
+ * @param {number} forwarderVersion - The forwarder version
748
+ * @returns {object} Expected and actual addresses for comparison
749
+ */
750
+ private verifyForwarderAddress;
751
+ /**
752
+ * Make sure an address is a wallet address and throw an error if it's not.
753
+ * @param {Object} params
754
+ * @param {string} params.address - The derived address string on the network
755
+ * @param {Object} params.coinSpecific - Coin-specific details for the address such as a forwarderVersion
756
+ * @param {string} params.baseAddress - The base address of the wallet on the network
757
+ * @throws {InvalidAddressError}
758
+ * @throws {InvalidAddressVerificationObjectPropertyError}
759
+ * @throws {UnexpectedAddressError}
760
+ * @returns {boolean} True iff address is a wallet address
761
+ */
762
+ isWalletAddress(params: VerifyEthAddressOptions | TssVerifyEthAddressOptions): Promise<boolean>;
763
+ /**
764
+ *
765
+ * @param {TransactionPrebuild} txPrebuild
766
+ * @returns {boolean}
767
+ */
768
+ verifyCoin(txPrebuild: TransactionPrebuild): boolean;
769
+ /**
770
+ * Generate transaction explanation for error reporting
771
+ * @param txPrebuild - Transaction prebuild containing txHex and fee info
772
+ * @returns Stringified JSON explanation
773
+ */
774
+ private getTxExplanation;
775
+ /**
776
+ * Verify if a tss transaction is valid
777
+ *
778
+ * @param {VerifyEthTransactionOptions} params
779
+ * @param {TransactionParams} params.txParams - params object passed to send
780
+ * @param {TransactionPrebuild} params.txPrebuild - prebuild object returned by server
781
+ * @param {Wallet} params.wallet - Wallet object to obtain keys to verify against
782
+ * @returns {boolean}
783
+ * @throws {TxIntentMismatchRecipientError} if transaction recipients don't match user intent
784
+ */
785
+ verifyTssTransaction(params: VerifyEthTransactionOptions): Promise<boolean>;
786
+ /**
787
+ * Verify that a transaction prebuild complies with the original intention
788
+ *
789
+ * @param {VerifyEthTransactionOptions} params
790
+ * @param {TransactionParams} params.txParams - params object passed to send
791
+ * @param {TransactionPrebuild} params.txPrebuild - prebuild object returned by server
792
+ * @param {Wallet} params.wallet - Wallet object to obtain keys to verify against
793
+ * @returns {boolean}
794
+ * @throws {TxIntentMismatchError} if transaction validation fails
795
+ * @throws {TxIntentMismatchRecipientError} if transaction recipients don't match user intent
796
+ */
797
+ verifyTransaction(params: VerifyEthTransactionOptions): Promise<boolean>;
798
+ /**
799
+ * Check if address is valid eth address
800
+ * @param address
801
+ * @returns {boolean}
802
+ */
803
+ private isETHAddress;
804
+ /**
805
+ * Transform message to accommodate specific blockchain requirements.
806
+ * @param {string} message - the message to prepare
807
+ * @return {string} the prepared message as a hex encoded string.
808
+ */
809
+ encodeMessage(message: string): string;
810
+ /**
811
+ * Transform the Typed data to accomodate the blockchain requirements (EIP-712)
812
+ * @param {TypedData} typedData - the typed data to prepare
813
+ * @return {Buffer} a buffer of the result
814
+ */
815
+ encodeTypedData(typedData: TypedData): Buffer;
816
+ /**
817
+ * Build the data to transfer an ERC-721 or ERC-1155 token to another address
818
+ * @param params
819
+ */
820
+ buildNftTransferData(params: BuildNftTransferDataOptions): string;
821
+ /**
822
+ * Fetch the gas price from the explorer
823
+ * @param {string} wrongChainCoin - the coin that we're getting gas price for
824
+ * @param {string} apiKey - optional API key to use instead of the one from the environment
825
+ */
826
+ getGasPriceFromExternalAPI(wrongChainCoin: string, apiKey?: string): Promise<BN>;
827
+ /**
828
+ * Fetch the gas limit from the explorer
829
+ * @param intendedChain
830
+ * @param from
831
+ * @param to
832
+ * @param data
833
+ * @param {string} apiKey - optional API key to use instead of the one from the environment
834
+ */
835
+ getGasLimitFromExternalAPI(intendedChain: string, from: string, to: string, data: string, apiKey?: string): Promise<BN>;
836
+ /**
837
+ * Get the balance of bitgoFeeAddress to ensure funds are available to pay fees
838
+ * @param bitgoFeeAddress
839
+ * @param gasPrice
840
+ * @param gasLimit
841
+ * @param apiKey - optional API key to use instead of the one from the environment
842
+ */
843
+ ensureSufficientBalance(bitgoFeeAddress: string, gasPrice: BN, gasLimit: BN, apiKey?: string): Promise<void>;
844
+ }
845
+ export {};
846
+ //# sourceMappingURL=abstractEthLikeNewCoins.d.ts.map