@avalabs/glacier-sdk 2.8.0-alpha.8 → 2.8.0-alpha.81

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 (203) hide show
  1. package/README.md +10 -0
  2. package/dist/index.d.ts +3091 -3
  3. package/dist/index.js +1480 -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/AssetType.d.ts +8 -0
  21. package/esm/generated/models/AssetType.js +9 -0
  22. package/esm/generated/models/Block.d.ts +15 -0
  23. package/esm/generated/models/BlockchainId.d.ts +9 -0
  24. package/esm/generated/models/BlockchainId.js +10 -0
  25. package/esm/generated/models/CChainAtomicBalances.d.ts +8 -0
  26. package/esm/generated/models/CChainExportTransaction.d.ts +58 -0
  27. package/esm/generated/models/CChainExportTransaction.js +8 -0
  28. package/esm/generated/models/CChainImportTransaction.d.ts +58 -0
  29. package/esm/generated/models/CChainImportTransaction.js +8 -0
  30. package/esm/generated/models/CChainSharedAssetBalance.d.ts +30 -0
  31. package/esm/generated/models/CPBlockchainId.d.ts +7 -0
  32. package/esm/generated/models/CPBlockchainId.js +8 -0
  33. package/esm/generated/models/CancelListingEventResponse.d.ts +5 -0
  34. package/esm/generated/models/ChainAddressChainIdMap.d.ts +8 -0
  35. package/esm/generated/models/ChainAddressChainIdMapListResponse.d.ts +7 -0
  36. package/esm/generated/models/ChainInfo.d.ts +22 -0
  37. package/esm/generated/models/CloseAuctionEventResponse.d.ts +6 -0
  38. package/esm/generated/models/CollectionMetrics.d.ts +40 -0
  39. package/esm/generated/models/CollectionSortByOption.d.ts +8 -0
  40. package/esm/generated/models/CollectionSortByOption.js +9 -0
  41. package/esm/generated/models/ContractType.d.ts +7 -0
  42. package/esm/generated/models/ContractType.js +8 -0
  43. package/esm/generated/models/CreateTransactionExportRequest.d.ts +11 -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 +14 -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 +27 -0
  54. package/esm/generated/models/Erc1155TransferDetails.d.ts +11 -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 +27 -0
  60. package/esm/generated/models/Erc20TransferDetails.d.ts +11 -0
  61. package/esm/generated/models/Erc721Token.d.ts +27 -0
  62. package/esm/generated/models/Erc721Token.js +8 -0
  63. package/esm/generated/models/Erc721TokenBalance.d.ts +31 -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 +26 -0
  67. package/esm/generated/models/Erc721TransferDetails.d.ts +10 -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/EvmNetworkOptions.d.ts +6 -0
  71. package/esm/generated/models/FullNativeTransactionDetails.d.ts +62 -0
  72. package/esm/generated/models/GetBlockResponse.d.ts +49 -0
  73. package/esm/generated/models/GetChainResponse.d.ts +22 -0
  74. package/esm/generated/models/GetContractInformationResponse.d.ts +58 -0
  75. package/esm/generated/models/GetNativeBalanceResponse.d.ts +10 -0
  76. package/esm/generated/models/GetTransactionResponse.d.ts +35 -0
  77. package/esm/generated/models/InternalTransaction.d.ts +33 -0
  78. package/esm/generated/models/InternalTransactionDetails.d.ts +17 -0
  79. package/esm/generated/models/InternalTransactionOpCall.d.ts +11 -0
  80. package/esm/generated/models/InternalTransactionOpCall.js +12 -0
  81. package/esm/generated/models/ListBlocksResponse.d.ts +11 -0
  82. package/esm/generated/models/ListCChainAtomicBalancesResponse.d.ts +7 -0
  83. package/esm/generated/models/ListCChainExportTxsResponse.d.ts +11 -0
  84. package/esm/generated/models/ListCChainImportTxsResponse.d.ts +11 -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/ListInternalTransactionsResponse.d.ts +11 -0
  94. package/esm/generated/models/ListListingsResponse.d.ts +11 -0
  95. package/esm/generated/models/ListNativeTransactionsResponse.d.ts +11 -0
  96. package/esm/generated/models/ListNftCollectionWithMetricsResponse.d.ts +11 -0
  97. package/esm/generated/models/ListPChainBalancesResponse.d.ts +7 -0
  98. package/esm/generated/models/ListPChainTransactionsResponse.d.ts +11 -0
  99. package/esm/generated/models/ListPChainUtxosResponse.d.ts +11 -0
  100. package/esm/generated/models/ListTransactionDetailsResponse.d.ts +11 -0
  101. package/esm/generated/models/ListTransfersResponse.d.ts +13 -0
  102. package/esm/generated/models/ListUtxosResponse.d.ts +11 -0
  103. package/esm/generated/models/ListXChainBalancesResponse.d.ts +7 -0
  104. package/esm/generated/models/ListXChainTransactionsResponse.d.ts +11 -0
  105. package/esm/generated/models/ListXChainVerticesResponse.d.ts +11 -0
  106. package/esm/generated/models/ListingCurrencyType.d.ts +6 -0
  107. package/esm/generated/models/ListingCurrencyType.js +7 -0
  108. package/esm/generated/models/ListingEventType.d.ts +8 -0
  109. package/esm/generated/models/ListingEventType.js +9 -0
  110. package/esm/generated/models/ListingResponse.d.ts +19 -0
  111. package/esm/generated/models/ListingType.d.ts +6 -0
  112. package/esm/generated/models/ListingType.js +7 -0
  113. package/esm/generated/models/ListingsSortByOption.d.ts +5 -0
  114. package/esm/generated/models/ListingsSortByOption.js +6 -0
  115. package/esm/generated/models/Method.d.ts +24 -0
  116. package/esm/generated/models/Money.d.ts +14 -0
  117. package/esm/generated/models/NativeTokenBalance.d.ts +41 -0
  118. package/esm/generated/models/NativeTransaction.d.ts +55 -0
  119. package/esm/generated/models/Network.d.ts +6 -0
  120. package/esm/generated/models/Network.js +7 -0
  121. package/esm/generated/models/NetworkToken.d.ts +23 -0
  122. package/esm/generated/models/NetworkTokenDetails.d.ts +18 -0
  123. package/esm/generated/models/NftCollection.d.ts +22 -0
  124. package/esm/generated/models/NftCollectionWithMetrics.d.ts +24 -0
  125. package/esm/generated/models/NftFilterOptionsProperty.d.ts +10 -0
  126. package/esm/generated/models/NftSearchBody.d.ts +10 -0
  127. package/esm/generated/models/NftSearchResultTypeOption.d.ts +6 -0
  128. package/esm/generated/models/NftSearchResultTypeOption.js +7 -0
  129. package/esm/generated/models/NftTokenMetadataStatus.d.ts +15 -0
  130. package/esm/generated/models/NftTokenMetadataStatus.js +16 -0
  131. package/esm/generated/models/OpenListingEventResponse.d.ts +17 -0
  132. package/esm/generated/models/OperationMetadata.d.ts +3 -0
  133. package/esm/generated/models/OperationStatusResponse.d.ts +14 -0
  134. package/esm/generated/models/PChainAsset.d.ts +6 -0
  135. package/esm/generated/models/PChainBalance.d.ts +30 -0
  136. package/esm/generated/models/PChainConsumedUtxo.d.ts +9 -0
  137. package/esm/generated/models/PChainEmittedUtxo.d.ts +13 -0
  138. package/esm/generated/models/PChainId.d.ts +6 -0
  139. package/esm/generated/models/PChainId.js +7 -0
  140. package/esm/generated/models/PChainTransaction.d.ts +45 -0
  141. package/esm/generated/models/PChainUtxo.d.ts +20 -0
  142. package/esm/generated/models/PaginationParams.d.ts +13 -0
  143. package/esm/generated/models/PrimaryNetworkOptions.d.ts +6 -0
  144. package/esm/generated/models/ProposerDetails.d.ts +9 -0
  145. package/esm/generated/models/PurchaseListingEventResponse.d.ts +17 -0
  146. package/esm/generated/models/ResourceLink.d.ts +8 -0
  147. package/esm/generated/models/ResourceLinkType.d.ts +18 -0
  148. package/esm/generated/models/ResourceLinkType.js +19 -0
  149. package/esm/generated/models/ReviewStatus.d.ts +6 -0
  150. package/esm/generated/models/ReviewStatus.js +7 -0
  151. package/esm/generated/models/RichAddress.d.ts +26 -0
  152. package/esm/generated/models/SortOrder.d.ts +6 -0
  153. package/esm/generated/models/SortOrder.js +7 -0
  154. package/esm/generated/models/TokenWithPrice.d.ts +28 -0
  155. package/esm/generated/models/TransactionDetails.d.ts +36 -0
  156. package/esm/generated/models/TransactionMethodType.d.ts +7 -0
  157. package/esm/generated/models/TransactionMethodType.js +8 -0
  158. package/esm/generated/models/TransactionStatus.d.ts +6 -0
  159. package/esm/generated/models/TransactionStatus.js +7 -0
  160. package/esm/generated/models/TransactionVertexDetail.d.ts +16 -0
  161. package/esm/generated/models/TrendingTimeframe.d.ts +7 -0
  162. package/esm/generated/models/TrendingTimeframe.js +8 -0
  163. package/esm/generated/models/UtilityAddresses.d.ts +5 -0
  164. package/esm/generated/models/Utxo.d.ts +60 -0
  165. package/esm/generated/models/UtxoCredential.d.ts +12 -0
  166. package/esm/generated/models/VmName.d.ts +7 -0
  167. package/esm/generated/models/VmName.js +8 -0
  168. package/esm/generated/models/XChainAssetBalance.d.ts +29 -0
  169. package/esm/generated/models/XChainAssetDetails.d.ts +32 -0
  170. package/esm/generated/models/XChainBalances.d.ts +17 -0
  171. package/esm/generated/models/XChainId.d.ts +6 -0
  172. package/esm/generated/models/XChainId.js +7 -0
  173. package/esm/generated/models/XChainSharedAssetBalance.d.ts +30 -0
  174. package/esm/generated/models/XChainTransaction.d.ts +51 -0
  175. package/esm/generated/models/XChainVertex.d.ts +12 -0
  176. package/esm/generated/services/EvmService.d.ts +734 -0
  177. package/esm/generated/services/EvmService.js +518 -0
  178. package/esm/generated/services/HealthCheckService.d.ts +20 -0
  179. package/esm/generated/services/HealthCheckService.js +16 -0
  180. package/esm/generated/services/OperationsService.d.ts +30 -0
  181. package/esm/generated/services/OperationsService.js +28 -0
  182. package/esm/generated/services/PrimaryNetworkService.d.ts +359 -0
  183. package/esm/generated/services/PrimaryNetworkService.js +252 -0
  184. package/esm/index.d.ts +135 -0
  185. package/esm/index.js +41 -0
  186. package/package.json +12 -15
  187. package/CHANGELOG.md +0 -212
  188. package/__tests__/glacier-sdk.test.js +0 -7
  189. package/dist/index.d.ts.map +0 -1
  190. package/dist/index.js.map +0 -1
  191. package/dist/src/generated/models.d.ts +0 -385
  192. package/dist/src/generated/models.d.ts.map +0 -1
  193. package/dist/src/glacierClient.d.ts +0 -93
  194. package/dist/src/glacierClient.d.ts.map +0 -1
  195. package/dist/src/types.d.ts +0 -13
  196. package/dist/src/types.d.ts.map +0 -1
  197. package/index.ts +0 -2
  198. package/rollup.config.js +0 -33
  199. package/src/generated/models.ts +0 -460
  200. package/src/glacierClient.ts +0 -190
  201. package/src/types.ts +0 -6
  202. package/swagger/generateModels.js +0 -40
  203. package/tsconfig.json +0 -7
@@ -0,0 +1,359 @@
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 { CPBlockchainId } from '../models/CPBlockchainId.js';
6
+ import { ListBlocksResponse } from '../models/ListBlocksResponse.js';
7
+ import { ListCChainAtomicBalancesResponse } from '../models/ListCChainAtomicBalancesResponse.js';
8
+ import { ListCChainExportTxsResponse } from '../models/ListCChainExportTxsResponse.js';
9
+ import { ListCChainImportTxsResponse } from '../models/ListCChainImportTxsResponse.js';
10
+ import { ListPChainBalancesResponse } from '../models/ListPChainBalancesResponse.js';
11
+ import { ListPChainTransactionsResponse } from '../models/ListPChainTransactionsResponse.js';
12
+ import { ListPChainUtxosResponse } from '../models/ListPChainUtxosResponse.js';
13
+ import { ListUtxosResponse } from '../models/ListUtxosResponse.js';
14
+ import { ListXChainBalancesResponse } from '../models/ListXChainBalancesResponse.js';
15
+ import { ListXChainTransactionsResponse } from '../models/ListXChainTransactionsResponse.js';
16
+ import { ListXChainVerticesResponse } from '../models/ListXChainVerticesResponse.js';
17
+ import { Network } from '../models/Network.js';
18
+ import { PChainId } from '../models/PChainId.js';
19
+ import { PChainTransaction } from '../models/PChainTransaction.js';
20
+ import { SortOrder } from '../models/SortOrder.js';
21
+ import { XChainAssetDetails } from '../models/XChainAssetDetails.js';
22
+ import { XChainId } from '../models/XChainId.js';
23
+ import { XChainTransaction } from '../models/XChainTransaction.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 | XChainTransaction | 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 | ListCChainExportTxsResponse | ListCChainImportTxsResponse)>;
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, 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
+ * 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".
172
+ */
173
+ addresses?: string;
174
+ }): CancelablePromise<(ListPChainBalancesResponse | ListXChainBalancesResponse | ListCChainAtomicBalancesResponse)>;
175
+ /**
176
+ * Returns block by block_height or block_hash on P-Chain or C-Chain (hexadecimal for C-Chain).
177
+ * @returns ListBlocksResponse
178
+ * @throws ApiError
179
+ */
180
+ getBlockById({ blockchainId, network, blockId, }: {
181
+ /**
182
+ * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain or c-chain instead!
183
+ */
184
+ blockchainId: CPBlockchainId;
185
+ /**
186
+ * Either mainnet or a testnet.
187
+ */
188
+ network: Network;
189
+ /**
190
+ * A block identifier which is either a block number or the block hash.
191
+ */
192
+ blockId: string;
193
+ }): CancelablePromise<ListBlocksResponse>;
194
+ /**
195
+ * Returns latest blocks, up to user defined limit on P-Chain or C-Chain.
196
+ * @returns ListBlocksResponse
197
+ * @throws ApiError
198
+ */
199
+ listLatestPrimaryNetworkBlocks({ blockchainId, network, pageSize, pageToken, }: {
200
+ /**
201
+ * A supported chain name. BlockchainId values will be deprecated in a future release. Please use chain names like p-chain or c-chain instead!
202
+ */
203
+ blockchainId: CPBlockchainId;
204
+ /**
205
+ * Either mainnet or a testnet.
206
+ */
207
+ network: Network;
208
+ /**
209
+ * The maximum number of items to return. The minimum page size
210
+ * is 1. The maximum pageSize is 100.
211
+ */
212
+ pageSize?: number;
213
+ /**
214
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
215
+ */
216
+ pageToken?: string;
217
+ }): CancelablePromise<ListBlocksResponse>;
218
+ /**
219
+ * Returns latest vertices, up to user defined limit on X-Chain.
220
+ * @returns ListXChainVerticesResponse
221
+ * @throws ApiError
222
+ */
223
+ listLatestXChainVertices({ blockchainId, network, pageSize, pageToken, }: {
224
+ /**
225
+ * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
226
+ */
227
+ blockchainId: XChainId;
228
+ /**
229
+ * Either mainnet or a testnet.
230
+ */
231
+ network: Network;
232
+ /**
233
+ * The maximum number of items to return. The minimum page size
234
+ * is 1. The maximum pageSize is 100.
235
+ */
236
+ pageSize?: number;
237
+ /**
238
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
239
+ */
240
+ pageToken?: string;
241
+ }): CancelablePromise<ListXChainVerticesResponse>;
242
+ /**
243
+ * Returns one vertex with the provided vertex hash on X-Chain.
244
+ * @returns XChainVertex
245
+ * @throws ApiError
246
+ */
247
+ getVertexByHash({ vertexHash, blockchainId, network, }: {
248
+ /**
249
+ * A vertex hash string.
250
+ */
251
+ vertexHash: string;
252
+ /**
253
+ * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
254
+ */
255
+ blockchainId: XChainId;
256
+ /**
257
+ * Either mainnet or a testnet.
258
+ */
259
+ network: Network;
260
+ }): CancelablePromise<XChainVertex>;
261
+ /**
262
+ * Returns vertices with the provided vertex height on X-Chain.
263
+ * @returns ListXChainVerticesResponse
264
+ * @throws ApiError
265
+ */
266
+ getVertexByHeight({ vertexHeight, blockchainId, network, pageSize, pageToken, sortOrder, }: {
267
+ /**
268
+ * The height of a vertex.
269
+ */
270
+ vertexHeight: number;
271
+ /**
272
+ * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
273
+ */
274
+ blockchainId: XChainId;
275
+ /**
276
+ * Either mainnet or a testnet.
277
+ */
278
+ network: Network;
279
+ /**
280
+ * The maximum number of items to return. The minimum page size
281
+ * is 1. The maximum pageSize is 100.
282
+ */
283
+ pageSize?: number;
284
+ /**
285
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
286
+ */
287
+ pageToken?: string;
288
+ /**
289
+ * The order by which to sort results. Use "asc" for ascending
290
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
291
+ * query parameter, if provided.
292
+ */
293
+ sortOrder?: SortOrder;
294
+ }): CancelablePromise<ListXChainVerticesResponse>;
295
+ /**
296
+ * Returns asset details corresponding to the asset id on X-Chain.
297
+ * @returns XChainAssetDetails
298
+ * @throws ApiError
299
+ */
300
+ getAssetDetails({ assetId, blockchainId, network, }: {
301
+ /**
302
+ * Asset ID for any asset on X-Chain
303
+ */
304
+ assetId: string;
305
+ /**
306
+ * 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!
307
+ */
308
+ blockchainId: BlockchainId;
309
+ /**
310
+ * Either mainnet or a testnet.
311
+ */
312
+ network: Network;
313
+ }): CancelablePromise<XChainAssetDetails>;
314
+ /**
315
+ * Returns asset transactions corresponding to the asset id on X-Chain.
316
+ * @returns ListXChainTransactionsResponse
317
+ * @throws ApiError
318
+ */
319
+ getAssetTransactions({ blockchainId, network, assetId, pageSize, pageToken, }: {
320
+ /**
321
+ * A supported chain name for X-Chain. BlockchainId values will be deprecated in a future release. Please use chain names like x-chain instead!
322
+ */
323
+ blockchainId: XChainId;
324
+ /**
325
+ * Either mainnet or a testnet.
326
+ */
327
+ network: Network;
328
+ /**
329
+ * Asset ID for any asset on X-Chain
330
+ */
331
+ assetId: string;
332
+ /**
333
+ * The maximum number of items to return. The minimum page size
334
+ * is 1. The maximum pageSize is 100.
335
+ */
336
+ pageSize?: number;
337
+ /**
338
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
339
+ */
340
+ pageToken?: string;
341
+ }): CancelablePromise<ListXChainTransactionsResponse>;
342
+ /**
343
+ * Return all address-mapped chain IDs that an address has been seen on chain before.
344
+ * @returns ChainAddressChainIdMapListResponse
345
+ * @throws ApiError
346
+ */
347
+ getChainAddresses({ addresses, network, }: {
348
+ /**
349
+ * 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".
350
+ */
351
+ addresses: string;
352
+ /**
353
+ * Either mainnet or a testnet.
354
+ */
355
+ network: Network;
356
+ }): CancelablePromise<ChainAddressChainIdMapListResponse>;
357
+ }
358
+
359
+ export { PrimaryNetworkService };
@@ -0,0 +1,252 @@
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
+ addresses
95
+ }) {
96
+ return this.httpRequest.request({
97
+ method: "GET",
98
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/balances",
99
+ path: {
100
+ "blockchainId": blockchainId,
101
+ "network": network
102
+ },
103
+ query: {
104
+ "addresses": addresses
105
+ }
106
+ });
107
+ }
108
+ getBlockById({
109
+ blockchainId,
110
+ network,
111
+ blockId
112
+ }) {
113
+ return this.httpRequest.request({
114
+ method: "GET",
115
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/blocks/{blockId}",
116
+ path: {
117
+ "blockchainId": blockchainId,
118
+ "network": network,
119
+ "blockId": blockId
120
+ }
121
+ });
122
+ }
123
+ listLatestPrimaryNetworkBlocks({
124
+ blockchainId,
125
+ network,
126
+ pageSize = 10,
127
+ pageToken
128
+ }) {
129
+ return this.httpRequest.request({
130
+ method: "GET",
131
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/blocks",
132
+ path: {
133
+ "blockchainId": blockchainId,
134
+ "network": network
135
+ },
136
+ query: {
137
+ "pageSize": pageSize,
138
+ "pageToken": pageToken
139
+ }
140
+ });
141
+ }
142
+ listLatestXChainVertices({
143
+ blockchainId,
144
+ network,
145
+ pageSize = 10,
146
+ pageToken
147
+ }) {
148
+ return this.httpRequest.request({
149
+ method: "GET",
150
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices",
151
+ path: {
152
+ "blockchainId": blockchainId,
153
+ "network": network
154
+ },
155
+ query: {
156
+ "pageSize": pageSize,
157
+ "pageToken": pageToken
158
+ }
159
+ });
160
+ }
161
+ getVertexByHash({
162
+ vertexHash,
163
+ blockchainId,
164
+ network
165
+ }) {
166
+ return this.httpRequest.request({
167
+ method: "GET",
168
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices/{vertexHash}",
169
+ path: {
170
+ "vertexHash": vertexHash,
171
+ "blockchainId": blockchainId,
172
+ "network": network
173
+ }
174
+ });
175
+ }
176
+ getVertexByHeight({
177
+ vertexHeight,
178
+ blockchainId,
179
+ network,
180
+ pageSize = 10,
181
+ pageToken,
182
+ sortOrder
183
+ }) {
184
+ return this.httpRequest.request({
185
+ method: "GET",
186
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices:listByHeight",
187
+ path: {
188
+ "blockchainId": blockchainId,
189
+ "network": network
190
+ },
191
+ query: {
192
+ "vertexHeight": vertexHeight,
193
+ "pageSize": pageSize,
194
+ "pageToken": pageToken,
195
+ "sortOrder": sortOrder
196
+ }
197
+ });
198
+ }
199
+ getAssetDetails({
200
+ assetId,
201
+ blockchainId,
202
+ network
203
+ }) {
204
+ return this.httpRequest.request({
205
+ method: "GET",
206
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}",
207
+ path: {
208
+ "assetId": assetId,
209
+ "blockchainId": blockchainId,
210
+ "network": network
211
+ }
212
+ });
213
+ }
214
+ getAssetTransactions({
215
+ blockchainId,
216
+ network,
217
+ assetId,
218
+ pageSize = 10,
219
+ pageToken
220
+ }) {
221
+ return this.httpRequest.request({
222
+ method: "GET",
223
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}/transactions",
224
+ path: {
225
+ "blockchainId": blockchainId,
226
+ "network": network,
227
+ "assetId": assetId
228
+ },
229
+ query: {
230
+ "pageSize": pageSize,
231
+ "pageToken": pageToken
232
+ }
233
+ });
234
+ }
235
+ getChainAddresses({
236
+ addresses,
237
+ network
238
+ }) {
239
+ return this.httpRequest.request({
240
+ method: "GET",
241
+ url: "/v1/networks/{network}/addresses:listChainIds",
242
+ path: {
243
+ "network": network
244
+ },
245
+ query: {
246
+ "addresses": addresses
247
+ }
248
+ });
249
+ }
250
+ }
251
+
252
+ export { PrimaryNetworkService };