@bitgo-beta/abstract-eth 1.0.2-beta.6 → 1.0.2-beta.600

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