@avalabs/glacier-sdk 2.8.0-alpha.107 → 2.8.0-alpha.109
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/index.d.ts +487 -361
- package/dist/index.js +192 -163
- package/esm/generated/models/BlockchainIds.d.ts +9 -0
- package/esm/generated/models/BlockchainIds.js +10 -0
- package/esm/generated/models/ChainAddressChainIdMap.d.ts +2 -2
- package/esm/generated/models/CollectionMetrics.d.ts +1 -2
- package/esm/generated/models/EVMInput.d.ts +5 -0
- package/esm/generated/models/Erc1155Transfer.d.ts +1 -0
- package/esm/generated/models/Erc1155TransferDetails.d.ts +1 -0
- package/esm/generated/models/Erc20Transfer.d.ts +1 -0
- package/esm/generated/models/Erc20TransferDetails.d.ts +1 -0
- package/esm/generated/models/Erc721Transfer.d.ts +1 -0
- package/esm/generated/models/Erc721TransferDetails.d.ts +1 -0
- package/esm/generated/models/{GetBlockResponse.d.ts → EvmBlock.d.ts} +2 -6
- package/esm/generated/models/FloorPrice.d.ts +2 -0
- package/esm/generated/models/GetEvmBlockResponse.d.ts +45 -0
- package/esm/generated/models/GetPrimaryNetworkBlockResponse.d.ts +15 -0
- package/esm/generated/models/ListCChainAtomicBalancesResponse.d.ts +2 -0
- package/esm/generated/models/ListCChainAtomicTransactionsResponse.d.ts +2 -0
- package/esm/generated/models/{ListBlocksResponse.d.ts → ListEvmBlocksResponse.d.ts} +4 -4
- package/esm/generated/models/ListPChainBalancesResponse.d.ts +2 -0
- package/esm/generated/models/ListPChainTransactionsResponse.d.ts +2 -0
- package/esm/generated/models/ListPChainUtxosResponse.d.ts +2 -0
- package/esm/generated/models/ListPrimaryNetworkBlocksResponse.d.ts +13 -0
- package/esm/generated/models/ListUtxosResponse.d.ts +2 -0
- package/esm/generated/models/ListXChainBalancesResponse.d.ts +2 -0
- package/esm/generated/models/ListXChainTransactionsResponse.d.ts +2 -0
- package/esm/generated/models/ListXChainVerticesResponse.d.ts +2 -0
- package/esm/generated/models/PChainBalance.d.ts +6 -6
- package/esm/generated/models/PChainTransaction.d.ts +3 -3
- package/esm/generated/models/PChainUtxo.d.ts +4 -0
- package/esm/generated/models/PrimaryNetwork.d.ts +6 -0
- package/esm/generated/models/PrimaryNetwork.js +7 -0
- package/esm/generated/models/{Block.d.ts → PrimaryNetworkBlock.d.ts} +2 -2
- package/esm/generated/models/PrimaryNetworkChainInfo.d.ts +9 -0
- package/esm/generated/models/PrimaryNetworkChainName.d.ts +7 -0
- package/esm/generated/models/PrimaryNetworkChainName.js +8 -0
- package/esm/generated/models/Utxo.d.ts +9 -1
- package/esm/generated/models/XChainLinearTransaction.d.ts +4 -4
- package/esm/generated/models/XChainLinearTransaction.js +1 -1
- package/esm/generated/models/XChainNonLinearTransaction.d.ts +4 -4
- package/esm/generated/models/XChainNonLinearTransaction.js +1 -1
- package/esm/generated/services/EvmService.d.ts +244 -240
- package/esm/generated/services/EvmService.js +163 -161
- package/esm/generated/services/PrimaryNetworkService.d.ts +14 -9
- package/esm/generated/services/PrimaryNetworkService.js +2 -0
- package/esm/index.d.ts +10 -3
- package/esm/index.js +3 -0
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ class EvmService {
|
|
|
5
5
|
getNativeBalance({
|
|
6
6
|
chainId,
|
|
7
7
|
address,
|
|
8
|
+
blockNumber,
|
|
8
9
|
currency
|
|
9
10
|
}) {
|
|
10
11
|
return this.httpRequest.request({
|
|
@@ -15,6 +16,7 @@ class EvmService {
|
|
|
15
16
|
"address": address
|
|
16
17
|
},
|
|
17
18
|
query: {
|
|
19
|
+
"blockNumber": blockNumber,
|
|
18
20
|
"currency": currency
|
|
19
21
|
}
|
|
20
22
|
});
|
|
@@ -144,366 +146,366 @@ class EvmService {
|
|
|
144
146
|
}
|
|
145
147
|
});
|
|
146
148
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
supportedChains() {
|
|
150
|
+
return this.httpRequest.request({
|
|
151
|
+
method: "GET",
|
|
152
|
+
url: "/v1/chains"
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
getChainInfo({
|
|
156
|
+
chainId
|
|
152
157
|
}) {
|
|
153
158
|
return this.httpRequest.request({
|
|
154
159
|
method: "GET",
|
|
155
|
-
url: "/v1/chains/{chainId}
|
|
160
|
+
url: "/v1/chains/{chainId}",
|
|
156
161
|
path: {
|
|
157
|
-
"chainId": chainId
|
|
158
|
-
"address": address
|
|
159
|
-
},
|
|
160
|
-
query: {
|
|
161
|
-
"pageSize": pageSize,
|
|
162
|
-
"pageToken": pageToken
|
|
162
|
+
"chainId": chainId
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
|
|
166
|
+
reindexNft({
|
|
167
167
|
chainId,
|
|
168
168
|
address,
|
|
169
|
-
|
|
170
|
-
pageToken,
|
|
171
|
-
startBlock,
|
|
172
|
-
endBlock,
|
|
173
|
-
sortOrder
|
|
169
|
+
tokenId
|
|
174
170
|
}) {
|
|
175
171
|
return this.httpRequest.request({
|
|
176
|
-
method: "
|
|
177
|
-
url: "/v1/chains/{chainId}/
|
|
172
|
+
method: "POST",
|
|
173
|
+
url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}:reindex",
|
|
178
174
|
path: {
|
|
179
175
|
"chainId": chainId,
|
|
180
|
-
"address": address
|
|
181
|
-
|
|
182
|
-
query: {
|
|
183
|
-
"pageSize": pageSize,
|
|
184
|
-
"pageToken": pageToken,
|
|
185
|
-
"startBlock": startBlock,
|
|
186
|
-
"endBlock": endBlock,
|
|
187
|
-
"sortOrder": sortOrder
|
|
176
|
+
"address": address,
|
|
177
|
+
"tokenId": tokenId
|
|
188
178
|
}
|
|
189
179
|
});
|
|
190
180
|
}
|
|
191
|
-
|
|
181
|
+
getCollection({
|
|
192
182
|
chainId,
|
|
193
183
|
address,
|
|
194
|
-
|
|
195
|
-
pageToken
|
|
184
|
+
timeframe
|
|
196
185
|
}) {
|
|
197
186
|
return this.httpRequest.request({
|
|
198
187
|
method: "GET",
|
|
199
|
-
url: "/v1/chains/{chainId}/
|
|
188
|
+
url: "/v1/chains/{chainId}/nfts/collections/{address}",
|
|
200
189
|
path: {
|
|
201
190
|
"chainId": chainId,
|
|
202
191
|
"address": address
|
|
203
192
|
},
|
|
204
193
|
query: {
|
|
205
|
-
"
|
|
206
|
-
"pageToken": pageToken
|
|
194
|
+
"timeframe": timeframe
|
|
207
195
|
}
|
|
208
196
|
});
|
|
209
197
|
}
|
|
210
|
-
|
|
198
|
+
listListingsByCollectionTokenId({
|
|
211
199
|
chainId,
|
|
212
200
|
address,
|
|
201
|
+
tokenId,
|
|
213
202
|
pageSize = 10,
|
|
214
|
-
pageToken
|
|
203
|
+
pageToken,
|
|
204
|
+
sortBy,
|
|
205
|
+
sortOrder,
|
|
206
|
+
currency,
|
|
207
|
+
includeHistory = false
|
|
215
208
|
}) {
|
|
216
209
|
return this.httpRequest.request({
|
|
217
210
|
method: "GET",
|
|
218
|
-
url: "/v1/chains/{chainId}/
|
|
211
|
+
url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}/listings",
|
|
219
212
|
path: {
|
|
220
213
|
"chainId": chainId,
|
|
221
|
-
"address": address
|
|
214
|
+
"address": address,
|
|
215
|
+
"tokenId": tokenId
|
|
222
216
|
},
|
|
223
217
|
query: {
|
|
224
218
|
"pageSize": pageSize,
|
|
225
|
-
"pageToken": pageToken
|
|
219
|
+
"pageToken": pageToken,
|
|
220
|
+
"sortBy": sortBy,
|
|
221
|
+
"sortOrder": sortOrder,
|
|
222
|
+
"currency": currency,
|
|
223
|
+
"includeHistory": includeHistory
|
|
226
224
|
}
|
|
227
225
|
});
|
|
228
226
|
}
|
|
229
|
-
|
|
227
|
+
listListingsByCollection({
|
|
230
228
|
chainId,
|
|
231
229
|
address,
|
|
232
230
|
pageSize = 10,
|
|
233
|
-
pageToken
|
|
231
|
+
pageToken,
|
|
232
|
+
sortBy,
|
|
233
|
+
sortOrder,
|
|
234
|
+
currency,
|
|
235
|
+
includeHistory = false
|
|
234
236
|
}) {
|
|
235
237
|
return this.httpRequest.request({
|
|
236
238
|
method: "GET",
|
|
237
|
-
url: "/v1/chains/{chainId}/
|
|
239
|
+
url: "/v1/chains/{chainId}/nfts/collections/{address}/listings",
|
|
238
240
|
path: {
|
|
239
241
|
"chainId": chainId,
|
|
240
242
|
"address": address
|
|
241
243
|
},
|
|
242
244
|
query: {
|
|
243
245
|
"pageSize": pageSize,
|
|
244
|
-
"pageToken": pageToken
|
|
246
|
+
"pageToken": pageToken,
|
|
247
|
+
"sortBy": sortBy,
|
|
248
|
+
"sortOrder": sortOrder,
|
|
249
|
+
"currency": currency,
|
|
250
|
+
"includeHistory": includeHistory
|
|
245
251
|
}
|
|
246
252
|
});
|
|
247
253
|
}
|
|
248
|
-
|
|
254
|
+
listRecentListings({
|
|
249
255
|
chainId,
|
|
250
|
-
address,
|
|
251
256
|
pageSize = 10,
|
|
252
|
-
pageToken
|
|
257
|
+
pageToken,
|
|
258
|
+
eventType,
|
|
259
|
+
currency
|
|
253
260
|
}) {
|
|
254
261
|
return this.httpRequest.request({
|
|
255
262
|
method: "GET",
|
|
256
|
-
url: "/v1/chains/{chainId}/
|
|
263
|
+
url: "/v1/chains/{chainId}/nfts/listings",
|
|
257
264
|
path: {
|
|
258
|
-
"chainId": chainId
|
|
259
|
-
"address": address
|
|
265
|
+
"chainId": chainId
|
|
260
266
|
},
|
|
261
267
|
query: {
|
|
262
268
|
"pageSize": pageSize,
|
|
263
|
-
"pageToken": pageToken
|
|
269
|
+
"pageToken": pageToken,
|
|
270
|
+
"eventType": eventType,
|
|
271
|
+
"currency": currency
|
|
264
272
|
}
|
|
265
273
|
});
|
|
266
274
|
}
|
|
267
|
-
|
|
275
|
+
listCollections({
|
|
268
276
|
chainId,
|
|
269
|
-
address,
|
|
270
277
|
pageSize = 10,
|
|
271
|
-
pageToken
|
|
278
|
+
pageToken,
|
|
279
|
+
timeframe,
|
|
280
|
+
sortBy,
|
|
281
|
+
sortOrder
|
|
272
282
|
}) {
|
|
273
283
|
return this.httpRequest.request({
|
|
274
284
|
method: "GET",
|
|
275
|
-
url: "/v1/chains/{chainId}/
|
|
285
|
+
url: "/v1/chains/{chainId}/nfts/collections",
|
|
276
286
|
path: {
|
|
277
|
-
"chainId": chainId
|
|
278
|
-
"address": address
|
|
287
|
+
"chainId": chainId
|
|
279
288
|
},
|
|
280
289
|
query: {
|
|
281
290
|
"pageSize": pageSize,
|
|
282
|
-
"pageToken": pageToken
|
|
291
|
+
"pageToken": pageToken,
|
|
292
|
+
"timeframe": timeframe,
|
|
293
|
+
"sortBy": sortBy,
|
|
294
|
+
"sortOrder": sortOrder
|
|
283
295
|
}
|
|
284
296
|
});
|
|
285
297
|
}
|
|
286
|
-
|
|
298
|
+
search({
|
|
287
299
|
chainId,
|
|
288
|
-
|
|
300
|
+
requestBody
|
|
289
301
|
}) {
|
|
290
302
|
return this.httpRequest.request({
|
|
291
|
-
method: "
|
|
292
|
-
url: "/v1/chains/{chainId}/
|
|
303
|
+
method: "POST",
|
|
304
|
+
url: "/v1/chains/{chainId}/nfts/search",
|
|
293
305
|
path: {
|
|
294
|
-
"chainId": chainId
|
|
295
|
-
|
|
296
|
-
|
|
306
|
+
"chainId": chainId
|
|
307
|
+
},
|
|
308
|
+
body: requestBody,
|
|
309
|
+
mediaType: "application/json"
|
|
297
310
|
});
|
|
298
311
|
}
|
|
299
|
-
|
|
312
|
+
getTokenMetadata({
|
|
300
313
|
chainId,
|
|
301
|
-
|
|
314
|
+
address,
|
|
315
|
+
tokenId
|
|
302
316
|
}) {
|
|
303
317
|
return this.httpRequest.request({
|
|
304
318
|
method: "GET",
|
|
305
|
-
url: "/v1/chains/{chainId}/
|
|
319
|
+
url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}",
|
|
306
320
|
path: {
|
|
307
321
|
"chainId": chainId,
|
|
308
|
-
"
|
|
322
|
+
"address": address,
|
|
323
|
+
"tokenId": tokenId
|
|
309
324
|
}
|
|
310
325
|
});
|
|
311
326
|
}
|
|
312
|
-
|
|
327
|
+
listTransfers({
|
|
313
328
|
chainId,
|
|
329
|
+
address,
|
|
314
330
|
pageSize = 10,
|
|
315
|
-
pageToken
|
|
316
|
-
status
|
|
331
|
+
pageToken
|
|
317
332
|
}) {
|
|
318
333
|
return this.httpRequest.request({
|
|
319
334
|
method: "GET",
|
|
320
|
-
url: "/v1/chains/{chainId}/
|
|
335
|
+
url: "/v1/chains/{chainId}/tokens/{address}/transfers",
|
|
321
336
|
path: {
|
|
322
|
-
"chainId": chainId
|
|
337
|
+
"chainId": chainId,
|
|
338
|
+
"address": address
|
|
323
339
|
},
|
|
324
340
|
query: {
|
|
325
341
|
"pageSize": pageSize,
|
|
326
|
-
"pageToken": pageToken
|
|
327
|
-
"status": status
|
|
342
|
+
"pageToken": pageToken
|
|
328
343
|
}
|
|
329
344
|
});
|
|
330
345
|
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
346
|
+
listTransactions({
|
|
347
|
+
chainId,
|
|
348
|
+
address,
|
|
349
|
+
pageSize = 10,
|
|
350
|
+
pageToken,
|
|
351
|
+
startBlock,
|
|
352
|
+
endBlock,
|
|
353
|
+
sortOrder
|
|
339
354
|
}) {
|
|
340
355
|
return this.httpRequest.request({
|
|
341
356
|
method: "GET",
|
|
342
|
-
url: "/v1/chains/{chainId}",
|
|
357
|
+
url: "/v1/chains/{chainId}/addresses/{address}/transactions",
|
|
343
358
|
path: {
|
|
344
|
-
"chainId": chainId
|
|
359
|
+
"chainId": chainId,
|
|
360
|
+
"address": address
|
|
361
|
+
},
|
|
362
|
+
query: {
|
|
363
|
+
"pageSize": pageSize,
|
|
364
|
+
"pageToken": pageToken,
|
|
365
|
+
"startBlock": startBlock,
|
|
366
|
+
"endBlock": endBlock,
|
|
367
|
+
"sortOrder": sortOrder
|
|
345
368
|
}
|
|
346
369
|
});
|
|
347
370
|
}
|
|
348
|
-
|
|
371
|
+
listNativeTransactions({
|
|
349
372
|
chainId,
|
|
350
373
|
address,
|
|
351
|
-
|
|
374
|
+
pageSize = 10,
|
|
375
|
+
pageToken
|
|
352
376
|
}) {
|
|
353
377
|
return this.httpRequest.request({
|
|
354
|
-
method: "
|
|
355
|
-
url: "/v1/chains/{chainId}/
|
|
378
|
+
method: "GET",
|
|
379
|
+
url: "/v1/chains/{chainId}/addresses/{address}/transactions:listNative",
|
|
356
380
|
path: {
|
|
357
381
|
"chainId": chainId,
|
|
358
|
-
"address": address
|
|
359
|
-
|
|
382
|
+
"address": address
|
|
383
|
+
},
|
|
384
|
+
query: {
|
|
385
|
+
"pageSize": pageSize,
|
|
386
|
+
"pageToken": pageToken
|
|
360
387
|
}
|
|
361
388
|
});
|
|
362
389
|
}
|
|
363
|
-
|
|
390
|
+
listErc20Transactions({
|
|
364
391
|
chainId,
|
|
365
392
|
address,
|
|
366
|
-
|
|
393
|
+
pageSize = 10,
|
|
394
|
+
pageToken
|
|
367
395
|
}) {
|
|
368
396
|
return this.httpRequest.request({
|
|
369
397
|
method: "GET",
|
|
370
|
-
url: "/v1/chains/{chainId}/
|
|
398
|
+
url: "/v1/chains/{chainId}/addresses/{address}/transactions:listErc20",
|
|
371
399
|
path: {
|
|
372
400
|
"chainId": chainId,
|
|
373
|
-
"address": address
|
|
374
|
-
|
|
401
|
+
"address": address
|
|
402
|
+
},
|
|
403
|
+
query: {
|
|
404
|
+
"pageSize": pageSize,
|
|
405
|
+
"pageToken": pageToken
|
|
375
406
|
}
|
|
376
407
|
});
|
|
377
408
|
}
|
|
378
|
-
|
|
409
|
+
listErc721Transactions({
|
|
379
410
|
chainId,
|
|
380
411
|
address,
|
|
381
|
-
|
|
412
|
+
pageSize = 10,
|
|
413
|
+
pageToken
|
|
382
414
|
}) {
|
|
383
415
|
return this.httpRequest.request({
|
|
384
416
|
method: "GET",
|
|
385
|
-
url: "/v1/chains/{chainId}/
|
|
417
|
+
url: "/v1/chains/{chainId}/addresses/{address}/transactions:listErc721",
|
|
386
418
|
path: {
|
|
387
419
|
"chainId": chainId,
|
|
388
420
|
"address": address
|
|
389
421
|
},
|
|
390
422
|
query: {
|
|
391
|
-
"
|
|
423
|
+
"pageSize": pageSize,
|
|
424
|
+
"pageToken": pageToken
|
|
392
425
|
}
|
|
393
426
|
});
|
|
394
427
|
}
|
|
395
|
-
|
|
428
|
+
listErc1155Transactions({
|
|
396
429
|
chainId,
|
|
397
430
|
address,
|
|
398
|
-
tokenId,
|
|
399
431
|
pageSize = 10,
|
|
400
|
-
pageToken
|
|
401
|
-
sortBy,
|
|
402
|
-
sortOrder,
|
|
403
|
-
currency,
|
|
404
|
-
includeHistory = false
|
|
432
|
+
pageToken
|
|
405
433
|
}) {
|
|
406
434
|
return this.httpRequest.request({
|
|
407
435
|
method: "GET",
|
|
408
|
-
url: "/v1/chains/{chainId}/
|
|
436
|
+
url: "/v1/chains/{chainId}/addresses/{address}/transactions:listErc1155",
|
|
409
437
|
path: {
|
|
410
438
|
"chainId": chainId,
|
|
411
|
-
"address": address
|
|
412
|
-
"tokenId": tokenId
|
|
439
|
+
"address": address
|
|
413
440
|
},
|
|
414
441
|
query: {
|
|
415
442
|
"pageSize": pageSize,
|
|
416
|
-
"pageToken": pageToken
|
|
417
|
-
"sortBy": sortBy,
|
|
418
|
-
"sortOrder": sortOrder,
|
|
419
|
-
"currency": currency,
|
|
420
|
-
"includeHistory": includeHistory
|
|
443
|
+
"pageToken": pageToken
|
|
421
444
|
}
|
|
422
445
|
});
|
|
423
446
|
}
|
|
424
|
-
|
|
447
|
+
listInternalTransactions({
|
|
425
448
|
chainId,
|
|
426
449
|
address,
|
|
427
450
|
pageSize = 10,
|
|
428
|
-
pageToken
|
|
429
|
-
sortBy,
|
|
430
|
-
sortOrder,
|
|
431
|
-
currency,
|
|
432
|
-
includeHistory = false
|
|
451
|
+
pageToken
|
|
433
452
|
}) {
|
|
434
453
|
return this.httpRequest.request({
|
|
435
454
|
method: "GET",
|
|
436
|
-
url: "/v1/chains/{chainId}/
|
|
455
|
+
url: "/v1/chains/{chainId}/addresses/{address}/transactions:listInternals",
|
|
437
456
|
path: {
|
|
438
457
|
"chainId": chainId,
|
|
439
458
|
"address": address
|
|
440
459
|
},
|
|
441
460
|
query: {
|
|
442
461
|
"pageSize": pageSize,
|
|
443
|
-
"pageToken": pageToken
|
|
444
|
-
"sortBy": sortBy,
|
|
445
|
-
"sortOrder": sortOrder,
|
|
446
|
-
"currency": currency,
|
|
447
|
-
"includeHistory": includeHistory
|
|
462
|
+
"pageToken": pageToken
|
|
448
463
|
}
|
|
449
464
|
});
|
|
450
465
|
}
|
|
451
|
-
|
|
466
|
+
getTransaction({
|
|
452
467
|
chainId,
|
|
453
|
-
|
|
454
|
-
pageToken,
|
|
455
|
-
eventType,
|
|
456
|
-
currency
|
|
468
|
+
txHash
|
|
457
469
|
}) {
|
|
458
470
|
return this.httpRequest.request({
|
|
459
471
|
method: "GET",
|
|
460
|
-
url: "/v1/chains/{chainId}/
|
|
472
|
+
url: "/v1/chains/{chainId}/transactions/{txHash}",
|
|
461
473
|
path: {
|
|
462
|
-
"chainId": chainId
|
|
463
|
-
|
|
464
|
-
query: {
|
|
465
|
-
"pageSize": pageSize,
|
|
466
|
-
"pageToken": pageToken,
|
|
467
|
-
"eventType": eventType,
|
|
468
|
-
"currency": currency
|
|
474
|
+
"chainId": chainId,
|
|
475
|
+
"txHash": txHash
|
|
469
476
|
}
|
|
470
477
|
});
|
|
471
478
|
}
|
|
472
|
-
|
|
479
|
+
getTransactionsForBlock({
|
|
473
480
|
chainId,
|
|
474
|
-
|
|
475
|
-
pageToken,
|
|
476
|
-
timeframe,
|
|
477
|
-
sortBy,
|
|
478
|
-
sortOrder
|
|
481
|
+
blockId
|
|
479
482
|
}) {
|
|
480
483
|
return this.httpRequest.request({
|
|
481
484
|
method: "GET",
|
|
482
|
-
url: "/v1/chains/{chainId}/
|
|
485
|
+
url: "/v1/chains/{chainId}/blocks/{blockId}/transactions",
|
|
483
486
|
path: {
|
|
484
|
-
"chainId": chainId
|
|
485
|
-
|
|
486
|
-
query: {
|
|
487
|
-
"pageSize": pageSize,
|
|
488
|
-
"pageToken": pageToken,
|
|
489
|
-
"timeframe": timeframe,
|
|
490
|
-
"sortBy": sortBy,
|
|
491
|
-
"sortOrder": sortOrder
|
|
487
|
+
"chainId": chainId,
|
|
488
|
+
"blockId": blockId
|
|
492
489
|
}
|
|
493
490
|
});
|
|
494
491
|
}
|
|
495
|
-
|
|
492
|
+
listLatestTransactions({
|
|
496
493
|
chainId,
|
|
497
|
-
|
|
494
|
+
pageSize = 10,
|
|
495
|
+
pageToken,
|
|
496
|
+
status
|
|
498
497
|
}) {
|
|
499
498
|
return this.httpRequest.request({
|
|
500
|
-
method: "
|
|
501
|
-
url: "/v1/chains/{chainId}/
|
|
499
|
+
method: "GET",
|
|
500
|
+
url: "/v1/chains/{chainId}/transactions",
|
|
502
501
|
path: {
|
|
503
502
|
"chainId": chainId
|
|
504
503
|
},
|
|
505
|
-
|
|
506
|
-
|
|
504
|
+
query: {
|
|
505
|
+
"pageSize": pageSize,
|
|
506
|
+
"pageToken": pageToken,
|
|
507
|
+
"status": status
|
|
508
|
+
}
|
|
507
509
|
});
|
|
508
510
|
}
|
|
509
511
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Block } from '../models/Block.js';
|
|
2
1
|
import { BlockchainId } from '../models/BlockchainId.js';
|
|
3
2
|
import { CChainExportTransaction } from '../models/CChainExportTransaction.js';
|
|
4
3
|
import { CChainImportTransaction } from '../models/CChainImportTransaction.js';
|
|
5
4
|
import { ChainAddressChainIdMapListResponse } from '../models/ChainAddressChainIdMapListResponse.js';
|
|
6
|
-
import {
|
|
5
|
+
import { GetPrimaryNetworkBlockResponse } from '../models/GetPrimaryNetworkBlockResponse.js';
|
|
7
6
|
import { ListCChainAtomicBalancesResponse } from '../models/ListCChainAtomicBalancesResponse.js';
|
|
8
7
|
import { ListCChainAtomicTransactionsResponse } from '../models/ListCChainAtomicTransactionsResponse.js';
|
|
9
8
|
import { ListPChainBalancesResponse } from '../models/ListPChainBalancesResponse.js';
|
|
10
9
|
import { ListPChainTransactionsResponse } from '../models/ListPChainTransactionsResponse.js';
|
|
11
10
|
import { ListPChainUtxosResponse } from '../models/ListPChainUtxosResponse.js';
|
|
11
|
+
import { ListPrimaryNetworkBlocksResponse } from '../models/ListPrimaryNetworkBlocksResponse.js';
|
|
12
12
|
import { ListUtxosResponse } from '../models/ListUtxosResponse.js';
|
|
13
13
|
import { ListXChainBalancesResponse } from '../models/ListXChainBalancesResponse.js';
|
|
14
14
|
import { ListXChainTransactionsResponse } from '../models/ListXChainTransactionsResponse.js';
|
|
@@ -158,7 +158,7 @@ declare class PrimaryNetworkService {
|
|
|
158
158
|
* @returns any
|
|
159
159
|
* @throws ApiError
|
|
160
160
|
*/
|
|
161
|
-
getBalancesByAddresses({ blockchainId, network, addresses, }: {
|
|
161
|
+
getBalancesByAddresses({ blockchainId, network, blockTimestamp, addresses, }: {
|
|
162
162
|
/**
|
|
163
163
|
* A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
|
|
164
164
|
*/
|
|
@@ -167,6 +167,11 @@ declare class PrimaryNetworkService {
|
|
|
167
167
|
* Either mainnet or a testnet.
|
|
168
168
|
*/
|
|
169
169
|
network: Network;
|
|
170
|
+
/**
|
|
171
|
+
* An epoch timestamp in seconds.
|
|
172
|
+
* Balance will be calculated as of this timestamp.
|
|
173
|
+
*/
|
|
174
|
+
blockTimestamp?: number;
|
|
170
175
|
/**
|
|
171
176
|
* A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
|
|
172
177
|
*/
|
|
@@ -174,7 +179,7 @@ declare class PrimaryNetworkService {
|
|
|
174
179
|
}): CancelablePromise<(ListPChainBalancesResponse | ListXChainBalancesResponse | ListCChainAtomicBalancesResponse)>;
|
|
175
180
|
/**
|
|
176
181
|
* Returns block by block_height or block_hash on P-Chain, X-Chain (Cortina), C-Chain (hexadecimal for C-Chain).
|
|
177
|
-
* @returns
|
|
182
|
+
* @returns GetPrimaryNetworkBlockResponse
|
|
178
183
|
* @throws ApiError
|
|
179
184
|
*/
|
|
180
185
|
getBlockById({ blockchainId, network, blockId, }: {
|
|
@@ -190,10 +195,10 @@ declare class PrimaryNetworkService {
|
|
|
190
195
|
* A block identifier which is either a block number or the block hash.
|
|
191
196
|
*/
|
|
192
197
|
blockId: string;
|
|
193
|
-
}): CancelablePromise<
|
|
198
|
+
}): CancelablePromise<GetPrimaryNetworkBlockResponse>;
|
|
194
199
|
/**
|
|
195
200
|
* Returns latest blocks proposed by a given NodeID, up to user defined limit.
|
|
196
|
-
* @returns
|
|
201
|
+
* @returns ListPrimaryNetworkBlocksResponse
|
|
197
202
|
* @throws ApiError
|
|
198
203
|
*/
|
|
199
204
|
listPrimaryNetworkBlocksByNodeId({ blockchainId, network, nodeId, pageSize, pageToken, }: {
|
|
@@ -218,10 +223,10 @@ declare class PrimaryNetworkService {
|
|
|
218
223
|
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
219
224
|
*/
|
|
220
225
|
pageToken?: string;
|
|
221
|
-
}): CancelablePromise<
|
|
226
|
+
}): CancelablePromise<ListPrimaryNetworkBlocksResponse>;
|
|
222
227
|
/**
|
|
223
228
|
* Returns latest blocks, up to user defined limit on P-Chain, X-Chain or C-Chain.
|
|
224
|
-
* @returns
|
|
229
|
+
* @returns ListPrimaryNetworkBlocksResponse
|
|
225
230
|
* @throws ApiError
|
|
226
231
|
*/
|
|
227
232
|
listLatestPrimaryNetworkBlocks({ blockchainId, network, pageSize, pageToken, }: {
|
|
@@ -242,7 +247,7 @@ declare class PrimaryNetworkService {
|
|
|
242
247
|
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
243
248
|
*/
|
|
244
249
|
pageToken?: string;
|
|
245
|
-
}): CancelablePromise<
|
|
250
|
+
}): CancelablePromise<ListPrimaryNetworkBlocksResponse>;
|
|
246
251
|
/**
|
|
247
252
|
* Returns latest vertices, up to user defined limit on X-Chain.
|
|
248
253
|
* @returns ListXChainVerticesResponse
|
|
@@ -91,6 +91,7 @@ class PrimaryNetworkService {
|
|
|
91
91
|
getBalancesByAddresses({
|
|
92
92
|
blockchainId,
|
|
93
93
|
network,
|
|
94
|
+
blockTimestamp,
|
|
94
95
|
addresses
|
|
95
96
|
}) {
|
|
96
97
|
return this.httpRequest.request({
|
|
@@ -101,6 +102,7 @@ class PrimaryNetworkService {
|
|
|
101
102
|
"network": network
|
|
102
103
|
},
|
|
103
104
|
query: {
|
|
105
|
+
"blockTimestamp": blockTimestamp,
|
|
104
106
|
"addresses": addresses
|
|
105
107
|
}
|
|
106
108
|
});
|