@avalabs/glacier-sdk 2.8.0-alpha.99 → 2.8.0-canary.1fc6bdf.0

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.
Files changed (184) hide show
  1. package/dist/index.d.ts +2119 -1682
  2. package/dist/index.js +531 -284
  3. package/esm/generated/Glacier.d.ts +20 -2
  4. package/esm/generated/Glacier.js +21 -3
  5. package/esm/generated/core/OpenAPI.js +1 -1
  6. package/esm/generated/models/ActiveDelegatorDetails.d.ts +15 -0
  7. package/esm/generated/models/ActiveValidatorDetails.d.ts +20 -0
  8. package/esm/generated/models/Blockchain.d.ts +10 -0
  9. package/esm/generated/models/BlockchainId.d.ts +6 -3
  10. package/esm/generated/models/BlockchainId.js +5 -2
  11. package/esm/generated/models/BlockchainIds.d.ts +9 -0
  12. package/esm/generated/models/BlockchainIds.js +10 -0
  13. package/esm/generated/models/BlockchainInfo.d.ts +5 -0
  14. package/esm/generated/models/ChainAddressChainIdMap.d.ts +2 -2
  15. package/esm/generated/models/ChainInfo.d.ts +1 -4
  16. package/esm/generated/models/CompletedDelegatorDetails.d.ts +15 -0
  17. package/esm/generated/models/CompletedValidatorDetails.d.ts +15 -0
  18. package/esm/generated/models/ContractDeploymentDetails.d.ts +13 -0
  19. package/esm/generated/models/CreateEvmTransactionExportRequest.d.ts +23 -0
  20. package/esm/generated/models/CreateEvmTransactionExportRequest.js +8 -0
  21. package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.d.ts +23 -0
  22. package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.js +8 -0
  23. package/esm/generated/models/DelegationStatusType.d.ts +7 -0
  24. package/esm/generated/models/DelegationStatusType.js +8 -0
  25. package/esm/generated/models/DelegatorsDetails.d.ts +6 -0
  26. package/esm/generated/models/EVMInput.d.ts +5 -0
  27. package/esm/generated/models/Erc1155Contract.d.ts +36 -0
  28. package/esm/generated/models/Erc1155Contract.js +8 -0
  29. package/esm/generated/models/Erc1155TokenBalance.d.ts +1 -2
  30. package/esm/generated/models/Erc1155Transfer.d.ts +1 -0
  31. package/esm/generated/models/Erc1155TransferDetails.d.ts +1 -0
  32. package/esm/generated/models/Erc20Contract.d.ts +40 -0
  33. package/esm/generated/models/Erc20Contract.js +8 -0
  34. package/esm/generated/models/Erc20Token.d.ts +1 -3
  35. package/esm/generated/models/Erc20TokenBalance.d.ts +2 -5
  36. package/esm/generated/models/Erc20Transfer.d.ts +1 -0
  37. package/esm/generated/models/Erc20TransferDetails.d.ts +1 -0
  38. package/esm/generated/models/Erc721Contract.d.ts +36 -0
  39. package/esm/generated/models/Erc721Contract.js +8 -0
  40. package/esm/generated/models/Erc721Transfer.d.ts +1 -0
  41. package/esm/generated/models/Erc721TransferDetails.d.ts +1 -0
  42. package/esm/generated/models/{GetBlockResponse.d.ts → EvmBlock.d.ts} +2 -6
  43. package/esm/generated/models/EvmNetworkOptions.d.ts +1 -1
  44. package/esm/generated/models/GetChainResponse.d.ts +1 -4
  45. package/esm/generated/models/GetEvmBlockResponse.d.ts +45 -0
  46. package/esm/generated/models/GetNetworkDetailsResponse.d.ts +9 -0
  47. package/esm/generated/models/GetPrimaryNetworkBlockResponse.d.ts +15 -0
  48. package/esm/generated/models/GetTransactionResponse.d.ts +1 -7
  49. package/esm/generated/models/HistoricalReward.d.ts +24 -0
  50. package/esm/generated/models/ImageAsset.d.ts +12 -0
  51. package/esm/generated/models/{ListListingsResponse.d.ts → ListBlockchainsResponse.d.ts} +4 -4
  52. package/esm/generated/models/ListCChainAtomicBalancesResponse.d.ts +2 -0
  53. package/esm/generated/models/ListCChainAtomicTransactionsResponse.d.ts +2 -0
  54. package/esm/generated/models/ListCollectibleBalancesResponse.d.ts +1 -2
  55. package/esm/generated/models/ListContractsResponse.d.ts +14 -0
  56. package/esm/generated/models/ListDelegatorDetailsResponse.d.ts +16 -0
  57. package/esm/generated/models/ListEvmBlocksResponse.d.ts +11 -0
  58. package/esm/generated/models/ListHistoricalRewardsResponse.d.ts +11 -0
  59. package/esm/generated/models/ListPChainBalancesResponse.d.ts +2 -0
  60. package/esm/generated/models/ListPChainTransactionsResponse.d.ts +2 -0
  61. package/esm/generated/models/ListPChainUtxosResponse.d.ts +2 -0
  62. package/esm/generated/models/ListPendingRewardsResponse.d.ts +11 -0
  63. package/esm/generated/models/ListPrimaryNetworkBlocksResponse.d.ts +13 -0
  64. package/esm/generated/models/{ListBlocksResponse.d.ts → ListSubnetsResponse.d.ts} +4 -4
  65. package/esm/generated/models/ListUtxosResponse.d.ts +2 -0
  66. package/esm/generated/models/ListValidatorDetailsResponse.d.ts +16 -0
  67. package/esm/generated/models/ListXChainBalancesResponse.d.ts +2 -0
  68. package/esm/generated/models/ListXChainTransactionsResponse.d.ts +2 -0
  69. package/esm/generated/models/ListXChainVerticesResponse.d.ts +2 -0
  70. package/esm/generated/models/Method.d.ts +1 -7
  71. package/esm/generated/models/NativeTokenBalance.d.ts +2 -5
  72. package/esm/generated/models/NetworkToken.d.ts +1 -3
  73. package/esm/generated/models/NetworkTokenDetails.d.ts +1 -3
  74. package/esm/generated/models/NetworkType.d.ts +6 -0
  75. package/esm/generated/models/NetworkType.js +7 -0
  76. package/esm/generated/models/OperationStatusResponse.d.ts +2 -2
  77. package/esm/generated/models/OperationType.d.ts +2 -1
  78. package/esm/generated/models/OperationType.js +2 -1
  79. package/esm/generated/models/PChainBalance.d.ts +16 -7
  80. package/esm/generated/models/PChainId.d.ts +2 -2
  81. package/esm/generated/models/PChainId.js +1 -1
  82. package/esm/generated/models/PChainSharedAsset.d.ts +8 -0
  83. package/esm/generated/models/PChainTransaction.d.ts +9 -15
  84. package/esm/generated/models/PChainTransactionType.d.ts +16 -0
  85. package/esm/generated/models/PChainTransactionType.js +17 -0
  86. package/esm/generated/models/PChainUtxo.d.ts +10 -1
  87. package/esm/generated/models/PendingDelegatorDetails.d.ts +15 -0
  88. package/esm/generated/models/PendingReward.d.ts +22 -0
  89. package/esm/generated/models/PendingValidatorDetails.d.ts +12 -0
  90. package/esm/generated/models/PrimaryNetwork.d.ts +6 -0
  91. package/esm/generated/models/PrimaryNetwork.js +7 -0
  92. package/esm/generated/models/{Block.d.ts → PrimaryNetworkBlock.d.ts} +3 -3
  93. package/esm/generated/models/PrimaryNetworkChainInfo.d.ts +9 -0
  94. package/esm/generated/models/PrimaryNetworkChainName.d.ts +7 -0
  95. package/esm/generated/models/PrimaryNetworkChainName.js +8 -0
  96. package/esm/generated/models/PrimaryNetworkOptions.d.ts +2 -1
  97. package/esm/generated/models/PrimaryNetworkTxType.d.ts +19 -0
  98. package/esm/generated/models/PrimaryNetworkTxType.js +20 -0
  99. package/esm/generated/models/RewardType.d.ts +6 -0
  100. package/esm/generated/models/RewardType.js +7 -0
  101. package/esm/generated/models/Rewards.d.ts +6 -0
  102. package/esm/generated/models/RichAddress.d.ts +1 -3
  103. package/esm/generated/models/StakingDistribution.d.ts +7 -0
  104. package/esm/generated/models/Subnet.d.ts +13 -0
  105. package/esm/generated/models/TransactionDetails.d.ts +1 -7
  106. package/esm/generated/models/TransactionExportMetadata.d.ts +15 -0
  107. package/esm/generated/models/UnknownContract.d.ts +32 -0
  108. package/esm/generated/models/UnknownContract.js +8 -0
  109. package/esm/generated/models/Utxo.d.ts +9 -1
  110. package/esm/generated/models/UtxoType.d.ts +6 -0
  111. package/esm/generated/models/UtxoType.js +7 -0
  112. package/esm/generated/models/ValidationStatusType.d.ts +7 -0
  113. package/esm/generated/models/ValidationStatusType.js +8 -0
  114. package/esm/generated/models/ValidatorsDetails.d.ts +11 -0
  115. package/esm/generated/models/XChainBalances.d.ts +2 -2
  116. package/esm/generated/models/XChainId.d.ts +3 -2
  117. package/esm/generated/models/XChainId.js +2 -1
  118. package/esm/generated/models/XChainLinearTransaction.d.ts +4 -4
  119. package/esm/generated/models/XChainLinearTransaction.js +1 -1
  120. package/esm/generated/models/XChainNonLinearTransaction.d.ts +4 -4
  121. package/esm/generated/models/XChainNonLinearTransaction.js +1 -1
  122. package/esm/generated/services/EvmBalancesService.d.ts +177 -0
  123. package/esm/generated/services/EvmBalancesService.js +116 -0
  124. package/esm/generated/services/EvmBlocksService.d.ts +47 -0
  125. package/esm/generated/services/EvmBlocksService.js +37 -0
  126. package/esm/generated/services/EvmChainsService.d.ts +36 -0
  127. package/esm/generated/services/EvmChainsService.js +29 -0
  128. package/esm/generated/services/EvmTransactionsService.d.ts +311 -0
  129. package/esm/generated/services/EvmTransactionsService.js +251 -0
  130. package/esm/generated/services/HealthCheckService.d.ts +1 -1
  131. package/esm/generated/services/OperationsService.d.ts +8 -3
  132. package/esm/generated/services/PrimaryNetworkBalancesService.d.ts +40 -0
  133. package/esm/generated/services/PrimaryNetworkBalancesService.js +26 -0
  134. package/esm/generated/services/PrimaryNetworkBlocksService.d.ts +85 -0
  135. package/esm/generated/services/PrimaryNetworkBlocksService.js +62 -0
  136. package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +69 -0
  137. package/esm/generated/services/PrimaryNetworkRewardsService.js +49 -0
  138. package/esm/generated/services/PrimaryNetworkService.d.ts +90 -252
  139. package/esm/generated/services/PrimaryNetworkService.js +54 -166
  140. package/esm/generated/services/PrimaryNetworkTransactionsService.d.ts +171 -0
  141. package/esm/generated/services/PrimaryNetworkTransactionsService.js +107 -0
  142. package/esm/generated/services/PrimaryNetworkUtxOsService.d.ts +54 -0
  143. package/esm/generated/services/PrimaryNetworkUtxOsService.js +34 -0
  144. package/esm/generated/services/PrimaryNetworkVerticesService.d.ts +90 -0
  145. package/esm/generated/services/PrimaryNetworkVerticesService.js +64 -0
  146. package/esm/index.d.ts +60 -31
  147. package/esm/index.js +26 -9
  148. package/package.json +2 -5
  149. package/esm/generated/models/Address.d.ts +0 -8
  150. package/esm/generated/models/CancelListingEventResponse.d.ts +0 -5
  151. package/esm/generated/models/CloseAuctionEventResponse.d.ts +0 -6
  152. package/esm/generated/models/CollectionMetrics.d.ts +0 -40
  153. package/esm/generated/models/CollectionSortByOption.d.ts +0 -8
  154. package/esm/generated/models/CollectionSortByOption.js +0 -9
  155. package/esm/generated/models/CreateTransactionExportRequest.d.ts +0 -11
  156. package/esm/generated/models/ErcType.d.ts +0 -8
  157. package/esm/generated/models/ErcType.js +0 -9
  158. package/esm/generated/models/ListNftCollectionWithMetricsResponse.d.ts +0 -11
  159. package/esm/generated/models/ListingCurrencyType.d.ts +0 -6
  160. package/esm/generated/models/ListingCurrencyType.js +0 -7
  161. package/esm/generated/models/ListingEventType.d.ts +0 -8
  162. package/esm/generated/models/ListingEventType.js +0 -9
  163. package/esm/generated/models/ListingResponse.d.ts +0 -19
  164. package/esm/generated/models/ListingType.d.ts +0 -6
  165. package/esm/generated/models/ListingType.js +0 -7
  166. package/esm/generated/models/ListingsSortByOption.d.ts +0 -5
  167. package/esm/generated/models/ListingsSortByOption.js +0 -6
  168. package/esm/generated/models/NftCollection.d.ts +0 -24
  169. package/esm/generated/models/NftCollectionWithMetrics.d.ts +0 -26
  170. package/esm/generated/models/NftFilterOptionsProperty.d.ts +0 -10
  171. package/esm/generated/models/NftSearchBody.d.ts +0 -10
  172. package/esm/generated/models/NftSearchResultTypeOption.d.ts +0 -6
  173. package/esm/generated/models/NftSearchResultTypeOption.js +0 -7
  174. package/esm/generated/models/OpenListingEventResponse.d.ts +0 -17
  175. package/esm/generated/models/OperationTransactionExportMetadata.d.ts +0 -18
  176. package/esm/generated/models/PChainConsumedUtxo.d.ts +0 -11
  177. package/esm/generated/models/PChainEmittedUtxo.d.ts +0 -19
  178. package/esm/generated/models/PaginationParams.d.ts +0 -13
  179. package/esm/generated/models/PurchaseListingEventResponse.d.ts +0 -17
  180. package/esm/generated/models/TokenWithPrice.d.ts +0 -28
  181. package/esm/generated/models/TrendingTimeframe.d.ts +0 -7
  182. package/esm/generated/models/TrendingTimeframe.js +0 -8
  183. package/esm/generated/services/EvmService.d.ts +0 -724
  184. package/esm/generated/services/EvmService.js +0 -509
package/dist/index.d.ts CHANGED
@@ -60,13 +60,6 @@ declare abstract class BaseHttpRequest {
60
60
  abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
61
61
  }
62
62
 
63
- declare enum CollectionSortByOption {
64
- SALE_TIMESTAMP = "saleTimestamp",
65
- VOLUME = "volume",
66
- VOLUME_CHANGE = "volumeChange",
67
- FLOOR_PRICE = "floorPrice"
68
- }
69
-
70
63
  declare enum CurrencyCode {
71
64
  USD = "usd",
72
65
  EUR = "eur",
@@ -84,6 +77,59 @@ declare enum CurrencyCode {
84
77
  NZD = "nzd"
85
78
  }
86
79
 
80
+ type Money = {
81
+ /**
82
+ * ISO 4217 currency code.
83
+ */
84
+ currencyCode: CurrencyCode;
85
+ /**
86
+ * Monetary value in base 10 decimals.
87
+ */
88
+ value: number;
89
+ };
90
+
91
+ type NativeTokenBalance = {
92
+ /**
93
+ * The contract name.
94
+ */
95
+ name: string;
96
+ /**
97
+ * The contract symbol.
98
+ */
99
+ symbol: string;
100
+ /**
101
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
102
+ */
103
+ decimals: number;
104
+ /**
105
+ * The logo uri for the address.
106
+ */
107
+ logoUri?: string;
108
+ /**
109
+ * The evm chain id.
110
+ */
111
+ chainId: string;
112
+ /**
113
+ * The token price, if available.
114
+ */
115
+ price?: Money;
116
+ /**
117
+ * The address balance for the token, in units specified by the `decimals` value for the contract.
118
+ */
119
+ balance: string;
120
+ /**
121
+ * The monetary value of the balance, if a price is available for the token.
122
+ */
123
+ balanceValue?: Money;
124
+ };
125
+
126
+ type GetNativeBalanceResponse = {
127
+ /**
128
+ * The native token balance for the address.
129
+ */
130
+ nativeTokenBalance: NativeTokenBalance;
131
+ };
132
+
87
133
  declare enum NftTokenMetadataStatus {
88
134
  UNKNOWN = "UNKNOWN",
89
135
  MISSING_TOKEN = "MISSING_TOKEN",
@@ -115,17 +161,25 @@ type Erc1155TokenMetadata = {
115
161
  properties?: string;
116
162
  };
117
163
 
118
- type Erc1155Token = {
164
+ type Erc1155TokenBalance = {
119
165
  /**
120
166
  * A wallet or contract address in mixed-case checksum encoding.
121
167
  */
122
168
  address: string;
123
- ercType: Erc1155Token.ercType;
169
+ ercType: Erc1155TokenBalance.ercType;
124
170
  tokenId: string;
125
171
  tokenUri: string;
126
172
  metadata: Erc1155TokenMetadata;
173
+ /**
174
+ * The evm chain id.
175
+ */
176
+ chainId: string;
177
+ /**
178
+ * The address balance for the token, in units specified by the `decimals` value for the contract.
179
+ */
180
+ balance: string;
127
181
  };
128
- declare namespace Erc1155Token {
182
+ declare namespace Erc1155TokenBalance {
129
183
  enum ercType {
130
184
  ERC_1155 = "ERC-1155"
131
185
  }
@@ -147,7 +201,7 @@ type Erc721TokenMetadata = {
147
201
  attributes?: string;
148
202
  };
149
203
 
150
- type Erc721Token = {
204
+ type Erc721TokenBalance = {
151
205
  /**
152
206
  * A wallet or contract address in mixed-case checksum encoding.
153
207
  */
@@ -160,7 +214,7 @@ type Erc721Token = {
160
214
  * The contract symbol.
161
215
  */
162
216
  symbol: string;
163
- ercType: Erc721Token.ercType;
217
+ ercType: Erc721TokenBalance.ercType;
164
218
  tokenId: string;
165
219
  tokenUri: string;
166
220
  metadata: Erc721TokenMetadata;
@@ -168,134 +222,44 @@ type Erc721Token = {
168
222
  * A wallet or contract address in mixed-case checksum encoding.
169
223
  */
170
224
  ownerAddress?: string;
225
+ /**
226
+ * The evm chain id.
227
+ */
228
+ chainId: string;
171
229
  };
172
- declare namespace Erc721Token {
230
+ declare namespace Erc721TokenBalance {
173
231
  enum ercType {
174
232
  ERC_721 = "ERC-721"
175
233
  }
176
234
  }
177
235
 
178
- type GetBlockResponse = {
179
- /**
180
- * The block number on the chain.
181
- */
182
- blockNumber: string;
183
- /**
184
- * The block finality timestamp.
185
- */
186
- blockTimestamp: number;
187
- /**
188
- * The block hash identifier.
189
- */
190
- blockHash: string;
191
- /**
192
- * The number of evm transactions in the block.
193
- */
194
- txCount: number;
195
- /**
196
- * The number of atomic transactions in the block.
197
- */
198
- atomicTxCount: number;
199
- /**
200
- * The base gas fee for a transaction to be included in the block.
201
- */
202
- baseFee: string;
203
- /**
204
- * The gas used for transactions in the block.
205
- */
206
- gasUsed: string;
207
- /**
208
- * The total gas limit set for transactions in the block.
209
- */
210
- gasLimit: string;
211
- gasCost: string;
212
- /**
213
- * The hash of the parent block.
214
- */
215
- parentHash: string;
236
+ type ListCollectibleBalancesResponse = {
216
237
  /**
217
- * The amount of fees spent/burned for transactions in the block.
238
+ * 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.
218
239
  */
219
- feesSpent: string;
240
+ nextPageToken?: string;
220
241
  /**
221
- * The cumulative number of transactions for the chain including this block.
242
+ * The list of ERC-721 and ERC-1155 token balances for the address.
222
243
  */
223
- cumulativeTransactions: string;
244
+ collectibleBalances: Array<(Erc721TokenBalance | Erc1155TokenBalance)>;
224
245
  };
225
246
 
226
- declare enum ChainStatus {
227
- OK = "OK",
228
- UNAVAILABLE = "UNAVAILABLE"
229
- }
230
-
231
- type NetworkToken = {
232
- /**
233
- * The contract name.
234
- */
235
- name: string;
236
- /**
237
- * The contract symbol.
238
- */
239
- symbol: string;
240
- /**
241
- * The number of decimals the token uses. For example `6`,
242
- * means to divide the token amount by `1000000` to get its user
243
- * representation.
244
- */
245
- decimals: number;
247
+ type ListErc1155BalancesResponse = {
246
248
  /**
247
- * The logo uri for the address.
249
+ * 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.
248
250
  */
249
- logoUri?: string;
250
- description?: string;
251
- };
252
-
253
- type UtilityAddresses = {
254
- multicall?: string;
255
- };
256
-
257
- declare enum VmName {
258
- EVM = "EVM",
259
- BITCOIN = "BITCOIN",
260
- ETHEREUM = "ETHEREUM"
261
- }
262
-
263
- type GetChainResponse = {
264
- chainId: string;
251
+ nextPageToken?: string;
265
252
  /**
266
- * Status of chain nodes. Chain nodes can become temporarily
267
- * `UNAVAILABLE` for several reasons, such as validator stake falling
268
- * below threshold. If chain nodes are `UNAVAILABLE`, requests that rely
269
- * on data from the chain nodes may return 503 errors.
253
+ * The list of ERC-1155 token balances for the address.
270
254
  */
271
- status: ChainStatus;
272
- chainName: string;
273
- description: string;
274
- platformChainId?: string;
275
- subnetId?: string;
276
- vmId?: string;
277
- vmName: VmName;
278
- explorerUrl?: string;
279
- rpcUrl: string;
280
- wsUrl?: string;
281
- isTestnet: boolean;
282
- utilityAddresses?: UtilityAddresses;
283
- networkToken: NetworkToken;
284
- chainLogoUri?: string;
255
+ erc1155TokenBalances: Array<Erc1155TokenBalance>;
285
256
  };
286
257
 
287
- type Money = {
288
- /**
289
- * ISO 4217 currency code.
290
- */
291
- currencyCode: CurrencyCode;
258
+ type Erc20TokenBalance = {
292
259
  /**
293
- * Monetary value in base 10 decimals.
260
+ * A wallet or contract address in mixed-case checksum encoding.
294
261
  */
295
- value: number;
296
- };
297
-
298
- type NativeTokenBalance = {
262
+ address: string;
299
263
  /**
300
264
  * The contract name.
301
265
  */
@@ -305,26 +269,24 @@ type NativeTokenBalance = {
305
269
  */
306
270
  symbol: string;
307
271
  /**
308
- * The number of decimals the token uses. For example `6`,
309
- * means to divide the token amount by `1000000` to get its user
310
- * representation.
272
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
311
273
  */
312
274
  decimals: number;
313
275
  /**
314
276
  * The logo uri for the address.
315
277
  */
316
278
  logoUri?: string;
317
- /**
318
- * The evm chain id.
319
- */
320
- chainId: string;
279
+ ercType: Erc20TokenBalance.ercType;
321
280
  /**
322
281
  * The token price, if available.
323
282
  */
324
283
  price?: Money;
325
284
  /**
326
- * The address balance for the token, in units specified by the
327
- * `decimals` value for the contract.
285
+ * The evm chain id.
286
+ */
287
+ chainId: string;
288
+ /**
289
+ * The address balance for the token, in units specified by the `decimals` value for the contract.
328
290
  */
329
291
  balance: string;
330
292
  /**
@@ -332,122 +294,202 @@ type NativeTokenBalance = {
332
294
  */
333
295
  balanceValue?: Money;
334
296
  };
297
+ declare namespace Erc20TokenBalance {
298
+ enum ercType {
299
+ ERC_20 = "ERC-20"
300
+ }
301
+ }
335
302
 
336
- type GetNativeBalanceResponse = {
337
- /**
338
- * The native token balance for the address.
339
- */
340
- nativeTokenBalance: NativeTokenBalance;
341
- };
342
-
343
- type RichAddress = {
344
- /**
345
- * The contract name.
346
- */
347
- name?: string;
348
- /**
349
- * The contract symbol.
350
- */
351
- symbol?: string;
352
- /**
353
- * The number of decimals the token uses. For example `6`,
354
- * means to divide the token amount by `1000000` to get its user
355
- * representation.
356
- */
357
- decimals?: number;
303
+ type ListErc20BalancesResponse = {
358
304
  /**
359
- * The logo uri for the address.
305
+ * 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.
360
306
  */
361
- logoUri?: string;
307
+ nextPageToken?: string;
362
308
  /**
363
- * A wallet or contract address in mixed-case checksum encoding.
309
+ * The list of ERC-20 token balances for the address.
364
310
  */
365
- address: string;
366
- };
367
-
368
- type Erc1155TransferDetails = {
369
- from: RichAddress;
370
- to: RichAddress;
371
- value: string;
372
- erc1155Token: Erc1155Token;
311
+ erc20TokenBalances: Array<Erc20TokenBalance>;
373
312
  };
374
313
 
375
- type Erc20Token = {
376
- /**
377
- * A wallet or contract address in mixed-case checksum encoding.
378
- */
379
- address: string;
314
+ type ListErc721BalancesResponse = {
380
315
  /**
381
- * The contract name.
316
+ * 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.
382
317
  */
383
- name: string;
318
+ nextPageToken?: string;
384
319
  /**
385
- * The contract symbol.
320
+ * The list of ERC-721 token balances for the address.
386
321
  */
387
- symbol: string;
322
+ erc721TokenBalances: Array<Erc721TokenBalance>;
323
+ };
324
+
325
+ declare class EvmBalancesService {
326
+ readonly httpRequest: BaseHttpRequest;
327
+ constructor(httpRequest: BaseHttpRequest);
388
328
  /**
389
- * The number of decimals the token uses. For example `6`,
390
- * means to divide the token amount by `1000000` to get its user
391
- * representation.
329
+ * Get native token balance
330
+ * Gets native token balance of a wallet address.
331
+ *
332
+ * Balance at a given block can be retrieved with the `blockNumber` parameter.
333
+ * @returns GetNativeBalanceResponse
334
+ * @throws ApiError
392
335
  */
393
- decimals: number;
394
- /**
395
- * The logo uri for the address.
396
- */
397
- logoUri?: string;
398
- ercType: Erc20Token.ercType;
336
+ getNativeBalance({ chainId, address, blockNumber, currency, }: {
337
+ /**
338
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
339
+ */
340
+ chainId: string;
341
+ /**
342
+ * A wallet address.
343
+ */
344
+ address: string;
345
+ /**
346
+ * The block number, if not defined the block number will be the latest block.
347
+ */
348
+ blockNumber?: string;
349
+ /**
350
+ * The currency that return values should use. Defaults to USD.
351
+ */
352
+ currency?: CurrencyCode;
353
+ }): CancelablePromise<GetNativeBalanceResponse>;
399
354
  /**
400
- * The token price, if available.
355
+ * List ERC-20 balances
356
+ * Lists ERC-20 token balances of a wallet address.
357
+ *
358
+ * Balance at a given block can be retrieved with the `blockNumber` parameter.
359
+ *
360
+ * Balance for specific contracts can be retrieved with the `contractAddresses` parameter.
361
+ * @returns ListErc20BalancesResponse
362
+ * @throws ApiError
401
363
  */
402
- price?: Money;
403
- };
404
- declare namespace Erc20Token {
405
- enum ercType {
406
- ERC_20 = "ERC-20"
407
- }
408
- }
409
-
410
- type Erc20TransferDetails = {
411
- from: RichAddress;
412
- to: RichAddress;
413
- value: string;
414
- erc20Token: Erc20Token;
415
- };
416
-
417
- type Erc721TransferDetails = {
418
- from: RichAddress;
419
- to: RichAddress;
420
- erc721Token: Erc721Token;
421
- };
422
-
423
- declare enum TransactionMethodType {
424
- NATIVE_TRANSFER = "NATIVE_TRANSFER",
425
- CONTRACT_CALL = "CONTRACT_CALL",
426
- CONTRACT_CREATION = "CONTRACT_CREATION"
427
- }
428
-
429
- type Method = {
364
+ listErc20Balances({ chainId, address, blockNumber, pageSize, pageToken, contractAddresses, currency, }: {
365
+ /**
366
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
367
+ */
368
+ chainId: string;
369
+ /**
370
+ * A wallet address.
371
+ */
372
+ address: string;
373
+ /**
374
+ * The block number, if not defined the block number will be the latest block.
375
+ */
376
+ blockNumber?: string;
377
+ /**
378
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
379
+ */
380
+ pageSize?: number;
381
+ /**
382
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
383
+ */
384
+ pageToken?: string;
385
+ /**
386
+ * A comma separated list of contract addresses to filter by.
387
+ */
388
+ contractAddresses?: string;
389
+ /**
390
+ * The currency that return values should use. Defaults to USD.
391
+ */
392
+ currency?: CurrencyCode;
393
+ }): CancelablePromise<ListErc20BalancesResponse>;
430
394
  /**
431
- * The contract call type.
432
- * NATIVE_TRANSFER indicates a transfer of the
433
- * native token without any smart-contract interaction.
434
- * CONTRACT_CALL indicates a smart-contract
435
- * interaction.
436
- * CONTRACT_CREATION indicates a smart-contract
437
- * creation.
395
+ * List ERC-721 balances
396
+ * Lists ERC-721 token balances of a wallet address.
397
+ *
398
+ * Balance for a specific contract can be retrieved with the `contractAddress` parameter.
399
+ * @returns ListErc721BalancesResponse
400
+ * @throws ApiError
438
401
  */
439
- callType: TransactionMethodType;
402
+ listErc721Balances({ chainId, address, pageSize, pageToken, contractAddress, }: {
403
+ /**
404
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
405
+ */
406
+ chainId: string;
407
+ /**
408
+ * A wallet address.
409
+ */
410
+ address: string;
411
+ /**
412
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
413
+ */
414
+ pageSize?: number;
415
+ /**
416
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
417
+ */
418
+ pageToken?: string;
419
+ /**
420
+ * A contract addresses to filter by.
421
+ */
422
+ contractAddress?: string;
423
+ }): CancelablePromise<ListErc721BalancesResponse>;
440
424
  /**
441
- * The contract method hash identifier. The method hash is only set if the `callType` is `CONTRACT_CALL`.
425
+ * List ERC-1155 balances
426
+ * Lists ERC-1155 token balances of a wallet address.
427
+ *
428
+ * Balance at a given block can be retrieved with the `blockNumber` parameter.
429
+ *
430
+ * Balance for a specific contract can be retrieved with the `contractAddress` parameter.
431
+ * @returns ListErc1155BalancesResponse
432
+ * @throws ApiError
442
433
  */
443
- methodHash: string;
434
+ listErc1155Balances({ chainId, address, blockNumber, pageSize, pageToken, contractAddress, }: {
435
+ /**
436
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
437
+ */
438
+ chainId: string;
439
+ /**
440
+ * A wallet address.
441
+ */
442
+ address: string;
443
+ /**
444
+ * The block number, if not defined the block number will be the latest block.
445
+ */
446
+ blockNumber?: string;
447
+ /**
448
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
449
+ */
450
+ pageSize?: number;
451
+ /**
452
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
453
+ */
454
+ pageToken?: string;
455
+ /**
456
+ * A contract addresses to filter by.
457
+ */
458
+ contractAddress?: string;
459
+ }): CancelablePromise<ListErc1155BalancesResponse>;
444
460
  /**
445
- * 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'.
461
+ * List collectible (ERC-721/ERC-1155) balances
462
+ * Lists ERC-721 and ERC-1155 token balances of a wallet address.
463
+ *
464
+ * Balance for a specific contract can be retrieved with the `contractAddress` parameter.
465
+ * @returns ListCollectibleBalancesResponse
466
+ * @throws ApiError
446
467
  */
447
- methodName?: string;
448
- };
468
+ listCollectibleBalances({ chainId, address, pageSize, pageToken, contractAddress, }: {
469
+ /**
470
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
471
+ */
472
+ chainId: string;
473
+ /**
474
+ * A wallet address.
475
+ */
476
+ address: string;
477
+ /**
478
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
479
+ */
480
+ pageSize?: number;
481
+ /**
482
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
483
+ */
484
+ pageToken?: string;
485
+ /**
486
+ * A contract addresses to filter by.
487
+ */
488
+ contractAddress?: string;
489
+ }): CancelablePromise<ListCollectibleBalancesResponse>;
490
+ }
449
491
 
450
- type FullNativeTransactionDetails = {
492
+ type GetEvmBlockResponse = {
451
493
  /**
452
494
  * The block number on the chain.
453
495
  */
@@ -461,149 +503,189 @@ type FullNativeTransactionDetails = {
461
503
  */
462
504
  blockHash: string;
463
505
  /**
464
- * The index at which the transaction occured in the block (0-indexed).
506
+ * The number of evm transactions in the block.
465
507
  */
466
- blockIndex: number;
508
+ txCount: number;
467
509
  /**
468
- * The transaction hash identifier.
510
+ * The base gas fee for a transaction to be included in the block.
469
511
  */
470
- txHash: string;
512
+ baseFee: string;
471
513
  /**
472
- * The transaction status, which is either 0 (failed) or 1 (successful).
514
+ * The gas used for transactions in the block.
473
515
  */
474
- txStatus: string;
516
+ gasUsed: string;
475
517
  /**
476
- * The transaction type.
518
+ * The total gas limit set for transactions in the block.
477
519
  */
478
- txType: number;
520
+ gasLimit: string;
521
+ gasCost: string;
479
522
  /**
480
- * The gas limit set for the transaction.
523
+ * The hash of the parent block.
481
524
  */
482
- gasLimit: string;
525
+ parentHash: string;
483
526
  /**
484
- * The amount of gas used.
527
+ * The amount of fees spent/burned for transactions in the block.
485
528
  */
486
- gasUsed: string;
529
+ feesSpent: string;
487
530
  /**
488
- * The gas price denominated by the number of decimals of the native token.
531
+ * The cumulative number of transactions for the chain including this block.
489
532
  */
490
- gasPrice: string;
533
+ cumulativeTransactions: string;
534
+ };
535
+
536
+ type EvmBlock = {
491
537
  /**
492
- * The nonce used by the sender of the transaction.
538
+ * The block number on the chain.
493
539
  */
494
- nonce: string;
495
- from: RichAddress;
496
- to: RichAddress;
497
- method?: Method;
498
- value: string;
540
+ blockNumber: string;
499
541
  /**
500
- * The data sent for the transaction.
542
+ * The block finality timestamp.
501
543
  */
502
- input: string;
503
- baseFeePerGas: string;
504
- maxFeePerGas?: string;
505
- maxPriorityFeePerGas?: string;
506
- };
507
-
508
- declare enum InternalTransactionOpCall {
509
- UNKNOWN = "UNKNOWN",
510
- CALL = "CALL",
511
- CREATE = "CREATE",
512
- CREATE2 = "CREATE2",
513
- CALLCODE = "CALLCODE",
514
- DELEGATECALL = "DELEGATECALL",
515
- STATICCALL = "STATICCALL"
516
- }
517
-
518
- type InternalTransactionDetails = {
519
- from: RichAddress;
520
- to: RichAddress;
521
- internalTxType: InternalTransactionOpCall;
522
- value: string;
544
+ blockTimestamp: number;
523
545
  /**
524
- * True if the internal transaction was reverted.
546
+ * The block hash identifier.
525
547
  */
526
- isReverted: boolean;
527
- gasUsed: string;
528
- gasLimit: string;
529
- };
530
-
531
- type NetworkTokenDetails = {
532
- networkToken: NetworkToken;
548
+ blockHash: string;
533
549
  /**
534
- * The current token price, if available.
550
+ * The number of evm transactions in the block.
535
551
  */
536
- currentPrice?: Money;
552
+ txCount: number;
537
553
  /**
538
- * The historical token price at the time the transaction
539
- * occured, if available. Note, this is only provided if the transaction
540
- * occured more than 24 hours ago.
554
+ * The base gas fee for a transaction to be included in the block.
541
555
  */
542
- historicalPrice?: Money;
543
- };
544
-
545
- type GetTransactionResponse = {
556
+ baseFee: string;
546
557
  /**
547
- * The list of ERC-20 transfers.
558
+ * The gas used for transactions in the block.
548
559
  */
549
- erc20Transfers?: Array<Erc20TransferDetails>;
560
+ gasUsed: string;
550
561
  /**
551
- * The list of ERC-721 transfers.
562
+ * The total gas limit set for transactions in the block.
552
563
  */
553
- erc721Transfers?: Array<Erc721TransferDetails>;
564
+ gasLimit: string;
565
+ gasCost: string;
554
566
  /**
555
- * The list of ERC-1155 transfers.
567
+ * The hash of the parent block.
556
568
  */
557
- erc1155Transfers?: Array<Erc1155TransferDetails>;
569
+ parentHash: string;
558
570
  /**
559
- * The list of internal transactions. Note that this list only
560
- * includes CALL and
561
- * CALLCODE internal transactions that had a
562
- * non-zero value and
563
- * CREATE/CREATE2
564
- * calls. Use a client provider to recieve a full debug trace of the
565
- * transaction.
571
+ * The amount of fees spent/burned for transactions in the block.
566
572
  */
567
- internalTransactions?: Array<InternalTransactionDetails>;
568
- networkTokenDetails: NetworkTokenDetails;
569
- nativeTransaction: FullNativeTransactionDetails;
573
+ feesSpent: string;
574
+ /**
575
+ * The cumulative number of transactions for the chain including this block.
576
+ */
577
+ cumulativeTransactions: string;
570
578
  };
571
579
 
572
- type ProposerDetails = {
573
- proposerId?: string;
574
- proposerParentId?: string;
575
- proposerNodeId?: string;
576
- proposerPChainHeight?: number;
577
- proposerTimestamp?: number;
580
+ type ListEvmBlocksResponse = {
581
+ /**
582
+ * 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.
583
+ */
584
+ nextPageToken?: string;
585
+ blocks: Array<EvmBlock>;
578
586
  };
579
587
 
580
- type Block = {
581
- blockNumber: string;
582
- blockHash: string;
583
- parentHash: string;
584
- blockTimestamp: number;
585
- blockType: string;
586
- txCount: number;
587
- transactions?: Array<string>;
588
- blockSizeBytes: number;
589
- proposerDetails?: ProposerDetails;
588
+ declare class EvmBlocksService {
589
+ readonly httpRequest: BaseHttpRequest;
590
+ constructor(httpRequest: BaseHttpRequest);
591
+ /**
592
+ * List latest blocks
593
+ * Lists the latest indexed blocks on the EVM-compatible chain sorted in descending order by block timestamp.
594
+ * @returns ListEvmBlocksResponse
595
+ * @throws ApiError
596
+ */
597
+ getLatestBlocks({ chainId, pageSize, pageToken, }: {
598
+ /**
599
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
600
+ */
601
+ chainId: string;
602
+ /**
603
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
604
+ */
605
+ pageSize?: number;
606
+ /**
607
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
608
+ */
609
+ pageToken?: string;
610
+ }): CancelablePromise<ListEvmBlocksResponse>;
611
+ /**
612
+ * Get block
613
+ * Gets the details of an individual block on the EVM-compatible chain.
614
+ * @returns GetEvmBlockResponse
615
+ * @throws ApiError
616
+ */
617
+ getBlock({ chainId, blockId, }: {
618
+ /**
619
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
620
+ */
621
+ chainId: string;
622
+ /**
623
+ * A block identifier which is either a block number or the block hash.
624
+ */
625
+ blockId: string;
626
+ }): CancelablePromise<GetEvmBlockResponse>;
627
+ }
628
+
629
+ declare enum ChainStatus {
630
+ OK = "OK",
631
+ UNAVAILABLE = "UNAVAILABLE"
632
+ }
633
+
634
+ type NetworkToken = {
635
+ /**
636
+ * The contract name.
637
+ */
638
+ name: string;
639
+ /**
640
+ * The contract symbol.
641
+ */
642
+ symbol: string;
643
+ /**
644
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
645
+ */
646
+ decimals: number;
647
+ /**
648
+ * The logo uri for the address.
649
+ */
650
+ logoUri?: string;
651
+ description?: string;
652
+ };
653
+
654
+ type UtilityAddresses = {
655
+ multicall?: string;
590
656
  };
591
657
 
592
- type ListBlocksResponse = {
658
+ declare enum VmName {
659
+ EVM = "EVM",
660
+ BITCOIN = "BITCOIN",
661
+ ETHEREUM = "ETHEREUM"
662
+ }
663
+
664
+ type GetChainResponse = {
665
+ chainId: string;
593
666
  /**
594
- * 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.
667
+ * Status of chain nodes. Chain nodes can become temporarily `UNAVAILABLE` for several reasons, such as validator stake falling below threshold. If chain nodes are `UNAVAILABLE`, requests that rely on data from the chain nodes may return 503 errors.
595
668
  */
596
- nextPageToken?: string;
597
- blocks: Array<Block>;
669
+ status: ChainStatus;
670
+ chainName: string;
671
+ description: string;
672
+ platformChainId?: string;
673
+ subnetId?: string;
674
+ vmId?: string;
675
+ vmName: VmName;
676
+ explorerUrl?: string;
677
+ rpcUrl: string;
678
+ wsUrl?: string;
679
+ isTestnet: boolean;
680
+ utilityAddresses?: UtilityAddresses;
681
+ networkToken: NetworkToken;
682
+ chainLogoUri?: string;
598
683
  };
599
684
 
600
685
  type ChainInfo = {
601
686
  chainId: string;
602
687
  /**
603
- * Status of chain nodes. Chain nodes can become temporarily
604
- * `UNAVAILABLE` for several reasons, such as validator stake falling
605
- * below threshold. If chain nodes are `UNAVAILABLE`, requests that rely
606
- * on data from the chain nodes may return 503 errors.
688
+ * Status of chain nodes. Chain nodes can become temporarily `UNAVAILABLE` for several reasons, such as validator stake falling below threshold. If chain nodes are `UNAVAILABLE`, requests that rely on data from the chain nodes may return 503 errors.
607
689
  */
608
690
  status: ChainStatus;
609
691
  chainName: string;
@@ -625,118 +707,88 @@ type ListChainsResponse = {
625
707
  chains: Array<ChainInfo>;
626
708
  };
627
709
 
628
- type Erc1155TokenBalance = {
629
- /**
630
- * A wallet or contract address in mixed-case checksum encoding.
631
- */
632
- address: string;
633
- ercType: Erc1155TokenBalance.ercType;
634
- tokenId: string;
635
- tokenUri: string;
636
- metadata: Erc1155TokenMetadata;
710
+ declare enum NetworkType {
711
+ MAINNET = "mainnet",
712
+ TESTNET = "testnet"
713
+ }
714
+
715
+ declare class EvmChainsService {
716
+ readonly httpRequest: BaseHttpRequest;
717
+ constructor(httpRequest: BaseHttpRequest);
637
718
  /**
638
- * The evm chain id.
719
+ * List chains
720
+ * Lists the supported EVM-compatible chains. Filterable by network.
721
+ * @returns ListChainsResponse
722
+ * @throws ApiError
639
723
  */
640
- chainId: string;
724
+ supportedChains({ network, }: {
725
+ /**
726
+ * mainnet or testnet.
727
+ */
728
+ network?: NetworkType;
729
+ }): CancelablePromise<ListChainsResponse>;
641
730
  /**
642
- * The address balance for the token, in units specified by the
643
- * `decimals` value for the contract.
731
+ * Get chain information
732
+ * Gets chain information for the EVM-compatible chain if supported by the api.
733
+ * @returns GetChainResponse
734
+ * @throws ApiError
644
735
  */
645
- balance: string;
646
- };
647
- declare namespace Erc1155TokenBalance {
648
- enum ercType {
649
- ERC_1155 = "ERC-1155"
650
- }
736
+ getChainInfo({ chainId, }: {
737
+ /**
738
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
739
+ */
740
+ chainId: string;
741
+ }): CancelablePromise<GetChainResponse>;
651
742
  }
652
743
 
653
- type Erc721TokenBalance = {
744
+ type Erc1155Token = {
654
745
  /**
655
746
  * A wallet or contract address in mixed-case checksum encoding.
656
747
  */
657
748
  address: string;
658
- /**
659
- * The contract name.
660
- */
661
- name: string;
662
- /**
663
- * The contract symbol.
664
- */
665
- symbol: string;
666
- ercType: Erc721TokenBalance.ercType;
749
+ ercType: Erc1155Token.ercType;
667
750
  tokenId: string;
668
751
  tokenUri: string;
669
- metadata: Erc721TokenMetadata;
670
- /**
671
- * A wallet or contract address in mixed-case checksum encoding.
672
- */
673
- ownerAddress?: string;
674
- /**
675
- * The evm chain id.
676
- */
677
- chainId: string;
752
+ metadata: Erc1155TokenMetadata;
678
753
  };
679
- declare namespace Erc721TokenBalance {
754
+ declare namespace Erc1155Token {
680
755
  enum ercType {
681
- ERC_721 = "ERC-721"
756
+ ERC_1155 = "ERC-1155"
682
757
  }
683
758
  }
684
759
 
685
- type ListCollectibleBalancesResponse = {
686
- /**
687
- * 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.
688
- */
689
- nextPageToken?: string;
690
- /**
691
- * The list of ERC-721 and ERC-1155 token balances for the
692
- * address.
693
- */
694
- collectibleBalances: Array<(Erc721TokenBalance | Erc1155TokenBalance)>;
695
- };
696
-
697
- type ListErc1155BalancesResponse = {
698
- /**
699
- * 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.
700
- */
701
- nextPageToken?: string;
760
+ type RichAddress = {
702
761
  /**
703
- * The list of ERC-1155 token balances for the address.
762
+ * The contract name.
704
763
  */
705
- erc1155TokenBalances: Array<Erc1155TokenBalance>;
706
- };
707
-
708
- type Erc1155Transfer = {
764
+ name?: string;
709
765
  /**
710
- * The block number on the chain.
766
+ * The contract symbol.
711
767
  */
712
- blockNumber: string;
768
+ symbol?: string;
713
769
  /**
714
- * The block finality timestamp.
770
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
715
771
  */
716
- blockTimestamp: number;
772
+ decimals?: number;
717
773
  /**
718
- * The block hash identifier.
774
+ * The logo uri for the address.
719
775
  */
720
- blockHash: string;
776
+ logoUri?: string;
721
777
  /**
722
- * The transaction hash identifier.
778
+ * A wallet or contract address in mixed-case checksum encoding.
723
779
  */
724
- txHash: string;
780
+ address: string;
781
+ };
782
+
783
+ type Erc1155TransferDetails = {
725
784
  from: RichAddress;
726
785
  to: RichAddress;
786
+ logIndex: number;
727
787
  value: string;
728
788
  erc1155Token: Erc1155Token;
729
789
  };
730
790
 
731
- type ListErc1155TransactionsResponse = {
732
- /**
733
- * 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.
734
- */
735
- nextPageToken?: string;
736
- transactions: Array<Erc1155Transfer>;
737
- };
738
-
739
- type Erc20TokenBalance = {
791
+ type Erc20Token = {
740
792
  /**
741
793
  * A wallet or contract address in mixed-case checksum encoding.
742
794
  */
@@ -750,94 +802,90 @@ type Erc20TokenBalance = {
750
802
  */
751
803
  symbol: string;
752
804
  /**
753
- * The number of decimals the token uses. For example `6`,
754
- * means to divide the token amount by `1000000` to get its user
755
- * representation.
805
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
756
806
  */
757
807
  decimals: number;
758
808
  /**
759
809
  * The logo uri for the address.
760
810
  */
761
811
  logoUri?: string;
762
- ercType: Erc20TokenBalance.ercType;
812
+ ercType: Erc20Token.ercType;
763
813
  /**
764
814
  * The token price, if available.
765
815
  */
766
816
  price?: Money;
767
- /**
768
- * The evm chain id.
769
- */
770
- chainId: string;
771
- /**
772
- * The address balance for the token, in units specified by the
773
- * `decimals` value for the contract.
774
- */
775
- balance: string;
776
- /**
777
- * The monetary value of the balance, if a price is available for the token.
778
- */
779
- balanceValue?: Money;
780
817
  };
781
- declare namespace Erc20TokenBalance {
818
+ declare namespace Erc20Token {
782
819
  enum ercType {
783
820
  ERC_20 = "ERC-20"
784
821
  }
785
822
  }
786
823
 
787
- type ListErc20BalancesResponse = {
788
- /**
789
- * 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.
790
- */
791
- nextPageToken?: string;
792
- /**
793
- * The list of ERC-20 token balances for the address.
794
- */
795
- erc20TokenBalances: Array<Erc20TokenBalance>;
796
- };
797
-
798
- type Erc20Transfer = {
799
- /**
800
- * The block number on the chain.
801
- */
802
- blockNumber: string;
803
- /**
804
- * The block finality timestamp.
805
- */
806
- blockTimestamp: number;
807
- /**
808
- * The block hash identifier.
809
- */
810
- blockHash: string;
811
- /**
812
- * The transaction hash identifier.
813
- */
814
- txHash: string;
824
+ type Erc20TransferDetails = {
815
825
  from: RichAddress;
816
826
  to: RichAddress;
827
+ logIndex: number;
817
828
  value: string;
818
829
  erc20Token: Erc20Token;
819
830
  };
820
831
 
821
- type ListErc20TransactionsResponse = {
832
+ type Erc721Token = {
822
833
  /**
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.
834
+ * A wallet or contract address in mixed-case checksum encoding.
824
835
  */
825
- nextPageToken?: string;
826
- transactions: Array<Erc20Transfer>;
827
- };
828
-
829
- type ListErc721BalancesResponse = {
836
+ address: string;
830
837
  /**
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.
838
+ * The contract name.
832
839
  */
833
- nextPageToken?: string;
840
+ name: string;
834
841
  /**
835
- * The list of ERC-721 token balances for the address.
842
+ * The contract symbol.
836
843
  */
837
- erc721TokenBalances: Array<Erc721TokenBalance>;
844
+ symbol: string;
845
+ ercType: Erc721Token.ercType;
846
+ tokenId: string;
847
+ tokenUri: string;
848
+ metadata: Erc721TokenMetadata;
849
+ /**
850
+ * A wallet or contract address in mixed-case checksum encoding.
851
+ */
852
+ ownerAddress?: string;
838
853
  };
854
+ declare namespace Erc721Token {
855
+ enum ercType {
856
+ ERC_721 = "ERC-721"
857
+ }
858
+ }
839
859
 
840
- type Erc721Transfer = {
860
+ type Erc721TransferDetails = {
861
+ from: RichAddress;
862
+ to: RichAddress;
863
+ logIndex: number;
864
+ erc721Token: Erc721Token;
865
+ };
866
+
867
+ declare enum TransactionMethodType {
868
+ NATIVE_TRANSFER = "NATIVE_TRANSFER",
869
+ CONTRACT_CALL = "CONTRACT_CALL",
870
+ CONTRACT_CREATION = "CONTRACT_CREATION"
871
+ }
872
+
873
+ type Method = {
874
+ /**
875
+ * The contract call type. NATIVE_TRANSFER indicates a transfer of the native token without any smart-contract interaction. CONTRACT_CALL indicates a smart-contract interaction. CONTRACT_CREATION indicates a smart-contract creation.
876
+ */
877
+ callType: TransactionMethodType;
878
+ /**
879
+ * The contract method hash identifier. The method hash is only set if the `callType` is `CONTRACT_CALL`.
880
+ */
881
+ methodHash: string;
882
+ /**
883
+ * 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'.
884
+ */
885
+ methodName?: string;
886
+ };
887
+
888
+ type FullNativeTransactionDetails = {
841
889
  /**
842
890
  * The block number on the chain.
843
891
  */
@@ -850,51 +898,62 @@ type Erc721Transfer = {
850
898
  * The block hash identifier.
851
899
  */
852
900
  blockHash: string;
901
+ /**
902
+ * The index at which the transaction occured in the block (0-indexed).
903
+ */
904
+ blockIndex: number;
853
905
  /**
854
906
  * The transaction hash identifier.
855
907
  */
856
908
  txHash: string;
857
- from: RichAddress;
858
- to: RichAddress;
859
- erc721Token: Erc721Token;
860
- };
861
-
862
- type ListErc721TransactionsResponse = {
863
909
  /**
864
- * 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.
910
+ * The transaction status, which is either 0 (failed) or 1 (successful).
865
911
  */
866
- nextPageToken?: string;
867
- transactions: Array<Erc721Transfer>;
868
- };
869
-
870
- declare enum ListingEventType {
871
- OPEN_LISTING = "OPEN_LISTING",
872
- CANCEL_LISTING = "CANCEL_LISTING",
873
- PURCHASE_LISTING = "PURCHASE_LISTING",
874
- CLOSE_AUCTION = "CLOSE_AUCTION"
875
- }
876
-
877
- declare enum ListingsSortByOption {
878
- LAST_EVENT_TIMESTAMP = "lastEventTimestamp"
879
- }
880
-
881
- type InternalTransaction = {
912
+ txStatus: string;
882
913
  /**
883
- * The block number on the chain.
914
+ * The transaction type.
884
915
  */
885
- blockNumber: string;
916
+ txType: number;
886
917
  /**
887
- * The block finality timestamp.
918
+ * The gas limit set for the transaction.
888
919
  */
889
- blockTimestamp: number;
920
+ gasLimit: string;
890
921
  /**
891
- * The block hash identifier.
922
+ * The amount of gas used.
892
923
  */
893
- blockHash: string;
924
+ gasUsed: string;
894
925
  /**
895
- * The transaction hash identifier.
926
+ * The gas price denominated by the number of decimals of the native token.
896
927
  */
897
- txHash: string;
928
+ gasPrice: string;
929
+ /**
930
+ * The nonce used by the sender of the transaction.
931
+ */
932
+ nonce: string;
933
+ from: RichAddress;
934
+ to: RichAddress;
935
+ method?: Method;
936
+ value: string;
937
+ /**
938
+ * The data sent for the transaction.
939
+ */
940
+ input: string;
941
+ baseFeePerGas: string;
942
+ maxFeePerGas?: string;
943
+ maxPriorityFeePerGas?: string;
944
+ };
945
+
946
+ declare enum InternalTransactionOpCall {
947
+ UNKNOWN = "UNKNOWN",
948
+ CALL = "CALL",
949
+ CREATE = "CREATE",
950
+ CREATE2 = "CREATE2",
951
+ CALLCODE = "CALLCODE",
952
+ DELEGATECALL = "DELEGATECALL",
953
+ STATICCALL = "STATICCALL"
954
+ }
955
+
956
+ type InternalTransactionDetails = {
898
957
  from: RichAddress;
899
958
  to: RichAddress;
900
959
  internalTxType: InternalTransactionOpCall;
@@ -907,29 +966,61 @@ type InternalTransaction = {
907
966
  gasLimit: string;
908
967
  };
909
968
 
910
- type ListInternalTransactionsResponse = {
969
+ type NetworkTokenDetails = {
970
+ networkToken: NetworkToken;
911
971
  /**
912
- * 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.
972
+ * The current token price, if available.
913
973
  */
914
- nextPageToken?: string;
915
- transactions: Array<InternalTransaction>;
974
+ currentPrice?: Money;
975
+ /**
976
+ * The historical token price at the time the transaction occured, if available. Note, this is only provided if the transaction occured more than 24 hours ago.
977
+ */
978
+ historicalPrice?: Money;
916
979
  };
917
980
 
918
- type CancelListingEventResponse = {
919
- eventTimestamp: number;
981
+ type GetTransactionResponse = {
982
+ /**
983
+ * The list of ERC-20 transfers.
984
+ */
985
+ erc20Transfers?: Array<Erc20TransferDetails>;
986
+ /**
987
+ * The list of ERC-721 transfers.
988
+ */
989
+ erc721Transfers?: Array<Erc721TransferDetails>;
990
+ /**
991
+ * The list of ERC-1155 transfers.
992
+ */
993
+ erc1155Transfers?: Array<Erc1155TransferDetails>;
994
+ /**
995
+ * The list of internal transactions. Note that this list only includes CALL and CALLCODE internal transactions that had a non-zero value and CREATE/CREATE2 calls. Use a client provider to recieve a full debug trace of the transaction.
996
+ */
997
+ internalTransactions?: Array<InternalTransactionDetails>;
998
+ networkTokenDetails: NetworkTokenDetails;
999
+ nativeTransaction: FullNativeTransactionDetails;
920
1000
  };
921
1001
 
922
- type CloseAuctionEventResponse = {
923
- eventTimestamp: number;
924
- purchaseTxHash?: string;
1002
+ type ContractDeploymentDetails = {
1003
+ txHash: string;
1004
+ /**
1005
+ * The address that initiated the transaction which deployed this contract.
1006
+ */
1007
+ deployerAddress: string;
1008
+ /**
1009
+ * The contract address which deployed this contract via smart contract. This field is only populated when the contract was deployed as part of smart contract execution.
1010
+ */
1011
+ deployerContractAddress?: string;
925
1012
  };
926
1013
 
927
- declare enum ErcType {
928
- ERC_20 = "ERC-20",
929
- ERC_721 = "ERC-721",
930
- ERC_1155 = "ERC-1155",
931
- UNKNOWN = "UNKNOWN"
932
- }
1014
+ type ImageAsset = {
1015
+ /**
1016
+ * INPUT ONLY
1017
+ */
1018
+ assetId?: string;
1019
+ /**
1020
+ * OUTPUT ONLY
1021
+ */
1022
+ imageUri?: string;
1023
+ };
933
1024
 
934
1025
  declare enum ResourceLinkType {
935
1026
  BLOG = "Blog",
@@ -957,112 +1048,139 @@ type ResourceLink = {
957
1048
  url: string;
958
1049
  };
959
1050
 
960
- type NftCollection = {
1051
+ type Erc1155Contract = {
1052
+ /**
1053
+ * The contract name.
1054
+ */
1055
+ name?: string;
1056
+ description?: string;
1057
+ officialSite?: string;
1058
+ email?: string;
1059
+ logoAsset?: ImageAsset;
1060
+ bannerAsset?: ImageAsset;
1061
+ color?: string;
1062
+ coingeckoCoinId?: string;
1063
+ resourceLinks?: Array<ResourceLink>;
1064
+ tags?: Array<string>;
961
1065
  /**
962
1066
  * A wallet or contract address in mixed-case checksum encoding.
963
1067
  */
964
1068
  address: string;
1069
+ deploymentDetails: ContractDeploymentDetails;
1070
+ ercType: Erc1155Contract.ercType;
965
1071
  /**
966
- * The contract name.
1072
+ * The contract symbol.
967
1073
  */
968
- name: string;
1074
+ symbol?: string;
1075
+ };
1076
+ declare namespace Erc1155Contract {
1077
+ enum ercType {
1078
+ ERC_1155 = "ERC-1155"
1079
+ }
1080
+ }
1081
+
1082
+ type Erc20Contract = {
969
1083
  /**
970
- * The contract symbol.
1084
+ * The contract name.
971
1085
  */
972
- symbol: string;
973
- ercType: ErcType;
974
- bannerUri?: string;
975
- logoUri?: string;
1086
+ name?: string;
976
1087
  description?: string;
1088
+ officialSite?: string;
1089
+ email?: string;
1090
+ logoAsset?: ImageAsset;
1091
+ bannerAsset?: ImageAsset;
1092
+ color?: string;
1093
+ coingeckoCoinId?: string;
977
1094
  resourceLinks?: Array<ResourceLink>;
978
- };
979
-
980
- type Address = {
1095
+ tags?: Array<string>;
981
1096
  /**
982
1097
  * A wallet or contract address in mixed-case checksum encoding.
983
1098
  */
984
1099
  address: string;
1100
+ deploymentDetails: ContractDeploymentDetails;
1101
+ ercType: Erc20Contract.ercType;
1102
+ /**
1103
+ * The contract symbol.
1104
+ */
1105
+ symbol?: string;
1106
+ /**
1107
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
1108
+ */
1109
+ decimals: number;
985
1110
  };
986
-
987
- declare enum ListingCurrencyType {
988
- NATIVE = "NATIVE",
989
- ERC20 = "ERC20"
990
- }
991
-
992
- declare enum ListingType {
993
- SALE = "SALE",
994
- AUCTION = "AUCTION"
1111
+ declare namespace Erc20Contract {
1112
+ enum ercType {
1113
+ ERC_20 = "ERC-20"
1114
+ }
995
1115
  }
996
1116
 
997
- type TokenWithPrice = {
1117
+ type Erc721Contract = {
998
1118
  /**
999
- * A wallet or contract address in mixed-case checksum encoding.
1119
+ * The contract name.
1000
1120
  */
1001
- address?: string;
1121
+ name?: string;
1122
+ description?: string;
1123
+ officialSite?: string;
1124
+ email?: string;
1125
+ logoAsset?: ImageAsset;
1126
+ bannerAsset?: ImageAsset;
1127
+ color?: string;
1128
+ coingeckoCoinId?: string;
1129
+ resourceLinks?: Array<ResourceLink>;
1130
+ tags?: Array<string>;
1002
1131
  /**
1003
- * The contract name.
1132
+ * A wallet or contract address in mixed-case checksum encoding.
1004
1133
  */
1005
- name: string;
1134
+ address: string;
1135
+ deploymentDetails: ContractDeploymentDetails;
1136
+ ercType: Erc721Contract.ercType;
1006
1137
  /**
1007
1138
  * The contract symbol.
1008
1139
  */
1009
- symbol: string;
1140
+ symbol?: string;
1141
+ };
1142
+ declare namespace Erc721Contract {
1143
+ enum ercType {
1144
+ ERC_721 = "ERC-721"
1145
+ }
1146
+ }
1147
+
1148
+ type UnknownContract = {
1010
1149
  /**
1011
- * The number of decimals the token uses. For example `6`,
1012
- * means to divide the token amount by `1000000` to get its user
1013
- * representation.
1150
+ * The contract name.
1014
1151
  */
1015
- decimals: number;
1152
+ name?: string;
1153
+ description?: string;
1154
+ officialSite?: string;
1155
+ email?: string;
1156
+ logoAsset?: ImageAsset;
1157
+ bannerAsset?: ImageAsset;
1158
+ color?: string;
1159
+ coingeckoCoinId?: string;
1160
+ resourceLinks?: Array<ResourceLink>;
1161
+ tags?: Array<string>;
1016
1162
  /**
1017
- * The token price, if available.
1163
+ * A wallet or contract address in mixed-case checksum encoding.
1018
1164
  */
1019
- price?: Money;
1020
- };
1021
-
1022
- type OpenListingEventResponse = {
1023
- eventTimestamp: number;
1024
- listingType: ListingType;
1025
- listingPrice?: string;
1026
- listingCurrencyType: ListingCurrencyType;
1027
- listingCurrencyInfo: TokenWithPrice;
1028
- sellerAddress: Address;
1029
- startingPrice?: string;
1030
- auctionCloseTimestamp?: number;
1031
- };
1032
-
1033
- type PurchaseListingEventResponse = {
1034
- eventTimestamp: number;
1035
- listingPrice: string;
1036
- listingCurrencyType: ListingCurrencyType;
1037
- listingCurrencyInfo: TokenWithPrice;
1038
- sellerAddress: Address;
1039
- salePrice: string;
1040
- buyerAddress: Address;
1041
- saleTimestamp: number;
1042
- purchaseTxHash?: string;
1043
- };
1044
-
1045
- type ListingResponse = {
1046
- marketplaceName: string;
1047
- chainId: string;
1048
- collection: NftCollection;
1049
- token: any;
1050
- listingId: string;
1051
- openListingEvents?: Array<OpenListingEventResponse>;
1052
- cancelListingEvents?: Array<CancelListingEventResponse>;
1053
- purchaseListingEvents?: Array<PurchaseListingEventResponse>;
1054
- closeAuctionEvents?: Array<CloseAuctionEventResponse>;
1165
+ address: string;
1166
+ deploymentDetails: ContractDeploymentDetails;
1167
+ ercType: UnknownContract.ercType;
1055
1168
  };
1169
+ declare namespace UnknownContract {
1170
+ enum ercType {
1171
+ UNKNOWN = "UNKNOWN"
1172
+ }
1173
+ }
1056
1174
 
1057
- type ListListingsResponse = {
1175
+ type ListContractsResponse = {
1058
1176
  /**
1059
1177
  * 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.
1060
1178
  */
1061
1179
  nextPageToken?: string;
1062
- listings: Array<ListingResponse>;
1180
+ contracts: Array<(UnknownContract | Erc20Contract | Erc721Contract | Erc1155Contract)>;
1063
1181
  };
1064
1182
 
1065
- type NativeTransaction = {
1183
+ type Erc1155Transfer = {
1066
1184
  /**
1067
1185
  * The block number on the chain.
1068
1186
  */
@@ -1075,118 +1193,182 @@ type NativeTransaction = {
1075
1193
  * The block hash identifier.
1076
1194
  */
1077
1195
  blockHash: string;
1078
- /**
1079
- * The index at which the transaction occured in the block (0-indexed).
1080
- */
1081
- blockIndex: number;
1082
1196
  /**
1083
1197
  * The transaction hash identifier.
1084
1198
  */
1085
1199
  txHash: string;
1086
- /**
1087
- * The transaction status, which is either 0 (failed) or 1 (successful).
1088
- */
1089
- txStatus: string;
1090
- /**
1091
- * The transaction type.
1092
- */
1093
- txType: number;
1094
- /**
1095
- * The gas limit set for the transaction.
1096
- */
1097
- gasLimit: string;
1098
- /**
1099
- * The amount of gas used.
1100
- */
1101
- gasUsed: string;
1102
- /**
1103
- * The gas price denominated by the number of decimals of the native token.
1104
- */
1105
- gasPrice: string;
1106
- /**
1107
- * The nonce used by the sender of the transaction.
1108
- */
1109
- nonce: string;
1110
1200
  from: RichAddress;
1111
1201
  to: RichAddress;
1112
- method?: Method;
1202
+ logIndex: number;
1113
1203
  value: string;
1204
+ erc1155Token: Erc1155Token;
1114
1205
  };
1115
1206
 
1116
- type ListNativeTransactionsResponse = {
1207
+ type ListErc1155TransactionsResponse = {
1117
1208
  /**
1118
1209
  * 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.
1119
1210
  */
1120
1211
  nextPageToken?: string;
1121
- transactions: Array<NativeTransaction>;
1212
+ transactions: Array<Erc1155Transfer>;
1122
1213
  };
1123
1214
 
1124
- type CollectionMetrics = {
1215
+ type Erc20Transfer = {
1216
+ /**
1217
+ * The block number on the chain.
1218
+ */
1219
+ blockNumber: string;
1220
+ /**
1221
+ * The block finality timestamp.
1222
+ */
1223
+ blockTimestamp: number;
1125
1224
  /**
1126
- * The timeframe used to calculate the metrics
1225
+ * The block hash identifier.
1127
1226
  */
1128
- timeframe: string;
1227
+ blockHash: string;
1129
1228
  /**
1130
- * The number of sales between (now) & (now - timeframe)
1229
+ * The transaction hash identifier.
1131
1230
  */
1132
- salesInTimeframe: number;
1231
+ txHash: string;
1232
+ from: RichAddress;
1233
+ to: RichAddress;
1234
+ logIndex: number;
1235
+ value: string;
1236
+ erc20Token: Erc20Token;
1237
+ };
1238
+
1239
+ type ListErc20TransactionsResponse = {
1133
1240
  /**
1134
- * The number of sales between (now - timeframe) & (now - (2 * timeframe))
1241
+ * 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.
1135
1242
  */
1136
- salesInPreviousTimeframe: number;
1243
+ nextPageToken?: string;
1244
+ transactions: Array<Erc20Transfer>;
1245
+ };
1246
+
1247
+ type Erc721Transfer = {
1137
1248
  /**
1138
- * The total value of sales between (now) & (now - timeframe)
1249
+ * The block number on the chain.
1139
1250
  */
1140
- totalValueInTimeframe: string;
1251
+ blockNumber: string;
1141
1252
  /**
1142
- * The total value of sales between (now - timeframe) & (now - (2 * timeframe))
1253
+ * The block finality timestamp.
1143
1254
  */
1144
- totalValueInPreviousTimeframe: string;
1255
+ blockTimestamp: number;
1145
1256
  /**
1146
- * The change in volume between (now) & (now - timeframe)
1257
+ * The block hash identifier.
1147
1258
  */
1148
- volumeChange?: number;
1259
+ blockHash: string;
1149
1260
  /**
1150
- * The average sale price for sales between (now) & (now - timeframe)
1261
+ * The transaction hash identifier.
1151
1262
  */
1152
- averagePriceInTimeframe: string;
1263
+ txHash: string;
1264
+ from: RichAddress;
1265
+ to: RichAddress;
1266
+ logIndex: number;
1267
+ erc721Token: Erc721Token;
1268
+ };
1269
+
1270
+ type ListErc721TransactionsResponse = {
1153
1271
  /**
1154
- * The average sale price for sales between (now - timeframe) & (now - (2 * timeframe))
1272
+ * 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.
1155
1273
  */
1156
- averagePriceInPreviousTimeframe: string;
1157
- latestSaleTimestamp?: number;
1158
- marketplaceFloorPrices: Array<string>;
1159
- minFloorPrice?: string;
1160
- minFloorPriceMarketplace?: string;
1274
+ nextPageToken?: string;
1275
+ transactions: Array<Erc721Transfer>;
1161
1276
  };
1162
1277
 
1163
- type NftCollectionWithMetrics = {
1278
+ type InternalTransaction = {
1164
1279
  /**
1165
- * A wallet or contract address in mixed-case checksum encoding.
1280
+ * The block number on the chain.
1166
1281
  */
1167
- address: string;
1282
+ blockNumber: string;
1168
1283
  /**
1169
- * The contract name.
1284
+ * The block finality timestamp.
1170
1285
  */
1171
- name: string;
1286
+ blockTimestamp: number;
1172
1287
  /**
1173
- * The contract symbol.
1288
+ * The block hash identifier.
1174
1289
  */
1175
- symbol: string;
1176
- ercType: ErcType;
1177
- bannerUri?: string;
1178
- logoUri?: string;
1179
- description?: string;
1180
- resourceLinks?: Array<ResourceLink>;
1181
- metrics: CollectionMetrics;
1290
+ blockHash: string;
1291
+ /**
1292
+ * The transaction hash identifier.
1293
+ */
1294
+ txHash: string;
1295
+ from: RichAddress;
1296
+ to: RichAddress;
1297
+ internalTxType: InternalTransactionOpCall;
1298
+ value: string;
1299
+ /**
1300
+ * True if the internal transaction was reverted.
1301
+ */
1302
+ isReverted: boolean;
1303
+ gasUsed: string;
1304
+ gasLimit: string;
1305
+ };
1306
+
1307
+ type ListInternalTransactionsResponse = {
1308
+ /**
1309
+ * 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.
1310
+ */
1311
+ nextPageToken?: string;
1312
+ transactions: Array<InternalTransaction>;
1313
+ };
1314
+
1315
+ type NativeTransaction = {
1316
+ /**
1317
+ * The block number on the chain.
1318
+ */
1319
+ blockNumber: string;
1320
+ /**
1321
+ * The block finality timestamp.
1322
+ */
1323
+ blockTimestamp: number;
1324
+ /**
1325
+ * The block hash identifier.
1326
+ */
1327
+ blockHash: string;
1328
+ /**
1329
+ * The index at which the transaction occured in the block (0-indexed).
1330
+ */
1331
+ blockIndex: number;
1332
+ /**
1333
+ * The transaction hash identifier.
1334
+ */
1335
+ txHash: string;
1336
+ /**
1337
+ * The transaction status, which is either 0 (failed) or 1 (successful).
1338
+ */
1339
+ txStatus: string;
1340
+ /**
1341
+ * The transaction type.
1342
+ */
1343
+ txType: number;
1344
+ /**
1345
+ * The gas limit set for the transaction.
1346
+ */
1347
+ gasLimit: string;
1348
+ /**
1349
+ * The amount of gas used.
1350
+ */
1351
+ gasUsed: string;
1352
+ /**
1353
+ * The gas price denominated by the number of decimals of the native token.
1354
+ */
1355
+ gasPrice: string;
1356
+ /**
1357
+ * The nonce used by the sender of the transaction.
1358
+ */
1359
+ nonce: string;
1360
+ from: RichAddress;
1361
+ to: RichAddress;
1362
+ method?: Method;
1363
+ value: string;
1182
1364
  };
1183
1365
 
1184
- type ListNftCollectionWithMetricsResponse = {
1366
+ type ListNativeTransactionsResponse = {
1185
1367
  /**
1186
1368
  * 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.
1187
1369
  */
1188
1370
  nextPageToken?: string;
1189
- collections: Array<NftCollectionWithMetrics>;
1371
+ transactions: Array<NativeTransaction>;
1190
1372
  };
1191
1373
 
1192
1374
  type TransactionDetails = {
@@ -1207,13 +1389,7 @@ type TransactionDetails = {
1207
1389
  */
1208
1390
  erc1155Transfers?: Array<Erc1155TransferDetails>;
1209
1391
  /**
1210
- * The list of internal transactions. Note that this list only
1211
- * includes CALL and
1212
- * CALLCODE internal transactions that had a
1213
- * non-zero value and
1214
- * CREATE/CREATE2
1215
- * calls. Use a client provider to recieve a full debug trace of the
1216
- * transaction.
1392
+ * The list of internal transactions. Note that this list only includes CALL and CALLCODE internal transactions that had a non-zero value and CREATE/CREATE2 calls. Use a client provider to recieve a full debug trace of the transaction.
1217
1393
  */
1218
1394
  internalTransactions?: Array<InternalTransactionDetails>;
1219
1395
  };
@@ -1234,36 +1410,6 @@ type ListTransfersResponse = {
1234
1410
  transfers: (Array<Erc20Transfer> | Array<Erc721Transfer> | Array<Erc1155Transfer>);
1235
1411
  };
1236
1412
 
1237
- declare enum NftSearchResultTypeOption {
1238
- TOKEN = "token",
1239
- COLLECTION = "collection"
1240
- }
1241
-
1242
- type NftFilterOptionsProperty = {
1243
- /**
1244
- * Filters search results by collection or token.
1245
- */
1246
- resultType: NftSearchResultTypeOption;
1247
- };
1248
-
1249
- type PaginationParams = {
1250
- /**
1251
- * The maximum number of items to return.
1252
- */
1253
- pageSize?: number;
1254
- /**
1255
- * A page token, received from a previous list call.
1256
- * Provide this to retrieve the subsequent page.
1257
- */
1258
- pageToken?: string;
1259
- };
1260
-
1261
- type NftSearchBody = {
1262
- searchQuery: string;
1263
- paginationParams?: PaginationParams;
1264
- filterOptions: NftFilterOptionsProperty;
1265
- };
1266
-
1267
1413
  declare enum SortOrder {
1268
1414
  ASC = "asc",
1269
1415
  DESC = "desc"
@@ -1274,44 +1420,38 @@ declare enum TransactionStatus {
1274
1420
  SUCCESS = "success"
1275
1421
  }
1276
1422
 
1277
- declare enum TrendingTimeframe {
1278
- DAY = "day",
1279
- WEEK = "week",
1280
- MONTH = "month"
1281
- }
1282
-
1283
- declare class EvmService {
1423
+ declare class EvmTransactionsService {
1284
1424
  readonly httpRequest: BaseHttpRequest;
1285
1425
  constructor(httpRequest: BaseHttpRequest);
1286
1426
  /**
1287
- * Get native token balance of a wallet address for a given chain.
1288
- * @returns GetNativeBalanceResponse
1427
+ * Get deployment transaction
1428
+ * If the address is a smart contract, returns the transaction in which it was deployed.
1429
+ * @returns GetTransactionResponse
1289
1430
  * @throws ApiError
1290
1431
  */
1291
- getNativeBalance({ chainId, address, currency, }: {
1432
+ getDeploymentTransaction({ chainId, address, currency, }: {
1292
1433
  /**
1293
- * A supported evm chain id. Use the `/chains` endpoint to get
1294
- * a list of supported chain ids.
1434
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1295
1435
  */
1296
1436
  chainId: string;
1297
1437
  /**
1298
- * A wallet address.
1438
+ * Contract address on the relevant chain.
1299
1439
  */
1300
1440
  address: string;
1301
1441
  /**
1302
1442
  * The currency that return values should use. Defaults to USD.
1303
1443
  */
1304
1444
  currency?: CurrencyCode;
1305
- }): CancelablePromise<GetNativeBalanceResponse>;
1445
+ }): CancelablePromise<GetTransactionResponse>;
1306
1446
  /**
1307
- * List ERC-20 token balances of a wallet address for a given chain.
1308
- * @returns ListErc20BalancesResponse
1447
+ * List deployed contracts
1448
+ * Lists all contracts deployed by the given address.
1449
+ * @returns ListContractsResponse
1309
1450
  * @throws ApiError
1310
1451
  */
1311
- listErc20Balances({ chainId, address, pageSize, pageToken, currency, }: {
1452
+ listContractDeployments({ chainId, address, pageSize, pageToken, }: {
1312
1453
  /**
1313
- * A supported evm chain id. Use the `/chains` endpoint to get
1314
- * a list of supported chain ids.
1454
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1315
1455
  */
1316
1456
  chainId: string;
1317
1457
  /**
@@ -1319,53 +1459,51 @@ declare class EvmService {
1319
1459
  */
1320
1460
  address: string;
1321
1461
  /**
1322
- * The maximum number of items to return. The minimum page size
1323
- * is 1. The maximum pageSize is 100.
1462
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1324
1463
  */
1325
1464
  pageSize?: number;
1326
1465
  /**
1327
1466
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1328
1467
  */
1329
1468
  pageToken?: string;
1330
- /**
1331
- * The currency that return values should use. Defaults to USD.
1332
- */
1333
- currency?: CurrencyCode;
1334
- }): CancelablePromise<ListErc20BalancesResponse>;
1469
+ }): CancelablePromise<ListContractsResponse>;
1335
1470
  /**
1336
- * List ERC-721 token balances of a wallet address for a given chain.
1337
- * @returns ListErc721BalancesResponse
1471
+ * List ERC transfers
1472
+ * Lists ERC transfers for an ERC-20, ERC-721, or ERC-1155 contract address.
1473
+ * @returns ListTransfersResponse
1338
1474
  * @throws ApiError
1339
1475
  */
1340
- listErc721Balances({ chainId, address, pageSize, pageToken, }: {
1476
+ listTransfers({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1341
1477
  /**
1342
- * A supported evm chain id. Use the `/chains` endpoint to get
1343
- * a list of supported chain ids.
1478
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1344
1479
  */
1345
1480
  chainId: string;
1346
1481
  /**
1347
1482
  * A wallet address.
1348
1483
  */
1349
1484
  address: string;
1485
+ startBlock?: number;
1486
+ endBlock?: number;
1350
1487
  /**
1351
- * The maximum number of items to return. The minimum page size
1352
- * is 1. The maximum pageSize is 100.
1488
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1353
1489
  */
1354
1490
  pageSize?: number;
1355
1491
  /**
1356
1492
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1357
1493
  */
1358
1494
  pageToken?: string;
1359
- }): CancelablePromise<ListErc721BalancesResponse>;
1495
+ }): CancelablePromise<ListTransfersResponse>;
1360
1496
  /**
1361
- * List ERC-1155 token balances of a wallet address for a given chain.
1362
- * @returns ListErc1155BalancesResponse
1497
+ * List transactions
1498
+ * Returns a list of transactions where the given wallet address had an on-chain interaction for the given chain. The ERC-20 transfers, ERC-721 transfers, ERC-1155, and internal transactions returned are only those where the input address had an interaction. Specifically, those lists only inlcude entries where the input address was the sender (`from` field) or the receiver (`to` field) for the sub-transaction. 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.
1499
+ *
1500
+ * Filterable by block ranges.
1501
+ * @returns ListTransactionDetailsResponse
1363
1502
  * @throws ApiError
1364
1503
  */
1365
- listErc1155Balances({ chainId, address, pageSize, pageToken, }: {
1504
+ listTransactions({ chainId, address, pageSize, pageToken, startBlock, endBlock, sortOrder, }: {
1366
1505
  /**
1367
- * A supported evm chain id. Use the `/chains` endpoint to get
1368
- * a list of supported chain ids.
1506
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1369
1507
  */
1370
1508
  chainId: string;
1371
1509
  /**
@@ -1373,499 +1511,1208 @@ declare class EvmService {
1373
1511
  */
1374
1512
  address: string;
1375
1513
  /**
1376
- * The maximum number of items to return. The minimum page size
1377
- * is 1. The maximum pageSize is 100.
1514
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1378
1515
  */
1379
1516
  pageSize?: number;
1380
1517
  /**
1381
1518
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1382
1519
  */
1383
1520
  pageToken?: string;
1384
- }): CancelablePromise<ListErc1155BalancesResponse>;
1521
+ startBlock?: number;
1522
+ endBlock?: number;
1523
+ /**
1524
+ * The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
1525
+ */
1526
+ sortOrder?: SortOrder;
1527
+ }): CancelablePromise<ListTransactionDetailsResponse>;
1385
1528
  /**
1386
- * List ERC-721 and ERC-1155 token balances of a wallet address
1387
- * for a given chain.
1388
- * @returns ListCollectibleBalancesResponse
1529
+ * List native transactions
1530
+ * Lists native transactions for an address. Filterable by block range.
1531
+ * @returns ListNativeTransactionsResponse
1389
1532
  * @throws ApiError
1390
1533
  */
1391
- listCollectibleBalances({ chainId, address, pageSize, pageToken, }: {
1534
+ listNativeTransactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1392
1535
  /**
1393
- * A supported evm chain id. Use the `/chains` endpoint to get
1394
- * a list of supported chain ids.
1536
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1395
1537
  */
1396
1538
  chainId: string;
1397
1539
  /**
1398
1540
  * A wallet address.
1399
1541
  */
1400
1542
  address: string;
1543
+ startBlock?: number;
1544
+ endBlock?: number;
1401
1545
  /**
1402
- * The maximum number of items to return. The minimum page size
1403
- * is 1. The maximum pageSize is 100.
1546
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1404
1547
  */
1405
1548
  pageSize?: number;
1406
1549
  /**
1407
1550
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1408
1551
  */
1409
1552
  pageToken?: string;
1410
- }): CancelablePromise<ListCollectibleBalancesResponse>;
1553
+ }): CancelablePromise<ListNativeTransactionsResponse>;
1411
1554
  /**
1412
- * Returns the latest blocks indexed for the chain.
1413
- * @returns ListBlocksResponse
1555
+ * List ERC-20 transfers
1556
+ * Lists ERC-20 transfers for an address. Filterable by block range.
1557
+ * @returns ListErc20TransactionsResponse
1414
1558
  * @throws ApiError
1415
1559
  */
1416
- getLatestBlocks({ chainId, pageSize, pageToken, }: {
1560
+ listErc20Transactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1417
1561
  /**
1418
- * A supported evm chain id. Use the `/chains` endpoint to get
1419
- * a list of supported chain ids.
1562
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1420
1563
  */
1421
1564
  chainId: string;
1422
1565
  /**
1423
- * The maximum number of items to return. The minimum page size
1424
- * is 1. The maximum pageSize is 100.
1566
+ * A wallet address.
1567
+ */
1568
+ address: string;
1569
+ startBlock?: number;
1570
+ endBlock?: number;
1571
+ /**
1572
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1425
1573
  */
1426
1574
  pageSize?: number;
1427
1575
  /**
1428
1576
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1429
1577
  */
1430
1578
  pageToken?: string;
1431
- }): CancelablePromise<ListBlocksResponse>;
1579
+ }): CancelablePromise<ListErc20TransactionsResponse>;
1432
1580
  /**
1433
- * Returns the details of an individual block for the chain.
1434
- * @returns GetBlockResponse
1581
+ * List ERC-721 transfers
1582
+ * Lists ERC-721 transfers for an address. Filterable by block range.
1583
+ * @returns ListErc721TransactionsResponse
1435
1584
  * @throws ApiError
1436
1585
  */
1437
- getBlock({ chainId, blockId, }: {
1586
+ listErc721Transactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1438
1587
  /**
1439
- * A supported evm chain id. Use the `/chains` endpoint to get
1440
- * a list of supported chain ids.
1588
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1441
1589
  */
1442
1590
  chainId: string;
1443
1591
  /**
1444
- * A block identifier which is either a block number or the block hash.
1445
- */
1446
- blockId: string;
1447
- }): CancelablePromise<GetBlockResponse>;
1448
- /**
1449
- * If the address is a smart contract, returns the transaction at which it was deployed.
1450
- * @returns GetTransactionResponse
1451
- * @throws ApiError
1452
- */
1453
- getDeploymentTransaction({ chainId, address, currency, }: {
1454
- /**
1455
- * A supported evm chain id. Use the `/chains` endpoint to get
1456
- * a list of supported chain ids.
1592
+ * A wallet address.
1457
1593
  */
1458
- chainId: string;
1594
+ address: string;
1595
+ startBlock?: number;
1596
+ endBlock?: number;
1459
1597
  /**
1460
- * Contract address on the relevant chain.
1598
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1461
1599
  */
1462
- address: string;
1600
+ pageSize?: number;
1463
1601
  /**
1464
- * The currency that return values should use. Defaults to USD.
1602
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1465
1603
  */
1466
- currency?: CurrencyCode;
1467
- }): CancelablePromise<GetTransactionResponse>;
1604
+ pageToken?: string;
1605
+ }): CancelablePromise<ListErc721TransactionsResponse>;
1468
1606
  /**
1469
- * Gets a list of erc transfers for an ERC-20, ERC-721,
1470
- * or ERC-1155 contract address.
1471
- * @returns ListTransfersResponse
1607
+ * List ERC-1155 transfers
1608
+ * Lists ERC-1155 transfers for an address. Filterable by block range.
1609
+ * @returns ListErc1155TransactionsResponse
1472
1610
  * @throws ApiError
1473
1611
  */
1474
- listTransfers({ chainId, address, pageSize, pageToken, }: {
1612
+ listErc1155Transactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1475
1613
  /**
1476
- * A supported evm chain id. Use the `/chains` endpoint to get
1477
- * a list of supported chain ids.
1614
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1478
1615
  */
1479
1616
  chainId: string;
1480
1617
  /**
1481
1618
  * A wallet address.
1482
1619
  */
1483
1620
  address: string;
1621
+ startBlock?: number;
1622
+ endBlock?: number;
1484
1623
  /**
1485
- * The maximum number of items to return. The minimum page size
1486
- * is 1. The maximum pageSize is 100.
1624
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1487
1625
  */
1488
1626
  pageSize?: number;
1489
1627
  /**
1490
1628
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1491
1629
  */
1492
1630
  pageToken?: string;
1493
- }): CancelablePromise<ListTransfersResponse>;
1631
+ }): CancelablePromise<ListErc1155TransactionsResponse>;
1494
1632
  /**
1495
- * Gets a list of transactions for an address and chain.
1496
- * Returns a list of transactions where the given wallet
1497
- * address had an on-chain interaction for a given chain. The ERC-20
1498
- * transfers, ERC-721 transfers, ERC-1155, and internal transactions
1499
- * returned are only those where the input address had an interaction.
1500
- * Specifically, those list only inlcude entries where the input address
1501
- * was the sender (`from` field) or the receiver (`to` field) for the
1502
- * sub-transaction. Therefore the transactions returned from this list may
1503
- * not be complete representations of the on-chain data. For a complete
1504
- * view of a transaction use the `/chains/:chainId/transactions/:txHash`
1505
- * endpoint.
1506
- * @returns ListTransactionDetailsResponse
1633
+ * List internal transactions
1634
+ * Returns a list of internal transactions for an address and chain. Filterable by block range.
1635
+ *
1636
+ * Note that the internal transactions list only contains `CALL` or `CALLCODE` transactions with a non-zero value and `CREATE`/`CREATE2` transactions. To get a complete list of internal transactions use the `debug_` prefixed RPC methods on an archive node.
1637
+ * @returns ListInternalTransactionsResponse
1507
1638
  * @throws ApiError
1508
1639
  */
1509
- listTransactions({ chainId, address, pageSize, pageToken, startBlock, endBlock, }: {
1640
+ listInternalTransactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1510
1641
  /**
1511
- * A supported evm chain id. Use the `/chains` endpoint to get
1512
- * a list of supported chain ids.
1642
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1513
1643
  */
1514
1644
  chainId: string;
1515
1645
  /**
1516
1646
  * A wallet address.
1517
1647
  */
1518
1648
  address: string;
1649
+ startBlock?: number;
1650
+ endBlock?: number;
1519
1651
  /**
1520
- * The maximum number of items to return. The minimum page size
1521
- * is 1. The maximum pageSize is 100.
1652
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1522
1653
  */
1523
1654
  pageSize?: number;
1524
1655
  /**
1525
1656
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1526
1657
  */
1527
1658
  pageToken?: string;
1659
+ }): CancelablePromise<ListInternalTransactionsResponse>;
1660
+ /**
1661
+ * Get transaction
1662
+ * Gets the details of a single transaction.
1663
+ * @returns GetTransactionResponse
1664
+ * @throws ApiError
1665
+ */
1666
+ getTransaction({ chainId, txHash, }: {
1528
1667
  /**
1529
- * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
1668
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1530
1669
  */
1531
- startBlock?: number;
1670
+ chainId: string;
1532
1671
  /**
1533
- * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
1672
+ * A transaction hash.
1534
1673
  */
1535
- endBlock?: number;
1536
- }): CancelablePromise<ListTransactionDetailsResponse>;
1674
+ txHash: string;
1675
+ }): CancelablePromise<GetTransactionResponse>;
1537
1676
  /**
1538
- * Gets a list of native transactions for an address and chain.
1677
+ * List transactions for a block
1678
+ * Lists the transactions that occured in a given block.
1539
1679
  * @returns ListNativeTransactionsResponse
1540
1680
  * @throws ApiError
1541
1681
  */
1542
- listNativeTransactions({ chainId, address, pageSize, pageToken, }: {
1682
+ getTransactionsForBlock({ chainId, blockId, }: {
1543
1683
  /**
1544
- * A supported evm chain id. Use the `/chains` endpoint to get
1545
- * a list of supported chain ids.
1684
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1546
1685
  */
1547
1686
  chainId: string;
1548
1687
  /**
1549
- * A wallet address.
1550
- */
1551
- address: string;
1552
- /**
1553
- * The maximum number of items to return. The minimum page size
1554
- * is 1. The maximum pageSize is 100.
1555
- */
1556
- pageSize?: number;
1557
- /**
1558
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1688
+ * A block identifier which is either a block number or the block hash.
1559
1689
  */
1560
- pageToken?: string;
1690
+ blockId: string;
1561
1691
  }): CancelablePromise<ListNativeTransactionsResponse>;
1562
1692
  /**
1563
- * Lists ERC-20 transfers for an address.
1564
- * @returns ListErc20TransactionsResponse
1693
+ * List latest transactions
1694
+ * Lists the latest transactions. Filterable by status.
1695
+ * @returns ListNativeTransactionsResponse
1565
1696
  * @throws ApiError
1566
1697
  */
1567
- listErc20Transactions({ chainId, address, pageSize, pageToken, }: {
1698
+ listLatestTransactions({ chainId, pageSize, pageToken, status, }: {
1568
1699
  /**
1569
- * A supported evm chain id. Use the `/chains` endpoint to get
1570
- * a list of supported chain ids.
1700
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1571
1701
  */
1572
1702
  chainId: string;
1573
1703
  /**
1574
- * A wallet address.
1704
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1575
1705
  */
1576
- address: string;
1706
+ pageSize?: number;
1707
+ /**
1708
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1709
+ */
1710
+ pageToken?: string;
1711
+ /**
1712
+ * A status filter for listed transactions.
1713
+ */
1714
+ status?: TransactionStatus;
1715
+ }): CancelablePromise<ListNativeTransactionsResponse>;
1716
+ }
1717
+
1718
+ declare class HealthCheckService {
1719
+ readonly httpRequest: BaseHttpRequest;
1720
+ constructor(httpRequest: BaseHttpRequest);
1721
+ /**
1722
+ * Get the health of the service
1723
+ * @returns any The Health Check is successful
1724
+ * @throws ApiError
1725
+ */
1726
+ healthCheck(): CancelablePromise<{
1727
+ status?: string;
1728
+ info?: Record<string, Record<string, string>> | null;
1729
+ error?: Record<string, Record<string, string>> | null;
1730
+ details?: Record<string, Record<string, string>>;
1731
+ }>;
1732
+ }
1733
+
1734
+ type EvmNetworkOptions = {
1735
+ addresses: Array<string>;
1736
+ includeChains: Array<string>;
1737
+ };
1738
+
1739
+ type CreateEvmTransactionExportRequest = {
1740
+ type: CreateEvmTransactionExportRequest.type;
1741
+ firstDate: string;
1742
+ lastDate: string;
1743
+ /**
1744
+ * @deprecated
1745
+ */
1746
+ startDate: string;
1747
+ /**
1748
+ * @deprecated
1749
+ */
1750
+ endDate: string;
1751
+ options: EvmNetworkOptions;
1752
+ };
1753
+ declare namespace CreateEvmTransactionExportRequest {
1754
+ enum type {
1755
+ TRANSACTION_EXPORT_EVM = "TRANSACTION_EXPORT_EVM"
1756
+ }
1757
+ }
1758
+
1759
+ type PrimaryNetworkOptions = {
1760
+ addresses: Array<string>;
1761
+ cChainEvmAddresses?: Array<string>;
1762
+ includeChains: Array<'11111111111111111111111111111111LpoYY' | '2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM' | '2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm' | '2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5' | 'yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp' | 'p-chain' | 'x-chain' | 'c-chain'>;
1763
+ };
1764
+
1765
+ type CreatePrimaryNetworkTransactionExportRequest = {
1766
+ type: CreatePrimaryNetworkTransactionExportRequest.type;
1767
+ firstDate: string;
1768
+ lastDate: string;
1769
+ /**
1770
+ * @deprecated
1771
+ */
1772
+ startDate: string;
1773
+ /**
1774
+ * @deprecated
1775
+ */
1776
+ endDate: string;
1777
+ options: PrimaryNetworkOptions;
1778
+ };
1779
+ declare namespace CreatePrimaryNetworkTransactionExportRequest {
1780
+ enum type {
1781
+ TRANSACTION_EXPORT_PRIMARY_NETWORK = "TRANSACTION_EXPORT_PRIMARY_NETWORK"
1782
+ }
1783
+ }
1784
+
1785
+ declare enum OperationStatus {
1786
+ RUNNING = "RUNNING",
1787
+ COMPLETED = "COMPLETED",
1788
+ COMPLETED_WITH_WARNING = "COMPLETED_WITH_WARNING",
1789
+ FAILED = "FAILED"
1790
+ }
1791
+
1792
+ declare enum OperationType {
1793
+ TRANSACTION_EXPORT_EVM = "TRANSACTION_EXPORT_EVM",
1794
+ TRANSACTION_EXPORT_PRIMARY_NETWORK = "TRANSACTION_EXPORT_PRIMARY_NETWORK"
1795
+ }
1796
+
1797
+ declare enum OperationStatusCode {
1798
+ ERR_INVALID_REQUEST = "ErrInvalidRequest",
1799
+ ERR_INTERNAL = "ErrInternal",
1800
+ WARN_TRUNCATED_EXPORT = "WarnTruncatedExport"
1801
+ }
1802
+
1803
+ type TransactionExportMetadata = {
1804
+ code?: OperationStatusCode;
1805
+ /**
1806
+ * File download URL. Provided only for COMPLETED and COMPLETED_WITH_WARNING operations.
1807
+ */
1808
+ downloadUrl?: string;
1809
+ /**
1810
+ * The next date (YYYY-MM-DD) to use as the firstDate in follow up requests if a request results in a transaction history exceeding the max size and has been reported as `COMPLETED_WITH_WARNING` with the warning 'WarnTruncatedExport'.
1811
+ */
1812
+ nextDate?: string;
1813
+ };
1814
+
1815
+ type OperationStatusResponse = {
1816
+ operationId: string;
1817
+ operationType: OperationType;
1818
+ operationStatus: OperationStatus;
1819
+ message?: string;
1820
+ metadata: TransactionExportMetadata;
1821
+ createdAtTimestamp: number;
1822
+ updatedAtTimestamp: number;
1823
+ };
1824
+
1825
+ declare class OperationsService {
1826
+ readonly httpRequest: BaseHttpRequest;
1827
+ constructor(httpRequest: BaseHttpRequest);
1828
+ /**
1829
+ * Create transaction export operation
1830
+ * Trigger a transaction export operation with given parameters.
1831
+ *
1832
+ * The transaction export operation runs asynchronously in the background. The status of the job can be retrieved from the `/v1/operations/:operationId` endpoint using the `operationId` returned from this endpoint.
1833
+ * @returns OperationStatusResponse
1834
+ * @throws ApiError
1835
+ */
1836
+ postTransactionExportJob({ requestBody, }: {
1837
+ requestBody: (CreateEvmTransactionExportRequest | CreatePrimaryNetworkTransactionExportRequest);
1838
+ }): CancelablePromise<OperationStatusResponse>;
1839
+ /**
1840
+ * Get operation
1841
+ * Gets operation details for the given operation id.
1842
+ * @returns OperationStatusResponse
1843
+ * @throws ApiError
1844
+ */
1845
+ getOperationResult({ operationId, }: {
1846
+ /**
1847
+ * UUID of given operation
1848
+ */
1849
+ operationId: string;
1850
+ }): CancelablePromise<OperationStatusResponse>;
1851
+ }
1852
+
1853
+ declare enum BlockchainIds {
1854
+ _11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY",
1855
+ _2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
1856
+ _2JVSBOINJ9C2J33VNTVZ_YT_VJNZD_N2NKIWW_KJCUM_HUWEB5DB_BRM = "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm",
1857
+ _2Q9E4R6MU3U68N_U1F_YJGB_R6JVWR_RX36COHP_AX5UQXSE55X1Q5 = "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5",
1858
+ Y_H8D7TH_NJKXMTKUV2JG_BA4P1RN3QPR4P_PR7QYNFCDO_S6K6HWP = "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp"
1859
+ }
1860
+
1861
+ type ChainAddressChainIdMap = {
1862
+ address: string;
1863
+ blockchainIds: Array<BlockchainIds>;
1864
+ };
1865
+
1866
+ type ChainAddressChainIdMapListResponse = {
1867
+ addresses: Array<ChainAddressChainIdMap>;
1868
+ };
1869
+
1870
+ declare enum DelegationStatusType {
1871
+ COMPLETED = "completed",
1872
+ ACTIVE = "active",
1873
+ PENDING = "pending"
1874
+ }
1875
+
1876
+ type DelegatorsDetails = {
1877
+ delegatorCount: number;
1878
+ totalAmountStaked: string;
1879
+ };
1880
+
1881
+ type StakingDistribution = {
1882
+ version: string;
1883
+ amountStaked: string;
1884
+ validatorCount: number;
1885
+ };
1886
+
1887
+ type ValidatorsDetails = {
1888
+ validatorCount: number;
1889
+ totalAmountStaked: string;
1890
+ estimatedAnnualStakingReward: string;
1891
+ stakingDistributionByVersion: Array<StakingDistribution>;
1892
+ stakingRatio: string;
1893
+ };
1894
+
1895
+ type GetNetworkDetailsResponse = {
1896
+ validatorDetails: ValidatorsDetails;
1897
+ delegatorDetails: DelegatorsDetails;
1898
+ };
1899
+
1900
+ type Blockchain = {
1901
+ createBlockTimestamp: number;
1902
+ createBlockNumber: string;
1903
+ blockchainId: string;
1904
+ vmId: string;
1905
+ subnetId: string;
1906
+ blockchainName: string;
1907
+ };
1908
+
1909
+ type ListBlockchainsResponse = {
1910
+ /**
1911
+ * 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.
1912
+ */
1913
+ nextPageToken?: string;
1914
+ blockchains: Array<Blockchain>;
1915
+ };
1916
+
1917
+ type ActiveDelegatorDetails = {
1918
+ txHash: string;
1919
+ rewardAddresses: Array<string>;
1920
+ amountDelegated: string;
1921
+ delegationFee: string;
1922
+ startTimestamp: number;
1923
+ endTimestamp: number;
1924
+ delegationStatus: DelegationStatusType;
1925
+ estimatedGrossReward: string;
1926
+ estimatedNetReward: string;
1927
+ };
1928
+
1929
+ type CompletedDelegatorDetails = {
1930
+ txHash: string;
1931
+ rewardAddresses: Array<string>;
1932
+ amountDelegated: string;
1933
+ delegationFee: string;
1934
+ startTimestamp: number;
1935
+ endTimestamp: number;
1936
+ delegationStatus: DelegationStatusType;
1937
+ grossReward: string;
1938
+ netReward: string;
1939
+ };
1940
+
1941
+ type PendingDelegatorDetails = {
1942
+ txHash: string;
1943
+ rewardAddresses: Array<string>;
1944
+ amountDelegated: string;
1945
+ delegationFee: string;
1946
+ startTimestamp: number;
1947
+ endTimestamp: number;
1948
+ delegationStatus: DelegationStatusType;
1949
+ estimatedGrossReward: string;
1950
+ estimatedNetReward: string;
1951
+ };
1952
+
1953
+ type ListDelegatorDetailsResponse = {
1954
+ /**
1955
+ * 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.
1956
+ */
1957
+ nextPageToken?: string;
1958
+ /**
1959
+ * The list of Delegator Details.
1960
+ */
1961
+ delegators: Array<(CompletedDelegatorDetails | ActiveDelegatorDetails | PendingDelegatorDetails)>;
1962
+ };
1963
+
1964
+ type BlockchainInfo = {
1965
+ blockchainId: string;
1966
+ };
1967
+
1968
+ type Subnet = {
1969
+ createBlockTimestamp: number;
1970
+ createBlockIndex: string;
1971
+ subnetId: string;
1972
+ ownerAddresses: Array<string>;
1973
+ threshold: number;
1974
+ locktime: number;
1975
+ blockchains: Array<BlockchainInfo>;
1976
+ };
1977
+
1978
+ type ListSubnetsResponse = {
1979
+ /**
1980
+ * 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.
1981
+ */
1982
+ nextPageToken?: string;
1983
+ subnets: Array<Subnet>;
1984
+ };
1985
+
1986
+ type Rewards = {
1987
+ validationRewardAmount: string;
1988
+ delegationRewardAmount: string;
1989
+ };
1990
+
1991
+ declare enum ValidationStatusType {
1992
+ COMPLETED = "completed",
1993
+ ACTIVE = "active",
1994
+ PENDING = "pending"
1995
+ }
1996
+
1997
+ type ActiveValidatorDetails = {
1998
+ nodeId: string;
1999
+ amountStaked: string;
2000
+ delegationFee: string;
2001
+ startTimestamp: number;
2002
+ endTimestamp: number;
2003
+ validationStatus: ValidationStatusType;
2004
+ stakePercentage: number;
2005
+ delegatorCount: number;
2006
+ amountDelegated: string;
2007
+ uptimePerformance: number;
2008
+ avalancheGoVersion: string;
2009
+ delegationCapacity: string;
2010
+ potentialRewards: Rewards;
2011
+ };
2012
+
2013
+ type CompletedValidatorDetails = {
2014
+ nodeId: string;
2015
+ amountStaked: string;
2016
+ delegationFee: string;
2017
+ startTimestamp: number;
2018
+ endTimestamp: number;
2019
+ validationStatus: ValidationStatusType;
2020
+ delegatorCount: number;
2021
+ rewards: Rewards;
2022
+ };
2023
+
2024
+ type PendingValidatorDetails = {
2025
+ nodeId: string;
2026
+ amountStaked: string;
2027
+ delegationFee: string;
2028
+ startTimestamp: number;
2029
+ endTimestamp: number;
2030
+ validationStatus: ValidationStatusType;
2031
+ };
2032
+
2033
+ type ListValidatorDetailsResponse = {
2034
+ /**
2035
+ * 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.
2036
+ */
2037
+ nextPageToken?: string;
2038
+ /**
2039
+ * The list of Validator Details.
2040
+ */
2041
+ validators: Array<(CompletedValidatorDetails | ActiveValidatorDetails | PendingValidatorDetails)>;
2042
+ };
2043
+
2044
+ declare enum Network {
2045
+ MAINNET = "mainnet",
2046
+ FUJI = "fuji"
2047
+ }
2048
+
2049
+ type XChainAssetDetails = {
2050
+ /**
2051
+ * Unique ID for an asset.
2052
+ */
2053
+ assetId: string;
2054
+ /**
2055
+ * Name of this asset.
2056
+ */
2057
+ name: string;
2058
+ /**
2059
+ * Symbol for this asset (max 4 characters).
2060
+ */
2061
+ symbol: string;
2062
+ /**
2063
+ * Denomination of this asset to represent fungibility.
2064
+ */
2065
+ denomination: number;
2066
+ /**
2067
+ * Type of asset like SECP256K1 or NFT.
2068
+ */
2069
+ type: string;
2070
+ /**
2071
+ * Timestamp in seconds this asset was created on.
2072
+ */
2073
+ createdAtTimestamp: number;
2074
+ /**
2075
+ * Cap represents if an asset can be or is fixed cap.
2076
+ */
2077
+ cap: string;
2078
+ };
2079
+
2080
+ declare enum XChainId {
2081
+ _2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
2082
+ _2JVSBOINJ9C2J33VNTVZ_YT_VJNZD_N2NKIWW_KJCUM_HUWEB5DB_BRM = "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm",
2083
+ X_CHAIN = "x-chain"
2084
+ }
2085
+
2086
+ declare class PrimaryNetworkService {
2087
+ readonly httpRequest: BaseHttpRequest;
2088
+ constructor(httpRequest: BaseHttpRequest);
2089
+ /**
2090
+ * Get asset details
2091
+ * Gets asset details corresponding to the given asset id on the X-Chain.
2092
+ * @returns XChainAssetDetails
2093
+ * @throws ApiError
2094
+ */
2095
+ getAssetDetails({ blockchainId, network, assetId, }: {
2096
+ /**
2097
+ * A primary network blockchain id or alias.
2098
+ */
2099
+ blockchainId: XChainId;
2100
+ /**
2101
+ * Either mainnet or a testnet.
2102
+ */
2103
+ network: Network;
2104
+ /**
2105
+ * Asset ID for any asset on X-Chain
2106
+ */
2107
+ assetId: string;
2108
+ }): CancelablePromise<XChainAssetDetails>;
2109
+ /**
2110
+ * Get chain interactions for addresses
2111
+ * Returns Primary Network chains that each address has touched in the form of an address mapped array. If an address has had any on-chain interaction for a chain, that chain's chain id will be returned.
2112
+ * @returns ChainAddressChainIdMapListResponse
2113
+ * @throws ApiError
2114
+ */
2115
+ getChainIdsForAddresses({ addresses, network, }: {
2116
+ /**
2117
+ * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
2118
+ */
2119
+ addresses: string;
1577
2120
  /**
1578
- * The maximum number of items to return. The minimum page size
1579
- * is 1. The maximum pageSize is 100.
2121
+ * Either mainnet or a testnet.
2122
+ */
2123
+ network: Network;
2124
+ }): CancelablePromise<ChainAddressChainIdMapListResponse>;
2125
+ /**
2126
+ * Get network details
2127
+ * Gets network details such as validator and delegator stats.
2128
+ * @returns GetNetworkDetailsResponse
2129
+ * @throws ApiError
2130
+ */
2131
+ getNetworkDetails({ network, }: {
2132
+ /**
2133
+ * Either mainnet or a testnet.
2134
+ */
2135
+ network: Network;
2136
+ }): CancelablePromise<GetNetworkDetailsResponse>;
2137
+ /**
2138
+ * List blockchains
2139
+ * Lists all blockchains registered on the network.
2140
+ * @returns ListBlockchainsResponse
2141
+ * @throws ApiError
2142
+ */
2143
+ listBlockchains({ network, pageSize, pageToken, sortOrder, }: {
2144
+ /**
2145
+ * Either mainnet or a testnet.
2146
+ */
2147
+ network: Network;
2148
+ /**
2149
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1580
2150
  */
1581
2151
  pageSize?: number;
1582
2152
  /**
1583
2153
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1584
2154
  */
1585
2155
  pageToken?: string;
1586
- }): CancelablePromise<ListErc20TransactionsResponse>;
2156
+ /**
2157
+ * The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
2158
+ */
2159
+ sortOrder?: SortOrder;
2160
+ }): CancelablePromise<ListBlockchainsResponse>;
1587
2161
  /**
1588
- * Lists ERC-721 transfers for an address.
1589
- * @returns ListErc721TransactionsResponse
2162
+ * List subnets
2163
+ * Lists all subnets registered on the network.
2164
+ * @returns ListSubnetsResponse
1590
2165
  * @throws ApiError
1591
2166
  */
1592
- listErc721Transactions({ chainId, address, pageSize, pageToken, }: {
2167
+ listSubnets({ network, pageSize, pageToken, sortOrder, }: {
1593
2168
  /**
1594
- * A supported evm chain id. Use the `/chains` endpoint to get
1595
- * a list of supported chain ids.
2169
+ * Either mainnet or a testnet.
1596
2170
  */
1597
- chainId: string;
2171
+ network: Network;
1598
2172
  /**
1599
- * A wallet address.
2173
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1600
2174
  */
1601
- address: string;
2175
+ pageSize?: number;
2176
+ /**
2177
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2178
+ */
2179
+ pageToken?: string;
2180
+ /**
2181
+ * The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
2182
+ */
2183
+ sortOrder?: SortOrder;
2184
+ }): CancelablePromise<ListSubnetsResponse>;
2185
+ /**
2186
+ * List validators
2187
+ * Lists details for validators. By default, returns details for all validators. Filterable by validator node ids and minimum delegation capacity.
2188
+ * @returns ListValidatorDetailsResponse
2189
+ * @throws ApiError
2190
+ */
2191
+ listValidators({ network, pageSize, pageToken, nodeIds, sortOrder, validationStatus, minDelegationCapacity, }: {
1602
2192
  /**
1603
- * The maximum number of items to return. The minimum page size
1604
- * is 1. The maximum pageSize is 100.
2193
+ * Either mainnet or a testnet.
2194
+ */
2195
+ network: Network;
2196
+ /**
2197
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1605
2198
  */
1606
2199
  pageSize?: number;
1607
2200
  /**
1608
2201
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1609
2202
  */
1610
2203
  pageToken?: string;
1611
- }): CancelablePromise<ListErc721TransactionsResponse>;
2204
+ /**
2205
+ * A comma separated list of node ids to filter by.
2206
+ */
2207
+ nodeIds?: string;
2208
+ /**
2209
+ * The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
2210
+ */
2211
+ sortOrder?: SortOrder;
2212
+ /**
2213
+ * Validation status of the node.
2214
+ */
2215
+ validationStatus?: ValidationStatusType;
2216
+ /**
2217
+ * The minimum delegation capacity, used to filter the set of nodes being returned (Units - nAVAX). Default is 0.
2218
+ */
2219
+ minDelegationCapacity?: any;
2220
+ }): CancelablePromise<ListValidatorDetailsResponse>;
1612
2221
  /**
1613
- * Lists of ERC-1155 transfers for an address.
1614
- * @returns ListErc1155TransactionsResponse
2222
+ * Get single validator details
2223
+ * List validator details for a single validator. Filterable by validation status.
2224
+ * @returns ListValidatorDetailsResponse
1615
2225
  * @throws ApiError
1616
2226
  */
1617
- listErc1155Transactions({ chainId, address, pageSize, pageToken, }: {
2227
+ getSingleValidatorDetails({ network, nodeId, pageSize, pageToken, sortOrder, validationStatus, }: {
1618
2228
  /**
1619
- * A supported evm chain id. Use the `/chains` endpoint to get
1620
- * a list of supported chain ids.
2229
+ * Either mainnet or a testnet.
1621
2230
  */
1622
- chainId: string;
2231
+ network: Network;
1623
2232
  /**
1624
- * A wallet address.
2233
+ * A primary network (P or X chain) nodeId.
1625
2234
  */
1626
- address: string;
2235
+ nodeId: string;
1627
2236
  /**
1628
- * The maximum number of items to return. The minimum page size
1629
- * is 1. The maximum pageSize is 100.
2237
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1630
2238
  */
1631
2239
  pageSize?: number;
1632
2240
  /**
1633
2241
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1634
2242
  */
1635
2243
  pageToken?: string;
1636
- }): CancelablePromise<ListErc1155TransactionsResponse>;
2244
+ /**
2245
+ * The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
2246
+ */
2247
+ sortOrder?: SortOrder;
2248
+ /**
2249
+ * Validation status of the node.
2250
+ */
2251
+ validationStatus?: ValidationStatusType;
2252
+ }): CancelablePromise<ListValidatorDetailsResponse>;
1637
2253
  /**
1638
- * Lists internal transactions for an address.
1639
- * Returns a list of internal transactions for an address and
1640
- * chain. Note that the internal transactions list only contains CALL or
1641
- * CALLCODE transactions with a non-zero value and CREATE/CREATE2
1642
- * transactions. To get a complete list of internal transactions use the
1643
- * `debug_` prefixed RPC methods on an archive node.
1644
- * @returns ListInternalTransactionsResponse
2254
+ * List delegators
2255
+ * Lists details for delegators.
2256
+ * @returns ListDelegatorDetailsResponse
1645
2257
  * @throws ApiError
1646
2258
  */
1647
- listInternalTransactions({ chainId, address, pageSize, pageToken, }: {
2259
+ listDelegators({ network, nodeId, pageSize, pageToken, sortOrder, delegationStatus, rewardAddresses, nodeIds, }: {
1648
2260
  /**
1649
- * A supported evm chain id. Use the `/chains` endpoint to get
1650
- * a list of supported chain ids.
2261
+ * Either mainnet or a testnet.
1651
2262
  */
1652
- chainId: string;
2263
+ network: Network;
1653
2264
  /**
1654
- * A wallet address.
2265
+ * A primary network (P or X chain) nodeId.
1655
2266
  */
1656
- address: string;
2267
+ nodeId: string;
1657
2268
  /**
1658
- * The maximum number of items to return. The minimum page size
1659
- * is 1. The maximum pageSize is 100.
2269
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1660
2270
  */
1661
2271
  pageSize?: number;
1662
2272
  /**
1663
2273
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1664
2274
  */
1665
2275
  pageToken?: string;
1666
- }): CancelablePromise<ListInternalTransactionsResponse>;
1667
- /**
1668
- * Gets the details of a single transaction.
1669
- * @returns GetTransactionResponse
1670
- * @throws ApiError
1671
- */
1672
- getTransaction({ chainId, txHash, }: {
1673
2276
  /**
1674
- * A supported evm chain id. Use the `/chains` endpoint to get
1675
- * a list of supported chain ids.
2277
+ * The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
1676
2278
  */
1677
- chainId: string;
2279
+ sortOrder?: SortOrder;
1678
2280
  /**
1679
- * A transaction hash.
2281
+ * Delegation status of the node.
1680
2282
  */
1681
- txHash: string;
1682
- }): CancelablePromise<GetTransactionResponse>;
1683
- /**
1684
- * Gets the transactions that occured in a given block.
1685
- * @returns ListNativeTransactionsResponse
1686
- * @throws ApiError
1687
- */
1688
- getTransactionsForBlock({ chainId, blockId, }: {
2283
+ delegationStatus?: DelegationStatusType;
1689
2284
  /**
1690
- * A supported evm chain id. Use the `/chains` endpoint to get
1691
- * a list of supported chain ids.
2285
+ * A comma separated list of reward addresses to filter by.
1692
2286
  */
1693
- chainId: string;
2287
+ rewardAddresses?: string;
1694
2288
  /**
1695
- * A block identifier which is either a block number or the block hash.
2289
+ * A comma separated list of node ids to filter by.
1696
2290
  */
1697
- blockId: string;
1698
- }): CancelablePromise<ListNativeTransactionsResponse>;
2291
+ nodeIds?: string;
2292
+ }): CancelablePromise<ListDelegatorDetailsResponse>;
2293
+ }
2294
+
2295
+ declare enum BlockchainId {
2296
+ _11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY",
2297
+ _2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
2298
+ _2JVSBOINJ9C2J33VNTVZ_YT_VJNZD_N2NKIWW_KJCUM_HUWEB5DB_BRM = "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm",
2299
+ _2Q9E4R6MU3U68N_U1F_YJGB_R6JVWR_RX36COHP_AX5UQXSE55X1Q5 = "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5",
2300
+ Y_H8D7TH_NJKXMTKUV2JG_BA4P1RN3QPR4P_PR7QYNFCDO_S6K6HWP = "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp",
2301
+ P_CHAIN = "p-chain",
2302
+ X_CHAIN = "x-chain",
2303
+ C_CHAIN = "c-chain"
2304
+ }
2305
+
2306
+ type CChainSharedAssetBalance = {
1699
2307
  /**
1700
- * Gets the latest transactions; can be filtered by status.
1701
- * @returns ListNativeTransactionsResponse
2308
+ * Unique ID for an asset.
2309
+ */
2310
+ assetId: string;
2311
+ /**
2312
+ * Name of this asset.
2313
+ */
2314
+ name: string;
2315
+ /**
2316
+ * Symbol for this asset (max 4 characters).
2317
+ */
2318
+ symbol: string;
2319
+ /**
2320
+ * Denomination of this asset to represent fungibility.
2321
+ */
2322
+ denomination: number;
2323
+ /**
2324
+ * Type of asset like SECP256K1 or NFT.
2325
+ */
2326
+ type: string;
2327
+ /**
2328
+ * Amount of the asset.
2329
+ */
2330
+ amount: string;
2331
+ utxoCount: number;
2332
+ sharedWithChainId: string;
2333
+ };
2334
+
2335
+ type CChainAtomicBalances = {
2336
+ atomicMemoryUnlocked: Array<CChainSharedAssetBalance>;
2337
+ atomicMemoryLocked: Array<CChainSharedAssetBalance>;
2338
+ };
2339
+
2340
+ declare enum PrimaryNetwork {
2341
+ MAINNET = "mainnet",
2342
+ FUJI = "fuji"
2343
+ }
2344
+
2345
+ declare enum PrimaryNetworkChainName {
2346
+ P_CHAIN = "p-chain",
2347
+ X_CHAIN = "x-chain",
2348
+ C_CHAIN = "c-chain"
2349
+ }
2350
+
2351
+ type PrimaryNetworkChainInfo = {
2352
+ chainName: PrimaryNetworkChainName;
2353
+ network: PrimaryNetwork;
2354
+ };
2355
+
2356
+ type ListCChainAtomicBalancesResponse = {
2357
+ balances: CChainAtomicBalances;
2358
+ chainInfo: PrimaryNetworkChainInfo;
2359
+ };
2360
+
2361
+ type PChainAsset = {
2362
+ assetId: string;
2363
+ amount: string;
2364
+ };
2365
+
2366
+ type PChainSharedAsset = {
2367
+ assetId: string;
2368
+ amount: string;
2369
+ sharedWithChainId: string;
2370
+ status: string;
2371
+ };
2372
+
2373
+ type PChainBalance = {
2374
+ /**
2375
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is consumable by any transaction.
2376
+ */
2377
+ unlockedUnstaked: Array<PChainAsset>;
2378
+ /**
2379
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of staked Avax that is consumable by any transaction when the staking period ends.
2380
+ */
2381
+ unlockedStaked: Array<PChainAsset>;
2382
+ /**
2383
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is locked at the platform level and not consumable by any transaction at the current time.
2384
+ */
2385
+ lockedPlatform: Array<PChainAsset>;
2386
+ /**
2387
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is locked at the platform level and only consumeable for staking transactions.
2388
+ */
2389
+ lockedStakeable: Array<PChainAsset>;
2390
+ /**
2391
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of staked Avax that will be locked when the staking period ends.
2392
+ */
2393
+ lockedStaked: Array<PChainAsset>;
2394
+ /**
2395
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of staked Avax whose staking period has not yet started.
2396
+ */
2397
+ pendingStaked: Array<PChainAsset>;
2398
+ /**
2399
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unlocked Avax in the atomic memory between P-Chain and other chain.
2400
+ */
2401
+ atomicMemoryUnlocked: Array<PChainSharedAsset>;
2402
+ /**
2403
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of locked Avax in the atomic memory between P-Chain and other chain.
2404
+ */
2405
+ atomicMemoryLocked: Array<PChainSharedAsset>;
2406
+ };
2407
+
2408
+ type ListPChainBalancesResponse = {
2409
+ balances: PChainBalance;
2410
+ chainInfo: PrimaryNetworkChainInfo;
2411
+ };
2412
+
2413
+ type XChainAssetBalance = {
2414
+ /**
2415
+ * Unique ID for an asset.
2416
+ */
2417
+ assetId: string;
2418
+ /**
2419
+ * Name of this asset.
2420
+ */
2421
+ name: string;
2422
+ /**
2423
+ * Symbol for this asset (max 4 characters).
2424
+ */
2425
+ symbol: string;
2426
+ /**
2427
+ * Denomination of this asset to represent fungibility.
2428
+ */
2429
+ denomination: number;
2430
+ /**
2431
+ * Type of asset like SECP256K1 or NFT.
2432
+ */
2433
+ type: string;
2434
+ /**
2435
+ * Amount of the asset.
2436
+ */
2437
+ amount: string;
2438
+ utxoCount: number;
2439
+ };
2440
+
2441
+ type XChainSharedAssetBalance = {
2442
+ /**
2443
+ * Unique ID for an asset.
2444
+ */
2445
+ assetId: string;
2446
+ /**
2447
+ * Name of this asset.
2448
+ */
2449
+ name: string;
2450
+ /**
2451
+ * Symbol for this asset (max 4 characters).
2452
+ */
2453
+ symbol: string;
2454
+ /**
2455
+ * Denomination of this asset to represent fungibility.
2456
+ */
2457
+ denomination: number;
2458
+ /**
2459
+ * Type of asset like SECP256K1 or NFT.
2460
+ */
2461
+ type: string;
2462
+ /**
2463
+ * Amount of the asset.
2464
+ */
2465
+ amount: string;
2466
+ utxoCount: number;
2467
+ sharedWithChainId: string;
2468
+ };
2469
+
2470
+ type XChainBalances = {
2471
+ /**
2472
+ * A list of objects containing X-chain Asset balance information.
2473
+ */
2474
+ locked: Array<XChainAssetBalance>;
2475
+ /**
2476
+ * A list of objects containing X-chain Asset balance information.
2477
+ */
2478
+ unlocked: Array<XChainAssetBalance>;
2479
+ atomicMemoryUnlocked: Array<XChainSharedAssetBalance>;
2480
+ atomicMemoryLocked: Array<XChainSharedAssetBalance>;
2481
+ };
2482
+
2483
+ type ListXChainBalancesResponse = {
2484
+ balances: XChainBalances;
2485
+ chainInfo: PrimaryNetworkChainInfo;
2486
+ };
2487
+
2488
+ declare class PrimaryNetworkBalancesService {
2489
+ readonly httpRequest: BaseHttpRequest;
2490
+ constructor(httpRequest: BaseHttpRequest);
2491
+ /**
2492
+ * Get balances
2493
+ * Gets primary network balances for one of the Primary Network chains for the supplied addresses.
2494
+ *
2495
+ * C-Chain balances returned are only the shared atomic memory balance. For EVM balance, use the `/v1/chains/:chainId/addresses/:addressId/balances:getNative` endpoint.
2496
+ * @returns any
1702
2497
  * @throws ApiError
1703
2498
  */
1704
- listLatestTransactions({ chainId, pageSize, pageToken, status, }: {
2499
+ getBalancesByAddresses({ blockchainId, network, blockTimestamp, addresses, }: {
1705
2500
  /**
1706
- * A supported evm chain id. Use the `/chains` endpoint to get
1707
- * a list of supported chain ids.
2501
+ * A primary network blockchain id or alias.
1708
2502
  */
1709
- chainId: string;
2503
+ blockchainId: BlockchainId;
1710
2504
  /**
1711
- * The maximum number of items to return. The minimum page size
1712
- * is 1. The maximum pageSize is 100.
2505
+ * Either mainnet or a testnet.
1713
2506
  */
1714
- pageSize?: number;
2507
+ network: Network;
1715
2508
  /**
1716
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2509
+ * An epoch timestamp in seconds. Balance will be calculated at this timestamp.
1717
2510
  */
1718
- pageToken?: string;
2511
+ blockTimestamp?: number;
1719
2512
  /**
1720
- * A status filter for listed transactions.
2513
+ * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
1721
2514
  */
1722
- status?: TransactionStatus;
1723
- }): CancelablePromise<ListNativeTransactionsResponse>;
1724
- /**
1725
- * Gets the list of chains supported by the api.
1726
- * @returns ListChainsResponse
1727
- * @throws ApiError
1728
- */
1729
- supportedChains(): CancelablePromise<ListChainsResponse>;
2515
+ addresses?: string;
2516
+ }): CancelablePromise<(ListPChainBalancesResponse | ListXChainBalancesResponse | ListCChainAtomicBalancesResponse)>;
2517
+ }
2518
+
2519
+ type ProposerDetails = {
2520
+ proposerId?: string;
2521
+ proposerParentId?: string;
2522
+ proposerNodeId?: string;
2523
+ proposerPChainHeight?: number;
2524
+ proposerTimestamp?: number;
2525
+ };
2526
+
2527
+ type GetPrimaryNetworkBlockResponse = {
2528
+ blockNumber: string;
2529
+ blockHash: string;
2530
+ parentHash: string;
2531
+ blockTimestamp: number;
2532
+ blockType: string;
2533
+ txCount: number;
2534
+ transactions: Array<string>;
2535
+ blockSizeBytes: number;
2536
+ proposerDetails?: ProposerDetails;
2537
+ };
2538
+
2539
+ type PrimaryNetworkBlock = {
2540
+ blockNumber: string;
2541
+ blockHash: string;
2542
+ parentHash: string;
2543
+ blockTimestamp: number;
2544
+ blockType: string;
2545
+ txCount: number;
2546
+ transactions: Array<string>;
2547
+ blockSizeBytes: number;
2548
+ proposerDetails?: ProposerDetails;
2549
+ };
2550
+
2551
+ type ListPrimaryNetworkBlocksResponse = {
1730
2552
  /**
1731
- * Gets chain information by chain id.
1732
- * @returns GetChainResponse
1733
- * @throws ApiError
2553
+ * 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.
1734
2554
  */
1735
- getChainInfo({ chainId, }: {
1736
- /**
1737
- * A supported evm chain id. Use the `/chains` endpoint to get
1738
- * a list of supported chain ids.
1739
- */
1740
- chainId: string;
1741
- }): CancelablePromise<GetChainResponse>;
2555
+ nextPageToken?: string;
2556
+ blocks: Array<PrimaryNetworkBlock>;
2557
+ chainInfo: PrimaryNetworkChainInfo;
2558
+ };
2559
+
2560
+ declare class PrimaryNetworkBlocksService {
2561
+ readonly httpRequest: BaseHttpRequest;
2562
+ constructor(httpRequest: BaseHttpRequest);
1742
2563
  /**
1743
- * Triggers reindexing for a single nft contract and token id pair.
1744
- * Triggers reindexing of token metadata for nft contracts.
1745
- * Will throw 400 if Nft has been indexed within the last hour.
1746
- * @returns any
2564
+ * Get block
2565
+ * Gets a block by block height or block hash on one of the Primary Network chains.
2566
+ * @returns GetPrimaryNetworkBlockResponse
1747
2567
  * @throws ApiError
1748
2568
  */
1749
- reindexNft({ chainId, address, tokenId, }: {
2569
+ getBlockById({ blockchainId, network, blockId, }: {
1750
2570
  /**
1751
- * A supported evm chain id. Use the `/chains` endpoint to get
1752
- * a list of supported chain ids.
2571
+ * A primary network blockchain id or alias.
1753
2572
  */
1754
- chainId: string;
2573
+ blockchainId: BlockchainId;
1755
2574
  /**
1756
- * Contract address on the relevant chain.
2575
+ * Either mainnet or a testnet.
1757
2576
  */
1758
- address: string;
2577
+ network: Network;
1759
2578
  /**
1760
- * TokenId on the contract
2579
+ * A block identifier which is either a block number or the block hash.
1761
2580
  */
1762
- tokenId: string;
1763
- }): CancelablePromise<any>;
2581
+ blockId: string;
2582
+ }): CancelablePromise<GetPrimaryNetworkBlockResponse>;
1764
2583
  /**
1765
- * Get metadata for a specific token by providing the contract address and token id.
1766
- * @returns any
2584
+ * List blocks proposed by node
2585
+ * Lists the latest blocks proposed by a given NodeID on one of the Primary Network chains.
2586
+ * @returns ListPrimaryNetworkBlocksResponse
1767
2587
  * @throws ApiError
1768
2588
  */
1769
- getTokenMetadata({ chainId, address, tokenId, }: {
1770
- /**
1771
- * A supported evm chain id. Use the `/chains` endpoint to get
1772
- * a list of supported chain ids.
1773
- */
1774
- chainId: string;
2589
+ listPrimaryNetworkBlocksByNodeId({ blockchainId, network, nodeId, pageSize, pageToken, }: {
1775
2590
  /**
1776
- * Contract address on the relevant chain.
2591
+ * A primary network blockchain id or alias.
1777
2592
  */
1778
- address: string;
2593
+ blockchainId: BlockchainId;
1779
2594
  /**
1780
- * TokenId on the contract
2595
+ * Either mainnet or a testnet.
1781
2596
  */
1782
- tokenId: string;
1783
- }): CancelablePromise<(Erc721Token | Erc1155Token)>;
1784
- /**
1785
- * Get collection data for provided a ChainID and address.
1786
- * @returns NftCollectionWithMetrics
1787
- * @throws ApiError
1788
- */
1789
- getCollection({ chainId, address, timeframe, }: {
2597
+ network: Network;
1790
2598
  /**
1791
- * A supported evm chain id. Use the `/chains` endpoint to get
1792
- * a list of supported chain ids.
2599
+ * A primary network (P or X chain) nodeId.
1793
2600
  */
1794
- chainId: string;
2601
+ nodeId: string;
1795
2602
  /**
1796
- * Contract address on the relevant chain.
2603
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1797
2604
  */
1798
- address: string;
2605
+ pageSize?: number;
1799
2606
  /**
1800
- * The timeframe to use for trending listings. Use "DAY" for 24 hours, "WEEK" for 7 days, "MONTH" for 30 days.
2607
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1801
2608
  */
1802
- timeframe?: TrendingTimeframe;
1803
- }): CancelablePromise<NftCollectionWithMetrics>;
2609
+ pageToken?: string;
2610
+ }): CancelablePromise<ListPrimaryNetworkBlocksResponse>;
1804
2611
  /**
1805
- * List open listings for a NFT token.
1806
- * @returns ListListingsResponse
2612
+ * List latest blocks
2613
+ * Lists latest blocks on one of the Primary Network chains.
2614
+ * @returns ListPrimaryNetworkBlocksResponse
1807
2615
  * @throws ApiError
1808
2616
  */
1809
- listListingsByCollectionTokenId({ chainId, address, tokenId, pageSize, pageToken, sortBy, sortOrder, currency, includeHistory, }: {
1810
- /**
1811
- * A supported evm chain id. Use the `/chains` endpoint to get
1812
- * a list of supported chain ids.
1813
- */
1814
- chainId: string;
2617
+ listLatestPrimaryNetworkBlocks({ blockchainId, network, pageSize, pageToken, }: {
1815
2618
  /**
1816
- * Contract address on the relevant chain.
2619
+ * A primary network blockchain id or alias.
1817
2620
  */
1818
- address: string;
2621
+ blockchainId: BlockchainId;
1819
2622
  /**
1820
- * TokenId on the contract
2623
+ * Either mainnet or a testnet.
1821
2624
  */
1822
- tokenId: string;
2625
+ network: Network;
1823
2626
  /**
1824
- * The maximum number of items to return. The minimum page size
1825
- * is 1. The maximum pageSize is 100.
2627
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1826
2628
  */
1827
2629
  pageSize?: number;
1828
2630
  /**
1829
2631
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1830
2632
  */
1831
2633
  pageToken?: string;
1832
- /**
1833
- * Which property to sort by, in conjunction with sortOrder.
1834
- */
1835
- sortBy?: ListingsSortByOption;
1836
- /**
1837
- * The order by which to sort results. Use "asc" for ascending
1838
- * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
1839
- * query parameter, if provided.
1840
- */
1841
- sortOrder?: SortOrder;
1842
- /**
1843
- * The currency that return values should use. Defaults to USD.
1844
- */
1845
- currency?: CurrencyCode;
1846
- /**
1847
- * Determines whether to return full transaction history for listings.
1848
- */
1849
- includeHistory?: boolean;
1850
- }): CancelablePromise<ListListingsResponse>;
2634
+ }): CancelablePromise<ListPrimaryNetworkBlocksResponse>;
2635
+ }
2636
+
2637
+ declare enum RewardType {
2638
+ VALIDATOR = "VALIDATOR",
2639
+ DELEGATOR = "DELEGATOR"
2640
+ }
2641
+
2642
+ type HistoricalReward = {
2643
+ /**
2644
+ * An array of P-Chain wallet addresses.
2645
+ */
2646
+ addresses: Array<string>;
2647
+ txHash: string;
2648
+ amountStaked: string;
2649
+ nodeId: string;
2650
+ startTimestamp: number;
2651
+ endTimestamp: number;
2652
+ rewardType: RewardType;
2653
+ utxoId: string;
2654
+ outputIndex: number;
2655
+ /**
2656
+ * An object containing P-chain Asset ID and the amount of that Asset ID.
2657
+ */
2658
+ reward: PChainAsset;
2659
+ rewardTxHash: string;
2660
+ };
2661
+
2662
+ type ListHistoricalRewardsResponse = {
2663
+ /**
2664
+ * 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.
2665
+ */
2666
+ nextPageToken?: string;
2667
+ historicalRewards: Array<HistoricalReward>;
2668
+ };
2669
+
2670
+ type PendingReward = {
2671
+ /**
2672
+ * An array of P-Chain wallet addresses.
2673
+ */
2674
+ addresses: Array<string>;
2675
+ txHash: string;
2676
+ amountStaked: string;
2677
+ nodeId: string;
2678
+ startTimestamp: number;
2679
+ endTimestamp: number;
2680
+ rewardType: RewardType;
2681
+ progress: number;
2682
+ /**
2683
+ * An object containing P-chain Asset ID and the amount of that Asset ID.
2684
+ */
2685
+ estimatedReward: PChainAsset;
2686
+ };
2687
+
2688
+ type ListPendingRewardsResponse = {
2689
+ /**
2690
+ * 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.
2691
+ */
2692
+ nextPageToken?: string;
2693
+ pendingRewards: Array<PendingReward>;
2694
+ };
2695
+
2696
+ declare class PrimaryNetworkRewardsService {
2697
+ readonly httpRequest: BaseHttpRequest;
2698
+ constructor(httpRequest: BaseHttpRequest);
1851
2699
  /**
1852
- * List open listings for a NFT collection.
1853
- * @returns ListListingsResponse
2700
+ * List pending rewards
2701
+ * Lists pending rewards on the Primary Network for the supplied addresses.
2702
+ * @returns ListPendingRewardsResponse
1854
2703
  * @throws ApiError
1855
2704
  */
1856
- listListingsByCollection({ chainId, address, pageSize, pageToken, sortBy, sortOrder, currency, includeHistory, }: {
2705
+ listPendingPrimaryNetworkRewards({ network, addresses, pageSize, pageToken, sortOrder, }: {
1857
2706
  /**
1858
- * A supported evm chain id. Use the `/chains` endpoint to get
1859
- * a list of supported chain ids.
2707
+ * Either mainnet or a testnet.
1860
2708
  */
1861
- chainId: string;
2709
+ network: Network;
1862
2710
  /**
1863
- * Contract address on the relevant chain.
2711
+ * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
1864
2712
  */
1865
- address: string;
2713
+ addresses?: string;
1866
2714
  /**
1867
- * The maximum number of items to return. The minimum page size
1868
- * is 1. The maximum pageSize is 100.
2715
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1869
2716
  */
1870
2717
  pageSize?: number;
1871
2718
  /**
@@ -1873,64 +2720,27 @@ declare class EvmService {
1873
2720
  */
1874
2721
  pageToken?: string;
1875
2722
  /**
1876
- * Which property to sort by, in conjunction with sortOrder.
1877
- */
1878
- sortBy?: ListingsSortByOption;
1879
- /**
1880
- * The order by which to sort results. Use "asc" for ascending
1881
- * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
1882
- * query parameter, if provided.
2723
+ * The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
1883
2724
  */
1884
2725
  sortOrder?: SortOrder;
1885
- /**
1886
- * The currency that return values should use. Defaults to USD.
1887
- */
1888
- currency?: CurrencyCode;
1889
- /**
1890
- * Determines whether to return full transaction history for listings.
1891
- */
1892
- includeHistory?: boolean;
1893
- }): CancelablePromise<ListListingsResponse>;
2726
+ }): CancelablePromise<ListPendingRewardsResponse>;
1894
2727
  /**
1895
- * List recent listings on the chain.
1896
- * @returns ListListingsResponse
2728
+ * List historical rewards
2729
+ * Lists historical rewards on the Primary Network for the supplied addresses.
2730
+ * @returns ListHistoricalRewardsResponse
1897
2731
  * @throws ApiError
1898
2732
  */
1899
- listRecentListings({ chainId, pageSize, pageToken, eventType, currency, }: {
1900
- /**
1901
- * A supported evm chain id. Use the `/chains` endpoint to get
1902
- * a list of supported chain ids.
1903
- */
1904
- chainId: string;
1905
- /**
1906
- * The maximum number of items to return. The minimum page size
1907
- * is 1. The maximum pageSize is 100.
1908
- */
1909
- pageSize?: number;
1910
- /**
1911
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1912
- */
1913
- pageToken?: string;
1914
- eventType?: ListingEventType;
2733
+ listHistoricalPrimaryNetworkRewards({ network, addresses, pageSize, pageToken, sortOrder, }: {
1915
2734
  /**
1916
- * The currency that return values should use. Defaults to USD.
2735
+ * Either mainnet or a testnet.
1917
2736
  */
1918
- currency?: CurrencyCode;
1919
- }): CancelablePromise<ListListingsResponse>;
1920
- /**
1921
- * List details and metrics for collections.
1922
- * @returns ListNftCollectionWithMetricsResponse
1923
- * @throws ApiError
1924
- */
1925
- listCollections({ chainId, pageSize, pageToken, timeframe, sortBy, sortOrder, }: {
2737
+ network: Network;
1926
2738
  /**
1927
- * A supported evm chain id. Use the `/chains` endpoint to get
1928
- * a list of supported chain ids.
2739
+ * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
1929
2740
  */
1930
- chainId: string;
2741
+ addresses?: string;
1931
2742
  /**
1932
- * The maximum number of items to return. The minimum page size
1933
- * is 1. The maximum pageSize is 100.
2743
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1934
2744
  */
1935
2745
  pageSize?: number;
1936
2746
  /**
@@ -1938,142 +2748,10 @@ declare class EvmService {
1938
2748
  */
1939
2749
  pageToken?: string;
1940
2750
  /**
1941
- * The timeframe to use for trending listings. Use "DAY" for 24 hours, "WEEK" for 7 days, "MONTH" for 30 days.
1942
- */
1943
- timeframe?: TrendingTimeframe;
1944
- /**
1945
- * Which property to sort by, in conjunction with sortOrder.
1946
- */
1947
- sortBy?: CollectionSortByOption;
1948
- /**
1949
- * The order by which to sort results. Use "asc" for ascending
1950
- * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
1951
- * query parameter, if provided.
2751
+ * The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
1952
2752
  */
1953
2753
  sortOrder?: SortOrder;
1954
- }): CancelablePromise<ListNftCollectionWithMetricsResponse>;
1955
- /**
1956
- * Search for token by name and contract name.
1957
- * @returns any
1958
- * @throws ApiError
1959
- */
1960
- search({ chainId, requestBody, }: {
1961
- /**
1962
- * A supported evm chain id. Use the `/chains` endpoint to get
1963
- * a list of supported chain ids.
1964
- */
1965
- chainId: string;
1966
- requestBody: NftSearchBody;
1967
- }): CancelablePromise<{
1968
- results?: Array<NftCollection>;
1969
- }>;
1970
- }
1971
-
1972
- declare class HealthCheckService {
1973
- readonly httpRequest: BaseHttpRequest;
1974
- constructor(httpRequest: BaseHttpRequest);
1975
- /**
1976
- * Get the health of the service.
1977
- * @returns any The Health Check is successful
1978
- * @throws ApiError
1979
- */
1980
- healthCheck(): CancelablePromise<{
1981
- status?: string;
1982
- info?: Record<string, Record<string, string>> | null;
1983
- error?: Record<string, Record<string, string>> | null;
1984
- details?: Record<string, Record<string, string>>;
1985
- }>;
1986
- }
1987
-
1988
- type EvmNetworkOptions = {
1989
- addresses: Array<string>;
1990
- includeChainIds: Array<string>;
1991
- };
1992
-
1993
- type PrimaryNetworkOptions = {
1994
- addresses: Array<string>;
1995
- includeChains: Array<'p-chain' | 'x-chain' | 'c-chain' | '11111111111111111111111111111111LpoYY' | '2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM'>;
1996
- };
1997
-
1998
- type CreateTransactionExportRequest = {
1999
- startDate: string;
2000
- endDate: string;
2001
- primaryNetwork?: PrimaryNetworkOptions;
2002
- evmNetwork?: EvmNetworkOptions;
2003
- };
2004
-
2005
- declare enum OperationStatus {
2006
- RUNNING = "RUNNING",
2007
- COMPLETED = "COMPLETED",
2008
- COMPLETED_WITH_WARNING = "COMPLETED_WITH_WARNING",
2009
- FAILED = "FAILED"
2010
- }
2011
-
2012
- declare enum OperationStatusCode {
2013
- ERR_INVALID_REQUEST = "ErrInvalidRequest",
2014
- ERR_INTERNAL = "ErrInternal",
2015
- WARN_TRUNCATED_EXPORT = "WarnTruncatedExport"
2016
- }
2017
-
2018
- type OperationTransactionExportMetadata = {
2019
- code: OperationStatusCode;
2020
- /**
2021
- * File download URL. Provided only for COMPLETED operations.
2022
- */
2023
- downloadUrl?: string;
2024
- /**
2025
- * The next date to use as the startDate in follow up requests
2026
- * if a request results in a transaction history exceeding the max size and
2027
- * has been reported as COMPLETED_WITH_WARNING with the warning
2028
- * WarnTruncatedExport.
2029
- */
2030
- nextDate?: string;
2031
- };
2032
-
2033
- declare enum OperationType {
2034
- TRANSACTION_EXPORT = "TRANSACTION_EXPORT"
2035
- }
2036
-
2037
- type OperationStatusResponse = {
2038
- operationId: string;
2039
- operationType: OperationType;
2040
- operationStatus: OperationStatus;
2041
- message?: string;
2042
- metadata: OperationTransactionExportMetadata;
2043
- createdAtTimestamp: number;
2044
- updatedAtTimestamp: number;
2045
- };
2046
-
2047
- declare class OperationsService {
2048
- readonly httpRequest: BaseHttpRequest;
2049
- constructor(httpRequest: BaseHttpRequest);
2050
- /**
2051
- * Trigger a transaction export operation with given parameters.
2052
- * @returns OperationStatusResponse
2053
- * @throws ApiError
2054
- */
2055
- postTransactionExportJob({ requestBody, }: {
2056
- requestBody: CreateTransactionExportRequest;
2057
- }): CancelablePromise<OperationStatusResponse>;
2058
- /**
2059
- * Retrieve operation result with given operation id
2060
- * @returns OperationStatusResponse
2061
- * @throws ApiError
2062
- */
2063
- getOperationResult({ operationId, }: {
2064
- /**
2065
- * UUID of given operation
2066
- */
2067
- operationId: string;
2068
- }): CancelablePromise<OperationStatusResponse>;
2069
- }
2070
-
2071
- declare enum BlockchainId {
2072
- P_CHAIN = "p-chain",
2073
- X_CHAIN = "x-chain",
2074
- C_CHAIN = "c-chain",
2075
- _11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY",
2076
- _2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM"
2754
+ }): CancelablePromise<ListHistoricalRewardsResponse>;
2077
2755
  }
2078
2756
 
2079
2757
  type Asset = {
@@ -2103,6 +2781,17 @@ type Asset = {
2103
2781
  amount: string;
2104
2782
  };
2105
2783
 
2784
+ type UtxoCredential = {
2785
+ /**
2786
+ * Signature provided to consume the output
2787
+ */
2788
+ signature?: string;
2789
+ /**
2790
+ * Public key associated with the signature
2791
+ */
2792
+ publicKey?: string;
2793
+ };
2794
+
2106
2795
  type EVMInput = {
2107
2796
  /**
2108
2797
  * EVM address from which the asset is exported in ExportTx.
@@ -2112,17 +2801,10 @@ type EVMInput = {
2112
2801
  * Asset details for the asset being transferred.
2113
2802
  */
2114
2803
  asset: Asset;
2115
- };
2116
-
2117
- type UtxoCredential = {
2118
- /**
2119
- * Signature provided to consume the output
2120
- */
2121
- signature?: string;
2122
2804
  /**
2123
- * Public key associated with the signature
2805
+ * Credentials that signed this transaction.
2124
2806
  */
2125
- publicKey?: string;
2807
+ credentials: Array<UtxoCredential>;
2126
2808
  };
2127
2809
 
2128
2810
  type Utxo = {
@@ -2175,10 +2857,18 @@ type Utxo = {
2175
2857
  * Addresses that are eligible to sign the consumption of this output.
2176
2858
  */
2177
2859
  addresses: Array<string>;
2860
+ /**
2861
+ * Hex encoded data for NFT assets
2862
+ */
2863
+ payload?: string;
2864
+ /**
2865
+ * Index representing the minting set for the NFT mint output
2866
+ */
2867
+ groupId?: number;
2178
2868
  /**
2179
2869
  * Credentials that signed the transaction to consume this utxo
2180
2870
  */
2181
- credentials: Array<UtxoCredential>;
2871
+ credentials?: Array<UtxoCredential>;
2182
2872
  };
2183
2873
 
2184
2874
  type CChainExportTransaction = {
@@ -2298,204 +2988,34 @@ declare namespace CChainImportTransaction {
2298
2988
  }
2299
2989
  }
2300
2990
 
2301
- type ChainAddressChainIdMap = {
2302
- address: string;
2303
- blockchainIds: BlockchainId;
2304
- };
2305
-
2306
- type ChainAddressChainIdMapListResponse = {
2307
- addresses: Array<ChainAddressChainIdMap>;
2308
- };
2309
-
2310
- type CChainSharedAssetBalance = {
2311
- /**
2312
- * Unique ID for an asset.
2313
- */
2314
- assetId: string;
2315
- /**
2316
- * Name of this asset.
2317
- */
2318
- name: string;
2319
- /**
2320
- * Symbol for this asset (max 4 characters).
2321
- */
2322
- symbol: string;
2323
- /**
2324
- * Denomination of this asset to represent fungibility.
2325
- */
2326
- denomination: number;
2327
- /**
2328
- * Type of asset like SECP256K1 or NFT.
2329
- */
2330
- type: string;
2331
- /**
2332
- * Amount of the asset.
2333
- */
2334
- amount: string;
2335
- utxoCount: number;
2336
- sharedWithChainId: string;
2337
- };
2338
-
2339
- type CChainAtomicBalances = {
2340
- atomicMemoryUnlocked: Array<CChainSharedAssetBalance>;
2341
- atomicMemoryLocked: Array<CChainSharedAssetBalance>;
2342
- };
2343
-
2344
- type ListCChainAtomicBalancesResponse = {
2345
- balances: CChainAtomicBalances;
2346
- };
2347
-
2348
2991
  type ListCChainAtomicTransactionsResponse = {
2349
2992
  /**
2350
2993
  * 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.
2351
2994
  */
2352
2995
  nextPageToken?: string;
2353
2996
  transactions: Array<(CChainExportTransaction | CChainImportTransaction)>;
2354
- };
2355
-
2356
- type PChainAsset = {
2357
- assetId: string;
2358
- amount: string;
2359
- };
2360
-
2361
- type PChainBalance = {
2362
- /**
2363
- * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is consumable by any transaction.
2364
- */
2365
- unlockedUnstaked?: Array<PChainAsset>;
2366
- /**
2367
- * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of staked Avax that is consumable by any transaction when the staking period ends.
2368
- */
2369
- unlockedStaked?: Array<PChainAsset>;
2370
- /**
2371
- * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is locked at the platform level and not consumable by any transaction at the current time.
2372
- */
2373
- lockedPlatform?: Array<PChainAsset>;
2374
- /**
2375
- * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is locked at the platform level and only consumeable for staking transactions.
2376
- */
2377
- lockedStakeable?: Array<PChainAsset>;
2378
- /**
2379
- * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of staked Avax that will be locked when the staking period ends.
2380
- */
2381
- lockedStaked?: Array<PChainAsset>;
2382
- /**
2383
- * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is locked. Sum of lockedPlatform and lockedStakeable. TO BE DEPRECATED.
2384
- */
2385
- lockedUnstaked?: Array<PChainAsset>;
2386
- };
2387
-
2388
- type ListPChainBalancesResponse = {
2389
- balances: PChainBalance;
2390
- };
2391
-
2392
- type PChainConsumedUtxo = {
2393
- addresses: Array<string>;
2394
- amount: string;
2395
- assetId: string;
2396
- utxoId: string;
2397
- createdOnChainId: string;
2398
- consumedOnChainId: string;
2399
- fromTx: string;
2400
- };
2401
-
2402
- type PChainEmittedUtxo = {
2403
- addresses: Array<string>;
2404
- amount: string;
2405
- assetId: string;
2406
- utxoId: string;
2407
- createdOnChainId: string;
2408
- consumedOnChainId: string;
2409
- staked: boolean;
2410
- /**
2411
- * This field is only present if the UTXO has been consumed by another transaction.
2412
- */
2413
- toTx?: string;
2414
- /**
2415
- * This field is only present if the UTXO is a transaction reward and denotes whether the reward is for the validator or delegator.
2416
- */
2417
- rewardType?: string;
2418
- };
2419
-
2420
- type PChainTransaction = {
2421
- /**
2422
- * A P-Chain transaction hash.
2423
- */
2424
- txHash: string;
2425
- txType: string;
2426
- /**
2427
- * The block finality timestamp.
2428
- */
2429
- blockTimestamp: number;
2430
- blockNumber: string;
2431
- blockHash: string;
2432
- /**
2433
- * A list of objects containing consumed UTXO info pertaining to a given transaction.
2434
- */
2435
- consumedUtxos?: Array<PChainConsumedUtxo>;
2436
- /**
2437
- * A list of objects containing emitted UTXO info pertaining to a given transaction.
2438
- */
2439
- emittedUtxos?: Array<PChainEmittedUtxo>;
2440
- /**
2441
- * Source chain for an atomic transaction.
2442
- */
2443
- sourceChain?: string;
2444
- /**
2445
- * Destination chain for an atomic transaction.
2446
- */
2447
- destinationChain?: string;
2448
- /**
2449
- * A list of objects containing P-chain Asset ID and the amount of that Asset ID.
2450
- */
2451
- value?: Array<PChainAsset>;
2452
- /**
2453
- * A list of objects containing P-chain Asset ID and the amount of that Asset ID.
2454
- */
2455
- amountBurned?: Array<PChainAsset>;
2456
- /**
2457
- * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2458
- */
2459
- amountStaked?: Array<PChainAsset>;
2460
- /**
2461
- * Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2462
- */
2463
- startTimestamp?: number;
2464
- /**
2465
- * Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2466
- */
2467
- endTimestamp?: number;
2468
- /**
2469
- * Present for AddValidatorTx, AddPermissionlessValidatorTx
2470
- */
2471
- delegationFeePercent?: string;
2472
- /**
2473
- * Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2474
- */
2475
- nodeId?: string;
2476
- /**
2477
- * Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx, CreateChainTx, CreateSubnetTx
2478
- */
2479
- subnetId?: string;
2480
- /**
2481
- * Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2482
- */
2483
- estimatedReward?: string;
2484
- rewardTx?: string;
2485
- memo?: string;
2486
- /**
2487
- * Present for RewardValidatorTx
2488
- */
2489
- stakingTxHash?: string;
2490
- };
2997
+ chainInfo: PrimaryNetworkChainInfo;
2998
+ };
2999
+
3000
+ declare enum PChainTransactionType {
3001
+ ADD_VALIDATOR_TX = "AddValidatorTx",
3002
+ ADD_DELEGATOR_TX = "AddDelegatorTx",
3003
+ ADD_PERMISSIONLESS_VALIDATOR_TX = "AddPermissionlessValidatorTx",
3004
+ ADD_SUBNET_VALIDATOR_TX = "AddSubnetValidatorTx",
3005
+ REMOVE_SUBNET_VALIDATOR_TX = "RemoveSubnetValidatorTx",
3006
+ REWARD_VALIDATOR_TX = "RewardValidatorTx",
3007
+ CREATE_CHAIN_TX = "CreateChainTx",
3008
+ CREATE_SUBNET_TX = "CreateSubnetTx",
3009
+ IMPORT_TX = "ImportTx",
3010
+ EXPORT_TX = "ExportTx",
3011
+ ADVANCE_TIME_TX = "AdvanceTimeTx",
3012
+ UNKNOWN = "UNKNOWN"
3013
+ }
2491
3014
 
2492
- type ListPChainTransactionsResponse = {
2493
- /**
2494
- * 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.
2495
- */
2496
- nextPageToken?: string;
2497
- transactions: Array<PChainTransaction>;
2498
- };
3015
+ declare enum UtxoType {
3016
+ STAKE = "STAKE",
3017
+ TRANSFER = "TRANSFER"
3018
+ }
2499
3019
 
2500
3020
  type PChainUtxo = {
2501
3021
  /**
@@ -2505,138 +3025,98 @@ type PChainUtxo = {
2505
3025
  utxoId: string;
2506
3026
  txHash: string;
2507
3027
  outputIndex: number;
3028
+ blockNumber: string;
2508
3029
  blockTimestamp: number;
2509
3030
  consumingTxHash?: string;
2510
3031
  consumingBlockTimestamp?: number;
3032
+ consumingBlockNumber?: string;
2511
3033
  assetId: string;
2512
- utxoType: string;
3034
+ utxoType: UtxoType;
2513
3035
  amount: string;
2514
3036
  stakeableLocktime?: number;
2515
3037
  platformLocktime?: number;
2516
3038
  threshold?: number;
2517
3039
  createdOnChainId: string;
2518
3040
  consumedOnChainId: string;
3041
+ staked?: boolean;
3042
+ utxoStartTimestamp?: number;
3043
+ utxoEndTimestamp?: number;
3044
+ rewardType?: RewardType;
2519
3045
  };
2520
3046
 
2521
- type ListPChainUtxosResponse = {
2522
- /**
2523
- * 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.
2524
- */
2525
- nextPageToken?: string;
2526
- utxos: Array<PChainUtxo>;
2527
- };
2528
-
2529
- type ListUtxosResponse = {
2530
- /**
2531
- * 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.
2532
- */
2533
- nextPageToken?: string;
2534
- utxos: Array<Utxo>;
2535
- };
2536
-
2537
- type XChainAssetBalance = {
2538
- /**
2539
- * Unique ID for an asset.
2540
- */
2541
- assetId: string;
2542
- /**
2543
- * Name of this asset.
2544
- */
2545
- name: string;
2546
- /**
2547
- * Symbol for this asset (max 4 characters).
2548
- */
2549
- symbol: string;
2550
- /**
2551
- * Denomination of this asset to represent fungibility.
2552
- */
2553
- denomination: number;
2554
- /**
2555
- * Type of asset like SECP256K1 or NFT.
2556
- */
2557
- type: string;
2558
- /**
2559
- * Amount of the asset.
2560
- */
2561
- amount: string;
2562
- utxoCount: number;
2563
- };
2564
-
2565
- type XChainSharedAssetBalance = {
2566
- /**
2567
- * Unique ID for an asset.
2568
- */
2569
- assetId: string;
3047
+ type PChainTransaction = {
2570
3048
  /**
2571
- * Name of this asset.
3049
+ * A P-Chain transaction hash.
2572
3050
  */
2573
- name: string;
3051
+ txHash: string;
3052
+ txType: PChainTransactionType;
2574
3053
  /**
2575
- * Symbol for this asset (max 4 characters).
3054
+ * The block finality timestamp.
2576
3055
  */
2577
- symbol: string;
3056
+ blockTimestamp: number;
3057
+ blockNumber: string;
3058
+ blockHash: string;
3059
+ consumedUtxos: Array<PChainUtxo>;
3060
+ emittedUtxos: Array<PChainUtxo>;
2578
3061
  /**
2579
- * Denomination of this asset to represent fungibility.
3062
+ * Source chain for an atomic transaction.
2580
3063
  */
2581
- denomination: number;
3064
+ sourceChain?: string;
2582
3065
  /**
2583
- * Type of asset like SECP256K1 or NFT.
3066
+ * Destination chain for an atomic transaction.
2584
3067
  */
2585
- type: string;
3068
+ destinationChain?: string;
2586
3069
  /**
2587
- * Amount of the asset.
2588
- */
2589
- amount: string;
2590
- utxoCount: number;
2591
- sharedWithChainId: string;
2592
- };
2593
-
2594
- type XChainBalances = {
3070
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID.
3071
+ */
3072
+ value: Array<PChainAsset>;
2595
3073
  /**
2596
- * A list of objects containing X-chain Asset balance infromation.
3074
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID.
2597
3075
  */
2598
- locked: Array<XChainAssetBalance>;
3076
+ amountBurned: Array<PChainAsset>;
2599
3077
  /**
2600
- * A list of objects containing X-chain Asset balance infromation.
3078
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2601
3079
  */
2602
- unlocked: Array<XChainAssetBalance>;
2603
- atomicMemoryUnlocked: Array<XChainSharedAssetBalance>;
2604
- atomicMemoryLocked: Array<XChainSharedAssetBalance>;
2605
- };
2606
-
2607
- type ListXChainBalancesResponse = {
2608
- balances: XChainBalances;
2609
- };
2610
-
2611
- type XChainAssetDetails = {
3080
+ amountStaked: Array<PChainAsset>;
2612
3081
  /**
2613
- * Unique ID for an asset.
3082
+ * Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2614
3083
  */
2615
- assetId: string;
3084
+ startTimestamp?: number;
2616
3085
  /**
2617
- * Name of this asset.
3086
+ * Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2618
3087
  */
2619
- name: string;
3088
+ endTimestamp?: number;
2620
3089
  /**
2621
- * Symbol for this asset (max 4 characters).
3090
+ * Present for AddValidatorTx, AddPermissionlessValidatorTx
2622
3091
  */
2623
- symbol: string;
3092
+ delegationFeePercent?: string;
2624
3093
  /**
2625
- * Denomination of this asset to represent fungibility.
3094
+ * Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2626
3095
  */
2627
- denomination: number;
3096
+ nodeId?: string;
2628
3097
  /**
2629
- * Type of asset like SECP256K1 or NFT.
3098
+ * Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx, CreateChainTx, CreateSubnetTx
2630
3099
  */
2631
- type: string;
3100
+ subnetId?: string;
2632
3101
  /**
2633
- * Timestamp in seconds this asset was created on.
3102
+ * Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2634
3103
  */
2635
- createdAtTimestamp: number;
3104
+ estimatedReward?: string;
3105
+ rewardTxHash?: string;
3106
+ memo?: string;
2636
3107
  /**
2637
- * Cap represents if an asset can be or is fixed cap.
3108
+ * Present for RewardValidatorTx
2638
3109
  */
2639
- cap: string;
3110
+ stakingTxHash?: string;
3111
+ };
3112
+
3113
+ type ListPChainTransactionsResponse = {
3114
+ /**
3115
+ * 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.
3116
+ */
3117
+ nextPageToken?: string;
3118
+ transactions: Array<PChainTransaction>;
3119
+ chainInfo: PrimaryNetworkChainInfo;
2640
3120
  };
2641
3121
 
2642
3122
  type XChainLinearTransaction = {
@@ -2645,7 +3125,7 @@ type XChainLinearTransaction = {
2645
3125
  */
2646
3126
  txHash: string;
2647
3127
  /**
2648
- * Represents container format this transaction is included in.
3128
+ * Represents chain format this transaction is included in.
2649
3129
  */
2650
3130
  chainFormat: XChainLinearTransaction.chainFormat;
2651
3131
  /**
@@ -2693,11 +3173,11 @@ type XChainLinearTransaction = {
2693
3173
  };
2694
3174
  declare namespace XChainLinearTransaction {
2695
3175
  /**
2696
- * Represents container format this transaction is included in.
3176
+ * Represents chain format this transaction is included in.
2697
3177
  */
2698
3178
  enum chainFormat {
2699
- LINEAR = "linear",
2700
- NON_LINEAR = "non-linear"
3179
+ NON_LINEAR = "non-linear",
3180
+ LINEAR = "linear"
2701
3181
  }
2702
3182
  }
2703
3183
 
@@ -2722,7 +3202,7 @@ type XChainNonLinearTransaction = {
2722
3202
  */
2723
3203
  txHash: string;
2724
3204
  /**
2725
- * Represents container format this transaction is included in.
3205
+ * Represents chain format this transaction is included in.
2726
3206
  */
2727
3207
  chainFormat: XChainNonLinearTransaction.chainFormat;
2728
3208
  /**
@@ -2766,11 +3246,11 @@ type XChainNonLinearTransaction = {
2766
3246
  };
2767
3247
  declare namespace XChainNonLinearTransaction {
2768
3248
  /**
2769
- * Represents container format this transaction is included in.
3249
+ * Represents chain format this transaction is included in.
2770
3250
  */
2771
3251
  enum chainFormat {
2772
- LINEAR = "linear",
2773
- NON_LINEAR = "non-linear"
3252
+ NON_LINEAR = "non-linear",
3253
+ LINEAR = "linear"
2774
3254
  }
2775
3255
  }
2776
3256
 
@@ -2780,53 +3260,44 @@ type ListXChainTransactionsResponse = {
2780
3260
  */
2781
3261
  nextPageToken?: string;
2782
3262
  transactions: Array<(XChainNonLinearTransaction | XChainLinearTransaction)>;
3263
+ chainInfo: PrimaryNetworkChainInfo;
2783
3264
  };
2784
3265
 
2785
- type XChainVertex = {
2786
- vertexHash: string;
2787
- parentHashes: Array<string>;
2788
- vertexHeight: number;
2789
- vertexIndex: number;
2790
- vertexTimestamp: number;
2791
- txCount: number;
2792
- transactions: Array<string>;
2793
- vertexSizeBytes: number;
2794
- };
2795
-
2796
- type ListXChainVerticesResponse = {
2797
- /**
2798
- * 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.
2799
- */
2800
- nextPageToken?: string;
2801
- vertices: Array<XChainVertex>;
2802
- };
2803
-
2804
- declare enum Network {
2805
- MAINNET = "mainnet",
2806
- FUJI = "fuji"
2807
- }
2808
-
2809
3266
  declare enum PChainId {
2810
- P_CHAIN = "p-chain",
2811
- _11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY"
3267
+ _11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY",
3268
+ P_CHAIN = "p-chain"
2812
3269
  }
2813
3270
 
2814
- declare enum XChainId {
2815
- X_CHAIN = "x-chain",
2816
- _2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM"
3271
+ declare enum PrimaryNetworkTxType {
3272
+ ADD_VALIDATOR_TX = "AddValidatorTx",
3273
+ ADD_DELEGATOR_TX = "AddDelegatorTx",
3274
+ ADD_PERMISSIONLESS_VALIDATOR_TX = "AddPermissionlessValidatorTx",
3275
+ ADD_SUBNET_VALIDATOR_TX = "AddSubnetValidatorTx",
3276
+ REMOVE_SUBNET_VALIDATOR_TX = "RemoveSubnetValidatorTx",
3277
+ REWARD_VALIDATOR_TX = "RewardValidatorTx",
3278
+ CREATE_CHAIN_TX = "CreateChainTx",
3279
+ CREATE_SUBNET_TX = "CreateSubnetTx",
3280
+ IMPORT_TX = "ImportTx",
3281
+ EXPORT_TX = "ExportTx",
3282
+ ADVANCE_TIME_TX = "AdvanceTimeTx",
3283
+ UNKNOWN = "UNKNOWN",
3284
+ BASE_TX = "BaseTx",
3285
+ CREATE_ASSET_TX = "CreateAssetTx",
3286
+ OPERATION_TX = "OperationTx"
2817
3287
  }
2818
3288
 
2819
- declare class PrimaryNetworkService {
3289
+ declare class PrimaryNetworkTransactionsService {
2820
3290
  readonly httpRequest: BaseHttpRequest;
2821
3291
  constructor(httpRequest: BaseHttpRequest);
2822
3292
  /**
2823
- * Returns the details of the supplied transaction hash.
3293
+ * Get transaction
3294
+ * Gets the details of a single transaction on one of the Primary Network chains.
2824
3295
  * @returns any
2825
3296
  * @throws ApiError
2826
3297
  */
2827
3298
  getTxByHash({ blockchainId, network, txHash, }: {
2828
3299
  /**
2829
- * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
3300
+ * A primary network blockchain id or alias.
2830
3301
  */
2831
3302
  blockchainId: BlockchainId;
2832
3303
  /**
@@ -2839,13 +3310,14 @@ declare class PrimaryNetworkService {
2839
3310
  txHash: string;
2840
3311
  }): CancelablePromise<(PChainTransaction | XChainNonLinearTransaction | XChainLinearTransaction | CChainExportTransaction | CChainImportTransaction)>;
2841
3312
  /**
2842
- * Returns latest transactions. If addresses are supplied, returns transactions for those addresses.
3313
+ * List latest transactions
3314
+ * Lists the latest transactions on one of the Primary Network chains. Transactions are filterable by addresses.
2843
3315
  * @returns any
2844
3316
  * @throws ApiError
2845
3317
  */
2846
- listLatestPrimaryNetworkTransactions({ blockchainId, network, addresses, pageSize, pageToken, sortOrder, }: {
3318
+ listLatestPrimaryNetworkTransactions({ blockchainId, network, addresses, txTypes, startTimestamp, endTimestamp, pageSize, pageToken, sortOrder, }: {
2847
3319
  /**
2848
- * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
3320
+ * A primary network blockchain id or alias.
2849
3321
  */
2850
3322
  blockchainId: BlockchainId;
2851
3323
  /**
@@ -2857,8 +3329,19 @@ declare class PrimaryNetworkService {
2857
3329
  */
2858
3330
  addresses?: string;
2859
3331
  /**
2860
- * The maximum number of items to return. The minimum page size
2861
- * is 1. The maximum pageSize is 100.
3332
+ * Query param for filtering items based on transaction types.
3333
+ */
3334
+ txTypes?: Array<PrimaryNetworkTxType>;
3335
+ /**
3336
+ * Query param for retrieving items after a specific timestamp.
3337
+ */
3338
+ startTimestamp?: number;
3339
+ /**
3340
+ * Query param for retrieving items before a specific timestamp.
3341
+ */
3342
+ endTimestamp?: number;
3343
+ /**
3344
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2862
3345
  */
2863
3346
  pageSize?: number;
2864
3347
  /**
@@ -2866,20 +3349,19 @@ declare class PrimaryNetworkService {
2866
3349
  */
2867
3350
  pageToken?: string;
2868
3351
  /**
2869
- * The order by which to sort results. Use "asc" for ascending
2870
- * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
2871
- * query parameter, if provided.
3352
+ * The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
2872
3353
  */
2873
3354
  sortOrder?: SortOrder;
2874
3355
  }): CancelablePromise<(ListPChainTransactionsResponse | ListXChainTransactionsResponse | ListCChainAtomicTransactionsResponse)>;
2875
3356
  /**
2876
- * Returns active staking transactions for supplied addresses.
3357
+ * List staking transactions
3358
+ * Lists active staking transactions on the P-Chain for the supplied addresses.
2877
3359
  * @returns ListPChainTransactionsResponse
2878
3360
  * @throws ApiError
2879
3361
  */
2880
- listActivePrimaryNetworkStakingTransactions({ blockchainId, network, addresses, pageSize, pageToken, sortOrder, }: {
3362
+ listActivePrimaryNetworkStakingTransactions({ blockchainId, network, addresses, txTypes, startTimestamp, endTimestamp, pageSize, pageToken, sortOrder, }: {
2881
3363
  /**
2882
- * A supported chain name for P-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain instead!
3364
+ * A primary network blockchain id or alias.
2883
3365
  */
2884
3366
  blockchainId: PChainId;
2885
3367
  /**
@@ -2891,8 +3373,19 @@ declare class PrimaryNetworkService {
2891
3373
  */
2892
3374
  addresses?: string;
2893
3375
  /**
2894
- * The maximum number of items to return. The minimum page size
2895
- * is 1. The maximum pageSize is 100.
3376
+ * Query param for filtering items based on transaction types.
3377
+ */
3378
+ txTypes?: Array<PrimaryNetworkTxType>;
3379
+ /**
3380
+ * Query param for retrieving items after a specific timestamp.
3381
+ */
3382
+ startTimestamp?: number;
3383
+ /**
3384
+ * Query param for retrieving items before a specific timestamp.
3385
+ */
3386
+ endTimestamp?: number;
3387
+ /**
3388
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2896
3389
  */
2897
3390
  pageSize?: number;
2898
3391
  /**
@@ -2900,96 +3393,82 @@ declare class PrimaryNetworkService {
2900
3393
  */
2901
3394
  pageToken?: string;
2902
3395
  /**
2903
- * The order by which to sort results. Use "asc" for ascending
2904
- * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
2905
- * query parameter, if provided.
3396
+ * The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
2906
3397
  */
2907
3398
  sortOrder?: SortOrder;
2908
3399
  }): CancelablePromise<ListPChainTransactionsResponse>;
2909
3400
  /**
2910
- * Returns a list of UTXOs for the supplied addresses.
2911
- * @returns any
3401
+ * List asset transactions
3402
+ * Lists asset transactions corresponding to the given asset id on the X-Chain.
3403
+ * @returns ListXChainTransactionsResponse
2912
3404
  * @throws ApiError
2913
3405
  */
2914
- getUtxosByAddresses({ blockchainId, network, addresses, pageSize, pageToken, assetId, sortOrder, }: {
3406
+ listAssetTransactions({ blockchainId, network, assetId, txTypes, startTimestamp, endTimestamp, pageSize, pageToken, }: {
2915
3407
  /**
2916
- * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
3408
+ * A primary network blockchain id or alias.
2917
3409
  */
2918
- blockchainId: BlockchainId;
3410
+ blockchainId: XChainId;
2919
3411
  /**
2920
3412
  * Either mainnet or a testnet.
2921
3413
  */
2922
3414
  network: Network;
2923
3415
  /**
2924
- * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
2925
- */
2926
- addresses?: string;
2927
- /**
2928
- * The maximum number of items to return. The minimum page size
2929
- * is 1. The maximum pageSize is 100.
2930
- */
2931
- pageSize?: number;
2932
- /**
2933
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3416
+ * Asset ID for any asset on X-Chain
2934
3417
  */
2935
- pageToken?: string;
3418
+ assetId: string;
2936
3419
  /**
2937
- * Asset ID for any asset (only applicable X-Chain)
3420
+ * Query param for filtering items based on transaction types.
2938
3421
  */
2939
- assetId?: string;
3422
+ txTypes?: Array<PrimaryNetworkTxType>;
2940
3423
  /**
2941
- * The order by which to sort results. Use "asc" for ascending
2942
- * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
2943
- * query parameter, if provided.
3424
+ * Query param for retrieving items after a specific timestamp.
2944
3425
  */
2945
- sortOrder?: SortOrder;
2946
- }): CancelablePromise<(ListPChainUtxosResponse | ListUtxosResponse)>;
2947
- /**
2948
- * Returns balance for P-Chain, X-Chain, and C-Chain (only shared memory balance for C-Chain).
2949
- * @returns any
2950
- * @throws ApiError
2951
- */
2952
- getBalancesByAddresses({ blockchainId, network, addresses, }: {
3426
+ startTimestamp?: number;
2953
3427
  /**
2954
- * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
3428
+ * Query param for retrieving items before a specific timestamp.
2955
3429
  */
2956
- blockchainId: BlockchainId;
3430
+ endTimestamp?: number;
2957
3431
  /**
2958
- * Either mainnet or a testnet.
3432
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2959
3433
  */
2960
- network: Network;
3434
+ pageSize?: number;
2961
3435
  /**
2962
- * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
3436
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2963
3437
  */
2964
- addresses?: string;
2965
- }): CancelablePromise<(ListPChainBalancesResponse | ListXChainBalancesResponse | ListCChainAtomicBalancesResponse)>;
3438
+ pageToken?: string;
3439
+ }): CancelablePromise<ListXChainTransactionsResponse>;
3440
+ }
3441
+
3442
+ type ListPChainUtxosResponse = {
2966
3443
  /**
2967
- * Returns block by block_height or block_hash on P-Chain, X-Chain (Cortina), C-Chain (hexadecimal for C-Chain).
2968
- * @returns Block
2969
- * @throws ApiError
3444
+ * 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.
2970
3445
  */
2971
- getBlockById({ blockchainId, network, blockId, }: {
2972
- /**
2973
- * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
2974
- */
2975
- blockchainId: BlockchainId;
2976
- /**
2977
- * Either mainnet or a testnet.
2978
- */
2979
- network: Network;
2980
- /**
2981
- * A block identifier which is either a block number or the block hash.
2982
- */
2983
- blockId: string;
2984
- }): CancelablePromise<Block>;
3446
+ nextPageToken?: string;
3447
+ utxos: Array<PChainUtxo>;
3448
+ chainInfo: PrimaryNetworkChainInfo;
3449
+ };
3450
+
3451
+ type ListUtxosResponse = {
3452
+ /**
3453
+ * 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.
3454
+ */
3455
+ nextPageToken?: string;
3456
+ utxos: Array<Utxo>;
3457
+ chainInfo: PrimaryNetworkChainInfo;
3458
+ };
3459
+
3460
+ declare class PrimaryNetworkUtxOsService {
3461
+ readonly httpRequest: BaseHttpRequest;
3462
+ constructor(httpRequest: BaseHttpRequest);
2985
3463
  /**
2986
- * Returns latest blocks proposed by a given NodeID, up to user defined limit.
2987
- * @returns ListBlocksResponse
3464
+ * List UTXOs
3465
+ * Lists UTXOs on one of the Primary Network chains for the supplied addresses.
3466
+ * @returns any
2988
3467
  * @throws ApiError
2989
3468
  */
2990
- listPrimaryNetworkBlocksByNodeId({ blockchainId, network, nodeId, pageSize, pageToken, }: {
3469
+ getUtxosByAddresses({ blockchainId, network, addresses, pageSize, pageToken, assetId, includeSpent, sortOrder, }: {
2991
3470
  /**
2992
- * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
3471
+ * A primary network blockchain id or alias.
2993
3472
  */
2994
3473
  blockchainId: BlockchainId;
2995
3474
  /**
@@ -2997,51 +3476,64 @@ declare class PrimaryNetworkService {
2997
3476
  */
2998
3477
  network: Network;
2999
3478
  /**
3000
- * A primary network (P or X chain) nodeId.
3479
+ * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
3001
3480
  */
3002
- nodeId: string;
3481
+ addresses?: string;
3003
3482
  /**
3004
- * The maximum number of items to return. The minimum page size
3005
- * is 1. The maximum pageSize is 100.
3483
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
3006
3484
  */
3007
3485
  pageSize?: number;
3008
3486
  /**
3009
3487
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3010
3488
  */
3011
3489
  pageToken?: string;
3012
- }): CancelablePromise<ListBlocksResponse>;
3013
- /**
3014
- * Returns latest blocks, up to user defined limit on P-Chain, X-Chain or C-Chain.
3015
- * @returns ListBlocksResponse
3016
- * @throws ApiError
3017
- */
3018
- listLatestPrimaryNetworkBlocks({ blockchainId, network, pageSize, pageToken, }: {
3019
3490
  /**
3020
- * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
3021
- */
3022
- blockchainId: BlockchainId;
3023
- /**
3024
- * Either mainnet or a testnet.
3491
+ * Asset ID for any asset (only applicable X-Chain)
3025
3492
  */
3026
- network: Network;
3493
+ assetId?: string;
3027
3494
  /**
3028
- * The maximum number of items to return. The minimum page size
3029
- * is 1. The maximum pageSize is 100.
3495
+ * Boolean filter to include spent UTXOs.
3030
3496
  */
3031
- pageSize?: number;
3497
+ includeSpent?: boolean;
3032
3498
  /**
3033
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3499
+ * The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
3034
3500
  */
3035
- pageToken?: string;
3036
- }): CancelablePromise<ListBlocksResponse>;
3501
+ sortOrder?: SortOrder;
3502
+ }): CancelablePromise<(ListPChainUtxosResponse | ListUtxosResponse)>;
3503
+ }
3504
+
3505
+ type XChainVertex = {
3506
+ vertexHash: string;
3507
+ parentHashes: Array<string>;
3508
+ vertexHeight: number;
3509
+ vertexIndex: number;
3510
+ vertexTimestamp: number;
3511
+ txCount: number;
3512
+ transactions: Array<string>;
3513
+ vertexSizeBytes: number;
3514
+ };
3515
+
3516
+ type ListXChainVerticesResponse = {
3517
+ /**
3518
+ * 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.
3519
+ */
3520
+ nextPageToken?: string;
3521
+ vertices: Array<XChainVertex>;
3522
+ chainInfo: PrimaryNetworkChainInfo;
3523
+ };
3524
+
3525
+ declare class PrimaryNetworkVerticesService {
3526
+ readonly httpRequest: BaseHttpRequest;
3527
+ constructor(httpRequest: BaseHttpRequest);
3037
3528
  /**
3038
- * Returns latest vertices, up to user defined limit on X-Chain.
3529
+ * List vertices
3530
+ * Lists latest vertices on the X-Chain.
3039
3531
  * @returns ListXChainVerticesResponse
3040
3532
  * @throws ApiError
3041
3533
  */
3042
3534
  listLatestXChainVertices({ blockchainId, network, pageSize, pageToken, }: {
3043
3535
  /**
3044
- * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
3536
+ * A primary network blockchain id or alias.
3045
3537
  */
3046
3538
  blockchainId: XChainId;
3047
3539
  /**
@@ -3049,8 +3541,7 @@ declare class PrimaryNetworkService {
3049
3541
  */
3050
3542
  network: Network;
3051
3543
  /**
3052
- * The maximum number of items to return. The minimum page size
3053
- * is 1. The maximum pageSize is 100.
3544
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
3054
3545
  */
3055
3546
  pageSize?: number;
3056
3547
  /**
@@ -3059,7 +3550,8 @@ declare class PrimaryNetworkService {
3059
3550
  pageToken?: string;
3060
3551
  }): CancelablePromise<ListXChainVerticesResponse>;
3061
3552
  /**
3062
- * Returns one vertex with the provided vertex hash on X-Chain.
3553
+ * Get vertex
3554
+ * Gets a single vertex on the X-Chain.
3063
3555
  * @returns XChainVertex
3064
3556
  * @throws ApiError
3065
3557
  */
@@ -3069,7 +3561,7 @@ declare class PrimaryNetworkService {
3069
3561
  */
3070
3562
  vertexHash: string;
3071
3563
  /**
3072
- * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
3564
+ * A primary network blockchain id or alias.
3073
3565
  */
3074
3566
  blockchainId: XChainId;
3075
3567
  /**
@@ -3078,7 +3570,8 @@ declare class PrimaryNetworkService {
3078
3570
  network: Network;
3079
3571
  }): CancelablePromise<XChainVertex>;
3080
3572
  /**
3081
- * Returns vertices with the provided vertex height on X-Chain.
3573
+ * List vertices by height
3574
+ * Lists vertices at the given vertex height on the X-Chain.
3082
3575
  * @returns ListXChainVerticesResponse
3083
3576
  * @throws ApiError
3084
3577
  */
@@ -3088,7 +3581,7 @@ declare class PrimaryNetworkService {
3088
3581
  */
3089
3582
  vertexHeight: number;
3090
3583
  /**
3091
- * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
3584
+ * A primary network blockchain id or alias.
3092
3585
  */
3093
3586
  blockchainId: XChainId;
3094
3587
  /**
@@ -3096,8 +3589,7 @@ declare class PrimaryNetworkService {
3096
3589
  */
3097
3590
  network: Network;
3098
3591
  /**
3099
- * The maximum number of items to return. The minimum page size
3100
- * is 1. The maximum pageSize is 100.
3592
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
3101
3593
  */
3102
3594
  pageSize?: number;
3103
3595
  /**
@@ -3105,82 +3597,27 @@ declare class PrimaryNetworkService {
3105
3597
  */
3106
3598
  pageToken?: string;
3107
3599
  /**
3108
- * The order by which to sort results. Use "asc" for ascending
3109
- * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
3110
- * query parameter, if provided.
3600
+ * The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
3111
3601
  */
3112
3602
  sortOrder?: SortOrder;
3113
3603
  }): CancelablePromise<ListXChainVerticesResponse>;
3114
- /**
3115
- * Returns asset details corresponding to the asset id on X-Chain.
3116
- * @returns XChainAssetDetails
3117
- * @throws ApiError
3118
- */
3119
- getAssetDetails({ blockchainId, network, assetId, }: {
3120
- /**
3121
- * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
3122
- */
3123
- blockchainId: XChainId;
3124
- /**
3125
- * Either mainnet or a testnet.
3126
- */
3127
- network: Network;
3128
- /**
3129
- * Asset ID for any asset on X-Chain
3130
- */
3131
- assetId: string;
3132
- }): CancelablePromise<XChainAssetDetails>;
3133
- /**
3134
- * Returns asset transactions corresponding to the asset id on X-Chain.
3135
- * @returns ListXChainTransactionsResponse
3136
- * @throws ApiError
3137
- */
3138
- getAssetTransactions({ blockchainId, network, assetId, pageSize, pageToken, }: {
3139
- /**
3140
- * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
3141
- */
3142
- blockchainId: XChainId;
3143
- /**
3144
- * Either mainnet or a testnet.
3145
- */
3146
- network: Network;
3147
- /**
3148
- * Asset ID for any asset on X-Chain
3149
- */
3150
- assetId: string;
3151
- /**
3152
- * The maximum number of items to return. The minimum page size
3153
- * is 1. The maximum pageSize is 100.
3154
- */
3155
- pageSize?: number;
3156
- /**
3157
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3158
- */
3159
- pageToken?: string;
3160
- }): CancelablePromise<ListXChainTransactionsResponse>;
3161
- /**
3162
- * Return all address-mapped chain IDs that an address has been seen on chain before.
3163
- * @returns ChainAddressChainIdMapListResponse
3164
- * @throws ApiError
3165
- */
3166
- getChainAddresses({ addresses, network, }: {
3167
- /**
3168
- * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
3169
- */
3170
- addresses: string;
3171
- /**
3172
- * Either mainnet or a testnet.
3173
- */
3174
- network: Network;
3175
- }): CancelablePromise<ChainAddressChainIdMapListResponse>;
3176
3604
  }
3177
3605
 
3178
3606
  type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
3179
3607
  declare class Glacier {
3180
- readonly evm: EvmService;
3608
+ readonly evmBalances: EvmBalancesService;
3609
+ readonly evmBlocks: EvmBlocksService;
3610
+ readonly evmChains: EvmChainsService;
3611
+ readonly evmTransactions: EvmTransactionsService;
3181
3612
  readonly healthCheck: HealthCheckService;
3182
3613
  readonly operations: OperationsService;
3183
3614
  readonly primaryNetwork: PrimaryNetworkService;
3615
+ readonly primaryNetworkBalances: PrimaryNetworkBalancesService;
3616
+ readonly primaryNetworkBlocks: PrimaryNetworkBlocksService;
3617
+ readonly primaryNetworkRewards: PrimaryNetworkRewardsService;
3618
+ readonly primaryNetworkTransactions: PrimaryNetworkTransactionsService;
3619
+ readonly primaryNetworkUtxOs: PrimaryNetworkUtxOsService;
3620
+ readonly primaryNetworkVertices: PrimaryNetworkVerticesService;
3184
3621
  readonly request: BaseHttpRequest;
3185
3622
  constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
3186
3623
  }
@@ -3202,4 +3639,4 @@ declare class ApiError extends Error {
3202
3639
  constructor(request: ApiRequestOptions, response: ApiResult, message: string);
3203
3640
  }
3204
3641
 
3205
- export { Address, ApiError, Asset, BaseHttpRequest, Block, BlockchainId, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelListingEventResponse, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CloseAuctionEventResponse, CollectionMetrics, CollectionSortByOption, CreateTransactionExportRequest, CurrencyCode, EVMInput, EVMOutput, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, ErcType, EvmNetworkOptions, EvmService, FullNativeTransactionDetails, GetBlockResponse, GetChainResponse, GetNativeBalanceResponse, GetTransactionResponse, Glacier, HealthCheckService, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlocksResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListInternalTransactionsResponse, ListListingsResponse, ListNativeTransactionsResponse, ListNftCollectionWithMetricsResponse, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, ListingCurrencyType, ListingEventType, ListingResponse, ListingType, ListingsSortByOption, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NftCollection, NftCollectionWithMetrics, NftFilterOptionsProperty, NftSearchBody, NftSearchResultTypeOption, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OpenListingEventResponse, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationTransactionExportMetadata, OperationType, OperationsService, PChainAsset, PChainBalance, PChainConsumedUtxo, PChainEmittedUtxo, PChainId, PChainTransaction, PChainUtxo, PaginationParams, PrimaryNetworkOptions, PrimaryNetworkService, ProposerDetails, PurchaseListingEventResponse, ResourceLink, ResourceLinkType, RichAddress, SortOrder, TokenWithPrice, TransactionDetails, TransactionMethodType, TransactionStatus, TransactionVertexDetail, TrendingTimeframe, UtilityAddresses, Utxo, UtxoCredential, VmName, XChainAssetBalance, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainVertex };
3642
+ export { ActiveDelegatorDetails, ActiveValidatorDetails, ApiError, Asset, BaseHttpRequest, Blockchain, BlockchainId, BlockchainIds, BlockchainInfo, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CompletedDelegatorDetails, CompletedValidatorDetails, ContractDeploymentDetails, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CurrencyCode, DelegationStatusType, DelegatorsDetails, EVMInput, EVMOutput, Erc1155Contract, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Contract, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Contract, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, EvmBalancesService, EvmBlock, EvmBlocksService, EvmChainsService, EvmNetworkOptions, EvmTransactionsService, FullNativeTransactionDetails, GetChainResponse, GetEvmBlockResponse, GetNativeBalanceResponse, GetNetworkDetailsResponse, GetPrimaryNetworkBlockResponse, GetTransactionResponse, Glacier, HealthCheckService, HistoricalReward, ImageAsset, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlockchainsResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListContractsResponse, ListDelegatorDetailsResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListEvmBlocksResponse, ListHistoricalRewardsResponse, ListInternalTransactionsResponse, ListNativeTransactionsResponse, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListPendingRewardsResponse, ListPrimaryNetworkBlocksResponse, ListSubnetsResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListValidatorDetailsResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NetworkType, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainAsset, PChainBalance, PChainId, PChainSharedAsset, PChainTransaction, PChainTransactionType, PChainUtxo, PendingDelegatorDetails, PendingReward, PendingValidatorDetails, PrimaryNetwork, PrimaryNetworkBalancesService, PrimaryNetworkBlock, PrimaryNetworkBlocksService, PrimaryNetworkChainInfo, PrimaryNetworkChainName, PrimaryNetworkOptions, PrimaryNetworkRewardsService, PrimaryNetworkService, PrimaryNetworkTransactionsService, PrimaryNetworkTxType, PrimaryNetworkUtxOsService, PrimaryNetworkVerticesService, ProposerDetails, ResourceLink, ResourceLinkType, RewardType, Rewards, RichAddress, SortOrder, StakingDistribution, Subnet, TransactionDetails, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, UnknownContract, UtilityAddresses, Utxo, UtxoCredential, UtxoType, ValidationStatusType, ValidatorsDetails, VmName, XChainAssetBalance, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainVertex };