@avalabs/glacier-sdk 2.8.0-alpha.66 → 2.8.0-alpha.68

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