@shapeshiftoss/unchained-client 9.0.3 → 9.2.0
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.
- package/dist/evm/avalanche/index.d.ts +2 -0
- package/dist/{ethereum → evm/avalanche}/index.js +1 -2
- package/dist/evm/avalanche/parser/index.d.ts +5 -0
- package/dist/evm/avalanche/parser/index.js +16 -0
- package/dist/evm/ethereum/index.d.ts +2 -0
- package/dist/evm/ethereum/index.js +18 -0
- package/dist/{ethereum → evm/ethereum}/parser/abi/foxyStaking.d.ts +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/abi/foxyStaking.js +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/abi/shapeShiftRouter.d.ts +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/abi/shapeShiftRouter.js +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/abi/thor.d.ts +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/abi/thor.js +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/abi/uniV2.d.ts +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/abi/uniV2.js +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/abi/uniV2StakingRewards.d.ts +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/abi/uniV2StakingRewards.js +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/abi/weth.d.ts +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/abi/weth.js +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/abi/yearnVault.d.ts +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/abi/yearnVault.js +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/constants.d.ts +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/constants.js +0 -0
- package/dist/{ethereum → evm/ethereum}/parser/foxy.d.ts +3 -3
- package/dist/{ethereum → evm/ethereum}/parser/foxy.js +4 -4
- package/dist/evm/ethereum/parser/index.d.ts +5 -0
- package/dist/evm/ethereum/parser/index.js +55 -0
- package/dist/{ethereum → evm/ethereum}/parser/thor.d.ts +3 -3
- package/dist/{ethereum → evm/ethereum}/parser/thor.js +4 -4
- package/dist/{ethereum → evm/ethereum}/parser/uniV2.d.ts +3 -3
- package/dist/{ethereum → evm/ethereum}/parser/uniV2.js +8 -8
- package/dist/{ethereum → evm/ethereum}/parser/weth.d.ts +3 -3
- package/dist/{ethereum → evm/ethereum}/parser/weth.js +4 -4
- package/dist/{ethereum → evm/ethereum}/parser/yearn.d.ts +3 -3
- package/dist/{ethereum → evm/ethereum}/parser/yearn.js +3 -3
- package/dist/evm/ethereum/parser/zrx.d.ts +5 -0
- package/dist/{ethereum → evm/ethereum}/parser/zrx.js +3 -3
- package/dist/evm/index.d.ts +2 -0
- package/dist/evm/index.js +28 -0
- package/dist/{ethereum → evm}/parser/abi/erc20.d.ts +0 -0
- package/dist/{ethereum → evm}/parser/abi/erc20.js +0 -0
- package/dist/{ethereum → evm}/parser/erc20.d.ts +3 -4
- package/dist/{ethereum → evm}/parser/erc20.js +1 -1
- package/dist/evm/parser/index.d.ts +26 -0
- package/dist/{ethereum → evm}/parser/index.js +29 -39
- package/dist/{ethereum → evm/parser}/types.d.ts +6 -4
- package/dist/{ethereum → evm/parser}/types.js +0 -0
- package/dist/evm/parser/utils.d.ts +4 -0
- package/dist/{ethereum → evm}/parser/utils.js +0 -0
- package/dist/generated/avalanche/api.d.ts +766 -0
- package/dist/generated/avalanche/api.js +490 -0
- package/dist/generated/avalanche/base.d.ts +55 -0
- package/dist/generated/avalanche/base.js +64 -0
- package/dist/generated/avalanche/common.d.ts +65 -0
- package/dist/generated/avalanche/common.js +137 -0
- package/dist/generated/avalanche/configuration.d.ts +83 -0
- package/dist/generated/avalanche/configuration.js +42 -0
- package/dist/generated/avalanche/index.d.ts +13 -0
- package/dist/generated/avalanche/index.js +31 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +7 -7
- package/dist/websocket.d.ts +11 -3
- package/dist/websocket.js +124 -97
- package/package.json +1 -1
- package/dist/ethereum/index.d.ts +0 -3
- package/dist/ethereum/parser/index.d.ts +0 -23
- package/dist/ethereum/parser/utils.d.ts +0 -3
- package/dist/ethereum/parser/zrx.d.ts +0 -5
|
@@ -0,0 +1,766 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @shapeshiftoss/avalanche-api
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 7.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { Configuration } from './configuration';
|
|
13
|
+
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
|
+
import { RequestArgs, BaseAPI } from './base';
|
|
15
|
+
/**
|
|
16
|
+
* Contains additional Avalanche specific info
|
|
17
|
+
* @export
|
|
18
|
+
* @interface AvalancheAccount
|
|
19
|
+
*/
|
|
20
|
+
export interface AvalancheAccount {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof AvalancheAccount
|
|
25
|
+
*/
|
|
26
|
+
'balance': string;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {string}
|
|
30
|
+
* @memberof AvalancheAccount
|
|
31
|
+
*/
|
|
32
|
+
'unconfirmedBalance': string;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof AvalancheAccount
|
|
37
|
+
*/
|
|
38
|
+
'pubkey': string;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {number}
|
|
42
|
+
* @memberof AvalancheAccount
|
|
43
|
+
*/
|
|
44
|
+
'nonce': number;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @type {Array<TokenBalance>}
|
|
48
|
+
* @memberof AvalancheAccount
|
|
49
|
+
*/
|
|
50
|
+
'tokens': Array<TokenBalance>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Contains info about an Avalanche transaction
|
|
54
|
+
* @export
|
|
55
|
+
* @interface AvalancheTx
|
|
56
|
+
*/
|
|
57
|
+
export interface AvalancheTx {
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof AvalancheTx
|
|
62
|
+
*/
|
|
63
|
+
'txid': string;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof AvalancheTx
|
|
68
|
+
*/
|
|
69
|
+
'blockHash'?: string;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof AvalancheTx
|
|
74
|
+
*/
|
|
75
|
+
'blockHeight': number;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof AvalancheTx
|
|
80
|
+
*/
|
|
81
|
+
'timestamp': number;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @memberof AvalancheTx
|
|
86
|
+
*/
|
|
87
|
+
'from': string;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {string}
|
|
91
|
+
* @memberof AvalancheTx
|
|
92
|
+
*/
|
|
93
|
+
'to': string;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {number}
|
|
97
|
+
* @memberof AvalancheTx
|
|
98
|
+
*/
|
|
99
|
+
'confirmations': number;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {string}
|
|
103
|
+
* @memberof AvalancheTx
|
|
104
|
+
*/
|
|
105
|
+
'value': string;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @type {string}
|
|
109
|
+
* @memberof AvalancheTx
|
|
110
|
+
*/
|
|
111
|
+
'fee': string;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @type {string}
|
|
115
|
+
* @memberof AvalancheTx
|
|
116
|
+
*/
|
|
117
|
+
'gasLimit': string;
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @type {string}
|
|
121
|
+
* @memberof AvalancheTx
|
|
122
|
+
*/
|
|
123
|
+
'gasUsed'?: string;
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @type {string}
|
|
127
|
+
* @memberof AvalancheTx
|
|
128
|
+
*/
|
|
129
|
+
'gasPrice': string;
|
|
130
|
+
/**
|
|
131
|
+
*
|
|
132
|
+
* @type {number}
|
|
133
|
+
* @memberof AvalancheTx
|
|
134
|
+
*/
|
|
135
|
+
'status': number;
|
|
136
|
+
/**
|
|
137
|
+
*
|
|
138
|
+
* @type {string}
|
|
139
|
+
* @memberof AvalancheTx
|
|
140
|
+
*/
|
|
141
|
+
'inputData'?: string;
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
* @type {Array<TokenTransfer>}
|
|
145
|
+
* @memberof AvalancheTx
|
|
146
|
+
*/
|
|
147
|
+
'tokenTransfers'?: Array<TokenTransfer>;
|
|
148
|
+
/**
|
|
149
|
+
*
|
|
150
|
+
* @type {Array<InternalTx>}
|
|
151
|
+
* @memberof AvalancheTx
|
|
152
|
+
*/
|
|
153
|
+
'internalTxs'?: Array<InternalTx>;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Contains info about Avalanche transaction history
|
|
157
|
+
* @export
|
|
158
|
+
* @interface AvalancheTxHistory
|
|
159
|
+
*/
|
|
160
|
+
export interface AvalancheTxHistory {
|
|
161
|
+
/**
|
|
162
|
+
*
|
|
163
|
+
* @type {string}
|
|
164
|
+
* @memberof AvalancheTxHistory
|
|
165
|
+
*/
|
|
166
|
+
'cursor'?: string;
|
|
167
|
+
/**
|
|
168
|
+
*
|
|
169
|
+
* @type {string}
|
|
170
|
+
* @memberof AvalancheTxHistory
|
|
171
|
+
*/
|
|
172
|
+
'pubkey': string;
|
|
173
|
+
/**
|
|
174
|
+
*
|
|
175
|
+
* @type {Array<AvalancheTx>}
|
|
176
|
+
* @memberof AvalancheTxHistory
|
|
177
|
+
*/
|
|
178
|
+
'txs': Array<AvalancheTx>;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Contains info about a 400 Bad Request response
|
|
182
|
+
* @export
|
|
183
|
+
* @interface BadRequestError
|
|
184
|
+
*/
|
|
185
|
+
export interface BadRequestError {
|
|
186
|
+
/**
|
|
187
|
+
*
|
|
188
|
+
* @type {string}
|
|
189
|
+
* @memberof BadRequestError
|
|
190
|
+
*/
|
|
191
|
+
'error': string;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Contains info about current recommended fees to use in a transaction
|
|
195
|
+
* @export
|
|
196
|
+
* @interface GasFees
|
|
197
|
+
*/
|
|
198
|
+
export interface GasFees {
|
|
199
|
+
/**
|
|
200
|
+
*
|
|
201
|
+
* @type {string}
|
|
202
|
+
* @memberof GasFees
|
|
203
|
+
*/
|
|
204
|
+
'gasPrice': string;
|
|
205
|
+
/**
|
|
206
|
+
*
|
|
207
|
+
* @type {string}
|
|
208
|
+
* @memberof GasFees
|
|
209
|
+
*/
|
|
210
|
+
'maxFeePerGas': string;
|
|
211
|
+
/**
|
|
212
|
+
*
|
|
213
|
+
* @type {string}
|
|
214
|
+
* @memberof GasFees
|
|
215
|
+
*/
|
|
216
|
+
'maxPriorityFeePerGas': string;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Contains info about the running coinstack
|
|
220
|
+
* @export
|
|
221
|
+
* @interface Info
|
|
222
|
+
*/
|
|
223
|
+
export interface Info {
|
|
224
|
+
/**
|
|
225
|
+
*
|
|
226
|
+
* @type {string}
|
|
227
|
+
* @memberof Info
|
|
228
|
+
*/
|
|
229
|
+
'network': string;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Contains info about a 500 Internal Server Error response
|
|
233
|
+
* @export
|
|
234
|
+
* @interface InternalServerError
|
|
235
|
+
*/
|
|
236
|
+
export interface InternalServerError {
|
|
237
|
+
/**
|
|
238
|
+
*
|
|
239
|
+
* @type {string}
|
|
240
|
+
* @memberof InternalServerError
|
|
241
|
+
*/
|
|
242
|
+
'message': string;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Contains info about an Avalanche internal transaction
|
|
246
|
+
* @export
|
|
247
|
+
* @interface InternalTx
|
|
248
|
+
*/
|
|
249
|
+
export interface InternalTx {
|
|
250
|
+
/**
|
|
251
|
+
*
|
|
252
|
+
* @type {string}
|
|
253
|
+
* @memberof InternalTx
|
|
254
|
+
*/
|
|
255
|
+
'from': string;
|
|
256
|
+
/**
|
|
257
|
+
*
|
|
258
|
+
* @type {string}
|
|
259
|
+
* @memberof InternalTx
|
|
260
|
+
*/
|
|
261
|
+
'to': string;
|
|
262
|
+
/**
|
|
263
|
+
*
|
|
264
|
+
* @type {string}
|
|
265
|
+
* @memberof InternalTx
|
|
266
|
+
*/
|
|
267
|
+
'value': string;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Contains the serialized raw transaction hex
|
|
271
|
+
* @export
|
|
272
|
+
* @interface SendTxBody
|
|
273
|
+
*/
|
|
274
|
+
export interface SendTxBody {
|
|
275
|
+
/**
|
|
276
|
+
*
|
|
277
|
+
* @type {string}
|
|
278
|
+
* @memberof SendTxBody
|
|
279
|
+
*/
|
|
280
|
+
'hex': string;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Contains info about a token including balance for an address
|
|
284
|
+
* @export
|
|
285
|
+
* @interface TokenBalance
|
|
286
|
+
*/
|
|
287
|
+
export interface TokenBalance {
|
|
288
|
+
/**
|
|
289
|
+
*
|
|
290
|
+
* @type {string}
|
|
291
|
+
* @memberof TokenBalance
|
|
292
|
+
*/
|
|
293
|
+
'contract': string;
|
|
294
|
+
/**
|
|
295
|
+
*
|
|
296
|
+
* @type {number}
|
|
297
|
+
* @memberof TokenBalance
|
|
298
|
+
*/
|
|
299
|
+
'decimals': number;
|
|
300
|
+
/**
|
|
301
|
+
*
|
|
302
|
+
* @type {string}
|
|
303
|
+
* @memberof TokenBalance
|
|
304
|
+
*/
|
|
305
|
+
'name': string;
|
|
306
|
+
/**
|
|
307
|
+
*
|
|
308
|
+
* @type {string}
|
|
309
|
+
* @memberof TokenBalance
|
|
310
|
+
*/
|
|
311
|
+
'symbol': string;
|
|
312
|
+
/**
|
|
313
|
+
*
|
|
314
|
+
* @type {string}
|
|
315
|
+
* @memberof TokenBalance
|
|
316
|
+
*/
|
|
317
|
+
'type': string;
|
|
318
|
+
/**
|
|
319
|
+
*
|
|
320
|
+
* @type {string}
|
|
321
|
+
* @memberof TokenBalance
|
|
322
|
+
*/
|
|
323
|
+
'balance': string;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Contains info about a token including transfer details
|
|
327
|
+
* @export
|
|
328
|
+
* @interface TokenTransfer
|
|
329
|
+
*/
|
|
330
|
+
export interface TokenTransfer {
|
|
331
|
+
/**
|
|
332
|
+
*
|
|
333
|
+
* @type {string}
|
|
334
|
+
* @memberof TokenTransfer
|
|
335
|
+
*/
|
|
336
|
+
'contract': string;
|
|
337
|
+
/**
|
|
338
|
+
*
|
|
339
|
+
* @type {number}
|
|
340
|
+
* @memberof TokenTransfer
|
|
341
|
+
*/
|
|
342
|
+
'decimals': number;
|
|
343
|
+
/**
|
|
344
|
+
*
|
|
345
|
+
* @type {string}
|
|
346
|
+
* @memberof TokenTransfer
|
|
347
|
+
*/
|
|
348
|
+
'name': string;
|
|
349
|
+
/**
|
|
350
|
+
*
|
|
351
|
+
* @type {string}
|
|
352
|
+
* @memberof TokenTransfer
|
|
353
|
+
*/
|
|
354
|
+
'symbol': string;
|
|
355
|
+
/**
|
|
356
|
+
*
|
|
357
|
+
* @type {string}
|
|
358
|
+
* @memberof TokenTransfer
|
|
359
|
+
*/
|
|
360
|
+
'type': string;
|
|
361
|
+
/**
|
|
362
|
+
*
|
|
363
|
+
* @type {string}
|
|
364
|
+
* @memberof TokenTransfer
|
|
365
|
+
*/
|
|
366
|
+
'from': string;
|
|
367
|
+
/**
|
|
368
|
+
*
|
|
369
|
+
* @type {string}
|
|
370
|
+
* @memberof TokenTransfer
|
|
371
|
+
*/
|
|
372
|
+
'to': string;
|
|
373
|
+
/**
|
|
374
|
+
*
|
|
375
|
+
* @type {string}
|
|
376
|
+
* @memberof TokenTransfer
|
|
377
|
+
*/
|
|
378
|
+
'value': string;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Contains info about a transaction
|
|
382
|
+
* @export
|
|
383
|
+
* @interface Tx
|
|
384
|
+
*/
|
|
385
|
+
export interface Tx {
|
|
386
|
+
/**
|
|
387
|
+
*
|
|
388
|
+
* @type {string}
|
|
389
|
+
* @memberof Tx
|
|
390
|
+
*/
|
|
391
|
+
'txid': string;
|
|
392
|
+
/**
|
|
393
|
+
*
|
|
394
|
+
* @type {string}
|
|
395
|
+
* @memberof Tx
|
|
396
|
+
*/
|
|
397
|
+
'blockHash'?: string;
|
|
398
|
+
/**
|
|
399
|
+
*
|
|
400
|
+
* @type {number}
|
|
401
|
+
* @memberof Tx
|
|
402
|
+
*/
|
|
403
|
+
'blockHeight': number;
|
|
404
|
+
/**
|
|
405
|
+
*
|
|
406
|
+
* @type {number}
|
|
407
|
+
* @memberof Tx
|
|
408
|
+
*/
|
|
409
|
+
'timestamp': number;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Contains info about a 422 Validation Error response
|
|
413
|
+
* @export
|
|
414
|
+
* @interface ValidationError
|
|
415
|
+
*/
|
|
416
|
+
export interface ValidationError {
|
|
417
|
+
/**
|
|
418
|
+
*
|
|
419
|
+
* @type {string}
|
|
420
|
+
* @memberof ValidationError
|
|
421
|
+
*/
|
|
422
|
+
'message': ValidationErrorMessageEnum;
|
|
423
|
+
/**
|
|
424
|
+
*
|
|
425
|
+
* @type {{ [key: string]: any; }}
|
|
426
|
+
* @memberof ValidationError
|
|
427
|
+
*/
|
|
428
|
+
'details': {
|
|
429
|
+
[key: string]: any;
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
export declare const ValidationErrorMessageEnum: {
|
|
433
|
+
readonly ValidationFailed: "Validation failed";
|
|
434
|
+
};
|
|
435
|
+
export declare type ValidationErrorMessageEnum = typeof ValidationErrorMessageEnum[keyof typeof ValidationErrorMessageEnum];
|
|
436
|
+
/**
|
|
437
|
+
* V1Api - axios parameter creator
|
|
438
|
+
* @export
|
|
439
|
+
*/
|
|
440
|
+
export declare const V1ApiAxiosParamCreator: (configuration?: Configuration | undefined) => {
|
|
441
|
+
/**
|
|
442
|
+
* Get the estimated gas cost of a transaction
|
|
443
|
+
* @param {string} data input data
|
|
444
|
+
* @param {string} from from address
|
|
445
|
+
* @param {string} to to address
|
|
446
|
+
* @param {string} value transaction value in wei
|
|
447
|
+
* @param {*} [options] Override http request option.
|
|
448
|
+
* @throws {RequiredError}
|
|
449
|
+
*/
|
|
450
|
+
estimateGas: (data: string, from: string, to: string, value: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
451
|
+
/**
|
|
452
|
+
* Get account details by address
|
|
453
|
+
* @param {string} pubkey account address
|
|
454
|
+
* @param {*} [options] Override http request option.
|
|
455
|
+
* @throws {RequiredError}
|
|
456
|
+
*/
|
|
457
|
+
getAccount: (pubkey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
458
|
+
/**
|
|
459
|
+
* Get the current recommended gas fees to use in a transaction * For EIP-1559 transactions, use `maxFeePerGas` and `maxPriorityFeePerGas` * For Legacy transactions, use `gasPrice`
|
|
460
|
+
* @param {*} [options] Override http request option.
|
|
461
|
+
* @throws {RequiredError}
|
|
462
|
+
*/
|
|
463
|
+
getGasFees: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
464
|
+
/**
|
|
465
|
+
* Get information about the running coinstack
|
|
466
|
+
* @param {*} [options] Override http request option.
|
|
467
|
+
* @throws {RequiredError}
|
|
468
|
+
*/
|
|
469
|
+
getInfo: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
470
|
+
/**
|
|
471
|
+
* Get transaction details
|
|
472
|
+
* @param {string} txid transaction hash
|
|
473
|
+
* @param {*} [options] Override http request option.
|
|
474
|
+
* @throws {RequiredError}
|
|
475
|
+
*/
|
|
476
|
+
getTransaction: (txid: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
477
|
+
/**
|
|
478
|
+
* Get transaction history by address
|
|
479
|
+
* @param {string} pubkey account address
|
|
480
|
+
* @param {string} [cursor] the cursor returned in previous query (base64 encoded json object with a \'page\' property)
|
|
481
|
+
* @param {number} [pageSize] page size (10 by default)
|
|
482
|
+
* @param {*} [options] Override http request option.
|
|
483
|
+
* @throws {RequiredError}
|
|
484
|
+
*/
|
|
485
|
+
getTxHistory: (pubkey: string, cursor?: string | undefined, pageSize?: number | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
486
|
+
/**
|
|
487
|
+
* Sends raw transaction to be broadcast to the node.
|
|
488
|
+
* @param {SendTxBody} sendTxBody serialized raw transaction hex
|
|
489
|
+
* @param {*} [options] Override http request option.
|
|
490
|
+
* @throws {RequiredError}
|
|
491
|
+
*/
|
|
492
|
+
sendTx: (sendTxBody: SendTxBody, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
493
|
+
};
|
|
494
|
+
/**
|
|
495
|
+
* V1Api - functional programming interface
|
|
496
|
+
* @export
|
|
497
|
+
*/
|
|
498
|
+
export declare const V1ApiFp: (configuration?: Configuration | undefined) => {
|
|
499
|
+
/**
|
|
500
|
+
* Get the estimated gas cost of a transaction
|
|
501
|
+
* @param {string} data input data
|
|
502
|
+
* @param {string} from from address
|
|
503
|
+
* @param {string} to to address
|
|
504
|
+
* @param {string} value transaction value in wei
|
|
505
|
+
* @param {*} [options] Override http request option.
|
|
506
|
+
* @throws {RequiredError}
|
|
507
|
+
*/
|
|
508
|
+
estimateGas(data: string, from: string, to: string, value: string, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<string>>;
|
|
509
|
+
/**
|
|
510
|
+
* Get account details by address
|
|
511
|
+
* @param {string} pubkey account address
|
|
512
|
+
* @param {*} [options] Override http request option.
|
|
513
|
+
* @throws {RequiredError}
|
|
514
|
+
*/
|
|
515
|
+
getAccount(pubkey: string, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<AvalancheAccount>>;
|
|
516
|
+
/**
|
|
517
|
+
* Get the current recommended gas fees to use in a transaction * For EIP-1559 transactions, use `maxFeePerGas` and `maxPriorityFeePerGas` * For Legacy transactions, use `gasPrice`
|
|
518
|
+
* @param {*} [options] Override http request option.
|
|
519
|
+
* @throws {RequiredError}
|
|
520
|
+
*/
|
|
521
|
+
getGasFees(options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<GasFees>>;
|
|
522
|
+
/**
|
|
523
|
+
* Get information about the running coinstack
|
|
524
|
+
* @param {*} [options] Override http request option.
|
|
525
|
+
* @throws {RequiredError}
|
|
526
|
+
*/
|
|
527
|
+
getInfo(options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<Info>>;
|
|
528
|
+
/**
|
|
529
|
+
* Get transaction details
|
|
530
|
+
* @param {string} txid transaction hash
|
|
531
|
+
* @param {*} [options] Override http request option.
|
|
532
|
+
* @throws {RequiredError}
|
|
533
|
+
*/
|
|
534
|
+
getTransaction(txid: string, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<AvalancheTx>>;
|
|
535
|
+
/**
|
|
536
|
+
* Get transaction history by address
|
|
537
|
+
* @param {string} pubkey account address
|
|
538
|
+
* @param {string} [cursor] the cursor returned in previous query (base64 encoded json object with a \'page\' property)
|
|
539
|
+
* @param {number} [pageSize] page size (10 by default)
|
|
540
|
+
* @param {*} [options] Override http request option.
|
|
541
|
+
* @throws {RequiredError}
|
|
542
|
+
*/
|
|
543
|
+
getTxHistory(pubkey: string, cursor?: string | undefined, pageSize?: number | undefined, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<AvalancheTxHistory>>;
|
|
544
|
+
/**
|
|
545
|
+
* Sends raw transaction to be broadcast to the node.
|
|
546
|
+
* @param {SendTxBody} sendTxBody serialized raw transaction hex
|
|
547
|
+
* @param {*} [options] Override http request option.
|
|
548
|
+
* @throws {RequiredError}
|
|
549
|
+
*/
|
|
550
|
+
sendTx(sendTxBody: SendTxBody, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<string>>;
|
|
551
|
+
};
|
|
552
|
+
/**
|
|
553
|
+
* V1Api - factory interface
|
|
554
|
+
* @export
|
|
555
|
+
*/
|
|
556
|
+
export declare const V1ApiFactory: (configuration?: Configuration | undefined, basePath?: string | undefined, axios?: AxiosInstance | undefined) => {
|
|
557
|
+
/**
|
|
558
|
+
* Get the estimated gas cost of a transaction
|
|
559
|
+
* @param {string} data input data
|
|
560
|
+
* @param {string} from from address
|
|
561
|
+
* @param {string} to to address
|
|
562
|
+
* @param {string} value transaction value in wei
|
|
563
|
+
* @param {*} [options] Override http request option.
|
|
564
|
+
* @throws {RequiredError}
|
|
565
|
+
*/
|
|
566
|
+
estimateGas(data: string, from: string, to: string, value: string, options?: any): AxiosPromise<string>;
|
|
567
|
+
/**
|
|
568
|
+
* Get account details by address
|
|
569
|
+
* @param {string} pubkey account address
|
|
570
|
+
* @param {*} [options] Override http request option.
|
|
571
|
+
* @throws {RequiredError}
|
|
572
|
+
*/
|
|
573
|
+
getAccount(pubkey: string, options?: any): AxiosPromise<AvalancheAccount>;
|
|
574
|
+
/**
|
|
575
|
+
* Get the current recommended gas fees to use in a transaction * For EIP-1559 transactions, use `maxFeePerGas` and `maxPriorityFeePerGas` * For Legacy transactions, use `gasPrice`
|
|
576
|
+
* @param {*} [options] Override http request option.
|
|
577
|
+
* @throws {RequiredError}
|
|
578
|
+
*/
|
|
579
|
+
getGasFees(options?: any): AxiosPromise<GasFees>;
|
|
580
|
+
/**
|
|
581
|
+
* Get information about the running coinstack
|
|
582
|
+
* @param {*} [options] Override http request option.
|
|
583
|
+
* @throws {RequiredError}
|
|
584
|
+
*/
|
|
585
|
+
getInfo(options?: any): AxiosPromise<Info>;
|
|
586
|
+
/**
|
|
587
|
+
* Get transaction details
|
|
588
|
+
* @param {string} txid transaction hash
|
|
589
|
+
* @param {*} [options] Override http request option.
|
|
590
|
+
* @throws {RequiredError}
|
|
591
|
+
*/
|
|
592
|
+
getTransaction(txid: string, options?: any): AxiosPromise<AvalancheTx>;
|
|
593
|
+
/**
|
|
594
|
+
* Get transaction history by address
|
|
595
|
+
* @param {string} pubkey account address
|
|
596
|
+
* @param {string} [cursor] the cursor returned in previous query (base64 encoded json object with a \'page\' property)
|
|
597
|
+
* @param {number} [pageSize] page size (10 by default)
|
|
598
|
+
* @param {*} [options] Override http request option.
|
|
599
|
+
* @throws {RequiredError}
|
|
600
|
+
*/
|
|
601
|
+
getTxHistory(pubkey: string, cursor?: string | undefined, pageSize?: number | undefined, options?: any): AxiosPromise<AvalancheTxHistory>;
|
|
602
|
+
/**
|
|
603
|
+
* Sends raw transaction to be broadcast to the node.
|
|
604
|
+
* @param {SendTxBody} sendTxBody serialized raw transaction hex
|
|
605
|
+
* @param {*} [options] Override http request option.
|
|
606
|
+
* @throws {RequiredError}
|
|
607
|
+
*/
|
|
608
|
+
sendTx(sendTxBody: SendTxBody, options?: any): AxiosPromise<string>;
|
|
609
|
+
};
|
|
610
|
+
/**
|
|
611
|
+
* Request parameters for estimateGas operation in V1Api.
|
|
612
|
+
* @export
|
|
613
|
+
* @interface V1ApiEstimateGasRequest
|
|
614
|
+
*/
|
|
615
|
+
export interface V1ApiEstimateGasRequest {
|
|
616
|
+
/**
|
|
617
|
+
* input data
|
|
618
|
+
* @type {string}
|
|
619
|
+
* @memberof V1ApiEstimateGas
|
|
620
|
+
*/
|
|
621
|
+
readonly data: string;
|
|
622
|
+
/**
|
|
623
|
+
* from address
|
|
624
|
+
* @type {string}
|
|
625
|
+
* @memberof V1ApiEstimateGas
|
|
626
|
+
*/
|
|
627
|
+
readonly from: string;
|
|
628
|
+
/**
|
|
629
|
+
* to address
|
|
630
|
+
* @type {string}
|
|
631
|
+
* @memberof V1ApiEstimateGas
|
|
632
|
+
*/
|
|
633
|
+
readonly to: string;
|
|
634
|
+
/**
|
|
635
|
+
* transaction value in wei
|
|
636
|
+
* @type {string}
|
|
637
|
+
* @memberof V1ApiEstimateGas
|
|
638
|
+
*/
|
|
639
|
+
readonly value: string;
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Request parameters for getAccount operation in V1Api.
|
|
643
|
+
* @export
|
|
644
|
+
* @interface V1ApiGetAccountRequest
|
|
645
|
+
*/
|
|
646
|
+
export interface V1ApiGetAccountRequest {
|
|
647
|
+
/**
|
|
648
|
+
* account address
|
|
649
|
+
* @type {string}
|
|
650
|
+
* @memberof V1ApiGetAccount
|
|
651
|
+
*/
|
|
652
|
+
readonly pubkey: string;
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* Request parameters for getTransaction operation in V1Api.
|
|
656
|
+
* @export
|
|
657
|
+
* @interface V1ApiGetTransactionRequest
|
|
658
|
+
*/
|
|
659
|
+
export interface V1ApiGetTransactionRequest {
|
|
660
|
+
/**
|
|
661
|
+
* transaction hash
|
|
662
|
+
* @type {string}
|
|
663
|
+
* @memberof V1ApiGetTransaction
|
|
664
|
+
*/
|
|
665
|
+
readonly txid: string;
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* Request parameters for getTxHistory operation in V1Api.
|
|
669
|
+
* @export
|
|
670
|
+
* @interface V1ApiGetTxHistoryRequest
|
|
671
|
+
*/
|
|
672
|
+
export interface V1ApiGetTxHistoryRequest {
|
|
673
|
+
/**
|
|
674
|
+
* account address
|
|
675
|
+
* @type {string}
|
|
676
|
+
* @memberof V1ApiGetTxHistory
|
|
677
|
+
*/
|
|
678
|
+
readonly pubkey: string;
|
|
679
|
+
/**
|
|
680
|
+
* the cursor returned in previous query (base64 encoded json object with a \'page\' property)
|
|
681
|
+
* @type {string}
|
|
682
|
+
* @memberof V1ApiGetTxHistory
|
|
683
|
+
*/
|
|
684
|
+
readonly cursor?: string;
|
|
685
|
+
/**
|
|
686
|
+
* page size (10 by default)
|
|
687
|
+
* @type {number}
|
|
688
|
+
* @memberof V1ApiGetTxHistory
|
|
689
|
+
*/
|
|
690
|
+
readonly pageSize?: number;
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Request parameters for sendTx operation in V1Api.
|
|
694
|
+
* @export
|
|
695
|
+
* @interface V1ApiSendTxRequest
|
|
696
|
+
*/
|
|
697
|
+
export interface V1ApiSendTxRequest {
|
|
698
|
+
/**
|
|
699
|
+
* serialized raw transaction hex
|
|
700
|
+
* @type {SendTxBody}
|
|
701
|
+
* @memberof V1ApiSendTx
|
|
702
|
+
*/
|
|
703
|
+
readonly sendTxBody: SendTxBody;
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* V1Api - object-oriented interface
|
|
707
|
+
* @export
|
|
708
|
+
* @class V1Api
|
|
709
|
+
* @extends {BaseAPI}
|
|
710
|
+
*/
|
|
711
|
+
export declare class V1Api extends BaseAPI {
|
|
712
|
+
/**
|
|
713
|
+
* Get the estimated gas cost of a transaction
|
|
714
|
+
* @param {V1ApiEstimateGasRequest} requestParameters Request parameters.
|
|
715
|
+
* @param {*} [options] Override http request option.
|
|
716
|
+
* @throws {RequiredError}
|
|
717
|
+
* @memberof V1Api
|
|
718
|
+
*/
|
|
719
|
+
estimateGas(requestParameters: V1ApiEstimateGasRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
|
|
720
|
+
/**
|
|
721
|
+
* Get account details by address
|
|
722
|
+
* @param {V1ApiGetAccountRequest} requestParameters Request parameters.
|
|
723
|
+
* @param {*} [options] Override http request option.
|
|
724
|
+
* @throws {RequiredError}
|
|
725
|
+
* @memberof V1Api
|
|
726
|
+
*/
|
|
727
|
+
getAccount(requestParameters: V1ApiGetAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AvalancheAccount, any>>;
|
|
728
|
+
/**
|
|
729
|
+
* Get the current recommended gas fees to use in a transaction * For EIP-1559 transactions, use `maxFeePerGas` and `maxPriorityFeePerGas` * For Legacy transactions, use `gasPrice`
|
|
730
|
+
* @param {*} [options] Override http request option.
|
|
731
|
+
* @throws {RequiredError}
|
|
732
|
+
* @memberof V1Api
|
|
733
|
+
*/
|
|
734
|
+
getGasFees(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GasFees, any>>;
|
|
735
|
+
/**
|
|
736
|
+
* Get information about the running coinstack
|
|
737
|
+
* @param {*} [options] Override http request option.
|
|
738
|
+
* @throws {RequiredError}
|
|
739
|
+
* @memberof V1Api
|
|
740
|
+
*/
|
|
741
|
+
getInfo(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Info, any>>;
|
|
742
|
+
/**
|
|
743
|
+
* Get transaction details
|
|
744
|
+
* @param {V1ApiGetTransactionRequest} requestParameters Request parameters.
|
|
745
|
+
* @param {*} [options] Override http request option.
|
|
746
|
+
* @throws {RequiredError}
|
|
747
|
+
* @memberof V1Api
|
|
748
|
+
*/
|
|
749
|
+
getTransaction(requestParameters: V1ApiGetTransactionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AvalancheTx, any>>;
|
|
750
|
+
/**
|
|
751
|
+
* Get transaction history by address
|
|
752
|
+
* @param {V1ApiGetTxHistoryRequest} requestParameters Request parameters.
|
|
753
|
+
* @param {*} [options] Override http request option.
|
|
754
|
+
* @throws {RequiredError}
|
|
755
|
+
* @memberof V1Api
|
|
756
|
+
*/
|
|
757
|
+
getTxHistory(requestParameters: V1ApiGetTxHistoryRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AvalancheTxHistory, any>>;
|
|
758
|
+
/**
|
|
759
|
+
* Sends raw transaction to be broadcast to the node.
|
|
760
|
+
* @param {V1ApiSendTxRequest} requestParameters Request parameters.
|
|
761
|
+
* @param {*} [options] Override http request option.
|
|
762
|
+
* @throws {RequiredError}
|
|
763
|
+
* @memberof V1Api
|
|
764
|
+
*/
|
|
765
|
+
sendTx(requestParameters: V1ApiSendTxRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
|
|
766
|
+
}
|