@avalabs/glacier-sdk 2.8.0-alpha.16 → 2.8.0-alpha.161

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