@avalabs/glacier-sdk 2.8.0-alpha.89 → 2.8.0-alpha.9

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