@bitgo-beta/sdk-coin-eth 4.4.1-beta.162 → 4.4.1-beta.1621

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 (107) hide show
  1. package/dist/src/erc20Token.d.ts +13 -5
  2. package/dist/src/erc20Token.d.ts.map +1 -1
  3. package/dist/src/erc20Token.js +65 -27
  4. package/dist/src/erc721Token.d.ts +60 -0
  5. package/dist/src/erc721Token.d.ts.map +1 -0
  6. package/dist/src/erc721Token.js +334 -0
  7. package/dist/src/eth.d.ts +24 -519
  8. package/dist/src/eth.d.ts.map +1 -1
  9. package/dist/src/eth.js +215 -1596
  10. package/dist/src/gteth.d.ts +0 -4
  11. package/dist/src/gteth.d.ts.map +1 -1
  12. package/dist/src/gteth.js +1 -11
  13. package/dist/src/hteth.d.ts +0 -4
  14. package/dist/src/hteth.d.ts.map +1 -1
  15. package/dist/src/hteth.js +1 -11
  16. package/dist/src/index.d.ts +1 -0
  17. package/dist/src/index.d.ts.map +1 -1
  18. package/dist/src/index.js +7 -2
  19. package/dist/src/lib/index.d.ts +1 -0
  20. package/dist/src/lib/index.d.ts.map +1 -1
  21. package/dist/src/lib/index.js +7 -2
  22. package/dist/src/lib/messages/index.d.ts +3 -0
  23. package/dist/src/lib/messages/index.d.ts.map +1 -0
  24. package/dist/src/lib/messages/index.js +6 -0
  25. package/dist/src/lib/transactionBuilder.d.ts +9 -11
  26. package/dist/src/lib/transactionBuilder.d.ts.map +1 -1
  27. package/dist/src/lib/transactionBuilder.js +13 -24
  28. package/dist/src/register.d.ts +2 -0
  29. package/dist/src/register.d.ts.map +1 -1
  30. package/dist/src/register.js +13 -2
  31. package/dist/src/teth.d.ts +0 -3
  32. package/dist/src/teth.d.ts.map +1 -1
  33. package/dist/src/teth.js +1 -8
  34. package/dist/test/fixtures/eth.d.ts +39 -0
  35. package/dist/test/fixtures/eth.d.ts.map +1 -0
  36. package/dist/test/fixtures/eth.js +262 -0
  37. package/dist/test/resources/erc1155Abi.d.ts +40 -0
  38. package/dist/test/resources/erc1155Abi.d.ts.map +1 -0
  39. package/dist/test/resources/erc1155Abi.js +329 -0
  40. package/dist/test/resources/erc721Abi.d.ts +12 -0
  41. package/dist/test/resources/erc721Abi.d.ts.map +1 -0
  42. package/dist/test/resources/erc721Abi.js +34 -0
  43. package/dist/test/resources/eth.d.ts +51 -0
  44. package/dist/test/resources/eth.d.ts.map +1 -0
  45. package/dist/test/resources/eth.js +72 -0
  46. package/dist/test/resources/nftEncodings.d.ts +4 -0
  47. package/dist/test/resources/nftEncodings.d.ts.map +1 -0
  48. package/dist/test/resources/nftEncodings.js +7 -0
  49. package/dist/test/resources/walletSimpleAbi.d.ts +12 -0
  50. package/dist/test/resources/walletSimpleAbi.d.ts.map +1 -0
  51. package/dist/test/resources/walletSimpleAbi.js +44 -0
  52. package/dist/test/unit/eth.d.ts +2 -0
  53. package/dist/test/unit/eth.d.ts.map +1 -0
  54. package/dist/test/unit/eth.js +2149 -0
  55. package/dist/test/unit/ethWallet.d.ts +2 -0
  56. package/dist/test/unit/ethWallet.d.ts.map +1 -0
  57. package/dist/test/unit/ethWallet.js +472 -0
  58. package/dist/test/unit/fixtures/ethMultiSigBackupKey.d.ts +4 -0
  59. package/dist/test/unit/fixtures/ethMultiSigBackupKey.d.ts.map +1 -0
  60. package/dist/test/unit/fixtures/ethMultiSigBackupKey.js +10 -0
  61. package/dist/test/unit/fixtures/ethTssBackupKey.d.ts +5 -0
  62. package/dist/test/unit/fixtures/ethTssBackupKey.d.ts.map +1 -0
  63. package/dist/test/unit/fixtures/ethTssBackupKey.js +25 -0
  64. package/dist/test/unit/getBuilder.d.ts +3 -0
  65. package/dist/test/unit/getBuilder.d.ts.map +1 -0
  66. package/dist/test/unit/getBuilder.js +10 -0
  67. package/dist/test/unit/keyPair.d.ts +2 -0
  68. package/dist/test/unit/keyPair.d.ts.map +1 -0
  69. package/dist/test/unit/keyPair.js +175 -0
  70. package/dist/test/unit/transaction.d.ts +2 -0
  71. package/dist/test/unit/transaction.d.ts.map +1 -0
  72. package/dist/test/unit/transaction.js +96 -0
  73. package/dist/test/unit/transactionBuilder/addressInitialization.d.ts +2 -0
  74. package/dist/test/unit/transactionBuilder/addressInitialization.d.ts.map +1 -0
  75. package/dist/test/unit/transactionBuilder/addressInitialization.js +101 -0
  76. package/dist/test/unit/transactionBuilder/contractCall.d.ts +2 -0
  77. package/dist/test/unit/transactionBuilder/contractCall.d.ts.map +1 -0
  78. package/dist/test/unit/transactionBuilder/contractCall.js +101 -0
  79. package/dist/test/unit/transactionBuilder/flushCoins.d.ts +2 -0
  80. package/dist/test/unit/transactionBuilder/flushCoins.d.ts.map +1 -0
  81. package/dist/test/unit/transactionBuilder/flushCoins.js +133 -0
  82. package/dist/test/unit/transactionBuilder/flushTokens.d.ts +2 -0
  83. package/dist/test/unit/transactionBuilder/flushTokens.d.ts.map +1 -0
  84. package/dist/test/unit/transactionBuilder/flushTokens.js +281 -0
  85. package/dist/test/unit/transactionBuilder/send.d.ts +2 -0
  86. package/dist/test/unit/transactionBuilder/send.d.ts.map +1 -0
  87. package/dist/test/unit/transactionBuilder/send.js +331 -0
  88. package/dist/test/unit/transactionBuilder/sendNFT.d.ts +2 -0
  89. package/dist/test/unit/transactionBuilder/sendNFT.d.ts.map +1 -0
  90. package/dist/test/unit/transactionBuilder/sendNFT.js +250 -0
  91. package/dist/test/unit/transactionBuilder/singleSigSend.d.ts +2 -0
  92. package/dist/test/unit/transactionBuilder/singleSigSend.d.ts.map +1 -0
  93. package/dist/test/unit/transactionBuilder/singleSigSend.js +196 -0
  94. package/dist/test/unit/transactionBuilder/walletInitialization.d.ts +2 -0
  95. package/dist/test/unit/transactionBuilder/walletInitialization.d.ts.map +1 -0
  96. package/dist/test/unit/transactionBuilder/walletInitialization.js +423 -0
  97. package/dist/test/unit/transferBuilder.d.ts +2 -0
  98. package/dist/test/unit/transferBuilder.d.ts.map +1 -0
  99. package/dist/test/unit/transferBuilder.js +124 -0
  100. package/dist/test/unit/utils.d.ts +2 -0
  101. package/dist/test/unit/utils.d.ts.map +1 -0
  102. package/dist/test/unit/utils.js +74 -0
  103. package/dist/tsconfig.tsbuildinfo +1 -0
  104. package/package.json +16 -18
  105. package/.eslintignore +0 -5
  106. package/.mocharc.yml +0 -8
  107. package/CHANGELOG.md +0 -375
package/dist/src/eth.d.ts CHANGED
@@ -1,224 +1,18 @@
1
- /// <reference types="node" />
2
- import { AddressCoinSpecific, BaseCoin, BitGoBase, FeeEstimateOptions, FullySignedTransaction, HalfSignedTransaction, IWallet, KeyPair, MPCAlgorithm, ParsedTransaction, ParseTransactionOptions, PrebuildTransactionResult, PresignTransactionOptions as BasePresignTransactionOptions, Recipient, SignTransactionOptions as BaseSignTransactionOptions, TransactionParams, TypedData, VerifyAddressOptions as BaseVerifyAddressOptions, VerifyTransactionOptions, Wallet } from '@bitgo-beta/sdk-core';
3
- import { TransactionPrebuild, optionalDeps } from '@bitgo-beta/abstract-eth';
4
- import { BaseCoin as StaticsBaseCoin, EthereumNetwork } from '@bitgo-beta/statics';
1
+ import { BaseCoin, BitGoBase, FullySignedTransaction, HalfSignedTransaction, MPCAlgorithm, MultisigType, Recipient } from '@bitgo-beta/sdk-core';
2
+ import { AbstractEthLikeNewCoins, BuildOptions, BuildTransactionParams, FeesUsed, GetBatchExecutionInfoRT, GetSendMethodArgsOptions, OfflineVaultTxInfo, optionalDeps, RecoverOptions, RecoveryInfo, SendMethodArgs, SignedTransaction, SignFinalOptions, SignTransactionOptions, TransactionPrebuild, UnsignedSweepTxMPCv2 } from '@bitgo-beta/abstract-eth';
3
+ import { BaseCoin as StaticsBaseCoin } from '@bitgo-beta/statics';
5
4
  import type * as EthTxLib from '@ethereumjs/tx';
6
- import { TransactionBuilder } from './lib/transactionBuilder';
7
- export { Recipient, HalfSignedTransaction, FullySignedTransaction, TransactionPrebuild, optionalDeps };
8
- /**
9
- * The extra parameters to send to platform build route for hop transactions
10
- */
11
- interface HopParams {
12
- hopParams: {
13
- gasPriceMax: number;
14
- userReqSig: string;
15
- paymentId: string;
16
- };
17
- gasLimit: number;
18
- }
19
- /**
20
- * The prebuilt hop transaction returned from the HSM
21
- */
22
- interface HopPrebuild {
23
- tx: string;
24
- id: string;
25
- signature: string;
26
- paymentId: string;
27
- gasPrice: number;
28
- gasLimit: number;
29
- amount: number;
30
- recipient: string;
31
- nonce: number;
32
- userReqSig: string;
33
- gasPriceMax: number;
34
- }
35
- interface EIP1559 {
36
- maxPriorityFeePerGas: number;
37
- maxFeePerGas: number;
38
- }
39
- interface ReplayProtectionOptions {
40
- chain: string | number;
41
- hardfork: string;
42
- }
43
- export interface SignFinalOptions {
44
- txPrebuild: {
45
- eip1559?: EIP1559;
46
- replayProtectionOptions?: ReplayProtectionOptions;
47
- gasPrice?: string;
48
- gasLimit: string;
49
- recipients: Recipient[];
50
- halfSigned: {
51
- expireTime: number;
52
- contractSequenceId: number;
53
- backupKeyNonce?: number;
54
- signature: string;
55
- txHex?: string;
56
- };
57
- nextContractSequenceId?: number;
58
- hopTransaction?: string;
59
- backupKeyNonce?: number;
60
- isBatch?: boolean;
61
- txHex?: string;
62
- expireTime?: number;
63
- };
64
- signingKeyNonce: number;
65
- walletContractAddress: string;
66
- prv: string;
67
- recipients: Recipient[];
68
- }
69
- export interface SignTransactionOptions extends BaseSignTransactionOptions, SignFinalOptions {
70
- isLastSignature?: boolean;
71
- expireTime: number;
72
- sequenceId: number;
73
- gasLimit: number;
74
- gasPrice: number;
75
- custodianTransactionId?: string;
76
- }
77
- export declare type SignedTransaction = HalfSignedTransaction | FullySignedTransaction;
78
- export interface FeesUsed {
79
- gasPrice: number;
80
- gasLimit: number;
81
- }
82
- interface PrecreateBitGoOptions {
83
- enterprise?: string;
84
- newFeeAddress?: string;
85
- }
86
- export interface OfflineVaultTxInfo {
87
- nextContractSequenceId?: string;
88
- contractSequenceId?: string;
89
- tx?: string;
90
- txHex?: string;
91
- userKey?: string;
92
- backupKey?: string;
93
- coin: string;
94
- gasPrice: number;
95
- gasLimit: number;
96
- recipients: Recipient[];
97
- walletContractAddress: string;
98
- amount: string;
99
- backupKeyNonce: number;
100
- eip1559?: EIP1559;
101
- replayProtectionOptions?: ReplayProtectionOptions;
102
- halfSigned?: HalfSignedTransaction;
103
- feesUsed?: FeesUsed;
104
- isEvmBasedCrossChainRecovery?: boolean;
105
- }
106
- interface UnformattedTxInfo {
107
- recipient: Recipient;
108
- }
109
- export interface RecoverOptions {
110
- userKey: string;
111
- backupKey: string;
112
- walletPassphrase?: string;
113
- walletContractAddress: string;
114
- recoveryDestination: string;
115
- krsProvider?: string;
116
- gasPrice?: number;
117
- gasLimit?: number;
118
- eip1559?: EIP1559;
119
- replayProtectionOptions?: ReplayProtectionOptions;
120
- isTss?: boolean;
121
- bitgoFeeAddress?: string;
122
- bitgoDestinationAddress?: string;
123
- tokenContractAddress?: string;
124
- }
125
- export declare type GetBatchExecutionInfoRT = {
126
- values: [string[], string[]];
127
- totalAmount: string;
128
- };
129
- export interface BuildTransactionParams {
130
- to: string;
131
- nonce?: number;
132
- value: number;
133
- data?: Buffer;
134
- gasPrice?: number;
135
- gasLimit?: number;
136
- eip1559?: EIP1559;
137
- replayProtectionOptions?: ReplayProtectionOptions;
138
- }
139
- export interface RecoveryInfo {
140
- id: string;
141
- tx: string;
142
- backupKey?: string;
143
- coin?: string;
144
- }
145
- interface RecoverTokenOptions {
146
- tokenContractAddress: string;
147
- wallet: Wallet;
148
- recipient: string;
149
- broadcast?: boolean;
150
- walletPassphrase?: string;
151
- prv?: string;
152
- }
153
- export interface GetSendMethodArgsOptions {
154
- recipient: Recipient;
155
- expireTime: number;
156
- contractSequenceId: number;
157
- signature: string;
158
- }
159
- export interface SendMethodArgs {
160
- name: string;
161
- type: string;
162
- value: any;
163
- }
164
- interface HopTransactionBuildOptions {
165
- wallet: Wallet;
166
- recipients: Recipient[];
167
- walletPassphrase: string;
168
- }
169
- interface BuildOptions {
170
- hop?: boolean;
171
- wallet?: Wallet;
172
- recipients?: Recipient[];
173
- walletPassphrase?: string;
174
- [index: string]: unknown;
175
- }
176
- interface FeeEstimate {
177
- gasLimitEstimate: number;
178
- feeEstimate: number;
179
- }
180
- interface EthTransactionParams extends TransactionParams {
181
- gasPrice?: number;
182
- gasLimit?: number;
183
- hopParams?: HopParams;
184
- hop?: boolean;
185
- prebuildTx?: PrebuildTransactionResult;
186
- }
187
- interface VerifyEthTransactionOptions extends VerifyTransactionOptions {
188
- txPrebuild: TransactionPrebuild;
189
- txParams: EthTransactionParams;
190
- }
191
- interface PresignTransactionOptions extends TransactionPrebuild, BasePresignTransactionOptions {
192
- wallet: Wallet;
193
- }
194
- interface RecoverTokenTransaction {
195
- halfSigned: {
196
- recipient: Recipient;
197
- expireTime: number;
198
- contractSequenceId: number;
199
- operationHash: string;
200
- signature: string;
201
- gasLimit: number;
202
- gasPrice: number;
203
- tokenContractAddress: string;
204
- walletId: string;
205
- };
206
- }
207
- interface EthAddressCoinSpecifics extends AddressCoinSpecific {
208
- forwarderVersion: number;
209
- salt?: string;
210
- }
211
- interface VerifyEthAddressOptions extends BaseVerifyAddressOptions {
212
- baseAddress: string;
213
- coinSpecific: EthAddressCoinSpecifics;
214
- forwarderVersion: number;
215
- }
216
- export declare class Eth extends BaseCoin {
217
- static hopTransactionSalt: string;
218
- protected readonly sendMethodName: 'sendMultiSig' | 'sendMultiSigToken';
219
- readonly staticsCoin?: Readonly<StaticsBaseCoin>;
5
+ import { TransactionBuilder } from './lib';
6
+ export { BuildTransactionParams, Recipient, HalfSignedTransaction, FeesUsed, FullySignedTransaction, GetBatchExecutionInfoRT, GetSendMethodArgsOptions, TransactionPrebuild, OfflineVaultTxInfo, optionalDeps, RecoverOptions, RecoveryInfo, SendMethodArgs, SignFinalOptions, SignedTransaction, SignTransactionOptions, };
7
+ export declare class Eth extends AbstractEthLikeNewCoins {
220
8
  protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>);
221
9
  static createInstance(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>): BaseCoin;
10
+ allowsAccountConsolidations(): boolean;
11
+ /** @inheritDoc */
12
+ supportsTss(): boolean;
13
+ /** inherited doc */
14
+ getDefaultMultisigType(): MultisigType;
15
+ getMPCAlgorithm(): MPCAlgorithm;
222
16
  /**
223
17
  * Gets correct Eth Common object based on params from either recovery or tx building
224
18
  * @param eip1559 {EIP1559} configs that specify whether we should construct an eip1559 tx
@@ -226,35 +20,19 @@ export declare class Eth extends BaseCoin {
226
20
  */
227
21
  private static getEthCommon;
228
22
  static buildTransaction(params: BuildTransactionParams): EthTxLib.FeeMarketEIP1559Transaction | EthTxLib.Transaction;
229
- /** @inheritDoc */
230
- supportsTss(): boolean;
231
- /** @inheritDoc */
232
- isEVM(): boolean;
233
- getMPCAlgorithm(): MPCAlgorithm;
234
- /**
235
- * Returns the factor between the base unit and its smallest subdivison
236
- * @return {number}
237
- */
238
- getBaseFactor(): string;
239
- getChain(): string;
240
- getFamily(): string;
241
- getNetwork(): EthereumNetwork | undefined;
242
- getFullName(): string;
243
23
  /**
244
- * Flag for sending value of 0
245
- * @returns {boolean} True if okay to send 0 value, false otherwise
246
- */
247
- valuelessTransferAllowed(): boolean;
248
- /**
249
- * Flag for sending data along with transactions
250
- * @returns {boolean} True if okay to send tx data (ETH), false otherwise
24
+ * Make a query to Etherscan for information such as balance, token balance, solidity calls
25
+ * @param query {Object} key-value pairs of parameters to append after /api
26
+ * @param apiKey {string} optional API key to use instead of the one from the environment
27
+ * @returns {Object} response from Etherscan
251
28
  */
252
- transactionDataAllowed(): boolean;
29
+ recoveryBlockchainExplorerQuery(query: Record<string, string>, apiKey?: string): Promise<any>;
253
30
  /**
254
- * Evaluates whether an address string is valid for this coin
255
- * @param address
31
+ * Recovers a tx with non-TSS keys
32
+ * same expected arguments as recover method (original logic before adding TSS recover path)
256
33
  */
257
- isValidAddress(address: string): boolean;
34
+ protected recoverEthLike(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
35
+ protected buildUnsignedSweepTxnTSS(params: RecoverOptions): Promise<OfflineVaultTxInfo | UnsignedSweepTxMPCv2>;
258
36
  /**
259
37
  * Return boolean indicating whether input is valid public key for the coin.
260
38
  *
@@ -262,49 +40,6 @@ export declare class Eth extends BaseCoin {
262
40
  * @returns {Boolean} is it valid?
263
41
  */
264
42
  isValidPub(pub: string): boolean;
265
- /**
266
- * Default gas price from platform
267
- * @returns {BigNumber}
268
- */
269
- getRecoveryGasPrice(): any;
270
- /**
271
- * Default gas limit from platform
272
- * @returns {BigNumber}
273
- */
274
- getRecoveryGasLimit(): any;
275
- /**
276
- * Default expire time for a contract call (1 week)
277
- * @returns {number} Time in seconds
278
- */
279
- getDefaultExpireTime(): number;
280
- /**
281
- * Query Etherscan for the balance of an address
282
- * @param address {String} the ETH address
283
- * @returns {BigNumber} address balance
284
- */
285
- queryAddressBalance(address: string): Promise<any>;
286
- /**
287
- * Query Etherscan for the balance of an address for a token
288
- * @param tokenContractAddress {String} address where the token smart contract is hosted
289
- * @param walletContractAddress {String} address of the wallet
290
- * @returns {BigNumber} token balaance in base units
291
- */
292
- queryAddressTokenBalance(tokenContractAddress: string, walletContractAddress: string): Promise<any>;
293
- /**
294
- * Get transfer operation for coin
295
- * @param recipient recipient info
296
- * @param expireTime expiry time
297
- * @param contractSequenceId sequence id
298
- * @returns {Array} operation array
299
- */
300
- getOperation(recipient: Recipient, expireTime: number, contractSequenceId: number): (string | Buffer)[][];
301
- getOperationSha3ForExecuteAndConfirm(recipients: Recipient[], expireTime: number, contractSequenceId: number): string;
302
- /**
303
- * Queries the contract (via Etherscan) for the next sequence ID
304
- * @param address {String} address of the contract
305
- * @returns {Number} sequence ID
306
- */
307
- querySequenceId(address: string): Promise<number>;
308
43
  /**
309
44
  * Helper function for signTransaction for the rare case that SDK is doing the second signature
310
45
  * Note: we are expecting this to be called from the offline vault
@@ -323,174 +58,6 @@ export declare class Eth extends BaseCoin {
323
58
  * @returns {Promise<SignedTransaction>}
324
59
  */
325
60
  signTransaction(params: SignTransactionOptions): Promise<SignedTransaction>;
326
- /**
327
- * Ensure either enterprise or newFeeAddress is passed, to know whether to create new key or use enterprise key
328
- * @param params
329
- * @param params.enterprise {String} the enterprise id to associate with this key
330
- * @param params.newFeeAddress {Boolean} create a new fee address (enterprise not needed in this case)
331
- */
332
- preCreateBitGo(params: PrecreateBitGoOptions): void;
333
- /**
334
- * Queries public block explorer to get the next ETH nonce that should be used for the given ETH address
335
- * @param address
336
- * @returns {*}
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 txInfo
343
- * @param ethTx
344
- * @param userKey
345
- * @param backupKey
346
- * @param gasPrice
347
- * @param gasLimit
348
- * @param eip1559
349
- * @param replayProtectionOptions
350
- * @returns {Promise<OfflineVaultTxInfo>}
351
- */
352
- formatForOfflineVault(txInfo: UnformattedTxInfo, ethTx: EthTxLib.Transaction | EthTxLib.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 txInfo
357
- * @param ethTx
358
- * @param userKey
359
- * @param backupKey
360
- * @param gasPrice
361
- * @param gasLimit
362
- * @param eip1559
363
- * @param replayProtectionOptions
364
- * @returns {Promise<OfflineVaultTxInfo>}
365
- */
366
- formatForOfflineVaultTSS(txInfo: UnformattedTxInfo, ethTx: EthTxLib.Transaction | EthTxLib.FeeMarketEIP1559Transaction, userKey: string, backupKey: string, gasPrice: Buffer, gasLimit: number, backupKeyNonce: number, eip1559?: EIP1559, replayProtectionOptions?: ReplayProtectionOptions): OfflineVaultTxInfo;
367
- /**
368
- * Check whether the gas price passed in by user are within our max and min bounds
369
- * If they are not set, set them to the defaults
370
- * @param userGasPrice user defined gas price
371
- * @returns the gas price to use for this transaction
372
- */
373
- setGasPrice(userGasPrice?: number): number;
374
- /**
375
- * Check whether gas limit passed in by user are within our max and min bounds
376
- * If they are not set, set them to the defaults
377
- * @param userGasLimit user defined gas limit
378
- * @returns the gas limit to use for this transaction
379
- */
380
- setGasLimit(userGasLimit?: number): number;
381
- validateRecoveryParams(params: RecoverOptions): void;
382
- private signRecoveryTSS;
383
- /**
384
- * Helper which combines key shares of user and backup
385
- * */
386
- private getKeyCombinedFromTssKeyShares;
387
- /**
388
- * Helper which Adds signatures to tx object and re-serializes tx
389
- * */
390
- private getSignedTxFromSignature;
391
- /**
392
- * Builds a funds recovery transaction without BitGo
393
- * @param params
394
- * @param params.userKey {String} [encrypted] xprv
395
- * @param params.backupKey {String} [encrypted] xprv or xpub if the xprv is held by a KRS provider
396
- * @param params.walletPassphrase {String} used to decrypt userKey and backupKey
397
- * @param params.walletContractAddress {String} the ETH address of the wallet contract
398
- * @param params.krsProvider {String} necessary if backup key is held by KRS
399
- * @param params.recoveryDestination {String} target address to send recovered funds to
400
- * @param params.bitgoFeeAddress {String} wrong chain wallet fee address for evm based cross chain recovery txn
401
- * @param params.bitgoDestinationAddress {String} target bitgo address where fee will be sent for evm based cross chain recovery txn
402
- */
403
- recover(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
404
- /**
405
- * Builds a unsigned (for cold, custody wallet) or
406
- * half-signed (for hot wallet) evm cross chain recovery transaction with
407
- * same expected arguments as recover method.
408
- * This helps recover funds from evm based wrong chain.
409
- */
410
- protected recoverEthLikeforEvmBasedRecovery(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
411
- recoverEthLikeTokenforEvmBasedRecovery(params: RecoverOptions, bitgoFeeAddressNonce: number, gasLimit: any, gasPrice: any, userKey: any, userSigningKey: any): Promise<OfflineVaultTxInfo>;
412
- validateEvmBasedRecoveryParams(params: RecoverOptions): void;
413
- /**
414
- * Create a new transaction builder for the current chain
415
- * @return a new transaction builder
416
- */
417
- protected getTransactionBuilder(): TransactionBuilder;
418
- /**
419
- * Get the base chain that the coin exists on.
420
- */
421
- getBaseChain(): string;
422
- /**
423
- * Return types, values, and total amount in wei to send in a batch transaction, using the method signature
424
- * `distributeBatch(address[], uint256[])`
425
- * @param {Recipient[]} recipients - transaction recipients
426
- * @returns {GetBatchExecutionInfoRT} information needed to execute the batch transaction
427
- */
428
- getBatchExecutionInfo(recipients: Recipient[]): GetBatchExecutionInfoRT;
429
- /**
430
- * Get the data required to make an ETH function call defined by the given types and values
431
- *
432
- * @param functionName The name of the function being called, e.g. transfer
433
- * @param types The types of the function call in order
434
- * @param values The values of the function call in order
435
- * @return {Buffer} The combined data for the function call
436
- */
437
- getMethodCallData: (functionName: any, types: any, values: any) => Buffer;
438
- /**
439
- * Recovers a tx with TSS key shares
440
- * same expected arguments as recover method, but with TSS key shares
441
- */
442
- protected recoverTSS(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
443
- /**
444
- * Recovers a tx with non-TSS keys
445
- * same expected arguments as recover method (original logic before adding TSS recover path)
446
- */
447
- protected recoverEthLike(params: RecoverOptions): Promise<RecoveryInfo | OfflineVaultTxInfo>;
448
- /**
449
- * Recover an unsupported token from a BitGo multisig wallet
450
- * This builds a half-signed transaction, for which there will be an admin route to co-sign and broadcast. Optionally
451
- * the user can set params.broadcast = true and the half-signed tx will be sent to BitGo for cosigning and broadcasting
452
- * @param params
453
- * @param params.wallet the wallet to recover the token from
454
- * @param params.tokenContractAddress the contract address of the unsupported token
455
- * @param params.recipient the destination address recovered tokens should be sent to
456
- * @param params.walletPassphrase the wallet passphrase
457
- * @param params.prv the xprv
458
- * @param params.broadcast if true, we will automatically submit the half-signed tx to BitGo for cosigning and broadcasting
459
- */
460
- recoverToken(params: RecoverTokenOptions): Promise<RecoverTokenTransaction>;
461
- /**
462
- * Build arguments to call the send method on the wallet contract
463
- * @param txInfo
464
- */
465
- getSendMethodArgs(txInfo: GetSendMethodArgsOptions): SendMethodArgs[];
466
- /**
467
- * Make a query to Etherscan for information such as balance, token balance, solidity calls
468
- * @param query {Object} key-value pairs of parameters to append after /api
469
- * @returns {Object} response from Etherscan
470
- */
471
- recoveryBlockchainExplorerQuery(query: Record<string, string>): Promise<any>;
472
- /**
473
- * Creates the extra parameters needed to build a hop transaction
474
- * @param buildParams The original build parameters
475
- * @returns extra parameters object to merge with the original build parameters object and send to the platform
476
- */
477
- createHopTransactionParams(buildParams: HopTransactionBuildOptions): Promise<HopParams>;
478
- /**
479
- * Validates that the hop prebuild from the HSM is valid and correct
480
- * @param wallet The wallet that the prebuild is for
481
- * @param hopPrebuild The prebuild to validate
482
- * @param originalParams The original parameters passed to prebuildTransaction
483
- * @returns void
484
- * @throws Error if The prebuild is invalid
485
- */
486
- validateHopPrebuild(wallet: IWallet, hopPrebuild: HopPrebuild, originalParams?: {
487
- recipients: Recipient[];
488
- }): Promise<void>;
489
- /**
490
- * Gets the hop digest for the user to sign. This is validated in the HSM to prove that the user requested this tx
491
- * @param paramsArr The parameters to hash together for the digest
492
- */
493
- private static getHopDigest;
494
61
  /**
495
62
  * Modify prebuild before sending it to the server. Add things like hop transaction params
496
63
  * @param buildParams The whitelisted parameters for this prebuild
@@ -501,71 +68,9 @@ export declare class Eth extends BaseCoin {
501
68
  */
502
69
  getExtraPrebuildParams(buildParams: BuildOptions): Promise<BuildOptions>;
503
70
  /**
504
- * Modify prebuild after receiving it from the server. Add things like nlocktime
505
- */
506
- postProcessPrebuild(params: TransactionPrebuild): Promise<TransactionPrebuild>;
507
- /**
508
- * Coin-specific things done before signing a transaction, i.e. verification
509
- * @param params
510
- */
511
- presignTransaction(params: PresignTransactionOptions): Promise<PresignTransactionOptions>;
512
- /**
513
- * Fetch fee estimate information from the server
514
- * @param {Object} params The params passed into the function
515
- * @param {Boolean} [params.hop] True if we should estimate fee for a hop transaction
516
- * @param {String} [params.recipient] The recipient of the transaction to estimate a send to
517
- * @param {String} [params.data] The ETH tx data to estimate a send for
518
- * @returns {Object} The fee info returned from the server
519
- */
520
- feeEstimate(params: FeeEstimateOptions): Promise<FeeEstimate>;
521
- /**
522
- * Generate secp256k1 key pair
523
- *
524
- * @param seed
525
- * @returns {Object} object with generated pub and prv
526
- */
527
- generateKeyPair(seed: Buffer): KeyPair;
528
- parseTransaction(params: ParseTransactionOptions): Promise<ParsedTransaction>;
529
- /**
530
- * Make sure an address is a wallet address and throw an error if it's not.
531
- * @param {Object} params
532
- * @param {String} params.address The derived address string on the network
533
- * @param {Object} params.coinSpecific Coin-specific details for the address such as a forwarderVersion
534
- * @param {String} params.baseAddress The base address of the wallet on the network
535
- * @throws {InvalidAddressError}
536
- * @throws {InvalidAddressVerificationObjectPropertyError}
537
- * @throws {UnexpectedAddressError}
538
- * @returns {Boolean} True iff address is a wallet address
539
- */
540
- isWalletAddress(params: VerifyEthAddressOptions): Promise<boolean>;
541
- verifyCoin(txPrebuild: TransactionPrebuild): boolean;
542
- verifyTssTransaction(params: VerifyEthTransactionOptions): boolean;
543
- /**
544
- * Verify that a transaction prebuild complies with the original intention
545
- *
546
- * @param params
547
- * @param params.txParams params object passed to send
548
- * @param params.txPrebuild prebuild object returned by server
549
- * @param params.wallet Wallet object to obtain keys to verify against
550
- * @returns {boolean}
551
- */
552
- verifyTransaction(params: VerifyEthTransactionOptions): Promise<boolean>;
553
- /** @inheritDoc */
554
- supportsMessageSigning(): boolean;
555
- /** @inheritDoc */
556
- supportsSigningTypedData(): boolean;
557
- /**
558
- * Transform message to accommodate specific blockchain requirements.
559
- * @param message the message to prepare
560
- * @return string the prepared message.
561
- */
562
- encodeMessage(message: string): string;
563
- /**
564
- * Transform the Typed data to accomodate the blockchain requirements (EIP-712)
565
- * @param typedData the typed data to prepare
566
- * @return a buffer of the result
71
+ * Create a new transaction builder for the current chain
72
+ * @return a new transaction builder
567
73
  */
568
- encodeTypedData(typedData: TypedData): Buffer;
569
- private isETHAddress;
74
+ protected getTransactionBuilder(): TransactionBuilder;
570
75
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