@avalabs/glacier-sdk 2.5.0-alpha.11 → 2.5.0-alpha.13
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/CHANGELOG.md +8 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -1
- package/dist/src/generated/models.d.ts +349 -0
- package/dist/src/generated/models.d.ts.map +1 -0
- package/dist/src/glacierClient.d.ts +2 -1
- package/dist/src/glacierClient.d.ts.map +1 -1
- package/dist/src/types.d.ts +13 -0
- package/dist/src/types.d.ts.map +1 -0
- package/index.ts +1 -1
- package/package.json +5 -5
- package/src/{models.ts → generated/models.ts} +197 -57
- package/src/glacierClient.ts +2 -2
- package/src/types.ts +6 -0
- package/swagger/generateModels.js +40 -0
- package/dist/src/models.d.ts +0 -223
- package/dist/src/models.d.ts.map +0 -1
- package/regenerate-sdk.sh +0 -3
- package/swagger/glacier.json +0 -866
package/swagger/glacier.json
DELETED
|
@@ -1,866 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.0",
|
|
3
|
-
"paths": {
|
|
4
|
-
"/v1/health-check": {
|
|
5
|
-
"get": {
|
|
6
|
-
"operationId": "health-check",
|
|
7
|
-
"summary": "Get the health of the service.",
|
|
8
|
-
"parameters": [],
|
|
9
|
-
"responses": {
|
|
10
|
-
"200": {
|
|
11
|
-
"description": "The Health Check is successful",
|
|
12
|
-
"content": {
|
|
13
|
-
"application/json": {
|
|
14
|
-
"schema": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"properties": {
|
|
17
|
-
"status": { "type": "string", "example": "ok" },
|
|
18
|
-
"info": {
|
|
19
|
-
"type": "object",
|
|
20
|
-
"example": { "database": { "status": "up" } },
|
|
21
|
-
"additionalProperties": {
|
|
22
|
-
"type": "object",
|
|
23
|
-
"properties": { "status": { "type": "string" } },
|
|
24
|
-
"additionalProperties": { "type": "string" }
|
|
25
|
-
},
|
|
26
|
-
"nullable": true
|
|
27
|
-
},
|
|
28
|
-
"error": {
|
|
29
|
-
"type": "object",
|
|
30
|
-
"example": {},
|
|
31
|
-
"additionalProperties": {
|
|
32
|
-
"type": "object",
|
|
33
|
-
"properties": { "status": { "type": "string" } },
|
|
34
|
-
"additionalProperties": { "type": "string" }
|
|
35
|
-
},
|
|
36
|
-
"nullable": true
|
|
37
|
-
},
|
|
38
|
-
"details": {
|
|
39
|
-
"type": "object",
|
|
40
|
-
"example": { "database": { "status": "up" } },
|
|
41
|
-
"additionalProperties": {
|
|
42
|
-
"type": "object",
|
|
43
|
-
"properties": { "status": { "type": "string" } },
|
|
44
|
-
"additionalProperties": { "type": "string" }
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"503": {
|
|
53
|
-
"description": "The Health Check is not successful",
|
|
54
|
-
"content": {
|
|
55
|
-
"application/json": {
|
|
56
|
-
"schema": {
|
|
57
|
-
"type": "object",
|
|
58
|
-
"properties": {
|
|
59
|
-
"status": { "type": "string", "example": "error" },
|
|
60
|
-
"info": {
|
|
61
|
-
"type": "object",
|
|
62
|
-
"example": { "database": { "status": "up" } },
|
|
63
|
-
"additionalProperties": {
|
|
64
|
-
"type": "object",
|
|
65
|
-
"properties": { "status": { "type": "string" } },
|
|
66
|
-
"additionalProperties": { "type": "string" }
|
|
67
|
-
},
|
|
68
|
-
"nullable": true
|
|
69
|
-
},
|
|
70
|
-
"error": {
|
|
71
|
-
"type": "object",
|
|
72
|
-
"example": {
|
|
73
|
-
"redis": {
|
|
74
|
-
"status": "down",
|
|
75
|
-
"message": "Could not connect"
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"additionalProperties": {
|
|
79
|
-
"type": "object",
|
|
80
|
-
"properties": { "status": { "type": "string" } },
|
|
81
|
-
"additionalProperties": { "type": "string" }
|
|
82
|
-
},
|
|
83
|
-
"nullable": true
|
|
84
|
-
},
|
|
85
|
-
"details": {
|
|
86
|
-
"type": "object",
|
|
87
|
-
"example": {
|
|
88
|
-
"database": { "status": "up" },
|
|
89
|
-
"redis": {
|
|
90
|
-
"status": "down",
|
|
91
|
-
"message": "Could not connect"
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
"additionalProperties": {
|
|
95
|
-
"type": "object",
|
|
96
|
-
"properties": { "status": { "type": "string" } },
|
|
97
|
-
"additionalProperties": { "type": "string" }
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
"/v1/chains/{chainId}/addresses/{address}/balances:getNative": {
|
|
109
|
-
"get": {
|
|
110
|
-
"operationId": "getNativeBalance",
|
|
111
|
-
"summary": "Get native token balance of a wallet address for a given chain.",
|
|
112
|
-
"parameters": [
|
|
113
|
-
{
|
|
114
|
-
"name": "chainId",
|
|
115
|
-
"required": true,
|
|
116
|
-
"in": "path",
|
|
117
|
-
"description": "A supported chain id. Use the `/chains` endpoint to get a list of supported chain ids.",
|
|
118
|
-
"example": "43114",
|
|
119
|
-
"schema": { "type": "string" }
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"name": "address",
|
|
123
|
-
"required": true,
|
|
124
|
-
"in": "path",
|
|
125
|
-
"description": "A wallet address.",
|
|
126
|
-
"example": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
|
|
127
|
-
"schema": { "type": "string" }
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"name": "currency",
|
|
131
|
-
"required": false,
|
|
132
|
-
"in": "query",
|
|
133
|
-
"description": "The currency code to return fiat value. Defaults to USD",
|
|
134
|
-
"example": "usd",
|
|
135
|
-
"schema": {
|
|
136
|
-
"enum": [
|
|
137
|
-
"usd",
|
|
138
|
-
"eur",
|
|
139
|
-
"aud",
|
|
140
|
-
"cad",
|
|
141
|
-
"chf",
|
|
142
|
-
"clp",
|
|
143
|
-
"czk",
|
|
144
|
-
"dkk",
|
|
145
|
-
"gbp",
|
|
146
|
-
"hkd",
|
|
147
|
-
"huf"
|
|
148
|
-
],
|
|
149
|
-
"type": "string"
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
],
|
|
153
|
-
"responses": {
|
|
154
|
-
"200": {
|
|
155
|
-
"description": "",
|
|
156
|
-
"content": {
|
|
157
|
-
"application/json": {
|
|
158
|
-
"schema": { "$ref": "#/components/schemas/NativeBalanceDto" }
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
"/v1/chains/{chainId}/addresses/{address}/balances:listErc20": {
|
|
166
|
-
"get": {
|
|
167
|
-
"operationId": "listErc20Balances",
|
|
168
|
-
"summary": "Get erc-20 token balances of a wallet address for a given chain.",
|
|
169
|
-
"parameters": [
|
|
170
|
-
{
|
|
171
|
-
"name": "chainId",
|
|
172
|
-
"required": true,
|
|
173
|
-
"in": "path",
|
|
174
|
-
"description": "A supported chain id. Use the `/chains` endpoint to get a list of supported chain ids.",
|
|
175
|
-
"example": "43114",
|
|
176
|
-
"schema": { "type": "string" }
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"name": "address",
|
|
180
|
-
"required": true,
|
|
181
|
-
"in": "path",
|
|
182
|
-
"description": "A wallet address.",
|
|
183
|
-
"example": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
|
|
184
|
-
"schema": { "type": "string" }
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"name": "pageSize",
|
|
188
|
-
"required": false,
|
|
189
|
-
"in": "query",
|
|
190
|
-
"schema": {
|
|
191
|
-
"type": "integer",
|
|
192
|
-
"default": 10,
|
|
193
|
-
"minimum": 1,
|
|
194
|
-
"maximum": 100
|
|
195
|
-
},
|
|
196
|
-
"description": "The maximum number of items to return.",
|
|
197
|
-
"example": "10"
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"name": "pageToken",
|
|
201
|
-
"required": false,
|
|
202
|
-
"in": "query",
|
|
203
|
-
"description": "A page token, received from a previous list call. Provide this to retrieve the subsequent page.",
|
|
204
|
-
"schema": { "type": "string" }
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
"name": "currency",
|
|
208
|
-
"required": false,
|
|
209
|
-
"in": "query",
|
|
210
|
-
"description": "The currency code to return fiat value. Defaults to USD",
|
|
211
|
-
"example": "usd",
|
|
212
|
-
"schema": {
|
|
213
|
-
"enum": [
|
|
214
|
-
"usd",
|
|
215
|
-
"eur",
|
|
216
|
-
"aud",
|
|
217
|
-
"cad",
|
|
218
|
-
"chf",
|
|
219
|
-
"clp",
|
|
220
|
-
"czk",
|
|
221
|
-
"dkk",
|
|
222
|
-
"gbp",
|
|
223
|
-
"hkd",
|
|
224
|
-
"huf"
|
|
225
|
-
],
|
|
226
|
-
"type": "string"
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
],
|
|
230
|
-
"responses": {
|
|
231
|
-
"200": {
|
|
232
|
-
"description": "",
|
|
233
|
-
"content": {
|
|
234
|
-
"application/json": {
|
|
235
|
-
"schema": { "$ref": "#/components/schemas/Erc20BalancesDto" }
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
"/v1/chains/{chainId}/addresses/{address}/balances:listErc721": {
|
|
243
|
-
"get": {
|
|
244
|
-
"operationId": "listErc721Balances",
|
|
245
|
-
"summary": "Get erc-721 token balances of a wallet address for a given chain.",
|
|
246
|
-
"parameters": [
|
|
247
|
-
{
|
|
248
|
-
"name": "pageSize",
|
|
249
|
-
"required": false,
|
|
250
|
-
"in": "query",
|
|
251
|
-
"schema": {
|
|
252
|
-
"type": "integer",
|
|
253
|
-
"default": 10,
|
|
254
|
-
"minimum": 1,
|
|
255
|
-
"maximum": 100
|
|
256
|
-
},
|
|
257
|
-
"description": "The maximum number of items to return.",
|
|
258
|
-
"example": "10"
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
"name": "pageToken",
|
|
262
|
-
"required": false,
|
|
263
|
-
"in": "query",
|
|
264
|
-
"description": "A page token, received from a previous list call. Provide this to retrieve the subsequent page.",
|
|
265
|
-
"schema": { "type": "string" }
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
"name": "currency",
|
|
269
|
-
"required": false,
|
|
270
|
-
"in": "query",
|
|
271
|
-
"description": "The currency code to return fiat value. Defaults to USD",
|
|
272
|
-
"example": "usd",
|
|
273
|
-
"schema": {
|
|
274
|
-
"enum": [
|
|
275
|
-
"usd",
|
|
276
|
-
"eur",
|
|
277
|
-
"aud",
|
|
278
|
-
"cad",
|
|
279
|
-
"chf",
|
|
280
|
-
"clp",
|
|
281
|
-
"czk",
|
|
282
|
-
"dkk",
|
|
283
|
-
"gbp",
|
|
284
|
-
"hkd",
|
|
285
|
-
"huf"
|
|
286
|
-
],
|
|
287
|
-
"type": "string"
|
|
288
|
-
}
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
"name": "chainId",
|
|
292
|
-
"required": true,
|
|
293
|
-
"in": "path",
|
|
294
|
-
"description": "A supported chain id. Use the `/chains` endpoint to get a list of supported chain ids.",
|
|
295
|
-
"example": "43114",
|
|
296
|
-
"schema": { "type": "string" }
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
"name": "address",
|
|
300
|
-
"required": true,
|
|
301
|
-
"in": "path",
|
|
302
|
-
"description": "A wallet address.",
|
|
303
|
-
"example": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
|
|
304
|
-
"schema": { "type": "string" }
|
|
305
|
-
}
|
|
306
|
-
],
|
|
307
|
-
"responses": {
|
|
308
|
-
"200": {
|
|
309
|
-
"description": "",
|
|
310
|
-
"content": {
|
|
311
|
-
"application/json": {
|
|
312
|
-
"schema": { "$ref": "#/components/schemas/Erc721BalancesDto" }
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
},
|
|
319
|
-
"/v1/chains/{chainId}/addresses/{address}/transactions": {
|
|
320
|
-
"get": {
|
|
321
|
-
"operationId": "listTransactions",
|
|
322
|
-
"summary": "Gets a list of transactions for a wallet address and chain.",
|
|
323
|
-
"description": "Gets a list of transactions where the given wallet address had an on-chain interaction for a given chain. The erc20 transfers, erc721 transfers, and internal transactions returned as part of the native transactions are only those where the address had an interaction. Therefore the transactions returned from this list may not be complete representations of the on-chain data. For a complete view of a transaction use the `/chains/:chainId/transactions/:txHash` endpoint.",
|
|
324
|
-
"parameters": [
|
|
325
|
-
{
|
|
326
|
-
"name": "pageSize",
|
|
327
|
-
"required": false,
|
|
328
|
-
"in": "query",
|
|
329
|
-
"schema": {
|
|
330
|
-
"type": "integer",
|
|
331
|
-
"default": 10,
|
|
332
|
-
"minimum": 1,
|
|
333
|
-
"maximum": 100
|
|
334
|
-
},
|
|
335
|
-
"description": "The maximum number of items to return.",
|
|
336
|
-
"example": "10"
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
"name": "pageToken",
|
|
340
|
-
"required": false,
|
|
341
|
-
"in": "query",
|
|
342
|
-
"description": "A page token, received from a previous list call. Provide this to retrieve the subsequent page.",
|
|
343
|
-
"schema": { "type": "string" }
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
"name": "chainId",
|
|
347
|
-
"required": true,
|
|
348
|
-
"in": "path",
|
|
349
|
-
"description": "A supported chain id. Use the `/chains` endpoint to get a list of supported chain ids.",
|
|
350
|
-
"example": "43114",
|
|
351
|
-
"schema": { "type": "string" }
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
"name": "address",
|
|
355
|
-
"required": true,
|
|
356
|
-
"in": "path",
|
|
357
|
-
"description": "A wallet address.",
|
|
358
|
-
"example": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
|
|
359
|
-
"schema": { "type": "string" }
|
|
360
|
-
}
|
|
361
|
-
],
|
|
362
|
-
"responses": {
|
|
363
|
-
"200": {
|
|
364
|
-
"description": "",
|
|
365
|
-
"content": {
|
|
366
|
-
"application/json": {
|
|
367
|
-
"schema": {
|
|
368
|
-
"$ref": "#/components/schemas/ListTransactionDetailsDto"
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
},
|
|
376
|
-
"/v1/chains/{chainId}/transactions/{txHash}": {
|
|
377
|
-
"get": {
|
|
378
|
-
"operationId": "getTransaction",
|
|
379
|
-
"summary": "Gets the details of a single transaction.",
|
|
380
|
-
"parameters": [],
|
|
381
|
-
"responses": {
|
|
382
|
-
"200": {
|
|
383
|
-
"description": "",
|
|
384
|
-
"content": {
|
|
385
|
-
"application/json": {
|
|
386
|
-
"schema": {
|
|
387
|
-
"$ref": "#/components/schemas/TransactionDetailsDto"
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
},
|
|
395
|
-
"/v1/chains": {
|
|
396
|
-
"get": {
|
|
397
|
-
"operationId": "supportedChains",
|
|
398
|
-
"summary": "Gets the list of chains supported by the api.",
|
|
399
|
-
"parameters": [],
|
|
400
|
-
"responses": {
|
|
401
|
-
"200": {
|
|
402
|
-
"description": "",
|
|
403
|
-
"content": {
|
|
404
|
-
"application/json": {
|
|
405
|
-
"schema": { "$ref": "#/components/schemas/ChainsDto" }
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
},
|
|
412
|
-
"/v1/chains/{chainId}": {
|
|
413
|
-
"get": {
|
|
414
|
-
"operationId": "getChainInfo",
|
|
415
|
-
"summary": "Gets chain information by chain id.",
|
|
416
|
-
"parameters": [
|
|
417
|
-
{
|
|
418
|
-
"name": "chainId",
|
|
419
|
-
"required": true,
|
|
420
|
-
"in": "path",
|
|
421
|
-
"schema": { "type": "string" }
|
|
422
|
-
}
|
|
423
|
-
],
|
|
424
|
-
"responses": {
|
|
425
|
-
"200": {
|
|
426
|
-
"description": "",
|
|
427
|
-
"content": {
|
|
428
|
-
"application/json": {
|
|
429
|
-
"schema": { "$ref": "#/components/schemas/ChainInfoDto" }
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
},
|
|
437
|
-
"info": {
|
|
438
|
-
"title": "Glacier API",
|
|
439
|
-
"description": "Serves multi-chain data to power the core wallet",
|
|
440
|
-
"version": "1.0",
|
|
441
|
-
"contact": {}
|
|
442
|
-
},
|
|
443
|
-
"tags": [],
|
|
444
|
-
"servers": [],
|
|
445
|
-
"components": {
|
|
446
|
-
"schemas": {
|
|
447
|
-
"MoneyDto": {
|
|
448
|
-
"type": "object",
|
|
449
|
-
"properties": {
|
|
450
|
-
"currencyCode": {
|
|
451
|
-
"type": "string",
|
|
452
|
-
"description": "ISO 4217 currency code.",
|
|
453
|
-
"enum": [
|
|
454
|
-
"usd",
|
|
455
|
-
"eur",
|
|
456
|
-
"aud",
|
|
457
|
-
"cad",
|
|
458
|
-
"chf",
|
|
459
|
-
"clp",
|
|
460
|
-
"czk",
|
|
461
|
-
"dkk",
|
|
462
|
-
"gbp",
|
|
463
|
-
"hkd",
|
|
464
|
-
"huf"
|
|
465
|
-
],
|
|
466
|
-
"example": "usd"
|
|
467
|
-
},
|
|
468
|
-
"value": {
|
|
469
|
-
"type": "number",
|
|
470
|
-
"description": "Monetary value in base 10 decimals.",
|
|
471
|
-
"example": "42.42"
|
|
472
|
-
}
|
|
473
|
-
},
|
|
474
|
-
"required": ["currencyCode", "value"]
|
|
475
|
-
},
|
|
476
|
-
"NativeTokenBalanceDto": {
|
|
477
|
-
"type": "object",
|
|
478
|
-
"properties": {
|
|
479
|
-
"chainId": { "type": "string" },
|
|
480
|
-
"name": { "type": "string" },
|
|
481
|
-
"symbol": { "type": "string" },
|
|
482
|
-
"decimals": { "type": "number" },
|
|
483
|
-
"logoUri": { "type": "string" },
|
|
484
|
-
"price": { "$ref": "#/components/schemas/MoneyDto" },
|
|
485
|
-
"balance": { "type": "string" },
|
|
486
|
-
"balanceValue": { "$ref": "#/components/schemas/MoneyDto" }
|
|
487
|
-
},
|
|
488
|
-
"required": [
|
|
489
|
-
"chainId",
|
|
490
|
-
"name",
|
|
491
|
-
"symbol",
|
|
492
|
-
"decimals",
|
|
493
|
-
"logoUri",
|
|
494
|
-
"balance"
|
|
495
|
-
]
|
|
496
|
-
},
|
|
497
|
-
"NativeBalanceDto": {
|
|
498
|
-
"type": "object",
|
|
499
|
-
"properties": {
|
|
500
|
-
"nativeTokenBalance": {
|
|
501
|
-
"$ref": "#/components/schemas/NativeTokenBalanceDto"
|
|
502
|
-
}
|
|
503
|
-
},
|
|
504
|
-
"required": ["nativeTokenBalance"]
|
|
505
|
-
},
|
|
506
|
-
"Erc20TokenBalanceDto": {
|
|
507
|
-
"type": "object",
|
|
508
|
-
"properties": {
|
|
509
|
-
"chainId": { "type": "string" },
|
|
510
|
-
"contractAddress": { "type": "string" },
|
|
511
|
-
"name": { "type": "string" },
|
|
512
|
-
"symbol": { "type": "string" },
|
|
513
|
-
"decimals": { "type": "number" },
|
|
514
|
-
"tags": { "type": "array", "items": { "type": "string" } },
|
|
515
|
-
"logoUri": { "type": "string" },
|
|
516
|
-
"price": { "$ref": "#/components/schemas/MoneyDto" },
|
|
517
|
-
"balance": { "type": "string" },
|
|
518
|
-
"balanceValue": { "$ref": "#/components/schemas/MoneyDto" }
|
|
519
|
-
},
|
|
520
|
-
"required": [
|
|
521
|
-
"chainId",
|
|
522
|
-
"contractAddress",
|
|
523
|
-
"name",
|
|
524
|
-
"symbol",
|
|
525
|
-
"decimals",
|
|
526
|
-
"balance"
|
|
527
|
-
]
|
|
528
|
-
},
|
|
529
|
-
"Erc20BalancesDto": {
|
|
530
|
-
"type": "object",
|
|
531
|
-
"properties": {
|
|
532
|
-
"nextPageToken": {
|
|
533
|
-
"type": "string",
|
|
534
|
-
"description": "A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages."
|
|
535
|
-
},
|
|
536
|
-
"erc20TokenBalances": {
|
|
537
|
-
"type": "array",
|
|
538
|
-
"items": { "$ref": "#/components/schemas/Erc20TokenBalanceDto" }
|
|
539
|
-
}
|
|
540
|
-
},
|
|
541
|
-
"required": ["erc20TokenBalances"]
|
|
542
|
-
},
|
|
543
|
-
"Erc721TokenBalanceDto": {
|
|
544
|
-
"type": "object",
|
|
545
|
-
"properties": {
|
|
546
|
-
"chainId": { "type": "string" },
|
|
547
|
-
"contractAddress": { "type": "string" },
|
|
548
|
-
"name": { "type": "string" },
|
|
549
|
-
"symbol": { "type": "string" },
|
|
550
|
-
"tokenId": { "type": "string" },
|
|
551
|
-
"tokenUri": { "type": "string" }
|
|
552
|
-
},
|
|
553
|
-
"required": [
|
|
554
|
-
"chainId",
|
|
555
|
-
"contractAddress",
|
|
556
|
-
"name",
|
|
557
|
-
"symbol",
|
|
558
|
-
"tokenId",
|
|
559
|
-
"tokenUri"
|
|
560
|
-
]
|
|
561
|
-
},
|
|
562
|
-
"Erc721BalancesDto": {
|
|
563
|
-
"type": "object",
|
|
564
|
-
"properties": {
|
|
565
|
-
"nextPageToken": {
|
|
566
|
-
"type": "string",
|
|
567
|
-
"description": "A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages."
|
|
568
|
-
},
|
|
569
|
-
"erc721TokenBalances": {
|
|
570
|
-
"type": "array",
|
|
571
|
-
"items": { "$ref": "#/components/schemas/Erc721TokenBalanceDto" }
|
|
572
|
-
}
|
|
573
|
-
},
|
|
574
|
-
"required": ["erc721TokenBalances"]
|
|
575
|
-
},
|
|
576
|
-
"AddressDto": {
|
|
577
|
-
"type": "object",
|
|
578
|
-
"properties": {
|
|
579
|
-
"address": {
|
|
580
|
-
"type": "string",
|
|
581
|
-
"example": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
|
|
582
|
-
},
|
|
583
|
-
"name": { "type": "string" },
|
|
584
|
-
"symbol": { "type": "string" },
|
|
585
|
-
"tags": { "type": "array", "items": { "type": "string" } },
|
|
586
|
-
"logoUri": { "type": "string" }
|
|
587
|
-
},
|
|
588
|
-
"required": ["address"]
|
|
589
|
-
},
|
|
590
|
-
"MethodDto": {
|
|
591
|
-
"type": "object",
|
|
592
|
-
"properties": {
|
|
593
|
-
"methodHash": {
|
|
594
|
-
"type": "string",
|
|
595
|
-
"description": "The contract method hash identifier.",
|
|
596
|
-
"example": "0xa9059cbb"
|
|
597
|
-
},
|
|
598
|
-
"methodName": {
|
|
599
|
-
"type": "string",
|
|
600
|
-
"description": "The contract method name including parameter types.",
|
|
601
|
-
"example": "transfer(address,uint256)"
|
|
602
|
-
}
|
|
603
|
-
},
|
|
604
|
-
"required": ["methodHash"]
|
|
605
|
-
},
|
|
606
|
-
"NativeTransactionDto": {
|
|
607
|
-
"type": "object",
|
|
608
|
-
"properties": {
|
|
609
|
-
"blockNumber": {
|
|
610
|
-
"type": "string",
|
|
611
|
-
"description": "The block number on the chain.",
|
|
612
|
-
"example": "339"
|
|
613
|
-
},
|
|
614
|
-
"blockTimestamp": {
|
|
615
|
-
"type": "number",
|
|
616
|
-
"description": "The block finality timestamp.",
|
|
617
|
-
"example": 1648672486
|
|
618
|
-
},
|
|
619
|
-
"blockHash": {
|
|
620
|
-
"type": "string",
|
|
621
|
-
"description": "The block hash identifier.",
|
|
622
|
-
"example": "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
|
|
623
|
-
},
|
|
624
|
-
"blockIndex": {
|
|
625
|
-
"type": "number",
|
|
626
|
-
"description": "The index at which the transaction occured in the block (0-indexed).",
|
|
627
|
-
"example": 0
|
|
628
|
-
},
|
|
629
|
-
"txHash": {
|
|
630
|
-
"type": "string",
|
|
631
|
-
"description": "The transaction hash identifier.",
|
|
632
|
-
"example": "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
|
|
633
|
-
},
|
|
634
|
-
"txStatus": {
|
|
635
|
-
"type": "string",
|
|
636
|
-
"description": "The transaction status, which is either 0 (failed) or 1 (successful).",
|
|
637
|
-
"example": "1"
|
|
638
|
-
},
|
|
639
|
-
"txType": {
|
|
640
|
-
"type": "number",
|
|
641
|
-
"description": "The transaction type.",
|
|
642
|
-
"example": 1
|
|
643
|
-
},
|
|
644
|
-
"gasLimit": {
|
|
645
|
-
"type": "string",
|
|
646
|
-
"description": "The gas limit set for the transaction.",
|
|
647
|
-
"example": "51373"
|
|
648
|
-
},
|
|
649
|
-
"gasUsed": {
|
|
650
|
-
"type": "string",
|
|
651
|
-
"description": "The amount of gas used.",
|
|
652
|
-
"example": "51373"
|
|
653
|
-
},
|
|
654
|
-
"gasPrice": {
|
|
655
|
-
"type": "string",
|
|
656
|
-
"description": "The gas price denominated by the number of decimals of the native token.",
|
|
657
|
-
"example": "470000000000"
|
|
658
|
-
},
|
|
659
|
-
"nonce": {
|
|
660
|
-
"type": "string",
|
|
661
|
-
"description": "The nonce used by the sender of the transaction.",
|
|
662
|
-
"example": "1"
|
|
663
|
-
},
|
|
664
|
-
"from": { "$ref": "#/components/schemas/AddressDto" },
|
|
665
|
-
"to": { "$ref": "#/components/schemas/AddressDto" },
|
|
666
|
-
"method": { "$ref": "#/components/schemas/MethodDto" },
|
|
667
|
-
"value": { "type": "string", "example": "10000000000000000000" }
|
|
668
|
-
},
|
|
669
|
-
"required": [
|
|
670
|
-
"blockNumber",
|
|
671
|
-
"blockTimestamp",
|
|
672
|
-
"blockHash",
|
|
673
|
-
"blockIndex",
|
|
674
|
-
"txHash",
|
|
675
|
-
"txStatus",
|
|
676
|
-
"txType",
|
|
677
|
-
"gasLimit",
|
|
678
|
-
"gasUsed",
|
|
679
|
-
"gasPrice",
|
|
680
|
-
"nonce",
|
|
681
|
-
"from",
|
|
682
|
-
"to",
|
|
683
|
-
"value"
|
|
684
|
-
]
|
|
685
|
-
},
|
|
686
|
-
"Erc20TokenDto": {
|
|
687
|
-
"type": "object",
|
|
688
|
-
"properties": {
|
|
689
|
-
"contractAddress": {
|
|
690
|
-
"type": "string",
|
|
691
|
-
"example": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
|
|
692
|
-
},
|
|
693
|
-
"tokenName": { "type": "string" },
|
|
694
|
-
"tokenSymbol": { "type": "string" },
|
|
695
|
-
"tokenDecimals": { "type": "number" },
|
|
696
|
-
"price": { "$ref": "#/components/schemas/MoneyDto" }
|
|
697
|
-
},
|
|
698
|
-
"required": [
|
|
699
|
-
"contractAddress",
|
|
700
|
-
"tokenName",
|
|
701
|
-
"tokenSymbol",
|
|
702
|
-
"tokenDecimals"
|
|
703
|
-
]
|
|
704
|
-
},
|
|
705
|
-
"Erc20TransferDetailsDto": {
|
|
706
|
-
"type": "object",
|
|
707
|
-
"properties": {
|
|
708
|
-
"from": { "$ref": "#/components/schemas/AddressDto" },
|
|
709
|
-
"to": { "$ref": "#/components/schemas/AddressDto" },
|
|
710
|
-
"erc20Token": { "$ref": "#/components/schemas/Erc20TokenDto" },
|
|
711
|
-
"value": { "type": "string", "example": "10000000000000000000" }
|
|
712
|
-
},
|
|
713
|
-
"required": ["from", "to", "erc20Token", "value"]
|
|
714
|
-
},
|
|
715
|
-
"Erc721TokenDto": {
|
|
716
|
-
"type": "object",
|
|
717
|
-
"properties": {
|
|
718
|
-
"contractAddress": {
|
|
719
|
-
"type": "string",
|
|
720
|
-
"example": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
|
|
721
|
-
},
|
|
722
|
-
"tokenName": { "type": "string" },
|
|
723
|
-
"tokenSymbol": { "type": "string" },
|
|
724
|
-
"tokenId": { "type": "string" },
|
|
725
|
-
"tokenUri": { "type": "string" }
|
|
726
|
-
},
|
|
727
|
-
"required": [
|
|
728
|
-
"contractAddress",
|
|
729
|
-
"tokenName",
|
|
730
|
-
"tokenSymbol",
|
|
731
|
-
"tokenId",
|
|
732
|
-
"tokenUri"
|
|
733
|
-
]
|
|
734
|
-
},
|
|
735
|
-
"Erc721TransferDetailsDto": {
|
|
736
|
-
"type": "object",
|
|
737
|
-
"properties": {
|
|
738
|
-
"from": { "$ref": "#/components/schemas/AddressDto" },
|
|
739
|
-
"to": { "$ref": "#/components/schemas/AddressDto" },
|
|
740
|
-
"erc721Token": { "$ref": "#/components/schemas/Erc721TokenDto" }
|
|
741
|
-
},
|
|
742
|
-
"required": ["from", "to", "erc721Token"]
|
|
743
|
-
},
|
|
744
|
-
"InternalTransactionDetailsDto": {
|
|
745
|
-
"type": "object",
|
|
746
|
-
"properties": {
|
|
747
|
-
"from": { "$ref": "#/components/schemas/AddressDto" },
|
|
748
|
-
"to": { "$ref": "#/components/schemas/AddressDto" },
|
|
749
|
-
"internalTxType": {
|
|
750
|
-
"type": "string",
|
|
751
|
-
"enum": [
|
|
752
|
-
"UNKNOWN",
|
|
753
|
-
"CALL",
|
|
754
|
-
"CREATE",
|
|
755
|
-
"CREATE2",
|
|
756
|
-
"CALLCODE",
|
|
757
|
-
"DELEGATECALL",
|
|
758
|
-
"STATICCALL"
|
|
759
|
-
]
|
|
760
|
-
},
|
|
761
|
-
"value": { "type": "string", "example": "10000000000000000000" },
|
|
762
|
-
"isReverted": { "type": "boolean" }
|
|
763
|
-
},
|
|
764
|
-
"required": ["from", "to", "internalTxType", "value", "isReverted"]
|
|
765
|
-
},
|
|
766
|
-
"TransactionDetailsDto": {
|
|
767
|
-
"type": "object",
|
|
768
|
-
"properties": {
|
|
769
|
-
"nativeTransaction": {
|
|
770
|
-
"$ref": "#/components/schemas/NativeTransactionDto"
|
|
771
|
-
},
|
|
772
|
-
"erc20Transfers": {
|
|
773
|
-
"type": "array",
|
|
774
|
-
"items": { "$ref": "#/components/schemas/Erc20TransferDetailsDto" }
|
|
775
|
-
},
|
|
776
|
-
"erc721Transfers": {
|
|
777
|
-
"type": "array",
|
|
778
|
-
"items": { "$ref": "#/components/schemas/Erc721TransferDetailsDto" }
|
|
779
|
-
},
|
|
780
|
-
"internalTransactions": {
|
|
781
|
-
"type": "array",
|
|
782
|
-
"items": {
|
|
783
|
-
"$ref": "#/components/schemas/InternalTransactionDetailsDto"
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
},
|
|
787
|
-
"required": ["nativeTransaction"]
|
|
788
|
-
},
|
|
789
|
-
"ListTransactionDetailsDto": {
|
|
790
|
-
"type": "object",
|
|
791
|
-
"properties": {
|
|
792
|
-
"nextPageToken": {
|
|
793
|
-
"type": "string",
|
|
794
|
-
"description": "A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages."
|
|
795
|
-
},
|
|
796
|
-
"transactions": {
|
|
797
|
-
"type": "array",
|
|
798
|
-
"items": { "$ref": "#/components/schemas/TransactionDetailsDto" }
|
|
799
|
-
}
|
|
800
|
-
},
|
|
801
|
-
"required": ["transactions"]
|
|
802
|
-
},
|
|
803
|
-
"UtilityAddresses": {
|
|
804
|
-
"type": "object",
|
|
805
|
-
"properties": { "multicall": { "type": "string" } }
|
|
806
|
-
},
|
|
807
|
-
"NetworkToken": {
|
|
808
|
-
"type": "object",
|
|
809
|
-
"properties": {
|
|
810
|
-
"name": { "type": "string" },
|
|
811
|
-
"symbol": { "type": "string" },
|
|
812
|
-
"description": { "type": "string" },
|
|
813
|
-
"decimals": { "type": "number" },
|
|
814
|
-
"logoUri": { "type": "string" }
|
|
815
|
-
},
|
|
816
|
-
"required": ["name", "symbol", "description", "decimals"]
|
|
817
|
-
},
|
|
818
|
-
"ChainInfoDto": {
|
|
819
|
-
"type": "object",
|
|
820
|
-
"properties": {
|
|
821
|
-
"chainId": { "type": "string" },
|
|
822
|
-
"chainName": { "type": "string" },
|
|
823
|
-
"description": { "type": "string" },
|
|
824
|
-
"platformChainId": { "type": "string" },
|
|
825
|
-
"subnetId": { "type": "string" },
|
|
826
|
-
"vmId": { "type": "string" },
|
|
827
|
-
"vmName": {
|
|
828
|
-
"type": "string",
|
|
829
|
-
"enum": ["EVM", "BITCOIN", "ETHEREUM"]
|
|
830
|
-
},
|
|
831
|
-
"explorerUrl": { "type": "string" },
|
|
832
|
-
"rpcUrl": { "type": "string" },
|
|
833
|
-
"wsUrl": { "type": "string" },
|
|
834
|
-
"isTestnet": { "type": "boolean" },
|
|
835
|
-
"utilityAddresses": {
|
|
836
|
-
"$ref": "#/components/schemas/UtilityAddresses"
|
|
837
|
-
},
|
|
838
|
-
"networkToken": { "$ref": "#/components/schemas/NetworkToken" },
|
|
839
|
-
"chainLogoUri": { "type": "string" }
|
|
840
|
-
},
|
|
841
|
-
"required": [
|
|
842
|
-
"chainId",
|
|
843
|
-
"chainName",
|
|
844
|
-
"description",
|
|
845
|
-
"platformChainId",
|
|
846
|
-
"subnetId",
|
|
847
|
-
"vmId",
|
|
848
|
-
"vmName",
|
|
849
|
-
"rpcUrl",
|
|
850
|
-
"isTestnet",
|
|
851
|
-
"networkToken"
|
|
852
|
-
]
|
|
853
|
-
},
|
|
854
|
-
"ChainsDto": {
|
|
855
|
-
"type": "object",
|
|
856
|
-
"properties": {
|
|
857
|
-
"chains": {
|
|
858
|
-
"type": "array",
|
|
859
|
-
"items": { "$ref": "#/components/schemas/ChainInfoDto" }
|
|
860
|
-
}
|
|
861
|
-
},
|
|
862
|
-
"required": ["chains"]
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
}
|