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

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
@@ -7,55 +7,122 @@ declare enum CurrencyCode {
7
7
  Cad = "cad",
8
8
  Chf = "chf",
9
9
  Clp = "clp",
10
+ Cny = "cny",
10
11
  Czk = "czk",
11
12
  Dkk = "dkk",
12
13
  Gbp = "gbp",
13
14
  Hkd = "hkd",
14
- Huf = "huf"
15
+ Huf = "huf",
16
+ Jpy = "jpy",
17
+ Nzd = "nzd"
15
18
  }
16
19
  interface Money {
17
20
  /**
18
21
  * ISO 4217 currency code.
19
- * @example usd
22
+ * @example "usd"
20
23
  */
21
24
  currencyCode: CurrencyCode;
22
25
  /**
23
26
  * Monetary value in base 10 decimals.
24
- * @example 42.42
27
+ * @example "42.42"
25
28
  */
26
29
  value: number;
27
30
  }
28
31
  interface NativeTokenBalance {
32
+ /**
33
+ * The contract name.
34
+ * @example "Wrapped AVAX"
35
+ */
29
36
  name: string;
37
+ /**
38
+ * The contract symbol.
39
+ * @example "WAVAX"
40
+ */
30
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
+ */
31
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
+ */
32
53
  logoUri?: string;
54
+ /**
55
+ * The evm chain id.
56
+ * @example "43114"
57
+ */
33
58
  chainId: string;
59
+ /** The token price, if available. */
34
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
+ */
35
66
  balance: string;
67
+ /** The monetary value of the balance, if a price is available for the token. */
36
68
  balanceValue?: Money;
37
69
  }
38
- interface NativeBalance {
70
+ interface GetNativeBalanceResponse {
71
+ /** The native token balance for the address. */
39
72
  nativeTokenBalance: NativeTokenBalance;
40
73
  }
41
74
  interface Erc20TokenBalance {
42
- /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */
75
+ /**
76
+ * A wallet or contract address in mixed-case checksum encoding.
77
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
78
+ */
43
79
  address: string;
80
+ /**
81
+ * The contract name.
82
+ * @example "Wrapped AVAX"
83
+ */
44
84
  name: string;
85
+ /**
86
+ * The contract symbol.
87
+ * @example "WAVAX"
88
+ */
45
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
+ */
46
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
+ */
47
101
  logoUri?: string;
102
+ ercType: 'ERC-20';
103
+ /** The token price, if available. */
48
104
  price?: Money;
105
+ /**
106
+ * The evm chain id.
107
+ * @example "43114"
108
+ */
49
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
+ */
50
115
  balance: string;
116
+ /** The monetary value of the balance, if a price is available for the token. */
51
117
  balanceValue?: Money;
52
118
  }
53
- interface Erc20Balances {
119
+ interface ListErc20BalancesResponse {
54
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. */
55
121
  nextPageToken?: string;
122
+ /** The list of ERC-20 token balances for the address. */
56
123
  erc20TokenBalances: Erc20TokenBalance[];
57
124
  }
58
- declare enum Erc721MetadataStatus {
125
+ declare enum NftTokenMetadataStatus {
59
126
  UNKNOWN = "UNKNOWN",
60
127
  MISSING_TOKEN = "MISSING_TOKEN",
61
128
  INVALID_TOKEN_URI = "INVALID_TOKEN_URI",
@@ -68,12 +135,12 @@ declare enum Erc721MetadataStatus {
68
135
  INDEXED = "INDEXED",
69
136
  UNINDEXED = "UNINDEXED"
70
137
  }
71
- interface Erc721Metadata {
138
+ interface Erc721TokenMetadata {
72
139
  /**
73
140
  * The metadata indexing status of the nft.
74
- * @example indexed
141
+ * @example "indexed"
75
142
  */
76
- indexStatus: Erc721MetadataStatus;
143
+ indexStatus: NftTokenMetadataStatus;
77
144
  metadataLastUpdatedTimestamp?: number;
78
145
  name?: string;
79
146
  symbol?: string;
@@ -85,24 +152,95 @@ interface Erc721Metadata {
85
152
  attributes?: string;
86
153
  }
87
154
  interface Erc721TokenBalance {
88
- /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */
155
+ /**
156
+ * A wallet or contract address in mixed-case checksum encoding.
157
+ * @example "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
158
+ */
89
159
  address: string;
160
+ /**
161
+ * The contract name.
162
+ * @example "Wrapped AVAX"
163
+ */
90
164
  name: string;
165
+ /**
166
+ * The contract symbol.
167
+ * @example "WAVAX"
168
+ */
91
169
  symbol: string;
170
+ ercType: 'ERC-721';
92
171
  tokenId: string;
93
172
  tokenUri: string;
94
- metadata: Erc721Metadata;
173
+ metadata: Erc721TokenMetadata;
174
+ /**
175
+ * The evm chain id.
176
+ * @example "43114"
177
+ */
95
178
  chainId: string;
96
179
  }
97
- interface Erc721Balances {
180
+ interface ListErc721BalancesResponse {
98
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. */
99
182
  nextPageToken?: string;
183
+ /** The list of ERC-721 token balances for the address. */
100
184
  erc721TokenBalances: Erc721TokenBalance[];
101
185
  }
102
- interface Block {
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 {
103
241
  /**
104
242
  * The block number on the chain.
105
- * @example 339
243
+ * @example "339"
106
244
  */
107
245
  blockNumber: string;
108
246
  /**
@@ -112,11 +250,13 @@ interface Block {
112
250
  blockTimestamp: number;
113
251
  /**
114
252
  * The block hash identifier.
115
- * @example 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c
253
+ * @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
116
254
  */
117
255
  blockHash: string;
118
- /** The number of transactions in the block. */
256
+ /** The number of evm transactions in the block. */
119
257
  txCount: number;
258
+ /** The number of atomic transactions in the block. */
259
+ atomicTxCount: number;
120
260
  /** The base gas fee for a transaction to be included in the block. */
121
261
  baseFee: string;
122
262
  /** The gas used for transactions in the block. */
@@ -131,40 +271,211 @@ interface Block {
131
271
  /** The cumulative number of transactions for the chain including this block. */
132
272
  cumulativeTransactions: string;
133
273
  }
134
- interface ListBlocks {
135
- /** 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. */
136
- nextPageToken?: string;
137
- blocks: Block[];
138
- }
139
- interface ListTransfers {
274
+ interface ListBlocksResponse {
140
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. */
141
276
  nextPageToken?: string;
142
- transfers: Erc20Transfer[] | Erc721Transfer[];
277
+ blocks: GetBlockResponse[];
143
278
  }
144
279
  interface RichAddress {
280
+ /**
281
+ * The contract name.
282
+ * @example "Wrapped AVAX"
283
+ */
145
284
  name?: string;
285
+ /**
286
+ * The contract symbol.
287
+ * @example "WAVAX"
288
+ */
146
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
+ */
147
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
+ */
148
335
  logoUri?: string;
149
- /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */
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
+ */
150
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"
151
451
  }
152
452
  interface Method {
153
453
  /**
154
- * The contract method hash identifier.
155
- * @example 0xa9059cbb
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"
156
467
  */
157
468
  methodHash: string;
158
469
  /**
159
- * The contract method name including parameter types.
160
- * @example transfer(address,uint256)
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)"
161
472
  */
162
473
  methodName?: string;
163
474
  }
164
- interface NativeTransaction {
475
+ interface FullNativeTransactionDetails {
165
476
  /**
166
477
  * The block number on the chain.
167
- * @example 339
478
+ * @example "339"
168
479
  */
169
480
  blockNumber: string;
170
481
  /**
@@ -174,7 +485,7 @@ interface NativeTransaction {
174
485
  blockTimestamp: number;
175
486
  /**
176
487
  * The block hash identifier.
177
- * @example 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c
488
+ * @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
178
489
  */
179
490
  blockHash: string;
180
491
  /**
@@ -184,12 +495,12 @@ interface NativeTransaction {
184
495
  blockIndex: number;
185
496
  /**
186
497
  * The transaction hash identifier.
187
- * @example 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4
498
+ * @example "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
188
499
  */
189
500
  txHash: string;
190
501
  /**
191
502
  * The transaction status, which is either 0 (failed) or 1 (successful).
192
- * @example 1
503
+ * @example "1"
193
504
  */
194
505
  txStatus: string;
195
506
  /**
@@ -199,97 +510,148 @@ interface NativeTransaction {
199
510
  txType: number;
200
511
  /**
201
512
  * The gas limit set for the transaction.
202
- * @example 51373
513
+ * @example "51373"
203
514
  */
204
515
  gasLimit: string;
205
516
  /**
206
517
  * The amount of gas used.
207
- * @example 51373
518
+ * @example "51373"
208
519
  */
209
520
  gasUsed: string;
210
521
  /**
211
522
  * The gas price denominated by the number of decimals of the native token.
212
- * @example 470000000000
523
+ * @example "470000000000"
213
524
  */
214
525
  gasPrice: string;
215
526
  /**
216
527
  * The nonce used by the sender of the transaction.
217
- * @example 1
528
+ * @example "1"
218
529
  */
219
530
  nonce: string;
220
531
  from: RichAddress;
221
532
  to: RichAddress;
222
533
  method?: Method;
223
- /** @example 10000000000000000000 */
224
- value: string;
225
- }
226
- interface Erc20Token {
227
- /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */
228
- address: string;
229
- name: string;
230
- symbol: string;
231
- decimals: number;
232
- logoUri?: string;
233
- price?: Money;
234
- }
235
- interface Erc20TransferDetails {
236
- from: RichAddress;
237
- to: RichAddress;
238
- erc20Token: Erc20Token;
239
- /** @example 10000000000000000000 */
534
+ /** @example "10000000000000000000" */
240
535
  value: string;
536
+ /** The data sent for the transaction. */
537
+ input: string;
538
+ baseFeePerGas: string;
539
+ maxFeePerGas?: string;
540
+ maxPriorityFeePerGas?: string;
241
541
  }
242
- interface Erc721Token {
243
- /** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */
244
- address: string;
245
- name: string;
246
- symbol: string;
247
- tokenId: string;
248
- tokenUri: string;
249
- metadata: Erc721Metadata;
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;
250
561
  }
251
- interface Erc721TransferDetails {
252
- from: RichAddress;
253
- to: RichAddress;
254
- erc721Token: Erc721Token;
562
+ declare enum ContractType {
563
+ ERC20 = "ERC-20",
564
+ ERC721 = "ERC-721",
565
+ Other = "Other"
255
566
  }
256
- declare enum InternalTransactionOpCall {
257
- UNKNOWN = "UNKNOWN",
258
- CALL = "CALL",
259
- CREATE = "CREATE",
260
- CREATE2 = "CREATE2",
261
- CALLCODE = "CALLCODE",
262
- DELEGATECALL = "DELEGATECALL",
263
- STATICCALL = "STATICCALL"
567
+ declare enum AssetType {
568
+ FixedCap = "Fixed Cap",
569
+ UnlimitedCap = "Unlimited Cap",
570
+ Stablecoin = "Stablecoin",
571
+ NFT = "NFT"
264
572
  }
265
- interface InternalTransactionDetails {
266
- from: RichAddress;
267
- to: RichAddress;
268
- internalTxType: InternalTransactionOpCall;
269
- /** @example 10000000000000000000 */
270
- value: string;
271
- isReverted: boolean;
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"
272
588
  }
273
- interface TransactionDetails {
274
- nativeTransaction: NativeTransaction;
275
- erc20Transfers?: Erc20TransferDetails[];
276
- erc721Transfers?: Erc721TransferDetails[];
277
- internalTransactions?: InternalTransactionDetails[];
589
+ interface ResourceLink {
590
+ type: ResourceLinkType;
591
+ url: string;
278
592
  }
279
- interface ListTransactionDetails {
280
- /** 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. */
281
- nextPageToken?: string;
282
- transactions: TransactionDetails[];
593
+ declare enum ReviewStatus {
594
+ Pending = "Pending",
595
+ Approved = "Approved"
283
596
  }
284
- interface ListNativeTransactions {
285
- /** 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. */
286
- nextPageToken?: string;
287
- transactions: NativeTransaction[];
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;
288
650
  }
289
651
  interface Erc20Transfer {
290
652
  /**
291
653
  * The block number on the chain.
292
- * @example 339
654
+ * @example "339"
293
655
  */
294
656
  blockNumber: string;
295
657
  /**
@@ -298,25 +660,25 @@ interface Erc20Transfer {
298
660
  */
299
661
  blockTimestamp: number;
300
662
  /**
301
- * The transaction hash identifier.
302
- * @example 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4
663
+ * The block hash identifier.
664
+ * @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
665
+ */
666
+ blockHash: string;
667
+ /**
668
+ * The transaction hash identifier.
669
+ * @example "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
303
670
  */
304
671
  txHash: string;
305
672
  from: RichAddress;
306
673
  to: RichAddress;
307
- erc20Token: Erc20Token;
308
- /** @example 10000000000000000000 */
674
+ /** @example "10000000000000000000" */
309
675
  value: string;
310
- }
311
- interface ListErc20Transactions {
312
- /** 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. */
313
- nextPageToken?: string;
314
- transactions: Erc20Transfer[];
676
+ erc20Token: Erc20Token;
315
677
  }
316
678
  interface Erc721Transfer {
317
679
  /**
318
680
  * The block number on the chain.
319
- * @example 339
681
+ * @example "339"
320
682
  */
321
683
  blockNumber: string;
322
684
  /**
@@ -324,38 +686,198 @@ interface Erc721Transfer {
324
686
  * @example 1648672486
325
687
  */
326
688
  blockTimestamp: number;
689
+ /**
690
+ * The block hash identifier.
691
+ * @example "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c"
692
+ */
693
+ blockHash: string;
327
694
  /**
328
695
  * The transaction hash identifier.
329
- * @example 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4
696
+ * @example "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4"
330
697
  */
331
698
  txHash: string;
332
699
  from: RichAddress;
333
700
  to: RichAddress;
334
701
  erc721Token: Erc721Token;
335
702
  }
336
- interface ListErc721Transactions {
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 {
337
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. */
338
732
  nextPageToken?: string;
339
- transactions: Erc721Transfer[];
340
- }
341
- interface NetworkToken {
342
- name: string;
343
- symbol: string;
344
- decimals: number;
345
- logoUri?: string;
346
- description?: string;
733
+ transfers: Erc20Transfer[] | Erc721Transfer[] | Erc1155Transfer[];
347
734
  }
348
- interface NetworkTokenDetails {
349
- networkToken: NetworkToken;
350
- currentPrice?: Money;
351
- historicalPrice?: Money;
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;
352
796
  }
353
- interface FullTransactionDetails {
797
+ interface TransactionDetails {
798
+ /** The native (top-level) transaction details. */
354
799
  nativeTransaction: NativeTransaction;
800
+ /** The list of ERC-20 transfers. */
355
801
  erc20Transfers?: Erc20TransferDetails[];
802
+ /** The list of ERC-721 transfers. */
356
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
+ */
357
815
  internalTransactions?: InternalTransactionDetails[];
358
- networkTokenDetails: NetworkTokenDetails;
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"
359
881
  }
360
882
  declare enum VmName {
361
883
  EVM = "EVM",
@@ -381,9 +903,449 @@ interface ChainInfo {
381
903
  networkToken: NetworkToken;
382
904
  chainLogoUri?: string;
383
905
  }
384
- interface Chains {
906
+ interface ListChainsResponse {
385
907
  chains: ChainInfo[];
386
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
+ }
387
1349
 
388
1350
  interface HealthStatusCheck {
389
1351
  status?: string;
@@ -423,7 +1385,7 @@ declare class GlacierClient {
423
1385
  */
424
1386
  getNativeBalance(chainId: string, address: string, query?: {
425
1387
  currency?: CurrencyCode;
426
- }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<NativeBalance>;
1388
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<GetNativeBalanceResponse>;
427
1389
  /**
428
1390
  *
429
1391
  * @name ListErc20Balances
@@ -435,7 +1397,7 @@ declare class GlacierClient {
435
1397
  pageSize?: number;
436
1398
  pageToken?: string;
437
1399
  currency?: CurrencyCode;
438
- }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<Erc20Balances>;
1400
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListErc20BalancesResponse>;
439
1401
  /**
440
1402
  * No description
441
1403
  *
@@ -448,7 +1410,7 @@ declare class GlacierClient {
448
1410
  pageSize?: number;
449
1411
  pageToken?: string;
450
1412
  currency?: CurrencyCode;
451
- }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<Erc721Balances>;
1413
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListErc721BalancesResponse>;
452
1414
  /**
453
1415
  * @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.
454
1416
  *
@@ -460,7 +1422,7 @@ declare class GlacierClient {
460
1422
  listTransactions(chainId: string, address: string, query?: {
461
1423
  pageSize?: number;
462
1424
  pageToken?: string;
463
- }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListTransactionDetails>;
1425
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListTransactionDetailsResponse>;
464
1426
  /**
465
1427
  *
466
1428
  * @name GetTransaction
@@ -476,7 +1438,7 @@ declare class GlacierClient {
476
1438
  * @request GET:/v1/chains
477
1439
  * @response `200` `ChainsDto`
478
1440
  */
479
- supportedChains(params?: Record<string, any>, customOptions?: HttpOptions): Promise<Chains>;
1441
+ supportedChains(params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListChainsResponse>;
480
1442
  /**
481
1443
  * No description
482
1444
  *
@@ -488,4 +1450,4 @@ declare class GlacierClient {
488
1450
  getChainInfo(chainId: string, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ChainInfo>;
489
1451
  }
490
1452
 
491
- export { Block, ChainInfo, Chains, CurrencyCode, Erc20Balances, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Balances, Erc721Metadata, Erc721MetadataStatus, Erc721Token, Erc721TokenBalance, Erc721Transfer, Erc721TransferDetails, FullTransactionDetails, GlacierClient, InternalTransactionDetails, InternalTransactionOpCall, ListBlocks, ListErc20Transactions, ListErc721Transactions, ListNativeTransactions, ListTransactionDetails, ListTransfers, Method, Money, NativeBalance, NativeTokenBalance, NativeTransaction, NetworkToken, NetworkTokenDetails, RichAddress, TransactionDetails, UtilityAddresses, VmName };
1453
+ 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, PChainAsset, PChainBalance, PChainBlock, PChainConsumedUtxo, PChainEmittedUtxo, PChainTransaction, PChainUtxo, PaginationParams, ProposerDetails, PurchaseListingEventResponse, ResourceLink, ResourceLinkType, ReviewStatus, RichAddress, SortByOption, SortOrder, TokenWithPrice, TransactionDetails, TransactionMethodType, TransactionStatus, TrendingTimeframe, UtilityAddresses, VmName, XChainVertex };