@bitgo-beta/abstract-eth 1.2.3-alpha.91 → 1.2.3-alpha.93

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.
@@ -1,5 +1,6 @@
1
- import { BitGoBase, Recipient, TransactionRecipient, TransactionPrebuild as BaseTransactionPrebuild } from '@bitgo-beta/sdk-core';
2
- import { BaseCoin as StaticsBaseCoin, CoinFamily, EthereumNetwork as EthLikeNetwork } from '@bitgo-beta/statics';
1
+ /// <reference types="node" />
2
+ import { AddressCoinSpecific, BitGoBase, FeeEstimateOptions, FullySignedTransaction, HalfSignedTransaction, IWallet, KeyPair, ParsedTransaction, ParseTransactionOptions, PrebuildTransactionResult, PresignTransactionOptions as BasePresignTransactionOptions, Recipient, SignTransactionOptions as BaseSignTransactionOptions, TransactionParams, TransactionRecipient, TransactionPrebuild as BaseTransactionPrebuild, TypedData, VerifyAddressOptions as BaseVerifyAddressOptions, VerifyTransactionOptions, Wallet } from '@bitgo-beta/sdk-core';
3
+ import { BaseCoin as StaticsBaseCoin, EthereumNetwork as EthLikeNetwork } from '@bitgo-beta/statics';
3
4
  import type * as EthLikeTxLib from '@ethereumjs/tx';
4
5
  import type * as EthLikeCommon from '@ethereumjs/common';
5
6
  import { AbstractEthLikeCoin } from './abstractEthLikeCoin';
@@ -19,19 +20,211 @@ interface HopPrebuild {
19
20
  userReqSig: string;
20
21
  gasPriceMax: number;
21
22
  }
23
+ /**
24
+ * The extra parameters to send to platform build route for hop transactions
25
+ */
26
+ interface HopParams {
27
+ hopParams: {
28
+ gasPriceMax: number;
29
+ userReqSig: string;
30
+ paymentId: string;
31
+ };
32
+ gasLimit: number;
33
+ }
34
+ export interface EIP1559 {
35
+ maxPriorityFeePerGas: number;
36
+ maxFeePerGas: number;
37
+ }
38
+ export interface ReplayProtectionOptions {
39
+ chain: string | number;
40
+ hardfork: string;
41
+ }
22
42
  export interface TransactionPrebuild extends BaseTransactionPrebuild {
23
43
  hopTransaction?: HopPrebuild;
24
44
  buildParams: {
25
45
  recipients: Recipient[];
26
46
  };
27
47
  recipients: TransactionRecipient[];
28
- nextContractSequenceId: string;
48
+ nextContractSequenceId: number;
29
49
  gasPrice: number;
30
50
  gasLimit: number;
31
51
  isBatch: boolean;
32
52
  coin: string;
33
53
  token?: string;
34
54
  }
55
+ export interface SignFinalOptions {
56
+ txPrebuild: {
57
+ eip1559?: EIP1559;
58
+ replayProtectionOptions?: ReplayProtectionOptions;
59
+ gasPrice?: string;
60
+ gasLimit?: string;
61
+ recipients?: Recipient[];
62
+ halfSigned?: {
63
+ expireTime: number;
64
+ contractSequenceId: number;
65
+ backupKeyNonce?: number;
66
+ signature: string;
67
+ txHex?: string;
68
+ };
69
+ nextContractSequenceId?: number;
70
+ hopTransaction?: string;
71
+ backupKeyNonce?: number;
72
+ isBatch?: boolean;
73
+ txHex?: string;
74
+ expireTime?: number;
75
+ };
76
+ signingKeyNonce?: number;
77
+ walletContractAddress?: string;
78
+ prv: string;
79
+ recipients?: Recipient[];
80
+ }
81
+ export interface SignTransactionOptions extends BaseSignTransactionOptions, SignFinalOptions {
82
+ isLastSignature?: boolean;
83
+ expireTime?: number;
84
+ sequenceId?: number;
85
+ gasLimit?: number;
86
+ gasPrice?: number;
87
+ custodianTransactionId?: string;
88
+ }
89
+ export declare type SignedTransaction = HalfSignedTransaction | FullySignedTransaction;
90
+ export interface FeesUsed {
91
+ gasPrice: number;
92
+ gasLimit: number;
93
+ }
94
+ interface PrecreateBitGoOptions {
95
+ enterprise?: string;
96
+ newFeeAddress?: string;
97
+ }
98
+ export interface OfflineVaultTxInfo {
99
+ nextContractSequenceId?: string;
100
+ contractSequenceId?: string;
101
+ tx?: string;
102
+ txHex?: string;
103
+ userKey?: string;
104
+ backupKey?: string;
105
+ coin: string;
106
+ gasPrice: number;
107
+ gasLimit: number;
108
+ recipients: Recipient[];
109
+ walletContractAddress: string;
110
+ amount: string;
111
+ backupKeyNonce: number;
112
+ eip1559?: EIP1559;
113
+ replayProtectionOptions?: ReplayProtectionOptions;
114
+ halfSigned?: HalfSignedTransaction;
115
+ feesUsed?: FeesUsed;
116
+ isEvmBasedCrossChainRecovery?: boolean;
117
+ }
118
+ interface UnformattedTxInfo {
119
+ recipient: Recipient;
120
+ }
121
+ export interface RecoverOptions {
122
+ userKey: string;
123
+ backupKey: string;
124
+ walletPassphrase?: string;
125
+ walletContractAddress: string;
126
+ recoveryDestination: string;
127
+ krsProvider?: string;
128
+ gasPrice?: number;
129
+ gasLimit?: number;
130
+ eip1559?: EIP1559;
131
+ replayProtectionOptions?: ReplayProtectionOptions;
132
+ isTss?: boolean;
133
+ bitgoFeeAddress?: string;
134
+ bitgoDestinationAddress?: string;
135
+ tokenContractAddress?: string;
136
+ }
137
+ export declare type GetBatchExecutionInfoRT = {
138
+ values: [string[], string[]];
139
+ totalAmount: string;
140
+ };
141
+ export interface BuildTransactionParams {
142
+ to: string;
143
+ nonce?: number;
144
+ value: number;
145
+ data?: Buffer;
146
+ gasPrice?: number;
147
+ gasLimit?: number;
148
+ eip1559?: EIP1559;
149
+ replayProtectionOptions?: ReplayProtectionOptions;
150
+ }
151
+ export interface RecoveryInfo {
152
+ id: string;
153
+ tx: string;
154
+ backupKey?: string;
155
+ coin?: string;
156
+ }
157
+ export interface RecoverTokenTransaction {
158
+ halfSigned: {
159
+ recipient: Recipient;
160
+ expireTime: number;
161
+ contractSequenceId: number;
162
+ operationHash: string;
163
+ signature: string;
164
+ gasLimit: number;
165
+ gasPrice: number;
166
+ tokenContractAddress: string;
167
+ walletId: string;
168
+ };
169
+ }
170
+ export interface RecoverTokenOptions {
171
+ tokenContractAddress: string;
172
+ wallet: Wallet;
173
+ recipient: string;
174
+ broadcast?: boolean;
175
+ walletPassphrase?: string;
176
+ prv?: string;
177
+ }
178
+ export interface GetSendMethodArgsOptions {
179
+ recipient: Recipient;
180
+ expireTime: number;
181
+ contractSequenceId: number;
182
+ signature: string;
183
+ }
184
+ export interface SendMethodArgs {
185
+ name: string;
186
+ type: string;
187
+ value: any;
188
+ }
189
+ interface HopTransactionBuildOptions {
190
+ wallet: Wallet;
191
+ recipients: Recipient[];
192
+ walletPassphrase: string;
193
+ }
194
+ export interface BuildOptions {
195
+ hop?: boolean;
196
+ wallet?: Wallet;
197
+ recipients?: Recipient[];
198
+ walletPassphrase?: string;
199
+ [index: string]: unknown;
200
+ }
201
+ interface FeeEstimate {
202
+ gasLimitEstimate: number;
203
+ feeEstimate: number;
204
+ }
205
+ interface EthTransactionParams extends TransactionParams {
206
+ gasPrice?: number;
207
+ gasLimit?: number;
208
+ hopParams?: HopParams;
209
+ hop?: boolean;
210
+ prebuildTx?: PrebuildTransactionResult;
211
+ }
212
+ interface VerifyEthTransactionOptions extends VerifyTransactionOptions {
213
+ txPrebuild: TransactionPrebuild;
214
+ txParams: EthTransactionParams;
215
+ }
216
+ interface PresignTransactionOptions extends TransactionPrebuild, BasePresignTransactionOptions {
217
+ wallet: Wallet;
218
+ }
219
+ interface EthAddressCoinSpecifics extends AddressCoinSpecific {
220
+ forwarderVersion: number;
221
+ salt?: string;
222
+ }
223
+ export interface VerifyEthAddressOptions extends BaseVerifyAddressOptions {
224
+ baseAddress: string;
225
+ coinSpecific: EthAddressCoinSpecifics;
226
+ forwarderVersion: number;
227
+ }
35
228
  export declare const optionalDeps: {
36
229
  readonly ethAbi: any;
37
230
  readonly ethUtil: any;
@@ -39,35 +232,21 @@ export declare const optionalDeps: {
39
232
  readonly EthCommon: typeof EthLikeCommon;
40
233
  };
41
234
  export declare abstract class AbstractEthLikeNewCoins extends AbstractEthLikeCoin {
235
+ static hopTransactionSalt: string;
42
236
  protected readonly sendMethodName: 'sendMultiSig' | 'sendMultiSigToken';
43
- protected readonly _staticsCoin: Readonly<StaticsBaseCoin>;
44
- private static _ethLikeCoin;
45
- protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>);
46
237
  readonly staticsCoin?: Readonly<StaticsBaseCoin>;
47
- getChain(): string;
238
+ protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>);
48
239
  /**
49
- * Get the base chain that the coin exists on.
240
+ * Method to return the coin's network object
241
+ * @returns {EthLikeNetwork | undefined}
50
242
  */
51
- getBaseChain(): string;
52
- getFamily(): CoinFamily;
53
243
  getNetwork(): EthLikeNetwork | undefined;
54
- getFullName(): string;
55
- getBaseFactor(): number;
56
- /** @inheritDoc */
57
- isEVM(): boolean;
58
- valuelessTransferAllowed(): boolean;
59
244
  /**
60
245
  * Evaluates whether an address string is valid for this coin
61
- * @param address
246
+ * @param {string} address
247
+ * @returns {boolean} True if address is the valid ethlike adderss
62
248
  */
63
249
  isValidAddress(address: string): boolean;
64
- /**
65
- * Return boolean indicating whether input is valid public key for the coin.
66
- *
67
- * @param {String} pub the pub to be checked
68
- * @returns {Boolean} is it valid?
69
- */
70
- isValidPub(pub: string): boolean;
71
250
  /**
72
251
  * Flag for sending data along with transactions
73
252
  * @returns {boolean} True if okay to send tx data (ETH), false otherwise
@@ -88,6 +267,364 @@ export declare abstract class AbstractEthLikeNewCoins extends AbstractEthLikeCoi
88
267
  * @returns {number} Time in seconds
89
268
  */
90
269
  getDefaultExpireTime(): number;
270
+ /**
271
+ * Method to get the custom chain common object based on params from recovery
272
+ * @param {number} chainId - the chain id of the custom chain
273
+ * @returns {EthLikeCommon.default}
274
+ */
275
+ static getCustomChainCommon(chainId: number): EthLikeCommon.default;
276
+ /**
277
+ * Gets correct Eth Common object based on params from either recovery or tx building
278
+ * @param {EIP1559} eip1559 - configs that specify whether we should construct an eip1559 tx
279
+ * @param {ReplayProtectionOptions} replayProtectionOptions - check if chain id supports replay protection
280
+ * @returns {EthLikeCommon.default}
281
+ */
282
+ private static getEthLikeCommon;
283
+ /**
284
+ * Method to build the tx object
285
+ * @param {BuildTransactionParams} params - params to build transaction
286
+ * @returns {EthLikeTxLib.FeeMarketEIP1559Transaction | EthLikeTxLib.Transaction}
287
+ */
288
+ static buildTransaction(params: BuildTransactionParams): EthLikeTxLib.FeeMarketEIP1559Transaction | EthLikeTxLib.Transaction;
289
+ /**
290
+ * Query explorer for the balance of an address
291
+ * @param {String} address - the ETHLike address
292
+ * @returns {BigNumber} address balance
293
+ */
294
+ queryAddressBalance(address: string): Promise<any>;
295
+ /**
296
+ * @param {Recipient[]} recipients - the recipients of the transaction
297
+ * @param {number} expireTime - the expire time of the transaction
298
+ * @param {number} contractSequenceId - the contract sequence id of the transaction
299
+ * @returns {string}
300
+ */
301
+ getOperationSha3ForExecuteAndConfirm(recipients: Recipient[], expireTime: number, contractSequenceId: number): string;
302
+ /**
303
+ * Get transfer operation for coin
304
+ * @param {Recipient} recipient - recipient info
305
+ * @param {number} expireTime - expiry time
306
+ * @param {number} contractSequenceId - sequence id
307
+ * @returns {Array} operation array
308
+ */
309
+ getOperation(recipient: Recipient, expireTime: number, contractSequenceId: number): (string | Buffer)[][];
310
+ /**
311
+ * Queries the contract (via explorer API) for the next sequence ID
312
+ * @param {String} address - address of the contract
313
+ * @returns {Promise<Number>} sequence ID
314
+ */
315
+ querySequenceId(address: string): Promise<number>;
316
+ /**
317
+ * Recover an unsupported token from a BitGo multisig wallet
318
+ * This builds a half-signed transaction, for which there will be an admin route to co-sign and broadcast. Optionally
319
+ * the user can set params.broadcast = true and the half-signed tx will be sent to BitGo for cosigning and broadcasting
320
+ * @param {RecoverTokenOptions} params
321
+ * @param {Wallet} params.wallet - the wallet to recover the token from
322
+ * @param {string} params.tokenContractAddress - the contract address of the unsupported token
323
+ * @param {string} params.recipient - the destination address recovered tokens should be sent to
324
+ * @param {string} params.walletPassphrase - the wallet passphrase
325
+ * @param {string} params.prv - the xprv
326
+ * @param {boolean} params.broadcast - if true, we will automatically submit the half-signed tx to BitGo for cosigning and broadcasting
327
+ * @returns {Promise<RecoverTokenTransaction>}
328
+ */
329
+ recoverToken(params: RecoverTokenOptions): Promise<RecoverTokenTransaction>;
330
+ /**
331
+ * Ensure either enterprise or newFeeAddress is passed, to know whether to create new key or use enterprise key
332
+ * @param {PrecreateBitGoOptions} params
333
+ * @param {string} params.enterprise {String} the enterprise id to associate with this key
334
+ * @param {string} params.newFeeAddress {Boolean} create a new fee address (enterprise not needed in this case)
335
+ * @returns {void}
336
+ */
337
+ preCreateBitGo(params: PrecreateBitGoOptions): void;
338
+ /**
339
+ * Queries public block explorer to get the next ETHLike coin's nonce that should be used for the given ETH address
340
+ * @param {string} address
341
+ * @returns {Promise<number>}
342
+ */
343
+ getAddressNonce(address: string): Promise<number>;
344
+ /**
345
+ * Helper function for recover()
346
+ * This transforms the unsigned transaction information into a format the BitGo offline vault expects
347
+ * @param {UnformattedTxInfo} txInfo - tx info
348
+ * @param {EthLikeTxLib.Transaction | EthLikeTxLib.FeeMarketEIP1559Transaction} ethTx - the ethereumjs tx object
349
+ * @param {string} userKey - the user's key
350
+ * @param {string} backupKey - the backup key
351
+ * @param {Buffer} gasPrice - gas price for the tx
352
+ * @param {number} gasLimit - gas limit for the tx
353
+ * @param {EIP1559} eip1559 - eip1559 params
354
+ * @param {ReplayProtectionOptions} replayProtectionOptions - replay protection options
355
+ * @returns {Promise<OfflineVaultTxInfo>}
356
+ */
357
+ formatForOfflineVault(txInfo: UnformattedTxInfo, ethTx: EthLikeTxLib.Transaction | EthLikeTxLib.FeeMarketEIP1559Transaction, userKey: string, backupKey: string, gasPrice: Buffer, gasLimit: number, eip1559?: EIP1559, replayProtectionOptions?: ReplayProtectionOptions): Promise<OfflineVaultTxInfo>;
358
+ /**
359
+ * Helper function for recover()
360
+ * This transforms the unsigned transaction information into a format the BitGo offline vault expects
361
+ * @param {UnformattedTxInfo} txInfo - tx info
362
+ * @param {EthLikeTxLib.Transaction | EthLikeTxLib.FeeMarketEIP1559Transaction} ethTx - the ethereumjs tx object
363
+ * @param {string} userKey - the user's key
364
+ * @param {string} backupKey - the backup key
365
+ * @param {Buffer} gasPrice - gas price for the tx
366
+ * @param {number} gasLimit - gas limit for the tx
367
+ * @param {number} backupKeyNonce - the nonce of the backup key address
368
+ * @param {EIP1559} eip1559 - eip1559 params
369
+ * @param {ReplayProtectionOptions} replayProtectionOptions - replay protection options
370
+ * @returns {Promise<OfflineVaultTxInfo>}
371
+ */
372
+ formatForOfflineVaultTSS(txInfo: UnformattedTxInfo, ethTx: EthLikeTxLib.Transaction | EthLikeTxLib.FeeMarketEIP1559Transaction, userKey: string, backupKey: string, gasPrice: Buffer, gasLimit: number, backupKeyNonce: number, eip1559?: EIP1559, replayProtectionOptions?: ReplayProtectionOptions): OfflineVaultTxInfo;
373
+ /**
374
+ * Check whether the gas price passed in by user are within our max and min bounds
375
+ * If they are not set, set them to the defaults
376
+ * @param {number} userGasPrice - user defined gas price
377
+ * @returns {number} the gas price to use for this transaction
378
+ */
379
+ setGasPrice(userGasPrice?: number): number;
380
+ /**
381
+ * Check whether gas limit passed in by user are within our max and min bounds
382
+ * If they are not set, set them to the defaults
383
+ * @param {number} userGasLimit user defined gas limit
384
+ * @returns {number} the gas limit to use for this transaction
385
+ */
386
+ setGasLimit(userGasLimit?: number): number;
387
+ /**
388
+ * Helper function for signTransaction for the rare case that SDK is doing the second signature
389
+ * Note: we are expecting this to be called from the offline vault
390
+ * @param {SignFinalOptions.txPrebuild} params.txPrebuild
391
+ * @param {string} params.prv
392
+ * @returns {{txHex: string}}
393
+ */
394
+ signFinalEthLike(params: SignFinalOptions): Promise<FullySignedTransaction>;
395
+ /**
396
+ * Assemble half-sign prebuilt transaction
397
+ * @param {SignTransactionOptions} params
398
+ */
399
+ signTransaction(params: SignTransactionOptions): Promise<SignedTransaction>;
400
+ /**
401
+ * Method to validate recovery params
402
+ * @param {RecoverOptions} params
403
+ * @returns {void}
404
+ */
405
+ validateRecoveryParams(params: RecoverOptions): void;
406
+ /**
407
+ * Method to sign tss recovery transaction
408
+ * @param {ECDSA.KeyCombined} userKeyCombined
409
+ * @param {ECDSA.KeyCombined} backupKeyCombined
410
+ * @param {string} txHex
411
+ * @param {Object} options
412
+ * @param {EcdsaTypes.SerializedNtilde} options.rangeProofChallenge
413
+ * @returns {Promise<ECDSAMethodTypes.Signature>}
414
+ */
415
+ private signRecoveryTSS;
416
+ /**
417
+ * Helper which combines key shares of user and backup
418
+ * @param {string} userPublicOrPrivateKeyShare
419
+ * @param {string} backupPrivateOrPublicKeyShare
420
+ * @param {string} walletPassphrase
421
+ * @returns {[ECDSAMethodTypes.KeyCombined, ECDSAMethodTypes.KeyCombined]}
422
+ */
423
+ private getKeyCombinedFromTssKeyShares;
424
+ /**
425
+ * Helper which Adds signatures to tx object and re-serializes tx
426
+ * @param {EthLikeCommon.default} ethCommon
427
+ * @param {EthLikeTxLib.FeeMarketEIP1559Transaction | EthLikeTxLib.Transaction} tx
428
+ * @param {ECDSAMethodTypes.Signature} signature
429
+ * @returns {EthLikeTxLib.FeeMarketEIP1559Transaction | EthLikeTxLib.Transaction}
430
+ */
431
+ private getSignedTxFromSignature;
432
+ /**
433
+ * Builds a funds recovery transaction without BitGo
434
+ * @param params
435
+ * @param {string} params.userKey - [encrypted] xprv
436
+ * @param {string} params.backupKey - [encrypted] xprv or xpub if the xprv is held by a KRS provider
437
+ * @param {string} params.walletPassphrase - used to decrypt userKey and backupKey
438
+ * @param {string} params.walletContractAddress - the ETH address of the wallet contract
439
+ * @param {string} params.krsProvider - necessary if backup key is held by KRS
440
+ * @param {string} params.recoveryDestination - target address to send recovered funds to
441
+ * @param {string} params.bitgoFeeAddress - wrong chain wallet fee address for evm based cross chain recovery txn
442
+ * @param {string} params.bitgoDestinationAddress - target bitgo address where fee will be sent for evm based cross chain recovery txn
443
+ */
444
+ recover(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
445
+ /**
446
+ * Builds a funds recovery transaction without BitGo for non-TSS transaction
447
+ * @param params
448
+ * @param {string} params.userKey [encrypted] xprv or xpub
449
+ * @param {string} params.backupKey [encrypted] xprv or xpub if the xprv is held by a KRS provider
450
+ * @param {string} params.walletPassphrase used to decrypt userKey and backupKey
451
+ * @param {string} params.walletContractAddress the EthLike address of the wallet contract
452
+ * @param {string} params.krsProvider necessary if backup key is held by KRS
453
+ * @param {string} params.recoveryDestination target address to send recovered funds to
454
+ * @param {string} params.bitgoFeeAddress wrong chain wallet fee address for evm based cross chain recovery txn
455
+ * @param {string} params.bitgoDestinationAddress target bitgo address where fee will be sent for evm based cross chain recovery txn
456
+ * @returns {Promise<RecoveryInfo | OfflineVaultTxInfo>}
457
+ */
458
+ protected recoverEthLike(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
459
+ /**
460
+ * Builds a unsigned (for cold, custody wallet) or
461
+ * half-signed (for hot wallet) evm cross chain recovery transaction with
462
+ * same expected arguments as recover method.
463
+ * This helps recover funds from evm based wrong chain.
464
+ * @param {RecoverOptions} params
465
+ * @returns {Promise<RecoveryInfo | OfflineVaultTxInfo>}
466
+ */
467
+ protected recoverEthLikeforEvmBasedRecovery(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
468
+ /**
469
+ * Query explorer for the balance of an address for a token
470
+ * @param {string} tokenContractAddress - address where the token smart contract is hosted
471
+ * @param {string} walletContractAddress - address of the wallet
472
+ * @returns {BigNumber} token balaance in base units
473
+ */
474
+ queryAddressTokenBalance(tokenContractAddress: string, walletContractAddress: string): Promise<any>;
475
+ recoverEthLikeTokenforEvmBasedRecovery(params: RecoverOptions, bitgoFeeAddressNonce: number, gasLimit: any, gasPrice: any, userKey: any, userSigningKey: any): Promise<OfflineVaultTxInfo>;
476
+ /**
477
+ * Validate evm based cross chain recovery params
478
+ * @param params {RecoverOptions}
479
+ * @returns {void}
480
+ */
481
+ validateEvmBasedRecoveryParams(params: RecoverOptions): void;
482
+ /**
483
+ * Return types, values, and total amount in wei to send in a batch transaction, using the method signature
484
+ * `distributeBatch(address[], uint256[])`
485
+ * @param {Recipient[]} recipients - transaction recipients
486
+ * @returns {GetBatchExecutionInfoRT} information needed to execute the batch transaction
487
+ */
488
+ getBatchExecutionInfo(recipients: Recipient[]): GetBatchExecutionInfoRT;
489
+ /**
490
+ * Get the data required to make an ETH function call defined by the given types and values
491
+ *
492
+ * @param {string} functionName - The name of the function being called, e.g. transfer
493
+ * @param types The types of the function call in order
494
+ * @param values The values of the function call in order
495
+ * @return {Buffer} The combined data for the function call
496
+ */
497
+ getMethodCallData: (functionName: any, types: any, values: any) => Buffer;
498
+ /**
499
+ * Build arguments to call the send method on the wallet contract
500
+ * @param txInfo
501
+ */
502
+ getSendMethodArgs(txInfo: GetSendMethodArgsOptions): SendMethodArgs[];
503
+ /**
504
+ * Recovers a tx with TSS key shares
505
+ * same expected arguments as recover method, but with TSS key shares
506
+ */
507
+ protected recoverTSS(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
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;
91
628
  }
92
629
  export {};
93
630
  //# sourceMappingURL=abstractEthLikeNewCoins.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"abstractEthLikeNewCoins.d.ts","sourceRoot":"","sources":["../../src/abstractEthLikeNewCoins.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,S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