@avalabs/glacier-sdk 2.8.0-alpha.11 → 2.8.0-alpha.110

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 (222) hide show
  1. package/README.md +10 -0
  2. package/dist/index.d.ts +3376 -3
  3. package/dist/index.js +1591 -153
  4. package/esm/generated/Glacier.d.ts +18 -0
  5. package/esm/generated/Glacier.js +28 -0
  6. package/esm/generated/core/ApiError.d.ts +13 -0
  7. package/esm/generated/core/ApiError.js +13 -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 +86 -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 +244 -0
  18. package/esm/generated/models/Address.d.ts +8 -0
  19. package/esm/generated/models/Asset.d.ts +28 -0
  20. package/esm/generated/models/BlockchainId.d.ts +9 -0
  21. package/esm/generated/models/BlockchainId.js +10 -0
  22. package/esm/generated/models/BlockchainIds.d.ts +9 -0
  23. package/esm/generated/models/BlockchainIds.js +10 -0
  24. package/esm/generated/models/CChainAtomicBalances.d.ts +8 -0
  25. package/esm/generated/models/CChainExportTransaction.d.ts +58 -0
  26. package/esm/generated/models/CChainExportTransaction.js +8 -0
  27. package/esm/generated/models/CChainImportTransaction.d.ts +58 -0
  28. package/esm/generated/models/CChainImportTransaction.js +8 -0
  29. package/esm/generated/models/CChainSharedAssetBalance.d.ts +30 -0
  30. package/esm/generated/models/CancelListingEventResponse.d.ts +5 -0
  31. package/esm/generated/models/ChainAddressChainIdMap.d.ts +8 -0
  32. package/esm/generated/models/ChainAddressChainIdMapListResponse.d.ts +7 -0
  33. package/esm/generated/models/ChainInfo.d.ts +30 -0
  34. package/esm/generated/models/ChainStatus.d.ts +6 -0
  35. package/esm/generated/models/ChainStatus.js +7 -0
  36. package/esm/generated/models/CloseAuctionEventResponse.d.ts +6 -0
  37. package/esm/generated/models/CollectionMetrics.d.ts +41 -0
  38. package/esm/generated/models/CollectionSortByOption.d.ts +8 -0
  39. package/esm/generated/models/CollectionSortByOption.js +9 -0
  40. package/esm/generated/models/CreateEvmTransactionExportRequest.d.ts +15 -0
  41. package/esm/generated/models/CreateEvmTransactionExportRequest.js +8 -0
  42. package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.d.ts +15 -0
  43. package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.js +8 -0
  44. package/esm/generated/models/CurrencyCode.d.ts +18 -0
  45. package/esm/generated/models/CurrencyCode.js +19 -0
  46. package/esm/generated/models/EVMInput.d.ts +19 -0
  47. package/esm/generated/models/EVMOutput.d.ts +14 -0
  48. package/esm/generated/models/Erc1155Token.d.ts +19 -0
  49. package/esm/generated/models/Erc1155Token.js +8 -0
  50. package/esm/generated/models/Erc1155TokenBalance.d.ts +28 -0
  51. package/esm/generated/models/Erc1155TokenBalance.js +8 -0
  52. package/esm/generated/models/Erc1155TokenMetadata.d.ts +20 -0
  53. package/esm/generated/models/Erc1155Transfer.d.ts +28 -0
  54. package/esm/generated/models/Erc1155TransferDetails.d.ts +12 -0
  55. package/esm/generated/models/Erc20Token.d.ts +38 -0
  56. package/esm/generated/models/Erc20Token.js +8 -0
  57. package/esm/generated/models/Erc20TokenBalance.d.ts +51 -0
  58. package/esm/generated/models/Erc20TokenBalance.js +8 -0
  59. package/esm/generated/models/Erc20Transfer.d.ts +28 -0
  60. package/esm/generated/models/Erc20TransferDetails.d.ts +12 -0
  61. package/esm/generated/models/Erc721Token.d.ts +31 -0
  62. package/esm/generated/models/Erc721Token.js +8 -0
  63. package/esm/generated/models/Erc721TokenBalance.d.ts +35 -0
  64. package/esm/generated/models/Erc721TokenBalance.js +8 -0
  65. package/esm/generated/models/Erc721TokenMetadata.d.ts +19 -0
  66. package/esm/generated/models/Erc721Transfer.d.ts +27 -0
  67. package/esm/generated/models/Erc721TransferDetails.d.ts +11 -0
  68. package/esm/generated/models/ErcType.d.ts +8 -0
  69. package/esm/generated/models/ErcType.js +9 -0
  70. package/esm/generated/models/EvmBlock.d.ts +45 -0
  71. package/esm/generated/models/EvmNetworkOptions.d.ts +6 -0
  72. package/esm/generated/models/FloorPrice.d.ts +8 -0
  73. package/esm/generated/models/FullNativeTransactionDetails.d.ts +62 -0
  74. package/esm/generated/models/GetChainResponse.d.ts +30 -0
  75. package/esm/generated/models/GetEvmBlockResponse.d.ts +45 -0
  76. package/esm/generated/models/GetNativeBalanceResponse.d.ts +10 -0
  77. package/esm/generated/models/GetPrimaryNetworkBlockResponse.d.ts +15 -0
  78. package/esm/generated/models/GetTransactionResponse.d.ts +35 -0
  79. package/esm/generated/models/InternalTransaction.d.ts +33 -0
  80. package/esm/generated/models/InternalTransactionDetails.d.ts +17 -0
  81. package/esm/generated/models/InternalTransactionOpCall.d.ts +11 -0
  82. package/esm/generated/models/InternalTransactionOpCall.js +12 -0
  83. package/esm/generated/models/ListCChainAtomicBalancesResponse.d.ts +9 -0
  84. package/esm/generated/models/ListCChainAtomicTransactionsResponse.d.ts +14 -0
  85. package/esm/generated/models/ListChainsResponse.d.ts +7 -0
  86. package/esm/generated/models/ListCollectibleBalancesResponse.d.ts +16 -0
  87. package/esm/generated/models/ListErc1155BalancesResponse.d.ts +14 -0
  88. package/esm/generated/models/ListErc1155TransactionsResponse.d.ts +11 -0
  89. package/esm/generated/models/ListErc20BalancesResponse.d.ts +14 -0
  90. package/esm/generated/models/ListErc20TransactionsResponse.d.ts +11 -0
  91. package/esm/generated/models/ListErc721BalancesResponse.d.ts +14 -0
  92. package/esm/generated/models/ListErc721TransactionsResponse.d.ts +11 -0
  93. package/esm/generated/models/ListEvmBlocksResponse.d.ts +11 -0
  94. package/esm/generated/models/ListInternalTransactionsResponse.d.ts +11 -0
  95. package/esm/generated/models/ListListingsResponse.d.ts +11 -0
  96. package/esm/generated/models/ListNativeTransactionsResponse.d.ts +11 -0
  97. package/esm/generated/models/ListNftCollectionWithMetricsResponse.d.ts +11 -0
  98. package/esm/generated/models/ListPChainBalancesResponse.d.ts +9 -0
  99. package/esm/generated/models/ListPChainTransactionsResponse.d.ts +13 -0
  100. package/esm/generated/models/ListPChainUtxosResponse.d.ts +13 -0
  101. package/esm/generated/models/ListPrimaryNetworkBlocksResponse.d.ts +13 -0
  102. package/esm/generated/models/ListTransactionDetailsResponse.d.ts +11 -0
  103. package/esm/generated/models/ListTransfersResponse.d.ts +13 -0
  104. package/esm/generated/models/ListUtxosResponse.d.ts +13 -0
  105. package/esm/generated/models/ListXChainBalancesResponse.d.ts +9 -0
  106. package/esm/generated/models/ListXChainTransactionsResponse.d.ts +14 -0
  107. package/esm/generated/models/ListXChainVerticesResponse.d.ts +13 -0
  108. package/esm/generated/models/ListingCurrencyType.d.ts +6 -0
  109. package/esm/generated/models/ListingCurrencyType.js +7 -0
  110. package/esm/generated/models/ListingEventType.d.ts +8 -0
  111. package/esm/generated/models/ListingEventType.js +9 -0
  112. package/esm/generated/models/ListingResponse.d.ts +19 -0
  113. package/esm/generated/models/ListingType.d.ts +6 -0
  114. package/esm/generated/models/ListingType.js +7 -0
  115. package/esm/generated/models/ListingsSortByOption.d.ts +5 -0
  116. package/esm/generated/models/ListingsSortByOption.js +6 -0
  117. package/esm/generated/models/Method.d.ts +24 -0
  118. package/esm/generated/models/Money.d.ts +14 -0
  119. package/esm/generated/models/NativeTokenBalance.d.ts +41 -0
  120. package/esm/generated/models/NativeTransaction.d.ts +55 -0
  121. package/esm/generated/models/Network.d.ts +6 -0
  122. package/esm/generated/models/Network.js +7 -0
  123. package/esm/generated/models/NetworkToken.d.ts +23 -0
  124. package/esm/generated/models/NetworkTokenDetails.d.ts +18 -0
  125. package/esm/generated/models/NftCollection.d.ts +24 -0
  126. package/esm/generated/models/NftCollectionWithMetrics.d.ts +26 -0
  127. package/esm/generated/models/NftFilterOptionsProperty.d.ts +10 -0
  128. package/esm/generated/models/NftSearchBody.d.ts +10 -0
  129. package/esm/generated/models/NftSearchResultTypeOption.d.ts +6 -0
  130. package/esm/generated/models/NftSearchResultTypeOption.js +7 -0
  131. package/esm/generated/models/NftTokenMetadataStatus.d.ts +15 -0
  132. package/esm/generated/models/NftTokenMetadataStatus.js +16 -0
  133. package/esm/generated/models/OpenListingEventResponse.d.ts +17 -0
  134. package/esm/generated/models/OperationStatus.d.ts +8 -0
  135. package/esm/generated/models/OperationStatus.js +9 -0
  136. package/esm/generated/models/OperationStatusCode.d.ts +7 -0
  137. package/esm/generated/models/OperationStatusCode.js +8 -0
  138. package/esm/generated/models/OperationStatusResponse.d.ts +15 -0
  139. package/esm/generated/models/OperationType.d.ts +6 -0
  140. package/esm/generated/models/OperationType.js +7 -0
  141. package/esm/generated/models/PChainAsset.d.ts +6 -0
  142. package/esm/generated/models/PChainBalance.d.ts +30 -0
  143. package/esm/generated/models/PChainId.d.ts +6 -0
  144. package/esm/generated/models/PChainId.js +7 -0
  145. package/esm/generated/models/PChainTransaction.d.ts +76 -0
  146. package/esm/generated/models/PChainTransactionType.d.ts +16 -0
  147. package/esm/generated/models/PChainTransactionType.js +17 -0
  148. package/esm/generated/models/PChainUtxo.d.ts +41 -0
  149. package/esm/generated/models/PaginationParams.d.ts +13 -0
  150. package/esm/generated/models/PrimaryNetwork.d.ts +6 -0
  151. package/esm/generated/models/PrimaryNetwork.js +7 -0
  152. package/esm/generated/models/PrimaryNetworkBlock.d.ts +15 -0
  153. package/esm/generated/models/PrimaryNetworkChainInfo.d.ts +9 -0
  154. package/esm/generated/models/PrimaryNetworkChainName.d.ts +7 -0
  155. package/esm/generated/models/PrimaryNetworkChainName.js +8 -0
  156. package/esm/generated/models/PrimaryNetworkOptions.d.ts +6 -0
  157. package/esm/generated/models/ProposerDetails.d.ts +9 -0
  158. package/esm/generated/models/PurchaseListingEventResponse.d.ts +17 -0
  159. package/esm/generated/models/ResourceLink.d.ts +8 -0
  160. package/esm/generated/models/ResourceLinkType.d.ts +22 -0
  161. package/esm/generated/models/ResourceLinkType.js +23 -0
  162. package/esm/generated/models/RewardType.d.ts +6 -0
  163. package/esm/generated/models/RewardType.js +7 -0
  164. package/esm/generated/models/RichAddress.d.ts +26 -0
  165. package/esm/generated/models/SortOrder.d.ts +6 -0
  166. package/esm/generated/models/SortOrder.js +7 -0
  167. package/esm/generated/models/TokenWithPrice.d.ts +28 -0
  168. package/esm/generated/models/TransactionDetails.d.ts +36 -0
  169. package/esm/generated/models/TransactionExportMetadata.d.ts +18 -0
  170. package/esm/generated/models/TransactionMethodType.d.ts +7 -0
  171. package/esm/generated/models/TransactionMethodType.js +8 -0
  172. package/esm/generated/models/TransactionStatus.d.ts +6 -0
  173. package/esm/generated/models/TransactionStatus.js +7 -0
  174. package/esm/generated/models/TransactionVertexDetail.d.ts +16 -0
  175. package/esm/generated/models/TrendingTimeframe.d.ts +7 -0
  176. package/esm/generated/models/TrendingTimeframe.js +8 -0
  177. package/esm/generated/models/UtilityAddresses.d.ts +5 -0
  178. package/esm/generated/models/Utxo.d.ts +68 -0
  179. package/esm/generated/models/UtxoCredential.d.ts +12 -0
  180. package/esm/generated/models/UtxoType.d.ts +6 -0
  181. package/esm/generated/models/UtxoType.js +7 -0
  182. package/esm/generated/models/VmName.d.ts +7 -0
  183. package/esm/generated/models/VmName.js +8 -0
  184. package/esm/generated/models/XChainAssetBalance.d.ts +29 -0
  185. package/esm/generated/models/XChainAssetDetails.d.ts +32 -0
  186. package/esm/generated/models/XChainBalances.d.ts +17 -0
  187. package/esm/generated/models/XChainId.d.ts +6 -0
  188. package/esm/generated/models/XChainId.js +7 -0
  189. package/esm/generated/models/XChainLinearTransaction.d.ts +67 -0
  190. package/esm/generated/models/XChainLinearTransaction.js +9 -0
  191. package/esm/generated/models/XChainNonLinearTransaction.d.ts +64 -0
  192. package/esm/generated/models/XChainNonLinearTransaction.js +9 -0
  193. package/esm/generated/models/XChainSharedAssetBalance.d.ts +30 -0
  194. package/esm/generated/models/XChainVertex.d.ts +12 -0
  195. package/esm/generated/services/EvmService.d.ts +742 -0
  196. package/esm/generated/services/EvmService.js +517 -0
  197. package/esm/generated/services/HealthCheckService.d.ts +20 -0
  198. package/esm/generated/services/HealthCheckService.js +16 -0
  199. package/esm/generated/services/OperationsService.d.ts +31 -0
  200. package/esm/generated/services/OperationsService.js +28 -0
  201. package/esm/generated/services/PrimaryNetworkService.d.ts +392 -0
  202. package/esm/generated/services/PrimaryNetworkService.js +275 -0
  203. package/esm/index.d.ts +144 -0
  204. package/esm/index.js +51 -0
  205. package/package.json +11 -20
  206. package/CHANGELOG.md +0 -230
  207. package/__tests__/glacier-sdk.test.js +0 -7
  208. package/dist/index.d.ts.map +0 -1
  209. package/dist/index.js.map +0 -1
  210. package/dist/src/generated/models.d.ts +0 -385
  211. package/dist/src/generated/models.d.ts.map +0 -1
  212. package/dist/src/glacierClient.d.ts +0 -93
  213. package/dist/src/glacierClient.d.ts.map +0 -1
  214. package/dist/src/types.d.ts +0 -13
  215. package/dist/src/types.d.ts.map +0 -1
  216. package/index.ts +0 -2
  217. package/rollup.config.js +0 -33
  218. package/src/generated/models.ts +0 -460
  219. package/src/glacierClient.ts +0 -190
  220. package/src/types.ts +0 -6
  221. package/swagger/generateModels.js +0 -40
  222. package/tsconfig.json +0 -7
@@ -0,0 +1,392 @@
1
+ import { BlockchainId } from '../models/BlockchainId.js';
2
+ import { CChainExportTransaction } from '../models/CChainExportTransaction.js';
3
+ import { CChainImportTransaction } from '../models/CChainImportTransaction.js';
4
+ import { ChainAddressChainIdMapListResponse } from '../models/ChainAddressChainIdMapListResponse.js';
5
+ import { GetPrimaryNetworkBlockResponse } from '../models/GetPrimaryNetworkBlockResponse.js';
6
+ import { ListCChainAtomicBalancesResponse } from '../models/ListCChainAtomicBalancesResponse.js';
7
+ import { ListCChainAtomicTransactionsResponse } from '../models/ListCChainAtomicTransactionsResponse.js';
8
+ import { ListPChainBalancesResponse } from '../models/ListPChainBalancesResponse.js';
9
+ import { ListPChainTransactionsResponse } from '../models/ListPChainTransactionsResponse.js';
10
+ import { ListPChainUtxosResponse } from '../models/ListPChainUtxosResponse.js';
11
+ import { ListPrimaryNetworkBlocksResponse } from '../models/ListPrimaryNetworkBlocksResponse.js';
12
+ import { ListUtxosResponse } from '../models/ListUtxosResponse.js';
13
+ import { ListXChainBalancesResponse } from '../models/ListXChainBalancesResponse.js';
14
+ import { ListXChainTransactionsResponse } from '../models/ListXChainTransactionsResponse.js';
15
+ import { ListXChainVerticesResponse } from '../models/ListXChainVerticesResponse.js';
16
+ import { Network } from '../models/Network.js';
17
+ import { PChainId } from '../models/PChainId.js';
18
+ import { PChainTransaction } from '../models/PChainTransaction.js';
19
+ import { SortOrder } from '../models/SortOrder.js';
20
+ import { XChainAssetDetails } from '../models/XChainAssetDetails.js';
21
+ import { XChainId } from '../models/XChainId.js';
22
+ import { XChainLinearTransaction } from '../models/XChainLinearTransaction.js';
23
+ import { XChainNonLinearTransaction } from '../models/XChainNonLinearTransaction.js';
24
+ import { XChainVertex } from '../models/XChainVertex.js';
25
+ import { CancelablePromise } from '../core/CancelablePromise.js';
26
+ import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
27
+
28
+ declare class PrimaryNetworkService {
29
+ readonly httpRequest: BaseHttpRequest;
30
+ constructor(httpRequest: BaseHttpRequest);
31
+ /**
32
+ * Returns the details of the supplied transaction hash.
33
+ * @returns any
34
+ * @throws ApiError
35
+ */
36
+ getTxByHash({ blockchainId, network, txHash, }: {
37
+ /**
38
+ * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
39
+ */
40
+ blockchainId: BlockchainId;
41
+ /**
42
+ * Either mainnet or a testnet.
43
+ */
44
+ network: Network;
45
+ /**
46
+ * A primary network (P or X chain) transaction hash.
47
+ */
48
+ txHash: string;
49
+ }): CancelablePromise<(PChainTransaction | XChainNonLinearTransaction | XChainLinearTransaction | CChainExportTransaction | CChainImportTransaction)>;
50
+ /**
51
+ * Returns latest transactions. If addresses are supplied, returns transactions for those addresses.
52
+ * @returns any
53
+ * @throws ApiError
54
+ */
55
+ listLatestPrimaryNetworkTransactions({ blockchainId, network, addresses, pageSize, pageToken, sortOrder, }: {
56
+ /**
57
+ * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
58
+ */
59
+ blockchainId: BlockchainId;
60
+ /**
61
+ * Either mainnet or a testnet.
62
+ */
63
+ network: Network;
64
+ /**
65
+ * 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".
66
+ */
67
+ addresses?: string;
68
+ /**
69
+ * The maximum number of items to return. The minimum page size
70
+ * is 1. The maximum pageSize is 100.
71
+ */
72
+ pageSize?: number;
73
+ /**
74
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
75
+ */
76
+ pageToken?: string;
77
+ /**
78
+ * The order by which to sort results. Use "asc" for ascending
79
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
80
+ * query parameter, if provided.
81
+ */
82
+ sortOrder?: SortOrder;
83
+ }): CancelablePromise<(ListPChainTransactionsResponse | ListXChainTransactionsResponse | ListCChainAtomicTransactionsResponse)>;
84
+ /**
85
+ * Returns active staking transactions for supplied addresses.
86
+ * @returns ListPChainTransactionsResponse
87
+ * @throws ApiError
88
+ */
89
+ listActivePrimaryNetworkStakingTransactions({ blockchainId, network, addresses, pageSize, pageToken, sortOrder, }: {
90
+ /**
91
+ * A supported chain name for P-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain instead!
92
+ */
93
+ blockchainId: PChainId;
94
+ /**
95
+ * Either mainnet or a testnet.
96
+ */
97
+ network: Network;
98
+ /**
99
+ * 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".
100
+ */
101
+ addresses?: string;
102
+ /**
103
+ * The maximum number of items to return. The minimum page size
104
+ * is 1. The maximum pageSize is 100.
105
+ */
106
+ pageSize?: number;
107
+ /**
108
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
109
+ */
110
+ pageToken?: string;
111
+ /**
112
+ * The order by which to sort results. Use "asc" for ascending
113
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
114
+ * query parameter, if provided.
115
+ */
116
+ sortOrder?: SortOrder;
117
+ }): CancelablePromise<ListPChainTransactionsResponse>;
118
+ /**
119
+ * Returns a list of UTXOs for the supplied addresses.
120
+ * @returns any
121
+ * @throws ApiError
122
+ */
123
+ getUtxosByAddresses({ blockchainId, network, addresses, pageSize, pageToken, assetId, sortOrder, }: {
124
+ /**
125
+ * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
126
+ */
127
+ blockchainId: BlockchainId;
128
+ /**
129
+ * Either mainnet or a testnet.
130
+ */
131
+ network: Network;
132
+ /**
133
+ * 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".
134
+ */
135
+ addresses?: string;
136
+ /**
137
+ * The maximum number of items to return. The minimum page size
138
+ * is 1. The maximum pageSize is 100.
139
+ */
140
+ pageSize?: number;
141
+ /**
142
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
143
+ */
144
+ pageToken?: string;
145
+ /**
146
+ * Asset ID for any asset (only applicable X-Chain)
147
+ */
148
+ assetId?: string;
149
+ /**
150
+ * The order by which to sort results. Use "asc" for ascending
151
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
152
+ * query parameter, if provided.
153
+ */
154
+ sortOrder?: SortOrder;
155
+ }): CancelablePromise<(ListPChainUtxosResponse | ListUtxosResponse)>;
156
+ /**
157
+ * Returns balance for P-Chain, X-Chain, and C-Chain (only shared memory balance for C-Chain).
158
+ * @returns any
159
+ * @throws ApiError
160
+ */
161
+ getBalancesByAddresses({ blockchainId, network, blockTimestamp, addresses, }: {
162
+ /**
163
+ * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
164
+ */
165
+ blockchainId: BlockchainId;
166
+ /**
167
+ * Either mainnet or a testnet.
168
+ */
169
+ network: Network;
170
+ /**
171
+ * An epoch timestamp in seconds.
172
+ * Balance will be calculated as of this timestamp.
173
+ */
174
+ blockTimestamp?: number;
175
+ /**
176
+ * 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".
177
+ */
178
+ addresses?: string;
179
+ }): CancelablePromise<(ListPChainBalancesResponse | ListXChainBalancesResponse | ListCChainAtomicBalancesResponse)>;
180
+ /**
181
+ * Returns block by block_height or block_hash on P-Chain, X-Chain (Cortina), C-Chain (hexadecimal for C-Chain).
182
+ * @returns GetPrimaryNetworkBlockResponse
183
+ * @throws ApiError
184
+ */
185
+ getBlockById({ blockchainId, network, blockId, }: {
186
+ /**
187
+ * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
188
+ */
189
+ blockchainId: BlockchainId;
190
+ /**
191
+ * Either mainnet or a testnet.
192
+ */
193
+ network: Network;
194
+ /**
195
+ * A block identifier which is either a block number or the block hash.
196
+ */
197
+ blockId: string;
198
+ }): CancelablePromise<GetPrimaryNetworkBlockResponse>;
199
+ /**
200
+ * Returns latest blocks proposed by a given NodeID, up to user defined limit.
201
+ * @returns ListPrimaryNetworkBlocksResponse
202
+ * @throws ApiError
203
+ */
204
+ listPrimaryNetworkBlocksByNodeId({ blockchainId, network, nodeId, pageSize, pageToken, }: {
205
+ /**
206
+ * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
207
+ */
208
+ blockchainId: BlockchainId;
209
+ /**
210
+ * Either mainnet or a testnet.
211
+ */
212
+ network: Network;
213
+ /**
214
+ * A primary network (P or X chain) nodeId.
215
+ */
216
+ nodeId: string;
217
+ /**
218
+ * The maximum number of items to return. The minimum page size
219
+ * is 1. The maximum pageSize is 100.
220
+ */
221
+ pageSize?: number;
222
+ /**
223
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
224
+ */
225
+ pageToken?: string;
226
+ }): CancelablePromise<ListPrimaryNetworkBlocksResponse>;
227
+ /**
228
+ * Returns latest blocks, up to user defined limit on P-Chain, X-Chain or C-Chain.
229
+ * @returns ListPrimaryNetworkBlocksResponse
230
+ * @throws ApiError
231
+ */
232
+ listLatestPrimaryNetworkBlocks({ blockchainId, network, pageSize, pageToken, }: {
233
+ /**
234
+ * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain, x-chain or c-chain instead!
235
+ */
236
+ blockchainId: BlockchainId;
237
+ /**
238
+ * Either mainnet or a testnet.
239
+ */
240
+ network: Network;
241
+ /**
242
+ * The maximum number of items to return. The minimum page size
243
+ * is 1. The maximum pageSize is 100.
244
+ */
245
+ pageSize?: number;
246
+ /**
247
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
248
+ */
249
+ pageToken?: string;
250
+ }): CancelablePromise<ListPrimaryNetworkBlocksResponse>;
251
+ /**
252
+ * Returns latest vertices, up to user defined limit on X-Chain.
253
+ * @returns ListXChainVerticesResponse
254
+ * @throws ApiError
255
+ */
256
+ listLatestXChainVertices({ blockchainId, network, pageSize, pageToken, }: {
257
+ /**
258
+ * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
259
+ */
260
+ blockchainId: XChainId;
261
+ /**
262
+ * Either mainnet or a testnet.
263
+ */
264
+ network: Network;
265
+ /**
266
+ * The maximum number of items to return. The minimum page size
267
+ * is 1. The maximum pageSize is 100.
268
+ */
269
+ pageSize?: number;
270
+ /**
271
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
272
+ */
273
+ pageToken?: string;
274
+ }): CancelablePromise<ListXChainVerticesResponse>;
275
+ /**
276
+ * Returns one vertex with the provided vertex hash on X-Chain.
277
+ * @returns XChainVertex
278
+ * @throws ApiError
279
+ */
280
+ getVertexByHash({ vertexHash, blockchainId, network, }: {
281
+ /**
282
+ * A vertex hash string.
283
+ */
284
+ vertexHash: string;
285
+ /**
286
+ * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
287
+ */
288
+ blockchainId: XChainId;
289
+ /**
290
+ * Either mainnet or a testnet.
291
+ */
292
+ network: Network;
293
+ }): CancelablePromise<XChainVertex>;
294
+ /**
295
+ * Returns vertices with the provided vertex height on X-Chain.
296
+ * @returns ListXChainVerticesResponse
297
+ * @throws ApiError
298
+ */
299
+ getVertexByHeight({ vertexHeight, blockchainId, network, pageSize, pageToken, sortOrder, }: {
300
+ /**
301
+ * The height of a vertex.
302
+ */
303
+ vertexHeight: number;
304
+ /**
305
+ * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
306
+ */
307
+ blockchainId: XChainId;
308
+ /**
309
+ * Either mainnet or a testnet.
310
+ */
311
+ network: Network;
312
+ /**
313
+ * The maximum number of items to return. The minimum page size
314
+ * is 1. The maximum pageSize is 100.
315
+ */
316
+ pageSize?: number;
317
+ /**
318
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
319
+ */
320
+ pageToken?: string;
321
+ /**
322
+ * The order by which to sort results. Use "asc" for ascending
323
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
324
+ * query parameter, if provided.
325
+ */
326
+ sortOrder?: SortOrder;
327
+ }): CancelablePromise<ListXChainVerticesResponse>;
328
+ /**
329
+ * Returns asset details corresponding to the asset id on X-Chain.
330
+ * @returns XChainAssetDetails
331
+ * @throws ApiError
332
+ */
333
+ getAssetDetails({ blockchainId, network, assetId, }: {
334
+ /**
335
+ * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
336
+ */
337
+ blockchainId: XChainId;
338
+ /**
339
+ * Either mainnet or a testnet.
340
+ */
341
+ network: Network;
342
+ /**
343
+ * Asset ID for any asset on X-Chain
344
+ */
345
+ assetId: string;
346
+ }): CancelablePromise<XChainAssetDetails>;
347
+ /**
348
+ * Returns asset transactions corresponding to the asset id on X-Chain.
349
+ * @returns ListXChainTransactionsResponse
350
+ * @throws ApiError
351
+ */
352
+ getAssetTransactions({ blockchainId, network, assetId, pageSize, pageToken, }: {
353
+ /**
354
+ * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
355
+ */
356
+ blockchainId: XChainId;
357
+ /**
358
+ * Either mainnet or a testnet.
359
+ */
360
+ network: Network;
361
+ /**
362
+ * Asset ID for any asset on X-Chain
363
+ */
364
+ assetId: string;
365
+ /**
366
+ * The maximum number of items to return. The minimum page size
367
+ * is 1. The maximum pageSize is 100.
368
+ */
369
+ pageSize?: number;
370
+ /**
371
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
372
+ */
373
+ pageToken?: string;
374
+ }): CancelablePromise<ListXChainTransactionsResponse>;
375
+ /**
376
+ * Return all address-mapped chain IDs that an address has been seen on chain before.
377
+ * @returns ChainAddressChainIdMapListResponse
378
+ * @throws ApiError
379
+ */
380
+ getChainAddresses({ addresses, network, }: {
381
+ /**
382
+ * 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".
383
+ */
384
+ addresses: string;
385
+ /**
386
+ * Either mainnet or a testnet.
387
+ */
388
+ network: Network;
389
+ }): CancelablePromise<ChainAddressChainIdMapListResponse>;
390
+ }
391
+
392
+ export { PrimaryNetworkService };
@@ -0,0 +1,275 @@
1
+ class PrimaryNetworkService {
2
+ constructor(httpRequest) {
3
+ this.httpRequest = httpRequest;
4
+ }
5
+ getTxByHash({
6
+ blockchainId,
7
+ network,
8
+ txHash
9
+ }) {
10
+ return this.httpRequest.request({
11
+ method: "GET",
12
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions/{txHash}",
13
+ path: {
14
+ "blockchainId": blockchainId,
15
+ "network": network,
16
+ "txHash": txHash
17
+ }
18
+ });
19
+ }
20
+ listLatestPrimaryNetworkTransactions({
21
+ blockchainId,
22
+ network,
23
+ addresses,
24
+ pageSize = 10,
25
+ pageToken,
26
+ sortOrder
27
+ }) {
28
+ return this.httpRequest.request({
29
+ method: "GET",
30
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions",
31
+ path: {
32
+ "blockchainId": blockchainId,
33
+ "network": network
34
+ },
35
+ query: {
36
+ "addresses": addresses,
37
+ "pageSize": pageSize,
38
+ "pageToken": pageToken,
39
+ "sortOrder": sortOrder
40
+ }
41
+ });
42
+ }
43
+ listActivePrimaryNetworkStakingTransactions({
44
+ blockchainId,
45
+ network,
46
+ addresses,
47
+ pageSize = 10,
48
+ pageToken,
49
+ sortOrder
50
+ }) {
51
+ return this.httpRequest.request({
52
+ method: "GET",
53
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions:listStaking",
54
+ path: {
55
+ "blockchainId": blockchainId,
56
+ "network": network
57
+ },
58
+ query: {
59
+ "addresses": addresses,
60
+ "pageSize": pageSize,
61
+ "pageToken": pageToken,
62
+ "sortOrder": sortOrder
63
+ }
64
+ });
65
+ }
66
+ getUtxosByAddresses({
67
+ blockchainId,
68
+ network,
69
+ addresses,
70
+ pageSize = 10,
71
+ pageToken,
72
+ assetId,
73
+ sortOrder
74
+ }) {
75
+ return this.httpRequest.request({
76
+ method: "GET",
77
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/utxos",
78
+ path: {
79
+ "blockchainId": blockchainId,
80
+ "network": network
81
+ },
82
+ query: {
83
+ "addresses": addresses,
84
+ "pageSize": pageSize,
85
+ "pageToken": pageToken,
86
+ "assetId": assetId,
87
+ "sortOrder": sortOrder
88
+ }
89
+ });
90
+ }
91
+ getBalancesByAddresses({
92
+ blockchainId,
93
+ network,
94
+ blockTimestamp,
95
+ addresses
96
+ }) {
97
+ return this.httpRequest.request({
98
+ method: "GET",
99
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/balances",
100
+ path: {
101
+ "blockchainId": blockchainId,
102
+ "network": network
103
+ },
104
+ query: {
105
+ "blockTimestamp": blockTimestamp,
106
+ "addresses": addresses
107
+ }
108
+ });
109
+ }
110
+ getBlockById({
111
+ blockchainId,
112
+ network,
113
+ blockId
114
+ }) {
115
+ return this.httpRequest.request({
116
+ method: "GET",
117
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/blocks/{blockId}",
118
+ path: {
119
+ "blockchainId": blockchainId,
120
+ "network": network,
121
+ "blockId": blockId
122
+ }
123
+ });
124
+ }
125
+ listPrimaryNetworkBlocksByNodeId({
126
+ blockchainId,
127
+ network,
128
+ nodeId,
129
+ pageSize = 10,
130
+ pageToken
131
+ }) {
132
+ return this.httpRequest.request({
133
+ method: "GET",
134
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/nodes/{nodeId}/blocks",
135
+ path: {
136
+ "blockchainId": blockchainId,
137
+ "network": network,
138
+ "nodeId": nodeId
139
+ },
140
+ query: {
141
+ "pageSize": pageSize,
142
+ "pageToken": pageToken
143
+ }
144
+ });
145
+ }
146
+ listLatestPrimaryNetworkBlocks({
147
+ blockchainId,
148
+ network,
149
+ pageSize = 10,
150
+ pageToken
151
+ }) {
152
+ return this.httpRequest.request({
153
+ method: "GET",
154
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/blocks",
155
+ path: {
156
+ "blockchainId": blockchainId,
157
+ "network": network
158
+ },
159
+ query: {
160
+ "pageSize": pageSize,
161
+ "pageToken": pageToken
162
+ }
163
+ });
164
+ }
165
+ listLatestXChainVertices({
166
+ blockchainId,
167
+ network,
168
+ pageSize = 10,
169
+ pageToken
170
+ }) {
171
+ return this.httpRequest.request({
172
+ method: "GET",
173
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices",
174
+ path: {
175
+ "blockchainId": blockchainId,
176
+ "network": network
177
+ },
178
+ query: {
179
+ "pageSize": pageSize,
180
+ "pageToken": pageToken
181
+ }
182
+ });
183
+ }
184
+ getVertexByHash({
185
+ vertexHash,
186
+ blockchainId,
187
+ network
188
+ }) {
189
+ return this.httpRequest.request({
190
+ method: "GET",
191
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices/{vertexHash}",
192
+ path: {
193
+ "vertexHash": vertexHash,
194
+ "blockchainId": blockchainId,
195
+ "network": network
196
+ }
197
+ });
198
+ }
199
+ getVertexByHeight({
200
+ vertexHeight,
201
+ blockchainId,
202
+ network,
203
+ pageSize = 10,
204
+ pageToken,
205
+ sortOrder
206
+ }) {
207
+ return this.httpRequest.request({
208
+ method: "GET",
209
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices:listByHeight",
210
+ path: {
211
+ "blockchainId": blockchainId,
212
+ "network": network
213
+ },
214
+ query: {
215
+ "vertexHeight": vertexHeight,
216
+ "pageSize": pageSize,
217
+ "pageToken": pageToken,
218
+ "sortOrder": sortOrder
219
+ }
220
+ });
221
+ }
222
+ getAssetDetails({
223
+ blockchainId,
224
+ network,
225
+ assetId
226
+ }) {
227
+ return this.httpRequest.request({
228
+ method: "GET",
229
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}",
230
+ path: {
231
+ "blockchainId": blockchainId,
232
+ "network": network,
233
+ "assetId": assetId
234
+ }
235
+ });
236
+ }
237
+ getAssetTransactions({
238
+ blockchainId,
239
+ network,
240
+ assetId,
241
+ pageSize = 10,
242
+ pageToken
243
+ }) {
244
+ return this.httpRequest.request({
245
+ method: "GET",
246
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}/transactions",
247
+ path: {
248
+ "blockchainId": blockchainId,
249
+ "network": network,
250
+ "assetId": assetId
251
+ },
252
+ query: {
253
+ "pageSize": pageSize,
254
+ "pageToken": pageToken
255
+ }
256
+ });
257
+ }
258
+ getChainAddresses({
259
+ addresses,
260
+ network
261
+ }) {
262
+ return this.httpRequest.request({
263
+ method: "GET",
264
+ url: "/v1/networks/{network}/addresses:listChainIds",
265
+ path: {
266
+ "network": network
267
+ },
268
+ query: {
269
+ "addresses": addresses
270
+ }
271
+ });
272
+ }
273
+ }
274
+
275
+ export { PrimaryNetworkService };