@bitgo-beta/abstract-eth 1.2.3-alpha.29 → 1.2.3-alpha.291

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 (91) hide show
  1. package/CHANGELOG.md +1581 -0
  2. package/dist/src/abstractEthLikeCoin.d.ts +14 -8
  3. package/dist/src/abstractEthLikeCoin.d.ts.map +1 -1
  4. package/dist/src/abstractEthLikeCoin.js +18 -15
  5. package/dist/src/abstractEthLikeNewCoins.d.ts +658 -0
  6. package/dist/src/abstractEthLikeNewCoins.d.ts.map +1 -0
  7. package/dist/src/abstractEthLikeNewCoins.js +1882 -0
  8. package/dist/src/ethLikeToken.d.ts +35 -5
  9. package/dist/src/ethLikeToken.d.ts.map +1 -1
  10. package/dist/src/ethLikeToken.js +280 -7
  11. package/dist/src/index.d.ts +2 -0
  12. package/dist/src/index.d.ts.map +1 -1
  13. package/dist/src/index.js +8 -2
  14. package/dist/src/lib/contractCall.d.ts +8 -0
  15. package/dist/src/lib/contractCall.d.ts.map +1 -0
  16. package/dist/src/lib/contractCall.js +17 -0
  17. package/dist/src/lib/iface.d.ts +132 -0
  18. package/dist/src/lib/iface.d.ts.map +1 -0
  19. package/dist/src/lib/iface.js +8 -0
  20. package/dist/src/lib/index.d.ts +15 -0
  21. package/dist/src/lib/index.d.ts.map +1 -0
  22. package/dist/src/lib/index.js +56 -0
  23. package/dist/src/lib/keyPair.d.ts +26 -0
  24. package/dist/src/lib/keyPair.d.ts.map +1 -0
  25. package/dist/src/lib/keyPair.js +65 -0
  26. package/dist/src/lib/transaction.d.ts +64 -0
  27. package/dist/src/lib/transaction.d.ts.map +1 -0
  28. package/dist/src/lib/transaction.js +137 -0
  29. package/dist/src/lib/transactionBuilder.d.ts +249 -0
  30. package/dist/src/lib/transactionBuilder.d.ts.map +1 -0
  31. package/dist/src/lib/transactionBuilder.js +741 -0
  32. package/dist/src/lib/transferBuilder.d.ts +71 -0
  33. package/dist/src/lib/transferBuilder.d.ts.map +1 -0
  34. package/dist/src/lib/transferBuilder.js +273 -0
  35. package/dist/src/lib/transferBuilders/baseNFTTransferBuilder.d.ts +54 -0
  36. package/dist/src/lib/transferBuilders/baseNFTTransferBuilder.d.ts.map +1 -0
  37. package/dist/src/lib/transferBuilders/baseNFTTransferBuilder.js +120 -0
  38. package/dist/src/lib/transferBuilders/index.d.ts +4 -0
  39. package/dist/src/lib/transferBuilders/index.d.ts.map +1 -0
  40. package/dist/src/lib/transferBuilders/index.js +20 -0
  41. package/dist/src/lib/transferBuilders/transferBuilderERC1155.d.ts +16 -0
  42. package/dist/src/lib/transferBuilders/transferBuilderERC1155.d.ts.map +1 -0
  43. package/dist/src/lib/transferBuilders/transferBuilderERC1155.js +93 -0
  44. package/dist/src/lib/transferBuilders/transferBuilderERC721.d.ts +15 -0
  45. package/dist/src/lib/transferBuilders/transferBuilderERC721.d.ts.map +1 -0
  46. package/dist/src/lib/transferBuilders/transferBuilderERC721.js +78 -0
  47. package/dist/src/lib/types.d.ts +39 -0
  48. package/dist/src/lib/types.d.ts.map +1 -0
  49. package/dist/src/lib/types.js +137 -0
  50. package/dist/src/lib/utils.d.ts +267 -0
  51. package/dist/src/lib/utils.d.ts.map +1 -0
  52. package/dist/src/lib/utils.js +688 -0
  53. package/dist/src/lib/walletUtil.d.ts +30 -0
  54. package/dist/src/lib/walletUtil.d.ts.map +1 -0
  55. package/dist/src/lib/walletUtil.js +33 -0
  56. package/dist/src/types.d.ts +9 -0
  57. package/dist/src/types.d.ts.map +1 -0
  58. package/dist/src/types.js +3 -0
  59. package/dist/test/index.d.ts +2 -0
  60. package/dist/test/index.d.ts.map +1 -0
  61. package/dist/test/index.js +18 -0
  62. package/dist/test/unit/coin.d.ts +8 -0
  63. package/dist/test/unit/coin.d.ts.map +1 -0
  64. package/dist/test/unit/coin.js +577 -0
  65. package/dist/test/unit/index.d.ts +5 -0
  66. package/dist/test/unit/index.d.ts.map +1 -0
  67. package/dist/test/unit/index.js +21 -0
  68. package/dist/test/unit/token.d.ts +2 -0
  69. package/dist/test/unit/token.d.ts.map +1 -0
  70. package/dist/test/unit/token.js +37 -0
  71. package/dist/test/unit/transaction.d.ts +3 -0
  72. package/dist/test/unit/transaction.d.ts.map +1 -0
  73. package/dist/test/unit/transaction.js +60 -0
  74. package/dist/test/unit/transactionBuilder/addressInitialization.d.ts +8 -0
  75. package/dist/test/unit/transactionBuilder/addressInitialization.d.ts.map +1 -0
  76. package/dist/test/unit/transactionBuilder/addressInitialization.js +95 -0
  77. package/dist/test/unit/transactionBuilder/index.d.ts +4 -0
  78. package/dist/test/unit/transactionBuilder/index.d.ts.map +1 -0
  79. package/dist/test/unit/transactionBuilder/index.js +20 -0
  80. package/dist/test/unit/transactionBuilder/send.d.ts +3 -0
  81. package/dist/test/unit/transactionBuilder/send.d.ts.map +1 -0
  82. package/dist/test/unit/transactionBuilder/send.js +197 -0
  83. package/dist/test/unit/transactionBuilder/walletInitialization.d.ts +10 -0
  84. package/dist/test/unit/transactionBuilder/walletInitialization.d.ts.map +1 -0
  85. package/dist/test/unit/transactionBuilder/walletInitialization.js +124 -0
  86. package/dist/test/unit/transferBuilder.d.ts +2 -0
  87. package/dist/test/unit/transferBuilder.d.ts.map +1 -0
  88. package/dist/test/unit/transferBuilder.js +76 -0
  89. package/dist/tsconfig.tsbuildinfo +1 -8234
  90. package/index.ts +2 -0
  91. package/package.json +28 -9
@@ -0,0 +1,658 @@
1
+ /**
2
+ * @prettier
3
+ */
4
+ import { AddressCoinSpecific, BitGoBase, BuildNftTransferDataOptions, FeeEstimateOptions, FullySignedTransaction, HalfSignedTransaction, IWallet, KeyPair, ParsedTransaction, ParseTransactionOptions, PrebuildTransactionResult, PresignTransactionOptions as BasePresignTransactionOptions, Recipient, SignTransactionOptions as BaseSignTransactionOptions, TransactionParams, TransactionPrebuild as BaseTransactionPrebuild, TransactionRecipient, TypedData, VerifyAddressOptions as BaseVerifyAddressOptions, VerifyTransactionOptions, Wallet } 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 RecoverOptionsWithBytes = {
130
+ isTss: true;
131
+ /**
132
+ * @deprecated this is no longer used
133
+ */
134
+ openSSLBytes?: Uint8Array;
135
+ };
136
+ export type NonTSSRecoverOptions = {
137
+ isTss?: false | undefined;
138
+ };
139
+ export type TSSRecoverOptions = RecoverOptionsWithBytes | NonTSSRecoverOptions;
140
+ export type RecoverOptions = {
141
+ userKey: string;
142
+ backupKey: string;
143
+ walletPassphrase?: string;
144
+ walletContractAddress: string;
145
+ recoveryDestination: string;
146
+ krsProvider?: string;
147
+ gasPrice?: number;
148
+ gasLimit?: number;
149
+ eip1559?: EIP1559;
150
+ replayProtectionOptions?: ReplayProtectionOptions;
151
+ bitgoFeeAddress?: string;
152
+ bitgoDestinationAddress?: string;
153
+ tokenContractAddress?: string;
154
+ intendedChain?: string;
155
+ common?: EthLikeCommon.default;
156
+ } & TSSRecoverOptions;
157
+ export type GetBatchExecutionInfoRT = {
158
+ values: [string[], string[]];
159
+ totalAmount: string;
160
+ };
161
+ export interface BuildTransactionParams {
162
+ to: string;
163
+ nonce?: number;
164
+ value: number;
165
+ data?: Buffer;
166
+ gasPrice?: number;
167
+ gasLimit?: number;
168
+ eip1559?: EIP1559;
169
+ replayProtectionOptions?: ReplayProtectionOptions;
170
+ }
171
+ export interface RecoveryInfo {
172
+ id: string;
173
+ tx: string;
174
+ backupKey?: string;
175
+ coin?: string;
176
+ }
177
+ export interface RecoverTokenTransaction {
178
+ halfSigned: {
179
+ recipient: Recipient;
180
+ expireTime: number;
181
+ contractSequenceId: number;
182
+ operationHash: string;
183
+ signature: string;
184
+ gasLimit: number;
185
+ gasPrice: number;
186
+ tokenContractAddress: string;
187
+ walletId: string;
188
+ };
189
+ }
190
+ export interface RecoverTokenOptions {
191
+ tokenContractAddress: string;
192
+ wallet: Wallet;
193
+ recipient: string;
194
+ broadcast?: boolean;
195
+ walletPassphrase?: string;
196
+ prv?: string;
197
+ }
198
+ export interface GetSendMethodArgsOptions {
199
+ recipient: Recipient;
200
+ expireTime: number;
201
+ contractSequenceId: number;
202
+ signature: string;
203
+ }
204
+ export interface SendMethodArgs {
205
+ name: string;
206
+ type: string;
207
+ value: any;
208
+ }
209
+ interface HopTransactionBuildOptions {
210
+ wallet: Wallet;
211
+ recipients: Recipient[];
212
+ walletPassphrase: string;
213
+ }
214
+ export interface BuildOptions {
215
+ hop?: boolean;
216
+ wallet?: Wallet;
217
+ recipients?: Recipient[];
218
+ walletPassphrase?: string;
219
+ [index: string]: unknown;
220
+ }
221
+ interface FeeEstimate {
222
+ gasLimitEstimate: number;
223
+ feeEstimate: number;
224
+ }
225
+ interface EthTransactionParams extends TransactionParams {
226
+ gasPrice?: number;
227
+ gasLimit?: number;
228
+ hopParams?: HopParams;
229
+ hop?: boolean;
230
+ prebuildTx?: PrebuildTransactionResult;
231
+ }
232
+ interface VerifyEthTransactionOptions extends VerifyTransactionOptions {
233
+ txPrebuild: TransactionPrebuild;
234
+ txParams: EthTransactionParams;
235
+ }
236
+ interface PresignTransactionOptions extends TransactionPrebuild, BasePresignTransactionOptions {
237
+ wallet: Wallet;
238
+ }
239
+ interface EthAddressCoinSpecifics extends AddressCoinSpecific {
240
+ forwarderVersion: number;
241
+ salt?: string;
242
+ }
243
+ export interface VerifyEthAddressOptions extends BaseVerifyAddressOptions {
244
+ baseAddress: string;
245
+ coinSpecific: EthAddressCoinSpecifics;
246
+ forwarderVersion: number;
247
+ }
248
+ export declare const optionalDeps: {
249
+ readonly ethAbi: any;
250
+ readonly ethUtil: any;
251
+ readonly EthTx: typeof EthLikeTxLib;
252
+ readonly EthCommon: typeof EthLikeCommon;
253
+ };
254
+ export declare abstract class AbstractEthLikeNewCoins extends AbstractEthLikeCoin {
255
+ static hopTransactionSalt: string;
256
+ protected readonly sendMethodName: 'sendMultiSig' | 'sendMultiSigToken';
257
+ readonly staticsCoin?: Readonly<StaticsBaseCoin>;
258
+ protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>);
259
+ /**
260
+ * Method to return the coin's network object
261
+ * @returns {EthLikeNetwork | undefined}
262
+ */
263
+ getNetwork(): EthLikeNetwork | undefined;
264
+ /**
265
+ * Evaluates whether an address string is valid for this coin
266
+ * @param {string} address
267
+ * @returns {boolean} True if address is the valid ethlike adderss
268
+ */
269
+ isValidAddress(address: string): boolean;
270
+ /**
271
+ * Flag for sending data along with transactions
272
+ * @returns {boolean} True if okay to send tx data (ETH), false otherwise
273
+ */
274
+ transactionDataAllowed(): boolean;
275
+ /**
276
+ * Default expire time for a contract call (1 week)
277
+ * @returns {number} Time in seconds
278
+ */
279
+ getDefaultExpireTime(): number;
280
+ /**
281
+ * Method to get the custom chain common object based on params from recovery
282
+ * @param {number} chainId - the chain id of the custom chain
283
+ * @returns {EthLikeCommon.default}
284
+ */
285
+ static getCustomChainCommon(chainId: number): EthLikeCommon.default;
286
+ /**
287
+ * Gets correct Eth Common object based on params from either recovery or tx building
288
+ * @param {EIP1559} eip1559 - configs that specify whether we should construct an eip1559 tx
289
+ * @param {ReplayProtectionOptions} replayProtectionOptions - check if chain id supports replay protection
290
+ * @returns {EthLikeCommon.default}
291
+ */
292
+ private static getEthLikeCommon;
293
+ /**
294
+ * Method to build the tx object
295
+ * @param {BuildTransactionParams} params - params to build transaction
296
+ * @returns {EthLikeTxLib.FeeMarketEIP1559Transaction | EthLikeTxLib.Transaction}
297
+ */
298
+ static buildTransaction(params: BuildTransactionParams): EthLikeTxLib.FeeMarketEIP1559Transaction | EthLikeTxLib.Transaction;
299
+ /**
300
+ * Query explorer for the balance of an address
301
+ * @param {String} address - the ETHLike address
302
+ * @returns {BigNumber} address balance
303
+ */
304
+ queryAddressBalance(address: string): Promise<any>;
305
+ /**
306
+ * @param {Recipient[]} recipients - the recipients of the transaction
307
+ * @param {number} expireTime - the expire time of the transaction
308
+ * @param {number} contractSequenceId - the contract sequence id of the transaction
309
+ * @returns {string}
310
+ */
311
+ getOperationSha3ForExecuteAndConfirm(recipients: Recipient[], expireTime: number, contractSequenceId: number): string;
312
+ /**
313
+ * Get transfer operation for coin
314
+ * @param {Recipient} recipient - recipient info
315
+ * @param {number} expireTime - expiry time
316
+ * @param {number} contractSequenceId - sequence id
317
+ * @returns {Array} operation array
318
+ */
319
+ getOperation(recipient: Recipient, expireTime: number, contractSequenceId: number): (string | Buffer)[][];
320
+ /**
321
+ * Queries the contract (via explorer API) for the next sequence ID
322
+ * @param {String} address - address of the contract
323
+ * @returns {Promise<Number>} sequence ID
324
+ */
325
+ querySequenceId(address: string): Promise<number>;
326
+ /**
327
+ * Recover an unsupported token from a BitGo multisig wallet
328
+ * This builds a half-signed transaction, for which there will be an admin route to co-sign and broadcast. Optionally
329
+ * the user can set params.broadcast = true and the half-signed tx will be sent to BitGo for cosigning and broadcasting
330
+ * @param {RecoverTokenOptions} params
331
+ * @param {Wallet} params.wallet - the wallet to recover the token from
332
+ * @param {string} params.tokenContractAddress - the contract address of the unsupported token
333
+ * @param {string} params.recipient - the destination address recovered tokens should be sent to
334
+ * @param {string} params.walletPassphrase - the wallet passphrase
335
+ * @param {string} params.prv - the xprv
336
+ * @param {boolean} params.broadcast - if true, we will automatically submit the half-signed tx to BitGo for cosigning and broadcasting
337
+ * @returns {Promise<RecoverTokenTransaction>}
338
+ */
339
+ recoverToken(params: RecoverTokenOptions): Promise<RecoverTokenTransaction>;
340
+ /**
341
+ * Ensure either enterprise or newFeeAddress is passed, to know whether to create new key or use enterprise key
342
+ * @param {PrecreateBitGoOptions} params
343
+ * @param {string} params.enterprise {String} the enterprise id to associate with this key
344
+ * @param {string} params.newFeeAddress {Boolean} create a new fee address (enterprise not needed in this case)
345
+ * @returns {void}
346
+ */
347
+ preCreateBitGo(params: PrecreateBitGoOptions): void;
348
+ /**
349
+ * Queries public block explorer to get the next ETHLike coin's nonce that should be used for the given ETH address
350
+ * @param {string} address
351
+ * @returns {Promise<number>}
352
+ */
353
+ getAddressNonce(address: string): Promise<number>;
354
+ /**
355
+ * Helper function for recover()
356
+ * This transforms the unsigned transaction information into a format the BitGo offline vault expects
357
+ * @param {UnformattedTxInfo} txInfo - tx info
358
+ * @param {EthLikeTxLib.Transaction | EthLikeTxLib.FeeMarketEIP1559Transaction} ethTx - the ethereumjs tx object
359
+ * @param {string} userKey - the user's key
360
+ * @param {string} backupKey - the backup key
361
+ * @param {Buffer} gasPrice - gas price for the tx
362
+ * @param {number} gasLimit - gas limit for the tx
363
+ * @param {EIP1559} eip1559 - eip1559 params
364
+ * @param {ReplayProtectionOptions} replayProtectionOptions - replay protection options
365
+ * @returns {Promise<OfflineVaultTxInfo>}
366
+ */
367
+ formatForOfflineVault(txInfo: UnformattedTxInfo, ethTx: EthLikeTxLib.Transaction | EthLikeTxLib.FeeMarketEIP1559Transaction, userKey: string, backupKey: string, gasPrice: Buffer, gasLimit: number, eip1559?: EIP1559, replayProtectionOptions?: ReplayProtectionOptions): Promise<OfflineVaultTxInfo>;
368
+ /**
369
+ * Helper function for recover()
370
+ * This transforms the unsigned transaction information into a format the BitGo offline vault expects
371
+ * @param {UnformattedTxInfo} txInfo - tx info
372
+ * @param {EthLikeTxLib.Transaction | EthLikeTxLib.FeeMarketEIP1559Transaction} ethTx - the ethereumjs tx object
373
+ * @param {string} userKey - the user's key
374
+ * @param {string} backupKey - the backup key
375
+ * @param {Buffer} gasPrice - gas price for the tx
376
+ * @param {number} gasLimit - gas limit for the tx
377
+ * @param {number} backupKeyNonce - the nonce of the backup key address
378
+ * @param {EIP1559} eip1559 - eip1559 params
379
+ * @param {ReplayProtectionOptions} replayProtectionOptions - replay protection options
380
+ * @returns {Promise<OfflineVaultTxInfo>}
381
+ */
382
+ formatForOfflineVaultTSS(txInfo: UnformattedTxInfo, ethTx: EthLikeTxLib.Transaction | EthLikeTxLib.FeeMarketEIP1559Transaction, userKey: string, backupKey: string, gasPrice: Buffer, gasLimit: number, backupKeyNonce: number, eip1559?: EIP1559, replayProtectionOptions?: ReplayProtectionOptions): OfflineVaultTxInfo;
383
+ /**
384
+ * Check whether the gas price passed in by user are within our max and min bounds
385
+ * If they are not set, set them to the defaults
386
+ * @param {number} userGasPrice - user defined gas price
387
+ * @returns {number} the gas price to use for this transaction
388
+ */
389
+ setGasPrice(userGasPrice?: number): number;
390
+ /**
391
+ * Check whether gas limit passed in by user are within our max and min bounds
392
+ * If they are not set, set them to the defaults
393
+ * @param {number} userGasLimit user defined gas limit
394
+ * @returns {number} the gas limit to use for this transaction
395
+ */
396
+ setGasLimit(userGasLimit?: number): number;
397
+ /**
398
+ * Helper function for signTransaction for the rare case that SDK is doing the second signature
399
+ * Note: we are expecting this to be called from the offline vault
400
+ * @param {SignFinalOptions.txPrebuild} params.txPrebuild
401
+ * @param {string} params.prv
402
+ * @returns {{txHex: string}}
403
+ */
404
+ signFinalEthLike(params: SignFinalOptions): Promise<FullySignedTransaction>;
405
+ /**
406
+ * Assemble half-sign prebuilt transaction
407
+ * @param {SignTransactionOptions} params
408
+ */
409
+ signTransaction(params: SignTransactionOptions): Promise<SignedTransaction>;
410
+ /**
411
+ * Method to validate recovery params
412
+ * @param {RecoverOptions} params
413
+ * @returns {void}
414
+ */
415
+ validateRecoveryParams(params: RecoverOptions): void;
416
+ /**
417
+ * Helper which Adds signatures to tx object and re-serializes tx
418
+ * @param {EthLikeCommon.default} ethCommon
419
+ * @param {EthLikeTxLib.FeeMarketEIP1559Transaction | EthLikeTxLib.Transaction} tx
420
+ * @param {ECDSAMethodTypes.Signature} signature
421
+ * @returns {EthLikeTxLib.FeeMarketEIP1559Transaction | EthLikeTxLib.Transaction}
422
+ */
423
+ private getSignedTxFromSignature;
424
+ /**
425
+ * Builds a funds recovery transaction without BitGo
426
+ * @param params
427
+ * @param {string} params.userKey - [encrypted] xprv
428
+ * @param {string} params.backupKey - [encrypted] xprv or xpub if the xprv is held by a KRS provider
429
+ * @param {string} params.walletPassphrase - used to decrypt userKey and backupKey
430
+ * @param {string} params.walletContractAddress - the ETH address of the wallet contract
431
+ * @param {string} params.krsProvider - necessary if backup key is held by KRS
432
+ * @param {string} params.recoveryDestination - target address to send recovered funds to
433
+ * @param {string} params.bitgoFeeAddress - wrong chain wallet fee address for evm based cross chain recovery txn
434
+ * @param {string} params.bitgoDestinationAddress - target bitgo address where fee will be sent for evm based cross chain recovery txn
435
+ */
436
+ recover(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
437
+ /**
438
+ * Builds a funds recovery transaction without BitGo for non-TSS transaction
439
+ * @param params
440
+ * @param {string} params.userKey [encrypted] xprv or xpub
441
+ * @param {string} params.backupKey [encrypted] xprv or xpub if the xprv is held by a KRS provider
442
+ * @param {string} params.walletPassphrase used to decrypt userKey and backupKey
443
+ * @param {string} params.walletContractAddress the EthLike address of the wallet contract
444
+ * @param {string} params.krsProvider necessary if backup key is held by KRS
445
+ * @param {string} params.recoveryDestination target address to send recovered funds to
446
+ * @param {string} params.bitgoFeeAddress wrong chain wallet fee address for evm based cross chain recovery txn
447
+ * @param {string} params.bitgoDestinationAddress target bitgo address where fee will be sent for evm based cross chain recovery txn
448
+ * @returns {Promise<RecoveryInfo | OfflineVaultTxInfo>}
449
+ */
450
+ protected recoverEthLike(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
451
+ sendCrossChainRecoveryTransaction(params: SendCrossChainRecoveryOptions): Promise<{
452
+ coin: string;
453
+ txHex?: string;
454
+ txid: string;
455
+ }>;
456
+ buildCrossChainRecoveryTransaction(recoveryId: string): Promise<{
457
+ coin: string;
458
+ txHex: string;
459
+ txid: string;
460
+ }>;
461
+ /**
462
+ * Builds a unsigned (for cold, custody wallet) or
463
+ * half-signed (for hot wallet) evm cross chain recovery transaction with
464
+ * same expected arguments as recover method.
465
+ * This helps recover funds from evm based wrong chain.
466
+ * @param {RecoverOptions} params
467
+ * @returns {Promise<RecoveryInfo | OfflineVaultTxInfo>}
468
+ */
469
+ protected recoverEthLikeforEvmBasedRecovery(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
470
+ /**
471
+ * Query explorer for the balance of an address for a token
472
+ * @param {string} tokenContractAddress - address where the token smart contract is hosted
473
+ * @param {string} walletContractAddress - address of the wallet
474
+ * @returns {BigNumber} token balaance in base units
475
+ */
476
+ queryAddressTokenBalance(tokenContractAddress: string, walletContractAddress: string): Promise<any>;
477
+ recoverEthLikeTokenforEvmBasedRecovery(params: RecoverOptions, bitgoFeeAddressNonce: number, gasLimit: any, gasPrice: any, userKey: any, userSigningKey: any): Promise<OfflineVaultTxInfo>;
478
+ /**
479
+ * Validate evm based cross chain recovery params
480
+ * @param params {RecoverOptions}
481
+ * @returns {void}
482
+ */
483
+ validateEvmBasedRecoveryParams(params: RecoverOptions): void;
484
+ /**
485
+ * Return types, values, and total amount in wei to send in a batch transaction, using the method signature
486
+ * `distributeBatch(address[], uint256[])`
487
+ * @param {Recipient[]} recipients - transaction recipients
488
+ * @returns {GetBatchExecutionInfoRT} information needed to execute the batch transaction
489
+ */
490
+ getBatchExecutionInfo(recipients: Recipient[]): GetBatchExecutionInfoRT;
491
+ /**
492
+ * Get the data required to make an ETH function call defined by the given types and values
493
+ *
494
+ * @param {string} functionName - The name of the function being called, e.g. transfer
495
+ * @param types The types of the function call in order
496
+ * @param values The values of the function call in order
497
+ * @return {Buffer} The combined data for the function call
498
+ */
499
+ getMethodCallData: (functionName: any, types: any, values: any) => Buffer<ArrayBuffer>;
500
+ /**
501
+ * Build arguments to call the send method on the wallet contract
502
+ * @param txInfo
503
+ */
504
+ getSendMethodArgs(txInfo: GetSendMethodArgsOptions): SendMethodArgs[];
505
+ /**
506
+ * Recovers a tx with TSS key shares
507
+ * same expected arguments as recover method, but with TSS key shares
508
+ */
509
+ protected recoverTSS(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
510
+ private buildTssRecoveryTxn;
511
+ validateBalanceAndGetTxAmount(baseAddress: string, gasPrice: BN, gasLimit: BN): Promise<any>;
512
+ recoveryBlockchainExplorerQuery(query: Record<string, string>): Promise<any>;
513
+ /**
514
+ * Creates the extra parameters needed to build a hop transaction
515
+ * @param buildParams The original build parameters
516
+ * @returns extra parameters object to merge with the original build parameters object and send to the platform
517
+ */
518
+ createHopTransactionParams(buildParams: HopTransactionBuildOptions): Promise<HopParams>;
519
+ /**
520
+ * Validates that the hop prebuild from the HSM is valid and correct
521
+ * @param {IWallet} wallet - The wallet that the prebuild is for
522
+ * @param {HopPrebuild} hopPrebuild - The prebuild to validate
523
+ * @param {Object} originalParams - The original parameters passed to prebuildTransaction
524
+ * @param {Recipient[]} originalParams.recipients - The original recipients array
525
+ * @returns {void}
526
+ * @throws Error if The prebuild is invalid
527
+ */
528
+ validateHopPrebuild(wallet: IWallet, hopPrebuild: HopPrebuild, originalParams?: {
529
+ recipients: Recipient[];
530
+ }): Promise<void>;
531
+ /**
532
+ * Gets the hop digest for the user to sign. This is validated in the HSM to prove that the user requested this tx
533
+ * @param {string[]} paramsArr - The parameters to hash together for the digest
534
+ * @returns {Buffer}
535
+ */
536
+ static getHopDigest(paramsArr: string[]): Buffer;
537
+ /**
538
+ * Modify prebuild before sending it to the server. Add things like hop transaction params
539
+ * @param {BuildOptions} buildParams - The whitelisted parameters for this prebuild
540
+ * @param {boolean} buildParams.hop - True if this should prebuild a hop tx, else false
541
+ * @param {Recipient[]} buildParams.recipients - The recipients array of this transaction
542
+ * @param {Wallet} buildParams.wallet - The wallet sending this tx
543
+ * @param {string} buildParams.walletPassphrase - the passphrase for this wallet
544
+ * @returns {Promise<BuildOptions>}
545
+ */
546
+ getExtraPrebuildParams(buildParams: BuildOptions): Promise<BuildOptions>;
547
+ /**
548
+ * Modify prebuild after receiving it from the server. Add things like nlocktime
549
+ * @param {TransactionPrebuild} params - The prebuild to modify
550
+ * @returns {TransactionPrebuild} The modified prebuild
551
+ */
552
+ postProcessPrebuild(params: TransactionPrebuild): Promise<TransactionPrebuild>;
553
+ /**
554
+ * Coin-specific things done before signing a transaction, i.e. verification
555
+ * @param {PresignTransactionOptions} params
556
+ * @returns {Promise<PresignTransactionOptions>}
557
+ */
558
+ presignTransaction(params: PresignTransactionOptions): Promise<PresignTransactionOptions>;
559
+ /**
560
+ * Fetch fee estimate information from the server
561
+ * @param {Object} params - The params passed into the function
562
+ * @param {boolean} [params.hop] - True if we should estimate fee for a hop transaction
563
+ * @param {string} [params.recipient] - The recipient of the transaction to estimate a send to
564
+ * @param {string} [params.data] - The ETH tx data to estimate a send for
565
+ * @returns {Object} The fee info returned from the server
566
+ */
567
+ feeEstimate(params: FeeEstimateOptions): Promise<FeeEstimate>;
568
+ /**
569
+ * Generate secp256k1 key pair
570
+ *
571
+ * @param {Buffer} seed
572
+ * @returns {KeyPair} object with generated pub and prv
573
+ */
574
+ generateKeyPair(seed: Buffer): KeyPair;
575
+ parseTransaction(params: ParseTransactionOptions): Promise<ParsedTransaction>;
576
+ /**
577
+ * Make sure an address is a wallet address and throw an error if it's not.
578
+ * @param {Object} params
579
+ * @param {string} params.address - The derived address string on the network
580
+ * @param {Object} params.coinSpecific - Coin-specific details for the address such as a forwarderVersion
581
+ * @param {string} params.baseAddress - The base address of the wallet on the network
582
+ * @throws {InvalidAddressError}
583
+ * @throws {InvalidAddressVerificationObjectPropertyError}
584
+ * @throws {UnexpectedAddressError}
585
+ * @returns {boolean} True iff address is a wallet address
586
+ */
587
+ isWalletAddress(params: VerifyEthAddressOptions): Promise<boolean>;
588
+ /**
589
+ *
590
+ * @param {TransactionPrebuild} txPrebuild
591
+ * @returns {boolean}
592
+ */
593
+ verifyCoin(txPrebuild: TransactionPrebuild): boolean;
594
+ /**
595
+ * Verify if a tss transaction is valid
596
+ *
597
+ * @param {VerifyEthTransactionOptions} params
598
+ * @param {TransactionParams} params.txParams - params object passed to send
599
+ * @param {TransactionPrebuild} params.txPrebuild - prebuild object returned by server
600
+ * @param {Wallet} params.wallet - Wallet object to obtain keys to verify against
601
+ * @returns {boolean}
602
+ */
603
+ verifyTssTransaction(params: VerifyEthTransactionOptions): boolean;
604
+ /**
605
+ * Verify that a transaction prebuild complies with the original intention
606
+ *
607
+ * @param {VerifyEthTransactionOptions} params
608
+ * @param {TransactionParams} params.txParams - params object passed to send
609
+ * @param {TransactionPrebuild} params.txPrebuild - prebuild object returned by server
610
+ * @param {Wallet} params.wallet - Wallet object to obtain keys to verify against
611
+ * @returns {boolean}
612
+ */
613
+ verifyTransaction(params: VerifyEthTransactionOptions): Promise<boolean>;
614
+ /**
615
+ * Check if address is valid eth address
616
+ * @param address
617
+ * @returns {boolean}
618
+ */
619
+ private isETHAddress;
620
+ /**
621
+ * Transform message to accommodate specific blockchain requirements.
622
+ * @param {string} message - the message to prepare
623
+ * @return {string} the prepared message.
624
+ */
625
+ encodeMessage(message: string): string;
626
+ /**
627
+ * Transform the Typed data to accomodate the blockchain requirements (EIP-712)
628
+ * @param {TypedData} typedData - the typed data to prepare
629
+ * @return {Buffer} a buffer of the result
630
+ */
631
+ encodeTypedData(typedData: TypedData): Buffer;
632
+ /**
633
+ * Build the data to transfer an ERC-721 or ERC-1155 token to another address
634
+ * @param params
635
+ */
636
+ buildNftTransferData(params: BuildNftTransferDataOptions): string;
637
+ /**
638
+ * Fetch the gas price from the explorer
639
+ */
640
+ getGasPriceFromExternalAPI(wrongChainCoin: string): Promise<BN>;
641
+ /**
642
+ * Fetch the gas limit from the explorer
643
+ * @param intendedChain
644
+ * @param from
645
+ * @param to
646
+ * @param data
647
+ */
648
+ getGasLimitFromExternalAPI(intendedChain: string, from: string, to: string, data: string): Promise<BN>;
649
+ /**
650
+ * Get the balance of bitgoFeeAddress to ensure funds are available to pay fees
651
+ * @param bitgoFeeAddress
652
+ * @param gasPrice
653
+ * @param gasLimit
654
+ */
655
+ ensureSufficientBalance(bitgoFeeAddress: string, gasPrice: BN, gasLimit: BN): Promise<void>;
656
+ }
657
+ export {};
658
+ //# sourceMappingURL=abstractEthLikeNewCoins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstractEthLikeNewCoins.d.ts","sourceRoot":"","sources":["../../src/abstractEthLikeNewCoins.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,mBAAmB,EACnB,SAAS,EACT,2BAA2B,EAK3B,kBAAkB,EAClB,sBAAsB,EAEtB,qBAAqB,EAGrB,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,IAAI,6BAA6B,EAC1D,SAAS,EACT,sBAAsB,IAAI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