@avalabs/glacier-sdk 2.8.0-alpha.17 → 2.8.0-alpha.170

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 (295) hide show
  1. package/README.md +10 -0
  2. package/dist/index.d.ts +4240 -3
  3. package/dist/index.js +2068 -155
  4. package/esm/generated/Glacier.d.ts +42 -0
  5. package/esm/generated/Glacier.js +68 -0
  6. package/esm/generated/core/ApiError.d.ts +13 -0
  7. package/esm/generated/core/ApiError.js +18 -0
  8. package/esm/generated/core/ApiRequestOptions.d.ts +15 -0
  9. package/esm/generated/core/ApiResult.d.ts +9 -0
  10. package/esm/generated/core/BaseHttpRequest.d.ts +11 -0
  11. package/esm/generated/core/BaseHttpRequest.js +7 -0
  12. package/esm/generated/core/CancelablePromise.d.ts +28 -0
  13. package/esm/generated/core/CancelablePromise.js +91 -0
  14. package/esm/generated/core/FetchHttpRequest.js +13 -0
  15. package/esm/generated/core/OpenAPI.d.ts +18 -0
  16. package/esm/generated/core/OpenAPI.js +13 -0
  17. package/esm/generated/core/request.js +227 -0
  18. package/esm/generated/models/ActiveDelegatorDetails.d.ts +19 -0
  19. package/esm/generated/models/ActiveDelegatorDetails.js +8 -0
  20. package/esm/generated/models/ActiveValidatorDetails.d.ts +28 -0
  21. package/esm/generated/models/ActiveValidatorDetails.js +8 -0
  22. package/esm/generated/models/AddressActivityMetadata.d.ts +12 -0
  23. package/esm/generated/models/Asset.d.ts +30 -0
  24. package/esm/generated/models/AssetWithPriceInfo.d.ts +35 -0
  25. package/esm/generated/models/Blockchain.d.ts +10 -0
  26. package/esm/generated/models/BlockchainId.d.ts +12 -0
  27. package/esm/generated/models/BlockchainId.js +13 -0
  28. package/esm/generated/models/BlockchainIds.d.ts +9 -0
  29. package/esm/generated/models/BlockchainIds.js +10 -0
  30. package/esm/generated/models/BlockchainInfo.d.ts +5 -0
  31. package/esm/generated/models/CChainAtomicBalances.d.ts +8 -0
  32. package/esm/generated/models/CChainExportTransaction.d.ts +58 -0
  33. package/esm/generated/models/CChainExportTransaction.js +8 -0
  34. package/esm/generated/models/CChainImportTransaction.d.ts +58 -0
  35. package/esm/generated/models/CChainImportTransaction.js +8 -0
  36. package/esm/generated/models/CChainSharedAssetBalance.d.ts +32 -0
  37. package/esm/generated/models/ChainAddressChainIdMap.d.ts +8 -0
  38. package/esm/generated/models/ChainAddressChainIdMapListResponse.d.ts +7 -0
  39. package/esm/generated/models/ChainInfo.d.ts +28 -0
  40. package/esm/generated/models/ChainStatus.d.ts +6 -0
  41. package/esm/generated/models/ChainStatus.js +7 -0
  42. package/esm/generated/models/CompletedDelegatorDetails.d.ts +19 -0
  43. package/esm/generated/models/CompletedDelegatorDetails.js +8 -0
  44. package/esm/generated/models/CompletedValidatorDetails.d.ts +21 -0
  45. package/esm/generated/models/CompletedValidatorDetails.js +8 -0
  46. package/esm/generated/models/ContractDeploymentDetails.d.ts +13 -0
  47. package/esm/generated/models/ContractSubmissionBody.d.ts +10 -0
  48. package/esm/generated/models/ContractSubmissionErc1155.d.ts +31 -0
  49. package/esm/generated/models/ContractSubmissionErc1155.js +8 -0
  50. package/esm/generated/models/ContractSubmissionErc20.d.ts +31 -0
  51. package/esm/generated/models/ContractSubmissionErc20.js +8 -0
  52. package/esm/generated/models/ContractSubmissionErc721.d.ts +29 -0
  53. package/esm/generated/models/ContractSubmissionErc721.js +8 -0
  54. package/esm/generated/models/ContractSubmissionUnknown.d.ts +25 -0
  55. package/esm/generated/models/ContractSubmissionUnknown.js +8 -0
  56. package/esm/generated/models/CreateEvmTransactionExportRequest.d.ts +23 -0
  57. package/esm/generated/models/CreateEvmTransactionExportRequest.js +8 -0
  58. package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.d.ts +23 -0
  59. package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.js +8 -0
  60. package/esm/generated/models/CurrencyCode.d.ts +18 -0
  61. package/esm/generated/models/CurrencyCode.js +19 -0
  62. package/esm/generated/models/DelegationStatusType.d.ts +7 -0
  63. package/esm/generated/models/DelegationStatusType.js +8 -0
  64. package/esm/generated/models/DelegatorsDetails.d.ts +6 -0
  65. package/esm/generated/models/EVMInput.d.ts +19 -0
  66. package/esm/generated/models/EVMOutput.d.ts +14 -0
  67. package/esm/generated/models/Erc1155Contract.d.ts +37 -0
  68. package/esm/generated/models/Erc1155Contract.js +8 -0
  69. package/esm/generated/models/Erc1155Token.d.ts +19 -0
  70. package/esm/generated/models/Erc1155Token.js +8 -0
  71. package/esm/generated/models/Erc1155TokenBalance.d.ts +27 -0
  72. package/esm/generated/models/Erc1155TokenBalance.js +8 -0
  73. package/esm/generated/models/Erc1155TokenMetadata.d.ts +20 -0
  74. package/esm/generated/models/Erc1155Transfer.d.ts +28 -0
  75. package/esm/generated/models/Erc1155TransferDetails.d.ts +12 -0
  76. package/esm/generated/models/Erc20Contract.d.ts +41 -0
  77. package/esm/generated/models/Erc20Contract.js +8 -0
  78. package/esm/generated/models/Erc20Token.d.ts +36 -0
  79. package/esm/generated/models/Erc20Token.js +8 -0
  80. package/esm/generated/models/Erc20TokenBalance.d.ts +48 -0
  81. package/esm/generated/models/Erc20TokenBalance.js +8 -0
  82. package/esm/generated/models/Erc20Transfer.d.ts +28 -0
  83. package/esm/generated/models/Erc20TransferDetails.d.ts +12 -0
  84. package/esm/generated/models/Erc721Contract.d.ts +35 -0
  85. package/esm/generated/models/Erc721Contract.js +8 -0
  86. package/esm/generated/models/Erc721Token.d.ts +31 -0
  87. package/esm/generated/models/Erc721Token.js +8 -0
  88. package/esm/generated/models/Erc721TokenBalance.d.ts +35 -0
  89. package/esm/generated/models/Erc721TokenBalance.js +8 -0
  90. package/esm/generated/models/Erc721TokenMetadata.d.ts +19 -0
  91. package/esm/generated/models/Erc721Transfer.d.ts +27 -0
  92. package/esm/generated/models/Erc721TransferDetails.d.ts +11 -0
  93. package/esm/generated/models/EventType.d.ts +5 -0
  94. package/esm/generated/models/EventType.js +6 -0
  95. package/esm/generated/models/EvmBlock.d.ts +45 -0
  96. package/esm/generated/models/EvmNetworkOptions.d.ts +6 -0
  97. package/esm/generated/models/FullNativeTransactionDetails.d.ts +62 -0
  98. package/esm/generated/models/GetChainResponse.d.ts +28 -0
  99. package/esm/generated/models/GetEvmBlockResponse.d.ts +45 -0
  100. package/esm/generated/models/GetNativeBalanceResponse.d.ts +10 -0
  101. package/esm/generated/models/GetNetworkDetailsResponse.d.ts +9 -0
  102. package/esm/generated/models/GetPrimaryNetworkBlockResponse.d.ts +16 -0
  103. package/esm/generated/models/GetTransactionResponse.d.ts +29 -0
  104. package/esm/generated/models/HistoricalReward.d.ts +21 -0
  105. package/esm/generated/models/ImageAsset.d.ts +9 -0
  106. package/esm/generated/models/InternalTransaction.d.ts +33 -0
  107. package/esm/generated/models/InternalTransactionDetails.d.ts +17 -0
  108. package/esm/generated/models/InternalTransactionOpCall.d.ts +11 -0
  109. package/esm/generated/models/InternalTransactionOpCall.js +12 -0
  110. package/esm/generated/models/ListBlockchainsResponse.d.ts +11 -0
  111. package/esm/generated/models/ListCChainAtomicBalancesResponse.d.ts +9 -0
  112. package/esm/generated/models/ListCChainAtomicTransactionsResponse.d.ts +14 -0
  113. package/esm/generated/models/ListChainsResponse.d.ts +7 -0
  114. package/esm/generated/models/ListCollectibleBalancesResponse.d.ts +15 -0
  115. package/esm/generated/models/ListContractsResponse.d.ts +14 -0
  116. package/esm/generated/models/ListDelegatorDetailsResponse.d.ts +16 -0
  117. package/esm/generated/models/ListErc1155BalancesResponse.d.ts +14 -0
  118. package/esm/generated/models/ListErc1155TransactionsResponse.d.ts +11 -0
  119. package/esm/generated/models/ListErc20BalancesResponse.d.ts +14 -0
  120. package/esm/generated/models/ListErc20TransactionsResponse.d.ts +11 -0
  121. package/esm/generated/models/ListErc721BalancesResponse.d.ts +14 -0
  122. package/esm/generated/models/ListErc721TransactionsResponse.d.ts +11 -0
  123. package/esm/generated/models/ListEvmBlocksResponse.d.ts +11 -0
  124. package/esm/generated/models/ListHistoricalRewardsResponse.d.ts +11 -0
  125. package/esm/generated/models/ListInternalTransactionsResponse.d.ts +11 -0
  126. package/esm/generated/models/ListNativeTransactionsResponse.d.ts +11 -0
  127. package/esm/generated/models/ListNftTokens.d.ts +12 -0
  128. package/esm/generated/models/ListPChainBalancesResponse.d.ts +9 -0
  129. package/esm/generated/models/ListPChainTransactionsResponse.d.ts +13 -0
  130. package/esm/generated/models/ListPChainUtxosResponse.d.ts +13 -0
  131. package/esm/generated/models/ListPendingRewardsResponse.d.ts +11 -0
  132. package/esm/generated/models/ListPrimaryNetworkBlocksResponse.d.ts +13 -0
  133. package/esm/generated/models/ListSubnetsResponse.d.ts +11 -0
  134. package/esm/generated/models/ListTransactionDetailsResponse.d.ts +11 -0
  135. package/esm/generated/models/ListTransfersResponse.d.ts +13 -0
  136. package/esm/generated/models/ListUtxosResponse.d.ts +13 -0
  137. package/esm/generated/models/ListValidatorDetailsResponse.d.ts +17 -0
  138. package/esm/generated/models/ListWebhooksResponse.d.ts +11 -0
  139. package/esm/generated/models/ListXChainBalancesResponse.d.ts +9 -0
  140. package/esm/generated/models/ListXChainTransactionsResponse.d.ts +14 -0
  141. package/esm/generated/models/ListXChainVerticesResponse.d.ts +13 -0
  142. package/esm/generated/models/Method.d.ts +18 -0
  143. package/esm/generated/models/Money.d.ts +14 -0
  144. package/esm/generated/models/NativeTokenBalance.d.ts +38 -0
  145. package/esm/generated/models/NativeTransaction.d.ts +55 -0
  146. package/esm/generated/models/Network.d.ts +6 -0
  147. package/esm/generated/models/Network.js +7 -0
  148. package/esm/generated/models/NetworkToken.d.ts +21 -0
  149. package/esm/generated/models/NetworkTokenDetails.d.ts +16 -0
  150. package/esm/generated/models/NetworkType.d.ts +6 -0
  151. package/esm/generated/models/NetworkType.js +7 -0
  152. package/esm/generated/models/NftTokenMetadataStatus.d.ts +15 -0
  153. package/esm/generated/models/NftTokenMetadataStatus.js +16 -0
  154. package/esm/generated/models/OperationStatus.d.ts +8 -0
  155. package/esm/generated/models/OperationStatus.js +9 -0
  156. package/esm/generated/models/OperationStatusCode.d.ts +7 -0
  157. package/esm/generated/models/OperationStatusCode.js +8 -0
  158. package/esm/generated/models/OperationStatusResponse.d.ts +15 -0
  159. package/esm/generated/models/OperationType.d.ts +6 -0
  160. package/esm/generated/models/OperationType.js +7 -0
  161. package/esm/generated/models/PChainBalance.d.ts +39 -0
  162. package/esm/generated/models/PChainId.d.ts +6 -0
  163. package/esm/generated/models/PChainId.js +7 -0
  164. package/esm/generated/models/PChainSharedAsset.d.ts +32 -0
  165. package/esm/generated/models/PChainTransaction.d.ts +72 -0
  166. package/esm/generated/models/PChainTransactionType.d.ts +18 -0
  167. package/esm/generated/models/PChainTransactionType.js +19 -0
  168. package/esm/generated/models/PChainUtxo.d.ts +51 -0
  169. package/esm/generated/models/PendingDelegatorDetails.d.ts +19 -0
  170. package/esm/generated/models/PendingDelegatorDetails.js +8 -0
  171. package/esm/generated/models/PendingReward.d.ts +22 -0
  172. package/esm/generated/models/PendingValidatorDetails.d.ts +17 -0
  173. package/esm/generated/models/PendingValidatorDetails.js +8 -0
  174. package/esm/generated/models/PricingProviders.d.ts +5 -0
  175. package/esm/generated/models/PrimaryNetwork.d.ts +6 -0
  176. package/esm/generated/models/PrimaryNetwork.js +7 -0
  177. package/esm/generated/models/PrimaryNetworkAssetCap.d.ts +6 -0
  178. package/esm/generated/models/PrimaryNetworkAssetCap.js +7 -0
  179. package/esm/generated/models/PrimaryNetworkAssetType.d.ts +6 -0
  180. package/esm/generated/models/PrimaryNetworkAssetType.js +7 -0
  181. package/esm/generated/models/PrimaryNetworkBlock.d.ts +16 -0
  182. package/esm/generated/models/PrimaryNetworkChainInfo.d.ts +9 -0
  183. package/esm/generated/models/PrimaryNetworkChainName.d.ts +7 -0
  184. package/esm/generated/models/PrimaryNetworkChainName.js +8 -0
  185. package/esm/generated/models/PrimaryNetworkOptions.d.ts +7 -0
  186. package/esm/generated/models/PrimaryNetworkTxType.d.ts +21 -0
  187. package/esm/generated/models/PrimaryNetworkTxType.js +22 -0
  188. package/esm/generated/models/ProposerDetails.d.ts +9 -0
  189. package/esm/generated/models/RegisterWebhookRequest.d.ts +14 -0
  190. package/esm/generated/models/RemovedValidatorDetails.d.ts +19 -0
  191. package/esm/generated/models/RemovedValidatorDetails.js +8 -0
  192. package/esm/generated/models/ResourceLink.d.ts +8 -0
  193. package/esm/generated/models/ResourceLinkType.d.ts +22 -0
  194. package/esm/generated/models/ResourceLinkType.js +23 -0
  195. package/esm/generated/models/RewardType.d.ts +7 -0
  196. package/esm/generated/models/RewardType.js +8 -0
  197. package/esm/generated/models/Rewards.d.ts +8 -0
  198. package/esm/generated/models/RichAddress.d.ts +24 -0
  199. package/esm/generated/models/SharedSecretsResponse.d.ts +5 -0
  200. package/esm/generated/models/SortOrder.d.ts +6 -0
  201. package/esm/generated/models/SortOrder.js +7 -0
  202. package/esm/generated/models/StakingDistribution.d.ts +7 -0
  203. package/esm/generated/models/Subnet.d.ts +13 -0
  204. package/esm/generated/models/TransactionDetails.d.ts +30 -0
  205. package/esm/generated/models/TransactionExportMetadata.d.ts +15 -0
  206. package/esm/generated/models/TransactionMethodType.d.ts +7 -0
  207. package/esm/generated/models/TransactionMethodType.js +8 -0
  208. package/esm/generated/models/TransactionStatus.d.ts +6 -0
  209. package/esm/generated/models/TransactionStatus.js +7 -0
  210. package/esm/generated/models/TransactionVertexDetail.d.ts +16 -0
  211. package/esm/generated/models/UnknownContract.d.ts +31 -0
  212. package/esm/generated/models/UnknownContract.js +8 -0
  213. package/esm/generated/models/UpdateContractResponse.d.ts +10 -0
  214. package/esm/generated/models/UtilityAddresses.d.ts +5 -0
  215. package/esm/generated/models/Utxo.d.ts +68 -0
  216. package/esm/generated/models/UtxoCredential.d.ts +12 -0
  217. package/esm/generated/models/UtxoType.d.ts +6 -0
  218. package/esm/generated/models/UtxoType.js +7 -0
  219. package/esm/generated/models/ValidationStatusType.d.ts +8 -0
  220. package/esm/generated/models/ValidationStatusType.js +9 -0
  221. package/esm/generated/models/ValidatorHealthDetails.d.ts +20 -0
  222. package/esm/generated/models/ValidatorsDetails.d.ts +11 -0
  223. package/esm/generated/models/VmName.d.ts +7 -0
  224. package/esm/generated/models/VmName.js +8 -0
  225. package/esm/generated/models/WebhookResponse.d.ts +17 -0
  226. package/esm/generated/models/WebhookStatus.d.ts +6 -0
  227. package/esm/generated/models/WebhookStatus.js +7 -0
  228. package/esm/generated/models/WebhookStatusType.d.ts +6 -0
  229. package/esm/generated/models/WebhookStatusType.js +7 -0
  230. package/esm/generated/models/XChainAssetBalance.d.ts +31 -0
  231. package/esm/generated/models/XChainAssetDetails.d.ts +35 -0
  232. package/esm/generated/models/XChainBalances.d.ts +17 -0
  233. package/esm/generated/models/XChainId.d.ts +7 -0
  234. package/esm/generated/models/XChainId.js +8 -0
  235. package/esm/generated/models/XChainLinearTransaction.d.ts +68 -0
  236. package/esm/generated/models/XChainLinearTransaction.js +9 -0
  237. package/esm/generated/models/XChainNonLinearTransaction.d.ts +65 -0
  238. package/esm/generated/models/XChainNonLinearTransaction.js +9 -0
  239. package/esm/generated/models/XChainSharedAssetBalance.d.ts +32 -0
  240. package/esm/generated/models/XChainTransactionType.d.ts +10 -0
  241. package/esm/generated/models/XChainTransactionType.js +11 -0
  242. package/esm/generated/models/XChainVertex.d.ts +12 -0
  243. package/esm/generated/services/DefaultService.d.ts +74 -0
  244. package/esm/generated/services/DefaultService.js +61 -0
  245. package/esm/generated/services/EvmBalancesService.d.ts +177 -0
  246. package/esm/generated/services/EvmBalancesService.js +116 -0
  247. package/esm/generated/services/EvmBlocksService.d.ts +47 -0
  248. package/esm/generated/services/EvmBlocksService.js +37 -0
  249. package/esm/generated/services/EvmChainsService.d.ts +36 -0
  250. package/esm/generated/services/EvmChainsService.js +29 -0
  251. package/esm/generated/services/EvmContractsService.d.ts +48 -0
  252. package/esm/generated/services/EvmContractsService.js +36 -0
  253. package/esm/generated/services/EvmTransactionsService.d.ts +353 -0
  254. package/esm/generated/services/EvmTransactionsService.js +251 -0
  255. package/esm/generated/services/HealthCheckService.d.ts +20 -0
  256. package/esm/generated/services/HealthCheckService.js +16 -0
  257. package/esm/generated/services/NfTsService.d.ts +76 -0
  258. package/esm/generated/services/NfTsService.js +56 -0
  259. package/esm/generated/services/OperationsService.d.ts +35 -0
  260. package/esm/generated/services/OperationsService.js +28 -0
  261. package/esm/generated/services/PrimaryNetworkBalancesService.d.ts +40 -0
  262. package/esm/generated/services/PrimaryNetworkBalancesService.js +26 -0
  263. package/esm/generated/services/PrimaryNetworkBlocksService.d.ts +85 -0
  264. package/esm/generated/services/PrimaryNetworkBlocksService.js +62 -0
  265. package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +82 -0
  266. package/esm/generated/services/PrimaryNetworkRewardsService.js +55 -0
  267. package/esm/generated/services/PrimaryNetworkService.d.ts +245 -0
  268. package/esm/generated/services/PrimaryNetworkService.js +171 -0
  269. package/esm/generated/services/PrimaryNetworkTransactionsService.d.ts +175 -0
  270. package/esm/generated/services/PrimaryNetworkTransactionsService.js +107 -0
  271. package/esm/generated/services/PrimaryNetworkUtxOsService.d.ts +54 -0
  272. package/esm/generated/services/PrimaryNetworkUtxOsService.js +34 -0
  273. package/esm/generated/services/PrimaryNetworkVerticesService.d.ts +90 -0
  274. package/esm/generated/services/PrimaryNetworkVerticesService.js +64 -0
  275. package/esm/index.d.ts +187 -0
  276. package/esm/index.js +80 -0
  277. package/package.json +11 -20
  278. package/.eslintrc.js +0 -3
  279. package/CHANGELOG.md +0 -262
  280. package/__tests__/glacier-sdk.test.js +0 -7
  281. package/dist/index.d.ts.map +0 -1
  282. package/dist/index.js.map +0 -1
  283. package/dist/src/generated/models.d.ts +0 -385
  284. package/dist/src/generated/models.d.ts.map +0 -1
  285. package/dist/src/glacierClient.d.ts +0 -93
  286. package/dist/src/glacierClient.d.ts.map +0 -1
  287. package/dist/src/types.d.ts +0 -13
  288. package/dist/src/types.d.ts.map +0 -1
  289. package/index.ts +0 -2
  290. package/rollup.config.js +0 -33
  291. package/src/generated/models.ts +0 -460
  292. package/src/glacierClient.ts +0 -190
  293. package/src/types.ts +0 -6
  294. package/swagger/generateModels.js +0 -40
  295. package/tsconfig.json +0 -7
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4240 @@
1
- export * from './src/generated/models';
2
- export * from './src/glacierClient';
3
- //# sourceMappingURL=index.d.ts.map
1
+ type ApiRequestOptions = {
2
+ readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
3
+ readonly url: string;
4
+ readonly path?: Record<string, any>;
5
+ readonly cookies?: Record<string, any>;
6
+ readonly headers?: Record<string, any>;
7
+ readonly query?: Record<string, any>;
8
+ readonly formData?: Record<string, any>;
9
+ readonly body?: any;
10
+ readonly mediaType?: string;
11
+ readonly responseHeader?: string;
12
+ readonly errors?: Record<number, string>;
13
+ };
14
+
15
+ declare class CancelError extends Error {
16
+ constructor(message: string);
17
+ get isCancelled(): boolean;
18
+ }
19
+ interface OnCancel {
20
+ readonly isResolved: boolean;
21
+ readonly isRejected: boolean;
22
+ readonly isCancelled: boolean;
23
+ (cancelHandler: () => void): void;
24
+ }
25
+ declare class CancelablePromise<T> implements Promise<T> {
26
+ readonly [Symbol.toStringTag]: string;
27
+ private _isResolved;
28
+ private _isRejected;
29
+ private _isCancelled;
30
+ private readonly _cancelHandlers;
31
+ private readonly _promise;
32
+ private _resolve?;
33
+ private _reject?;
34
+ constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
35
+ then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
36
+ catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
37
+ finally(onFinally?: (() => void) | null): Promise<T>;
38
+ cancel(): void;
39
+ get isCancelled(): boolean;
40
+ }
41
+
42
+ type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
43
+ type Headers = Record<string, string>;
44
+ type OpenAPIConfig = {
45
+ BASE: string;
46
+ VERSION: string;
47
+ WITH_CREDENTIALS: boolean;
48
+ CREDENTIALS: 'include' | 'omit' | 'same-origin';
49
+ TOKEN?: string | Resolver<string>;
50
+ USERNAME?: string | Resolver<string>;
51
+ PASSWORD?: string | Resolver<string>;
52
+ HEADERS?: Headers | Resolver<Headers>;
53
+ ENCODE_PATH?: (path: string) => string;
54
+ };
55
+ declare const OpenAPI: OpenAPIConfig;
56
+
57
+ declare abstract class BaseHttpRequest {
58
+ readonly config: OpenAPIConfig;
59
+ constructor(config: OpenAPIConfig);
60
+ abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
61
+ }
62
+
63
+ type AddressActivityMetadata = {
64
+ /**
65
+ * Ethereum address for the address_activity event type
66
+ */
67
+ address: string;
68
+ /**
69
+ * Array of hexadecimal strings of the event signatures.
70
+ */
71
+ eventSignatures?: Array<string>;
72
+ };
73
+
74
+ declare enum EventType {
75
+ ADDRESS_ACTIVITY = "address_activity"
76
+ }
77
+
78
+ declare enum WebhookStatusType {
79
+ ACTIVE = "active",
80
+ INACTIVE = "inactive"
81
+ }
82
+
83
+ type WebhookResponse = {
84
+ id: string;
85
+ eventType: EventType;
86
+ metadata: AddressActivityMetadata;
87
+ url: string;
88
+ chainId: string;
89
+ status: WebhookStatusType;
90
+ createdAt: number;
91
+ name: string;
92
+ description: string;
93
+ };
94
+
95
+ type ListWebhooksResponse = {
96
+ /**
97
+ * 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.
98
+ */
99
+ nextPageToken?: string;
100
+ webhooks: Array<WebhookResponse>;
101
+ };
102
+
103
+ type RegisterWebhookRequest = {
104
+ url: string;
105
+ chainId: string;
106
+ /**
107
+ * The type of event for the webhook
108
+ */
109
+ eventType: EventType;
110
+ metadata: AddressActivityMetadata;
111
+ };
112
+
113
+ type SharedSecretsResponse = {
114
+ secret: string;
115
+ };
116
+
117
+ declare enum WebhookStatus {
118
+ ACTIVE = "active",
119
+ INACTIVE = "inactive"
120
+ }
121
+
122
+ declare class DefaultService {
123
+ readonly httpRequest: BaseHttpRequest;
124
+ constructor(httpRequest: BaseHttpRequest);
125
+ /**
126
+ * @returns any
127
+ * @throws ApiError
128
+ */
129
+ mediaControllerUploadImage(): CancelablePromise<any>;
130
+ /**
131
+ * Register a webhook
132
+ * Registers a new webhook.
133
+ * @returns WebhookResponse
134
+ * @throws ApiError
135
+ */
136
+ registerWebhook({ requestBody, }: {
137
+ requestBody: RegisterWebhookRequest;
138
+ }): CancelablePromise<WebhookResponse>;
139
+ /**
140
+ * List webhooks
141
+ * Lists webhooks for the user.
142
+ * @returns ListWebhooksResponse
143
+ * @throws ApiError
144
+ */
145
+ listWebhooks({ pageToken, pageSize, status, }: {
146
+ /**
147
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
148
+ */
149
+ pageToken?: string;
150
+ /**
151
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
152
+ */
153
+ pageSize?: number;
154
+ /**
155
+ * Status of the webhook. Use "active" to return only active webhooks, "inactive" to return only inactive webhooks. Else if no status is provided, all configured webhooks will be returned.
156
+ */
157
+ status?: WebhookStatus;
158
+ }): CancelablePromise<ListWebhooksResponse>;
159
+ /**
160
+ * Deactivate a webhook
161
+ * Deactivates a webhook by ID.
162
+ * @returns WebhookResponse
163
+ * @throws ApiError
164
+ */
165
+ deactivateWebhook({ id, }: {
166
+ /**
167
+ * The webhook identifier.
168
+ */
169
+ id: string;
170
+ }): CancelablePromise<WebhookResponse>;
171
+ /**
172
+ * Generate a shared secret
173
+ * Generates a new shared secret.
174
+ * @returns SharedSecretsResponse
175
+ * @throws ApiError
176
+ */
177
+ generateSharedSecret(): CancelablePromise<SharedSecretsResponse>;
178
+ /**
179
+ * Get a shared secret
180
+ * Get a previously generated shared secret.
181
+ * @returns SharedSecretsResponse
182
+ * @throws ApiError
183
+ */
184
+ getSharedSecret(): CancelablePromise<SharedSecretsResponse>;
185
+ }
186
+
187
+ declare enum CurrencyCode {
188
+ USD = "usd",
189
+ EUR = "eur",
190
+ AUD = "aud",
191
+ CAD = "cad",
192
+ CHF = "chf",
193
+ CLP = "clp",
194
+ CNY = "cny",
195
+ CZK = "czk",
196
+ DKK = "dkk",
197
+ GBP = "gbp",
198
+ HKD = "hkd",
199
+ HUF = "huf",
200
+ JPY = "jpy",
201
+ NZD = "nzd"
202
+ }
203
+
204
+ type Money = {
205
+ /**
206
+ * ISO 4217 currency code.
207
+ */
208
+ currencyCode: CurrencyCode;
209
+ /**
210
+ * Monetary value in base 10 decimals.
211
+ */
212
+ value: number;
213
+ };
214
+
215
+ type NativeTokenBalance = {
216
+ /**
217
+ * The contract name.
218
+ */
219
+ name: string;
220
+ /**
221
+ * The contract symbol.
222
+ */
223
+ symbol: string;
224
+ /**
225
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
226
+ */
227
+ decimals: number;
228
+ /**
229
+ * The logo uri for the address.
230
+ */
231
+ logoUri?: string;
232
+ /**
233
+ * The evm chain id.
234
+ */
235
+ chainId: string;
236
+ /**
237
+ * The token price, if available.
238
+ */
239
+ price?: Money;
240
+ /**
241
+ * The address balance for the token, in units specified by the `decimals` value for the contract.
242
+ */
243
+ balance: string;
244
+ /**
245
+ * The monetary value of the balance, if a price is available for the token.
246
+ */
247
+ balanceValue?: Money;
248
+ };
249
+
250
+ type GetNativeBalanceResponse = {
251
+ /**
252
+ * The native token balance for the address.
253
+ */
254
+ nativeTokenBalance: NativeTokenBalance;
255
+ };
256
+
257
+ declare enum NftTokenMetadataStatus {
258
+ UNKNOWN = "UNKNOWN",
259
+ MISSING_TOKEN = "MISSING_TOKEN",
260
+ INVALID_TOKEN_URI = "INVALID_TOKEN_URI",
261
+ INVALID_TOKEN_URI_SCHEME = "INVALID_TOKEN_URI_SCHEME",
262
+ UNREACHABLE_TOKEN_URI = "UNREACHABLE_TOKEN_URI",
263
+ THROTTLED_TOKEN_URI = "THROTTLED_TOKEN_URI",
264
+ METADATA_CONTENT_TOO_LARGE = "METADATA_CONTENT_TOO_LARGE",
265
+ INVALID_METADATA = "INVALID_METADATA",
266
+ INVALID_METADATA_JSON = "INVALID_METADATA_JSON",
267
+ INDEXED = "INDEXED",
268
+ UNINDEXED = "UNINDEXED"
269
+ }
270
+
271
+ type Erc1155TokenMetadata = {
272
+ /**
273
+ * The metadata indexing status of the nft.
274
+ */
275
+ indexStatus: NftTokenMetadataStatus;
276
+ metadataLastUpdatedTimestamp?: number;
277
+ name?: string;
278
+ symbol?: string;
279
+ imageUri?: string;
280
+ description?: string;
281
+ animationUri?: string;
282
+ externalUrl?: string;
283
+ background?: string;
284
+ decimals?: number;
285
+ properties?: string;
286
+ };
287
+
288
+ type Erc1155TokenBalance = {
289
+ /**
290
+ * A wallet or contract address in mixed-case checksum encoding.
291
+ */
292
+ address: string;
293
+ ercType: Erc1155TokenBalance.ercType;
294
+ tokenId: string;
295
+ tokenUri: string;
296
+ metadata: Erc1155TokenMetadata;
297
+ /**
298
+ * The evm chain id.
299
+ */
300
+ chainId: string;
301
+ /**
302
+ * The address balance for the token, in units specified by the `decimals` value for the contract.
303
+ */
304
+ balance: string;
305
+ };
306
+ declare namespace Erc1155TokenBalance {
307
+ enum ercType {
308
+ ERC_1155 = "ERC-1155"
309
+ }
310
+ }
311
+
312
+ type Erc721TokenMetadata = {
313
+ /**
314
+ * The metadata indexing status of the nft.
315
+ */
316
+ indexStatus: NftTokenMetadataStatus;
317
+ metadataLastUpdatedTimestamp?: number;
318
+ name?: string;
319
+ symbol?: string;
320
+ imageUri?: string;
321
+ description?: string;
322
+ animationUri?: string;
323
+ externalUrl?: string;
324
+ background?: string;
325
+ attributes?: string;
326
+ };
327
+
328
+ type Erc721TokenBalance = {
329
+ /**
330
+ * A wallet or contract address in mixed-case checksum encoding.
331
+ */
332
+ address: string;
333
+ /**
334
+ * The contract name.
335
+ */
336
+ name: string;
337
+ /**
338
+ * The contract symbol.
339
+ */
340
+ symbol: string;
341
+ ercType: Erc721TokenBalance.ercType;
342
+ tokenId: string;
343
+ tokenUri: string;
344
+ metadata: Erc721TokenMetadata;
345
+ /**
346
+ * A wallet or contract address in mixed-case checksum encoding.
347
+ */
348
+ ownerAddress?: string;
349
+ /**
350
+ * The evm chain id.
351
+ */
352
+ chainId: string;
353
+ };
354
+ declare namespace Erc721TokenBalance {
355
+ enum ercType {
356
+ ERC_721 = "ERC-721"
357
+ }
358
+ }
359
+
360
+ type ListCollectibleBalancesResponse = {
361
+ /**
362
+ * 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.
363
+ */
364
+ nextPageToken?: string;
365
+ /**
366
+ * The list of ERC-721 and ERC-1155 token balances for the address.
367
+ */
368
+ collectibleBalances: Array<(Erc721TokenBalance | Erc1155TokenBalance)>;
369
+ };
370
+
371
+ type ListErc1155BalancesResponse = {
372
+ /**
373
+ * 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.
374
+ */
375
+ nextPageToken?: string;
376
+ /**
377
+ * The list of ERC-1155 token balances for the address.
378
+ */
379
+ erc1155TokenBalances: Array<Erc1155TokenBalance>;
380
+ };
381
+
382
+ type Erc20TokenBalance = {
383
+ /**
384
+ * A wallet or contract address in mixed-case checksum encoding.
385
+ */
386
+ address: string;
387
+ /**
388
+ * The contract name.
389
+ */
390
+ name: string;
391
+ /**
392
+ * The contract symbol.
393
+ */
394
+ symbol: string;
395
+ /**
396
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
397
+ */
398
+ decimals: number;
399
+ /**
400
+ * The logo uri for the address.
401
+ */
402
+ logoUri?: string;
403
+ ercType: Erc20TokenBalance.ercType;
404
+ /**
405
+ * The token price, if available.
406
+ */
407
+ price?: Money;
408
+ /**
409
+ * The evm chain id.
410
+ */
411
+ chainId: string;
412
+ /**
413
+ * The address balance for the token, in units specified by the `decimals` value for the contract.
414
+ */
415
+ balance: string;
416
+ /**
417
+ * The monetary value of the balance, if a price is available for the token.
418
+ */
419
+ balanceValue?: Money;
420
+ };
421
+ declare namespace Erc20TokenBalance {
422
+ enum ercType {
423
+ ERC_20 = "ERC-20"
424
+ }
425
+ }
426
+
427
+ type ListErc20BalancesResponse = {
428
+ /**
429
+ * 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.
430
+ */
431
+ nextPageToken?: string;
432
+ /**
433
+ * The list of ERC-20 token balances for the address.
434
+ */
435
+ erc20TokenBalances: Array<Erc20TokenBalance>;
436
+ };
437
+
438
+ type ListErc721BalancesResponse = {
439
+ /**
440
+ * 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.
441
+ */
442
+ nextPageToken?: string;
443
+ /**
444
+ * The list of ERC-721 token balances for the address.
445
+ */
446
+ erc721TokenBalances: Array<Erc721TokenBalance>;
447
+ };
448
+
449
+ declare class EvmBalancesService {
450
+ readonly httpRequest: BaseHttpRequest;
451
+ constructor(httpRequest: BaseHttpRequest);
452
+ /**
453
+ * Get native token balance
454
+ * Gets native token balance of a wallet address.
455
+ *
456
+ * Balance at a given block can be retrieved with the `blockNumber` parameter.
457
+ * @returns GetNativeBalanceResponse
458
+ * @throws ApiError
459
+ */
460
+ getNativeBalance({ chainId, address, blockNumber, currency, }: {
461
+ /**
462
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
463
+ */
464
+ chainId: string;
465
+ /**
466
+ * A wallet address.
467
+ */
468
+ address: string;
469
+ /**
470
+ * The block number, if not defined the block number will be the latest block.
471
+ */
472
+ blockNumber?: string;
473
+ /**
474
+ * The currency that return values should use. Defaults to USD.
475
+ */
476
+ currency?: CurrencyCode;
477
+ }): CancelablePromise<GetNativeBalanceResponse>;
478
+ /**
479
+ * List ERC-20 balances
480
+ * Lists ERC-20 token balances of a wallet address.
481
+ *
482
+ * Balance at a given block can be retrieved with the `blockNumber` parameter.
483
+ *
484
+ * Balance for specific contracts can be retrieved with the `contractAddresses` parameter.
485
+ * @returns ListErc20BalancesResponse
486
+ * @throws ApiError
487
+ */
488
+ listErc20Balances({ chainId, address, blockNumber, pageToken, pageSize, contractAddresses, currency, }: {
489
+ /**
490
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
491
+ */
492
+ chainId: string;
493
+ /**
494
+ * A wallet address.
495
+ */
496
+ address: string;
497
+ /**
498
+ * The block number, if not defined the block number will be the latest block.
499
+ */
500
+ blockNumber?: string;
501
+ /**
502
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
503
+ */
504
+ pageToken?: string;
505
+ /**
506
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
507
+ */
508
+ pageSize?: number;
509
+ /**
510
+ * A comma separated list of contract addresses to filter by.
511
+ */
512
+ contractAddresses?: string;
513
+ /**
514
+ * The currency that return values should use. Defaults to USD.
515
+ */
516
+ currency?: CurrencyCode;
517
+ }): CancelablePromise<ListErc20BalancesResponse>;
518
+ /**
519
+ * List ERC-721 balances
520
+ * Lists ERC-721 token balances of a wallet address.
521
+ *
522
+ * Balance for a specific contract can be retrieved with the `contractAddress` parameter.
523
+ * @returns ListErc721BalancesResponse
524
+ * @throws ApiError
525
+ */
526
+ listErc721Balances({ chainId, address, pageToken, pageSize, contractAddress, }: {
527
+ /**
528
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
529
+ */
530
+ chainId: string;
531
+ /**
532
+ * A wallet address.
533
+ */
534
+ address: string;
535
+ /**
536
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
537
+ */
538
+ pageToken?: string;
539
+ /**
540
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
541
+ */
542
+ pageSize?: number;
543
+ /**
544
+ * A contract addresses to filter by.
545
+ */
546
+ contractAddress?: string;
547
+ }): CancelablePromise<ListErc721BalancesResponse>;
548
+ /**
549
+ * List ERC-1155 balances
550
+ * Lists ERC-1155 token balances of a wallet address.
551
+ *
552
+ * Balance at a given block can be retrieved with the `blockNumber` parameter.
553
+ *
554
+ * Balance for a specific contract can be retrieved with the `contractAddress` parameter.
555
+ * @returns ListErc1155BalancesResponse
556
+ * @throws ApiError
557
+ */
558
+ listErc1155Balances({ chainId, address, blockNumber, pageToken, pageSize, contractAddress, }: {
559
+ /**
560
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
561
+ */
562
+ chainId: string;
563
+ /**
564
+ * A wallet address.
565
+ */
566
+ address: string;
567
+ /**
568
+ * The block number, if not defined the block number will be the latest block.
569
+ */
570
+ blockNumber?: string;
571
+ /**
572
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
573
+ */
574
+ pageToken?: string;
575
+ /**
576
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
577
+ */
578
+ pageSize?: number;
579
+ /**
580
+ * A contract addresses to filter by.
581
+ */
582
+ contractAddress?: string;
583
+ }): CancelablePromise<ListErc1155BalancesResponse>;
584
+ /**
585
+ * List collectible (ERC-721/ERC-1155) balances
586
+ * Lists ERC-721 and ERC-1155 token balances of a wallet address.
587
+ *
588
+ * Balance for a specific contract can be retrieved with the `contractAddress` parameter.
589
+ * @returns ListCollectibleBalancesResponse
590
+ * @throws ApiError
591
+ */
592
+ listCollectibleBalances({ chainId, address, pageToken, pageSize, contractAddress, }: {
593
+ /**
594
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
595
+ */
596
+ chainId: string;
597
+ /**
598
+ * A wallet address.
599
+ */
600
+ address: string;
601
+ /**
602
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
603
+ */
604
+ pageToken?: string;
605
+ /**
606
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
607
+ */
608
+ pageSize?: number;
609
+ /**
610
+ * A contract addresses to filter by.
611
+ */
612
+ contractAddress?: string;
613
+ }): CancelablePromise<ListCollectibleBalancesResponse>;
614
+ }
615
+
616
+ type GetEvmBlockResponse = {
617
+ /**
618
+ * The block number on the chain.
619
+ */
620
+ blockNumber: string;
621
+ /**
622
+ * The block finality timestamp.
623
+ */
624
+ blockTimestamp: number;
625
+ /**
626
+ * The block hash identifier.
627
+ */
628
+ blockHash: string;
629
+ /**
630
+ * The number of evm transactions in the block.
631
+ */
632
+ txCount: number;
633
+ /**
634
+ * The base gas fee for a transaction to be included in the block.
635
+ */
636
+ baseFee: string;
637
+ /**
638
+ * The gas used for transactions in the block.
639
+ */
640
+ gasUsed: string;
641
+ /**
642
+ * The total gas limit set for transactions in the block.
643
+ */
644
+ gasLimit: string;
645
+ gasCost: string;
646
+ /**
647
+ * The hash of the parent block.
648
+ */
649
+ parentHash: string;
650
+ /**
651
+ * The amount of fees spent/burned for transactions in the block.
652
+ */
653
+ feesSpent: string;
654
+ /**
655
+ * The cumulative number of transactions for the chain including this block.
656
+ */
657
+ cumulativeTransactions: string;
658
+ };
659
+
660
+ type EvmBlock = {
661
+ /**
662
+ * The block number on the chain.
663
+ */
664
+ blockNumber: string;
665
+ /**
666
+ * The block finality timestamp.
667
+ */
668
+ blockTimestamp: number;
669
+ /**
670
+ * The block hash identifier.
671
+ */
672
+ blockHash: string;
673
+ /**
674
+ * The number of evm transactions in the block.
675
+ */
676
+ txCount: number;
677
+ /**
678
+ * The base gas fee for a transaction to be included in the block.
679
+ */
680
+ baseFee: string;
681
+ /**
682
+ * The gas used for transactions in the block.
683
+ */
684
+ gasUsed: string;
685
+ /**
686
+ * The total gas limit set for transactions in the block.
687
+ */
688
+ gasLimit: string;
689
+ gasCost: string;
690
+ /**
691
+ * The hash of the parent block.
692
+ */
693
+ parentHash: string;
694
+ /**
695
+ * The amount of fees spent/burned for transactions in the block.
696
+ */
697
+ feesSpent: string;
698
+ /**
699
+ * The cumulative number of transactions for the chain including this block.
700
+ */
701
+ cumulativeTransactions: string;
702
+ };
703
+
704
+ type ListEvmBlocksResponse = {
705
+ /**
706
+ * 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.
707
+ */
708
+ nextPageToken?: string;
709
+ blocks: Array<EvmBlock>;
710
+ };
711
+
712
+ declare class EvmBlocksService {
713
+ readonly httpRequest: BaseHttpRequest;
714
+ constructor(httpRequest: BaseHttpRequest);
715
+ /**
716
+ * List latest blocks
717
+ * Lists the latest indexed blocks on the EVM-compatible chain sorted in descending order by block timestamp.
718
+ * @returns ListEvmBlocksResponse
719
+ * @throws ApiError
720
+ */
721
+ getLatestBlocks({ chainId, pageToken, pageSize, }: {
722
+ /**
723
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
724
+ */
725
+ chainId: string;
726
+ /**
727
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
728
+ */
729
+ pageToken?: string;
730
+ /**
731
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
732
+ */
733
+ pageSize?: number;
734
+ }): CancelablePromise<ListEvmBlocksResponse>;
735
+ /**
736
+ * Get block
737
+ * Gets the details of an individual block on the EVM-compatible chain.
738
+ * @returns GetEvmBlockResponse
739
+ * @throws ApiError
740
+ */
741
+ getBlock({ chainId, blockId, }: {
742
+ /**
743
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
744
+ */
745
+ chainId: string;
746
+ /**
747
+ * A block identifier which is either a block number or the block hash.
748
+ */
749
+ blockId: string;
750
+ }): CancelablePromise<GetEvmBlockResponse>;
751
+ }
752
+
753
+ declare enum ChainStatus {
754
+ OK = "OK",
755
+ UNAVAILABLE = "UNAVAILABLE"
756
+ }
757
+
758
+ type NetworkToken = {
759
+ /**
760
+ * The contract name.
761
+ */
762
+ name: string;
763
+ /**
764
+ * The contract symbol.
765
+ */
766
+ symbol: string;
767
+ /**
768
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
769
+ */
770
+ decimals: number;
771
+ /**
772
+ * The logo uri for the address.
773
+ */
774
+ logoUri?: string;
775
+ description?: string;
776
+ };
777
+
778
+ type UtilityAddresses = {
779
+ multicall?: string;
780
+ };
781
+
782
+ declare enum VmName {
783
+ EVM = "EVM",
784
+ BITCOIN = "BITCOIN",
785
+ ETHEREUM = "ETHEREUM"
786
+ }
787
+
788
+ type GetChainResponse = {
789
+ chainId: string;
790
+ /**
791
+ * 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.
792
+ */
793
+ status: ChainStatus;
794
+ chainName: string;
795
+ description: string;
796
+ platformChainId?: string;
797
+ subnetId?: string;
798
+ vmId?: string;
799
+ vmName: VmName;
800
+ explorerUrl?: string;
801
+ rpcUrl: string;
802
+ wsUrl?: string;
803
+ isTestnet: boolean;
804
+ utilityAddresses?: UtilityAddresses;
805
+ networkToken: NetworkToken;
806
+ chainLogoUri?: string;
807
+ private?: boolean;
808
+ };
809
+
810
+ type ChainInfo = {
811
+ chainId: string;
812
+ /**
813
+ * 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.
814
+ */
815
+ status: ChainStatus;
816
+ chainName: string;
817
+ description: string;
818
+ platformChainId?: string;
819
+ subnetId?: string;
820
+ vmId?: string;
821
+ vmName: VmName;
822
+ explorerUrl?: string;
823
+ rpcUrl: string;
824
+ wsUrl?: string;
825
+ isTestnet: boolean;
826
+ utilityAddresses?: UtilityAddresses;
827
+ networkToken: NetworkToken;
828
+ chainLogoUri?: string;
829
+ private?: boolean;
830
+ };
831
+
832
+ type ListChainsResponse = {
833
+ chains: Array<ChainInfo>;
834
+ };
835
+
836
+ declare enum NetworkType {
837
+ MAINNET = "mainnet",
838
+ TESTNET = "testnet"
839
+ }
840
+
841
+ declare class EvmChainsService {
842
+ readonly httpRequest: BaseHttpRequest;
843
+ constructor(httpRequest: BaseHttpRequest);
844
+ /**
845
+ * List chains
846
+ * Lists the supported EVM-compatible chains. Filterable by network.
847
+ * @returns ListChainsResponse
848
+ * @throws ApiError
849
+ */
850
+ supportedChains({ network, }: {
851
+ /**
852
+ * mainnet or testnet.
853
+ */
854
+ network?: NetworkType;
855
+ }): CancelablePromise<ListChainsResponse>;
856
+ /**
857
+ * Get chain information
858
+ * Gets chain information for the EVM-compatible chain if supported by the api.
859
+ * @returns GetChainResponse
860
+ * @throws ApiError
861
+ */
862
+ getChainInfo({ chainId, }: {
863
+ /**
864
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
865
+ */
866
+ chainId: string;
867
+ }): CancelablePromise<GetChainResponse>;
868
+ }
869
+
870
+ type ImageAsset = {
871
+ assetId?: string;
872
+ /**
873
+ * OUTPUT ONLY
874
+ */
875
+ imageUri?: string;
876
+ };
877
+
878
+ type PricingProviders = {
879
+ coingeckoCoinId?: string;
880
+ };
881
+
882
+ declare enum ResourceLinkType {
883
+ BLOG = "Blog",
884
+ COIN_GECKO = "CoinGecko",
885
+ COIN_MARKET_CAP = "CoinMarketCap",
886
+ DISCORD = "Discord",
887
+ DOCUMENTATION = "Documentation",
888
+ FACEBOOK = "Facebook",
889
+ GITHUB = "Github",
890
+ INSTAGRAM = "Instagram",
891
+ LINKED_IN = "LinkedIn",
892
+ MEDIUM = "Medium",
893
+ REDDIT = "Reddit",
894
+ SUPPORT = "Support",
895
+ TELEGRAM = "Telegram",
896
+ TIK_TOK = "TikTok",
897
+ TWITTER = "Twitter",
898
+ WEBSITE = "Website",
899
+ WHITEPAPER = "Whitepaper",
900
+ YOUTUBE = "Youtube"
901
+ }
902
+
903
+ type ResourceLink = {
904
+ type: ResourceLinkType;
905
+ url: string;
906
+ };
907
+
908
+ type ContractSubmissionErc1155 = {
909
+ description?: string;
910
+ officialSite?: string;
911
+ email?: string;
912
+ logoAsset?: ImageAsset;
913
+ bannerAsset?: ImageAsset;
914
+ color?: string;
915
+ resourceLinks?: Array<ResourceLink>;
916
+ tags?: Array<string>;
917
+ /**
918
+ * The contract name.
919
+ */
920
+ name: string;
921
+ ercType: ContractSubmissionErc1155.ercType;
922
+ /**
923
+ * The contract symbol.
924
+ */
925
+ symbol: string;
926
+ pricingProviders?: PricingProviders;
927
+ };
928
+ declare namespace ContractSubmissionErc1155 {
929
+ enum ercType {
930
+ ERC_1155 = "ERC-1155"
931
+ }
932
+ }
933
+
934
+ type ContractSubmissionErc20 = {
935
+ description?: string;
936
+ officialSite?: string;
937
+ email?: string;
938
+ logoAsset?: ImageAsset;
939
+ bannerAsset?: ImageAsset;
940
+ color?: string;
941
+ resourceLinks?: Array<ResourceLink>;
942
+ tags?: Array<string>;
943
+ /**
944
+ * The contract name.
945
+ */
946
+ name: string;
947
+ ercType: ContractSubmissionErc20.ercType;
948
+ /**
949
+ * The contract symbol.
950
+ */
951
+ symbol: string;
952
+ pricingProviders?: PricingProviders;
953
+ };
954
+ declare namespace ContractSubmissionErc20 {
955
+ enum ercType {
956
+ ERC_20 = "ERC-20"
957
+ }
958
+ }
959
+
960
+ type ContractSubmissionErc721 = {
961
+ description?: string;
962
+ officialSite?: string;
963
+ email?: string;
964
+ logoAsset?: ImageAsset;
965
+ bannerAsset?: ImageAsset;
966
+ color?: string;
967
+ resourceLinks?: Array<ResourceLink>;
968
+ tags?: Array<string>;
969
+ /**
970
+ * The contract name.
971
+ */
972
+ name: string;
973
+ ercType: ContractSubmissionErc721.ercType;
974
+ /**
975
+ * The contract symbol.
976
+ */
977
+ symbol: string;
978
+ };
979
+ declare namespace ContractSubmissionErc721 {
980
+ enum ercType {
981
+ ERC_721 = "ERC-721"
982
+ }
983
+ }
984
+
985
+ type ContractSubmissionUnknown = {
986
+ description?: string;
987
+ officialSite?: string;
988
+ email?: string;
989
+ logoAsset?: ImageAsset;
990
+ bannerAsset?: ImageAsset;
991
+ color?: string;
992
+ resourceLinks?: Array<ResourceLink>;
993
+ tags?: Array<string>;
994
+ /**
995
+ * The contract name.
996
+ */
997
+ name: string;
998
+ ercType: ContractSubmissionUnknown.ercType;
999
+ };
1000
+ declare namespace ContractSubmissionUnknown {
1001
+ enum ercType {
1002
+ UNKNOWN = "UNKNOWN"
1003
+ }
1004
+ }
1005
+
1006
+ type ContractSubmissionBody = {
1007
+ contract: (ContractSubmissionErc1155 | ContractSubmissionErc20 | ContractSubmissionErc721 | ContractSubmissionUnknown);
1008
+ };
1009
+
1010
+ type ContractDeploymentDetails = {
1011
+ txHash: string;
1012
+ /**
1013
+ * The address that initiated the transaction which deployed this contract.
1014
+ */
1015
+ deployerAddress: string;
1016
+ /**
1017
+ * 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.
1018
+ */
1019
+ deployerContractAddress?: string;
1020
+ };
1021
+
1022
+ type Erc1155Contract = {
1023
+ /**
1024
+ * The contract name.
1025
+ */
1026
+ name?: string;
1027
+ description?: string;
1028
+ officialSite?: string;
1029
+ email?: string;
1030
+ logoAsset?: ImageAsset;
1031
+ bannerAsset?: ImageAsset;
1032
+ color?: string;
1033
+ resourceLinks?: Array<ResourceLink>;
1034
+ tags?: Array<string>;
1035
+ /**
1036
+ * A wallet or contract address in mixed-case checksum encoding.
1037
+ */
1038
+ address: string;
1039
+ deploymentDetails: ContractDeploymentDetails;
1040
+ ercType: Erc1155Contract.ercType;
1041
+ /**
1042
+ * The contract symbol.
1043
+ */
1044
+ symbol?: string;
1045
+ pricingProviders?: PricingProviders;
1046
+ };
1047
+ declare namespace Erc1155Contract {
1048
+ enum ercType {
1049
+ ERC_1155 = "ERC-1155"
1050
+ }
1051
+ }
1052
+
1053
+ type Erc20Contract = {
1054
+ /**
1055
+ * The contract name.
1056
+ */
1057
+ name?: string;
1058
+ description?: string;
1059
+ officialSite?: string;
1060
+ email?: string;
1061
+ logoAsset?: ImageAsset;
1062
+ bannerAsset?: ImageAsset;
1063
+ color?: string;
1064
+ resourceLinks?: Array<ResourceLink>;
1065
+ tags?: Array<string>;
1066
+ /**
1067
+ * A wallet or contract address in mixed-case checksum encoding.
1068
+ */
1069
+ address: string;
1070
+ deploymentDetails: ContractDeploymentDetails;
1071
+ ercType: Erc20Contract.ercType;
1072
+ /**
1073
+ * The contract symbol.
1074
+ */
1075
+ symbol?: string;
1076
+ /**
1077
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
1078
+ */
1079
+ decimals: number;
1080
+ pricingProviders?: PricingProviders;
1081
+ };
1082
+ declare namespace Erc20Contract {
1083
+ enum ercType {
1084
+ ERC_20 = "ERC-20"
1085
+ }
1086
+ }
1087
+
1088
+ type Erc721Contract = {
1089
+ /**
1090
+ * The contract name.
1091
+ */
1092
+ name?: string;
1093
+ description?: string;
1094
+ officialSite?: string;
1095
+ email?: string;
1096
+ logoAsset?: ImageAsset;
1097
+ bannerAsset?: ImageAsset;
1098
+ color?: string;
1099
+ resourceLinks?: Array<ResourceLink>;
1100
+ tags?: Array<string>;
1101
+ /**
1102
+ * A wallet or contract address in mixed-case checksum encoding.
1103
+ */
1104
+ address: string;
1105
+ deploymentDetails: ContractDeploymentDetails;
1106
+ ercType: Erc721Contract.ercType;
1107
+ /**
1108
+ * The contract symbol.
1109
+ */
1110
+ symbol?: string;
1111
+ };
1112
+ declare namespace Erc721Contract {
1113
+ enum ercType {
1114
+ ERC_721 = "ERC-721"
1115
+ }
1116
+ }
1117
+
1118
+ type UnknownContract = {
1119
+ /**
1120
+ * The contract name.
1121
+ */
1122
+ name?: string;
1123
+ description?: string;
1124
+ officialSite?: string;
1125
+ email?: string;
1126
+ logoAsset?: ImageAsset;
1127
+ bannerAsset?: ImageAsset;
1128
+ color?: string;
1129
+ resourceLinks?: Array<ResourceLink>;
1130
+ tags?: Array<string>;
1131
+ /**
1132
+ * A wallet or contract address in mixed-case checksum encoding.
1133
+ */
1134
+ address: string;
1135
+ deploymentDetails: ContractDeploymentDetails;
1136
+ ercType: UnknownContract.ercType;
1137
+ };
1138
+ declare namespace UnknownContract {
1139
+ enum ercType {
1140
+ UNKNOWN = "UNKNOWN"
1141
+ }
1142
+ }
1143
+
1144
+ type UpdateContractResponse = {
1145
+ contract: (UnknownContract | Erc20Contract | Erc721Contract | Erc1155Contract);
1146
+ };
1147
+
1148
+ declare class EvmContractsService {
1149
+ readonly httpRequest: BaseHttpRequest;
1150
+ constructor(httpRequest: BaseHttpRequest);
1151
+ /**
1152
+ * Get contract metadata
1153
+ * Gets metadata about the contract at the given address.
1154
+ * @returns any
1155
+ * @throws ApiError
1156
+ */
1157
+ getContractMetadata({ chainId, address, }: {
1158
+ /**
1159
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
1160
+ */
1161
+ chainId: string;
1162
+ /**
1163
+ * Contract address on the relevant chain.
1164
+ */
1165
+ address: string;
1166
+ }): CancelablePromise<(Erc721Contract | Erc1155Contract | Erc20Contract | UnknownContract)>;
1167
+ /**
1168
+ * Update contract information
1169
+ * Update contract information. Updates will be reviewed by the Ava Labs team before they are published.
1170
+ * @returns UpdateContractResponse
1171
+ * @throws ApiError
1172
+ */
1173
+ updateContractInfo({ chainId, address, requestBody, }: {
1174
+ /**
1175
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
1176
+ */
1177
+ chainId: string;
1178
+ /**
1179
+ * Contract address on the relevant chain.
1180
+ */
1181
+ address: string;
1182
+ requestBody: ContractSubmissionBody;
1183
+ }): CancelablePromise<UpdateContractResponse>;
1184
+ }
1185
+
1186
+ type Erc1155Token = {
1187
+ /**
1188
+ * A wallet or contract address in mixed-case checksum encoding.
1189
+ */
1190
+ address: string;
1191
+ ercType: Erc1155Token.ercType;
1192
+ tokenId: string;
1193
+ tokenUri: string;
1194
+ metadata: Erc1155TokenMetadata;
1195
+ };
1196
+ declare namespace Erc1155Token {
1197
+ enum ercType {
1198
+ ERC_1155 = "ERC-1155"
1199
+ }
1200
+ }
1201
+
1202
+ type RichAddress = {
1203
+ /**
1204
+ * The contract name.
1205
+ */
1206
+ name?: string;
1207
+ /**
1208
+ * The contract symbol.
1209
+ */
1210
+ symbol?: string;
1211
+ /**
1212
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
1213
+ */
1214
+ decimals?: number;
1215
+ /**
1216
+ * The logo uri for the address.
1217
+ */
1218
+ logoUri?: string;
1219
+ /**
1220
+ * A wallet or contract address in mixed-case checksum encoding.
1221
+ */
1222
+ address: string;
1223
+ };
1224
+
1225
+ type Erc1155TransferDetails = {
1226
+ from: RichAddress;
1227
+ to: RichAddress;
1228
+ logIndex: number;
1229
+ value: string;
1230
+ erc1155Token: Erc1155Token;
1231
+ };
1232
+
1233
+ type Erc20Token = {
1234
+ /**
1235
+ * A wallet or contract address in mixed-case checksum encoding.
1236
+ */
1237
+ address: string;
1238
+ /**
1239
+ * The contract name.
1240
+ */
1241
+ name: string;
1242
+ /**
1243
+ * The contract symbol.
1244
+ */
1245
+ symbol: string;
1246
+ /**
1247
+ * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
1248
+ */
1249
+ decimals: number;
1250
+ /**
1251
+ * The logo uri for the address.
1252
+ */
1253
+ logoUri?: string;
1254
+ ercType: Erc20Token.ercType;
1255
+ /**
1256
+ * The token price, if available.
1257
+ */
1258
+ price?: Money;
1259
+ };
1260
+ declare namespace Erc20Token {
1261
+ enum ercType {
1262
+ ERC_20 = "ERC-20"
1263
+ }
1264
+ }
1265
+
1266
+ type Erc20TransferDetails = {
1267
+ from: RichAddress;
1268
+ to: RichAddress;
1269
+ logIndex: number;
1270
+ value: string;
1271
+ erc20Token: Erc20Token;
1272
+ };
1273
+
1274
+ type Erc721Token = {
1275
+ /**
1276
+ * A wallet or contract address in mixed-case checksum encoding.
1277
+ */
1278
+ address: string;
1279
+ /**
1280
+ * The contract name.
1281
+ */
1282
+ name: string;
1283
+ /**
1284
+ * The contract symbol.
1285
+ */
1286
+ symbol: string;
1287
+ ercType: Erc721Token.ercType;
1288
+ tokenId: string;
1289
+ tokenUri: string;
1290
+ metadata: Erc721TokenMetadata;
1291
+ /**
1292
+ * A wallet or contract address in mixed-case checksum encoding.
1293
+ */
1294
+ ownerAddress?: string;
1295
+ };
1296
+ declare namespace Erc721Token {
1297
+ enum ercType {
1298
+ ERC_721 = "ERC-721"
1299
+ }
1300
+ }
1301
+
1302
+ type Erc721TransferDetails = {
1303
+ from: RichAddress;
1304
+ to: RichAddress;
1305
+ logIndex: number;
1306
+ erc721Token: Erc721Token;
1307
+ };
1308
+
1309
+ declare enum TransactionMethodType {
1310
+ NATIVE_TRANSFER = "NATIVE_TRANSFER",
1311
+ CONTRACT_CALL = "CONTRACT_CALL",
1312
+ CONTRACT_CREATION = "CONTRACT_CREATION"
1313
+ }
1314
+
1315
+ type Method = {
1316
+ /**
1317
+ * 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.
1318
+ */
1319
+ callType: TransactionMethodType;
1320
+ /**
1321
+ * The contract method hash identifier. The method hash is only set if the `callType` is `CONTRACT_CALL`.
1322
+ */
1323
+ methodHash: string;
1324
+ /**
1325
+ * 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'.
1326
+ */
1327
+ methodName?: string;
1328
+ };
1329
+
1330
+ type FullNativeTransactionDetails = {
1331
+ /**
1332
+ * The block number on the chain.
1333
+ */
1334
+ blockNumber: string;
1335
+ /**
1336
+ * The block finality timestamp.
1337
+ */
1338
+ blockTimestamp: number;
1339
+ /**
1340
+ * The block hash identifier.
1341
+ */
1342
+ blockHash: string;
1343
+ /**
1344
+ * The index at which the transaction occured in the block (0-indexed).
1345
+ */
1346
+ blockIndex: number;
1347
+ /**
1348
+ * The transaction hash identifier.
1349
+ */
1350
+ txHash: string;
1351
+ /**
1352
+ * The transaction status, which is either 0 (failed) or 1 (successful).
1353
+ */
1354
+ txStatus: string;
1355
+ /**
1356
+ * The transaction type.
1357
+ */
1358
+ txType: number;
1359
+ /**
1360
+ * The gas limit set for the transaction.
1361
+ */
1362
+ gasLimit: string;
1363
+ /**
1364
+ * The amount of gas used.
1365
+ */
1366
+ gasUsed: string;
1367
+ /**
1368
+ * The gas price denominated by the number of decimals of the native token.
1369
+ */
1370
+ gasPrice: string;
1371
+ /**
1372
+ * The nonce used by the sender of the transaction.
1373
+ */
1374
+ nonce: string;
1375
+ from: RichAddress;
1376
+ to: RichAddress;
1377
+ method?: Method;
1378
+ value: string;
1379
+ /**
1380
+ * The data sent for the transaction.
1381
+ */
1382
+ input: string;
1383
+ baseFeePerGas: string;
1384
+ maxFeePerGas?: string;
1385
+ maxPriorityFeePerGas?: string;
1386
+ };
1387
+
1388
+ declare enum InternalTransactionOpCall {
1389
+ UNKNOWN = "UNKNOWN",
1390
+ CALL = "CALL",
1391
+ CREATE = "CREATE",
1392
+ CREATE2 = "CREATE2",
1393
+ CALLCODE = "CALLCODE",
1394
+ DELEGATECALL = "DELEGATECALL",
1395
+ STATICCALL = "STATICCALL"
1396
+ }
1397
+
1398
+ type InternalTransactionDetails = {
1399
+ from: RichAddress;
1400
+ to: RichAddress;
1401
+ internalTxType: InternalTransactionOpCall;
1402
+ value: string;
1403
+ /**
1404
+ * True if the internal transaction was reverted.
1405
+ */
1406
+ isReverted: boolean;
1407
+ gasUsed: string;
1408
+ gasLimit: string;
1409
+ };
1410
+
1411
+ type NetworkTokenDetails = {
1412
+ networkToken: NetworkToken;
1413
+ /**
1414
+ * The current token price, if available.
1415
+ */
1416
+ currentPrice?: Money;
1417
+ /**
1418
+ * 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.
1419
+ */
1420
+ historicalPrice?: Money;
1421
+ };
1422
+
1423
+ type GetTransactionResponse = {
1424
+ /**
1425
+ * The list of ERC-20 transfers.
1426
+ */
1427
+ erc20Transfers?: Array<Erc20TransferDetails>;
1428
+ /**
1429
+ * The list of ERC-721 transfers.
1430
+ */
1431
+ erc721Transfers?: Array<Erc721TransferDetails>;
1432
+ /**
1433
+ * The list of ERC-1155 transfers.
1434
+ */
1435
+ erc1155Transfers?: Array<Erc1155TransferDetails>;
1436
+ /**
1437
+ * 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.
1438
+ */
1439
+ internalTransactions?: Array<InternalTransactionDetails>;
1440
+ networkTokenDetails: NetworkTokenDetails;
1441
+ nativeTransaction: FullNativeTransactionDetails;
1442
+ };
1443
+
1444
+ type ListContractsResponse = {
1445
+ /**
1446
+ * 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.
1447
+ */
1448
+ nextPageToken?: string;
1449
+ contracts: Array<(Erc721Contract | Erc1155Contract | Erc20Contract | UnknownContract)>;
1450
+ };
1451
+
1452
+ type Erc1155Transfer = {
1453
+ /**
1454
+ * The block number on the chain.
1455
+ */
1456
+ blockNumber: string;
1457
+ /**
1458
+ * The block finality timestamp.
1459
+ */
1460
+ blockTimestamp: number;
1461
+ /**
1462
+ * The block hash identifier.
1463
+ */
1464
+ blockHash: string;
1465
+ /**
1466
+ * The transaction hash identifier.
1467
+ */
1468
+ txHash: string;
1469
+ from: RichAddress;
1470
+ to: RichAddress;
1471
+ logIndex: number;
1472
+ value: string;
1473
+ erc1155Token: Erc1155Token;
1474
+ };
1475
+
1476
+ type ListErc1155TransactionsResponse = {
1477
+ /**
1478
+ * 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.
1479
+ */
1480
+ nextPageToken?: string;
1481
+ transactions: Array<Erc1155Transfer>;
1482
+ };
1483
+
1484
+ type Erc20Transfer = {
1485
+ /**
1486
+ * The block number on the chain.
1487
+ */
1488
+ blockNumber: string;
1489
+ /**
1490
+ * The block finality timestamp.
1491
+ */
1492
+ blockTimestamp: number;
1493
+ /**
1494
+ * The block hash identifier.
1495
+ */
1496
+ blockHash: string;
1497
+ /**
1498
+ * The transaction hash identifier.
1499
+ */
1500
+ txHash: string;
1501
+ from: RichAddress;
1502
+ to: RichAddress;
1503
+ logIndex: number;
1504
+ value: string;
1505
+ erc20Token: Erc20Token;
1506
+ };
1507
+
1508
+ type ListErc20TransactionsResponse = {
1509
+ /**
1510
+ * 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.
1511
+ */
1512
+ nextPageToken?: string;
1513
+ transactions: Array<Erc20Transfer>;
1514
+ };
1515
+
1516
+ type Erc721Transfer = {
1517
+ /**
1518
+ * The block number on the chain.
1519
+ */
1520
+ blockNumber: string;
1521
+ /**
1522
+ * The block finality timestamp.
1523
+ */
1524
+ blockTimestamp: number;
1525
+ /**
1526
+ * The block hash identifier.
1527
+ */
1528
+ blockHash: string;
1529
+ /**
1530
+ * The transaction hash identifier.
1531
+ */
1532
+ txHash: string;
1533
+ from: RichAddress;
1534
+ to: RichAddress;
1535
+ logIndex: number;
1536
+ erc721Token: Erc721Token;
1537
+ };
1538
+
1539
+ type ListErc721TransactionsResponse = {
1540
+ /**
1541
+ * 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.
1542
+ */
1543
+ nextPageToken?: string;
1544
+ transactions: Array<Erc721Transfer>;
1545
+ };
1546
+
1547
+ type InternalTransaction = {
1548
+ /**
1549
+ * The block number on the chain.
1550
+ */
1551
+ blockNumber: string;
1552
+ /**
1553
+ * The block finality timestamp.
1554
+ */
1555
+ blockTimestamp: number;
1556
+ /**
1557
+ * The block hash identifier.
1558
+ */
1559
+ blockHash: string;
1560
+ /**
1561
+ * The transaction hash identifier.
1562
+ */
1563
+ txHash: string;
1564
+ from: RichAddress;
1565
+ to: RichAddress;
1566
+ internalTxType: InternalTransactionOpCall;
1567
+ value: string;
1568
+ /**
1569
+ * True if the internal transaction was reverted.
1570
+ */
1571
+ isReverted: boolean;
1572
+ gasUsed: string;
1573
+ gasLimit: string;
1574
+ };
1575
+
1576
+ type ListInternalTransactionsResponse = {
1577
+ /**
1578
+ * 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.
1579
+ */
1580
+ nextPageToken?: string;
1581
+ transactions: Array<InternalTransaction>;
1582
+ };
1583
+
1584
+ type NativeTransaction = {
1585
+ /**
1586
+ * The block number on the chain.
1587
+ */
1588
+ blockNumber: string;
1589
+ /**
1590
+ * The block finality timestamp.
1591
+ */
1592
+ blockTimestamp: number;
1593
+ /**
1594
+ * The block hash identifier.
1595
+ */
1596
+ blockHash: string;
1597
+ /**
1598
+ * The index at which the transaction occured in the block (0-indexed).
1599
+ */
1600
+ blockIndex: number;
1601
+ /**
1602
+ * The transaction hash identifier.
1603
+ */
1604
+ txHash: string;
1605
+ /**
1606
+ * The transaction status, which is either 0 (failed) or 1 (successful).
1607
+ */
1608
+ txStatus: string;
1609
+ /**
1610
+ * The transaction type.
1611
+ */
1612
+ txType: number;
1613
+ /**
1614
+ * The gas limit set for the transaction.
1615
+ */
1616
+ gasLimit: string;
1617
+ /**
1618
+ * The amount of gas used.
1619
+ */
1620
+ gasUsed: string;
1621
+ /**
1622
+ * The gas price denominated by the number of decimals of the native token.
1623
+ */
1624
+ gasPrice: string;
1625
+ /**
1626
+ * The nonce used by the sender of the transaction.
1627
+ */
1628
+ nonce: string;
1629
+ from: RichAddress;
1630
+ to: RichAddress;
1631
+ method?: Method;
1632
+ value: string;
1633
+ };
1634
+
1635
+ type ListNativeTransactionsResponse = {
1636
+ /**
1637
+ * 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.
1638
+ */
1639
+ nextPageToken?: string;
1640
+ transactions: Array<NativeTransaction>;
1641
+ };
1642
+
1643
+ type TransactionDetails = {
1644
+ /**
1645
+ * The native (top-level) transaction details.
1646
+ */
1647
+ nativeTransaction: NativeTransaction;
1648
+ /**
1649
+ * The list of ERC-20 transfers.
1650
+ */
1651
+ erc20Transfers?: Array<Erc20TransferDetails>;
1652
+ /**
1653
+ * The list of ERC-721 transfers.
1654
+ */
1655
+ erc721Transfers?: Array<Erc721TransferDetails>;
1656
+ /**
1657
+ * The list of ERC-1155 transfers.
1658
+ */
1659
+ erc1155Transfers?: Array<Erc1155TransferDetails>;
1660
+ /**
1661
+ * 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.
1662
+ */
1663
+ internalTransactions?: Array<InternalTransactionDetails>;
1664
+ };
1665
+
1666
+ type ListTransactionDetailsResponse = {
1667
+ /**
1668
+ * 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.
1669
+ */
1670
+ nextPageToken?: string;
1671
+ transactions: Array<TransactionDetails>;
1672
+ };
1673
+
1674
+ type ListTransfersResponse = {
1675
+ /**
1676
+ * 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.
1677
+ */
1678
+ nextPageToken?: string;
1679
+ transfers: (Array<Erc20Transfer> | Array<Erc721Transfer> | Array<Erc1155Transfer>);
1680
+ };
1681
+
1682
+ declare enum SortOrder {
1683
+ ASC = "asc",
1684
+ DESC = "desc"
1685
+ }
1686
+
1687
+ declare enum TransactionStatus {
1688
+ FAILED = "failed",
1689
+ SUCCESS = "success"
1690
+ }
1691
+
1692
+ declare class EvmTransactionsService {
1693
+ readonly httpRequest: BaseHttpRequest;
1694
+ constructor(httpRequest: BaseHttpRequest);
1695
+ /**
1696
+ * Get deployment transaction
1697
+ * If the address is a smart contract, returns the transaction in which it was deployed.
1698
+ * @returns GetTransactionResponse
1699
+ * @throws ApiError
1700
+ */
1701
+ getDeploymentTransaction({ chainId, address, currency, }: {
1702
+ /**
1703
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
1704
+ */
1705
+ chainId: string;
1706
+ /**
1707
+ * Contract address on the relevant chain.
1708
+ */
1709
+ address: string;
1710
+ /**
1711
+ * The currency that return values should use. Defaults to USD.
1712
+ */
1713
+ currency?: CurrencyCode;
1714
+ }): CancelablePromise<GetTransactionResponse>;
1715
+ /**
1716
+ * List deployed contracts
1717
+ * Lists all contracts deployed by the given address.
1718
+ * @returns ListContractsResponse
1719
+ * @throws ApiError
1720
+ */
1721
+ listContractDeployments({ chainId, address, pageToken, pageSize, }: {
1722
+ /**
1723
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
1724
+ */
1725
+ chainId: string;
1726
+ /**
1727
+ * A wallet address.
1728
+ */
1729
+ address: string;
1730
+ /**
1731
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1732
+ */
1733
+ pageToken?: string;
1734
+ /**
1735
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1736
+ */
1737
+ pageSize?: number;
1738
+ }): CancelablePromise<ListContractsResponse>;
1739
+ /**
1740
+ * List ERC transfers
1741
+ * Lists ERC transfers for an ERC-20, ERC-721, or ERC-1155 contract address.
1742
+ * @returns ListTransfersResponse
1743
+ * @throws ApiError
1744
+ */
1745
+ listTransfers({ chainId, address, startBlock, endBlock, pageToken, pageSize, }: {
1746
+ /**
1747
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
1748
+ */
1749
+ chainId: string;
1750
+ /**
1751
+ * A wallet address.
1752
+ */
1753
+ address: string;
1754
+ /**
1755
+ * 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.
1756
+ */
1757
+ startBlock?: number;
1758
+ /**
1759
+ * 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.
1760
+ */
1761
+ endBlock?: number;
1762
+ /**
1763
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1764
+ */
1765
+ pageToken?: string;
1766
+ /**
1767
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1768
+ */
1769
+ pageSize?: number;
1770
+ }): CancelablePromise<ListTransfersResponse>;
1771
+ /**
1772
+ * List transactions
1773
+ * 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.
1774
+ *
1775
+ * Filterable by block ranges.
1776
+ * @returns ListTransactionDetailsResponse
1777
+ * @throws ApiError
1778
+ */
1779
+ listTransactions({ chainId, address, pageToken, pageSize, startBlock, endBlock, sortOrder, }: {
1780
+ /**
1781
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
1782
+ */
1783
+ chainId: string;
1784
+ /**
1785
+ * A wallet address.
1786
+ */
1787
+ address: string;
1788
+ /**
1789
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1790
+ */
1791
+ pageToken?: string;
1792
+ /**
1793
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1794
+ */
1795
+ pageSize?: number;
1796
+ /**
1797
+ * 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.
1798
+ */
1799
+ startBlock?: number;
1800
+ /**
1801
+ * 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.
1802
+ */
1803
+ endBlock?: number;
1804
+ /**
1805
+ * 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.
1806
+ */
1807
+ sortOrder?: SortOrder;
1808
+ }): CancelablePromise<ListTransactionDetailsResponse>;
1809
+ /**
1810
+ * List native transactions
1811
+ * Lists native transactions for an address. Filterable by block range.
1812
+ * @returns ListNativeTransactionsResponse
1813
+ * @throws ApiError
1814
+ */
1815
+ listNativeTransactions({ chainId, address, startBlock, endBlock, pageToken, pageSize, }: {
1816
+ /**
1817
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
1818
+ */
1819
+ chainId: string;
1820
+ /**
1821
+ * A wallet address.
1822
+ */
1823
+ address: string;
1824
+ /**
1825
+ * 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.
1826
+ */
1827
+ startBlock?: number;
1828
+ /**
1829
+ * 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.
1830
+ */
1831
+ endBlock?: number;
1832
+ /**
1833
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1834
+ */
1835
+ pageToken?: string;
1836
+ /**
1837
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1838
+ */
1839
+ pageSize?: number;
1840
+ }): CancelablePromise<ListNativeTransactionsResponse>;
1841
+ /**
1842
+ * List ERC-20 transfers
1843
+ * Lists ERC-20 transfers for an address. Filterable by block range.
1844
+ * @returns ListErc20TransactionsResponse
1845
+ * @throws ApiError
1846
+ */
1847
+ listErc20Transactions({ chainId, address, startBlock, endBlock, pageToken, pageSize, }: {
1848
+ /**
1849
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
1850
+ */
1851
+ chainId: string;
1852
+ /**
1853
+ * A wallet address.
1854
+ */
1855
+ address: string;
1856
+ /**
1857
+ * 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.
1858
+ */
1859
+ startBlock?: number;
1860
+ /**
1861
+ * 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.
1862
+ */
1863
+ endBlock?: number;
1864
+ /**
1865
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1866
+ */
1867
+ pageToken?: string;
1868
+ /**
1869
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1870
+ */
1871
+ pageSize?: number;
1872
+ }): CancelablePromise<ListErc20TransactionsResponse>;
1873
+ /**
1874
+ * List ERC-721 transfers
1875
+ * Lists ERC-721 transfers for an address. Filterable by block range.
1876
+ * @returns ListErc721TransactionsResponse
1877
+ * @throws ApiError
1878
+ */
1879
+ listErc721Transactions({ chainId, address, startBlock, endBlock, pageToken, pageSize, }: {
1880
+ /**
1881
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
1882
+ */
1883
+ chainId: string;
1884
+ /**
1885
+ * A wallet address.
1886
+ */
1887
+ address: string;
1888
+ /**
1889
+ * 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.
1890
+ */
1891
+ startBlock?: number;
1892
+ /**
1893
+ * 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.
1894
+ */
1895
+ endBlock?: number;
1896
+ /**
1897
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1898
+ */
1899
+ pageToken?: string;
1900
+ /**
1901
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1902
+ */
1903
+ pageSize?: number;
1904
+ }): CancelablePromise<ListErc721TransactionsResponse>;
1905
+ /**
1906
+ * List ERC-1155 transfers
1907
+ * Lists ERC-1155 transfers for an address. Filterable by block range.
1908
+ * @returns ListErc1155TransactionsResponse
1909
+ * @throws ApiError
1910
+ */
1911
+ listErc1155Transactions({ chainId, address, startBlock, endBlock, pageToken, pageSize, }: {
1912
+ /**
1913
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
1914
+ */
1915
+ chainId: string;
1916
+ /**
1917
+ * A wallet address.
1918
+ */
1919
+ address: string;
1920
+ /**
1921
+ * 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.
1922
+ */
1923
+ startBlock?: number;
1924
+ /**
1925
+ * 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.
1926
+ */
1927
+ endBlock?: number;
1928
+ /**
1929
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1930
+ */
1931
+ pageToken?: string;
1932
+ /**
1933
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1934
+ */
1935
+ pageSize?: number;
1936
+ }): CancelablePromise<ListErc1155TransactionsResponse>;
1937
+ /**
1938
+ * List internal transactions
1939
+ * Returns a list of internal transactions for an address and chain. Filterable by block range.
1940
+ *
1941
+ * 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.
1942
+ * @returns ListInternalTransactionsResponse
1943
+ * @throws ApiError
1944
+ */
1945
+ listInternalTransactions({ chainId, address, startBlock, endBlock, pageToken, pageSize, }: {
1946
+ /**
1947
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
1948
+ */
1949
+ chainId: string;
1950
+ /**
1951
+ * A wallet address.
1952
+ */
1953
+ address: string;
1954
+ /**
1955
+ * 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.
1956
+ */
1957
+ startBlock?: number;
1958
+ /**
1959
+ * 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.
1960
+ */
1961
+ endBlock?: number;
1962
+ /**
1963
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
1964
+ */
1965
+ pageToken?: string;
1966
+ /**
1967
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1968
+ */
1969
+ pageSize?: number;
1970
+ }): CancelablePromise<ListInternalTransactionsResponse>;
1971
+ /**
1972
+ * Get transaction
1973
+ * Gets the details of a single transaction.
1974
+ * @returns GetTransactionResponse
1975
+ * @throws ApiError
1976
+ */
1977
+ getTransaction({ chainId, txHash, }: {
1978
+ /**
1979
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
1980
+ */
1981
+ chainId: string;
1982
+ /**
1983
+ * A transaction hash.
1984
+ */
1985
+ txHash: string;
1986
+ }): CancelablePromise<GetTransactionResponse>;
1987
+ /**
1988
+ * List transactions for a block
1989
+ * Lists the transactions that occured in a given block.
1990
+ * @returns ListNativeTransactionsResponse
1991
+ * @throws ApiError
1992
+ */
1993
+ getTransactionsForBlock({ chainId, blockId, }: {
1994
+ /**
1995
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
1996
+ */
1997
+ chainId: string;
1998
+ /**
1999
+ * A block identifier which is either a block number or the block hash.
2000
+ */
2001
+ blockId: string;
2002
+ }): CancelablePromise<ListNativeTransactionsResponse>;
2003
+ /**
2004
+ * List latest transactions
2005
+ * Lists the latest transactions. Filterable by status.
2006
+ * @returns ListNativeTransactionsResponse
2007
+ * @throws ApiError
2008
+ */
2009
+ listLatestTransactions({ chainId, pageToken, pageSize, status, }: {
2010
+ /**
2011
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
2012
+ */
2013
+ chainId: string;
2014
+ /**
2015
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2016
+ */
2017
+ pageToken?: string;
2018
+ /**
2019
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2020
+ */
2021
+ pageSize?: number;
2022
+ /**
2023
+ * A status filter for listed transactions.
2024
+ */
2025
+ status?: TransactionStatus;
2026
+ }): CancelablePromise<ListNativeTransactionsResponse>;
2027
+ }
2028
+
2029
+ declare class HealthCheckService {
2030
+ readonly httpRequest: BaseHttpRequest;
2031
+ constructor(httpRequest: BaseHttpRequest);
2032
+ /**
2033
+ * Get the health of the service
2034
+ * @returns any The Health Check is successful
2035
+ * @throws ApiError
2036
+ */
2037
+ healthCheck(): CancelablePromise<{
2038
+ status?: string;
2039
+ info?: Record<string, Record<string, string>> | null;
2040
+ error?: Record<string, Record<string, string>> | null;
2041
+ details?: Record<string, Record<string, string>>;
2042
+ }>;
2043
+ }
2044
+
2045
+ type ListNftTokens = {
2046
+ /**
2047
+ * 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.
2048
+ */
2049
+ nextPageToken?: string;
2050
+ tokens: (Array<Erc721Token> | Array<Erc1155Token>);
2051
+ };
2052
+
2053
+ declare class NfTsService {
2054
+ readonly httpRequest: BaseHttpRequest;
2055
+ constructor(httpRequest: BaseHttpRequest);
2056
+ /**
2057
+ * Reindex NFT metadata
2058
+ * Triggers reindexing of token metadata for an NFT token. Reindexing can only be called once per hour for each NFT token.
2059
+ * @returns any
2060
+ * @throws ApiError
2061
+ */
2062
+ reindexNft({ chainId, address, tokenId, }: {
2063
+ /**
2064
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
2065
+ */
2066
+ chainId: string;
2067
+ /**
2068
+ * Contract address on the relevant chain.
2069
+ */
2070
+ address: string;
2071
+ /**
2072
+ * TokenId on the contract
2073
+ */
2074
+ tokenId: string;
2075
+ }): CancelablePromise<any>;
2076
+ /**
2077
+ * List tokens
2078
+ * Lists tokens for an NFT contract.
2079
+ * @returns ListNftTokens
2080
+ * @throws ApiError
2081
+ */
2082
+ listTokens({ chainId, address, pageToken, pageSize, }: {
2083
+ /**
2084
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
2085
+ */
2086
+ chainId: string;
2087
+ /**
2088
+ * Contract address on the relevant chain.
2089
+ */
2090
+ address: string;
2091
+ /**
2092
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2093
+ */
2094
+ pageToken?: string;
2095
+ /**
2096
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2097
+ */
2098
+ pageSize?: number;
2099
+ }): CancelablePromise<ListNftTokens>;
2100
+ /**
2101
+ * Get token details
2102
+ * Gets token details for a specific token of an NFT contract.
2103
+ * @returns any
2104
+ * @throws ApiError
2105
+ */
2106
+ getTokenDetails({ chainId, address, tokenId, }: {
2107
+ /**
2108
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
2109
+ */
2110
+ chainId: string;
2111
+ /**
2112
+ * Contract address on the relevant chain.
2113
+ */
2114
+ address: string;
2115
+ /**
2116
+ * TokenId on the contract
2117
+ */
2118
+ tokenId: string;
2119
+ }): CancelablePromise<(Erc721Token | Erc1155Token)>;
2120
+ }
2121
+
2122
+ type EvmNetworkOptions = {
2123
+ addresses: Array<string>;
2124
+ includeChains: Array<string>;
2125
+ };
2126
+
2127
+ type CreateEvmTransactionExportRequest = {
2128
+ type: CreateEvmTransactionExportRequest.type;
2129
+ firstDate: string;
2130
+ lastDate: string;
2131
+ /**
2132
+ * @deprecated
2133
+ */
2134
+ startDate: string;
2135
+ /**
2136
+ * @deprecated
2137
+ */
2138
+ endDate: string;
2139
+ options: EvmNetworkOptions;
2140
+ };
2141
+ declare namespace CreateEvmTransactionExportRequest {
2142
+ enum type {
2143
+ TRANSACTION_EXPORT_EVM = "TRANSACTION_EXPORT_EVM"
2144
+ }
2145
+ }
2146
+
2147
+ type PrimaryNetworkOptions = {
2148
+ addresses: Array<string>;
2149
+ cChainEvmAddresses?: Array<string>;
2150
+ includeChains: Array<'11111111111111111111111111111111LpoYY' | '2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM' | '2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm' | '2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5' | 'yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp' | 'p-chain' | 'x-chain' | 'c-chain'>;
2151
+ };
2152
+
2153
+ type CreatePrimaryNetworkTransactionExportRequest = {
2154
+ type: CreatePrimaryNetworkTransactionExportRequest.type;
2155
+ firstDate: string;
2156
+ lastDate: string;
2157
+ /**
2158
+ * @deprecated
2159
+ */
2160
+ startDate: string;
2161
+ /**
2162
+ * @deprecated
2163
+ */
2164
+ endDate: string;
2165
+ options: PrimaryNetworkOptions;
2166
+ };
2167
+ declare namespace CreatePrimaryNetworkTransactionExportRequest {
2168
+ enum type {
2169
+ TRANSACTION_EXPORT_PRIMARY_NETWORK = "TRANSACTION_EXPORT_PRIMARY_NETWORK"
2170
+ }
2171
+ }
2172
+
2173
+ declare enum OperationStatus {
2174
+ RUNNING = "RUNNING",
2175
+ COMPLETED = "COMPLETED",
2176
+ COMPLETED_WITH_WARNING = "COMPLETED_WITH_WARNING",
2177
+ FAILED = "FAILED"
2178
+ }
2179
+
2180
+ declare enum OperationType {
2181
+ TRANSACTION_EXPORT_EVM = "TRANSACTION_EXPORT_EVM",
2182
+ TRANSACTION_EXPORT_PRIMARY_NETWORK = "TRANSACTION_EXPORT_PRIMARY_NETWORK"
2183
+ }
2184
+
2185
+ declare enum OperationStatusCode {
2186
+ ERR_INVALID_REQUEST = "ErrInvalidRequest",
2187
+ ERR_INTERNAL = "ErrInternal",
2188
+ WARN_TRUNCATED_EXPORT = "WarnTruncatedExport"
2189
+ }
2190
+
2191
+ type TransactionExportMetadata = {
2192
+ code?: OperationStatusCode;
2193
+ /**
2194
+ * File download URL. Provided only for COMPLETED and COMPLETED_WITH_WARNING operations.
2195
+ */
2196
+ downloadUrl?: string;
2197
+ /**
2198
+ * 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'.
2199
+ */
2200
+ nextDate?: string;
2201
+ };
2202
+
2203
+ type OperationStatusResponse = {
2204
+ operationId: string;
2205
+ operationType: OperationType;
2206
+ operationStatus: OperationStatus;
2207
+ message?: string;
2208
+ metadata: TransactionExportMetadata;
2209
+ createdAtTimestamp: number;
2210
+ updatedAtTimestamp: number;
2211
+ };
2212
+
2213
+ declare class OperationsService {
2214
+ readonly httpRequest: BaseHttpRequest;
2215
+ constructor(httpRequest: BaseHttpRequest);
2216
+ /**
2217
+ * Get operation
2218
+ * Gets operation details for the given operation id.
2219
+ * @returns OperationStatusResponse
2220
+ * @throws ApiError
2221
+ */
2222
+ getOperationResult({ operationId, }: {
2223
+ /**
2224
+ * UUID of given operation
2225
+ */
2226
+ operationId: string;
2227
+ }): CancelablePromise<OperationStatusResponse>;
2228
+ /**
2229
+ * Create transaction export operation
2230
+ * Trigger a transaction export operation with given parameters.
2231
+ *
2232
+ * 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.
2233
+ * @returns OperationStatusResponse
2234
+ * @throws ApiError
2235
+ */
2236
+ postTransactionExportJob({ requestBody, }: {
2237
+ requestBody: (CreateEvmTransactionExportRequest | CreatePrimaryNetworkTransactionExportRequest);
2238
+ }): CancelablePromise<OperationStatusResponse>;
2239
+ }
2240
+
2241
+ declare enum BlockchainIds {
2242
+ _11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY",
2243
+ _2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
2244
+ _2JVSBOINJ9C2J33VNTVZ_YT_VJNZD_N2NKIWW_KJCUM_HUWEB5DB_BRM = "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm",
2245
+ _2Q9E4R6MU3U68N_U1F_YJGB_R6JVWR_RX36COHP_AX5UQXSE55X1Q5 = "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5",
2246
+ Y_H8D7TH_NJKXMTKUV2JG_BA4P1RN3QPR4P_PR7QYNFCDO_S6K6HWP = "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp"
2247
+ }
2248
+
2249
+ type ChainAddressChainIdMap = {
2250
+ address: string;
2251
+ blockchainIds: Array<BlockchainIds>;
2252
+ };
2253
+
2254
+ type ChainAddressChainIdMapListResponse = {
2255
+ addresses: Array<ChainAddressChainIdMap>;
2256
+ };
2257
+
2258
+ declare enum DelegationStatusType {
2259
+ COMPLETED = "completed",
2260
+ ACTIVE = "active",
2261
+ PENDING = "pending"
2262
+ }
2263
+
2264
+ type DelegatorsDetails = {
2265
+ delegatorCount: number;
2266
+ totalAmountStaked: string;
2267
+ };
2268
+
2269
+ type StakingDistribution = {
2270
+ version: string;
2271
+ amountStaked: string;
2272
+ validatorCount: number;
2273
+ };
2274
+
2275
+ type ValidatorsDetails = {
2276
+ validatorCount: number;
2277
+ totalAmountStaked: string;
2278
+ estimatedAnnualStakingReward: string;
2279
+ stakingDistributionByVersion: Array<StakingDistribution>;
2280
+ stakingRatio: string;
2281
+ };
2282
+
2283
+ type GetNetworkDetailsResponse = {
2284
+ validatorDetails: ValidatorsDetails;
2285
+ delegatorDetails: DelegatorsDetails;
2286
+ };
2287
+
2288
+ type Blockchain = {
2289
+ createBlockTimestamp: number;
2290
+ createBlockNumber: string;
2291
+ blockchainId: string;
2292
+ vmId: string;
2293
+ subnetId: string;
2294
+ blockchainName: string;
2295
+ };
2296
+
2297
+ type ListBlockchainsResponse = {
2298
+ /**
2299
+ * 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.
2300
+ */
2301
+ nextPageToken?: string;
2302
+ blockchains: Array<Blockchain>;
2303
+ };
2304
+
2305
+ type ActiveDelegatorDetails = {
2306
+ txHash: string;
2307
+ nodeId: string;
2308
+ rewardAddresses: Array<string>;
2309
+ amountDelegated: string;
2310
+ delegationFee: string;
2311
+ startTimestamp: number;
2312
+ endTimestamp: number;
2313
+ estimatedGrossReward: string;
2314
+ estimatedNetReward: string;
2315
+ delegationStatus: ActiveDelegatorDetails.delegationStatus;
2316
+ };
2317
+ declare namespace ActiveDelegatorDetails {
2318
+ enum delegationStatus {
2319
+ ACTIVE = "active"
2320
+ }
2321
+ }
2322
+
2323
+ type CompletedDelegatorDetails = {
2324
+ txHash: string;
2325
+ nodeId: string;
2326
+ rewardAddresses: Array<string>;
2327
+ amountDelegated: string;
2328
+ delegationFee: string;
2329
+ startTimestamp: number;
2330
+ endTimestamp: number;
2331
+ grossReward: string;
2332
+ netReward: string;
2333
+ delegationStatus: CompletedDelegatorDetails.delegationStatus;
2334
+ };
2335
+ declare namespace CompletedDelegatorDetails {
2336
+ enum delegationStatus {
2337
+ COMPLETED = "completed"
2338
+ }
2339
+ }
2340
+
2341
+ type PendingDelegatorDetails = {
2342
+ txHash: string;
2343
+ nodeId: string;
2344
+ rewardAddresses: Array<string>;
2345
+ amountDelegated: string;
2346
+ delegationFee: string;
2347
+ startTimestamp: number;
2348
+ endTimestamp: number;
2349
+ estimatedGrossReward: string;
2350
+ estimatedNetReward: string;
2351
+ delegationStatus: PendingDelegatorDetails.delegationStatus;
2352
+ };
2353
+ declare namespace PendingDelegatorDetails {
2354
+ enum delegationStatus {
2355
+ PENDING = "pending"
2356
+ }
2357
+ }
2358
+
2359
+ type ListDelegatorDetailsResponse = {
2360
+ /**
2361
+ * 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.
2362
+ */
2363
+ nextPageToken?: string;
2364
+ /**
2365
+ * The list of Delegator Details.
2366
+ */
2367
+ delegators: Array<(CompletedDelegatorDetails | ActiveDelegatorDetails | PendingDelegatorDetails)>;
2368
+ };
2369
+
2370
+ type BlockchainInfo = {
2371
+ blockchainId: string;
2372
+ };
2373
+
2374
+ type Subnet = {
2375
+ createBlockTimestamp: number;
2376
+ createBlockIndex: string;
2377
+ subnetId: string;
2378
+ ownerAddresses: Array<string>;
2379
+ threshold: number;
2380
+ locktime: number;
2381
+ blockchains: Array<BlockchainInfo>;
2382
+ };
2383
+
2384
+ type ListSubnetsResponse = {
2385
+ /**
2386
+ * 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.
2387
+ */
2388
+ nextPageToken?: string;
2389
+ subnets: Array<Subnet>;
2390
+ };
2391
+
2392
+ type Rewards = {
2393
+ validationRewardAmount: string;
2394
+ delegationRewardAmount: string;
2395
+ rewardAddresses?: Array<string>;
2396
+ rewardTxHash?: string;
2397
+ };
2398
+
2399
+ type ValidatorHealthDetails = {
2400
+ /**
2401
+ * Percent of requests responded to in last polling.
2402
+ */
2403
+ reachabilityPercent: number;
2404
+ /**
2405
+ * Percent of requests benched on the P-Chain in last polling.
2406
+ */
2407
+ benchedPChainRequestsPercent: number;
2408
+ /**
2409
+ * Percentage of requests benched on the X-Chain in last polling.
2410
+ */
2411
+ benchedXChainRequestsPercent: number;
2412
+ /**
2413
+ * Percentage of requests benched on the C-Chain in last polling.
2414
+ */
2415
+ benchedCChainRequestsPercent: number;
2416
+ };
2417
+
2418
+ type ActiveValidatorDetails = {
2419
+ txHash: string;
2420
+ nodeId: string;
2421
+ subnetId: string;
2422
+ amountStaked: string;
2423
+ delegationFee?: string;
2424
+ startTimestamp: number;
2425
+ endTimestamp: number;
2426
+ stakePercentage: number;
2427
+ delegatorCount: number;
2428
+ amountDelegated?: string;
2429
+ uptimePerformance: number;
2430
+ avalancheGoVersion?: string;
2431
+ delegationCapacity?: string;
2432
+ potentialRewards: Rewards;
2433
+ validationStatus: ActiveValidatorDetails.validationStatus;
2434
+ validatorHealth: ValidatorHealthDetails;
2435
+ };
2436
+ declare namespace ActiveValidatorDetails {
2437
+ enum validationStatus {
2438
+ ACTIVE = "active"
2439
+ }
2440
+ }
2441
+
2442
+ type CompletedValidatorDetails = {
2443
+ txHash: string;
2444
+ nodeId: string;
2445
+ subnetId: string;
2446
+ amountStaked: string;
2447
+ delegationFee?: string;
2448
+ startTimestamp: number;
2449
+ endTimestamp: number;
2450
+ delegatorCount: number;
2451
+ rewards: Rewards;
2452
+ validationStatus: CompletedValidatorDetails.validationStatus;
2453
+ };
2454
+ declare namespace CompletedValidatorDetails {
2455
+ enum validationStatus {
2456
+ COMPLETED = "completed"
2457
+ }
2458
+ }
2459
+
2460
+ type PendingValidatorDetails = {
2461
+ txHash: string;
2462
+ nodeId: string;
2463
+ subnetId: string;
2464
+ amountStaked: string;
2465
+ delegationFee?: string;
2466
+ startTimestamp: number;
2467
+ endTimestamp: number;
2468
+ validationStatus: PendingValidatorDetails.validationStatus;
2469
+ };
2470
+ declare namespace PendingValidatorDetails {
2471
+ enum validationStatus {
2472
+ PENDING = "pending"
2473
+ }
2474
+ }
2475
+
2476
+ type RemovedValidatorDetails = {
2477
+ txHash: string;
2478
+ nodeId: string;
2479
+ subnetId: string;
2480
+ amountStaked: string;
2481
+ delegationFee?: string;
2482
+ startTimestamp: number;
2483
+ endTimestamp: number;
2484
+ removeTxHash: string;
2485
+ removeTimestamp: number;
2486
+ validationStatus: RemovedValidatorDetails.validationStatus;
2487
+ };
2488
+ declare namespace RemovedValidatorDetails {
2489
+ enum validationStatus {
2490
+ REMOVED = "removed"
2491
+ }
2492
+ }
2493
+
2494
+ type ListValidatorDetailsResponse = {
2495
+ /**
2496
+ * 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.
2497
+ */
2498
+ nextPageToken?: string;
2499
+ /**
2500
+ * The list of validator Details.
2501
+ */
2502
+ validators: Array<(CompletedValidatorDetails | ActiveValidatorDetails | PendingValidatorDetails | RemovedValidatorDetails)>;
2503
+ };
2504
+
2505
+ declare enum Network {
2506
+ MAINNET = "mainnet",
2507
+ FUJI = "fuji"
2508
+ }
2509
+
2510
+ declare enum ValidationStatusType {
2511
+ COMPLETED = "completed",
2512
+ ACTIVE = "active",
2513
+ PENDING = "pending",
2514
+ REMOVED = "removed"
2515
+ }
2516
+
2517
+ declare enum PrimaryNetworkAssetCap {
2518
+ FIXED = "fixed",
2519
+ VARIABLE = "variable"
2520
+ }
2521
+
2522
+ declare enum PrimaryNetworkAssetType {
2523
+ SECP256K1 = "secp256k1",
2524
+ NFT = "nft"
2525
+ }
2526
+
2527
+ type XChainAssetDetails = {
2528
+ /**
2529
+ * Unique ID for an asset.
2530
+ */
2531
+ assetId: string;
2532
+ /**
2533
+ * Name of this asset.
2534
+ */
2535
+ name: string;
2536
+ /**
2537
+ * Symbol for this asset (max 4 characters).
2538
+ */
2539
+ symbol: string;
2540
+ /**
2541
+ * Denomination of this asset to represent fungibility.
2542
+ */
2543
+ denomination: number;
2544
+ /**
2545
+ * Type of asset like SECP256K1 or NFT.
2546
+ */
2547
+ type: PrimaryNetworkAssetType;
2548
+ /**
2549
+ * Timestamp in seconds this asset was created on.
2550
+ */
2551
+ createdAtTimestamp: number;
2552
+ /**
2553
+ * Cap represents if an asset is a variable or fixed cap asset.
2554
+ */
2555
+ cap: PrimaryNetworkAssetCap;
2556
+ };
2557
+
2558
+ declare enum XChainId {
2559
+ _2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
2560
+ _2JVSBOINJ9C2J33VNTVZ_YT_VJNZD_N2NKIWW_KJCUM_HUWEB5DB_BRM = "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm",
2561
+ X_CHAIN = "x-chain"
2562
+ }
2563
+
2564
+ declare class PrimaryNetworkService {
2565
+ readonly httpRequest: BaseHttpRequest;
2566
+ constructor(httpRequest: BaseHttpRequest);
2567
+ /**
2568
+ * Get asset details
2569
+ * Gets asset details corresponding to the given asset id on the X-Chain.
2570
+ * @returns XChainAssetDetails
2571
+ * @throws ApiError
2572
+ */
2573
+ getAssetDetails({ blockchainId, network, assetId, }: {
2574
+ /**
2575
+ * A primary network blockchain id or alias.
2576
+ */
2577
+ blockchainId: XChainId;
2578
+ /**
2579
+ * Either mainnet or a testnet.
2580
+ */
2581
+ network: Network;
2582
+ /**
2583
+ * Asset ID for any asset on X-Chain
2584
+ */
2585
+ assetId: string;
2586
+ }): CancelablePromise<XChainAssetDetails>;
2587
+ /**
2588
+ * Get chain interactions for addresses
2589
+ * 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.
2590
+ * @returns ChainAddressChainIdMapListResponse
2591
+ * @throws ApiError
2592
+ */
2593
+ getChainIdsForAddresses({ addresses, network, }: {
2594
+ /**
2595
+ * 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".
2596
+ */
2597
+ addresses: string;
2598
+ /**
2599
+ * Either mainnet or a testnet.
2600
+ */
2601
+ network: Network;
2602
+ }): CancelablePromise<ChainAddressChainIdMapListResponse>;
2603
+ /**
2604
+ * Get network details
2605
+ * Gets network details such as validator and delegator stats.
2606
+ * @returns GetNetworkDetailsResponse
2607
+ * @throws ApiError
2608
+ */
2609
+ getNetworkDetails({ network, }: {
2610
+ /**
2611
+ * Either mainnet or a testnet.
2612
+ */
2613
+ network: Network;
2614
+ }): CancelablePromise<GetNetworkDetailsResponse>;
2615
+ /**
2616
+ * List blockchains
2617
+ * Lists all blockchains registered on the network.
2618
+ * @returns ListBlockchainsResponse
2619
+ * @throws ApiError
2620
+ */
2621
+ listBlockchains({ network, pageToken, pageSize, sortOrder, }: {
2622
+ /**
2623
+ * Either mainnet or a testnet.
2624
+ */
2625
+ network: Network;
2626
+ /**
2627
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2628
+ */
2629
+ pageToken?: string;
2630
+ /**
2631
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2632
+ */
2633
+ pageSize?: number;
2634
+ /**
2635
+ * 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.
2636
+ */
2637
+ sortOrder?: SortOrder;
2638
+ }): CancelablePromise<ListBlockchainsResponse>;
2639
+ /**
2640
+ * List subnets
2641
+ * Lists all subnets registered on the network.
2642
+ * @returns ListSubnetsResponse
2643
+ * @throws ApiError
2644
+ */
2645
+ listSubnets({ network, pageToken, pageSize, sortOrder, }: {
2646
+ /**
2647
+ * Either mainnet or a testnet.
2648
+ */
2649
+ network: Network;
2650
+ /**
2651
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2652
+ */
2653
+ pageToken?: string;
2654
+ /**
2655
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2656
+ */
2657
+ pageSize?: number;
2658
+ /**
2659
+ * 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.
2660
+ */
2661
+ sortOrder?: SortOrder;
2662
+ }): CancelablePromise<ListSubnetsResponse>;
2663
+ /**
2664
+ * List validators
2665
+ * Lists details for validators. By default, returns details for all validators. Filterable by validator node ids and minimum delegation capacity.
2666
+ * @returns ListValidatorDetailsResponse
2667
+ * @throws ApiError
2668
+ */
2669
+ listValidators({ network, pageToken, pageSize, nodeIds, sortOrder, validationStatus, minDelegationCapacity, maxDelegationCapacity, minTimeRemaining, maxTimeRemaining, minFeePercentage, maxFeePercentage, subnetId, }: {
2670
+ /**
2671
+ * Either mainnet or a testnet.
2672
+ */
2673
+ network: Network;
2674
+ /**
2675
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2676
+ */
2677
+ pageToken?: string;
2678
+ /**
2679
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2680
+ */
2681
+ pageSize?: number;
2682
+ /**
2683
+ * A comma separated list of node ids to filter by.
2684
+ */
2685
+ nodeIds?: string;
2686
+ /**
2687
+ * 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.
2688
+ */
2689
+ sortOrder?: SortOrder;
2690
+ /**
2691
+ * Validation status of the node.
2692
+ */
2693
+ validationStatus?: ValidationStatusType;
2694
+ /**
2695
+ * The minimum delegation capacity, in nAVAX, used to filter the set of nodes being returned. Accepts values between 0 and 720,000,000,000,000,000
2696
+ */
2697
+ minDelegationCapacity?: string;
2698
+ /**
2699
+ * The maximum delegation capacity, in nAVAX, used to filter the set of nodes being returned. Accepts values between 0 and 720,000,000,000,000,000.
2700
+ */
2701
+ maxDelegationCapacity?: string;
2702
+ /**
2703
+ * The minimum validation time remaining, in seconds, used to filter the set of nodes being returned.
2704
+ */
2705
+ minTimeRemaining?: number;
2706
+ /**
2707
+ * The maximum validation time remaining, in seconds, used to filter the set of nodes being returned.
2708
+ */
2709
+ maxTimeRemaining?: number;
2710
+ /**
2711
+ * The minimum fee percentage, used to filter the set of nodes being returned.If this field is populated no subnet validations will be returned, as their fee percentage is null, since subnet delegations are not supported. Default is 2, as per the Avalanche spec.
2712
+ */
2713
+ minFeePercentage?: number;
2714
+ /**
2715
+ * The maximum fee percentage, used to filter the set of nodes being returned. If this field is populated no subnet validations will be returned, as their fee percentage is null, since subnet delegations are not supported. Default is 100.
2716
+ */
2717
+ maxFeePercentage?: number;
2718
+ /**
2719
+ * The subnet ID to filter by. If not provided, then all subnets will be returned.
2720
+ */
2721
+ subnetId?: string;
2722
+ }): CancelablePromise<ListValidatorDetailsResponse>;
2723
+ /**
2724
+ * Get single validator details
2725
+ * List validator details for a single validator. Filterable by validation status.
2726
+ * @returns ListValidatorDetailsResponse
2727
+ * @throws ApiError
2728
+ */
2729
+ getSingleValidatorDetails({ network, nodeId, pageToken, pageSize, sortOrder, validationStatus, }: {
2730
+ /**
2731
+ * Either mainnet or a testnet.
2732
+ */
2733
+ network: Network;
2734
+ /**
2735
+ * A primary network (P or X chain) nodeId.
2736
+ */
2737
+ nodeId: string;
2738
+ /**
2739
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2740
+ */
2741
+ pageToken?: string;
2742
+ /**
2743
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2744
+ */
2745
+ pageSize?: number;
2746
+ /**
2747
+ * 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.
2748
+ */
2749
+ sortOrder?: SortOrder;
2750
+ /**
2751
+ * Validation status of the node.
2752
+ */
2753
+ validationStatus?: ValidationStatusType;
2754
+ }): CancelablePromise<ListValidatorDetailsResponse>;
2755
+ /**
2756
+ * List delegators
2757
+ * Lists details for delegators.
2758
+ * @returns ListDelegatorDetailsResponse
2759
+ * @throws ApiError
2760
+ */
2761
+ listDelegators({ network, pageToken, pageSize, rewardAddresses, sortOrder, delegationStatus, nodeIds, }: {
2762
+ /**
2763
+ * Either mainnet or a testnet.
2764
+ */
2765
+ network: Network;
2766
+ /**
2767
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
2768
+ */
2769
+ pageToken?: string;
2770
+ /**
2771
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
2772
+ */
2773
+ pageSize?: number;
2774
+ /**
2775
+ * A comma separated list of reward addresses to filter by.
2776
+ */
2777
+ rewardAddresses?: string;
2778
+ /**
2779
+ * 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.
2780
+ */
2781
+ sortOrder?: SortOrder;
2782
+ /**
2783
+ * Delegation status of the node.
2784
+ */
2785
+ delegationStatus?: DelegationStatusType;
2786
+ /**
2787
+ * A comma separated list of node ids to filter by.
2788
+ */
2789
+ nodeIds?: string;
2790
+ }): CancelablePromise<ListDelegatorDetailsResponse>;
2791
+ }
2792
+
2793
+ declare enum BlockchainId {
2794
+ _11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY",
2795
+ _2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
2796
+ _2JVSBOINJ9C2J33VNTVZ_YT_VJNZD_N2NKIWW_KJCUM_HUWEB5DB_BRM = "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm",
2797
+ _2Q9E4R6MU3U68N_U1F_YJGB_R6JVWR_RX36COHP_AX5UQXSE55X1Q5 = "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5",
2798
+ Y_H8D7TH_NJKXMTKUV2JG_BA4P1RN3QPR4P_PR7QYNFCDO_S6K6HWP = "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp",
2799
+ P_CHAIN = "p-chain",
2800
+ X_CHAIN = "x-chain",
2801
+ C_CHAIN = "c-chain"
2802
+ }
2803
+
2804
+ type CChainSharedAssetBalance = {
2805
+ /**
2806
+ * Unique ID for an asset.
2807
+ */
2808
+ assetId: string;
2809
+ /**
2810
+ * Name of this asset.
2811
+ */
2812
+ name: string;
2813
+ /**
2814
+ * Symbol for this asset (max 4 characters).
2815
+ */
2816
+ symbol: string;
2817
+ /**
2818
+ * Denomination of this asset to represent fungibility.
2819
+ */
2820
+ denomination: number;
2821
+ /**
2822
+ * Type of asset like SECP256K1 or NFT.
2823
+ */
2824
+ type: PrimaryNetworkAssetType;
2825
+ /**
2826
+ * Amount of the asset.
2827
+ */
2828
+ amount: string;
2829
+ utxoCount: number;
2830
+ sharedWithChainId: string;
2831
+ };
2832
+
2833
+ type CChainAtomicBalances = {
2834
+ atomicMemoryUnlocked: Array<CChainSharedAssetBalance>;
2835
+ atomicMemoryLocked: Array<CChainSharedAssetBalance>;
2836
+ };
2837
+
2838
+ declare enum PrimaryNetwork {
2839
+ MAINNET = "mainnet",
2840
+ FUJI = "fuji"
2841
+ }
2842
+
2843
+ declare enum PrimaryNetworkChainName {
2844
+ P_CHAIN = "p-chain",
2845
+ X_CHAIN = "x-chain",
2846
+ C_CHAIN = "c-chain"
2847
+ }
2848
+
2849
+ type PrimaryNetworkChainInfo = {
2850
+ chainName: PrimaryNetworkChainName;
2851
+ network: PrimaryNetwork;
2852
+ };
2853
+
2854
+ type ListCChainAtomicBalancesResponse = {
2855
+ balances: CChainAtomicBalances;
2856
+ chainInfo: PrimaryNetworkChainInfo;
2857
+ };
2858
+
2859
+ type Asset = {
2860
+ /**
2861
+ * Unique ID for an asset.
2862
+ */
2863
+ assetId: string;
2864
+ /**
2865
+ * Name of this asset.
2866
+ */
2867
+ name: string;
2868
+ /**
2869
+ * Symbol for this asset (max 4 characters).
2870
+ */
2871
+ symbol: string;
2872
+ /**
2873
+ * Denomination of this asset to represent fungibility.
2874
+ */
2875
+ denomination: number;
2876
+ /**
2877
+ * Type of asset like SECP256K1 or NFT.
2878
+ */
2879
+ type: PrimaryNetworkAssetType;
2880
+ /**
2881
+ * Amount of the asset.
2882
+ */
2883
+ amount: string;
2884
+ };
2885
+
2886
+ type PChainSharedAsset = {
2887
+ /**
2888
+ * Unique ID for an asset.
2889
+ */
2890
+ assetId: string;
2891
+ /**
2892
+ * Name of this asset.
2893
+ */
2894
+ name: string;
2895
+ /**
2896
+ * Symbol for this asset (max 4 characters).
2897
+ */
2898
+ symbol: string;
2899
+ /**
2900
+ * Denomination of this asset to represent fungibility.
2901
+ */
2902
+ denomination: number;
2903
+ /**
2904
+ * Type of asset like SECP256K1 or NFT.
2905
+ */
2906
+ type: PrimaryNetworkAssetType;
2907
+ /**
2908
+ * Amount of the asset.
2909
+ */
2910
+ amount: string;
2911
+ sharedWithChainId: string;
2912
+ status: string;
2913
+ };
2914
+
2915
+ type PChainBalance = {
2916
+ /**
2917
+ * 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.
2918
+ */
2919
+ unlockedUnstaked: Array<Asset>;
2920
+ /**
2921
+ * 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.
2922
+ */
2923
+ unlockedStaked: Array<Asset>;
2924
+ /**
2925
+ * 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.
2926
+ */
2927
+ lockedPlatform: Array<Asset>;
2928
+ /**
2929
+ * 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.
2930
+ */
2931
+ lockedStakeable: Array<Asset>;
2932
+ /**
2933
+ * 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.
2934
+ */
2935
+ lockedStaked: Array<Asset>;
2936
+ /**
2937
+ * 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.
2938
+ */
2939
+ pendingStaked: Array<Asset>;
2940
+ /**
2941
+ * 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.
2942
+ */
2943
+ atomicMemoryUnlocked: Array<PChainSharedAsset>;
2944
+ /**
2945
+ * 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.
2946
+ */
2947
+ atomicMemoryLocked: Array<PChainSharedAsset>;
2948
+ };
2949
+
2950
+ type ListPChainBalancesResponse = {
2951
+ balances: PChainBalance;
2952
+ chainInfo: PrimaryNetworkChainInfo;
2953
+ };
2954
+
2955
+ type XChainAssetBalance = {
2956
+ /**
2957
+ * Unique ID for an asset.
2958
+ */
2959
+ assetId: string;
2960
+ /**
2961
+ * Name of this asset.
2962
+ */
2963
+ name: string;
2964
+ /**
2965
+ * Symbol for this asset (max 4 characters).
2966
+ */
2967
+ symbol: string;
2968
+ /**
2969
+ * Denomination of this asset to represent fungibility.
2970
+ */
2971
+ denomination: number;
2972
+ /**
2973
+ * Type of asset like SECP256K1 or NFT.
2974
+ */
2975
+ type: PrimaryNetworkAssetType;
2976
+ /**
2977
+ * Amount of the asset.
2978
+ */
2979
+ amount: string;
2980
+ utxoCount: number;
2981
+ };
2982
+
2983
+ type XChainSharedAssetBalance = {
2984
+ /**
2985
+ * Unique ID for an asset.
2986
+ */
2987
+ assetId: string;
2988
+ /**
2989
+ * Name of this asset.
2990
+ */
2991
+ name: string;
2992
+ /**
2993
+ * Symbol for this asset (max 4 characters).
2994
+ */
2995
+ symbol: string;
2996
+ /**
2997
+ * Denomination of this asset to represent fungibility.
2998
+ */
2999
+ denomination: number;
3000
+ /**
3001
+ * Type of asset like SECP256K1 or NFT.
3002
+ */
3003
+ type: PrimaryNetworkAssetType;
3004
+ /**
3005
+ * Amount of the asset.
3006
+ */
3007
+ amount: string;
3008
+ utxoCount: number;
3009
+ sharedWithChainId: string;
3010
+ };
3011
+
3012
+ type XChainBalances = {
3013
+ /**
3014
+ * A list of objects containing X-chain Asset balance information.
3015
+ */
3016
+ locked: Array<XChainAssetBalance>;
3017
+ /**
3018
+ * A list of objects containing X-chain Asset balance information.
3019
+ */
3020
+ unlocked: Array<XChainAssetBalance>;
3021
+ atomicMemoryUnlocked: Array<XChainSharedAssetBalance>;
3022
+ atomicMemoryLocked: Array<XChainSharedAssetBalance>;
3023
+ };
3024
+
3025
+ type ListXChainBalancesResponse = {
3026
+ balances: XChainBalances;
3027
+ chainInfo: PrimaryNetworkChainInfo;
3028
+ };
3029
+
3030
+ declare class PrimaryNetworkBalancesService {
3031
+ readonly httpRequest: BaseHttpRequest;
3032
+ constructor(httpRequest: BaseHttpRequest);
3033
+ /**
3034
+ * Get balances
3035
+ * Gets primary network balances for one of the Primary Network chains for the supplied addresses.
3036
+ *
3037
+ * C-Chain balances returned are only the shared atomic memory balance. For EVM balance, use the `/v1/chains/:chainId/addresses/:addressId/balances:getNative` endpoint.
3038
+ * @returns any
3039
+ * @throws ApiError
3040
+ */
3041
+ getBalancesByAddresses({ blockchainId, network, blockTimestamp, addresses, }: {
3042
+ /**
3043
+ * A primary network blockchain id or alias.
3044
+ */
3045
+ blockchainId: BlockchainId;
3046
+ /**
3047
+ * Either mainnet or a testnet.
3048
+ */
3049
+ network: Network;
3050
+ /**
3051
+ * An epoch timestamp in seconds. Balance will be calculated at this timestamp.
3052
+ */
3053
+ blockTimestamp?: number;
3054
+ /**
3055
+ * 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".
3056
+ */
3057
+ addresses?: string;
3058
+ }): CancelablePromise<(ListPChainBalancesResponse | ListXChainBalancesResponse | ListCChainAtomicBalancesResponse)>;
3059
+ }
3060
+
3061
+ type ProposerDetails = {
3062
+ proposerId?: string;
3063
+ proposerParentId?: string;
3064
+ proposerNodeId?: string;
3065
+ proposerPChainHeight?: number;
3066
+ proposerTimestamp?: number;
3067
+ };
3068
+
3069
+ type GetPrimaryNetworkBlockResponse = {
3070
+ blockNumber: string;
3071
+ blockHash: string;
3072
+ parentHash: string;
3073
+ blockTimestamp: number;
3074
+ blockType: string;
3075
+ txCount: number;
3076
+ transactions: Array<string>;
3077
+ blockSizeBytes: number;
3078
+ currentSupply?: string;
3079
+ proposerDetails?: ProposerDetails;
3080
+ };
3081
+
3082
+ type PrimaryNetworkBlock = {
3083
+ blockNumber: string;
3084
+ blockHash: string;
3085
+ parentHash: string;
3086
+ blockTimestamp: number;
3087
+ blockType: string;
3088
+ txCount: number;
3089
+ transactions: Array<string>;
3090
+ blockSizeBytes: number;
3091
+ currentSupply?: string;
3092
+ proposerDetails?: ProposerDetails;
3093
+ };
3094
+
3095
+ type ListPrimaryNetworkBlocksResponse = {
3096
+ /**
3097
+ * 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.
3098
+ */
3099
+ nextPageToken?: string;
3100
+ blocks: Array<PrimaryNetworkBlock>;
3101
+ chainInfo: PrimaryNetworkChainInfo;
3102
+ };
3103
+
3104
+ declare class PrimaryNetworkBlocksService {
3105
+ readonly httpRequest: BaseHttpRequest;
3106
+ constructor(httpRequest: BaseHttpRequest);
3107
+ /**
3108
+ * Get block
3109
+ * Gets a block by block height or block hash on one of the Primary Network chains.
3110
+ * @returns GetPrimaryNetworkBlockResponse
3111
+ * @throws ApiError
3112
+ */
3113
+ getBlockById({ blockchainId, network, blockId, }: {
3114
+ /**
3115
+ * A primary network blockchain id or alias.
3116
+ */
3117
+ blockchainId: BlockchainId;
3118
+ /**
3119
+ * Either mainnet or a testnet.
3120
+ */
3121
+ network: Network;
3122
+ /**
3123
+ * A block identifier which is either a block number or the block hash.
3124
+ */
3125
+ blockId: string;
3126
+ }): CancelablePromise<GetPrimaryNetworkBlockResponse>;
3127
+ /**
3128
+ * List blocks proposed by node
3129
+ * Lists the latest blocks proposed by a given NodeID on one of the Primary Network chains.
3130
+ * @returns ListPrimaryNetworkBlocksResponse
3131
+ * @throws ApiError
3132
+ */
3133
+ listPrimaryNetworkBlocksByNodeId({ blockchainId, network, nodeId, pageToken, pageSize, }: {
3134
+ /**
3135
+ * A primary network blockchain id or alias.
3136
+ */
3137
+ blockchainId: BlockchainId;
3138
+ /**
3139
+ * Either mainnet or a testnet.
3140
+ */
3141
+ network: Network;
3142
+ /**
3143
+ * A primary network (P or X chain) nodeId.
3144
+ */
3145
+ nodeId: string;
3146
+ /**
3147
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3148
+ */
3149
+ pageToken?: string;
3150
+ /**
3151
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
3152
+ */
3153
+ pageSize?: number;
3154
+ }): CancelablePromise<ListPrimaryNetworkBlocksResponse>;
3155
+ /**
3156
+ * List latest blocks
3157
+ * Lists latest blocks on one of the Primary Network chains.
3158
+ * @returns ListPrimaryNetworkBlocksResponse
3159
+ * @throws ApiError
3160
+ */
3161
+ listLatestPrimaryNetworkBlocks({ blockchainId, network, pageToken, pageSize, }: {
3162
+ /**
3163
+ * A primary network blockchain id or alias.
3164
+ */
3165
+ blockchainId: BlockchainId;
3166
+ /**
3167
+ * Either mainnet or a testnet.
3168
+ */
3169
+ network: Network;
3170
+ /**
3171
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3172
+ */
3173
+ pageToken?: string;
3174
+ /**
3175
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
3176
+ */
3177
+ pageSize?: number;
3178
+ }): CancelablePromise<ListPrimaryNetworkBlocksResponse>;
3179
+ }
3180
+
3181
+ type AssetWithPriceInfo = {
3182
+ /**
3183
+ * Unique ID for an asset.
3184
+ */
3185
+ assetId: string;
3186
+ /**
3187
+ * Name of this asset.
3188
+ */
3189
+ name: string;
3190
+ /**
3191
+ * Symbol for this asset (max 4 characters).
3192
+ */
3193
+ symbol: string;
3194
+ /**
3195
+ * Denomination of this asset to represent fungibility.
3196
+ */
3197
+ denomination: number;
3198
+ /**
3199
+ * Type of asset like SECP256K1 or NFT.
3200
+ */
3201
+ type: PrimaryNetworkAssetType;
3202
+ /**
3203
+ * Amount of the asset.
3204
+ */
3205
+ amount: string;
3206
+ /**
3207
+ * The historical asset price at the time the reward was granted, if available. Note, this is only provided if the reward occured more than 24 hours ago.
3208
+ */
3209
+ historicalPrice?: Money;
3210
+ };
3211
+
3212
+ declare enum RewardType {
3213
+ VALIDATOR = "VALIDATOR",
3214
+ DELEGATOR = "DELEGATOR",
3215
+ VALIDATOR_FEE = "VALIDATOR_FEE"
3216
+ }
3217
+
3218
+ type HistoricalReward = {
3219
+ /**
3220
+ * An array of P-Chain wallet addresses.
3221
+ */
3222
+ addresses: Array<string>;
3223
+ txHash: string;
3224
+ amountStaked: string;
3225
+ nodeId: string;
3226
+ startTimestamp: number;
3227
+ endTimestamp: number;
3228
+ rewardType: RewardType;
3229
+ utxoId: string;
3230
+ outputIndex: number;
3231
+ reward: AssetWithPriceInfo;
3232
+ rewardTxHash: string;
3233
+ };
3234
+
3235
+ type ListHistoricalRewardsResponse = {
3236
+ /**
3237
+ * 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.
3238
+ */
3239
+ nextPageToken?: string;
3240
+ historicalRewards: Array<HistoricalReward>;
3241
+ };
3242
+
3243
+ type PendingReward = {
3244
+ /**
3245
+ * An array of P-Chain wallet addresses.
3246
+ */
3247
+ addresses: Array<string>;
3248
+ txHash: string;
3249
+ amountStaked: string;
3250
+ nodeId: string;
3251
+ startTimestamp: number;
3252
+ endTimestamp: number;
3253
+ rewardType: RewardType;
3254
+ progress: number;
3255
+ /**
3256
+ * An object containing P-chain Asset ID and the amount of that Asset ID.
3257
+ */
3258
+ estimatedReward: Asset;
3259
+ };
3260
+
3261
+ type ListPendingRewardsResponse = {
3262
+ /**
3263
+ * 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.
3264
+ */
3265
+ nextPageToken?: string;
3266
+ pendingRewards: Array<PendingReward>;
3267
+ };
3268
+
3269
+ declare class PrimaryNetworkRewardsService {
3270
+ readonly httpRequest: BaseHttpRequest;
3271
+ constructor(httpRequest: BaseHttpRequest);
3272
+ /**
3273
+ * List pending rewards
3274
+ * Lists pending rewards on the Primary Network for the supplied addresses.
3275
+ * @returns ListPendingRewardsResponse
3276
+ * @throws ApiError
3277
+ */
3278
+ listPendingPrimaryNetworkRewards({ network, addresses, pageToken, pageSize, nodeIds, sortOrder, }: {
3279
+ /**
3280
+ * Either mainnet or a testnet.
3281
+ */
3282
+ network: Network;
3283
+ /**
3284
+ * 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". One of addresses or nodeIds is required.
3285
+ */
3286
+ addresses?: string;
3287
+ /**
3288
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3289
+ */
3290
+ pageToken?: string;
3291
+ /**
3292
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
3293
+ */
3294
+ pageSize?: number;
3295
+ /**
3296
+ * A comma separated list of node ids to filter by. One of addresses or nodeIds is required.
3297
+ */
3298
+ nodeIds?: string;
3299
+ /**
3300
+ * 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.
3301
+ */
3302
+ sortOrder?: SortOrder;
3303
+ }): CancelablePromise<ListPendingRewardsResponse>;
3304
+ /**
3305
+ * List historical rewards
3306
+ * Lists historical rewards on the Primary Network for the supplied addresses.
3307
+ * @returns ListHistoricalRewardsResponse
3308
+ * @throws ApiError
3309
+ */
3310
+ listHistoricalPrimaryNetworkRewards({ network, addresses, pageToken, pageSize, nodeIds, sortOrder, currency, }: {
3311
+ /**
3312
+ * Either mainnet or a testnet.
3313
+ */
3314
+ network: Network;
3315
+ /**
3316
+ * 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". Optional, but at least one of addresses or nodeIds is required.
3317
+ */
3318
+ addresses?: string;
3319
+ /**
3320
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3321
+ */
3322
+ pageToken?: string;
3323
+ /**
3324
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
3325
+ */
3326
+ pageSize?: number;
3327
+ /**
3328
+ * A comma separated list of node ids to filter by. Optional, but at least one of addresses or nodeIds is required.
3329
+ */
3330
+ nodeIds?: string;
3331
+ /**
3332
+ * 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.
3333
+ */
3334
+ sortOrder?: SortOrder;
3335
+ /**
3336
+ * The currency that return values should use. Defaults to USD.
3337
+ */
3338
+ currency?: CurrencyCode;
3339
+ }): CancelablePromise<ListHistoricalRewardsResponse>;
3340
+ }
3341
+
3342
+ type UtxoCredential = {
3343
+ /**
3344
+ * Signature provided to consume the output.
3345
+ */
3346
+ signature?: string;
3347
+ /**
3348
+ * Public key associated with the signature.
3349
+ */
3350
+ publicKey?: string;
3351
+ };
3352
+
3353
+ type EVMInput = {
3354
+ /**
3355
+ * EVM address from which the asset is exported in ExportTx.
3356
+ */
3357
+ fromAddress: string;
3358
+ /**
3359
+ * Asset details for the asset being transferred.
3360
+ */
3361
+ asset: Asset;
3362
+ /**
3363
+ * Credentials that signed this transaction.
3364
+ */
3365
+ credentials: Array<UtxoCredential>;
3366
+ };
3367
+
3368
+ type Utxo = {
3369
+ /**
3370
+ * Addresses that are eligible to sign the consumption of this output.
3371
+ */
3372
+ addresses: Array<string>;
3373
+ asset: Asset;
3374
+ /**
3375
+ * Blockchain ID on which this output is consumed on.
3376
+ */
3377
+ consumedOnChainId: string;
3378
+ /**
3379
+ * Transaction ID that consumed this output.
3380
+ */
3381
+ consumingTxHash?: string;
3382
+ /**
3383
+ * Blockchain ID on which this output is created on.
3384
+ */
3385
+ createdOnChainId: string;
3386
+ /**
3387
+ * UTXO ID for this output.
3388
+ */
3389
+ utxoId: string;
3390
+ /**
3391
+ * Unix timestamp in seconds at which this output was consumed.
3392
+ */
3393
+ consumingTxTimestamp?: number;
3394
+ /**
3395
+ * Transaction ID that created this output.
3396
+ */
3397
+ creationTxHash: string;
3398
+ /**
3399
+ * Credentials that signed the transaction to consume this utxo
3400
+ */
3401
+ credentials?: Array<UtxoCredential>;
3402
+ /**
3403
+ * Index representing the minting set for the NFT mint output.
3404
+ */
3405
+ groupId?: number;
3406
+ /**
3407
+ * Locktime in seconds after which this output can be consumed.
3408
+ */
3409
+ locktime: number;
3410
+ /**
3411
+ * Postion of this output in a list of lexiographically sorted outputs of a transaction.
3412
+ */
3413
+ outputIndex: string;
3414
+ /**
3415
+ * Hex encoded data for NFT assets.
3416
+ */
3417
+ payload?: string;
3418
+ /**
3419
+ * Minimum number of signatures required to consume this output.
3420
+ */
3421
+ threshold: number;
3422
+ /**
3423
+ * Unix timestamp in seconds at which this outptut was created.
3424
+ */
3425
+ timestamp: number;
3426
+ /**
3427
+ * Type of output.
3428
+ */
3429
+ utxoType: string;
3430
+ };
3431
+
3432
+ type CChainExportTransaction = {
3433
+ /**
3434
+ * Unique ID for this transaction.
3435
+ */
3436
+ txHash: string;
3437
+ /**
3438
+ * Height of the block this transaction belongs to.
3439
+ */
3440
+ blockHeight: number;
3441
+ /**
3442
+ * Hash of the block this transaction belongs to.
3443
+ */
3444
+ blockHash: string;
3445
+ /**
3446
+ * Latest timestamp in seconds this transaction was accepted.
3447
+ */
3448
+ timestamp: number;
3449
+ /**
3450
+ * Hex encoded memo bytes for this transaction.
3451
+ */
3452
+ memo: string;
3453
+ /**
3454
+ * Assets unlocked by inputs of this transaction.
3455
+ */
3456
+ amountUnlocked: Array<Asset>;
3457
+ /**
3458
+ * Assets created by outputs of this transaction.
3459
+ */
3460
+ amountCreated: Array<Asset>;
3461
+ /**
3462
+ * Source chain for an atomic transaction.
3463
+ */
3464
+ sourceChain: string;
3465
+ /**
3466
+ * Destination chain for an atomic transaction.
3467
+ */
3468
+ destinationChain: string;
3469
+ /**
3470
+ * Type of transaction.
3471
+ */
3472
+ txType: CChainExportTransaction.txType;
3473
+ evmInputs: Array<EVMInput>;
3474
+ emittedUtxos: Array<Utxo>;
3475
+ };
3476
+ declare namespace CChainExportTransaction {
3477
+ /**
3478
+ * Type of transaction.
3479
+ */
3480
+ enum txType {
3481
+ EXPORT_TX = "ExportTx"
3482
+ }
3483
+ }
3484
+
3485
+ type EVMOutput = {
3486
+ /**
3487
+ * EVM address to which the asset is imported in ImportTx
3488
+ */
3489
+ toAddress: string;
3490
+ /**
3491
+ * Asset details for the asset being transferred.
3492
+ */
3493
+ asset: Asset;
3494
+ };
3495
+
3496
+ type CChainImportTransaction = {
3497
+ /**
3498
+ * Unique ID for this transaction.
3499
+ */
3500
+ txHash: string;
3501
+ /**
3502
+ * Height of the block this transaction belongs to.
3503
+ */
3504
+ blockHeight: number;
3505
+ /**
3506
+ * Hash of the block this transaction belongs to.
3507
+ */
3508
+ blockHash: string;
3509
+ /**
3510
+ * Latest timestamp in seconds this transaction was accepted.
3511
+ */
3512
+ timestamp: number;
3513
+ /**
3514
+ * Hex encoded memo bytes for this transaction.
3515
+ */
3516
+ memo: string;
3517
+ /**
3518
+ * Assets unlocked by inputs of this transaction.
3519
+ */
3520
+ amountUnlocked: Array<Asset>;
3521
+ /**
3522
+ * Assets created by outputs of this transaction.
3523
+ */
3524
+ amountCreated: Array<Asset>;
3525
+ /**
3526
+ * Source chain for an atomic transaction.
3527
+ */
3528
+ sourceChain: string;
3529
+ /**
3530
+ * Destination chain for an atomic transaction.
3531
+ */
3532
+ destinationChain: string;
3533
+ /**
3534
+ * Type of transaction.
3535
+ */
3536
+ txType: CChainImportTransaction.txType;
3537
+ evmOutputs: Array<EVMOutput>;
3538
+ consumedUtxos: Array<Utxo>;
3539
+ };
3540
+ declare namespace CChainImportTransaction {
3541
+ /**
3542
+ * Type of transaction.
3543
+ */
3544
+ enum txType {
3545
+ IMPORT_TX = "ImportTx"
3546
+ }
3547
+ }
3548
+
3549
+ type ListCChainAtomicTransactionsResponse = {
3550
+ /**
3551
+ * 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.
3552
+ */
3553
+ nextPageToken?: string;
3554
+ transactions: Array<(CChainExportTransaction | CChainImportTransaction)>;
3555
+ chainInfo: PrimaryNetworkChainInfo;
3556
+ };
3557
+
3558
+ declare enum PChainTransactionType {
3559
+ ADD_VALIDATOR_TX = "AddValidatorTx",
3560
+ ADD_SUBNET_VALIDATOR_TX = "AddSubnetValidatorTx",
3561
+ ADD_DELEGATOR_TX = "AddDelegatorTx",
3562
+ CREATE_CHAIN_TX = "CreateChainTx",
3563
+ CREATE_SUBNET_TX = "CreateSubnetTx",
3564
+ IMPORT_TX = "ImportTx",
3565
+ EXPORT_TX = "ExportTx",
3566
+ ADVANCE_TIME_TX = "AdvanceTimeTx",
3567
+ REWARD_VALIDATOR_TX = "RewardValidatorTx",
3568
+ REMOVE_SUBNET_VALIDATOR_TX = "RemoveSubnetValidatorTx",
3569
+ TRANSFORM_SUBNET_TX = "TransformSubnetTx",
3570
+ ADD_PERMISSIONLESS_VALIDATOR_TX = "AddPermissionlessValidatorTx",
3571
+ ADD_PERMISSIONLESS_DELEGATOR_TX = "AddPermissionlessDelegatorTx",
3572
+ UNKNOWN = "UNKNOWN"
3573
+ }
3574
+
3575
+ declare enum UtxoType {
3576
+ STAKE = "STAKE",
3577
+ TRANSFER = "TRANSFER"
3578
+ }
3579
+
3580
+ type PChainUtxo = {
3581
+ /**
3582
+ * Addresses that are eligible to sign the consumption of this output.
3583
+ */
3584
+ addresses: Array<string>;
3585
+ asset: Asset;
3586
+ /**
3587
+ * Blockchain ID on which this output is consumed on.
3588
+ */
3589
+ consumedOnChainId: string;
3590
+ /**
3591
+ * Transaction ID that consumed this output.
3592
+ */
3593
+ consumingTxHash?: string;
3594
+ /**
3595
+ * Blockchain ID on which this output is created on.
3596
+ */
3597
+ createdOnChainId: string;
3598
+ /**
3599
+ * UTXO ID for this output.
3600
+ */
3601
+ utxoId: string;
3602
+ /**
3603
+ * @deprecated
3604
+ */
3605
+ amount: string;
3606
+ /**
3607
+ * @deprecated
3608
+ */
3609
+ assetId: string;
3610
+ blockNumber: string;
3611
+ blockTimestamp: number;
3612
+ consumingBlockNumber?: string;
3613
+ consumingBlockTimestamp?: number;
3614
+ platformLocktime?: number;
3615
+ outputIndex: number;
3616
+ rewardType?: RewardType;
3617
+ stakeableLocktime?: number;
3618
+ staked?: boolean;
3619
+ threshold?: number;
3620
+ txHash: string;
3621
+ utxoEndTimestamp?: number;
3622
+ utxoStartTimestamp?: number;
3623
+ utxoType: UtxoType;
3624
+ };
3625
+
3626
+ type PChainTransaction = {
3627
+ /**
3628
+ * A P-Chain transaction hash.
3629
+ */
3630
+ txHash: string;
3631
+ txType: PChainTransactionType;
3632
+ /**
3633
+ * The block finality timestamp.
3634
+ */
3635
+ blockTimestamp: number;
3636
+ blockNumber: string;
3637
+ blockHash: string;
3638
+ consumedUtxos: Array<PChainUtxo>;
3639
+ emittedUtxos: Array<PChainUtxo>;
3640
+ /**
3641
+ * Source chain for an atomic transaction.
3642
+ */
3643
+ sourceChain?: string;
3644
+ /**
3645
+ * Destination chain for an atomic transaction.
3646
+ */
3647
+ destinationChain?: string;
3648
+ /**
3649
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID.
3650
+ */
3651
+ value: Array<Asset>;
3652
+ /**
3653
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID.
3654
+ */
3655
+ amountBurned: Array<Asset>;
3656
+ /**
3657
+ * A list of objects containing P-chain Asset ID and the amount of that Asset ID. Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
3658
+ */
3659
+ amountStaked: Array<Asset>;
3660
+ /**
3661
+ * Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
3662
+ */
3663
+ startTimestamp?: number;
3664
+ /**
3665
+ * Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
3666
+ */
3667
+ endTimestamp?: number;
3668
+ /**
3669
+ * Present for AddValidatorTx, AddPermissionlessValidatorTx
3670
+ */
3671
+ delegationFeePercent?: string;
3672
+ /**
3673
+ * Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
3674
+ */
3675
+ nodeId?: string;
3676
+ /**
3677
+ * Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx, CreateChainTx, CreateSubnetTx
3678
+ */
3679
+ subnetId?: string;
3680
+ /**
3681
+ * Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
3682
+ */
3683
+ estimatedReward?: string;
3684
+ rewardTxHash?: string;
3685
+ rewardAddresses?: Array<string>;
3686
+ memo?: string;
3687
+ /**
3688
+ * Present for RewardValidatorTx
3689
+ */
3690
+ stakingTxHash?: string;
3691
+ };
3692
+
3693
+ type ListPChainTransactionsResponse = {
3694
+ /**
3695
+ * 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.
3696
+ */
3697
+ nextPageToken?: string;
3698
+ transactions: Array<PChainTransaction>;
3699
+ chainInfo: PrimaryNetworkChainInfo;
3700
+ };
3701
+
3702
+ declare enum XChainTransactionType {
3703
+ BASE_TX = "BaseTx",
3704
+ CREATE_ASSET_TX = "CreateAssetTx",
3705
+ OPERATION_TX = "OperationTx",
3706
+ IMPORT_TX = "ImportTx",
3707
+ EXPORT_TX = "ExportTx",
3708
+ UNKNOWN = "UNKNOWN"
3709
+ }
3710
+
3711
+ type XChainLinearTransaction = {
3712
+ /**
3713
+ * Unique ID for this transaction.
3714
+ */
3715
+ txHash: string;
3716
+ /**
3717
+ * Represents chain format this transaction is included in.
3718
+ */
3719
+ chainFormat: XChainLinearTransaction.chainFormat;
3720
+ /**
3721
+ * Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices.
3722
+ */
3723
+ timestamp: number;
3724
+ /**
3725
+ * Type of transaction.
3726
+ */
3727
+ txType: XChainTransactionType;
3728
+ /**
3729
+ * Hex encoded memo bytes for this transaction.
3730
+ */
3731
+ memo: string;
3732
+ consumedUtxos: Array<Utxo>;
3733
+ emittedUtxos: Array<Utxo>;
3734
+ /**
3735
+ * Assets unlocked by inputs of this transaction.
3736
+ */
3737
+ amountUnlocked: Array<Asset>;
3738
+ /**
3739
+ * Assets created by outputs of this transaction.
3740
+ */
3741
+ amountCreated: Array<Asset>;
3742
+ /**
3743
+ * Source chain for an atomic transaction.
3744
+ */
3745
+ sourceChain?: string;
3746
+ /**
3747
+ * Destination chain for an atomic transaction.
3748
+ */
3749
+ destinationChain?: string;
3750
+ /**
3751
+ * Asset details of the asset created in CreateAssetTx
3752
+ */
3753
+ assetCreated?: XChainAssetDetails;
3754
+ /**
3755
+ * Height of the block this transaction belongs to.
3756
+ */
3757
+ blockHeight: number;
3758
+ /**
3759
+ * Hash of the block this transaction belongs to.
3760
+ */
3761
+ blockHash: string;
3762
+ };
3763
+ declare namespace XChainLinearTransaction {
3764
+ /**
3765
+ * Represents chain format this transaction is included in.
3766
+ */
3767
+ enum chainFormat {
3768
+ NON_LINEAR = "non-linear",
3769
+ LINEAR = "linear"
3770
+ }
3771
+ }
3772
+
3773
+ type TransactionVertexDetail = {
3774
+ /**
3775
+ * Vertex ID of the vertex this transaction belongs to.
3776
+ */
3777
+ hash: string;
3778
+ /**
3779
+ * Vertex height of the vertex this transaction belongs to.
3780
+ */
3781
+ height: number;
3782
+ /**
3783
+ * Timestamp in seconds this vertex was accepted.
3784
+ */
3785
+ timestamp: number;
3786
+ };
3787
+
3788
+ type XChainNonLinearTransaction = {
3789
+ /**
3790
+ * Unique ID for this transaction.
3791
+ */
3792
+ txHash: string;
3793
+ /**
3794
+ * Represents chain format this transaction is included in.
3795
+ */
3796
+ chainFormat: XChainNonLinearTransaction.chainFormat;
3797
+ /**
3798
+ * Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices.
3799
+ */
3800
+ timestamp: number;
3801
+ /**
3802
+ * Type of transaction.
3803
+ */
3804
+ txType: XChainTransactionType;
3805
+ /**
3806
+ * Hex encoded memo bytes for this transaction.
3807
+ */
3808
+ memo: string;
3809
+ consumedUtxos: Array<Utxo>;
3810
+ emittedUtxos: Array<Utxo>;
3811
+ /**
3812
+ * Assets unlocked by inputs of this transaction.
3813
+ */
3814
+ amountUnlocked: Array<Asset>;
3815
+ /**
3816
+ * Assets created by outputs of this transaction.
3817
+ */
3818
+ amountCreated: Array<Asset>;
3819
+ /**
3820
+ * Source chain for an atomic transaction.
3821
+ */
3822
+ sourceChain?: string;
3823
+ /**
3824
+ * Destination chain for an atomic transaction.
3825
+ */
3826
+ destinationChain?: string;
3827
+ /**
3828
+ * Asset details of the asset created in CreateAssetTx
3829
+ */
3830
+ assetCreated?: XChainAssetDetails;
3831
+ /**
3832
+ * A transaction on X-Chain can be accepted over multiple vertices.
3833
+ */
3834
+ vertices: Array<TransactionVertexDetail>;
3835
+ };
3836
+ declare namespace XChainNonLinearTransaction {
3837
+ /**
3838
+ * Represents chain format this transaction is included in.
3839
+ */
3840
+ enum chainFormat {
3841
+ NON_LINEAR = "non-linear",
3842
+ LINEAR = "linear"
3843
+ }
3844
+ }
3845
+
3846
+ type ListXChainTransactionsResponse = {
3847
+ /**
3848
+ * 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.
3849
+ */
3850
+ nextPageToken?: string;
3851
+ transactions: Array<(XChainNonLinearTransaction | XChainLinearTransaction)>;
3852
+ chainInfo: PrimaryNetworkChainInfo;
3853
+ };
3854
+
3855
+ declare enum PChainId {
3856
+ _11111111111111111111111111111111LPO_YY = "11111111111111111111111111111111LpoYY",
3857
+ P_CHAIN = "p-chain"
3858
+ }
3859
+
3860
+ declare enum PrimaryNetworkTxType {
3861
+ ADD_VALIDATOR_TX = "AddValidatorTx",
3862
+ ADD_SUBNET_VALIDATOR_TX = "AddSubnetValidatorTx",
3863
+ ADD_DELEGATOR_TX = "AddDelegatorTx",
3864
+ CREATE_CHAIN_TX = "CreateChainTx",
3865
+ CREATE_SUBNET_TX = "CreateSubnetTx",
3866
+ IMPORT_TX = "ImportTx",
3867
+ EXPORT_TX = "ExportTx",
3868
+ ADVANCE_TIME_TX = "AdvanceTimeTx",
3869
+ REWARD_VALIDATOR_TX = "RewardValidatorTx",
3870
+ REMOVE_SUBNET_VALIDATOR_TX = "RemoveSubnetValidatorTx",
3871
+ TRANSFORM_SUBNET_TX = "TransformSubnetTx",
3872
+ ADD_PERMISSIONLESS_VALIDATOR_TX = "AddPermissionlessValidatorTx",
3873
+ ADD_PERMISSIONLESS_DELEGATOR_TX = "AddPermissionlessDelegatorTx",
3874
+ UNKNOWN = "UNKNOWN",
3875
+ BASE_TX = "BaseTx",
3876
+ CREATE_ASSET_TX = "CreateAssetTx",
3877
+ OPERATION_TX = "OperationTx"
3878
+ }
3879
+
3880
+ declare class PrimaryNetworkTransactionsService {
3881
+ readonly httpRequest: BaseHttpRequest;
3882
+ constructor(httpRequest: BaseHttpRequest);
3883
+ /**
3884
+ * Get transaction
3885
+ * Gets the details of a single transaction on one of the Primary Network chains.
3886
+ * @returns any
3887
+ * @throws ApiError
3888
+ */
3889
+ getTxByHash({ blockchainId, network, txHash, }: {
3890
+ /**
3891
+ * A primary network blockchain id or alias.
3892
+ */
3893
+ blockchainId: BlockchainId;
3894
+ /**
3895
+ * Either mainnet or a testnet.
3896
+ */
3897
+ network: Network;
3898
+ /**
3899
+ * A primary network (P or X chain) transaction hash.
3900
+ */
3901
+ txHash: string;
3902
+ }): CancelablePromise<(PChainTransaction | XChainNonLinearTransaction | XChainLinearTransaction | CChainExportTransaction | CChainImportTransaction)>;
3903
+ /**
3904
+ * List latest transactions
3905
+ * Lists the latest transactions on one of the Primary Network chains.
3906
+ *
3907
+ * Transactions are filterable by addresses, txTypes, and timestamps. When querying for latest transactions without an address parameter, filtering by txTypes and timestamps is not supported. An address filter must be provided to utilize txTypes and timestamp filters.
3908
+ *
3909
+ * 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.
3910
+ * @returns any
3911
+ * @throws ApiError
3912
+ */
3913
+ listLatestPrimaryNetworkTransactions({ blockchainId, network, addresses, txTypes, startTimestamp, endTimestamp, pageToken, pageSize, sortOrder, }: {
3914
+ /**
3915
+ * A primary network blockchain id or alias.
3916
+ */
3917
+ blockchainId: BlockchainId;
3918
+ /**
3919
+ * Either mainnet or a testnet.
3920
+ */
3921
+ network: Network;
3922
+ /**
3923
+ * 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".
3924
+ */
3925
+ addresses?: string;
3926
+ /**
3927
+ * Query param for filtering items based on transaction types.
3928
+ */
3929
+ txTypes?: Array<PrimaryNetworkTxType>;
3930
+ /**
3931
+ * Query param for retrieving items after a specific timestamp.
3932
+ */
3933
+ startTimestamp?: number;
3934
+ /**
3935
+ * Query param for retrieving items before a specific timestamp.
3936
+ */
3937
+ endTimestamp?: number;
3938
+ /**
3939
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3940
+ */
3941
+ pageToken?: string;
3942
+ /**
3943
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
3944
+ */
3945
+ pageSize?: number;
3946
+ /**
3947
+ * 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.
3948
+ */
3949
+ sortOrder?: SortOrder;
3950
+ }): CancelablePromise<(ListPChainTransactionsResponse | ListXChainTransactionsResponse | ListCChainAtomicTransactionsResponse)>;
3951
+ /**
3952
+ * List staking transactions
3953
+ * Lists active staking transactions on the P-Chain for the supplied addresses.
3954
+ * @returns ListPChainTransactionsResponse
3955
+ * @throws ApiError
3956
+ */
3957
+ listActivePrimaryNetworkStakingTransactions({ blockchainId, network, addresses, txTypes, startTimestamp, endTimestamp, pageToken, pageSize, sortOrder, }: {
3958
+ /**
3959
+ * A primary network blockchain id or alias.
3960
+ */
3961
+ blockchainId: PChainId;
3962
+ /**
3963
+ * Either mainnet or a testnet.
3964
+ */
3965
+ network: Network;
3966
+ /**
3967
+ * 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".
3968
+ */
3969
+ addresses?: string;
3970
+ /**
3971
+ * Query param for filtering items based on transaction types.
3972
+ */
3973
+ txTypes?: Array<PrimaryNetworkTxType>;
3974
+ /**
3975
+ * Query param for retrieving items after a specific timestamp.
3976
+ */
3977
+ startTimestamp?: number;
3978
+ /**
3979
+ * Query param for retrieving items before a specific timestamp.
3980
+ */
3981
+ endTimestamp?: number;
3982
+ /**
3983
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
3984
+ */
3985
+ pageToken?: string;
3986
+ /**
3987
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
3988
+ */
3989
+ pageSize?: number;
3990
+ /**
3991
+ * 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.
3992
+ */
3993
+ sortOrder?: SortOrder;
3994
+ }): CancelablePromise<ListPChainTransactionsResponse>;
3995
+ /**
3996
+ * List asset transactions
3997
+ * Lists asset transactions corresponding to the given asset id on the X-Chain.
3998
+ * @returns ListXChainTransactionsResponse
3999
+ * @throws ApiError
4000
+ */
4001
+ listAssetTransactions({ blockchainId, network, assetId, txTypes, startTimestamp, endTimestamp, pageToken, pageSize, }: {
4002
+ /**
4003
+ * A primary network blockchain id or alias.
4004
+ */
4005
+ blockchainId: XChainId;
4006
+ /**
4007
+ * Either mainnet or a testnet.
4008
+ */
4009
+ network: Network;
4010
+ /**
4011
+ * Asset ID for any asset on X-Chain
4012
+ */
4013
+ assetId: string;
4014
+ /**
4015
+ * Query param for filtering items based on transaction types.
4016
+ */
4017
+ txTypes?: Array<PrimaryNetworkTxType>;
4018
+ /**
4019
+ * Query param for retrieving items after a specific timestamp.
4020
+ */
4021
+ startTimestamp?: number;
4022
+ /**
4023
+ * Query param for retrieving items before a specific timestamp.
4024
+ */
4025
+ endTimestamp?: number;
4026
+ /**
4027
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
4028
+ */
4029
+ pageToken?: string;
4030
+ /**
4031
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
4032
+ */
4033
+ pageSize?: number;
4034
+ }): CancelablePromise<ListXChainTransactionsResponse>;
4035
+ }
4036
+
4037
+ type ListPChainUtxosResponse = {
4038
+ /**
4039
+ * 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.
4040
+ */
4041
+ nextPageToken?: string;
4042
+ utxos: Array<PChainUtxo>;
4043
+ chainInfo: PrimaryNetworkChainInfo;
4044
+ };
4045
+
4046
+ type ListUtxosResponse = {
4047
+ /**
4048
+ * 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.
4049
+ */
4050
+ nextPageToken?: string;
4051
+ utxos: Array<Utxo>;
4052
+ chainInfo: PrimaryNetworkChainInfo;
4053
+ };
4054
+
4055
+ declare class PrimaryNetworkUtxOsService {
4056
+ readonly httpRequest: BaseHttpRequest;
4057
+ constructor(httpRequest: BaseHttpRequest);
4058
+ /**
4059
+ * List UTXOs
4060
+ * Lists UTXOs on one of the Primary Network chains for the supplied addresses.
4061
+ * @returns any
4062
+ * @throws ApiError
4063
+ */
4064
+ getUtxosByAddresses({ blockchainId, network, addresses, pageToken, pageSize, assetId, includeSpent, sortOrder, }: {
4065
+ /**
4066
+ * A primary network blockchain id or alias.
4067
+ */
4068
+ blockchainId: BlockchainId;
4069
+ /**
4070
+ * Either mainnet or a testnet.
4071
+ */
4072
+ network: Network;
4073
+ /**
4074
+ * 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".
4075
+ */
4076
+ addresses?: string;
4077
+ /**
4078
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
4079
+ */
4080
+ pageToken?: string;
4081
+ /**
4082
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
4083
+ */
4084
+ pageSize?: number;
4085
+ /**
4086
+ * Asset ID for any asset (only applicable X-Chain)
4087
+ */
4088
+ assetId?: string;
4089
+ /**
4090
+ * Boolean filter to include spent UTXOs.
4091
+ */
4092
+ includeSpent?: boolean;
4093
+ /**
4094
+ * 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.
4095
+ */
4096
+ sortOrder?: SortOrder;
4097
+ }): CancelablePromise<(ListPChainUtxosResponse | ListUtxosResponse)>;
4098
+ }
4099
+
4100
+ type XChainVertex = {
4101
+ vertexHash: string;
4102
+ parentHashes: Array<string>;
4103
+ vertexHeight: number;
4104
+ vertexIndex: number;
4105
+ vertexTimestamp: number;
4106
+ txCount: number;
4107
+ transactions: Array<string>;
4108
+ vertexSizeBytes: number;
4109
+ };
4110
+
4111
+ type ListXChainVerticesResponse = {
4112
+ /**
4113
+ * 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.
4114
+ */
4115
+ nextPageToken?: string;
4116
+ vertices: Array<XChainVertex>;
4117
+ chainInfo: PrimaryNetworkChainInfo;
4118
+ };
4119
+
4120
+ declare class PrimaryNetworkVerticesService {
4121
+ readonly httpRequest: BaseHttpRequest;
4122
+ constructor(httpRequest: BaseHttpRequest);
4123
+ /**
4124
+ * List vertices
4125
+ * Lists latest vertices on the X-Chain.
4126
+ * @returns ListXChainVerticesResponse
4127
+ * @throws ApiError
4128
+ */
4129
+ listLatestXChainVertices({ blockchainId, network, pageToken, pageSize, }: {
4130
+ /**
4131
+ * A primary network blockchain id or alias.
4132
+ */
4133
+ blockchainId: XChainId;
4134
+ /**
4135
+ * Either mainnet or a testnet.
4136
+ */
4137
+ network: Network;
4138
+ /**
4139
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
4140
+ */
4141
+ pageToken?: string;
4142
+ /**
4143
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
4144
+ */
4145
+ pageSize?: number;
4146
+ }): CancelablePromise<ListXChainVerticesResponse>;
4147
+ /**
4148
+ * Get vertex
4149
+ * Gets a single vertex on the X-Chain.
4150
+ * @returns XChainVertex
4151
+ * @throws ApiError
4152
+ */
4153
+ getVertexByHash({ vertexHash, blockchainId, network, }: {
4154
+ /**
4155
+ * A vertex hash string.
4156
+ */
4157
+ vertexHash: string;
4158
+ /**
4159
+ * A primary network blockchain id or alias.
4160
+ */
4161
+ blockchainId: XChainId;
4162
+ /**
4163
+ * Either mainnet or a testnet.
4164
+ */
4165
+ network: Network;
4166
+ }): CancelablePromise<XChainVertex>;
4167
+ /**
4168
+ * List vertices by height
4169
+ * Lists vertices at the given vertex height on the X-Chain.
4170
+ * @returns ListXChainVerticesResponse
4171
+ * @throws ApiError
4172
+ */
4173
+ getVertexByHeight({ vertexHeight, blockchainId, network, pageToken, pageSize, sortOrder, }: {
4174
+ /**
4175
+ * The height of a vertex.
4176
+ */
4177
+ vertexHeight: number;
4178
+ /**
4179
+ * A primary network blockchain id or alias.
4180
+ */
4181
+ blockchainId: XChainId;
4182
+ /**
4183
+ * Either mainnet or a testnet.
4184
+ */
4185
+ network: Network;
4186
+ /**
4187
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
4188
+ */
4189
+ pageToken?: string;
4190
+ /**
4191
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
4192
+ */
4193
+ pageSize?: number;
4194
+ /**
4195
+ * 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.
4196
+ */
4197
+ sortOrder?: SortOrder;
4198
+ }): CancelablePromise<ListXChainVerticesResponse>;
4199
+ }
4200
+
4201
+ type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
4202
+ declare class Glacier {
4203
+ readonly default: DefaultService;
4204
+ readonly evmBalances: EvmBalancesService;
4205
+ readonly evmBlocks: EvmBlocksService;
4206
+ readonly evmChains: EvmChainsService;
4207
+ readonly evmContracts: EvmContractsService;
4208
+ readonly evmTransactions: EvmTransactionsService;
4209
+ readonly healthCheck: HealthCheckService;
4210
+ readonly nfTs: NfTsService;
4211
+ readonly operations: OperationsService;
4212
+ readonly primaryNetwork: PrimaryNetworkService;
4213
+ readonly primaryNetworkBalances: PrimaryNetworkBalancesService;
4214
+ readonly primaryNetworkBlocks: PrimaryNetworkBlocksService;
4215
+ readonly primaryNetworkRewards: PrimaryNetworkRewardsService;
4216
+ readonly primaryNetworkTransactions: PrimaryNetworkTransactionsService;
4217
+ readonly primaryNetworkUtxOs: PrimaryNetworkUtxOsService;
4218
+ readonly primaryNetworkVertices: PrimaryNetworkVerticesService;
4219
+ readonly request: BaseHttpRequest;
4220
+ constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
4221
+ }
4222
+
4223
+ type ApiResult = {
4224
+ readonly url: string;
4225
+ readonly ok: boolean;
4226
+ readonly status: number;
4227
+ readonly statusText: string;
4228
+ readonly body: any;
4229
+ };
4230
+
4231
+ declare class ApiError extends Error {
4232
+ readonly url: string;
4233
+ readonly status: number;
4234
+ readonly statusText: string;
4235
+ readonly body: any;
4236
+ readonly request: ApiRequestOptions;
4237
+ constructor(request: ApiRequestOptions, response: ApiResult, message: string);
4238
+ }
4239
+
4240
+ export { ActiveDelegatorDetails, ActiveValidatorDetails, AddressActivityMetadata, ApiError, Asset, AssetWithPriceInfo, BaseHttpRequest, Blockchain, BlockchainId, BlockchainIds, BlockchainInfo, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CompletedDelegatorDetails, CompletedValidatorDetails, ContractDeploymentDetails, ContractSubmissionBody, ContractSubmissionErc1155, ContractSubmissionErc20, ContractSubmissionErc721, ContractSubmissionUnknown, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CurrencyCode, DefaultService, DelegationStatusType, DelegatorsDetails, EVMInput, EVMOutput, Erc1155Contract, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Contract, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Contract, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, EventType, 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, ListNftTokens, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListPendingRewardsResponse, ListPrimaryNetworkBlocksResponse, ListSubnetsResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListValidatorDetailsResponse, ListWebhooksResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NetworkType, NfTsService, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainBalance, PChainId, PChainSharedAsset, PChainTransaction, PChainTransactionType, PChainUtxo, PendingDelegatorDetails, PendingReward, PendingValidatorDetails, PricingProviders, PrimaryNetwork, PrimaryNetworkAssetCap, PrimaryNetworkAssetType, PrimaryNetworkBalancesService, PrimaryNetworkBlock, PrimaryNetworkBlocksService, PrimaryNetworkChainInfo, PrimaryNetworkChainName, PrimaryNetworkOptions, PrimaryNetworkRewardsService, PrimaryNetworkService, PrimaryNetworkTransactionsService, PrimaryNetworkTxType, PrimaryNetworkUtxOsService, PrimaryNetworkVerticesService, ProposerDetails, RegisterWebhookRequest, RemovedValidatorDetails, ResourceLink, ResourceLinkType, RewardType, Rewards, RichAddress, SharedSecretsResponse, SortOrder, StakingDistribution, Subnet, TransactionDetails, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, UnknownContract, UpdateContractResponse, UtilityAddresses, Utxo, UtxoCredential, UtxoType, ValidationStatusType, ValidatorHealthDetails, ValidatorsDetails, VmName, WebhookResponse, WebhookStatus, WebhookStatusType, XChainAssetBalance, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainTransactionType, XChainVertex };