@avalabs/glacier-sdk 2.8.0-alpha.99 → 2.8.0-canary.1b2916c.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 (198) hide show
  1. package/dist/index.d.ts +2256 -1706
  2. package/dist/index.js +684 -317
  3. package/esm/generated/Glacier.d.ts +24 -2
  4. package/esm/generated/Glacier.js +49 -12
  5. package/esm/generated/core/ApiError.js +5 -0
  6. package/esm/generated/core/CancelablePromise.js +11 -6
  7. package/esm/generated/core/OpenAPI.js +1 -1
  8. package/esm/generated/core/request.js +14 -31
  9. package/esm/generated/models/ActiveDelegatorDetails.d.ts +18 -0
  10. package/esm/generated/models/ActiveDelegatorDetails.js +8 -0
  11. package/esm/generated/models/ActiveValidatorDetails.d.ts +24 -0
  12. package/esm/generated/models/ActiveValidatorDetails.js +8 -0
  13. package/esm/generated/models/Blockchain.d.ts +10 -0
  14. package/esm/generated/models/BlockchainId.d.ts +6 -3
  15. package/esm/generated/models/BlockchainId.js +5 -2
  16. package/esm/generated/models/BlockchainIds.d.ts +9 -0
  17. package/esm/generated/models/BlockchainIds.js +10 -0
  18. package/esm/generated/models/BlockchainInfo.d.ts +5 -0
  19. package/esm/generated/models/ChainAddressChainIdMap.d.ts +2 -2
  20. package/esm/generated/models/ChainInfo.d.ts +1 -4
  21. package/esm/generated/models/CompletedDelegatorDetails.d.ts +18 -0
  22. package/esm/generated/models/CompletedDelegatorDetails.js +8 -0
  23. package/esm/generated/models/CompletedValidatorDetails.d.ts +19 -0
  24. package/esm/generated/models/CompletedValidatorDetails.js +8 -0
  25. package/esm/generated/models/ContractDeploymentDetails.d.ts +13 -0
  26. package/esm/generated/models/CreateEvmTransactionExportRequest.d.ts +23 -0
  27. package/esm/generated/models/CreateEvmTransactionExportRequest.js +8 -0
  28. package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.d.ts +23 -0
  29. package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.js +8 -0
  30. package/esm/generated/models/DelegationStatusType.d.ts +7 -0
  31. package/esm/generated/models/DelegationStatusType.js +8 -0
  32. package/esm/generated/models/DelegatorsDetails.d.ts +6 -0
  33. package/esm/generated/models/EVMInput.d.ts +5 -0
  34. package/esm/generated/models/Erc1155Contract.d.ts +37 -0
  35. package/esm/generated/models/Erc1155Contract.js +8 -0
  36. package/esm/generated/models/Erc1155TokenBalance.d.ts +1 -2
  37. package/esm/generated/models/Erc1155Transfer.d.ts +1 -0
  38. package/esm/generated/models/Erc1155TransferDetails.d.ts +1 -0
  39. package/esm/generated/models/Erc20Contract.d.ts +41 -0
  40. package/esm/generated/models/Erc20Contract.js +8 -0
  41. package/esm/generated/models/Erc20Token.d.ts +1 -3
  42. package/esm/generated/models/Erc20TokenBalance.d.ts +2 -5
  43. package/esm/generated/models/Erc20Transfer.d.ts +1 -0
  44. package/esm/generated/models/Erc20TransferDetails.d.ts +1 -0
  45. package/esm/generated/models/Erc721Contract.d.ts +35 -0
  46. package/esm/generated/models/Erc721Contract.js +8 -0
  47. package/esm/generated/models/Erc721Transfer.d.ts +1 -0
  48. package/esm/generated/models/Erc721TransferDetails.d.ts +1 -0
  49. package/esm/generated/models/{GetBlockResponse.d.ts → EvmBlock.d.ts} +2 -6
  50. package/esm/generated/models/EvmNetworkOptions.d.ts +1 -1
  51. package/esm/generated/models/GetChainResponse.d.ts +1 -4
  52. package/esm/generated/models/GetEvmBlockResponse.d.ts +45 -0
  53. package/esm/generated/models/GetNetworkDetailsResponse.d.ts +9 -0
  54. package/esm/generated/models/GetPrimaryNetworkBlockResponse.d.ts +15 -0
  55. package/esm/generated/models/GetTransactionResponse.d.ts +1 -7
  56. package/esm/generated/models/HistoricalReward.d.ts +24 -0
  57. package/esm/generated/models/ImageAsset.d.ts +9 -0
  58. package/esm/generated/models/{ListListingsResponse.d.ts → ListBlockchainsResponse.d.ts} +4 -4
  59. package/esm/generated/models/ListCChainAtomicBalancesResponse.d.ts +2 -0
  60. package/esm/generated/models/ListCChainAtomicTransactionsResponse.d.ts +2 -0
  61. package/esm/generated/models/ListCollectibleBalancesResponse.d.ts +1 -2
  62. package/esm/generated/models/ListContractsResponse.d.ts +14 -0
  63. package/esm/generated/models/ListDelegatorDetailsResponse.d.ts +16 -0
  64. package/esm/generated/models/ListEvmBlocksResponse.d.ts +11 -0
  65. package/esm/generated/models/ListHistoricalRewardsResponse.d.ts +11 -0
  66. package/esm/generated/models/ListPChainBalancesResponse.d.ts +2 -0
  67. package/esm/generated/models/ListPChainTransactionsResponse.d.ts +2 -0
  68. package/esm/generated/models/ListPChainUtxosResponse.d.ts +2 -0
  69. package/esm/generated/models/ListPendingRewardsResponse.d.ts +11 -0
  70. package/esm/generated/models/ListPrimaryNetworkBlocksResponse.d.ts +13 -0
  71. package/esm/generated/models/{ListBlocksResponse.d.ts → ListSubnetsResponse.d.ts} +4 -4
  72. package/esm/generated/models/ListUtxosResponse.d.ts +2 -0
  73. package/esm/generated/models/ListValidatorDetailsResponse.d.ts +16 -0
  74. package/esm/generated/models/ListXChainBalancesResponse.d.ts +2 -0
  75. package/esm/generated/models/ListXChainTransactionsResponse.d.ts +2 -0
  76. package/esm/generated/models/ListXChainVerticesResponse.d.ts +2 -0
  77. package/esm/generated/models/Method.d.ts +1 -7
  78. package/esm/generated/models/NativeTokenBalance.d.ts +2 -5
  79. package/esm/generated/models/NetworkToken.d.ts +1 -3
  80. package/esm/generated/models/NetworkTokenDetails.d.ts +1 -3
  81. package/esm/generated/models/NetworkType.d.ts +6 -0
  82. package/esm/generated/models/NetworkType.js +7 -0
  83. package/esm/generated/models/OperationStatusResponse.d.ts +2 -2
  84. package/esm/generated/models/OperationType.d.ts +2 -1
  85. package/esm/generated/models/OperationType.js +2 -1
  86. package/esm/generated/models/PChainBalance.d.ts +16 -7
  87. package/esm/generated/models/PChainId.d.ts +2 -2
  88. package/esm/generated/models/PChainId.js +1 -1
  89. package/esm/generated/models/PChainSharedAsset.d.ts +8 -0
  90. package/esm/generated/models/PChainTransaction.d.ts +9 -15
  91. package/esm/generated/models/PChainTransactionType.d.ts +16 -0
  92. package/esm/generated/models/PChainTransactionType.js +17 -0
  93. package/esm/generated/models/PChainUtxo.d.ts +10 -1
  94. package/esm/generated/models/PendingDelegatorDetails.d.ts +18 -0
  95. package/esm/generated/models/PendingDelegatorDetails.js +8 -0
  96. package/esm/generated/models/PendingReward.d.ts +22 -0
  97. package/esm/generated/models/PendingValidatorDetails.d.ts +15 -0
  98. package/esm/generated/models/PendingValidatorDetails.js +8 -0
  99. package/esm/generated/models/PricingProviders.d.ts +5 -0
  100. package/esm/generated/models/PrimaryNetwork.d.ts +6 -0
  101. package/esm/generated/models/PrimaryNetwork.js +7 -0
  102. package/esm/generated/models/{Block.d.ts → PrimaryNetworkBlock.d.ts} +3 -3
  103. package/esm/generated/models/PrimaryNetworkChainInfo.d.ts +9 -0
  104. package/esm/generated/models/PrimaryNetworkChainName.d.ts +7 -0
  105. package/esm/generated/models/PrimaryNetworkChainName.js +8 -0
  106. package/esm/generated/models/PrimaryNetworkOptions.d.ts +2 -1
  107. package/esm/generated/models/PrimaryNetworkTxType.d.ts +19 -0
  108. package/esm/generated/models/PrimaryNetworkTxType.js +20 -0
  109. package/esm/generated/models/RewardType.d.ts +6 -0
  110. package/esm/generated/models/RewardType.js +7 -0
  111. package/esm/generated/models/Rewards.d.ts +6 -0
  112. package/esm/generated/models/RichAddress.d.ts +1 -3
  113. package/esm/generated/models/StakingDistribution.d.ts +7 -0
  114. package/esm/generated/models/Subnet.d.ts +13 -0
  115. package/esm/generated/models/TransactionDetails.d.ts +1 -7
  116. package/esm/generated/models/TransactionExportMetadata.d.ts +15 -0
  117. package/esm/generated/models/UnknownContract.d.ts +31 -0
  118. package/esm/generated/models/UnknownContract.js +8 -0
  119. package/esm/generated/models/Utxo.d.ts +9 -1
  120. package/esm/generated/models/UtxoType.d.ts +6 -0
  121. package/esm/generated/models/UtxoType.js +7 -0
  122. package/esm/generated/models/ValidationStatusType.d.ts +7 -0
  123. package/esm/generated/models/ValidationStatusType.js +8 -0
  124. package/esm/generated/models/ValidatorsDetails.d.ts +11 -0
  125. package/esm/generated/models/XChainBalances.d.ts +2 -2
  126. package/esm/generated/models/XChainId.d.ts +3 -2
  127. package/esm/generated/models/XChainId.js +2 -1
  128. package/esm/generated/models/XChainLinearTransaction.d.ts +4 -4
  129. package/esm/generated/models/XChainLinearTransaction.js +1 -1
  130. package/esm/generated/models/XChainNonLinearTransaction.d.ts +4 -4
  131. package/esm/generated/models/XChainNonLinearTransaction.js +1 -1
  132. package/esm/generated/services/EvmBalancesService.d.ts +177 -0
  133. package/esm/generated/services/EvmBalancesService.js +116 -0
  134. package/esm/generated/services/EvmBlocksService.d.ts +47 -0
  135. package/esm/generated/services/EvmBlocksService.js +37 -0
  136. package/esm/generated/services/EvmChainsService.d.ts +36 -0
  137. package/esm/generated/services/EvmChainsService.js +29 -0
  138. package/esm/generated/services/EvmContractsService.d.ts +29 -0
  139. package/esm/generated/services/EvmContractsService.js +20 -0
  140. package/esm/generated/services/EvmTransactionsService.d.ts +331 -0
  141. package/esm/generated/services/EvmTransactionsService.js +264 -0
  142. package/esm/generated/services/HealthCheckService.d.ts +1 -1
  143. package/esm/generated/services/NfTsService.d.ts +51 -0
  144. package/esm/generated/services/NfTsService.js +37 -0
  145. package/esm/generated/services/OperationsService.d.ts +8 -3
  146. package/esm/generated/services/PrimaryNetworkBalancesService.d.ts +40 -0
  147. package/esm/generated/services/PrimaryNetworkBalancesService.js +26 -0
  148. package/esm/generated/services/PrimaryNetworkBlocksService.d.ts +85 -0
  149. package/esm/generated/services/PrimaryNetworkBlocksService.js +62 -0
  150. package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +69 -0
  151. package/esm/generated/services/PrimaryNetworkRewardsService.js +49 -0
  152. package/esm/generated/services/PrimaryNetworkService.d.ts +87 -253
  153. package/esm/generated/services/PrimaryNetworkService.js +53 -167
  154. package/esm/generated/services/PrimaryNetworkTransactionsService.d.ts +175 -0
  155. package/esm/generated/services/PrimaryNetworkTransactionsService.js +107 -0
  156. package/esm/generated/services/PrimaryNetworkUtxOsService.d.ts +54 -0
  157. package/esm/generated/services/PrimaryNetworkUtxOsService.js +34 -0
  158. package/esm/generated/services/PrimaryNetworkVerticesService.d.ts +90 -0
  159. package/esm/generated/services/PrimaryNetworkVerticesService.js +64 -0
  160. package/esm/index.d.ts +63 -31
  161. package/esm/index.js +34 -9
  162. package/package.json +2 -5
  163. package/esm/generated/models/Address.d.ts +0 -8
  164. package/esm/generated/models/CancelListingEventResponse.d.ts +0 -5
  165. package/esm/generated/models/CloseAuctionEventResponse.d.ts +0 -6
  166. package/esm/generated/models/CollectionMetrics.d.ts +0 -40
  167. package/esm/generated/models/CollectionSortByOption.d.ts +0 -8
  168. package/esm/generated/models/CollectionSortByOption.js +0 -9
  169. package/esm/generated/models/CreateTransactionExportRequest.d.ts +0 -11
  170. package/esm/generated/models/ErcType.d.ts +0 -8
  171. package/esm/generated/models/ErcType.js +0 -9
  172. package/esm/generated/models/ListNftCollectionWithMetricsResponse.d.ts +0 -11
  173. package/esm/generated/models/ListingCurrencyType.d.ts +0 -6
  174. package/esm/generated/models/ListingCurrencyType.js +0 -7
  175. package/esm/generated/models/ListingEventType.d.ts +0 -8
  176. package/esm/generated/models/ListingEventType.js +0 -9
  177. package/esm/generated/models/ListingResponse.d.ts +0 -19
  178. package/esm/generated/models/ListingType.d.ts +0 -6
  179. package/esm/generated/models/ListingType.js +0 -7
  180. package/esm/generated/models/ListingsSortByOption.d.ts +0 -5
  181. package/esm/generated/models/ListingsSortByOption.js +0 -6
  182. package/esm/generated/models/NftCollection.d.ts +0 -24
  183. package/esm/generated/models/NftCollectionWithMetrics.d.ts +0 -26
  184. package/esm/generated/models/NftFilterOptionsProperty.d.ts +0 -10
  185. package/esm/generated/models/NftSearchBody.d.ts +0 -10
  186. package/esm/generated/models/NftSearchResultTypeOption.d.ts +0 -6
  187. package/esm/generated/models/NftSearchResultTypeOption.js +0 -7
  188. package/esm/generated/models/OpenListingEventResponse.d.ts +0 -17
  189. package/esm/generated/models/OperationTransactionExportMetadata.d.ts +0 -18
  190. package/esm/generated/models/PChainConsumedUtxo.d.ts +0 -11
  191. package/esm/generated/models/PChainEmittedUtxo.d.ts +0 -19
  192. package/esm/generated/models/PaginationParams.d.ts +0 -13
  193. package/esm/generated/models/PurchaseListingEventResponse.d.ts +0 -17
  194. package/esm/generated/models/TokenWithPrice.d.ts +0 -28
  195. package/esm/generated/models/TrendingTimeframe.d.ts +0 -7
  196. package/esm/generated/models/TrendingTimeframe.js +0 -8
  197. package/esm/generated/services/EvmService.d.ts +0 -724
  198. 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,339 +707,322 @@ type ListChainsResponse = {
625
707
  chains: Array<ChainInfo>;
626
708
  };
627
709
 
628
- type Erc1155TokenBalance = {
710
+ declare enum NetworkType {
711
+ MAINNET = "mainnet",
712
+ TESTNET = "testnet"
713
+ }
714
+
715
+ declare class EvmChainsService {
716
+ readonly httpRequest: BaseHttpRequest;
717
+ constructor(httpRequest: BaseHttpRequest);
629
718
  /**
630
- * A wallet or contract address in mixed-case checksum encoding.
719
+ * List chains
720
+ * Lists the supported EVM-compatible chains. Filterable by network.
721
+ * @returns ListChainsResponse
722
+ * @throws ApiError
631
723
  */
632
- address: string;
633
- ercType: Erc1155TokenBalance.ercType;
634
- tokenId: string;
635
- tokenUri: string;
636
- metadata: Erc1155TokenMetadata;
724
+ supportedChains({ network, }: {
725
+ /**
726
+ * mainnet or testnet.
727
+ */
728
+ network?: NetworkType;
729
+ }): CancelablePromise<ListChainsResponse>;
637
730
  /**
638
- * The evm chain id.
731
+ * Get chain information
732
+ * Gets chain information for the EVM-compatible chain if supported by the api.
733
+ * @returns GetChainResponse
734
+ * @throws ApiError
639
735
  */
640
- chainId: string;
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>;
742
+ }
743
+
744
+ type ContractDeploymentDetails = {
745
+ txHash: string;
641
746
  /**
642
- * The address balance for the token, in units specified by the
643
- * `decimals` value for the contract.
747
+ * The address that initiated the transaction which deployed this contract.
644
748
  */
645
- balance: string;
749
+ deployerAddress: string;
750
+ /**
751
+ * 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.
752
+ */
753
+ deployerContractAddress?: string;
646
754
  };
647
- declare namespace Erc1155TokenBalance {
648
- enum ercType {
649
- ERC_1155 = "ERC-1155"
650
- }
651
- }
652
755
 
653
- type Erc721TokenBalance = {
756
+ type ImageAsset = {
757
+ assetId?: string;
654
758
  /**
655
- * A wallet or contract address in mixed-case checksum encoding.
759
+ * OUTPUT ONLY
656
760
  */
657
- address: string;
761
+ imageUri?: string;
762
+ };
763
+
764
+ type PricingProviders = {
765
+ coingeckoCoinId?: string;
766
+ };
767
+
768
+ declare enum ResourceLinkType {
769
+ BLOG = "Blog",
770
+ COIN_GECKO = "CoinGecko",
771
+ COIN_MARKET_CAP = "CoinMarketCap",
772
+ DISCORD = "Discord",
773
+ DOCUMENTATION = "Documentation",
774
+ FACEBOOK = "Facebook",
775
+ GITHUB = "Github",
776
+ INSTAGRAM = "Instagram",
777
+ LINKED_IN = "LinkedIn",
778
+ MEDIUM = "Medium",
779
+ REDDIT = "Reddit",
780
+ SUPPORT = "Support",
781
+ TELEGRAM = "Telegram",
782
+ TIK_TOK = "TikTok",
783
+ TWITTER = "Twitter",
784
+ WEBSITE = "Website",
785
+ WHITEPAPER = "Whitepaper",
786
+ YOUTUBE = "Youtube"
787
+ }
788
+
789
+ type ResourceLink = {
790
+ type: ResourceLinkType;
791
+ url: string;
792
+ };
793
+
794
+ type Erc1155Contract = {
658
795
  /**
659
796
  * The contract name.
660
797
  */
661
- name: string;
662
- /**
663
- * The contract symbol.
664
- */
665
- symbol: string;
666
- ercType: Erc721TokenBalance.ercType;
667
- tokenId: string;
668
- tokenUri: string;
669
- metadata: Erc721TokenMetadata;
798
+ name?: string;
799
+ description?: string;
800
+ officialSite?: string;
801
+ email?: string;
802
+ logoAsset?: ImageAsset;
803
+ bannerAsset?: ImageAsset;
804
+ color?: string;
805
+ resourceLinks?: Array<ResourceLink>;
806
+ tags?: Array<string>;
670
807
  /**
671
808
  * A wallet or contract address in mixed-case checksum encoding.
672
809
  */
673
- ownerAddress?: string;
810
+ address: string;
811
+ deploymentDetails: ContractDeploymentDetails;
812
+ ercType: Erc1155Contract.ercType;
674
813
  /**
675
- * The evm chain id.
814
+ * The contract symbol.
676
815
  */
677
- chainId: string;
816
+ symbol?: string;
817
+ pricingProviders?: PricingProviders;
678
818
  };
679
- declare namespace Erc721TokenBalance {
819
+ declare namespace Erc1155Contract {
680
820
  enum ercType {
681
- ERC_721 = "ERC-721"
821
+ ERC_1155 = "ERC-1155"
682
822
  }
683
823
  }
684
824
 
685
- type ListCollectibleBalancesResponse = {
825
+ type Erc20Contract = {
686
826
  /**
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.
827
+ * The contract name.
688
828
  */
689
- nextPageToken?: string;
829
+ name?: string;
830
+ description?: string;
831
+ officialSite?: string;
832
+ email?: string;
833
+ logoAsset?: ImageAsset;
834
+ bannerAsset?: ImageAsset;
835
+ color?: string;
836
+ resourceLinks?: Array<ResourceLink>;
837
+ tags?: Array<string>;
690
838
  /**
691
- * The list of ERC-721 and ERC-1155 token balances for the
692
- * address.
839
+ * A wallet or contract address in mixed-case checksum encoding.
693
840
  */
694
- collectibleBalances: Array<(Erc721TokenBalance | Erc1155TokenBalance)>;
695
- };
696
-
697
- type ListErc1155BalancesResponse = {
841
+ address: string;
842
+ deploymentDetails: ContractDeploymentDetails;
843
+ ercType: Erc20Contract.ercType;
698
844
  /**
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.
845
+ * The contract symbol.
700
846
  */
701
- nextPageToken?: string;
847
+ symbol?: string;
702
848
  /**
703
- * The list of ERC-1155 token balances for the address.
849
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
704
850
  */
705
- erc1155TokenBalances: Array<Erc1155TokenBalance>;
851
+ decimals: number;
852
+ pricingProviders?: PricingProviders;
706
853
  };
854
+ declare namespace Erc20Contract {
855
+ enum ercType {
856
+ ERC_20 = "ERC-20"
857
+ }
858
+ }
707
859
 
708
- type Erc1155Transfer = {
709
- /**
710
- * The block number on the chain.
711
- */
712
- blockNumber: string;
860
+ type Erc721Contract = {
713
861
  /**
714
- * The block finality timestamp.
862
+ * The contract name.
715
863
  */
716
- blockTimestamp: number;
864
+ name?: string;
865
+ description?: string;
866
+ officialSite?: string;
867
+ email?: string;
868
+ logoAsset?: ImageAsset;
869
+ bannerAsset?: ImageAsset;
870
+ color?: string;
871
+ resourceLinks?: Array<ResourceLink>;
872
+ tags?: Array<string>;
717
873
  /**
718
- * The block hash identifier.
874
+ * A wallet or contract address in mixed-case checksum encoding.
719
875
  */
720
- blockHash: string;
876
+ address: string;
877
+ deploymentDetails: ContractDeploymentDetails;
878
+ ercType: Erc721Contract.ercType;
721
879
  /**
722
- * The transaction hash identifier.
880
+ * The contract symbol.
723
881
  */
724
- txHash: string;
725
- from: RichAddress;
726
- to: RichAddress;
727
- value: string;
728
- erc1155Token: Erc1155Token;
882
+ symbol?: string;
729
883
  };
884
+ declare namespace Erc721Contract {
885
+ enum ercType {
886
+ ERC_721 = "ERC-721"
887
+ }
888
+ }
730
889
 
731
- type ListErc1155TransactionsResponse = {
890
+ type UnknownContract = {
732
891
  /**
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.
892
+ * The contract name.
734
893
  */
735
- nextPageToken?: string;
736
- transactions: Array<Erc1155Transfer>;
737
- };
738
-
739
- type Erc20TokenBalance = {
894
+ name?: string;
895
+ description?: string;
896
+ officialSite?: string;
897
+ email?: string;
898
+ logoAsset?: ImageAsset;
899
+ bannerAsset?: ImageAsset;
900
+ color?: string;
901
+ resourceLinks?: Array<ResourceLink>;
902
+ tags?: Array<string>;
740
903
  /**
741
904
  * A wallet or contract address in mixed-case checksum encoding.
742
905
  */
743
906
  address: string;
907
+ deploymentDetails: ContractDeploymentDetails;
908
+ ercType: UnknownContract.ercType;
909
+ };
910
+ declare namespace UnknownContract {
911
+ enum ercType {
912
+ UNKNOWN = "UNKNOWN"
913
+ }
914
+ }
915
+
916
+ declare class EvmContractsService {
917
+ readonly httpRequest: BaseHttpRequest;
918
+ constructor(httpRequest: BaseHttpRequest);
744
919
  /**
745
- * The contract name.
746
- */
747
- name: string;
748
- /**
749
- * The contract symbol.
750
- */
751
- symbol: string;
752
- /**
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.
920
+ * Get contract metadata
921
+ * Gets metadata about the contract at the given address.
922
+ * @returns any
923
+ * @throws ApiError
756
924
  */
757
- decimals: number;
758
- /**
759
- * The logo uri for the address.
760
- */
761
- logoUri?: string;
762
- ercType: Erc20TokenBalance.ercType;
763
- /**
764
- * The token price, if available.
765
- */
766
- 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;
925
+ getContractMetadata({ chainId, address, }: {
926
+ /**
927
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
928
+ */
929
+ chainId: string;
930
+ /**
931
+ * Contract address on the relevant chain.
932
+ */
933
+ address: string;
934
+ }): CancelablePromise<(Erc721Contract | Erc1155Contract | Erc20Contract | UnknownContract)>;
935
+ }
936
+
937
+ type Erc1155Token = {
776
938
  /**
777
- * The monetary value of the balance, if a price is available for the token.
939
+ * A wallet or contract address in mixed-case checksum encoding.
778
940
  */
779
- balanceValue?: Money;
941
+ address: string;
942
+ ercType: Erc1155Token.ercType;
943
+ tokenId: string;
944
+ tokenUri: string;
945
+ metadata: Erc1155TokenMetadata;
780
946
  };
781
- declare namespace Erc20TokenBalance {
947
+ declare namespace Erc1155Token {
782
948
  enum ercType {
783
- ERC_20 = "ERC-20"
949
+ ERC_1155 = "ERC-1155"
784
950
  }
785
951
  }
786
952
 
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;
953
+ type RichAddress = {
792
954
  /**
793
- * The list of ERC-20 token balances for the address.
955
+ * The contract name.
794
956
  */
795
- erc20TokenBalances: Array<Erc20TokenBalance>;
796
- };
797
-
798
- type Erc20Transfer = {
957
+ name?: string;
799
958
  /**
800
- * The block number on the chain.
959
+ * The contract symbol.
801
960
  */
802
- blockNumber: string;
961
+ symbol?: string;
803
962
  /**
804
- * The block finality timestamp.
963
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
805
964
  */
806
- blockTimestamp: number;
965
+ decimals?: number;
807
966
  /**
808
- * The block hash identifier.
967
+ * The logo uri for the address.
809
968
  */
810
- blockHash: string;
969
+ logoUri?: string;
811
970
  /**
812
- * The transaction hash identifier.
971
+ * A wallet or contract address in mixed-case checksum encoding.
813
972
  */
814
- txHash: string;
973
+ address: string;
974
+ };
975
+
976
+ type Erc1155TransferDetails = {
815
977
  from: RichAddress;
816
978
  to: RichAddress;
979
+ logIndex: number;
817
980
  value: string;
818
- erc20Token: Erc20Token;
819
- };
820
-
821
- type ListErc20TransactionsResponse = {
822
- /**
823
- * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
824
- */
825
- nextPageToken?: string;
826
- transactions: Array<Erc20Transfer>;
981
+ erc1155Token: Erc1155Token;
827
982
  };
828
983
 
829
- type ListErc721BalancesResponse = {
830
- /**
831
- * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
832
- */
833
- nextPageToken?: string;
984
+ type Erc20Token = {
834
985
  /**
835
- * The list of ERC-721 token balances for the address.
986
+ * A wallet or contract address in mixed-case checksum encoding.
836
987
  */
837
- erc721TokenBalances: Array<Erc721TokenBalance>;
838
- };
839
-
840
- type Erc721Transfer = {
988
+ address: string;
841
989
  /**
842
- * The block number on the chain.
990
+ * The contract name.
843
991
  */
844
- blockNumber: string;
992
+ name: string;
845
993
  /**
846
- * The block finality timestamp.
994
+ * The contract symbol.
847
995
  */
848
- blockTimestamp: number;
996
+ symbol: string;
849
997
  /**
850
- * The block hash identifier.
998
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
851
999
  */
852
- blockHash: string;
1000
+ decimals: number;
853
1001
  /**
854
- * The transaction hash identifier.
1002
+ * The logo uri for the address.
855
1003
  */
856
- txHash: string;
857
- from: RichAddress;
858
- to: RichAddress;
859
- erc721Token: Erc721Token;
860
- };
861
-
862
- type ListErc721TransactionsResponse = {
1004
+ logoUri?: string;
1005
+ ercType: Erc20Token.ercType;
863
1006
  /**
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.
1007
+ * The token price, if available.
865
1008
  */
866
- nextPageToken?: string;
867
- transactions: Array<Erc721Transfer>;
1009
+ price?: Money;
868
1010
  };
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"
1011
+ declare namespace Erc20Token {
1012
+ enum ercType {
1013
+ ERC_20 = "ERC-20"
1014
+ }
879
1015
  }
880
1016
 
881
- type InternalTransaction = {
882
- /**
883
- * The block number on the chain.
884
- */
885
- blockNumber: string;
886
- /**
887
- * The block finality timestamp.
888
- */
889
- blockTimestamp: number;
890
- /**
891
- * The block hash identifier.
892
- */
893
- blockHash: string;
894
- /**
895
- * The transaction hash identifier.
896
- */
897
- txHash: string;
1017
+ type Erc20TransferDetails = {
898
1018
  from: RichAddress;
899
1019
  to: RichAddress;
900
- internalTxType: InternalTransactionOpCall;
1020
+ logIndex: number;
901
1021
  value: string;
902
- /**
903
- * True if the internal transaction was reverted.
904
- */
905
- isReverted: boolean;
906
- gasUsed: string;
907
- gasLimit: string;
908
- };
909
-
910
- type ListInternalTransactionsResponse = {
911
- /**
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.
913
- */
914
- nextPageToken?: string;
915
- transactions: Array<InternalTransaction>;
916
- };
917
-
918
- type CancelListingEventResponse = {
919
- eventTimestamp: number;
920
- };
921
-
922
- type CloseAuctionEventResponse = {
923
- eventTimestamp: number;
924
- purchaseTxHash?: string;
925
- };
926
-
927
- declare enum ErcType {
928
- ERC_20 = "ERC-20",
929
- ERC_721 = "ERC-721",
930
- ERC_1155 = "ERC-1155",
931
- UNKNOWN = "UNKNOWN"
932
- }
933
-
934
- declare enum ResourceLinkType {
935
- BLOG = "Blog",
936
- COIN_GECKO = "CoinGecko",
937
- COIN_MARKET_CAP = "CoinMarketCap",
938
- DISCORD = "Discord",
939
- DOCUMENTATION = "Documentation",
940
- FACEBOOK = "Facebook",
941
- GITHUB = "Github",
942
- INSTAGRAM = "Instagram",
943
- LINKED_IN = "LinkedIn",
944
- MEDIUM = "Medium",
945
- REDDIT = "Reddit",
946
- SUPPORT = "Support",
947
- TELEGRAM = "Telegram",
948
- TIK_TOK = "TikTok",
949
- TWITTER = "Twitter",
950
- WEBSITE = "Website",
951
- WHITEPAPER = "Whitepaper",
952
- YOUTUBE = "Youtube"
953
- }
954
-
955
- type ResourceLink = {
956
- type: ResourceLinkType;
957
- url: string;
1022
+ erc20Token: Erc20Token;
958
1023
  };
959
1024
 
960
- type NftCollection = {
1025
+ type Erc721Token = {
961
1026
  /**
962
1027
  * A wallet or contract address in mixed-case checksum encoding.
963
1028
  */
@@ -970,99 +1035,50 @@ type NftCollection = {
970
1035
  * The contract symbol.
971
1036
  */
972
1037
  symbol: string;
973
- ercType: ErcType;
974
- bannerUri?: string;
975
- logoUri?: string;
976
- description?: string;
977
- resourceLinks?: Array<ResourceLink>;
978
- };
979
-
980
- type Address = {
1038
+ ercType: Erc721Token.ercType;
1039
+ tokenId: string;
1040
+ tokenUri: string;
1041
+ metadata: Erc721TokenMetadata;
981
1042
  /**
982
1043
  * A wallet or contract address in mixed-case checksum encoding.
983
1044
  */
984
- address: string;
1045
+ ownerAddress?: string;
985
1046
  };
986
-
987
- declare enum ListingCurrencyType {
988
- NATIVE = "NATIVE",
989
- ERC20 = "ERC20"
1047
+ declare namespace Erc721Token {
1048
+ enum ercType {
1049
+ ERC_721 = "ERC-721"
1050
+ }
990
1051
  }
991
1052
 
992
- declare enum ListingType {
993
- SALE = "SALE",
994
- AUCTION = "AUCTION"
1053
+ type Erc721TransferDetails = {
1054
+ from: RichAddress;
1055
+ to: RichAddress;
1056
+ logIndex: number;
1057
+ erc721Token: Erc721Token;
1058
+ };
1059
+
1060
+ declare enum TransactionMethodType {
1061
+ NATIVE_TRANSFER = "NATIVE_TRANSFER",
1062
+ CONTRACT_CALL = "CONTRACT_CALL",
1063
+ CONTRACT_CREATION = "CONTRACT_CREATION"
995
1064
  }
996
1065
 
997
- type TokenWithPrice = {
998
- /**
999
- * A wallet or contract address in mixed-case checksum encoding.
1000
- */
1001
- address?: string;
1002
- /**
1003
- * The contract name.
1004
- */
1005
- name: string;
1006
- /**
1007
- * The contract symbol.
1008
- */
1009
- symbol: string;
1066
+ type Method = {
1010
1067
  /**
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.
1068
+ * 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.
1014
1069
  */
1015
- decimals: number;
1070
+ callType: TransactionMethodType;
1016
1071
  /**
1017
- * The token price, if available.
1072
+ * The contract method hash identifier. The method hash is only set if the `callType` is `CONTRACT_CALL`.
1018
1073
  */
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>;
1055
- };
1056
-
1057
- type ListListingsResponse = {
1074
+ methodHash: string;
1058
1075
  /**
1059
- * 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.
1076
+ * 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'.
1060
1077
  */
1061
- nextPageToken?: string;
1062
- listings: Array<ListingResponse>;
1078
+ methodName?: string;
1063
1079
  };
1064
1080
 
1065
- type NativeTransaction = {
1081
+ type FullNativeTransactionDetails = {
1066
1082
  /**
1067
1083
  * The block number on the chain.
1068
1084
  */
@@ -1111,82 +1127,268 @@ type NativeTransaction = {
1111
1127
  to: RichAddress;
1112
1128
  method?: Method;
1113
1129
  value: string;
1114
- };
1115
-
1116
- type ListNativeTransactionsResponse = {
1130
+ /**
1131
+ * The data sent for the transaction.
1132
+ */
1133
+ input: string;
1134
+ baseFeePerGas: string;
1135
+ maxFeePerGas?: string;
1136
+ maxPriorityFeePerGas?: string;
1137
+ };
1138
+
1139
+ declare enum InternalTransactionOpCall {
1140
+ UNKNOWN = "UNKNOWN",
1141
+ CALL = "CALL",
1142
+ CREATE = "CREATE",
1143
+ CREATE2 = "CREATE2",
1144
+ CALLCODE = "CALLCODE",
1145
+ DELEGATECALL = "DELEGATECALL",
1146
+ STATICCALL = "STATICCALL"
1147
+ }
1148
+
1149
+ type InternalTransactionDetails = {
1150
+ from: RichAddress;
1151
+ to: RichAddress;
1152
+ internalTxType: InternalTransactionOpCall;
1153
+ value: string;
1154
+ /**
1155
+ * True if the internal transaction was reverted.
1156
+ */
1157
+ isReverted: boolean;
1158
+ gasUsed: string;
1159
+ gasLimit: string;
1160
+ };
1161
+
1162
+ type NetworkTokenDetails = {
1163
+ networkToken: NetworkToken;
1164
+ /**
1165
+ * The current token price, if available.
1166
+ */
1167
+ currentPrice?: Money;
1168
+ /**
1169
+ * 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.
1170
+ */
1171
+ historicalPrice?: Money;
1172
+ };
1173
+
1174
+ type GetTransactionResponse = {
1175
+ /**
1176
+ * The list of ERC-20 transfers.
1177
+ */
1178
+ erc20Transfers?: Array<Erc20TransferDetails>;
1179
+ /**
1180
+ * The list of ERC-721 transfers.
1181
+ */
1182
+ erc721Transfers?: Array<Erc721TransferDetails>;
1183
+ /**
1184
+ * The list of ERC-1155 transfers.
1185
+ */
1186
+ erc1155Transfers?: Array<Erc1155TransferDetails>;
1187
+ /**
1188
+ * 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.
1189
+ */
1190
+ internalTransactions?: Array<InternalTransactionDetails>;
1191
+ networkTokenDetails: NetworkTokenDetails;
1192
+ nativeTransaction: FullNativeTransactionDetails;
1193
+ };
1194
+
1195
+ type ListContractsResponse = {
1117
1196
  /**
1118
1197
  * 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
1198
  */
1120
1199
  nextPageToken?: string;
1121
- transactions: Array<NativeTransaction>;
1200
+ contracts: Array<(Erc721Contract | Erc1155Contract | Erc20Contract | UnknownContract)>;
1122
1201
  };
1123
1202
 
1124
- type CollectionMetrics = {
1203
+ type Erc1155Transfer = {
1204
+ /**
1205
+ * The block number on the chain.
1206
+ */
1207
+ blockNumber: string;
1208
+ /**
1209
+ * The block finality timestamp.
1210
+ */
1211
+ blockTimestamp: number;
1125
1212
  /**
1126
- * The timeframe used to calculate the metrics
1213
+ * The block hash identifier.
1127
1214
  */
1128
- timeframe: string;
1215
+ blockHash: string;
1129
1216
  /**
1130
- * The number of sales between (now) & (now - timeframe)
1217
+ * The transaction hash identifier.
1131
1218
  */
1132
- salesInTimeframe: number;
1219
+ txHash: string;
1220
+ from: RichAddress;
1221
+ to: RichAddress;
1222
+ logIndex: number;
1223
+ value: string;
1224
+ erc1155Token: Erc1155Token;
1225
+ };
1226
+
1227
+ type ListErc1155TransactionsResponse = {
1133
1228
  /**
1134
- * The number of sales between (now - timeframe) & (now - (2 * timeframe))
1229
+ * 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
1230
  */
1136
- salesInPreviousTimeframe: number;
1231
+ nextPageToken?: string;
1232
+ transactions: Array<Erc1155Transfer>;
1233
+ };
1234
+
1235
+ type Erc20Transfer = {
1137
1236
  /**
1138
- * The total value of sales between (now) & (now - timeframe)
1237
+ * The block number on the chain.
1139
1238
  */
1140
- totalValueInTimeframe: string;
1239
+ blockNumber: string;
1141
1240
  /**
1142
- * The total value of sales between (now - timeframe) & (now - (2 * timeframe))
1241
+ * The block finality timestamp.
1143
1242
  */
1144
- totalValueInPreviousTimeframe: string;
1243
+ blockTimestamp: number;
1145
1244
  /**
1146
- * The change in volume between (now) & (now - timeframe)
1245
+ * The block hash identifier.
1147
1246
  */
1148
- volumeChange?: number;
1247
+ blockHash: string;
1149
1248
  /**
1150
- * The average sale price for sales between (now) & (now - timeframe)
1249
+ * The transaction hash identifier.
1151
1250
  */
1152
- averagePriceInTimeframe: string;
1251
+ txHash: string;
1252
+ from: RichAddress;
1253
+ to: RichAddress;
1254
+ logIndex: number;
1255
+ value: string;
1256
+ erc20Token: Erc20Token;
1257
+ };
1258
+
1259
+ type ListErc20TransactionsResponse = {
1153
1260
  /**
1154
- * The average sale price for sales between (now - timeframe) & (now - (2 * timeframe))
1261
+ * 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
1262
  */
1156
- averagePriceInPreviousTimeframe: string;
1157
- latestSaleTimestamp?: number;
1158
- marketplaceFloorPrices: Array<string>;
1159
- minFloorPrice?: string;
1160
- minFloorPriceMarketplace?: string;
1263
+ nextPageToken?: string;
1264
+ transactions: Array<Erc20Transfer>;
1161
1265
  };
1162
1266
 
1163
- type NftCollectionWithMetrics = {
1267
+ type Erc721Transfer = {
1164
1268
  /**
1165
- * A wallet or contract address in mixed-case checksum encoding.
1269
+ * The block number on the chain.
1166
1270
  */
1167
- address: string;
1271
+ blockNumber: string;
1168
1272
  /**
1169
- * The contract name.
1273
+ * The block finality timestamp.
1170
1274
  */
1171
- name: string;
1275
+ blockTimestamp: number;
1172
1276
  /**
1173
- * The contract symbol.
1277
+ * The block hash identifier.
1174
1278
  */
1175
- symbol: string;
1176
- ercType: ErcType;
1177
- bannerUri?: string;
1178
- logoUri?: string;
1179
- description?: string;
1180
- resourceLinks?: Array<ResourceLink>;
1181
- metrics: CollectionMetrics;
1279
+ blockHash: string;
1280
+ /**
1281
+ * The transaction hash identifier.
1282
+ */
1283
+ txHash: string;
1284
+ from: RichAddress;
1285
+ to: RichAddress;
1286
+ logIndex: number;
1287
+ erc721Token: Erc721Token;
1288
+ };
1289
+
1290
+ type ListErc721TransactionsResponse = {
1291
+ /**
1292
+ * 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.
1293
+ */
1294
+ nextPageToken?: string;
1295
+ transactions: Array<Erc721Transfer>;
1296
+ };
1297
+
1298
+ type InternalTransaction = {
1299
+ /**
1300
+ * The block number on the chain.
1301
+ */
1302
+ blockNumber: string;
1303
+ /**
1304
+ * The block finality timestamp.
1305
+ */
1306
+ blockTimestamp: number;
1307
+ /**
1308
+ * The block hash identifier.
1309
+ */
1310
+ blockHash: string;
1311
+ /**
1312
+ * The transaction hash identifier.
1313
+ */
1314
+ txHash: string;
1315
+ from: RichAddress;
1316
+ to: RichAddress;
1317
+ internalTxType: InternalTransactionOpCall;
1318
+ value: string;
1319
+ /**
1320
+ * True if the internal transaction was reverted.
1321
+ */
1322
+ isReverted: boolean;
1323
+ gasUsed: string;
1324
+ gasLimit: string;
1325
+ };
1326
+
1327
+ type ListInternalTransactionsResponse = {
1328
+ /**
1329
+ * 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.
1330
+ */
1331
+ nextPageToken?: string;
1332
+ transactions: Array<InternalTransaction>;
1333
+ };
1334
+
1335
+ type NativeTransaction = {
1336
+ /**
1337
+ * The block number on the chain.
1338
+ */
1339
+ blockNumber: string;
1340
+ /**
1341
+ * The block finality timestamp.
1342
+ */
1343
+ blockTimestamp: number;
1344
+ /**
1345
+ * The block hash identifier.
1346
+ */
1347
+ blockHash: string;
1348
+ /**
1349
+ * The index at which the transaction occured in the block (0-indexed).
1350
+ */
1351
+ blockIndex: number;
1352
+ /**
1353
+ * The transaction hash identifier.
1354
+ */
1355
+ txHash: string;
1356
+ /**
1357
+ * The transaction status, which is either 0 (failed) or 1 (successful).
1358
+ */
1359
+ txStatus: string;
1360
+ /**
1361
+ * The transaction type.
1362
+ */
1363
+ txType: number;
1364
+ /**
1365
+ * The gas limit set for the transaction.
1366
+ */
1367
+ gasLimit: string;
1368
+ /**
1369
+ * The amount of gas used.
1370
+ */
1371
+ gasUsed: string;
1372
+ /**
1373
+ * The gas price denominated by the number of decimals of the native token.
1374
+ */
1375
+ gasPrice: string;
1376
+ /**
1377
+ * The nonce used by the sender of the transaction.
1378
+ */
1379
+ nonce: string;
1380
+ from: RichAddress;
1381
+ to: RichAddress;
1382
+ method?: Method;
1383
+ value: string;
1182
1384
  };
1183
1385
 
1184
- type ListNftCollectionWithMetricsResponse = {
1386
+ type ListNativeTransactionsResponse = {
1185
1387
  /**
1186
1388
  * 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
1389
  */
1188
1390
  nextPageToken?: string;
1189
- collections: Array<NftCollectionWithMetrics>;
1391
+ transactions: Array<NativeTransaction>;
1190
1392
  };
1191
1393
 
1192
1394
  type TransactionDetails = {
@@ -1207,13 +1409,7 @@ type TransactionDetails = {
1207
1409
  */
1208
1410
  erc1155Transfers?: Array<Erc1155TransferDetails>;
1209
1411
  /**
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.
1412
+ * 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
1413
  */
1218
1414
  internalTransactions?: Array<InternalTransactionDetails>;
1219
1415
  };
@@ -1234,36 +1430,6 @@ type ListTransfersResponse = {
1234
1430
  transfers: (Array<Erc20Transfer> | Array<Erc721Transfer> | Array<Erc1155Transfer>);
1235
1431
  };
1236
1432
 
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
1433
  declare enum SortOrder {
1268
1434
  ASC = "asc",
1269
1435
  DESC = "desc"
@@ -1274,44 +1440,38 @@ declare enum TransactionStatus {
1274
1440
  SUCCESS = "success"
1275
1441
  }
1276
1442
 
1277
- declare enum TrendingTimeframe {
1278
- DAY = "day",
1279
- WEEK = "week",
1280
- MONTH = "month"
1281
- }
1282
-
1283
- declare class EvmService {
1443
+ declare class EvmTransactionsService {
1284
1444
  readonly httpRequest: BaseHttpRequest;
1285
1445
  constructor(httpRequest: BaseHttpRequest);
1286
1446
  /**
1287
- * Get native token balance of a wallet address for a given chain.
1288
- * @returns GetNativeBalanceResponse
1447
+ * Get deployment transaction
1448
+ * If the address is a smart contract, returns the transaction in which it was deployed.
1449
+ * @returns GetTransactionResponse
1289
1450
  * @throws ApiError
1290
1451
  */
1291
- getNativeBalance({ chainId, address, currency, }: {
1452
+ getDeploymentTransaction({ chainId, address, currency, }: {
1292
1453
  /**
1293
- * A supported evm chain id. Use the `/chains` endpoint to get
1294
- * a list of supported chain ids.
1454
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1295
1455
  */
1296
1456
  chainId: string;
1297
1457
  /**
1298
- * A wallet address.
1458
+ * Contract address on the relevant chain.
1299
1459
  */
1300
1460
  address: string;
1301
1461
  /**
1302
1462
  * The currency that return values should use. Defaults to USD.
1303
1463
  */
1304
1464
  currency?: CurrencyCode;
1305
- }): CancelablePromise<GetNativeBalanceResponse>;
1465
+ }): CancelablePromise<GetTransactionResponse>;
1306
1466
  /**
1307
- * List ERC-20 token balances of a wallet address for a given chain.
1308
- * @returns ListErc20BalancesResponse
1467
+ * List deployed contracts
1468
+ * Lists all contracts deployed by the given address.
1469
+ * @returns ListContractsResponse
1309
1470
  * @throws ApiError
1310
1471
  */
1311
- listErc20Balances({ chainId, address, pageSize, pageToken, currency, }: {
1472
+ listContractDeployments({ chainId, address, pageSize, pageToken, }: {
1312
1473
  /**
1313
- * A supported evm chain id. Use the `/chains` endpoint to get
1314
- * a list of supported chain ids.
1474
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1315
1475
  */
1316
1476
  chainId: string;
1317
1477
  /**
@@ -1319,171 +1479,49 @@ declare class EvmService {
1319
1479
  */
1320
1480
  address: string;
1321
1481
  /**
1322
- * The maximum number of items to return. The minimum page size
1323
- * is 1. The maximum pageSize is 100.
1482
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1324
1483
  */
1325
1484
  pageSize?: number;
1326
1485
  /**
1327
1486
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1328
1487
  */
1329
1488
  pageToken?: string;
1330
- /**
1331
- * The currency that return values should use. Defaults to USD.
1332
- */
1333
- currency?: CurrencyCode;
1334
- }): CancelablePromise<ListErc20BalancesResponse>;
1335
- /**
1336
- * List ERC-721 token balances of a wallet address for a given chain.
1337
- * @returns ListErc721BalancesResponse
1338
- * @throws ApiError
1339
- */
1340
- listErc721Balances({ chainId, address, pageSize, pageToken, }: {
1341
- /**
1342
- * A supported evm chain id. Use the `/chains` endpoint to get
1343
- * a list of supported chain ids.
1344
- */
1345
- chainId: string;
1346
- /**
1347
- * A wallet address.
1348
- */
1349
- address: string;
1350
- /**
1351
- * The maximum number of items to return. The minimum page size
1352
- * is 1. The maximum pageSize is 100.
1353
- */
1354
- pageSize?: number;
1355
- /**
1356
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1357
- */
1358
- pageToken?: string;
1359
- }): CancelablePromise<ListErc721BalancesResponse>;
1360
- /**
1361
- * List ERC-1155 token balances of a wallet address for a given chain.
1362
- * @returns ListErc1155BalancesResponse
1363
- * @throws ApiError
1364
- */
1365
- listErc1155Balances({ chainId, address, pageSize, pageToken, }: {
1366
- /**
1367
- * A supported evm chain id. Use the `/chains` endpoint to get
1368
- * a list of supported chain ids.
1369
- */
1370
- chainId: string;
1371
- /**
1372
- * A wallet address.
1373
- */
1374
- address: string;
1375
- /**
1376
- * The maximum number of items to return. The minimum page size
1377
- * is 1. The maximum pageSize is 100.
1378
- */
1379
- pageSize?: number;
1380
- /**
1381
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1382
- */
1383
- pageToken?: string;
1384
- }): CancelablePromise<ListErc1155BalancesResponse>;
1385
- /**
1386
- * List ERC-721 and ERC-1155 token balances of a wallet address
1387
- * for a given chain.
1388
- * @returns ListCollectibleBalancesResponse
1389
- * @throws ApiError
1390
- */
1391
- listCollectibleBalances({ chainId, address, pageSize, pageToken, }: {
1392
- /**
1393
- * A supported evm chain id. Use the `/chains` endpoint to get
1394
- * a list of supported chain ids.
1395
- */
1396
- chainId: string;
1397
- /**
1398
- * A wallet address.
1399
- */
1400
- address: string;
1401
- /**
1402
- * The maximum number of items to return. The minimum page size
1403
- * is 1. The maximum pageSize is 100.
1404
- */
1405
- pageSize?: number;
1406
- /**
1407
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1408
- */
1409
- pageToken?: string;
1410
- }): CancelablePromise<ListCollectibleBalancesResponse>;
1411
- /**
1412
- * Returns the latest blocks indexed for the chain.
1413
- * @returns ListBlocksResponse
1414
- * @throws ApiError
1415
- */
1416
- getLatestBlocks({ chainId, pageSize, pageToken, }: {
1417
- /**
1418
- * A supported evm chain id. Use the `/chains` endpoint to get
1419
- * a list of supported chain ids.
1420
- */
1421
- chainId: string;
1422
- /**
1423
- * The maximum number of items to return. The minimum page size
1424
- * is 1. The maximum pageSize is 100.
1425
- */
1426
- pageSize?: number;
1427
- /**
1428
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1429
- */
1430
- pageToken?: string;
1431
- }): CancelablePromise<ListBlocksResponse>;
1432
- /**
1433
- * Returns the details of an individual block for the chain.
1434
- * @returns GetBlockResponse
1435
- * @throws ApiError
1436
- */
1437
- getBlock({ chainId, blockId, }: {
1438
- /**
1439
- * A supported evm chain id. Use the `/chains` endpoint to get
1440
- * a list of supported chain ids.
1441
- */
1442
- chainId: string;
1443
- /**
1444
- * A block identifier which is either a block number or the block hash.
1445
- */
1446
- blockId: string;
1447
- }): CancelablePromise<GetBlockResponse>;
1489
+ }): CancelablePromise<ListContractsResponse>;
1448
1490
  /**
1449
- * If the address is a smart contract, returns the transaction at which it was deployed.
1450
- * @returns GetTransactionResponse
1491
+ * Get contract metadata
1492
+ * Gets metadata about the contract at the given address.
1493
+ * @returns any
1451
1494
  * @throws ApiError
1452
1495
  */
1453
- getDeploymentTransaction({ chainId, address, currency, }: {
1496
+ getContractMetadata({ chainId, address, }: {
1454
1497
  /**
1455
- * A supported evm chain id. Use the `/chains` endpoint to get
1456
- * a list of supported chain ids.
1498
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1457
1499
  */
1458
1500
  chainId: string;
1459
1501
  /**
1460
1502
  * Contract address on the relevant chain.
1461
1503
  */
1462
1504
  address: string;
1463
- /**
1464
- * The currency that return values should use. Defaults to USD.
1465
- */
1466
- currency?: CurrencyCode;
1467
- }): CancelablePromise<GetTransactionResponse>;
1505
+ }): CancelablePromise<(Erc721Contract | Erc1155Contract | Erc20Contract | UnknownContract)>;
1468
1506
  /**
1469
- * Gets a list of erc transfers for an ERC-20, ERC-721,
1470
- * or ERC-1155 contract address.
1507
+ * List ERC transfers
1508
+ * Lists ERC transfers for an ERC-20, ERC-721, or ERC-1155 contract address.
1471
1509
  * @returns ListTransfersResponse
1472
1510
  * @throws ApiError
1473
1511
  */
1474
- listTransfers({ chainId, address, pageSize, pageToken, }: {
1512
+ listTransfers({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1475
1513
  /**
1476
- * A supported evm chain id. Use the `/chains` endpoint to get
1477
- * a list of supported chain ids.
1514
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1478
1515
  */
1479
1516
  chainId: string;
1480
1517
  /**
1481
1518
  * A wallet address.
1482
1519
  */
1483
1520
  address: string;
1521
+ startBlock?: number;
1522
+ endBlock?: number;
1484
1523
  /**
1485
- * The maximum number of items to return. The minimum page size
1486
- * is 1. The maximum pageSize is 100.
1524
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1487
1525
  */
1488
1526
  pageSize?: number;
1489
1527
  /**
@@ -1492,24 +1530,16 @@ declare class EvmService {
1492
1530
  pageToken?: string;
1493
1531
  }): CancelablePromise<ListTransfersResponse>;
1494
1532
  /**
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.
1533
+ * List transactions
1534
+ * 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.
1535
+ *
1536
+ * Filterable by block ranges.
1506
1537
  * @returns ListTransactionDetailsResponse
1507
1538
  * @throws ApiError
1508
1539
  */
1509
- listTransactions({ chainId, address, pageSize, pageToken, startBlock, endBlock, }: {
1540
+ listTransactions({ chainId, address, pageSize, pageToken, startBlock, endBlock, sortOrder, }: {
1510
1541
  /**
1511
- * A supported evm chain id. Use the `/chains` endpoint to get
1512
- * a list of supported chain ids.
1542
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1513
1543
  */
1514
1544
  chainId: string;
1515
1545
  /**
@@ -1517,41 +1547,39 @@ declare class EvmService {
1517
1547
  */
1518
1548
  address: string;
1519
1549
  /**
1520
- * The maximum number of items to return. The minimum page size
1521
- * is 1. The maximum pageSize is 100.
1550
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1522
1551
  */
1523
1552
  pageSize?: number;
1524
1553
  /**
1525
1554
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1526
1555
  */
1527
1556
  pageToken?: string;
1528
- /**
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.
1530
- */
1531
1557
  startBlock?: number;
1558
+ endBlock?: number;
1532
1559
  /**
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.
1560
+ * 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.
1534
1561
  */
1535
- endBlock?: number;
1562
+ sortOrder?: SortOrder;
1536
1563
  }): CancelablePromise<ListTransactionDetailsResponse>;
1537
1564
  /**
1538
- * Gets a list of native transactions for an address and chain.
1565
+ * List native transactions
1566
+ * Lists native transactions for an address. Filterable by block range.
1539
1567
  * @returns ListNativeTransactionsResponse
1540
1568
  * @throws ApiError
1541
1569
  */
1542
- listNativeTransactions({ chainId, address, pageSize, pageToken, }: {
1570
+ listNativeTransactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1543
1571
  /**
1544
- * A supported evm chain id. Use the `/chains` endpoint to get
1545
- * a list of supported chain ids.
1572
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1546
1573
  */
1547
1574
  chainId: string;
1548
1575
  /**
1549
1576
  * A wallet address.
1550
1577
  */
1551
1578
  address: string;
1579
+ startBlock?: number;
1580
+ endBlock?: number;
1552
1581
  /**
1553
- * The maximum number of items to return. The minimum page size
1554
- * is 1. The maximum pageSize is 100.
1582
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1555
1583
  */
1556
1584
  pageSize?: number;
1557
1585
  /**
@@ -1560,23 +1588,24 @@ declare class EvmService {
1560
1588
  pageToken?: string;
1561
1589
  }): CancelablePromise<ListNativeTransactionsResponse>;
1562
1590
  /**
1563
- * Lists ERC-20 transfers for an address.
1591
+ * List ERC-20 transfers
1592
+ * Lists ERC-20 transfers for an address. Filterable by block range.
1564
1593
  * @returns ListErc20TransactionsResponse
1565
1594
  * @throws ApiError
1566
1595
  */
1567
- listErc20Transactions({ chainId, address, pageSize, pageToken, }: {
1596
+ listErc20Transactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1568
1597
  /**
1569
- * A supported evm chain id. Use the `/chains` endpoint to get
1570
- * a list of supported chain ids.
1598
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1571
1599
  */
1572
1600
  chainId: string;
1573
1601
  /**
1574
1602
  * A wallet address.
1575
1603
  */
1576
1604
  address: string;
1605
+ startBlock?: number;
1606
+ endBlock?: number;
1577
1607
  /**
1578
- * The maximum number of items to return. The minimum page size
1579
- * is 1. The maximum pageSize is 100.
1608
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1580
1609
  */
1581
1610
  pageSize?: number;
1582
1611
  /**
@@ -1585,23 +1614,24 @@ declare class EvmService {
1585
1614
  pageToken?: string;
1586
1615
  }): CancelablePromise<ListErc20TransactionsResponse>;
1587
1616
  /**
1588
- * Lists ERC-721 transfers for an address.
1617
+ * List ERC-721 transfers
1618
+ * Lists ERC-721 transfers for an address. Filterable by block range.
1589
1619
  * @returns ListErc721TransactionsResponse
1590
1620
  * @throws ApiError
1591
1621
  */
1592
- listErc721Transactions({ chainId, address, pageSize, pageToken, }: {
1622
+ listErc721Transactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1593
1623
  /**
1594
- * A supported evm chain id. Use the `/chains` endpoint to get
1595
- * a list of supported chain ids.
1624
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1596
1625
  */
1597
1626
  chainId: string;
1598
1627
  /**
1599
1628
  * A wallet address.
1600
1629
  */
1601
1630
  address: string;
1631
+ startBlock?: number;
1632
+ endBlock?: number;
1602
1633
  /**
1603
- * The maximum number of items to return. The minimum page size
1604
- * is 1. The maximum pageSize is 100.
1634
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1605
1635
  */
1606
1636
  pageSize?: number;
1607
1637
  /**
@@ -1610,23 +1640,24 @@ declare class EvmService {
1610
1640
  pageToken?: string;
1611
1641
  }): CancelablePromise<ListErc721TransactionsResponse>;
1612
1642
  /**
1613
- * Lists of ERC-1155 transfers for an address.
1643
+ * List ERC-1155 transfers
1644
+ * Lists ERC-1155 transfers for an address. Filterable by block range.
1614
1645
  * @returns ListErc1155TransactionsResponse
1615
1646
  * @throws ApiError
1616
1647
  */
1617
- listErc1155Transactions({ chainId, address, pageSize, pageToken, }: {
1648
+ listErc1155Transactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1618
1649
  /**
1619
- * A supported evm chain id. Use the `/chains` endpoint to get
1620
- * a list of supported chain ids.
1650
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1621
1651
  */
1622
1652
  chainId: string;
1623
1653
  /**
1624
1654
  * A wallet address.
1625
1655
  */
1626
1656
  address: string;
1657
+ startBlock?: number;
1658
+ endBlock?: number;
1627
1659
  /**
1628
- * The maximum number of items to return. The minimum page size
1629
- * is 1. The maximum pageSize is 100.
1660
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1630
1661
  */
1631
1662
  pageSize?: number;
1632
1663
  /**
@@ -1635,28 +1666,26 @@ declare class EvmService {
1635
1666
  pageToken?: string;
1636
1667
  }): CancelablePromise<ListErc1155TransactionsResponse>;
1637
1668
  /**
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.
1669
+ * List internal transactions
1670
+ * Returns a list of internal transactions for an address and chain. Filterable by block range.
1671
+ *
1672
+ * 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.
1644
1673
  * @returns ListInternalTransactionsResponse
1645
1674
  * @throws ApiError
1646
1675
  */
1647
- listInternalTransactions({ chainId, address, pageSize, pageToken, }: {
1676
+ listInternalTransactions({ chainId, address, startBlock, endBlock, pageSize, pageToken, }: {
1648
1677
  /**
1649
- * A supported evm chain id. Use the `/chains` endpoint to get
1650
- * a list of supported chain ids.
1678
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1651
1679
  */
1652
1680
  chainId: string;
1653
1681
  /**
1654
1682
  * A wallet address.
1655
1683
  */
1656
1684
  address: string;
1685
+ startBlock?: number;
1686
+ endBlock?: number;
1657
1687
  /**
1658
- * The maximum number of items to return. The minimum page size
1659
- * is 1. The maximum pageSize is 100.
1688
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1660
1689
  */
1661
1690
  pageSize?: number;
1662
1691
  /**
@@ -1665,14 +1694,14 @@ declare class EvmService {
1665
1694
  pageToken?: string;
1666
1695
  }): CancelablePromise<ListInternalTransactionsResponse>;
1667
1696
  /**
1697
+ * Get transaction
1668
1698
  * Gets the details of a single transaction.
1669
1699
  * @returns GetTransactionResponse
1670
1700
  * @throws ApiError
1671
1701
  */
1672
1702
  getTransaction({ chainId, txHash, }: {
1673
1703
  /**
1674
- * A supported evm chain id. Use the `/chains` endpoint to get
1675
- * a list of supported chain ids.
1704
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1676
1705
  */
1677
1706
  chainId: string;
1678
1707
  /**
@@ -1681,14 +1710,14 @@ declare class EvmService {
1681
1710
  txHash: string;
1682
1711
  }): CancelablePromise<GetTransactionResponse>;
1683
1712
  /**
1684
- * Gets the transactions that occured in a given block.
1713
+ * List transactions for a block
1714
+ * Lists the transactions that occured in a given block.
1685
1715
  * @returns ListNativeTransactionsResponse
1686
1716
  * @throws ApiError
1687
1717
  */
1688
1718
  getTransactionsForBlock({ chainId, blockId, }: {
1689
1719
  /**
1690
- * A supported evm chain id. Use the `/chains` endpoint to get
1691
- * a list of supported chain ids.
1720
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1692
1721
  */
1693
1722
  chainId: string;
1694
1723
  /**
@@ -1697,19 +1726,18 @@ declare class EvmService {
1697
1726
  blockId: string;
1698
1727
  }): CancelablePromise<ListNativeTransactionsResponse>;
1699
1728
  /**
1700
- * Gets the latest transactions; can be filtered by status.
1729
+ * List latest transactions
1730
+ * Lists the latest transactions. Filterable by status.
1701
1731
  * @returns ListNativeTransactionsResponse
1702
1732
  * @throws ApiError
1703
1733
  */
1704
1734
  listLatestTransactions({ chainId, pageSize, pageToken, status, }: {
1705
1735
  /**
1706
- * A supported evm chain id. Use the `/chains` endpoint to get
1707
- * a list of supported chain ids.
1736
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1708
1737
  */
1709
1738
  chainId: string;
1710
1739
  /**
1711
- * The maximum number of items to return. The minimum page size
1712
- * is 1. The maximum pageSize is 100.
1740
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1713
1741
  */
1714
1742
  pageSize?: number;
1715
1743
  /**
@@ -1721,35 +1749,56 @@ declare class EvmService {
1721
1749
  */
1722
1750
  status?: TransactionStatus;
1723
1751
  }): CancelablePromise<ListNativeTransactionsResponse>;
1752
+ }
1753
+
1754
+ declare class HealthCheckService {
1755
+ readonly httpRequest: BaseHttpRequest;
1756
+ constructor(httpRequest: BaseHttpRequest);
1724
1757
  /**
1725
- * Gets the list of chains supported by the api.
1726
- * @returns ListChainsResponse
1758
+ * Get the health of the service
1759
+ * @returns any The Health Check is successful
1727
1760
  * @throws ApiError
1728
1761
  */
1729
- supportedChains(): CancelablePromise<ListChainsResponse>;
1762
+ healthCheck(): CancelablePromise<{
1763
+ status?: string;
1764
+ info?: Record<string, Record<string, string>> | null;
1765
+ error?: Record<string, Record<string, string>> | null;
1766
+ details?: Record<string, Record<string, string>>;
1767
+ }>;
1768
+ }
1769
+
1770
+ declare class NfTsService {
1771
+ readonly httpRequest: BaseHttpRequest;
1772
+ constructor(httpRequest: BaseHttpRequest);
1730
1773
  /**
1731
- * Gets chain information by chain id.
1732
- * @returns GetChainResponse
1774
+ * Reindex NFT metadata
1775
+ * Triggers reindexing of token metadata for an NFT token. Reindexing can only be called once per hour for each NFT token.
1776
+ * @returns any
1733
1777
  * @throws ApiError
1734
1778
  */
1735
- getChainInfo({ chainId, }: {
1779
+ reindexNft({ chainId, address, tokenId, }: {
1736
1780
  /**
1737
- * A supported evm chain id. Use the `/chains` endpoint to get
1738
- * a list of supported chain ids.
1781
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1739
1782
  */
1740
1783
  chainId: string;
1741
- }): CancelablePromise<GetChainResponse>;
1784
+ /**
1785
+ * Contract address on the relevant chain.
1786
+ */
1787
+ address: string;
1788
+ /**
1789
+ * TokenId on the contract
1790
+ */
1791
+ tokenId: string;
1792
+ }): CancelablePromise<any>;
1742
1793
  /**
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.
1794
+ * Get token details
1795
+ * Gets token details for a specific token of an NFT contract.
1746
1796
  * @returns any
1747
1797
  * @throws ApiError
1748
1798
  */
1749
- reindexNft({ chainId, address, tokenId, }: {
1799
+ getTokenDetails({ chainId, address, tokenId, }: {
1750
1800
  /**
1751
- * A supported evm chain id. Use the `/chains` endpoint to get
1752
- * a list of supported chain ids.
1801
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1753
1802
  */
1754
1803
  chainId: string;
1755
1804
  /**
@@ -1760,177 +1809,1045 @@ declare class EvmService {
1760
1809
  * TokenId on the contract
1761
1810
  */
1762
1811
  tokenId: string;
1763
- }): CancelablePromise<any>;
1812
+ }): CancelablePromise<(Erc721Token | Erc1155Token)>;
1813
+ }
1814
+
1815
+ type EvmNetworkOptions = {
1816
+ addresses: Array<string>;
1817
+ includeChains: Array<string>;
1818
+ };
1819
+
1820
+ type CreateEvmTransactionExportRequest = {
1821
+ type: CreateEvmTransactionExportRequest.type;
1822
+ firstDate: string;
1823
+ lastDate: string;
1824
+ /**
1825
+ * @deprecated
1826
+ */
1827
+ startDate: string;
1828
+ /**
1829
+ * @deprecated
1830
+ */
1831
+ endDate: string;
1832
+ options: EvmNetworkOptions;
1833
+ };
1834
+ declare namespace CreateEvmTransactionExportRequest {
1835
+ enum type {
1836
+ TRANSACTION_EXPORT_EVM = "TRANSACTION_EXPORT_EVM"
1837
+ }
1838
+ }
1839
+
1840
+ type PrimaryNetworkOptions = {
1841
+ addresses: Array<string>;
1842
+ cChainEvmAddresses?: Array<string>;
1843
+ includeChains: Array<'11111111111111111111111111111111LpoYY' | '2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM' | '2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm' | '2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5' | 'yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp' | 'p-chain' | 'x-chain' | 'c-chain'>;
1844
+ };
1845
+
1846
+ type CreatePrimaryNetworkTransactionExportRequest = {
1847
+ type: CreatePrimaryNetworkTransactionExportRequest.type;
1848
+ firstDate: string;
1849
+ lastDate: string;
1850
+ /**
1851
+ * @deprecated
1852
+ */
1853
+ startDate: string;
1854
+ /**
1855
+ * @deprecated
1856
+ */
1857
+ endDate: string;
1858
+ options: PrimaryNetworkOptions;
1859
+ };
1860
+ declare namespace CreatePrimaryNetworkTransactionExportRequest {
1861
+ enum type {
1862
+ TRANSACTION_EXPORT_PRIMARY_NETWORK = "TRANSACTION_EXPORT_PRIMARY_NETWORK"
1863
+ }
1864
+ }
1865
+
1866
+ declare enum OperationStatus {
1867
+ RUNNING = "RUNNING",
1868
+ COMPLETED = "COMPLETED",
1869
+ COMPLETED_WITH_WARNING = "COMPLETED_WITH_WARNING",
1870
+ FAILED = "FAILED"
1871
+ }
1872
+
1873
+ declare enum OperationType {
1874
+ TRANSACTION_EXPORT_EVM = "TRANSACTION_EXPORT_EVM",
1875
+ TRANSACTION_EXPORT_PRIMARY_NETWORK = "TRANSACTION_EXPORT_PRIMARY_NETWORK"
1876
+ }
1877
+
1878
+ declare enum OperationStatusCode {
1879
+ ERR_INVALID_REQUEST = "ErrInvalidRequest",
1880
+ ERR_INTERNAL = "ErrInternal",
1881
+ WARN_TRUNCATED_EXPORT = "WarnTruncatedExport"
1882
+ }
1883
+
1884
+ type TransactionExportMetadata = {
1885
+ code?: OperationStatusCode;
1886
+ /**
1887
+ * File download URL. Provided only for COMPLETED and COMPLETED_WITH_WARNING operations.
1888
+ */
1889
+ downloadUrl?: string;
1890
+ /**
1891
+ * 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'.
1892
+ */
1893
+ nextDate?: string;
1894
+ };
1895
+
1896
+ type OperationStatusResponse = {
1897
+ operationId: string;
1898
+ operationType: OperationType;
1899
+ operationStatus: OperationStatus;
1900
+ message?: string;
1901
+ metadata: TransactionExportMetadata;
1902
+ createdAtTimestamp: number;
1903
+ updatedAtTimestamp: number;
1904
+ };
1905
+
1906
+ declare class OperationsService {
1907
+ readonly httpRequest: BaseHttpRequest;
1908
+ constructor(httpRequest: BaseHttpRequest);
1909
+ /**
1910
+ * Create transaction export operation
1911
+ * Trigger a transaction export operation with given parameters.
1912
+ *
1913
+ * 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.
1914
+ * @returns OperationStatusResponse
1915
+ * @throws ApiError
1916
+ */
1917
+ postTransactionExportJob({ requestBody, }: {
1918
+ requestBody: (CreateEvmTransactionExportRequest | CreatePrimaryNetworkTransactionExportRequest);
1919
+ }): CancelablePromise<OperationStatusResponse>;
1920
+ /**
1921
+ * Get operation
1922
+ * Gets operation details for the given operation id.
1923
+ * @returns OperationStatusResponse
1924
+ * @throws ApiError
1925
+ */
1926
+ getOperationResult({ operationId, }: {
1927
+ /**
1928
+ * UUID of given operation
1929
+ */
1930
+ operationId: string;
1931
+ }): CancelablePromise<OperationStatusResponse>;
1932
+ }
1933
+
1934
+ declare enum BlockchainIds {
1935
+ _11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY",
1936
+ _2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
1937
+ _2JVSBOINJ9C2J33VNTVZ_YT_VJNZD_N2NKIWW_KJCUM_HUWEB5DB_BRM = "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm",
1938
+ _2Q9E4R6MU3U68N_U1F_YJGB_R6JVWR_RX36COHP_AX5UQXSE55X1Q5 = "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5",
1939
+ Y_H8D7TH_NJKXMTKUV2JG_BA4P1RN3QPR4P_PR7QYNFCDO_S6K6HWP = "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp"
1940
+ }
1941
+
1942
+ type ChainAddressChainIdMap = {
1943
+ address: string;
1944
+ blockchainIds: Array<BlockchainIds>;
1945
+ };
1946
+
1947
+ type ChainAddressChainIdMapListResponse = {
1948
+ addresses: Array<ChainAddressChainIdMap>;
1949
+ };
1950
+
1951
+ declare enum DelegationStatusType {
1952
+ COMPLETED = "completed",
1953
+ ACTIVE = "active",
1954
+ PENDING = "pending"
1955
+ }
1956
+
1957
+ type DelegatorsDetails = {
1958
+ delegatorCount: number;
1959
+ totalAmountStaked: string;
1960
+ };
1961
+
1962
+ type StakingDistribution = {
1963
+ version: string;
1964
+ amountStaked: string;
1965
+ validatorCount: number;
1966
+ };
1967
+
1968
+ type ValidatorsDetails = {
1969
+ validatorCount: number;
1970
+ totalAmountStaked: string;
1971
+ estimatedAnnualStakingReward: string;
1972
+ stakingDistributionByVersion: Array<StakingDistribution>;
1973
+ stakingRatio: string;
1974
+ };
1975
+
1976
+ type GetNetworkDetailsResponse = {
1977
+ validatorDetails: ValidatorsDetails;
1978
+ delegatorDetails: DelegatorsDetails;
1979
+ };
1980
+
1981
+ type Blockchain = {
1982
+ createBlockTimestamp: number;
1983
+ createBlockNumber: string;
1984
+ blockchainId: string;
1985
+ vmId: string;
1986
+ subnetId: string;
1987
+ blockchainName: string;
1988
+ };
1989
+
1990
+ type ListBlockchainsResponse = {
1991
+ /**
1992
+ * 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.
1993
+ */
1994
+ nextPageToken?: string;
1995
+ blockchains: Array<Blockchain>;
1996
+ };
1997
+
1998
+ type ActiveDelegatorDetails = {
1999
+ txHash: string;
2000
+ rewardAddresses: Array<string>;
2001
+ amountDelegated: string;
2002
+ delegationFee: string;
2003
+ startTimestamp: number;
2004
+ endTimestamp: number;
2005
+ estimatedGrossReward: string;
2006
+ estimatedNetReward: string;
2007
+ delegationStatus: ActiveDelegatorDetails.delegationStatus;
2008
+ };
2009
+ declare namespace ActiveDelegatorDetails {
2010
+ enum delegationStatus {
2011
+ ACTIVE = "active"
2012
+ }
2013
+ }
2014
+
2015
+ type CompletedDelegatorDetails = {
2016
+ txHash: string;
2017
+ rewardAddresses: Array<string>;
2018
+ amountDelegated: string;
2019
+ delegationFee: string;
2020
+ startTimestamp: number;
2021
+ endTimestamp: number;
2022
+ grossReward: string;
2023
+ netReward: string;
2024
+ delegationStatus: CompletedDelegatorDetails.delegationStatus;
2025
+ };
2026
+ declare namespace CompletedDelegatorDetails {
2027
+ enum delegationStatus {
2028
+ COMPLETED = "completed"
2029
+ }
2030
+ }
2031
+
2032
+ type PendingDelegatorDetails = {
2033
+ txHash: string;
2034
+ rewardAddresses: Array<string>;
2035
+ amountDelegated: string;
2036
+ delegationFee: string;
2037
+ startTimestamp: number;
2038
+ endTimestamp: number;
2039
+ estimatedGrossReward: string;
2040
+ estimatedNetReward: string;
2041
+ delegationStatus: PendingDelegatorDetails.delegationStatus;
2042
+ };
2043
+ declare namespace PendingDelegatorDetails {
2044
+ enum delegationStatus {
2045
+ PENDING = "pending"
2046
+ }
2047
+ }
2048
+
2049
+ type ListDelegatorDetailsResponse = {
2050
+ /**
2051
+ * 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.
2052
+ */
2053
+ nextPageToken?: string;
2054
+ /**
2055
+ * The list of Delegator Details.
2056
+ */
2057
+ delegators: Array<(CompletedDelegatorDetails | ActiveDelegatorDetails | PendingDelegatorDetails)>;
2058
+ };
2059
+
2060
+ type BlockchainInfo = {
2061
+ blockchainId: string;
2062
+ };
2063
+
2064
+ type Subnet = {
2065
+ createBlockTimestamp: number;
2066
+ createBlockIndex: string;
2067
+ subnetId: string;
2068
+ ownerAddresses: Array<string>;
2069
+ threshold: number;
2070
+ locktime: number;
2071
+ blockchains: Array<BlockchainInfo>;
2072
+ };
2073
+
2074
+ type ListSubnetsResponse = {
2075
+ /**
2076
+ * 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.
2077
+ */
2078
+ nextPageToken?: string;
2079
+ subnets: Array<Subnet>;
2080
+ };
2081
+
2082
+ type Rewards = {
2083
+ validationRewardAmount: string;
2084
+ delegationRewardAmount: string;
2085
+ };
2086
+
2087
+ type ActiveValidatorDetails = {
2088
+ nodeId: string;
2089
+ amountStaked: string;
2090
+ delegationFee: string;
2091
+ startTimestamp: number;
2092
+ endTimestamp: number;
2093
+ stakePercentage: number;
2094
+ delegatorCount: number;
2095
+ amountDelegated: string;
2096
+ uptimePerformance: number;
2097
+ avalancheGoVersion: string;
2098
+ delegationCapacity: string;
2099
+ potentialRewards: Rewards;
2100
+ validationStatus: ActiveValidatorDetails.validationStatus;
2101
+ };
2102
+ declare namespace ActiveValidatorDetails {
2103
+ enum validationStatus {
2104
+ ACTIVE = "active"
2105
+ }
2106
+ }
2107
+
2108
+ type CompletedValidatorDetails = {
2109
+ nodeId: string;
2110
+ amountStaked: string;
2111
+ delegationFee: string;
2112
+ startTimestamp: number;
2113
+ endTimestamp: number;
2114
+ delegatorCount: number;
2115
+ rewards: Rewards;
2116
+ validationStatus: CompletedValidatorDetails.validationStatus;
2117
+ };
2118
+ declare namespace CompletedValidatorDetails {
2119
+ enum validationStatus {
2120
+ COMPLETED = "completed"
2121
+ }
2122
+ }
2123
+
2124
+ type PendingValidatorDetails = {
2125
+ nodeId: string;
2126
+ amountStaked: string;
2127
+ delegationFee: string;
2128
+ startTimestamp: number;
2129
+ endTimestamp: number;
2130
+ validationStatus: PendingValidatorDetails.validationStatus;
2131
+ };
2132
+ declare namespace PendingValidatorDetails {
2133
+ enum validationStatus {
2134
+ PENDING = "pending"
2135
+ }
2136
+ }
2137
+
2138
+ type ListValidatorDetailsResponse = {
2139
+ /**
2140
+ * 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.
2141
+ */
2142
+ nextPageToken?: string;
2143
+ /**
2144
+ * The list of Validator Details.
2145
+ */
2146
+ validators: Array<(CompletedValidatorDetails | ActiveValidatorDetails | PendingValidatorDetails)>;
2147
+ };
2148
+
2149
+ declare enum Network {
2150
+ MAINNET = "mainnet",
2151
+ FUJI = "fuji"
2152
+ }
2153
+
2154
+ declare enum ValidationStatusType {
2155
+ COMPLETED = "completed",
2156
+ ACTIVE = "active",
2157
+ PENDING = "pending"
2158
+ }
2159
+
2160
+ type XChainAssetDetails = {
2161
+ /**
2162
+ * Unique ID for an asset.
2163
+ */
2164
+ assetId: string;
2165
+ /**
2166
+ * Name of this asset.
2167
+ */
2168
+ name: string;
2169
+ /**
2170
+ * Symbol for this asset (max 4 characters).
2171
+ */
2172
+ symbol: string;
2173
+ /**
2174
+ * Denomination of this asset to represent fungibility.
2175
+ */
2176
+ denomination: number;
2177
+ /**
2178
+ * Type of asset like SECP256K1 or NFT.
2179
+ */
2180
+ type: string;
2181
+ /**
2182
+ * Timestamp in seconds this asset was created on.
2183
+ */
2184
+ createdAtTimestamp: number;
2185
+ /**
2186
+ * Cap represents if an asset can be or is fixed cap.
2187
+ */
2188
+ cap: string;
2189
+ };
2190
+
2191
+ declare enum XChainId {
2192
+ _2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
2193
+ _2JVSBOINJ9C2J33VNTVZ_YT_VJNZD_N2NKIWW_KJCUM_HUWEB5DB_BRM = "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm",
2194
+ X_CHAIN = "x-chain"
2195
+ }
2196
+
2197
+ declare class PrimaryNetworkService {
2198
+ readonly httpRequest: BaseHttpRequest;
2199
+ constructor(httpRequest: BaseHttpRequest);
2200
+ /**
2201
+ * Get asset details
2202
+ * Gets asset details corresponding to the given asset id on the X-Chain.
2203
+ * @returns XChainAssetDetails
2204
+ * @throws ApiError
2205
+ */
2206
+ getAssetDetails({ blockchainId, network, assetId, }: {
2207
+ /**
2208
+ * A primary network blockchain id or alias.
2209
+ */
2210
+ blockchainId: XChainId;
2211
+ /**
2212
+ * Either mainnet or a testnet.
2213
+ */
2214
+ network: Network;
2215
+ /**
2216
+ * Asset ID for any asset on X-Chain
2217
+ */
2218
+ assetId: string;
2219
+ }): CancelablePromise<XChainAssetDetails>;
2220
+ /**
2221
+ * Get chain interactions for addresses
2222
+ * 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.
2223
+ * @returns ChainAddressChainIdMapListResponse
2224
+ * @throws ApiError
2225
+ */
2226
+ getChainIdsForAddresses({ addresses, network, }: {
2227
+ /**
2228
+ * 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".
2229
+ */
2230
+ addresses: string;
2231
+ /**
2232
+ * Either mainnet or a testnet.
2233
+ */
2234
+ network: Network;
2235
+ }): CancelablePromise<ChainAddressChainIdMapListResponse>;
2236
+ /**
2237
+ * Get network details
2238
+ * Gets network details such as validator and delegator stats.
2239
+ * @returns GetNetworkDetailsResponse
2240
+ * @throws ApiError
2241
+ */
2242
+ getNetworkDetails({ network, }: {
2243
+ /**
2244
+ * Either mainnet or a testnet.
2245
+ */
2246
+ network: Network;
2247
+ }): CancelablePromise<GetNetworkDetailsResponse>;
2248
+ /**
2249
+ * List blockchains
2250
+ * Lists all blockchains registered on the network.
2251
+ * @returns ListBlockchainsResponse
2252
+ * @throws ApiError
2253
+ */
2254
+ listBlockchains({ network, pageSize, pageToken, sortOrder, }: {
2255
+ /**
2256
+ * Either mainnet or a testnet.
2257
+ */
2258
+ network: Network;
2259
+ /**
2260
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2261
+ */
2262
+ pageSize?: number;
2263
+ /**
2264
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2265
+ */
2266
+ pageToken?: string;
2267
+ /**
2268
+ * 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.
2269
+ */
2270
+ sortOrder?: SortOrder;
2271
+ }): CancelablePromise<ListBlockchainsResponse>;
2272
+ /**
2273
+ * List subnets
2274
+ * Lists all subnets registered on the network.
2275
+ * @returns ListSubnetsResponse
2276
+ * @throws ApiError
2277
+ */
2278
+ listSubnets({ network, pageSize, pageToken, sortOrder, }: {
2279
+ /**
2280
+ * Either mainnet or a testnet.
2281
+ */
2282
+ network: Network;
2283
+ /**
2284
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2285
+ */
2286
+ pageSize?: number;
2287
+ /**
2288
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2289
+ */
2290
+ pageToken?: string;
2291
+ /**
2292
+ * 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.
2293
+ */
2294
+ sortOrder?: SortOrder;
2295
+ }): CancelablePromise<ListSubnetsResponse>;
2296
+ /**
2297
+ * List validators
2298
+ * Lists details for validators. By default, returns details for all validators. Filterable by validator node ids and minimum delegation capacity.
2299
+ * @returns ListValidatorDetailsResponse
2300
+ * @throws ApiError
2301
+ */
2302
+ listValidators({ network, pageSize, pageToken, nodeIds, sortOrder, validationStatus, minDelegationCapacity, }: {
2303
+ /**
2304
+ * Either mainnet or a testnet.
2305
+ */
2306
+ network: Network;
2307
+ /**
2308
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2309
+ */
2310
+ pageSize?: number;
2311
+ /**
2312
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2313
+ */
2314
+ pageToken?: string;
2315
+ /**
2316
+ * A comma separated list of node ids to filter by.
2317
+ */
2318
+ nodeIds?: string;
2319
+ /**
2320
+ * 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.
2321
+ */
2322
+ sortOrder?: SortOrder;
2323
+ /**
2324
+ * Validation status of the node.
2325
+ */
2326
+ validationStatus?: ValidationStatusType;
2327
+ /**
2328
+ * The minimum delegation capacity, used to filter the set of nodes being returned (Units - nAVAX). Default is 0.
2329
+ */
2330
+ minDelegationCapacity?: any;
2331
+ }): CancelablePromise<ListValidatorDetailsResponse>;
2332
+ /**
2333
+ * Get single validator details
2334
+ * List validator details for a single validator. Filterable by validation status.
2335
+ * @returns ListValidatorDetailsResponse
2336
+ * @throws ApiError
2337
+ */
2338
+ getSingleValidatorDetails({ network, nodeId, pageSize, pageToken, sortOrder, validationStatus, }: {
2339
+ /**
2340
+ * Either mainnet or a testnet.
2341
+ */
2342
+ network: Network;
2343
+ /**
2344
+ * A primary network (P or X chain) nodeId.
2345
+ */
2346
+ nodeId: string;
2347
+ /**
2348
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2349
+ */
2350
+ pageSize?: number;
2351
+ /**
2352
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2353
+ */
2354
+ pageToken?: string;
2355
+ /**
2356
+ * 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.
2357
+ */
2358
+ sortOrder?: SortOrder;
2359
+ /**
2360
+ * Validation status of the node.
2361
+ */
2362
+ validationStatus?: ValidationStatusType;
2363
+ }): CancelablePromise<ListValidatorDetailsResponse>;
2364
+ /**
2365
+ * List delegators
2366
+ * Lists details for delegators.
2367
+ * @returns ListDelegatorDetailsResponse
2368
+ * @throws ApiError
2369
+ */
2370
+ listDelegators({ network, pageSize, pageToken, sortOrder, delegationStatus, rewardAddresses, nodeIds, }: {
2371
+ /**
2372
+ * Either mainnet or a testnet.
2373
+ */
2374
+ network: Network;
2375
+ /**
2376
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2377
+ */
2378
+ pageSize?: number;
2379
+ /**
2380
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2381
+ */
2382
+ pageToken?: string;
2383
+ /**
2384
+ * 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.
2385
+ */
2386
+ sortOrder?: SortOrder;
2387
+ /**
2388
+ * Delegation status of the node.
2389
+ */
2390
+ delegationStatus?: DelegationStatusType;
2391
+ /**
2392
+ * A comma separated list of reward addresses to filter by.
2393
+ */
2394
+ rewardAddresses?: string;
2395
+ /**
2396
+ * A comma separated list of node ids to filter by.
2397
+ */
2398
+ nodeIds?: string;
2399
+ }): CancelablePromise<ListDelegatorDetailsResponse>;
2400
+ }
2401
+
2402
+ declare enum BlockchainId {
2403
+ _11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY",
2404
+ _2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
2405
+ _2JVSBOINJ9C2J33VNTVZ_YT_VJNZD_N2NKIWW_KJCUM_HUWEB5DB_BRM = "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm",
2406
+ _2Q9E4R6MU3U68N_U1F_YJGB_R6JVWR_RX36COHP_AX5UQXSE55X1Q5 = "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5",
2407
+ Y_H8D7TH_NJKXMTKUV2JG_BA4P1RN3QPR4P_PR7QYNFCDO_S6K6HWP = "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp",
2408
+ P_CHAIN = "p-chain",
2409
+ X_CHAIN = "x-chain",
2410
+ C_CHAIN = "c-chain"
2411
+ }
2412
+
2413
+ type CChainSharedAssetBalance = {
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
+ sharedWithChainId: string;
2440
+ };
2441
+
2442
+ type CChainAtomicBalances = {
2443
+ atomicMemoryUnlocked: Array<CChainSharedAssetBalance>;
2444
+ atomicMemoryLocked: Array<CChainSharedAssetBalance>;
2445
+ };
2446
+
2447
+ declare enum PrimaryNetwork {
2448
+ MAINNET = "mainnet",
2449
+ FUJI = "fuji"
2450
+ }
2451
+
2452
+ declare enum PrimaryNetworkChainName {
2453
+ P_CHAIN = "p-chain",
2454
+ X_CHAIN = "x-chain",
2455
+ C_CHAIN = "c-chain"
2456
+ }
2457
+
2458
+ type PrimaryNetworkChainInfo = {
2459
+ chainName: PrimaryNetworkChainName;
2460
+ network: PrimaryNetwork;
2461
+ };
2462
+
2463
+ type ListCChainAtomicBalancesResponse = {
2464
+ balances: CChainAtomicBalances;
2465
+ chainInfo: PrimaryNetworkChainInfo;
2466
+ };
2467
+
2468
+ type PChainAsset = {
2469
+ assetId: string;
2470
+ amount: string;
2471
+ };
2472
+
2473
+ type PChainSharedAsset = {
2474
+ assetId: string;
2475
+ amount: string;
2476
+ sharedWithChainId: string;
2477
+ status: string;
2478
+ };
2479
+
2480
+ type PChainBalance = {
2481
+ /**
2482
+ * 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.
2483
+ */
2484
+ unlockedUnstaked: Array<PChainAsset>;
2485
+ /**
2486
+ * 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.
2487
+ */
2488
+ unlockedStaked: Array<PChainAsset>;
2489
+ /**
2490
+ * 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.
2491
+ */
2492
+ lockedPlatform: Array<PChainAsset>;
2493
+ /**
2494
+ * 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.
2495
+ */
2496
+ lockedStakeable: Array<PChainAsset>;
2497
+ /**
2498
+ * 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.
2499
+ */
2500
+ lockedStaked: Array<PChainAsset>;
2501
+ /**
2502
+ * 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.
2503
+ */
2504
+ pendingStaked: Array<PChainAsset>;
2505
+ /**
2506
+ * 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.
2507
+ */
2508
+ atomicMemoryUnlocked: Array<PChainSharedAsset>;
2509
+ /**
2510
+ * 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.
2511
+ */
2512
+ atomicMemoryLocked: Array<PChainSharedAsset>;
2513
+ };
2514
+
2515
+ type ListPChainBalancesResponse = {
2516
+ balances: PChainBalance;
2517
+ chainInfo: PrimaryNetworkChainInfo;
2518
+ };
2519
+
2520
+ type XChainAssetBalance = {
2521
+ /**
2522
+ * Unique ID for an asset.
2523
+ */
2524
+ assetId: string;
2525
+ /**
2526
+ * Name of this asset.
2527
+ */
2528
+ name: string;
2529
+ /**
2530
+ * Symbol for this asset (max 4 characters).
2531
+ */
2532
+ symbol: string;
2533
+ /**
2534
+ * Denomination of this asset to represent fungibility.
2535
+ */
2536
+ denomination: number;
2537
+ /**
2538
+ * Type of asset like SECP256K1 or NFT.
2539
+ */
2540
+ type: string;
2541
+ /**
2542
+ * Amount of the asset.
2543
+ */
2544
+ amount: string;
2545
+ utxoCount: number;
2546
+ };
2547
+
2548
+ type XChainSharedAssetBalance = {
2549
+ /**
2550
+ * Unique ID for an asset.
2551
+ */
2552
+ assetId: string;
2553
+ /**
2554
+ * Name of this asset.
2555
+ */
2556
+ name: string;
2557
+ /**
2558
+ * Symbol for this asset (max 4 characters).
2559
+ */
2560
+ symbol: string;
2561
+ /**
2562
+ * Denomination of this asset to represent fungibility.
2563
+ */
2564
+ denomination: number;
2565
+ /**
2566
+ * Type of asset like SECP256K1 or NFT.
2567
+ */
2568
+ type: string;
2569
+ /**
2570
+ * Amount of the asset.
2571
+ */
2572
+ amount: string;
2573
+ utxoCount: number;
2574
+ sharedWithChainId: string;
2575
+ };
2576
+
2577
+ type XChainBalances = {
2578
+ /**
2579
+ * A list of objects containing X-chain Asset balance information.
2580
+ */
2581
+ locked: Array<XChainAssetBalance>;
2582
+ /**
2583
+ * A list of objects containing X-chain Asset balance information.
2584
+ */
2585
+ unlocked: Array<XChainAssetBalance>;
2586
+ atomicMemoryUnlocked: Array<XChainSharedAssetBalance>;
2587
+ atomicMemoryLocked: Array<XChainSharedAssetBalance>;
2588
+ };
2589
+
2590
+ type ListXChainBalancesResponse = {
2591
+ balances: XChainBalances;
2592
+ chainInfo: PrimaryNetworkChainInfo;
2593
+ };
2594
+
2595
+ declare class PrimaryNetworkBalancesService {
2596
+ readonly httpRequest: BaseHttpRequest;
2597
+ constructor(httpRequest: BaseHttpRequest);
2598
+ /**
2599
+ * Get balances
2600
+ * Gets primary network balances for one of the Primary Network chains for the supplied addresses.
2601
+ *
2602
+ * C-Chain balances returned are only the shared atomic memory balance. For EVM balance, use the `/v1/chains/:chainId/addresses/:addressId/balances:getNative` endpoint.
2603
+ * @returns any
2604
+ * @throws ApiError
2605
+ */
2606
+ getBalancesByAddresses({ blockchainId, network, blockTimestamp, addresses, }: {
2607
+ /**
2608
+ * A primary network blockchain id or alias.
2609
+ */
2610
+ blockchainId: BlockchainId;
2611
+ /**
2612
+ * Either mainnet or a testnet.
2613
+ */
2614
+ network: Network;
2615
+ /**
2616
+ * An epoch timestamp in seconds. Balance will be calculated at this timestamp.
2617
+ */
2618
+ blockTimestamp?: number;
2619
+ /**
2620
+ * 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".
2621
+ */
2622
+ addresses?: string;
2623
+ }): CancelablePromise<(ListPChainBalancesResponse | ListXChainBalancesResponse | ListCChainAtomicBalancesResponse)>;
2624
+ }
2625
+
2626
+ type ProposerDetails = {
2627
+ proposerId?: string;
2628
+ proposerParentId?: string;
2629
+ proposerNodeId?: string;
2630
+ proposerPChainHeight?: number;
2631
+ proposerTimestamp?: number;
2632
+ };
2633
+
2634
+ type GetPrimaryNetworkBlockResponse = {
2635
+ blockNumber: string;
2636
+ blockHash: string;
2637
+ parentHash: string;
2638
+ blockTimestamp: number;
2639
+ blockType: string;
2640
+ txCount: number;
2641
+ transactions: Array<string>;
2642
+ blockSizeBytes: number;
2643
+ proposerDetails?: ProposerDetails;
2644
+ };
2645
+
2646
+ type PrimaryNetworkBlock = {
2647
+ blockNumber: string;
2648
+ blockHash: string;
2649
+ parentHash: string;
2650
+ blockTimestamp: number;
2651
+ blockType: string;
2652
+ txCount: number;
2653
+ transactions: Array<string>;
2654
+ blockSizeBytes: number;
2655
+ proposerDetails?: ProposerDetails;
2656
+ };
2657
+
2658
+ type ListPrimaryNetworkBlocksResponse = {
1764
2659
  /**
1765
- * Get metadata for a specific token by providing the contract address and token id.
1766
- * @returns any
1767
- * @throws ApiError
2660
+ * 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.
1768
2661
  */
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;
1775
- /**
1776
- * Contract address on the relevant chain.
1777
- */
1778
- address: string;
1779
- /**
1780
- * TokenId on the contract
1781
- */
1782
- tokenId: string;
1783
- }): CancelablePromise<(Erc721Token | Erc1155Token)>;
2662
+ nextPageToken?: string;
2663
+ blocks: Array<PrimaryNetworkBlock>;
2664
+ chainInfo: PrimaryNetworkChainInfo;
2665
+ };
2666
+
2667
+ declare class PrimaryNetworkBlocksService {
2668
+ readonly httpRequest: BaseHttpRequest;
2669
+ constructor(httpRequest: BaseHttpRequest);
1784
2670
  /**
1785
- * Get collection data for provided a ChainID and address.
1786
- * @returns NftCollectionWithMetrics
2671
+ * Get block
2672
+ * Gets a block by block height or block hash on one of the Primary Network chains.
2673
+ * @returns GetPrimaryNetworkBlockResponse
1787
2674
  * @throws ApiError
1788
2675
  */
1789
- getCollection({ chainId, address, timeframe, }: {
2676
+ getBlockById({ blockchainId, network, blockId, }: {
1790
2677
  /**
1791
- * A supported evm chain id. Use the `/chains` endpoint to get
1792
- * a list of supported chain ids.
2678
+ * A primary network blockchain id or alias.
1793
2679
  */
1794
- chainId: string;
2680
+ blockchainId: BlockchainId;
1795
2681
  /**
1796
- * Contract address on the relevant chain.
2682
+ * Either mainnet or a testnet.
1797
2683
  */
1798
- address: string;
2684
+ network: Network;
1799
2685
  /**
1800
- * The timeframe to use for trending listings. Use "DAY" for 24 hours, "WEEK" for 7 days, "MONTH" for 30 days.
2686
+ * A block identifier which is either a block number or the block hash.
1801
2687
  */
1802
- timeframe?: TrendingTimeframe;
1803
- }): CancelablePromise<NftCollectionWithMetrics>;
2688
+ blockId: string;
2689
+ }): CancelablePromise<GetPrimaryNetworkBlockResponse>;
1804
2690
  /**
1805
- * List open listings for a NFT token.
1806
- * @returns ListListingsResponse
2691
+ * List blocks proposed by node
2692
+ * Lists the latest blocks proposed by a given NodeID on one of the Primary Network chains.
2693
+ * @returns ListPrimaryNetworkBlocksResponse
1807
2694
  * @throws ApiError
1808
2695
  */
1809
- listListingsByCollectionTokenId({ chainId, address, tokenId, pageSize, pageToken, sortBy, sortOrder, currency, includeHistory, }: {
2696
+ listPrimaryNetworkBlocksByNodeId({ blockchainId, network, nodeId, pageSize, pageToken, }: {
1810
2697
  /**
1811
- * A supported evm chain id. Use the `/chains` endpoint to get
1812
- * a list of supported chain ids.
2698
+ * A primary network blockchain id or alias.
1813
2699
  */
1814
- chainId: string;
2700
+ blockchainId: BlockchainId;
1815
2701
  /**
1816
- * Contract address on the relevant chain.
2702
+ * Either mainnet or a testnet.
1817
2703
  */
1818
- address: string;
2704
+ network: Network;
1819
2705
  /**
1820
- * TokenId on the contract
2706
+ * A primary network (P or X chain) nodeId.
1821
2707
  */
1822
- tokenId: string;
2708
+ nodeId: string;
1823
2709
  /**
1824
- * The maximum number of items to return. The minimum page size
1825
- * is 1. The maximum pageSize is 100.
2710
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1826
2711
  */
1827
2712
  pageSize?: number;
1828
2713
  /**
1829
2714
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1830
2715
  */
1831
2716
  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>;
2717
+ }): CancelablePromise<ListPrimaryNetworkBlocksResponse>;
1851
2718
  /**
1852
- * List open listings for a NFT collection.
1853
- * @returns ListListingsResponse
2719
+ * List latest blocks
2720
+ * Lists latest blocks on one of the Primary Network chains.
2721
+ * @returns ListPrimaryNetworkBlocksResponse
1854
2722
  * @throws ApiError
1855
2723
  */
1856
- listListingsByCollection({ chainId, address, pageSize, pageToken, sortBy, sortOrder, currency, includeHistory, }: {
2724
+ listLatestPrimaryNetworkBlocks({ blockchainId, network, pageSize, pageToken, }: {
1857
2725
  /**
1858
- * A supported evm chain id. Use the `/chains` endpoint to get
1859
- * a list of supported chain ids.
2726
+ * A primary network blockchain id or alias.
1860
2727
  */
1861
- chainId: string;
2728
+ blockchainId: BlockchainId;
1862
2729
  /**
1863
- * Contract address on the relevant chain.
2730
+ * Either mainnet or a testnet.
1864
2731
  */
1865
- address: string;
2732
+ network: Network;
1866
2733
  /**
1867
- * The maximum number of items to return. The minimum page size
1868
- * is 1. The maximum pageSize is 100.
2734
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1869
2735
  */
1870
2736
  pageSize?: number;
1871
2737
  /**
1872
2738
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1873
2739
  */
1874
2740
  pageToken?: string;
1875
- /**
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.
1883
- */
1884
- 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>;
2741
+ }): CancelablePromise<ListPrimaryNetworkBlocksResponse>;
2742
+ }
2743
+
2744
+ declare enum RewardType {
2745
+ VALIDATOR = "VALIDATOR",
2746
+ DELEGATOR = "DELEGATOR"
2747
+ }
2748
+
2749
+ type HistoricalReward = {
2750
+ /**
2751
+ * An array of P-Chain wallet addresses.
2752
+ */
2753
+ addresses: Array<string>;
2754
+ txHash: string;
2755
+ amountStaked: string;
2756
+ nodeId: string;
2757
+ startTimestamp: number;
2758
+ endTimestamp: number;
2759
+ rewardType: RewardType;
2760
+ utxoId: string;
2761
+ outputIndex: number;
2762
+ /**
2763
+ * An object containing P-chain Asset ID and the amount of that Asset ID.
2764
+ */
2765
+ reward: PChainAsset;
2766
+ rewardTxHash: string;
2767
+ };
2768
+
2769
+ type ListHistoricalRewardsResponse = {
2770
+ /**
2771
+ * 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.
2772
+ */
2773
+ nextPageToken?: string;
2774
+ historicalRewards: Array<HistoricalReward>;
2775
+ };
2776
+
2777
+ type PendingReward = {
2778
+ /**
2779
+ * An array of P-Chain wallet addresses.
2780
+ */
2781
+ addresses: Array<string>;
2782
+ txHash: string;
2783
+ amountStaked: string;
2784
+ nodeId: string;
2785
+ startTimestamp: number;
2786
+ endTimestamp: number;
2787
+ rewardType: RewardType;
2788
+ progress: number;
2789
+ /**
2790
+ * An object containing P-chain Asset ID and the amount of that Asset ID.
2791
+ */
2792
+ estimatedReward: PChainAsset;
2793
+ };
2794
+
2795
+ type ListPendingRewardsResponse = {
2796
+ /**
2797
+ * 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.
2798
+ */
2799
+ nextPageToken?: string;
2800
+ pendingRewards: Array<PendingReward>;
2801
+ };
2802
+
2803
+ declare class PrimaryNetworkRewardsService {
2804
+ readonly httpRequest: BaseHttpRequest;
2805
+ constructor(httpRequest: BaseHttpRequest);
1894
2806
  /**
1895
- * List recent listings on the chain.
1896
- * @returns ListListingsResponse
2807
+ * List pending rewards
2808
+ * Lists pending rewards on the Primary Network for the supplied addresses.
2809
+ * @returns ListPendingRewardsResponse
1897
2810
  * @throws ApiError
1898
2811
  */
1899
- listRecentListings({ chainId, pageSize, pageToken, eventType, currency, }: {
2812
+ listPendingPrimaryNetworkRewards({ network, addresses, pageSize, pageToken, sortOrder, }: {
1900
2813
  /**
1901
- * A supported evm chain id. Use the `/chains` endpoint to get
1902
- * a list of supported chain ids.
2814
+ * Either mainnet or a testnet.
1903
2815
  */
1904
- chainId: string;
2816
+ network: Network;
2817
+ /**
2818
+ * 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".
2819
+ */
2820
+ addresses?: string;
1905
2821
  /**
1906
- * The maximum number of items to return. The minimum page size
1907
- * is 1. The maximum pageSize is 100.
2822
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1908
2823
  */
1909
2824
  pageSize?: number;
1910
2825
  /**
1911
2826
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1912
2827
  */
1913
2828
  pageToken?: string;
1914
- eventType?: ListingEventType;
1915
2829
  /**
1916
- * The currency that return values should use. Defaults to USD.
2830
+ * 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.
1917
2831
  */
1918
- currency?: CurrencyCode;
1919
- }): CancelablePromise<ListListingsResponse>;
2832
+ sortOrder?: SortOrder;
2833
+ }): CancelablePromise<ListPendingRewardsResponse>;
1920
2834
  /**
1921
- * List details and metrics for collections.
1922
- * @returns ListNftCollectionWithMetricsResponse
2835
+ * List historical rewards
2836
+ * Lists historical rewards on the Primary Network for the supplied addresses.
2837
+ * @returns ListHistoricalRewardsResponse
1923
2838
  * @throws ApiError
1924
2839
  */
1925
- listCollections({ chainId, pageSize, pageToken, timeframe, sortBy, sortOrder, }: {
2840
+ listHistoricalPrimaryNetworkRewards({ network, addresses, pageSize, pageToken, sortOrder, }: {
1926
2841
  /**
1927
- * A supported evm chain id. Use the `/chains` endpoint to get
1928
- * a list of supported chain ids.
2842
+ * Either mainnet or a testnet.
1929
2843
  */
1930
- chainId: string;
2844
+ network: Network;
2845
+ /**
2846
+ * 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".
2847
+ */
2848
+ addresses?: string;
1931
2849
  /**
1932
- * The maximum number of items to return. The minimum page size
1933
- * is 1. The maximum pageSize is 100.
2850
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1934
2851
  */
1935
2852
  pageSize?: number;
1936
2853
  /**
@@ -1938,142 +2855,10 @@ declare class EvmService {
1938
2855
  */
1939
2856
  pageToken?: string;
1940
2857
  /**
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.
2858
+ * 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
2859
  */
1953
2860
  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"
2861
+ }): CancelablePromise<ListHistoricalRewardsResponse>;
2077
2862
  }
2078
2863
 
2079
2864
  type Asset = {
@@ -2103,6 +2888,17 @@ type Asset = {
2103
2888
  amount: string;
2104
2889
  };
2105
2890
 
2891
+ type UtxoCredential = {
2892
+ /**
2893
+ * Signature provided to consume the output
2894
+ */
2895
+ signature?: string;
2896
+ /**
2897
+ * Public key associated with the signature
2898
+ */
2899
+ publicKey?: string;
2900
+ };
2901
+
2106
2902
  type EVMInput = {
2107
2903
  /**
2108
2904
  * EVM address from which the asset is exported in ExportTx.
@@ -2112,17 +2908,10 @@ type EVMInput = {
2112
2908
  * Asset details for the asset being transferred.
2113
2909
  */
2114
2910
  asset: Asset;
2115
- };
2116
-
2117
- type UtxoCredential = {
2118
- /**
2119
- * Signature provided to consume the output
2120
- */
2121
- signature?: string;
2122
2911
  /**
2123
- * Public key associated with the signature
2912
+ * Credentials that signed this transaction.
2124
2913
  */
2125
- publicKey?: string;
2914
+ credentials: Array<UtxoCredential>;
2126
2915
  };
2127
2916
 
2128
2917
  type Utxo = {
@@ -2175,10 +2964,18 @@ type Utxo = {
2175
2964
  * Addresses that are eligible to sign the consumption of this output.
2176
2965
  */
2177
2966
  addresses: Array<string>;
2967
+ /**
2968
+ * Hex encoded data for NFT assets
2969
+ */
2970
+ payload?: string;
2971
+ /**
2972
+ * Index representing the minting set for the NFT mint output
2973
+ */
2974
+ groupId?: number;
2178
2975
  /**
2179
2976
  * Credentials that signed the transaction to consume this utxo
2180
2977
  */
2181
- credentials: Array<UtxoCredential>;
2978
+ credentials?: Array<UtxoCredential>;
2182
2979
  };
2183
2980
 
2184
2981
  type CChainExportTransaction = {
@@ -2298,204 +3095,34 @@ declare namespace CChainImportTransaction {
2298
3095
  }
2299
3096
  }
2300
3097
 
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
3098
  type ListCChainAtomicTransactionsResponse = {
2349
3099
  /**
2350
3100
  * 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
3101
  */
2352
3102
  nextPageToken?: string;
2353
3103
  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
- };
3104
+ chainInfo: PrimaryNetworkChainInfo;
3105
+ };
3106
+
3107
+ declare enum PChainTransactionType {
3108
+ ADD_VALIDATOR_TX = "AddValidatorTx",
3109
+ ADD_DELEGATOR_TX = "AddDelegatorTx",
3110
+ ADD_PERMISSIONLESS_VALIDATOR_TX = "AddPermissionlessValidatorTx",
3111
+ ADD_SUBNET_VALIDATOR_TX = "AddSubnetValidatorTx",
3112
+ REMOVE_SUBNET_VALIDATOR_TX = "RemoveSubnetValidatorTx",
3113
+ REWARD_VALIDATOR_TX = "RewardValidatorTx",
3114
+ CREATE_CHAIN_TX = "CreateChainTx",
3115
+ CREATE_SUBNET_TX = "CreateSubnetTx",
3116
+ IMPORT_TX = "ImportTx",
3117
+ EXPORT_TX = "ExportTx",
3118
+ ADVANCE_TIME_TX = "AdvanceTimeTx",
3119
+ UNKNOWN = "UNKNOWN"
3120
+ }
2491
3121
 
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
- };
3122
+ declare enum UtxoType {
3123
+ STAKE = "STAKE",
3124
+ TRANSFER = "TRANSFER"
3125
+ }
2499
3126
 
2500
3127
  type PChainUtxo = {
2501
3128
  /**
@@ -2505,138 +3132,98 @@ type PChainUtxo = {
2505
3132
  utxoId: string;
2506
3133
  txHash: string;
2507
3134
  outputIndex: number;
3135
+ blockNumber: string;
2508
3136
  blockTimestamp: number;
2509
3137
  consumingTxHash?: string;
2510
3138
  consumingBlockTimestamp?: number;
3139
+ consumingBlockNumber?: string;
2511
3140
  assetId: string;
2512
- utxoType: string;
3141
+ utxoType: UtxoType;
2513
3142
  amount: string;
2514
3143
  stakeableLocktime?: number;
2515
3144
  platformLocktime?: number;
2516
3145
  threshold?: number;
2517
3146
  createdOnChainId: string;
2518
3147
  consumedOnChainId: string;
3148
+ staked?: boolean;
3149
+ utxoStartTimestamp?: number;
3150
+ utxoEndTimestamp?: number;
3151
+ rewardType?: RewardType;
2519
3152
  };
2520
3153
 
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;
3154
+ type PChainTransaction = {
2570
3155
  /**
2571
- * Name of this asset.
3156
+ * A P-Chain transaction hash.
2572
3157
  */
2573
- name: string;
3158
+ txHash: string;
3159
+ txType: PChainTransactionType;
2574
3160
  /**
2575
- * Symbol for this asset (max 4 characters).
3161
+ * The block finality timestamp.
2576
3162
  */
2577
- symbol: string;
3163
+ blockTimestamp: number;
3164
+ blockNumber: string;
3165
+ blockHash: string;
3166
+ consumedUtxos: Array<PChainUtxo>;
3167
+ emittedUtxos: Array<PChainUtxo>;
2578
3168
  /**
2579
- * Denomination of this asset to represent fungibility.
3169
+ * Source chain for an atomic transaction.
2580
3170
  */
2581
- denomination: number;
3171
+ sourceChain?: string;
2582
3172
  /**
2583
- * Type of asset like SECP256K1 or NFT.
3173
+ * Destination chain for an atomic transaction.
2584
3174
  */
2585
- type: string;
3175
+ destinationChain?: string;
2586
3176
  /**
2587
- * Amount of the asset.
2588
- */
2589
- amount: string;
2590
- utxoCount: number;
2591
- sharedWithChainId: string;
2592
- };
2593
-
2594
- type XChainBalances = {
3177
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID.
3178
+ */
3179
+ value: Array<PChainAsset>;
2595
3180
  /**
2596
- * A list of objects containing X-chain Asset balance infromation.
3181
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID.
2597
3182
  */
2598
- locked: Array<XChainAssetBalance>;
3183
+ amountBurned: Array<PChainAsset>;
2599
3184
  /**
2600
- * A list of objects containing X-chain Asset balance infromation.
3185
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2601
3186
  */
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 = {
3187
+ amountStaked: Array<PChainAsset>;
2612
3188
  /**
2613
- * Unique ID for an asset.
3189
+ * Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2614
3190
  */
2615
- assetId: string;
3191
+ startTimestamp?: number;
2616
3192
  /**
2617
- * Name of this asset.
3193
+ * Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2618
3194
  */
2619
- name: string;
3195
+ endTimestamp?: number;
2620
3196
  /**
2621
- * Symbol for this asset (max 4 characters).
3197
+ * Present for AddValidatorTx, AddPermissionlessValidatorTx
2622
3198
  */
2623
- symbol: string;
3199
+ delegationFeePercent?: string;
2624
3200
  /**
2625
- * Denomination of this asset to represent fungibility.
3201
+ * Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2626
3202
  */
2627
- denomination: number;
3203
+ nodeId?: string;
2628
3204
  /**
2629
- * Type of asset like SECP256K1 or NFT.
3205
+ * Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx, CreateChainTx, CreateSubnetTx
2630
3206
  */
2631
- type: string;
3207
+ subnetId?: string;
2632
3208
  /**
2633
- * Timestamp in seconds this asset was created on.
3209
+ * Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
2634
3210
  */
2635
- createdAtTimestamp: number;
3211
+ estimatedReward?: string;
3212
+ rewardTxHash?: string;
3213
+ memo?: string;
2636
3214
  /**
2637
- * Cap represents if an asset can be or is fixed cap.
3215
+ * Present for RewardValidatorTx
2638
3216
  */
2639
- cap: string;
3217
+ stakingTxHash?: string;
3218
+ };
3219
+
3220
+ type ListPChainTransactionsResponse = {
3221
+ /**
3222
+ * 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.
3223
+ */
3224
+ nextPageToken?: string;
3225
+ transactions: Array<PChainTransaction>;
3226
+ chainInfo: PrimaryNetworkChainInfo;
2640
3227
  };
2641
3228
 
2642
3229
  type XChainLinearTransaction = {
@@ -2645,7 +3232,7 @@ type XChainLinearTransaction = {
2645
3232
  */
2646
3233
  txHash: string;
2647
3234
  /**
2648
- * Represents container format this transaction is included in.
3235
+ * Represents chain format this transaction is included in.
2649
3236
  */
2650
3237
  chainFormat: XChainLinearTransaction.chainFormat;
2651
3238
  /**
@@ -2693,11 +3280,11 @@ type XChainLinearTransaction = {
2693
3280
  };
2694
3281
  declare namespace XChainLinearTransaction {
2695
3282
  /**
2696
- * Represents container format this transaction is included in.
3283
+ * Represents chain format this transaction is included in.
2697
3284
  */
2698
3285
  enum chainFormat {
2699
- LINEAR = "linear",
2700
- NON_LINEAR = "non-linear"
3286
+ NON_LINEAR = "non-linear",
3287
+ LINEAR = "linear"
2701
3288
  }
2702
3289
  }
2703
3290
 
@@ -2722,7 +3309,7 @@ type XChainNonLinearTransaction = {
2722
3309
  */
2723
3310
  txHash: string;
2724
3311
  /**
2725
- * Represents container format this transaction is included in.
3312
+ * Represents chain format this transaction is included in.
2726
3313
  */
2727
3314
  chainFormat: XChainNonLinearTransaction.chainFormat;
2728
3315
  /**
@@ -2766,11 +3353,11 @@ type XChainNonLinearTransaction = {
2766
3353
  };
2767
3354
  declare namespace XChainNonLinearTransaction {
2768
3355
  /**
2769
- * Represents container format this transaction is included in.
3356
+ * Represents chain format this transaction is included in.
2770
3357
  */
2771
3358
  enum chainFormat {
2772
- LINEAR = "linear",
2773
- NON_LINEAR = "non-linear"
3359
+ NON_LINEAR = "non-linear",
3360
+ LINEAR = "linear"
2774
3361
  }
2775
3362
  }
2776
3363
 
@@ -2780,53 +3367,44 @@ type ListXChainTransactionsResponse = {
2780
3367
  */
2781
3368
  nextPageToken?: string;
2782
3369
  transactions: Array<(XChainNonLinearTransaction | XChainLinearTransaction)>;
3370
+ chainInfo: PrimaryNetworkChainInfo;
2783
3371
  };
2784
3372
 
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
3373
  declare enum PChainId {
2810
- P_CHAIN = "p-chain",
2811
- _11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY"
3374
+ _11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY",
3375
+ P_CHAIN = "p-chain"
2812
3376
  }
2813
3377
 
2814
- declare enum XChainId {
2815
- X_CHAIN = "x-chain",
2816
- _2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM"
3378
+ declare enum PrimaryNetworkTxType {
3379
+ ADD_VALIDATOR_TX = "AddValidatorTx",
3380
+ ADD_DELEGATOR_TX = "AddDelegatorTx",
3381
+ ADD_PERMISSIONLESS_VALIDATOR_TX = "AddPermissionlessValidatorTx",
3382
+ ADD_SUBNET_VALIDATOR_TX = "AddSubnetValidatorTx",
3383
+ REMOVE_SUBNET_VALIDATOR_TX = "RemoveSubnetValidatorTx",
3384
+ REWARD_VALIDATOR_TX = "RewardValidatorTx",
3385
+ CREATE_CHAIN_TX = "CreateChainTx",
3386
+ CREATE_SUBNET_TX = "CreateSubnetTx",
3387
+ IMPORT_TX = "ImportTx",
3388
+ EXPORT_TX = "ExportTx",
3389
+ ADVANCE_TIME_TX = "AdvanceTimeTx",
3390
+ UNKNOWN = "UNKNOWN",
3391
+ BASE_TX = "BaseTx",
3392
+ CREATE_ASSET_TX = "CreateAssetTx",
3393
+ OPERATION_TX = "OperationTx"
2817
3394
  }
2818
3395
 
2819
- declare class PrimaryNetworkService {
3396
+ declare class PrimaryNetworkTransactionsService {
2820
3397
  readonly httpRequest: BaseHttpRequest;
2821
3398
  constructor(httpRequest: BaseHttpRequest);
2822
3399
  /**
2823
- * Returns the details of the supplied transaction hash.
3400
+ * Get transaction
3401
+ * Gets the details of a single transaction on one of the Primary Network chains.
2824
3402
  * @returns any
2825
3403
  * @throws ApiError
2826
3404
  */
2827
3405
  getTxByHash({ blockchainId, network, txHash, }: {
2828
3406
  /**
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!
3407
+ * A primary network blockchain id or alias.
2830
3408
  */
2831
3409
  blockchainId: BlockchainId;
2832
3410
  /**
@@ -2839,13 +3417,18 @@ declare class PrimaryNetworkService {
2839
3417
  txHash: string;
2840
3418
  }): CancelablePromise<(PChainTransaction | XChainNonLinearTransaction | XChainLinearTransaction | CChainExportTransaction | CChainImportTransaction)>;
2841
3419
  /**
2842
- * Returns latest transactions. If addresses are supplied, returns transactions for those addresses.
3420
+ * List latest transactions
3421
+ * Lists the latest transactions on one of the Primary Network chains.
3422
+ *
3423
+ * Transactions are filterable by addresses.
3424
+ *
3425
+ * Given that each transaction may return a large number of UTXO objects, bounded only by the maximum transaction size, the query may return less transactions than the provided page size. The result will contain less results than the page size if the number of utxos contained in the resulting transactions reach a performance threshold.
2843
3426
  * @returns any
2844
3427
  * @throws ApiError
2845
3428
  */
2846
- listLatestPrimaryNetworkTransactions({ blockchainId, network, addresses, pageSize, pageToken, sortOrder, }: {
3429
+ listLatestPrimaryNetworkTransactions({ blockchainId, network, addresses, txTypes, startTimestamp, endTimestamp, pageSize, pageToken, sortOrder, }: {
2847
3430
  /**
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!
3431
+ * A primary network blockchain id or alias.
2849
3432
  */
2850
3433
  blockchainId: BlockchainId;
2851
3434
  /**
@@ -2857,8 +3440,19 @@ declare class PrimaryNetworkService {
2857
3440
  */
2858
3441
  addresses?: string;
2859
3442
  /**
2860
- * The maximum number of items to return. The minimum page size
2861
- * is 1. The maximum pageSize is 100.
3443
+ * Query param for filtering items based on transaction types.
3444
+ */
3445
+ txTypes?: Array<PrimaryNetworkTxType>;
3446
+ /**
3447
+ * Query param for retrieving items after a specific timestamp.
3448
+ */
3449
+ startTimestamp?: number;
3450
+ /**
3451
+ * Query param for retrieving items before a specific timestamp.
3452
+ */
3453
+ endTimestamp?: number;
3454
+ /**
3455
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2862
3456
  */
2863
3457
  pageSize?: number;
2864
3458
  /**
@@ -2866,20 +3460,19 @@ declare class PrimaryNetworkService {
2866
3460
  */
2867
3461
  pageToken?: string;
2868
3462
  /**
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.
3463
+ * 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
3464
  */
2873
3465
  sortOrder?: SortOrder;
2874
3466
  }): CancelablePromise<(ListPChainTransactionsResponse | ListXChainTransactionsResponse | ListCChainAtomicTransactionsResponse)>;
2875
3467
  /**
2876
- * Returns active staking transactions for supplied addresses.
3468
+ * List staking transactions
3469
+ * Lists active staking transactions on the P-Chain for the supplied addresses.
2877
3470
  * @returns ListPChainTransactionsResponse
2878
3471
  * @throws ApiError
2879
3472
  */
2880
- listActivePrimaryNetworkStakingTransactions({ blockchainId, network, addresses, pageSize, pageToken, sortOrder, }: {
3473
+ listActivePrimaryNetworkStakingTransactions({ blockchainId, network, addresses, txTypes, startTimestamp, endTimestamp, pageSize, pageToken, sortOrder, }: {
2881
3474
  /**
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!
3475
+ * A primary network blockchain id or alias.
2883
3476
  */
2884
3477
  blockchainId: PChainId;
2885
3478
  /**
@@ -2891,8 +3484,19 @@ declare class PrimaryNetworkService {
2891
3484
  */
2892
3485
  addresses?: string;
2893
3486
  /**
2894
- * The maximum number of items to return. The minimum page size
2895
- * is 1. The maximum pageSize is 100.
3487
+ * Query param for filtering items based on transaction types.
3488
+ */
3489
+ txTypes?: Array<PrimaryNetworkTxType>;
3490
+ /**
3491
+ * Query param for retrieving items after a specific timestamp.
3492
+ */
3493
+ startTimestamp?: number;
3494
+ /**
3495
+ * Query param for retrieving items before a specific timestamp.
3496
+ */
3497
+ endTimestamp?: number;
3498
+ /**
3499
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2896
3500
  */
2897
3501
  pageSize?: number;
2898
3502
  /**
@@ -2900,96 +3504,82 @@ declare class PrimaryNetworkService {
2900
3504
  */
2901
3505
  pageToken?: string;
2902
3506
  /**
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.
3507
+ * 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
3508
  */
2907
3509
  sortOrder?: SortOrder;
2908
3510
  }): CancelablePromise<ListPChainTransactionsResponse>;
2909
3511
  /**
2910
- * Returns a list of UTXOs for the supplied addresses.
2911
- * @returns any
3512
+ * List asset transactions
3513
+ * Lists asset transactions corresponding to the given asset id on the X-Chain.
3514
+ * @returns ListXChainTransactionsResponse
2912
3515
  * @throws ApiError
2913
3516
  */
2914
- getUtxosByAddresses({ blockchainId, network, addresses, pageSize, pageToken, assetId, sortOrder, }: {
3517
+ listAssetTransactions({ blockchainId, network, assetId, txTypes, startTimestamp, endTimestamp, pageSize, pageToken, }: {
2915
3518
  /**
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!
3519
+ * A primary network blockchain id or alias.
2917
3520
  */
2918
- blockchainId: BlockchainId;
3521
+ blockchainId: XChainId;
2919
3522
  /**
2920
3523
  * Either mainnet or a testnet.
2921
3524
  */
2922
3525
  network: Network;
2923
3526
  /**
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.
3527
+ * Asset ID for any asset on X-Chain
2934
3528
  */
2935
- pageToken?: string;
3529
+ assetId: string;
2936
3530
  /**
2937
- * Asset ID for any asset (only applicable X-Chain)
3531
+ * Query param for filtering items based on transaction types.
2938
3532
  */
2939
- assetId?: string;
3533
+ txTypes?: Array<PrimaryNetworkTxType>;
2940
3534
  /**
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.
3535
+ * Query param for retrieving items after a specific timestamp.
2944
3536
  */
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, }: {
3537
+ startTimestamp?: number;
2953
3538
  /**
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!
3539
+ * Query param for retrieving items before a specific timestamp.
2955
3540
  */
2956
- blockchainId: BlockchainId;
3541
+ endTimestamp?: number;
2957
3542
  /**
2958
- * Either mainnet or a testnet.
3543
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2959
3544
  */
2960
- network: Network;
3545
+ pageSize?: number;
2961
3546
  /**
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".
3547
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2963
3548
  */
2964
- addresses?: string;
2965
- }): CancelablePromise<(ListPChainBalancesResponse | ListXChainBalancesResponse | ListCChainAtomicBalancesResponse)>;
3549
+ pageToken?: string;
3550
+ }): CancelablePromise<ListXChainTransactionsResponse>;
3551
+ }
3552
+
3553
+ type ListPChainUtxosResponse = {
2966
3554
  /**
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
3555
+ * 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
3556
  */
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>;
3557
+ nextPageToken?: string;
3558
+ utxos: Array<PChainUtxo>;
3559
+ chainInfo: PrimaryNetworkChainInfo;
3560
+ };
3561
+
3562
+ type ListUtxosResponse = {
3563
+ /**
3564
+ * 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.
3565
+ */
3566
+ nextPageToken?: string;
3567
+ utxos: Array<Utxo>;
3568
+ chainInfo: PrimaryNetworkChainInfo;
3569
+ };
3570
+
3571
+ declare class PrimaryNetworkUtxOsService {
3572
+ readonly httpRequest: BaseHttpRequest;
3573
+ constructor(httpRequest: BaseHttpRequest);
2985
3574
  /**
2986
- * Returns latest blocks proposed by a given NodeID, up to user defined limit.
2987
- * @returns ListBlocksResponse
3575
+ * List UTXOs
3576
+ * Lists UTXOs on one of the Primary Network chains for the supplied addresses.
3577
+ * @returns any
2988
3578
  * @throws ApiError
2989
3579
  */
2990
- listPrimaryNetworkBlocksByNodeId({ blockchainId, network, nodeId, pageSize, pageToken, }: {
3580
+ getUtxosByAddresses({ blockchainId, network, addresses, pageSize, pageToken, assetId, includeSpent, sortOrder, }: {
2991
3581
  /**
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!
3582
+ * A primary network blockchain id or alias.
2993
3583
  */
2994
3584
  blockchainId: BlockchainId;
2995
3585
  /**
@@ -2997,51 +3587,64 @@ declare class PrimaryNetworkService {
2997
3587
  */
2998
3588
  network: Network;
2999
3589
  /**
3000
- * A primary network (P or X chain) nodeId.
3590
+ * 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
3591
  */
3002
- nodeId: string;
3592
+ addresses?: string;
3003
3593
  /**
3004
- * The maximum number of items to return. The minimum page size
3005
- * is 1. The maximum pageSize is 100.
3594
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
3006
3595
  */
3007
3596
  pageSize?: number;
3008
3597
  /**
3009
3598
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3010
3599
  */
3011
3600
  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
3601
  /**
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.
3602
+ * Asset ID for any asset (only applicable X-Chain)
3025
3603
  */
3026
- network: Network;
3604
+ assetId?: string;
3027
3605
  /**
3028
- * The maximum number of items to return. The minimum page size
3029
- * is 1. The maximum pageSize is 100.
3606
+ * Boolean filter to include spent UTXOs.
3030
3607
  */
3031
- pageSize?: number;
3608
+ includeSpent?: boolean;
3032
3609
  /**
3033
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3610
+ * 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
3611
  */
3035
- pageToken?: string;
3036
- }): CancelablePromise<ListBlocksResponse>;
3612
+ sortOrder?: SortOrder;
3613
+ }): CancelablePromise<(ListPChainUtxosResponse | ListUtxosResponse)>;
3614
+ }
3615
+
3616
+ type XChainVertex = {
3617
+ vertexHash: string;
3618
+ parentHashes: Array<string>;
3619
+ vertexHeight: number;
3620
+ vertexIndex: number;
3621
+ vertexTimestamp: number;
3622
+ txCount: number;
3623
+ transactions: Array<string>;
3624
+ vertexSizeBytes: number;
3625
+ };
3626
+
3627
+ type ListXChainVerticesResponse = {
3628
+ /**
3629
+ * 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.
3630
+ */
3631
+ nextPageToken?: string;
3632
+ vertices: Array<XChainVertex>;
3633
+ chainInfo: PrimaryNetworkChainInfo;
3634
+ };
3635
+
3636
+ declare class PrimaryNetworkVerticesService {
3637
+ readonly httpRequest: BaseHttpRequest;
3638
+ constructor(httpRequest: BaseHttpRequest);
3037
3639
  /**
3038
- * Returns latest vertices, up to user defined limit on X-Chain.
3640
+ * List vertices
3641
+ * Lists latest vertices on the X-Chain.
3039
3642
  * @returns ListXChainVerticesResponse
3040
3643
  * @throws ApiError
3041
3644
  */
3042
3645
  listLatestXChainVertices({ blockchainId, network, pageSize, pageToken, }: {
3043
3646
  /**
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!
3647
+ * A primary network blockchain id or alias.
3045
3648
  */
3046
3649
  blockchainId: XChainId;
3047
3650
  /**
@@ -3049,8 +3652,7 @@ declare class PrimaryNetworkService {
3049
3652
  */
3050
3653
  network: Network;
3051
3654
  /**
3052
- * The maximum number of items to return. The minimum page size
3053
- * is 1. The maximum pageSize is 100.
3655
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
3054
3656
  */
3055
3657
  pageSize?: number;
3056
3658
  /**
@@ -3059,7 +3661,8 @@ declare class PrimaryNetworkService {
3059
3661
  pageToken?: string;
3060
3662
  }): CancelablePromise<ListXChainVerticesResponse>;
3061
3663
  /**
3062
- * Returns one vertex with the provided vertex hash on X-Chain.
3664
+ * Get vertex
3665
+ * Gets a single vertex on the X-Chain.
3063
3666
  * @returns XChainVertex
3064
3667
  * @throws ApiError
3065
3668
  */
@@ -3069,7 +3672,7 @@ declare class PrimaryNetworkService {
3069
3672
  */
3070
3673
  vertexHash: string;
3071
3674
  /**
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!
3675
+ * A primary network blockchain id or alias.
3073
3676
  */
3074
3677
  blockchainId: XChainId;
3075
3678
  /**
@@ -3078,7 +3681,8 @@ declare class PrimaryNetworkService {
3078
3681
  network: Network;
3079
3682
  }): CancelablePromise<XChainVertex>;
3080
3683
  /**
3081
- * Returns vertices with the provided vertex height on X-Chain.
3684
+ * List vertices by height
3685
+ * Lists vertices at the given vertex height on the X-Chain.
3082
3686
  * @returns ListXChainVerticesResponse
3083
3687
  * @throws ApiError
3084
3688
  */
@@ -3088,7 +3692,7 @@ declare class PrimaryNetworkService {
3088
3692
  */
3089
3693
  vertexHeight: number;
3090
3694
  /**
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!
3695
+ * A primary network blockchain id or alias.
3092
3696
  */
3093
3697
  blockchainId: XChainId;
3094
3698
  /**
@@ -3096,8 +3700,7 @@ declare class PrimaryNetworkService {
3096
3700
  */
3097
3701
  network: Network;
3098
3702
  /**
3099
- * The maximum number of items to return. The minimum page size
3100
- * is 1. The maximum pageSize is 100.
3703
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
3101
3704
  */
3102
3705
  pageSize?: number;
3103
3706
  /**
@@ -3105,82 +3708,29 @@ declare class PrimaryNetworkService {
3105
3708
  */
3106
3709
  pageToken?: string;
3107
3710
  /**
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.
3711
+ * 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
3712
  */
3112
3713
  sortOrder?: SortOrder;
3113
3714
  }): 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
3715
  }
3177
3716
 
3178
3717
  type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
3179
3718
  declare class Glacier {
3180
- readonly evm: EvmService;
3719
+ readonly evmBalances: EvmBalancesService;
3720
+ readonly evmBlocks: EvmBlocksService;
3721
+ readonly evmChains: EvmChainsService;
3722
+ readonly evmContracts: EvmContractsService;
3723
+ readonly evmTransactions: EvmTransactionsService;
3181
3724
  readonly healthCheck: HealthCheckService;
3725
+ readonly nfTs: NfTsService;
3182
3726
  readonly operations: OperationsService;
3183
3727
  readonly primaryNetwork: PrimaryNetworkService;
3728
+ readonly primaryNetworkBalances: PrimaryNetworkBalancesService;
3729
+ readonly primaryNetworkBlocks: PrimaryNetworkBlocksService;
3730
+ readonly primaryNetworkRewards: PrimaryNetworkRewardsService;
3731
+ readonly primaryNetworkTransactions: PrimaryNetworkTransactionsService;
3732
+ readonly primaryNetworkUtxOs: PrimaryNetworkUtxOsService;
3733
+ readonly primaryNetworkVertices: PrimaryNetworkVerticesService;
3184
3734
  readonly request: BaseHttpRequest;
3185
3735
  constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
3186
3736
  }
@@ -3202,4 +3752,4 @@ declare class ApiError extends Error {
3202
3752
  constructor(request: ApiRequestOptions, response: ApiResult, message: string);
3203
3753
  }
3204
3754
 
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 };
3755
+ 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, EvmContractsService, 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, NfTsService, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainAsset, PChainBalance, PChainId, PChainSharedAsset, PChainTransaction, PChainTransactionType, PChainUtxo, PendingDelegatorDetails, PendingReward, PendingValidatorDetails, PricingProviders, 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 };