@avalabs/glacier-sdk 2.8.0-alpha.8 → 2.8.0-alpha.80

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 CHANGED
@@ -1,3 +1,1489 @@
1
- export * from './src/generated/models';
2
- export * from './src/glacierClient';
3
- //# sourceMappingURL=index.d.ts.map
1
+ import { HttpOptions } from '@avalabs/utils-sdk';
2
+
3
+ declare enum CurrencyCode {
4
+ Usd = "usd",
5
+ Eur = "eur",
6
+ Aud = "aud",
7
+ Cad = "cad",
8
+ Chf = "chf",
9
+ Clp = "clp",
10
+ Cny = "cny",
11
+ Czk = "czk",
12
+ Dkk = "dkk",
13
+ Gbp = "gbp",
14
+ Hkd = "hkd",
15
+ Huf = "huf",
16
+ Jpy = "jpy",
17
+ Nzd = "nzd"
18
+ }
19
+ interface Money {
20
+ /**
21
+ * ISO 4217 currency code.
22
+ * @example "usd"
23
+ */
24
+ currencyCode: CurrencyCode;
25
+ /**
26
+ * Monetary value in base 10 decimals.
27
+ * @example "42.42"
28
+ */
29
+ value: number;
30
+ }
31
+ interface NativeTokenBalance {
32
+ /**
33
+ * The contract name.
34
+ * @example "Wrapped AVAX"
35
+ */
36
+ name: string;
37
+ /**
38
+ * The contract symbol.
39
+ * @example "WAVAX"
40
+ */
41
+ symbol: string;
42
+ /**
43
+ * The number of decimals the token uses. For example `6`,
44
+ * means to divide the token amount by `1000000` to get its user
45
+ * representation.
46
+ * @example 18
47
+ */
48
+ decimals: number;
49
+ /**
50
+ * The logo uri for the address.
51
+ * @example "https://glacier-api.avax.network/proxy/chain-assets/main/chains/43114/token-logo.png"
52
+ */
53
+ logoUri?: string;
54
+ /**
55
+ * The evm chain id.
56
+ * @example "43114"
57
+ */
58
+ chainId: string;
59
+ /** The token price, if available. */
60
+ price?: Money;
61
+ /**
62
+ * The address balance for the token, in units specified by the
63
+ * `decimals` value for the contract.
64
+ * @example "2000000000000000000"
65
+ */
66
+ balance: string;
67
+ /** The monetary value of the balance, if a price is available for the token. */
68
+ balanceValue?: Money;
69
+ }
70
+ interface GetNativeBalanceResponse {
71
+ /** The native token balance for the address. */
72
+ nativeTokenBalance: NativeTokenBalance;
73
+ }
74
+ interface Erc20TokenBalance {
75
+ /**
76
+ * A wallet or contract address in mixed-case checksum encoding.
77
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
78
+ */
79
+ address: string;
80
+ /**
81
+ * The contract name.
82
+ * @example "Wrapped AVAX"
83
+ */
84
+ name: string;
85
+ /**
86
+ * The contract symbol.
87
+ * @example "WAVAX"
88
+ */
89
+ symbol: string;
90
+ /**
91
+ * The number of decimals the token uses. For example `6`,
92
+ * means to divide the token amount by `1000000` to get its user
93
+ * representation.
94
+ * @example 18
95
+ */
96
+ decimals: number;
97
+ /**
98
+ * The logo uri for the address.
99
+ * @example "https://glacier-api.avax.network/proxy/chain-assets/main/chains/43114/token-logo.png"
100
+ */
101
+ logoUri?: string;
102
+ ercType: 'ERC-20';
103
+ /** The token price, if available. */
104
+ price?: Money;
105
+ /**
106
+ * The evm chain id.
107
+ * @example "43114"
108
+ */
109
+ chainId: string;
110
+ /**
111
+ * The address balance for the token, in units specified by the
112
+ * `decimals` value for the contract.
113
+ * @example "2000000000000000000"
114
+ */
115
+ balance: string;
116
+ /** The monetary value of the balance, if a price is available for the token. */
117
+ balanceValue?: Money;
118
+ }
119
+ interface ListErc20BalancesResponse {
120
+ /** 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. */
121
+ nextPageToken?: string;
122
+ /** The list of ERC-20 token balances for the address. */
123
+ erc20TokenBalances: Erc20TokenBalance[];
124
+ }
125
+ declare enum NftTokenMetadataStatus {
126
+ UNKNOWN = "UNKNOWN",
127
+ MISSING_TOKEN = "MISSING_TOKEN",
128
+ INVALID_TOKEN_URI = "INVALID_TOKEN_URI",
129
+ INVALID_TOKEN_URI_SCHEME = "INVALID_TOKEN_URI_SCHEME",
130
+ UNREACHABLE_TOKEN_URI = "UNREACHABLE_TOKEN_URI",
131
+ THROTTLED_TOKEN_URI = "THROTTLED_TOKEN_URI",
132
+ METADATA_CONTENT_TOO_LARGE = "METADATA_CONTENT_TOO_LARGE",
133
+ INVALID_METADATA = "INVALID_METADATA",
134
+ INVALID_METADATA_JSON = "INVALID_METADATA_JSON",
135
+ INDEXED = "INDEXED",
136
+ UNINDEXED = "UNINDEXED"
137
+ }
138
+ interface Erc721TokenMetadata {
139
+ /**
140
+ * The metadata indexing status of the nft.
141
+ * @example "indexed"
142
+ */
143
+ indexStatus: NftTokenMetadataStatus;
144
+ metadataLastUpdatedTimestamp?: number;
145
+ name?: string;
146
+ symbol?: string;
147
+ imageUri?: string;
148
+ description?: string;
149
+ animationUri?: string;
150
+ externalUrl?: string;
151
+ background?: string;
152
+ attributes?: string;
153
+ }
154
+ interface Erc721TokenBalance {
155
+ /**
156
+ * A wallet or contract address in mixed-case checksum encoding.
157
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
158
+ */
159
+ address: string;
160
+ /**
161
+ * The contract name.
162
+ * @example "Wrapped AVAX"
163
+ */
164
+ name: string;
165
+ /**
166
+ * The contract symbol.
167
+ * @example "WAVAX"
168
+ */
169
+ symbol: string;
170
+ ercType: 'ERC-721';
171
+ tokenId: string;
172
+ tokenUri: string;
173
+ metadata: Erc721TokenMetadata;
174
+ /**
175
+ * The evm chain id.
176
+ * @example "43114"
177
+ */
178
+ chainId: string;
179
+ }
180
+ interface ListErc721BalancesResponse {
181
+ /** 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. */
182
+ nextPageToken?: string;
183
+ /** The list of ERC-721 token balances for the address. */
184
+ erc721TokenBalances: Erc721TokenBalance[];
185
+ }
186
+ interface Erc1155TokenMetadata {
187
+ /**
188
+ * The metadata indexing status of the nft.
189
+ * @example "indexed"
190
+ */
191
+ indexStatus: NftTokenMetadataStatus;
192
+ metadataLastUpdatedTimestamp?: number;
193
+ name?: string;
194
+ symbol?: string;
195
+ imageUri?: string;
196
+ description?: string;
197
+ animationUri?: string;
198
+ externalUrl?: string;
199
+ background?: string;
200
+ decimals?: number;
201
+ properties?: string;
202
+ }
203
+ interface Erc1155TokenBalance {
204
+ /**
205
+ * A wallet or contract address in mixed-case checksum encoding.
206
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
207
+ */
208
+ address: string;
209
+ ercType: 'ERC-1155';
210
+ tokenId: string;
211
+ tokenUri: string;
212
+ metadata: Erc1155TokenMetadata;
213
+ /**
214
+ * The evm chain id.
215
+ * @example "43114"
216
+ */
217
+ chainId: string;
218
+ /**
219
+ * The address balance for the token, in units specified by the
220
+ * `decimals` value for the contract.
221
+ * @example "2000000000000000000"
222
+ */
223
+ balance: string;
224
+ }
225
+ interface ListErc1155BalancesResponse {
226
+ /** 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. */
227
+ nextPageToken?: string;
228
+ /** The list of ERC-1155 token balances for the address. */
229
+ erc1155TokenBalances: Erc1155TokenBalance[];
230
+ }
231
+ interface ListCollectibleBalancesResponse {
232
+ /** 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. */
233
+ nextPageToken?: string;
234
+ /**
235
+ * The list of ERC-721 and ERC-1155 token balances for the
236
+ * address.
237
+ */
238
+ collectibleBalances: (Erc721TokenBalance | Erc1155TokenBalance)[];
239
+ }
240
+ interface GetBlockResponse {
241
+ /**
242
+ * The block number on the chain.
243
+ * @example "339"
244
+ */
245
+ blockNumber: string;
246
+ /**
247
+ * The block finality timestamp.
248
+ * @example 1648672486
249
+ */
250
+ blockTimestamp: number;
251
+ /**
252
+ * The block hash identifier.
253
+ * @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
254
+ */
255
+ blockHash: string;
256
+ /** The number of evm transactions in the block. */
257
+ txCount: number;
258
+ /** The number of atomic transactions in the block. */
259
+ atomicTxCount: number;
260
+ /** The base gas fee for a transaction to be included in the block. */
261
+ baseFee: string;
262
+ /** The gas used for transactions in the block. */
263
+ gasUsed: string;
264
+ /** The total gas limit set for transactions in the block. */
265
+ gasLimit: string;
266
+ gasCost: string;
267
+ /** The hash of the parent block. */
268
+ parentHash: string;
269
+ /** The amount of fees spent/burned for transactions in the block. */
270
+ feesSpent: string;
271
+ /** The cumulative number of transactions for the chain including this block. */
272
+ cumulativeTransactions: string;
273
+ }
274
+ interface ListBlocksResponse {
275
+ /** 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. */
276
+ nextPageToken?: string;
277
+ blocks: GetBlockResponse[];
278
+ }
279
+ interface RichAddress {
280
+ /**
281
+ * The contract name.
282
+ * @example "Wrapped AVAX"
283
+ */
284
+ name?: string;
285
+ /**
286
+ * The contract symbol.
287
+ * @example "WAVAX"
288
+ */
289
+ symbol?: string;
290
+ /**
291
+ * The number of decimals the token uses. For example `6`,
292
+ * means to divide the token amount by `1000000` to get its user
293
+ * representation.
294
+ * @example 18
295
+ */
296
+ decimals?: number;
297
+ /**
298
+ * The logo uri for the address.
299
+ * @example "https://glacier-api.avax.network/proxy/chain-assets/main/chains/43114/token-logo.png"
300
+ */
301
+ logoUri?: string;
302
+ /**
303
+ * A wallet or contract address in mixed-case checksum encoding.
304
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
305
+ */
306
+ address: string;
307
+ }
308
+ interface Erc20Token {
309
+ /**
310
+ * A wallet or contract address in mixed-case checksum encoding.
311
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
312
+ */
313
+ address: string;
314
+ /**
315
+ * The contract name.
316
+ * @example "Wrapped AVAX"
317
+ */
318
+ name: string;
319
+ /**
320
+ * The contract symbol.
321
+ * @example "WAVAX"
322
+ */
323
+ symbol: string;
324
+ /**
325
+ * The number of decimals the token uses. For example `6`,
326
+ * means to divide the token amount by `1000000` to get its user
327
+ * representation.
328
+ * @example 18
329
+ */
330
+ decimals: number;
331
+ /**
332
+ * The logo uri for the address.
333
+ * @example "https://glacier-api.avax.network/proxy/chain-assets/main/chains/43114/token-logo.png"
334
+ */
335
+ logoUri?: string;
336
+ ercType: 'ERC-20';
337
+ /** The token price, if available. */
338
+ price?: Money;
339
+ }
340
+ interface Erc20TransferDetails {
341
+ from: RichAddress;
342
+ to: RichAddress;
343
+ /** @example "10000000000000000000" */
344
+ value: string;
345
+ erc20Token: Erc20Token;
346
+ }
347
+ interface Erc721Token {
348
+ /**
349
+ * A wallet or contract address in mixed-case checksum encoding.
350
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
351
+ */
352
+ address: string;
353
+ /**
354
+ * The contract name.
355
+ * @example "Wrapped AVAX"
356
+ */
357
+ name: string;
358
+ /**
359
+ * The contract symbol.
360
+ * @example "WAVAX"
361
+ */
362
+ symbol: string;
363
+ ercType: 'ERC-721';
364
+ tokenId: string;
365
+ tokenUri: string;
366
+ metadata: Erc721TokenMetadata;
367
+ }
368
+ interface Erc721TransferDetails {
369
+ from: RichAddress;
370
+ to: RichAddress;
371
+ erc721Token: Erc721Token;
372
+ }
373
+ interface Erc1155Token {
374
+ /**
375
+ * A wallet or contract address in mixed-case checksum encoding.
376
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
377
+ */
378
+ address: string;
379
+ ercType: 'ERC-1155';
380
+ tokenId: string;
381
+ tokenUri: string;
382
+ metadata: Erc1155TokenMetadata;
383
+ }
384
+ interface Erc1155TransferDetails {
385
+ from: RichAddress;
386
+ to: RichAddress;
387
+ /** @example "10000000000000000000" */
388
+ value: string;
389
+ erc1155Token: Erc1155Token;
390
+ }
391
+ declare enum InternalTransactionOpCall {
392
+ UNKNOWN = "UNKNOWN",
393
+ CALL = "CALL",
394
+ CREATE = "CREATE",
395
+ CREATE2 = "CREATE2",
396
+ CALLCODE = "CALLCODE",
397
+ DELEGATECALL = "DELEGATECALL",
398
+ STATICCALL = "STATICCALL"
399
+ }
400
+ interface InternalTransactionDetails {
401
+ from: RichAddress;
402
+ to: RichAddress;
403
+ internalTxType: InternalTransactionOpCall;
404
+ /** @example "10000000000000000000" */
405
+ value: string;
406
+ /** True if the internal transaction was reverted. */
407
+ isReverted: boolean;
408
+ gasUsed: string;
409
+ gasLimit: string;
410
+ }
411
+ interface NetworkToken {
412
+ /**
413
+ * The contract name.
414
+ * @example "Wrapped AVAX"
415
+ */
416
+ name: string;
417
+ /**
418
+ * The contract symbol.
419
+ * @example "WAVAX"
420
+ */
421
+ symbol: string;
422
+ /**
423
+ * The number of decimals the token uses. For example `6`,
424
+ * means to divide the token amount by `1000000` to get its user
425
+ * representation.
426
+ * @example 18
427
+ */
428
+ decimals: number;
429
+ /**
430
+ * The logo uri for the address.
431
+ * @example "https://glacier-api.avax.network/proxy/chain-assets/main/chains/43114/token-logo.png"
432
+ */
433
+ logoUri?: string;
434
+ description?: string;
435
+ }
436
+ interface NetworkTokenDetails {
437
+ networkToken: NetworkToken;
438
+ /** The current token price, if available. */
439
+ currentPrice?: Money;
440
+ /**
441
+ * The historical token price at the time the transaction
442
+ * occured, if available. Note, this is only provided if the transaction
443
+ * occured more than 24 hours ago.
444
+ */
445
+ historicalPrice?: Money;
446
+ }
447
+ declare enum TransactionMethodType {
448
+ NATIVE_TRANSFER = "NATIVE_TRANSFER",
449
+ CONTRACT_CALL = "CONTRACT_CALL",
450
+ CONTRACT_CREATION = "CONTRACT_CREATION"
451
+ }
452
+ interface Method {
453
+ /**
454
+ * The contract call type.
455
+ * NATIVE_TRANSFER indicates a transfer of the
456
+ * native token without any smart-contract interaction.
457
+ * CONTRACT_CALL indicates a smart-contract
458
+ * interaction.
459
+ * CONTRACT_CREATION indicates a smart-contract
460
+ * creation.
461
+ * @example "CONTRACT_CALL"
462
+ */
463
+ callType: TransactionMethodType;
464
+ /**
465
+ * The contract method hash identifier. The method hash is only set if the `callType` is `CONTRACT_CALL`.
466
+ * @example "0xa9059cbb"
467
+ */
468
+ methodHash: string;
469
+ /**
470
+ * The contract method name including parameter types. If the `callType` is `NATIVE_TRANSFER` this is set to 'Native Transfer'. If the `callType` is `CONTRACT_CREATION` this is set to 'Contract Created'.
471
+ * @example "transfer(address,uint256)"
472
+ */
473
+ methodName?: string;
474
+ }
475
+ interface FullNativeTransactionDetails {
476
+ /**
477
+ * The block number on the chain.
478
+ * @example "339"
479
+ */
480
+ blockNumber: string;
481
+ /**
482
+ * The block finality timestamp.
483
+ * @example 1648672486
484
+ */
485
+ blockTimestamp: number;
486
+ /**
487
+ * The block hash identifier.
488
+ * @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
489
+ */
490
+ blockHash: string;
491
+ /**
492
+ * The index at which the transaction occured in the block (0-indexed).
493
+ * @example 0
494
+ */
495
+ blockIndex: number;
496
+ /**
497
+ * The transaction hash identifier.
498
+ * @example "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
499
+ */
500
+ txHash: string;
501
+ /**
502
+ * The transaction status, which is either 0 (failed) or 1 (successful).
503
+ * @example "1"
504
+ */
505
+ txStatus: string;
506
+ /**
507
+ * The transaction type.
508
+ * @example 1
509
+ */
510
+ txType: number;
511
+ /**
512
+ * The gas limit set for the transaction.
513
+ * @example "51373"
514
+ */
515
+ gasLimit: string;
516
+ /**
517
+ * The amount of gas used.
518
+ * @example "51373"
519
+ */
520
+ gasUsed: string;
521
+ /**
522
+ * The gas price denominated by the number of decimals of the native token.
523
+ * @example "470000000000"
524
+ */
525
+ gasPrice: string;
526
+ /**
527
+ * The nonce used by the sender of the transaction.
528
+ * @example "1"
529
+ */
530
+ nonce: string;
531
+ from: RichAddress;
532
+ to: RichAddress;
533
+ method?: Method;
534
+ /** @example "10000000000000000000" */
535
+ value: string;
536
+ /** The data sent for the transaction. */
537
+ input: string;
538
+ baseFeePerGas: string;
539
+ maxFeePerGas?: string;
540
+ maxPriorityFeePerGas?: string;
541
+ }
542
+ interface GetTransactionResponse {
543
+ /** The list of ERC-20 transfers. */
544
+ erc20Transfers?: Erc20TransferDetails[];
545
+ /** The list of ERC-721 transfers. */
546
+ erc721Transfers?: Erc721TransferDetails[];
547
+ /** The list of ERC-1155 transfers. */
548
+ erc1155Transfers?: Erc1155TransferDetails[];
549
+ /**
550
+ * The list of internal transactions. Note that this list only
551
+ * includes CALL and
552
+ * CALLCODE internal transactions that had a
553
+ * non-zero value and
554
+ * CREATE/CREATE2
555
+ * calls. Use a client provider to recieve a full debug trace of the
556
+ * transaction.
557
+ */
558
+ internalTransactions?: InternalTransactionDetails[];
559
+ networkTokenDetails: NetworkTokenDetails;
560
+ nativeTransaction: FullNativeTransactionDetails;
561
+ }
562
+ declare enum ContractType {
563
+ ERC20 = "ERC-20",
564
+ ERC721 = "ERC-721",
565
+ Other = "Other"
566
+ }
567
+ declare enum AssetType {
568
+ FixedCap = "Fixed Cap",
569
+ UnlimitedCap = "Unlimited Cap",
570
+ Stablecoin = "Stablecoin",
571
+ NFT = "NFT"
572
+ }
573
+ declare enum ResourceLinkType {
574
+ Twitter = "Twitter",
575
+ Facebook = "Facebook",
576
+ Discord = "Discord",
577
+ Telegram = "Telegram",
578
+ Blog = "Blog",
579
+ Medium = "Medium",
580
+ Whitepaper = "Whitepaper",
581
+ CoinGecko = "CoinGecko",
582
+ CoinMarketCap = "CoinMarketCap",
583
+ LinkedIn = "LinkedIn",
584
+ Reddit = "Reddit",
585
+ Support = "Support",
586
+ Github = "Github",
587
+ Documentation = "Documentation"
588
+ }
589
+ interface ResourceLink {
590
+ type: ResourceLinkType;
591
+ url: string;
592
+ }
593
+ declare enum ReviewStatus {
594
+ Pending = "Pending",
595
+ Approved = "Approved"
596
+ }
597
+ interface GetContractInformationResponse {
598
+ /**
599
+ * A wallet or contract address in mixed-case checksum encoding.
600
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
601
+ */
602
+ address: string;
603
+ description?: string;
604
+ /**
605
+ * The contract name.
606
+ * @example "Wrapped AVAX"
607
+ */
608
+ name?: string;
609
+ /**
610
+ * The contract symbol.
611
+ * @example "WAVAX"
612
+ */
613
+ symbol?: string;
614
+ contractType: ContractType;
615
+ assetType?: AssetType;
616
+ officialSite?: string;
617
+ /** Any labels given to the contract. */
618
+ tags?: any[][];
619
+ email?: string;
620
+ /**
621
+ * The evm chain id.
622
+ * @example "43114"
623
+ */
624
+ chainId: number;
625
+ /**
626
+ * The number of decimals the token uses. For example `6`,
627
+ * means to divide the token amount by `1000000` to get its user
628
+ * representation.
629
+ * @example 18
630
+ */
631
+ decimals?: number;
632
+ /**
633
+ * The logo uri for the address.
634
+ * @example "https://glacier-api.avax.network/proxy/chain-assets/main/chains/43114/token-logo.png"
635
+ */
636
+ logoUri?: string;
637
+ /**
638
+ * The hex color code assigned to the token.
639
+ * @example "#d6db60"
640
+ */
641
+ tokenColor?: string;
642
+ /** Array of resource links. */
643
+ resourceLinks?: ResourceLink[];
644
+ /**
645
+ * Status of contract information submission. All submitted
646
+ * contracts will be reviewed for approval before being inserted into the
647
+ * Glacier repository.
648
+ */
649
+ reviewStatus: ReviewStatus;
650
+ }
651
+ interface Erc20Transfer {
652
+ /**
653
+ * The block number on the chain.
654
+ * @example "339"
655
+ */
656
+ blockNumber: string;
657
+ /**
658
+ * The block finality timestamp.
659
+ * @example 1648672486
660
+ */
661
+ blockTimestamp: number;
662
+ /**
663
+ * The block hash identifier.
664
+ * @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
665
+ */
666
+ blockHash: string;
667
+ /**
668
+ * The transaction hash identifier.
669
+ * @example "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
670
+ */
671
+ txHash: string;
672
+ from: RichAddress;
673
+ to: RichAddress;
674
+ /** @example "10000000000000000000" */
675
+ value: string;
676
+ erc20Token: Erc20Token;
677
+ }
678
+ interface Erc721Transfer {
679
+ /**
680
+ * The block number on the chain.
681
+ * @example "339"
682
+ */
683
+ blockNumber: string;
684
+ /**
685
+ * The block finality timestamp.
686
+ * @example 1648672486
687
+ */
688
+ blockTimestamp: number;
689
+ /**
690
+ * The block hash identifier.
691
+ * @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
692
+ */
693
+ blockHash: string;
694
+ /**
695
+ * The transaction hash identifier.
696
+ * @example "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
697
+ */
698
+ txHash: string;
699
+ from: RichAddress;
700
+ to: RichAddress;
701
+ erc721Token: Erc721Token;
702
+ }
703
+ interface Erc1155Transfer {
704
+ /**
705
+ * The block number on the chain.
706
+ * @example "339"
707
+ */
708
+ blockNumber: string;
709
+ /**
710
+ * The block finality timestamp.
711
+ * @example 1648672486
712
+ */
713
+ blockTimestamp: number;
714
+ /**
715
+ * The block hash identifier.
716
+ * @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
717
+ */
718
+ blockHash: string;
719
+ /**
720
+ * The transaction hash identifier.
721
+ * @example "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
722
+ */
723
+ txHash: string;
724
+ from: RichAddress;
725
+ to: RichAddress;
726
+ /** @example "10000000000000000000" */
727
+ value: string;
728
+ erc1155Token: Erc1155Token;
729
+ }
730
+ interface ListTransfersResponse {
731
+ /** 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. */
732
+ nextPageToken?: string;
733
+ transfers: Erc20Transfer[] | Erc721Transfer[] | Erc1155Transfer[];
734
+ }
735
+ interface NativeTransaction {
736
+ /**
737
+ * The block number on the chain.
738
+ * @example "339"
739
+ */
740
+ blockNumber: string;
741
+ /**
742
+ * The block finality timestamp.
743
+ * @example 1648672486
744
+ */
745
+ blockTimestamp: number;
746
+ /**
747
+ * The block hash identifier.
748
+ * @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
749
+ */
750
+ blockHash: string;
751
+ /**
752
+ * The index at which the transaction occured in the block (0-indexed).
753
+ * @example 0
754
+ */
755
+ blockIndex: number;
756
+ /**
757
+ * The transaction hash identifier.
758
+ * @example "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
759
+ */
760
+ txHash: string;
761
+ /**
762
+ * The transaction status, which is either 0 (failed) or 1 (successful).
763
+ * @example "1"
764
+ */
765
+ txStatus: string;
766
+ /**
767
+ * The transaction type.
768
+ * @example 1
769
+ */
770
+ txType: number;
771
+ /**
772
+ * The gas limit set for the transaction.
773
+ * @example "51373"
774
+ */
775
+ gasLimit: string;
776
+ /**
777
+ * The amount of gas used.
778
+ * @example "51373"
779
+ */
780
+ gasUsed: string;
781
+ /**
782
+ * The gas price denominated by the number of decimals of the native token.
783
+ * @example "470000000000"
784
+ */
785
+ gasPrice: string;
786
+ /**
787
+ * The nonce used by the sender of the transaction.
788
+ * @example "1"
789
+ */
790
+ nonce: string;
791
+ from: RichAddress;
792
+ to: RichAddress;
793
+ method?: Method;
794
+ /** @example "10000000000000000000" */
795
+ value: string;
796
+ }
797
+ interface TransactionDetails {
798
+ /** The native (top-level) transaction details. */
799
+ nativeTransaction: NativeTransaction;
800
+ /** The list of ERC-20 transfers. */
801
+ erc20Transfers?: Erc20TransferDetails[];
802
+ /** The list of ERC-721 transfers. */
803
+ erc721Transfers?: Erc721TransferDetails[];
804
+ /** The list of ERC-1155 transfers. */
805
+ erc1155Transfers?: Erc1155TransferDetails[];
806
+ /**
807
+ * The list of internal transactions. Note that this list only
808
+ * includes CALL and
809
+ * CALLCODE internal transactions that had a
810
+ * non-zero value and
811
+ * CREATE/CREATE2
812
+ * calls. Use a client provider to recieve a full debug trace of the
813
+ * transaction.
814
+ */
815
+ internalTransactions?: InternalTransactionDetails[];
816
+ }
817
+ interface ListTransactionDetailsResponse {
818
+ /** 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. */
819
+ nextPageToken?: string;
820
+ transactions: TransactionDetails[];
821
+ }
822
+ interface ListNativeTransactionsResponse {
823
+ /** 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. */
824
+ nextPageToken?: string;
825
+ transactions: NativeTransaction[];
826
+ }
827
+ interface ListErc20TransactionsResponse {
828
+ /** 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. */
829
+ nextPageToken?: string;
830
+ transactions: Erc20Transfer[];
831
+ }
832
+ interface ListErc721TransactionsResponse {
833
+ /** 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. */
834
+ nextPageToken?: string;
835
+ transactions: Erc721Transfer[];
836
+ }
837
+ interface ListErc1155TransactionsResponse {
838
+ /** 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. */
839
+ nextPageToken?: string;
840
+ transactions: Erc1155Transfer[];
841
+ }
842
+ interface InternalTransaction {
843
+ /**
844
+ * The block number on the chain.
845
+ * @example "339"
846
+ */
847
+ blockNumber: string;
848
+ /**
849
+ * The block finality timestamp.
850
+ * @example 1648672486
851
+ */
852
+ blockTimestamp: number;
853
+ /**
854
+ * The block hash identifier.
855
+ * @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
856
+ */
857
+ blockHash: string;
858
+ /**
859
+ * The transaction hash identifier.
860
+ * @example "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
861
+ */
862
+ txHash: string;
863
+ from: RichAddress;
864
+ to: RichAddress;
865
+ internalTxType: InternalTransactionOpCall;
866
+ /** @example "10000000000000000000" */
867
+ value: string;
868
+ /** True if the internal transaction was reverted. */
869
+ isReverted: boolean;
870
+ gasUsed: string;
871
+ gasLimit: string;
872
+ }
873
+ interface ListInternalTransactionsResponse {
874
+ /** 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. */
875
+ nextPageToken?: string;
876
+ transactions: InternalTransaction[];
877
+ }
878
+ declare enum TransactionStatus {
879
+ Failed = "failed",
880
+ Success = "success"
881
+ }
882
+ declare enum VmName {
883
+ EVM = "EVM",
884
+ BITCOIN = "BITCOIN",
885
+ ETHEREUM = "ETHEREUM"
886
+ }
887
+ interface UtilityAddresses {
888
+ multicall?: string;
889
+ }
890
+ interface ChainInfo {
891
+ chainId: string;
892
+ chainName: string;
893
+ description: string;
894
+ platformChainId?: string;
895
+ subnetId?: string;
896
+ vmId?: string;
897
+ vmName: VmName;
898
+ explorerUrl?: string;
899
+ rpcUrl: string;
900
+ wsUrl?: string;
901
+ isTestnet: boolean;
902
+ utilityAddresses?: UtilityAddresses;
903
+ networkToken: NetworkToken;
904
+ chainLogoUri?: string;
905
+ }
906
+ interface ListChainsResponse {
907
+ chains: ChainInfo[];
908
+ }
909
+ interface GetChainResponse {
910
+ chainId: string;
911
+ chainName: string;
912
+ description: string;
913
+ platformChainId?: string;
914
+ subnetId?: string;
915
+ vmId?: string;
916
+ vmName: VmName;
917
+ explorerUrl?: string;
918
+ rpcUrl: string;
919
+ wsUrl?: string;
920
+ isTestnet: boolean;
921
+ utilityAddresses?: UtilityAddresses;
922
+ networkToken: NetworkToken;
923
+ chainLogoUri?: string;
924
+ }
925
+ declare enum BlockchainId {
926
+ Value11111111111111111111111111111111LpoYY = "11111111111111111111111111111111LpoYY",
927
+ Value2OYMBNV4ENHyqk2FjjV5NVQLDbtmNJzq5S3Qs3Lo6FtnC6FByM = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM"
928
+ }
929
+ declare enum Network {
930
+ Mainnet = "mainnet",
931
+ Fuji = "fuji"
932
+ }
933
+ interface PChainConsumedUtxo {
934
+ addresses: string[];
935
+ amount: string;
936
+ assetId: string;
937
+ utxoId: string;
938
+ fromTx: string;
939
+ }
940
+ interface PChainEmittedUtxo {
941
+ addresses: string[];
942
+ amount: string;
943
+ assetId: string;
944
+ utxoId: string;
945
+ staked: boolean;
946
+ /** This field is only present if the UTXO has been consumed by another transaction. */
947
+ toTx?: string;
948
+ }
949
+ interface PChainAsset {
950
+ assetId: string;
951
+ amount: string;
952
+ }
953
+ interface GetPChainTransactionResponse {
954
+ /**
955
+ * A P-Chain transaction hash.
956
+ * @example "3P91K6nuDFvDodcRuJTsgdf9SvYe5pMiKk38HppsoeAiEztCP"
957
+ */
958
+ txHash: string;
959
+ txType: string;
960
+ /**
961
+ * The block finality timestamp.
962
+ * @example 1648672486
963
+ */
964
+ blockTimestamp: number;
965
+ blockNumber: string;
966
+ blockHash: string;
967
+ /**
968
+ * A list of objects containing consumed UTXO info pertaining to a given transaction.
969
+ * @example [{"fromTx":"2PcqHRFugJdjDApByTFFUaNpKkjPnUa4QKX4pzgZWJwcVwQWaC","addresses":["avax19wf84mm09uxld37v6sgky6l7028pr092l0g6tv"],"amount":"22500000000000","assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","utxoId":"17zW4hNQ3SWW7jvq2mv4ausNZN8Zt6MiaTALDcDkydrDsyPod"}]
970
+ */
971
+ consumedUtxos?: PChainConsumedUtxo[];
972
+ /**
973
+ * A list of objects containing emitted UTXO info pertaining to a given transaction.
974
+ * @example [{"toTx":"2PcqHRFugJdjDApByTFFUaNpKkjPnUa4QKX4pzgZWJwcVwQWaC","addresses":["avax19wf84mm09uxld37v6sgky6l7028pr092l0g6tv"],"amount":"22500000000000","assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","utxoId":"17zW4hNQ3SWW7jvq2mv4ausNZN8Zt6MiaTALDcDkydrDsyPod"}]
975
+ */
976
+ emittedUtxos?: PChainEmittedUtxo[];
977
+ /**
978
+ * A list of objects containing Asset ID and the amount of that Asset ID.
979
+ * @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
980
+ */
981
+ value?: PChainAsset[];
982
+ /**
983
+ * A list of objects containing Asset ID and the amount of that Asset ID.
984
+ * @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
985
+ */
986
+ amountBurned?: PChainAsset[];
987
+ /**
988
+ * A list of objects containing Asset ID and the amount of that Asset ID.
989
+ * @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
990
+ */
991
+ amountStaked?: PChainAsset[];
992
+ startTimestamp?: number;
993
+ endTimestamp?: number;
994
+ delegationFeePercent?: string;
995
+ nodeId?: string;
996
+ subnetId?: string;
997
+ estimatedReward?: string;
998
+ }
999
+ declare enum SortOrder {
1000
+ Asc = "asc",
1001
+ Desc = "desc"
1002
+ }
1003
+ interface PChainTransaction {
1004
+ /**
1005
+ * A P-Chain transaction hash.
1006
+ * @example "3P91K6nuDFvDodcRuJTsgdf9SvYe5pMiKk38HppsoeAiEztCP"
1007
+ */
1008
+ txHash: string;
1009
+ txType: string;
1010
+ /**
1011
+ * The block finality timestamp.
1012
+ * @example 1648672486
1013
+ */
1014
+ blockTimestamp: number;
1015
+ blockNumber: string;
1016
+ blockHash: string;
1017
+ /**
1018
+ * A list of objects containing consumed UTXO info pertaining to a given transaction.
1019
+ * @example [{"fromTx":"2PcqHRFugJdjDApByTFFUaNpKkjPnUa4QKX4pzgZWJwcVwQWaC","addresses":["avax19wf84mm09uxld37v6sgky6l7028pr092l0g6tv"],"amount":"22500000000000","assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","utxoId":"17zW4hNQ3SWW7jvq2mv4ausNZN8Zt6MiaTALDcDkydrDsyPod"}]
1020
+ */
1021
+ consumedUtxos?: PChainConsumedUtxo[];
1022
+ /**
1023
+ * A list of objects containing emitted UTXO info pertaining to a given transaction.
1024
+ * @example [{"toTx":"2PcqHRFugJdjDApByTFFUaNpKkjPnUa4QKX4pzgZWJwcVwQWaC","addresses":["avax19wf84mm09uxld37v6sgky6l7028pr092l0g6tv"],"amount":"22500000000000","assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","utxoId":"17zW4hNQ3SWW7jvq2mv4ausNZN8Zt6MiaTALDcDkydrDsyPod"}]
1025
+ */
1026
+ emittedUtxos?: PChainEmittedUtxo[];
1027
+ /**
1028
+ * A list of objects containing Asset ID and the amount of that Asset ID.
1029
+ * @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
1030
+ */
1031
+ value?: PChainAsset[];
1032
+ /**
1033
+ * A list of objects containing Asset ID and the amount of that Asset ID.
1034
+ * @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
1035
+ */
1036
+ amountBurned?: PChainAsset[];
1037
+ /**
1038
+ * A list of objects containing Asset ID and the amount of that Asset ID.
1039
+ * @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
1040
+ */
1041
+ amountStaked?: PChainAsset[];
1042
+ startTimestamp?: number;
1043
+ endTimestamp?: number;
1044
+ delegationFeePercent?: string;
1045
+ nodeId?: string;
1046
+ subnetId?: string;
1047
+ estimatedReward?: string;
1048
+ }
1049
+ interface ListPChainTransactionsResponse {
1050
+ /** 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. */
1051
+ nextPageToken?: string;
1052
+ transactions: PChainTransaction[];
1053
+ }
1054
+ interface PChainUtxo {
1055
+ /**
1056
+ * An array of P-Chain wallet addresses.
1057
+ * @example ["avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg"]
1058
+ */
1059
+ addresses: string[];
1060
+ utxoId: string;
1061
+ txHash: string;
1062
+ outputIndex: number;
1063
+ blockTimestamp: number;
1064
+ consumingTxHash?: string;
1065
+ consumingBlockTimestamp?: number;
1066
+ assetId: string;
1067
+ utxoType: string;
1068
+ amount: string;
1069
+ stakeableLocktime?: number;
1070
+ platformLocktime?: number;
1071
+ threshold?: number;
1072
+ }
1073
+ interface ListPChainUtxosResponse {
1074
+ /** 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. */
1075
+ nextPageToken?: string;
1076
+ utxos: PChainUtxo[];
1077
+ }
1078
+ interface PChainBalance {
1079
+ /**
1080
+ * A list of objects containing Asset ID and the amount of that Asset ID.
1081
+ * @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
1082
+ */
1083
+ unlockedUnstaked?: PChainAsset[];
1084
+ /**
1085
+ * A list of objects containing Asset ID and the amount of that Asset ID.
1086
+ * @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
1087
+ */
1088
+ unlockedStaked?: PChainAsset[];
1089
+ /**
1090
+ * A list of objects containing Asset ID and the amount of that Asset ID.
1091
+ * @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
1092
+ */
1093
+ lockedUnstaked?: PChainAsset[];
1094
+ /**
1095
+ * A list of objects containing Asset ID and the amount of that Asset ID.
1096
+ * @example [{"assetId":"FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z","amount":"100000000"}]
1097
+ */
1098
+ lockedStaked?: PChainAsset[];
1099
+ }
1100
+ interface ListPChainBalancesResponse {
1101
+ balances: PChainBalance;
1102
+ }
1103
+ interface ProposerDetails {
1104
+ proposerId?: string;
1105
+ proposerParentId?: string;
1106
+ proposerNodeId?: string;
1107
+ proposerPChainHeight?: number;
1108
+ proposerTimestamp?: number;
1109
+ }
1110
+ interface GetPChainBlockResponse {
1111
+ blockNumber: string;
1112
+ blockHash: string;
1113
+ parentHash: string;
1114
+ blockTimestamp: number;
1115
+ blockType: string;
1116
+ txCount: number;
1117
+ transactions?: string[];
1118
+ blockSizeBytes: number;
1119
+ proposerDetails?: ProposerDetails;
1120
+ }
1121
+ interface PChainBlock {
1122
+ blockNumber: string;
1123
+ blockHash: string;
1124
+ parentHash: string;
1125
+ blockTimestamp: number;
1126
+ blockType: string;
1127
+ txCount: number;
1128
+ transactions?: string[];
1129
+ blockSizeBytes: number;
1130
+ proposerDetails?: ProposerDetails;
1131
+ }
1132
+ interface ListPChainBlocksResponse {
1133
+ /** 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. */
1134
+ nextPageToken?: string;
1135
+ blocks: PChainBlock[];
1136
+ }
1137
+ interface XChainVertex {
1138
+ vertexHash: string;
1139
+ parents: string[];
1140
+ vertexHeight: number;
1141
+ vertexIndex: number;
1142
+ blockchainId: string;
1143
+ networkId: number;
1144
+ vertexTimestamp: number;
1145
+ txCount: number;
1146
+ transactions: string[];
1147
+ vertexSize: number;
1148
+ }
1149
+ interface ListXChainVerticesResponse {
1150
+ /** 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. */
1151
+ nextPageToken?: string;
1152
+ vertices: XChainVertex[];
1153
+ }
1154
+ interface ChainAddressChainIdMap {
1155
+ address: string;
1156
+ blockchainIds: BlockchainId;
1157
+ }
1158
+ interface ChainAddressChainIdMapListResponse {
1159
+ addresses: ChainAddressChainIdMap[];
1160
+ }
1161
+ declare enum ErcType {
1162
+ ERC20 = "ERC-20",
1163
+ ERC721 = "ERC-721",
1164
+ ERC1155 = "ERC-1155"
1165
+ }
1166
+ interface NftCollection {
1167
+ /**
1168
+ * A wallet or contract address in mixed-case checksum encoding.
1169
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
1170
+ */
1171
+ address: string;
1172
+ /**
1173
+ * The contract name.
1174
+ * @example "Wrapped AVAX"
1175
+ */
1176
+ name: string;
1177
+ /**
1178
+ * The contract symbol.
1179
+ * @example "WAVAX"
1180
+ */
1181
+ symbol: string;
1182
+ ercType: ErcType;
1183
+ bannerUri?: string;
1184
+ logoUri?: string;
1185
+ description?: string;
1186
+ }
1187
+ declare enum SortByOption {
1188
+ LastEventTimestamp = "lastEventTimestamp"
1189
+ }
1190
+ interface Address {
1191
+ /**
1192
+ * A wallet or contract address in mixed-case checksum encoding.
1193
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
1194
+ */
1195
+ address: string;
1196
+ }
1197
+ declare enum ListingType {
1198
+ SALE = "SALE",
1199
+ AUCTION = "AUCTION"
1200
+ }
1201
+ declare enum ListingCurrencyType {
1202
+ NATIVE = "NATIVE",
1203
+ ERC20 = "ERC20"
1204
+ }
1205
+ interface TokenWithPrice {
1206
+ /**
1207
+ * A wallet or contract address in mixed-case checksum encoding.
1208
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
1209
+ */
1210
+ address?: string;
1211
+ /**
1212
+ * The contract name.
1213
+ * @example "Wrapped AVAX"
1214
+ */
1215
+ name: string;
1216
+ /**
1217
+ * The contract symbol.
1218
+ * @example "WAVAX"
1219
+ */
1220
+ symbol: string;
1221
+ /**
1222
+ * The number of decimals the token uses. For example `6`,
1223
+ * means to divide the token amount by `1000000` to get its user
1224
+ * representation.
1225
+ * @example 18
1226
+ */
1227
+ decimals: number;
1228
+ /** The token price, if available. */
1229
+ price?: Money;
1230
+ }
1231
+ interface OpenListingEventResponse {
1232
+ eventTimestamp: number;
1233
+ listingType: ListingType;
1234
+ listingPrice?: string;
1235
+ listingCurrencyType: ListingCurrencyType;
1236
+ listingCurrencyInfo: TokenWithPrice;
1237
+ sellerAddress: Address;
1238
+ startingPrice?: string;
1239
+ auctionCloseTimestamp?: number;
1240
+ }
1241
+ interface CancelListingEventResponse {
1242
+ eventTimestamp: number;
1243
+ }
1244
+ interface PurchaseListingEventResponse {
1245
+ eventTimestamp: number;
1246
+ listingPrice: string;
1247
+ listingCurrencyType: ListingCurrencyType;
1248
+ listingCurrencyInfo: TokenWithPrice;
1249
+ sellerAddress: Address;
1250
+ salePrice: string;
1251
+ buyerAddress: Address;
1252
+ saleTimestamp: number;
1253
+ purchaseTxHash?: string;
1254
+ }
1255
+ interface CloseAuctionEventResponse {
1256
+ eventTimestamp: number;
1257
+ purchaseTxHash?: string;
1258
+ }
1259
+ interface ListingResponse {
1260
+ marketplaceName: string;
1261
+ chainId: string;
1262
+ collectionAddress: Address;
1263
+ nftTokenId: string;
1264
+ listingId: string;
1265
+ openListingEvents?: OpenListingEventResponse[];
1266
+ cancelListingEvents?: CancelListingEventResponse[];
1267
+ purchaseListingEvents?: PurchaseListingEventResponse[];
1268
+ closeAuctionEvents?: CloseAuctionEventResponse[];
1269
+ }
1270
+ interface ListListingsResponse {
1271
+ /** 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. */
1272
+ nextPageToken?: string;
1273
+ listings: ListingResponse[];
1274
+ }
1275
+ declare enum ListingEventType {
1276
+ OPEN_LISTING = "OPEN_LISTING",
1277
+ CANCEL_LISTING = "CANCEL_LISTING",
1278
+ PURCHASE_LISTING = "PURCHASE_LISTING",
1279
+ CLOSE_AUCTION = "CLOSE_AUCTION"
1280
+ }
1281
+ declare enum TrendingTimeframe {
1282
+ Day = "day",
1283
+ Week = "week",
1284
+ Month = "month"
1285
+ }
1286
+ interface ListingMetricsResponse {
1287
+ listingCurrencyType: ListingCurrencyType;
1288
+ /**
1289
+ * A wallet or contract address in mixed-case checksum encoding.
1290
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
1291
+ */
1292
+ listingCurrencyAddress?: string;
1293
+ /** The number of sales between (now) & (now - timeframe) */
1294
+ salesInTimeframe: number;
1295
+ /** The number of sales between (now - timeframe) & (now - (2 * timeframe)) */
1296
+ salesInPreviousTimeframe: number;
1297
+ /** The total value of sales between (now) & (now - timeframe) */
1298
+ totalValueInTimeframe: string;
1299
+ /** The total value of sales between (now - timeframe) & (now - (2 * timeframe)) */
1300
+ totalValueInPreviousTimeframe: string;
1301
+ /** The average sale price for sales between (now) & (now - timeframe) */
1302
+ averagePriceInTimeframe: string;
1303
+ /** The average sale price for sales between (now - timeframe) & (now - (2 * timeframe)) */
1304
+ averagePriceInPreviousTimeframe: string;
1305
+ }
1306
+ interface ListingMetricsMap {
1307
+ /**
1308
+ * A wallet or contract address in mixed-case checksum encoding.
1309
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
1310
+ */
1311
+ collectionAddress: string;
1312
+ metrics: ListingMetricsResponse[];
1313
+ }
1314
+ interface ListListingMetricsResponse {
1315
+ /** 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. */
1316
+ nextPageToken?: string;
1317
+ collections: ListingMetricsMap[];
1318
+ }
1319
+ interface PaginationParams {
1320
+ /**
1321
+ * The maximum number of items to return.
1322
+ * @min 1
1323
+ * @max 100
1324
+ * @default 10
1325
+ */
1326
+ pageSize?: number;
1327
+ /**
1328
+ * A page token, received from a previous list call.
1329
+ * Provide this to retrieve the subsequent page.
1330
+ */
1331
+ pageToken?: string;
1332
+ }
1333
+ declare enum NftSearchResultTypeOption {
1334
+ Token = "token",
1335
+ Collection = "collection"
1336
+ }
1337
+ interface NftFilterOptionsProperty {
1338
+ /**
1339
+ * Filters search results by collection or token.
1340
+ * @example "token"
1341
+ */
1342
+ resultType: NftSearchResultTypeOption;
1343
+ }
1344
+ interface NftSearchBody {
1345
+ searchQuery: string;
1346
+ paginationParams?: PaginationParams;
1347
+ filterOptions: NftFilterOptionsProperty;
1348
+ }
1349
+ type OperationRequestBody = object;
1350
+ type OperationInfoResponse = object;
1351
+ type OperationResultResponse = object;
1352
+
1353
+ interface HealthStatusCheck {
1354
+ status?: string;
1355
+ info?: Record<string, {
1356
+ status?: string;
1357
+ }>;
1358
+ error?: Record<string, {
1359
+ status?: string;
1360
+ }>;
1361
+ details?: Record<string, {
1362
+ status?: string;
1363
+ }>;
1364
+ }
1365
+
1366
+ declare class GlacierClient {
1367
+ private baseUrl;
1368
+ private version;
1369
+ private httpOptions?;
1370
+ private httpClient;
1371
+ constructor(baseUrl: string, version?: string, httpOptions?: HttpOptions | undefined);
1372
+ /**
1373
+ *
1374
+ * @name HealthCheck
1375
+ * @summary Get the health of the service.
1376
+ * @request GET:/${version}/health-check
1377
+ * @response `200` `{ status?: string, info?: Record<string, { status?: string }>, error?: Record<string, { status?: string }>, details?: Record<string, { status?: string }> }` The Health Check is successful
1378
+ * @response `503` `{ status?: string, info?: Record<string, { status?: string }>, error?: Record<string, { status?: string }>, details?: Record<string, { status?: string }> }` The Health Check is not successful
1379
+ */
1380
+ healthCheck(params?: Record<string, any>, customOptions?: HttpOptions): Promise<HealthStatusCheck>;
1381
+ /**
1382
+ * No description
1383
+ *
1384
+ * @name GetNativeBalance
1385
+ * @summary Get native token balance of a wallet address for a given chain.
1386
+ * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:getNative
1387
+ * @response `200` `NativeBalanceDto`
1388
+ */
1389
+ getNativeBalance(chainId: string, address: string, query?: {
1390
+ currency?: CurrencyCode;
1391
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<GetNativeBalanceResponse>;
1392
+ /**
1393
+ *
1394
+ * @name ListErc20Balances
1395
+ * @summary Get erc-20 token balances of a wallet address for a given chain.
1396
+ * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:listErc20
1397
+ * @response `200` `Erc20BalancesDto`
1398
+ */
1399
+ listErc20Balances(chainId: string, address: string, query?: {
1400
+ pageSize?: number;
1401
+ pageToken?: string;
1402
+ currency?: CurrencyCode;
1403
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListErc20BalancesResponse>;
1404
+ /**
1405
+ * No description
1406
+ *
1407
+ * @name ListErc721Balances
1408
+ * @summary Get erc-721 token balances of a wallet address for a given chain.
1409
+ * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:listErc721
1410
+ * @response `200` `Erc721BalancesDto`
1411
+ */
1412
+ listErc721Balances(chainId: string, address: string, query?: {
1413
+ pageSize?: number;
1414
+ pageToken?: string;
1415
+ currency?: CurrencyCode;
1416
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListErc721BalancesResponse>;
1417
+ /**
1418
+ * @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.
1419
+ *
1420
+ * @name ListTransactions
1421
+ * @summary Gets a list of transactions for a wallet address and chain.
1422
+ * @request GET:/v1/chains/{chainId}/addresses/{address}/transactions
1423
+ * @response `200` `ListTransactionDetailsDto`
1424
+ */
1425
+ listTransactions(chainId: string, address: string, query?: {
1426
+ pageSize?: number;
1427
+ pageToken?: string;
1428
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListTransactionDetailsResponse>;
1429
+ /**
1430
+ *
1431
+ * @name GetTransaction
1432
+ * @summary Gets the details of a single transaction.
1433
+ * @request GET:/v1/chains/{chainId}/transactions/{txHash}
1434
+ * @response `200` `TransactionDetailsDto`
1435
+ */
1436
+ getTransaction(chainId: string, txHash: string, params?: Record<string, any>, customOptions?: HttpOptions): Promise<TransactionDetails>;
1437
+ /**
1438
+ *
1439
+ * @name SupportedChains
1440
+ * @summary Gets the list of chains supported by the api.
1441
+ * @request GET:/v1/chains
1442
+ * @response `200` `ChainsDto`
1443
+ */
1444
+ supportedChains(params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListChainsResponse>;
1445
+ /**
1446
+ * No description
1447
+ *
1448
+ * @name GetChainInfo
1449
+ * @summary Gets chain information by chain id.
1450
+ * @request GET:/v1/chains/{chainId}
1451
+ * @response `200` `ChainInfoDto`
1452
+ */
1453
+ getChainInfo(chainId: string, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ChainInfo>;
1454
+ /**
1455
+ * No description
1456
+ *
1457
+ * @tags Primary Network
1458
+ * @name listActiveStakingTransactions
1459
+ * @summary Returns active staking transactions for supplied addresses.
1460
+ * @request GET:/v1/networks/{network}/blockchains/{blockchainId}/transactions:listStaking
1461
+ */
1462
+ listActiveStakingTransactions: (blockchainId: string, network: Network, query?: {
1463
+ /**
1464
+ * 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".
1465
+ * @example "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg"
1466
+ */
1467
+ addresses?: string;
1468
+ /**
1469
+ * The maximum number of items to return. The minimum page size
1470
+ * is 1. The maximum pageSize is 100.
1471
+ * @min 1
1472
+ * @max 100
1473
+ * @default 10
1474
+ * @example "10"
1475
+ */
1476
+ pageSize?: number;
1477
+ /** A page token, received from a previous list call. Provide this to retrieve the subsequent page. */
1478
+ pageToken?: string;
1479
+ /**
1480
+ * The order by which to sort results. Use "asc" for ascending
1481
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
1482
+ * query parameter, if provided.
1483
+ * @example "asc"
1484
+ */
1485
+ sortOrder?: SortOrder;
1486
+ }, params?: Record<string, string>, customOptions?: HttpOptions) => Promise<ListPChainTransactionsResponse>;
1487
+ }
1488
+
1489
+ export { Address, AssetType, BlockchainId, CancelListingEventResponse, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, CloseAuctionEventResponse, ContractType, CurrencyCode, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, ErcType, FullNativeTransactionDetails, GetBlockResponse, GetChainResponse, GetContractInformationResponse, GetNativeBalanceResponse, GetPChainBlockResponse, GetPChainTransactionResponse, GetTransactionResponse, GlacierClient, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlocksResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListInternalTransactionsResponse, ListListingMetricsResponse, ListListingsResponse, ListNativeTransactionsResponse, ListPChainBalancesResponse, ListPChainBlocksResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListXChainVerticesResponse, ListingCurrencyType, ListingEventType, ListingMetricsMap, ListingMetricsResponse, ListingResponse, ListingType, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NftCollection, NftFilterOptionsProperty, NftSearchBody, NftSearchResultTypeOption, NftTokenMetadataStatus, OpenListingEventResponse, OperationInfoResponse, OperationRequestBody, OperationResultResponse, PChainAsset, PChainBalance, PChainBlock, PChainConsumedUtxo, PChainEmittedUtxo, PChainTransaction, PChainUtxo, PaginationParams, ProposerDetails, PurchaseListingEventResponse, ResourceLink, ResourceLinkType, ReviewStatus, RichAddress, SortByOption, SortOrder, TokenWithPrice, TransactionDetails, TransactionMethodType, TransactionStatus, TrendingTimeframe, UtilityAddresses, VmName, XChainVertex };