@avalabs/glacier-sdk 2.8.0-alpha.13 → 2.8.0-alpha.130

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