ccxt 4.2.60 → 4.2.62

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 (160) hide show
  1. package/README.md +6 -5
  2. package/build.sh +1 -1
  3. package/dist/ccxt.browser.js +11280 -3407
  4. package/dist/ccxt.browser.min.js +7 -7
  5. package/dist/cjs/ccxt.js +4 -1
  6. package/dist/cjs/src/abstract/hyperliquid.js +9 -0
  7. package/dist/cjs/src/base/Exchange.js +22 -1
  8. package/dist/cjs/src/base/functions/encode.js +5 -0
  9. package/dist/cjs/src/base/functions.js +1 -0
  10. package/dist/cjs/src/bitfinex2.js +1 -1
  11. package/dist/cjs/src/bitget.js +74 -23
  12. package/dist/cjs/src/coinbase.js +108 -103
  13. package/dist/cjs/src/coinex.js +61 -1
  14. package/dist/cjs/src/hyperliquid.js +2035 -0
  15. package/dist/cjs/src/kraken.js +8 -2
  16. package/dist/cjs/src/krakenfutures.js +28 -0
  17. package/dist/cjs/src/kucoinfutures.js +2 -2
  18. package/dist/cjs/src/okx.js +1 -1
  19. package/dist/cjs/src/phemex.js +2 -2
  20. package/dist/cjs/src/pro/bingx.js +1 -0
  21. package/dist/cjs/src/static_dependencies/ethers/abi-coder.js +158 -0
  22. package/dist/cjs/src/static_dependencies/ethers/address/address.js +144 -0
  23. package/dist/cjs/src/static_dependencies/ethers/coders/abstract-coder.js +407 -0
  24. package/dist/cjs/src/static_dependencies/ethers/coders/address.js +45 -0
  25. package/dist/cjs/src/static_dependencies/ethers/coders/anonymous.js +28 -0
  26. package/dist/cjs/src/static_dependencies/ethers/coders/array.js +176 -0
  27. package/dist/cjs/src/static_dependencies/ethers/coders/boolean.js +27 -0
  28. package/dist/cjs/src/static_dependencies/ethers/coders/bytes.js +52 -0
  29. package/dist/cjs/src/static_dependencies/ethers/coders/fixed-bytes.js +45 -0
  30. package/dist/cjs/src/static_dependencies/ethers/coders/null.js +30 -0
  31. package/dist/cjs/src/static_dependencies/ethers/coders/number.js +60 -0
  32. package/dist/cjs/src/static_dependencies/ethers/coders/string.js +27 -0
  33. package/dist/cjs/src/static_dependencies/ethers/coders/tuple.js +68 -0
  34. package/dist/cjs/src/static_dependencies/ethers/fragments.js +614 -0
  35. package/dist/cjs/src/static_dependencies/ethers/hash/typed-data.js +492 -0
  36. package/dist/cjs/src/static_dependencies/ethers/index.js +35 -0
  37. package/dist/cjs/src/static_dependencies/ethers/interface.js +44 -0
  38. package/dist/cjs/src/static_dependencies/ethers/typed.js +618 -0
  39. package/dist/cjs/src/static_dependencies/ethers/utils/base58.js +20 -0
  40. package/dist/cjs/src/static_dependencies/ethers/utils/data.js +134 -0
  41. package/dist/cjs/src/static_dependencies/ethers/utils/errors.js +228 -0
  42. package/dist/cjs/src/static_dependencies/ethers/utils/events.js +13 -0
  43. package/dist/cjs/src/static_dependencies/ethers/utils/fixednumber.js +29 -0
  44. package/dist/cjs/src/static_dependencies/ethers/utils/index.js +53 -0
  45. package/dist/cjs/src/static_dependencies/ethers/utils/maths.js +231 -0
  46. package/dist/cjs/src/static_dependencies/ethers/utils/properties.js +47 -0
  47. package/dist/cjs/src/static_dependencies/ethers/utils/utf8.js +218 -0
  48. package/dist/cjs/src/static_dependencies/messagepack/msgpack.js +292 -0
  49. package/dist/cjs/src/tokocrypto.js +22 -2
  50. package/dist/cjs/src/wazirx.js +308 -3
  51. package/js/ccxt.d.ts +5 -2
  52. package/js/ccxt.js +4 -2
  53. package/js/src/abstract/coinbase.d.ts +3 -3
  54. package/js/src/abstract/hyperliquid.d.ts +9 -0
  55. package/js/src/abstract/hyperliquid.js +11 -0
  56. package/js/src/base/Exchange.d.ts +4 -0
  57. package/js/src/base/Exchange.js +13 -1
  58. package/js/src/base/functions/encode.d.ts +2 -1
  59. package/js/src/base/functions/encode.js +5 -1
  60. package/js/src/bitfinex2.js +1 -1
  61. package/js/src/bitget.js +74 -23
  62. package/js/src/coinbase.js +108 -103
  63. package/js/src/coinex.d.ts +3 -1
  64. package/js/src/coinex.js +61 -1
  65. package/js/src/hyperliquid.d.ts +83 -0
  66. package/js/src/hyperliquid.js +2036 -0
  67. package/js/src/kraken.js +8 -2
  68. package/js/src/krakenfutures.d.ts +2 -1
  69. package/js/src/krakenfutures.js +28 -0
  70. package/js/src/kucoinfutures.js +2 -2
  71. package/js/src/okx.js +1 -1
  72. package/js/src/phemex.js +2 -2
  73. package/js/src/pro/bingx.js +1 -0
  74. package/js/src/static_dependencies/ethers/abi-coder.d.ts +50 -0
  75. package/js/src/static_dependencies/ethers/abi-coder.js +148 -0
  76. package/js/src/static_dependencies/ethers/address/address.d.ts +55 -0
  77. package/js/src/static_dependencies/ethers/address/address.js +162 -0
  78. package/js/src/static_dependencies/ethers/address/checks.d.ts +80 -0
  79. package/js/src/static_dependencies/ethers/address/checks.js +119 -0
  80. package/js/src/static_dependencies/ethers/address/contract-address.d.ts +47 -0
  81. package/js/src/static_dependencies/ethers/address/contract-address.js +73 -0
  82. package/js/src/static_dependencies/ethers/address/index.d.ts +48 -0
  83. package/js/src/static_dependencies/ethers/address/index.js +24 -0
  84. package/js/src/static_dependencies/ethers/bytes32.d.ts +14 -0
  85. package/js/src/static_dependencies/ethers/bytes32.js +45 -0
  86. package/js/src/static_dependencies/ethers/coders/abstract-coder.d.ts +120 -0
  87. package/js/src/static_dependencies/ethers/coders/abstract-coder.js +424 -0
  88. package/js/src/static_dependencies/ethers/coders/address.d.ts +12 -0
  89. package/js/src/static_dependencies/ethers/coders/address.js +34 -0
  90. package/js/src/static_dependencies/ethers/coders/anonymous.d.ts +14 -0
  91. package/js/src/static_dependencies/ethers/coders/anonymous.js +27 -0
  92. package/js/src/static_dependencies/ethers/coders/array.d.ts +24 -0
  93. package/js/src/static_dependencies/ethers/coders/array.js +162 -0
  94. package/js/src/static_dependencies/ethers/coders/boolean.d.ts +12 -0
  95. package/js/src/static_dependencies/ethers/coders/boolean.js +26 -0
  96. package/js/src/static_dependencies/ethers/coders/bytes.d.ts +18 -0
  97. package/js/src/static_dependencies/ethers/coders/bytes.js +39 -0
  98. package/js/src/static_dependencies/ethers/coders/fixed-bytes.d.ts +14 -0
  99. package/js/src/static_dependencies/ethers/coders/fixed-bytes.js +32 -0
  100. package/js/src/static_dependencies/ethers/coders/null.d.ts +11 -0
  101. package/js/src/static_dependencies/ethers/coders/null.js +29 -0
  102. package/js/src/static_dependencies/ethers/coders/number.d.ts +15 -0
  103. package/js/src/static_dependencies/ethers/coders/number.js +48 -0
  104. package/js/src/static_dependencies/ethers/coders/string.d.ts +12 -0
  105. package/js/src/static_dependencies/ethers/coders/string.js +26 -0
  106. package/js/src/static_dependencies/ethers/coders/tuple.d.ts +15 -0
  107. package/js/src/static_dependencies/ethers/coders/tuple.js +67 -0
  108. package/js/src/static_dependencies/ethers/fragments.d.ts +458 -0
  109. package/js/src/static_dependencies/ethers/fragments.js +1252 -0
  110. package/js/src/static_dependencies/ethers/hash/index.d.ts +10 -0
  111. package/js/src/static_dependencies/ethers/hash/index.js +15 -0
  112. package/js/src/static_dependencies/ethers/hash/solidity.d.ts +30 -0
  113. package/js/src/static_dependencies/ethers/hash/solidity.js +107 -0
  114. package/js/src/static_dependencies/ethers/hash/typed-data.d.ts +144 -0
  115. package/js/src/static_dependencies/ethers/hash/typed-data.js +490 -0
  116. package/js/src/static_dependencies/ethers/index.d.ts +19 -0
  117. package/js/src/static_dependencies/ethers/index.js +22 -0
  118. package/js/src/static_dependencies/ethers/interface.d.ts +380 -0
  119. package/js/src/static_dependencies/ethers/interface.js +990 -0
  120. package/js/src/static_dependencies/ethers/typed.d.ts +569 -0
  121. package/js/src/static_dependencies/ethers/typed.js +608 -0
  122. package/js/src/static_dependencies/ethers/utils/base58.d.ts +22 -0
  123. package/js/src/static_dependencies/ethers/utils/base58.js +68 -0
  124. package/js/src/static_dependencies/ethers/utils/base64-browser.d.ts +3 -0
  125. package/js/src/static_dependencies/ethers/utils/base64-browser.js +24 -0
  126. package/js/src/static_dependencies/ethers/utils/base64.d.ts +39 -0
  127. package/js/src/static_dependencies/ethers/utils/base64.js +58 -0
  128. package/js/src/static_dependencies/ethers/utils/data.d.ts +92 -0
  129. package/js/src/static_dependencies/ethers/utils/data.js +175 -0
  130. package/js/src/static_dependencies/ethers/utils/errors.d.ts +509 -0
  131. package/js/src/static_dependencies/ethers/utils/errors.js +227 -0
  132. package/js/src/static_dependencies/ethers/utils/events.d.ts +76 -0
  133. package/js/src/static_dependencies/ethers/utils/events.js +52 -0
  134. package/js/src/static_dependencies/ethers/utils/fixednumber.d.ts +251 -0
  135. package/js/src/static_dependencies/ethers/utils/fixednumber.js +529 -0
  136. package/js/src/static_dependencies/ethers/utils/index.d.ts +30 -0
  137. package/js/src/static_dependencies/ethers/utils/index.js +38 -0
  138. package/js/src/static_dependencies/ethers/utils/maths.d.ts +65 -0
  139. package/js/src/static_dependencies/ethers/utils/maths.js +220 -0
  140. package/js/src/static_dependencies/ethers/utils/properties.d.ts +22 -0
  141. package/js/src/static_dependencies/ethers/utils/properties.js +59 -0
  142. package/js/src/static_dependencies/ethers/utils/rlp-decode.d.ts +5 -0
  143. package/js/src/static_dependencies/ethers/utils/rlp-decode.js +84 -0
  144. package/js/src/static_dependencies/ethers/utils/rlp-encode.d.ts +5 -0
  145. package/js/src/static_dependencies/ethers/utils/rlp-encode.js +54 -0
  146. package/js/src/static_dependencies/ethers/utils/rlp.d.ts +16 -0
  147. package/js/src/static_dependencies/ethers/utils/rlp.js +14 -0
  148. package/js/src/static_dependencies/ethers/utils/units.d.ts +23 -0
  149. package/js/src/static_dependencies/ethers/utils/units.js +88 -0
  150. package/js/src/static_dependencies/ethers/utils/utf8.d.ts +95 -0
  151. package/js/src/static_dependencies/ethers/utils/utf8.js +225 -0
  152. package/js/src/static_dependencies/ethers/utils/uuid.d.ts +7 -0
  153. package/js/src/static_dependencies/ethers/utils/uuid.js +35 -0
  154. package/js/src/static_dependencies/messagepack/msgpack.d.ts +2 -0
  155. package/js/src/static_dependencies/messagepack/msgpack.js +572 -0
  156. package/js/src/tokocrypto.js +22 -2
  157. package/js/src/wazirx.d.ts +12 -1
  158. package/js/src/wazirx.js +308 -3
  159. package/package.json +1 -1
  160. package/skip-tests.json +18 -0
@@ -0,0 +1,380 @@
1
+ /**
2
+ * The Interface class is a low-level class that accepts an
3
+ * ABI and provides all the necessary functionality to encode
4
+ * and decode paramaters to and results from methods, events
5
+ * and errors.
6
+ *
7
+ * It also provides several convenience methods to automatically
8
+ * search and find matching transactions and events to parse them.
9
+ *
10
+ * @_subsection api/abi:Interfaces [interfaces]
11
+ */
12
+ import { AbiCoder } from "./abi-coder.js";
13
+ import { checkResultErrors, Result } from "./coders/abstract-coder.js";
14
+ import { ConstructorFragment, ErrorFragment, EventFragment, FallbackFragment, Fragment, FunctionFragment, ParamType } from "./fragments.js";
15
+ import { Typed } from "./typed.js";
16
+ import type { BigNumberish, BytesLike } from "./utils/index.js";
17
+ import type { JsonFragment } from "./fragments.js";
18
+ export { checkResultErrors, Result };
19
+ /**
20
+ * When using the [[Interface-parseLog]] to automatically match a Log to its event
21
+ * for parsing, a **LogDescription** is returned.
22
+ */
23
+ export declare class LogDescription {
24
+ /**
25
+ * The matching fragment for the ``topic0``.
26
+ */
27
+ readonly fragment: EventFragment;
28
+ /**
29
+ * The name of the Event.
30
+ */
31
+ readonly name: string;
32
+ /**
33
+ * The full Event signature.
34
+ */
35
+ readonly signature: string;
36
+ /**
37
+ * The topic hash for the Event.
38
+ */
39
+ readonly topic: string;
40
+ /**
41
+ * The arguments passed into the Event with ``emit``.
42
+ */
43
+ readonly args: Result;
44
+ /**
45
+ * @_ignore:
46
+ */
47
+ constructor(fragment: EventFragment, topic: string, args: Result);
48
+ }
49
+ /**
50
+ * When using the [[Interface-parseTransaction]] to automatically match
51
+ * a transaction data to its function for parsing,
52
+ * a **TransactionDescription** is returned.
53
+ */
54
+ export declare class TransactionDescription {
55
+ /**
56
+ * The matching fragment from the transaction ``data``.
57
+ */
58
+ readonly fragment: FunctionFragment;
59
+ /**
60
+ * The name of the Function from the transaction ``data``.
61
+ */
62
+ readonly name: string;
63
+ /**
64
+ * The arguments passed to the Function from the transaction ``data``.
65
+ */
66
+ readonly args: Result;
67
+ /**
68
+ * The full Function signature from the transaction ``data``.
69
+ */
70
+ readonly signature: string;
71
+ /**
72
+ * The selector for the Function from the transaction ``data``.
73
+ */
74
+ readonly selector: string;
75
+ /**
76
+ * The ``value`` (in wei) from the transaction.
77
+ */
78
+ readonly value: bigint;
79
+ /**
80
+ * @_ignore:
81
+ */
82
+ constructor(fragment: FunctionFragment, selector: string, args: Result, value: bigint);
83
+ }
84
+ /**
85
+ * When using the [[Interface-parseError]] to automatically match an
86
+ * error for a call result for parsing, an **ErrorDescription** is returned.
87
+ */
88
+ export declare class ErrorDescription {
89
+ /**
90
+ * The matching fragment.
91
+ */
92
+ readonly fragment: ErrorFragment;
93
+ /**
94
+ * The name of the Error.
95
+ */
96
+ readonly name: string;
97
+ /**
98
+ * The arguments passed to the Error with ``revert``.
99
+ */
100
+ readonly args: Result;
101
+ /**
102
+ * The full Error signature.
103
+ */
104
+ readonly signature: string;
105
+ /**
106
+ * The selector for the Error.
107
+ */
108
+ readonly selector: string;
109
+ /**
110
+ * @_ignore:
111
+ */
112
+ constructor(fragment: ErrorFragment, selector: string, args: Result);
113
+ }
114
+ /**
115
+ * An **Indexed** is used as a value when a value that does not
116
+ * fit within a topic (i.e. not a fixed-length, 32-byte type). It
117
+ * is the ``keccak256`` of the value, and used for types such as
118
+ * arrays, tuples, bytes and strings.
119
+ */
120
+ export declare class Indexed {
121
+ /**
122
+ * The ``keccak256`` of the value logged.
123
+ */
124
+ readonly hash: null | string;
125
+ /**
126
+ * @_ignore:
127
+ */
128
+ readonly _isIndexed: boolean;
129
+ /**
130
+ * Returns ``true`` if %%value%% is an **Indexed**.
131
+ *
132
+ * This provides a Type Guard for property access.
133
+ */
134
+ static isIndexed(value: any): value is Indexed;
135
+ /**
136
+ * @_ignore:
137
+ */
138
+ constructor(hash: null | string);
139
+ }
140
+ /**
141
+ * An **InterfaceAbi** may be any supported ABI format.
142
+ *
143
+ * A string is expected to be a JSON string, which will be parsed
144
+ * using ``JSON.parse``. This means that the value **must** be a valid
145
+ * JSON string, with no stray commas, etc.
146
+ *
147
+ * An array may contain any combination of:
148
+ * - Human-Readable fragments
149
+ * - Parsed JSON fragment
150
+ * - [[Fragment]] instances
151
+ *
152
+ * A **Human-Readable Fragment** is a string which resembles a Solidity
153
+ * signature and is introduced in [this blog entry](link-ricmoo-humanreadableabi).
154
+ * For example, ``function balanceOf(address) view returns (uint)``.
155
+ *
156
+ * A **Parsed JSON Fragment** is a JavaScript Object desribed in the
157
+ * [Solidity documentation](link-solc-jsonabi).
158
+ */
159
+ export declare type InterfaceAbi = string | ReadonlyArray<Fragment | JsonFragment | string>;
160
+ /**
161
+ * An Interface abstracts many of the low-level details for
162
+ * encoding and decoding the data on the blockchain.
163
+ *
164
+ * An ABI provides information on how to encode data to send to
165
+ * a Contract, how to decode the results and events and how to
166
+ * interpret revert errors.
167
+ *
168
+ * The ABI can be specified by [any supported format](InterfaceAbi).
169
+ */
170
+ export declare class Interface {
171
+ #private;
172
+ /**
173
+ * All the Contract ABI members (i.e. methods, events, errors, etc).
174
+ */
175
+ readonly fragments: ReadonlyArray<Fragment>;
176
+ /**
177
+ * The Contract constructor.
178
+ */
179
+ readonly deploy: ConstructorFragment;
180
+ /**
181
+ * The Fallback method, if any.
182
+ */
183
+ readonly fallback: null | FallbackFragment;
184
+ /**
185
+ * If receiving ether is supported.
186
+ */
187
+ readonly receive: boolean;
188
+ /**
189
+ * Create a new Interface for the %%fragments%%.
190
+ */
191
+ constructor(fragments: InterfaceAbi);
192
+ /**
193
+ * Returns the entire Human-Readable ABI, as an array of
194
+ * signatures, optionally as %%minimal%% strings, which
195
+ * removes parameter names and unneceesary spaces.
196
+ */
197
+ format(minimal?: boolean): Array<string>;
198
+ /**
199
+ * Return the JSON-encoded ABI. This is the format Solidiy
200
+ * returns.
201
+ */
202
+ formatJson(): string;
203
+ /**
204
+ * The ABI coder that will be used to encode and decode binary
205
+ * data.
206
+ */
207
+ getAbiCoder(): AbiCoder;
208
+ /**
209
+ * Get the function name for %%key%%, which may be a function selector,
210
+ * function name or function signature that belongs to the ABI.
211
+ */
212
+ getFunctionName(key: string): string;
213
+ /**
214
+ * Returns true if %%key%% (a function selector, function name or
215
+ * function signature) is present in the ABI.
216
+ *
217
+ * In the case of a function name, the name may be ambiguous, so
218
+ * accessing the [[FunctionFragment]] may require refinement.
219
+ */
220
+ hasFunction(key: string): boolean;
221
+ /**
222
+ * Get the [[FunctionFragment]] for %%key%%, which may be a function
223
+ * selector, function name or function signature that belongs to the ABI.
224
+ *
225
+ * If %%values%% is provided, it will use the Typed API to handle
226
+ * ambiguous cases where multiple functions match by name.
227
+ *
228
+ * If the %%key%% and %%values%% do not refine to a single function in
229
+ * the ABI, this will throw.
230
+ */
231
+ getFunction(key: string, values?: Array<any | Typed>): null | FunctionFragment;
232
+ /**
233
+ * Iterate over all functions, calling %%callback%%, sorted by their name.
234
+ */
235
+ forEachFunction(callback: (func: FunctionFragment, index: number) => void): void;
236
+ /**
237
+ * Get the event name for %%key%%, which may be a topic hash,
238
+ * event name or event signature that belongs to the ABI.
239
+ */
240
+ getEventName(key: string): string;
241
+ /**
242
+ * Returns true if %%key%% (an event topic hash, event name or
243
+ * event signature) is present in the ABI.
244
+ *
245
+ * In the case of an event name, the name may be ambiguous, so
246
+ * accessing the [[EventFragment]] may require refinement.
247
+ */
248
+ hasEvent(key: string): boolean;
249
+ /**
250
+ * Get the [[EventFragment]] for %%key%%, which may be a topic hash,
251
+ * event name or event signature that belongs to the ABI.
252
+ *
253
+ * If %%values%% is provided, it will use the Typed API to handle
254
+ * ambiguous cases where multiple events match by name.
255
+ *
256
+ * If the %%key%% and %%values%% do not refine to a single event in
257
+ * the ABI, this will throw.
258
+ */
259
+ getEvent(key: string, values?: Array<any | Typed>): null | EventFragment;
260
+ /**
261
+ * Iterate over all events, calling %%callback%%, sorted by their name.
262
+ */
263
+ forEachEvent(callback: (func: EventFragment, index: number) => void): void;
264
+ /**
265
+ * Get the [[ErrorFragment]] for %%key%%, which may be an error
266
+ * selector, error name or error signature that belongs to the ABI.
267
+ *
268
+ * If %%values%% is provided, it will use the Typed API to handle
269
+ * ambiguous cases where multiple errors match by name.
270
+ *
271
+ * If the %%key%% and %%values%% do not refine to a single error in
272
+ * the ABI, this will throw.
273
+ */
274
+ getError(key: string, values?: Array<any | Typed>): null | ErrorFragment;
275
+ /**
276
+ * Iterate over all errors, calling %%callback%%, sorted by their name.
277
+ */
278
+ forEachError(callback: (func: ErrorFragment, index: number) => void): void;
279
+ _decodeParams(params: ReadonlyArray<ParamType>, data: BytesLike): Result;
280
+ _encodeParams(params: ReadonlyArray<ParamType>, values: ReadonlyArray<any>): string;
281
+ /**
282
+ * Encodes a ``tx.data`` object for deploying the Contract with
283
+ * the %%values%% as the constructor arguments.
284
+ */
285
+ encodeDeploy(values?: ReadonlyArray<any>): string;
286
+ /**
287
+ * Decodes the result %%data%% (e.g. from an ``eth_call``) for the
288
+ * specified error (see [[getError]] for valid values for
289
+ * %%key%%).
290
+ *
291
+ * Most developers should prefer the [[parseCallResult]] method instead,
292
+ * which will automatically detect a ``CALL_EXCEPTION`` and throw the
293
+ * corresponding error.
294
+ */
295
+ decodeErrorResult(fragment: ErrorFragment | string, data: BytesLike): Result;
296
+ /**
297
+ * Encodes the transaction revert data for a call result that
298
+ * reverted from the the Contract with the sepcified %%error%%
299
+ * (see [[getError]] for valid values for %%fragment%%) with the %%values%%.
300
+ *
301
+ * This is generally not used by most developers, unless trying to mock
302
+ * a result from a Contract.
303
+ */
304
+ encodeErrorResult(fragment: ErrorFragment | string, values?: ReadonlyArray<any>): string;
305
+ /**
306
+ * Decodes the %%data%% from a transaction ``tx.data`` for
307
+ * the function specified (see [[getFunction]] for valid values
308
+ * for %%fragment%%).
309
+ *
310
+ * Most developers should prefer the [[parseTransaction]] method
311
+ * instead, which will automatically detect the fragment.
312
+ */
313
+ decodeFunctionData(fragment: FunctionFragment | string, data: BytesLike): Result;
314
+ /**
315
+ * Encodes the ``tx.data`` for a transaction that calls the function
316
+ * specified (see [[getFunction]] for valid values for %%fragment%%) with
317
+ * the %%values%%.
318
+ */
319
+ encodeFunctionData(fragment: FunctionFragment | string, values?: ReadonlyArray<any>): string;
320
+ /**
321
+ * Decodes the result %%data%% (e.g. from an ``eth_call``) for the
322
+ * specified function (see [[getFunction]] for valid values for
323
+ * %%key%%).
324
+ *
325
+ * Most developers should prefer the [[parseCallResult]] method instead,
326
+ * which will automatically detect a ``CALL_EXCEPTION`` and throw the
327
+ * corresponding error.
328
+ */
329
+ decodeFunctionResult(fragment: FunctionFragment | string, data: BytesLike): Result;
330
+ /**
331
+ * Encodes the result data (e.g. from an ``eth_call``) for the
332
+ * specified function (see [[getFunction]] for valid values
333
+ * for %%fragment%%) with %%values%%.
334
+ *
335
+ * This is generally not used by most developers, unless trying to mock
336
+ * a result from a Contract.
337
+ */
338
+ encodeFunctionResult(fragment: FunctionFragment | string, values?: ReadonlyArray<any>): string;
339
+ encodeFilterTopics(fragment: EventFragment | string, values: ReadonlyArray<any>): Array<null | string | Array<string>>;
340
+ encodeEventLog(fragment: EventFragment | string, values: ReadonlyArray<any>): {
341
+ data: string;
342
+ topics: Array<string>;
343
+ };
344
+ decodeEventLog(fragment: EventFragment | string, data: BytesLike, topics?: ReadonlyArray<string>): Result;
345
+ /**
346
+ * Parses a transaction, finding the matching function and extracts
347
+ * the parameter values along with other useful function details.
348
+ *
349
+ * If the matching function cannot be found, return null.
350
+ */
351
+ parseTransaction(tx: {
352
+ data: string;
353
+ value?: BigNumberish;
354
+ }): null | TransactionDescription;
355
+ parseCallResult(data: BytesLike): Result;
356
+ /**
357
+ * Parses a receipt log, finding the matching event and extracts
358
+ * the parameter values along with other useful event details.
359
+ *
360
+ * If the matching event cannot be found, returns null.
361
+ */
362
+ parseLog(log: {
363
+ topics: Array<string>;
364
+ data: string;
365
+ }): null | LogDescription;
366
+ /**
367
+ * Parses a revert data, finding the matching error and extracts
368
+ * the parameter values along with other useful error details.
369
+ *
370
+ * If the matching error cannot be found, returns null.
371
+ */
372
+ parseError(data: BytesLike): null | ErrorDescription;
373
+ /**
374
+ * Creates a new [[Interface]] from the ABI %%value%%.
375
+ *
376
+ * The %%value%% may be provided as an existing [[Interface]] object,
377
+ * a JSON-encoded ABI or any Human-Readable ABI format.
378
+ */
379
+ static from(value: InterfaceAbi | Interface): Interface;
380
+ }