@bitgo-beta/abstract-eth 1.2.3-alpha.404 → 1.2.3-alpha.406

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