@avalabs/glacier-sdk 2.8.0-alpha.122 → 2.8.0-alpha.124

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 (70) hide show
  1. package/dist/index.d.ts +2254 -2088
  2. package/dist/index.js +298 -222
  3. package/esm/generated/Glacier.d.ts +20 -2
  4. package/esm/generated/Glacier.js +21 -3
  5. package/esm/generated/core/OpenAPI.js +1 -1
  6. package/esm/generated/models/ActiveDelegatorDetails.d.ts +15 -0
  7. package/esm/generated/models/ActiveValidatorDetails.d.ts +20 -0
  8. package/esm/generated/models/CompletedDelegatorDetails.d.ts +15 -0
  9. package/esm/generated/models/ContractDeploymentDetails.d.ts +13 -0
  10. package/esm/generated/models/DelegationStatusType.d.ts +7 -0
  11. package/esm/generated/models/DelegationStatusType.js +8 -0
  12. package/esm/generated/models/Erc1155Contract.d.ts +36 -0
  13. package/esm/generated/models/Erc1155Contract.js +8 -0
  14. package/esm/generated/models/Erc20Contract.d.ts +40 -0
  15. package/esm/generated/models/Erc20Contract.js +8 -0
  16. package/esm/generated/models/Erc721Contract.d.ts +36 -0
  17. package/esm/generated/models/Erc721Contract.js +8 -0
  18. package/esm/generated/models/ImageAsset.d.ts +12 -0
  19. package/esm/generated/models/ListContractsResponse.d.ts +14 -0
  20. package/esm/generated/models/ListDelegatorDetailsResponse.d.ts +16 -0
  21. package/esm/generated/models/ListValidatorDetailsResponse.d.ts +6 -1
  22. package/esm/generated/models/PendingDelegatorDetails.d.ts +15 -0
  23. package/esm/generated/models/PendingValidatorDetails.d.ts +12 -0
  24. package/esm/generated/models/PrimaryNetwork.d.ts +6 -0
  25. package/esm/generated/models/PrimaryNetwork.js +7 -0
  26. package/esm/generated/models/PrimaryNetworkChainInfo.d.ts +5 -2
  27. package/esm/generated/models/PrimaryNetworkChainName.d.ts +7 -0
  28. package/esm/generated/models/PrimaryNetworkChainName.js +8 -0
  29. package/esm/generated/models/StakingDistribution.d.ts +1 -0
  30. package/esm/generated/models/UnknownContract.d.ts +32 -0
  31. package/esm/generated/models/UnknownContract.js +8 -0
  32. package/esm/generated/models/ValidationStatusType.d.ts +3 -1
  33. package/esm/generated/models/ValidationStatusType.js +2 -0
  34. package/esm/generated/models/ValidatorsDetails.d.ts +1 -0
  35. package/esm/generated/services/EvmBalancesService.d.ts +177 -0
  36. package/esm/generated/services/EvmBalancesService.js +116 -0
  37. package/esm/generated/services/EvmBlocksService.d.ts +47 -0
  38. package/esm/generated/services/EvmBlocksService.js +37 -0
  39. package/esm/generated/services/EvmChainsService.d.ts +36 -0
  40. package/esm/generated/services/EvmChainsService.js +29 -0
  41. package/esm/generated/services/{EvmService.d.ts → EvmTransactionsService.d.ts} +9 -314
  42. package/esm/generated/services/{EvmService.js → EvmTransactionsService.js} +7 -219
  43. package/esm/generated/services/PrimaryNetworkBalancesService.d.ts +40 -0
  44. package/esm/generated/services/PrimaryNetworkBalancesService.js +26 -0
  45. package/esm/generated/services/PrimaryNetworkBlocksService.d.ts +85 -0
  46. package/esm/generated/services/PrimaryNetworkBlocksService.js +62 -0
  47. package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +69 -0
  48. package/esm/generated/services/PrimaryNetworkRewardsService.js +49 -0
  49. package/esm/generated/services/PrimaryNetworkService.d.ts +51 -444
  50. package/esm/generated/services/PrimaryNetworkService.js +34 -305
  51. package/esm/generated/services/PrimaryNetworkTransactionsService.d.ts +171 -0
  52. package/esm/generated/services/PrimaryNetworkTransactionsService.js +107 -0
  53. package/esm/generated/services/PrimaryNetworkUtxOsService.d.ts +54 -0
  54. package/esm/generated/services/PrimaryNetworkUtxOsService.js +34 -0
  55. package/esm/generated/services/PrimaryNetworkVerticesService.d.ts +90 -0
  56. package/esm/generated/services/PrimaryNetworkVerticesService.js +64 -0
  57. package/esm/index.d.ts +26 -9
  58. package/esm/index.js +17 -4
  59. package/package.json +2 -2
  60. package/esm/generated/models/CollectionMetrics.d.ts +0 -41
  61. package/esm/generated/models/CollectionSortByOption.d.ts +0 -9
  62. package/esm/generated/models/CollectionSortByOption.js +0 -10
  63. package/esm/generated/models/ErcType.d.ts +0 -8
  64. package/esm/generated/models/ErcType.js +0 -9
  65. package/esm/generated/models/FloorPrice.d.ts +0 -8
  66. package/esm/generated/models/ListNftCollectionWithMetricsResponse.d.ts +0 -11
  67. package/esm/generated/models/NftCollection.d.ts +0 -24
  68. package/esm/generated/models/NftCollectionWithMetrics.d.ts +0 -26
  69. package/esm/generated/models/TrendingTimeframe.d.ts +0 -7
  70. package/esm/generated/models/TrendingTimeframe.js +0 -8
@@ -1,234 +1,21 @@
1
- import { CollectionSortByOption } from '../models/CollectionSortByOption.js';
2
1
  import { CurrencyCode } from '../models/CurrencyCode.js';
3
- import { Erc1155Token } from '../models/Erc1155Token.js';
4
- import { Erc721Token } from '../models/Erc721Token.js';
5
- import { GetChainResponse } from '../models/GetChainResponse.js';
6
- import { GetEvmBlockResponse } from '../models/GetEvmBlockResponse.js';
7
- import { GetNativeBalanceResponse } from '../models/GetNativeBalanceResponse.js';
8
2
  import { GetTransactionResponse } from '../models/GetTransactionResponse.js';
9
- import { ListChainsResponse } from '../models/ListChainsResponse.js';
10
- import { ListCollectibleBalancesResponse } from '../models/ListCollectibleBalancesResponse.js';
11
- import { ListErc1155BalancesResponse } from '../models/ListErc1155BalancesResponse.js';
3
+ import { ListContractsResponse } from '../models/ListContractsResponse.js';
12
4
  import { ListErc1155TransactionsResponse } from '../models/ListErc1155TransactionsResponse.js';
13
- import { ListErc20BalancesResponse } from '../models/ListErc20BalancesResponse.js';
14
5
  import { ListErc20TransactionsResponse } from '../models/ListErc20TransactionsResponse.js';
15
- import { ListErc721BalancesResponse } from '../models/ListErc721BalancesResponse.js';
16
6
  import { ListErc721TransactionsResponse } from '../models/ListErc721TransactionsResponse.js';
17
- import { ListEvmBlocksResponse } from '../models/ListEvmBlocksResponse.js';
18
7
  import { ListInternalTransactionsResponse } from '../models/ListInternalTransactionsResponse.js';
19
8
  import { ListNativeTransactionsResponse } from '../models/ListNativeTransactionsResponse.js';
20
- import { ListNftCollectionWithMetricsResponse } from '../models/ListNftCollectionWithMetricsResponse.js';
21
9
  import { ListTransactionDetailsResponse } from '../models/ListTransactionDetailsResponse.js';
22
10
  import { ListTransfersResponse } from '../models/ListTransfersResponse.js';
23
- import { NetworkType } from '../models/NetworkType.js';
24
- import { NftCollectionWithMetrics } from '../models/NftCollectionWithMetrics.js';
25
11
  import { SortOrder } from '../models/SortOrder.js';
26
12
  import { TransactionStatus } from '../models/TransactionStatus.js';
27
- import { TrendingTimeframe } from '../models/TrendingTimeframe.js';
28
13
  import { CancelablePromise } from '../core/CancelablePromise.js';
29
14
  import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
30
15
 
31
- declare class EvmService {
16
+ declare class EvmTransactionsService {
32
17
  readonly httpRequest: BaseHttpRequest;
33
18
  constructor(httpRequest: BaseHttpRequest);
34
- /**
35
- * Get native token balance
36
- * Gets native token balance of a wallet address.
37
- *
38
- * Balance at a given block can be retrieved with the `blockNumber` parameter.
39
- * @returns GetNativeBalanceResponse
40
- * @throws ApiError
41
- */
42
- getNativeBalance({ chainId, address, blockNumber, currency, }: {
43
- /**
44
- * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
45
- */
46
- chainId: string;
47
- /**
48
- * A wallet address.
49
- */
50
- address: string;
51
- /**
52
- * The block number, if not defined the block number will be the latest block.
53
- */
54
- blockNumber?: string;
55
- /**
56
- * The currency that return values should use. Defaults to USD.
57
- */
58
- currency?: CurrencyCode;
59
- }): CancelablePromise<GetNativeBalanceResponse>;
60
- /**
61
- * List ERC-20 balances
62
- * Lists ERC-20 token balances of a wallet address.
63
- *
64
- * Balance at a given block can be retrieved with the `blockNumber` parameter.
65
- *
66
- * Balance for specific contracts can be retrieved with the `contractAddresses` parameter.
67
- * @returns ListErc20BalancesResponse
68
- * @throws ApiError
69
- */
70
- listErc20Balances({ chainId, address, blockNumber, pageSize, pageToken, contractAddresses, currency, }: {
71
- /**
72
- * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
73
- */
74
- chainId: string;
75
- /**
76
- * A wallet address.
77
- */
78
- address: string;
79
- /**
80
- * The block number, if not defined the block number will be the latest block.
81
- */
82
- blockNumber?: string;
83
- /**
84
- * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
85
- */
86
- pageSize?: number;
87
- /**
88
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
89
- */
90
- pageToken?: string;
91
- /**
92
- * A comma separated list of contract addresses to filter by.
93
- */
94
- contractAddresses?: string;
95
- /**
96
- * The currency that return values should use. Defaults to USD.
97
- */
98
- currency?: CurrencyCode;
99
- }): CancelablePromise<ListErc20BalancesResponse>;
100
- /**
101
- * List ERC-721 balances
102
- * Lists ERC-721 token balances of a wallet address.
103
- *
104
- * Balance for a specific contract can be retrieved with the `contractAddress` parameter.
105
- * @returns ListErc721BalancesResponse
106
- * @throws ApiError
107
- */
108
- listErc721Balances({ chainId, address, pageSize, pageToken, contractAddress, }: {
109
- /**
110
- * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
111
- */
112
- chainId: string;
113
- /**
114
- * A wallet address.
115
- */
116
- address: string;
117
- /**
118
- * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
119
- */
120
- pageSize?: number;
121
- /**
122
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
123
- */
124
- pageToken?: string;
125
- /**
126
- * A contract addresses to filter by.
127
- */
128
- contractAddress?: string;
129
- }): CancelablePromise<ListErc721BalancesResponse>;
130
- /**
131
- * List ERC-1155 balances
132
- * Lists ERC-1155 token balances of a wallet address.
133
- *
134
- * Balance at a given block can be retrieved with the `blockNumber` parameter.
135
- *
136
- * Balance for a specific contract can be retrieved with the `contractAddress` parameter.
137
- * @returns ListErc1155BalancesResponse
138
- * @throws ApiError
139
- */
140
- listErc1155Balances({ chainId, address, blockNumber, pageSize, pageToken, contractAddress, }: {
141
- /**
142
- * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
143
- */
144
- chainId: string;
145
- /**
146
- * A wallet address.
147
- */
148
- address: string;
149
- /**
150
- * The block number, if not defined the block number will be the latest block.
151
- */
152
- blockNumber?: string;
153
- /**
154
- * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
155
- */
156
- pageSize?: number;
157
- /**
158
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
159
- */
160
- pageToken?: string;
161
- /**
162
- * A contract addresses to filter by.
163
- */
164
- contractAddress?: string;
165
- }): CancelablePromise<ListErc1155BalancesResponse>;
166
- /**
167
- * List collectible (ERC-721/ERC-1155) balances
168
- * Lists ERC-721 and ERC-1155 token balances of a wallet address.
169
- *
170
- * Balance for a specific contract can be retrieved with the `contractAddress` parameter.
171
- * @returns ListCollectibleBalancesResponse
172
- * @throws ApiError
173
- */
174
- listCollectibleBalances({ chainId, address, pageSize, pageToken, contractAddress, }: {
175
- /**
176
- * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
177
- */
178
- chainId: string;
179
- /**
180
- * A wallet address.
181
- */
182
- address: string;
183
- /**
184
- * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
185
- */
186
- pageSize?: number;
187
- /**
188
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
189
- */
190
- pageToken?: string;
191
- /**
192
- * A contract addresses to filter by.
193
- */
194
- contractAddress?: string;
195
- }): CancelablePromise<ListCollectibleBalancesResponse>;
196
- /**
197
- * List latest blocks
198
- * Lists the latest indexed blocks on the EVM-compatible chain sorted in descending order by block timestamp.
199
- * @returns ListEvmBlocksResponse
200
- * @throws ApiError
201
- */
202
- getLatestBlocks({ chainId, pageSize, pageToken, }: {
203
- /**
204
- * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
205
- */
206
- chainId: string;
207
- /**
208
- * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
209
- */
210
- pageSize?: number;
211
- /**
212
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
213
- */
214
- pageToken?: string;
215
- }): CancelablePromise<ListEvmBlocksResponse>;
216
- /**
217
- * Get block
218
- * Gets the details of an individual block on the EVM-compatible chain.
219
- * @returns GetEvmBlockResponse
220
- * @throws ApiError
221
- */
222
- getBlock({ chainId, blockId, }: {
223
- /**
224
- * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
225
- */
226
- chainId: string;
227
- /**
228
- * A block identifier which is either a block number or the block hash.
229
- */
230
- blockId: string;
231
- }): CancelablePromise<GetEvmBlockResponse>;
232
19
  /**
233
20
  * Get deployment transaction
234
21
  * If the address is a smart contract, returns the transaction in which it was deployed.
@@ -250,80 +37,20 @@ declare class EvmService {
250
37
  currency?: CurrencyCode;
251
38
  }): CancelablePromise<GetTransactionResponse>;
252
39
  /**
253
- * List chains
254
- * Lists the supported EVM-compatible chains. Filterable by network.
255
- * @returns ListChainsResponse
256
- * @throws ApiError
257
- */
258
- supportedChains({ network, }: {
259
- /**
260
- * mainnet or testnet.
261
- */
262
- network?: NetworkType;
263
- }): CancelablePromise<ListChainsResponse>;
264
- /**
265
- * Get chain information
266
- * Gets chain information for the EVM-compatible chain if supported by the api.
267
- * @returns GetChainResponse
40
+ * List deployed contracts
41
+ * Lists all contracts deployed by the given address.
42
+ * @returns ListContractsResponse
268
43
  * @throws ApiError
269
44
  */
270
- getChainInfo({ chainId, }: {
45
+ listContractDeployments({ chainId, address, pageSize, pageToken, }: {
271
46
  /**
272
47
  * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
273
48
  */
274
49
  chainId: string;
275
- }): CancelablePromise<GetChainResponse>;
276
- /**
277
- * Reindex NFT metadata
278
- * Triggers reindexing of token metadata for NFT contracts. Will return 400 if the NFT has been indexed within the last hour.
279
- * @returns any
280
- * @throws ApiError
281
- */
282
- reindexNft({ chainId, address, tokenId, }: {
283
50
  /**
284
- * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
285
- */
286
- chainId: string;
287
- /**
288
- * Contract address on the relevant chain.
289
- */
290
- address: string;
291
- /**
292
- * TokenId on the contract
293
- */
294
- tokenId: string;
295
- }): CancelablePromise<any>;
296
- /**
297
- * Get collection details
298
- * Get collection details for a specific contract.
299
- * @returns NftCollectionWithMetrics
300
- * @throws ApiError
301
- */
302
- getCollection({ chainId, address, timeframe, }: {
303
- /**
304
- * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
305
- */
306
- chainId: string;
307
- /**
308
- * Contract address on the relevant chain.
51
+ * A wallet address.
309
52
  */
310
53
  address: string;
311
- /**
312
- * The timeframe to use for trending listings. Use "DAY" for 24 hours, "WEEK" for 7 days, "MONTH" for 30 days.
313
- */
314
- timeframe?: TrendingTimeframe;
315
- }): CancelablePromise<NftCollectionWithMetrics>;
316
- /**
317
- * List collections
318
- * Lists details and metrics for collections.
319
- * @returns ListNftCollectionWithMetricsResponse
320
- * @throws ApiError
321
- */
322
- listCollections({ chainId, pageSize, pageToken, timeframe, sortBy, sortOrder, }: {
323
- /**
324
- * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
325
- */
326
- chainId: string;
327
54
  /**
328
55
  * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
329
56
  */
@@ -332,39 +59,7 @@ declare class EvmService {
332
59
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
333
60
  */
334
61
  pageToken?: string;
335
- /**
336
- * The timeframe to use for trending listings. Use "DAY" for 24 hours, "WEEK" for 7 days, "MONTH" for 30 days.
337
- */
338
- timeframe?: TrendingTimeframe;
339
- /**
340
- * Which property to sort by, in conjunction with sortOrder.
341
- */
342
- sortBy?: CollectionSortByOption;
343
- /**
344
- * The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
345
- */
346
- sortOrder?: SortOrder;
347
- }): CancelablePromise<ListNftCollectionWithMetricsResponse>;
348
- /**
349
- * Get token details
350
- * Get token details for a specific token of a contract.
351
- * @returns any
352
- * @throws ApiError
353
- */
354
- getTokenDetails({ chainId, address, tokenId, }: {
355
- /**
356
- * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
357
- */
358
- chainId: string;
359
- /**
360
- * Contract address on the relevant chain.
361
- */
362
- address: string;
363
- /**
364
- * TokenId on the contract
365
- */
366
- tokenId: string;
367
- }): CancelablePromise<(Erc721Token | Erc1155Token)>;
62
+ }): CancelablePromise<ListContractsResponse>;
368
63
  /**
369
64
  * List ERC transfers
370
65
  * Lists ERC transfers for an ERC-20, ERC-721, or ERC-1155 contract address.
@@ -613,4 +308,4 @@ declare class EvmService {
613
308
  }): CancelablePromise<ListNativeTransactionsResponse>;
614
309
  }
615
310
 
616
- export { EvmService };
311
+ export { EvmTransactionsService };
@@ -1,146 +1,7 @@
1
- class EvmService {
1
+ class EvmTransactionsService {
2
2
  constructor(httpRequest) {
3
3
  this.httpRequest = httpRequest;
4
4
  }
5
- getNativeBalance({
6
- chainId,
7
- address,
8
- blockNumber,
9
- currency
10
- }) {
11
- return this.httpRequest.request({
12
- method: "GET",
13
- url: "/v1/chains/{chainId}/addresses/{address}/balances:getNative",
14
- path: {
15
- "chainId": chainId,
16
- "address": address
17
- },
18
- query: {
19
- "blockNumber": blockNumber,
20
- "currency": currency
21
- }
22
- });
23
- }
24
- listErc20Balances({
25
- chainId,
26
- address,
27
- blockNumber,
28
- pageSize = 10,
29
- pageToken,
30
- contractAddresses,
31
- currency
32
- }) {
33
- return this.httpRequest.request({
34
- method: "GET",
35
- url: "/v1/chains/{chainId}/addresses/{address}/balances:listErc20",
36
- path: {
37
- "chainId": chainId,
38
- "address": address
39
- },
40
- query: {
41
- "blockNumber": blockNumber,
42
- "pageSize": pageSize,
43
- "pageToken": pageToken,
44
- "contractAddresses": contractAddresses,
45
- "currency": currency
46
- }
47
- });
48
- }
49
- listErc721Balances({
50
- chainId,
51
- address,
52
- pageSize = 10,
53
- pageToken,
54
- contractAddress
55
- }) {
56
- return this.httpRequest.request({
57
- method: "GET",
58
- url: "/v1/chains/{chainId}/addresses/{address}/balances:listErc721",
59
- path: {
60
- "chainId": chainId,
61
- "address": address
62
- },
63
- query: {
64
- "pageSize": pageSize,
65
- "pageToken": pageToken,
66
- "contractAddress": contractAddress
67
- }
68
- });
69
- }
70
- listErc1155Balances({
71
- chainId,
72
- address,
73
- blockNumber,
74
- pageSize = 10,
75
- pageToken,
76
- contractAddress
77
- }) {
78
- return this.httpRequest.request({
79
- method: "GET",
80
- url: "/v1/chains/{chainId}/addresses/{address}/balances:listErc1155",
81
- path: {
82
- "chainId": chainId,
83
- "address": address
84
- },
85
- query: {
86
- "blockNumber": blockNumber,
87
- "pageSize": pageSize,
88
- "pageToken": pageToken,
89
- "contractAddress": contractAddress
90
- }
91
- });
92
- }
93
- listCollectibleBalances({
94
- chainId,
95
- address,
96
- pageSize = 10,
97
- pageToken,
98
- contractAddress
99
- }) {
100
- return this.httpRequest.request({
101
- method: "GET",
102
- url: "/v1/chains/{chainId}/addresses/{address}/balances:listCollectibles",
103
- path: {
104
- "chainId": chainId,
105
- "address": address
106
- },
107
- query: {
108
- "pageSize": pageSize,
109
- "pageToken": pageToken,
110
- "contractAddress": contractAddress
111
- }
112
- });
113
- }
114
- getLatestBlocks({
115
- chainId,
116
- pageSize = 10,
117
- pageToken
118
- }) {
119
- return this.httpRequest.request({
120
- method: "GET",
121
- url: "/v1/chains/{chainId}/blocks",
122
- path: {
123
- "chainId": chainId
124
- },
125
- query: {
126
- "pageSize": pageSize,
127
- "pageToken": pageToken
128
- }
129
- });
130
- }
131
- getBlock({
132
- chainId,
133
- blockId
134
- }) {
135
- return this.httpRequest.request({
136
- method: "GET",
137
- url: "/v1/chains/{chainId}/blocks/{blockId}",
138
- path: {
139
- "chainId": chainId,
140
- "blockId": blockId
141
- }
142
- });
143
- }
144
5
  getDeploymentTransaction({
145
6
  chainId,
146
7
  address,
@@ -158,95 +19,22 @@ class EvmService {
158
19
  }
159
20
  });
160
21
  }
161
- supportedChains({
162
- network
163
- }) {
164
- return this.httpRequest.request({
165
- method: "GET",
166
- url: "/v1/chains",
167
- query: {
168
- "network": network
169
- }
170
- });
171
- }
172
- getChainInfo({
173
- chainId
174
- }) {
175
- return this.httpRequest.request({
176
- method: "GET",
177
- url: "/v1/chains/{chainId}",
178
- path: {
179
- "chainId": chainId
180
- }
181
- });
182
- }
183
- reindexNft({
22
+ listContractDeployments({
184
23
  chainId,
185
24
  address,
186
- tokenId
187
- }) {
188
- return this.httpRequest.request({
189
- method: "POST",
190
- url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}:reindex",
191
- path: {
192
- "chainId": chainId,
193
- "address": address,
194
- "tokenId": tokenId
195
- }
196
- });
197
- }
198
- getCollection({
199
- chainId,
200
- address,
201
- timeframe
25
+ pageSize = 10,
26
+ pageToken
202
27
  }) {
203
28
  return this.httpRequest.request({
204
29
  method: "GET",
205
- url: "/v1/chains/{chainId}/nfts/collections/{address}",
30
+ url: "/v1/chains/{chainId}/addresses/{address}/deployments",
206
31
  path: {
207
32
  "chainId": chainId,
208
33
  "address": address
209
34
  },
210
- query: {
211
- "timeframe": timeframe
212
- }
213
- });
214
- }
215
- listCollections({
216
- chainId,
217
- pageSize = 10,
218
- pageToken,
219
- timeframe,
220
- sortBy,
221
- sortOrder
222
- }) {
223
- return this.httpRequest.request({
224
- method: "GET",
225
- url: "/v1/chains/{chainId}/nfts/collections",
226
- path: {
227
- "chainId": chainId
228
- },
229
35
  query: {
230
36
  "pageSize": pageSize,
231
- "pageToken": pageToken,
232
- "timeframe": timeframe,
233
- "sortBy": sortBy,
234
- "sortOrder": sortOrder
235
- }
236
- });
237
- }
238
- getTokenDetails({
239
- chainId,
240
- address,
241
- tokenId
242
- }) {
243
- return this.httpRequest.request({
244
- method: "GET",
245
- url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}",
246
- path: {
247
- "chainId": chainId,
248
- "address": address,
249
- "tokenId": tokenId
37
+ "pageToken": pageToken
250
38
  }
251
39
  });
252
40
  }
@@ -460,4 +248,4 @@ class EvmService {
460
248
  }
461
249
  }
462
250
 
463
- export { EvmService };
251
+ export { EvmTransactionsService };
@@ -0,0 +1,40 @@
1
+ import { BlockchainId } from '../models/BlockchainId.js';
2
+ import { ListCChainAtomicBalancesResponse } from '../models/ListCChainAtomicBalancesResponse.js';
3
+ import { ListPChainBalancesResponse } from '../models/ListPChainBalancesResponse.js';
4
+ import { ListXChainBalancesResponse } from '../models/ListXChainBalancesResponse.js';
5
+ import { Network } from '../models/Network.js';
6
+ import { CancelablePromise } from '../core/CancelablePromise.js';
7
+ import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
8
+
9
+ declare class PrimaryNetworkBalancesService {
10
+ readonly httpRequest: BaseHttpRequest;
11
+ constructor(httpRequest: BaseHttpRequest);
12
+ /**
13
+ * Get balances
14
+ * Gets primary network balances for one of the Primary Network chains for the supplied addresses.
15
+ *
16
+ * C-Chain balances returned are only the shared atomic memory balance. For EVM balance, use the `/v1/chains/:chainId/addresses/:addressId/balances:getNative` endpoint.
17
+ * @returns any
18
+ * @throws ApiError
19
+ */
20
+ getBalancesByAddresses({ blockchainId, network, blockTimestamp, addresses, }: {
21
+ /**
22
+ * A primary network blockchain id or alias.
23
+ */
24
+ blockchainId: BlockchainId;
25
+ /**
26
+ * Either mainnet or a testnet.
27
+ */
28
+ network: Network;
29
+ /**
30
+ * An epoch timestamp in seconds. Balance will be calculated at this timestamp.
31
+ */
32
+ blockTimestamp?: number;
33
+ /**
34
+ * 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".
35
+ */
36
+ addresses?: string;
37
+ }): CancelablePromise<(ListPChainBalancesResponse | ListXChainBalancesResponse | ListCChainAtomicBalancesResponse)>;
38
+ }
39
+
40
+ export { PrimaryNetworkBalancesService };
@@ -0,0 +1,26 @@
1
+ class PrimaryNetworkBalancesService {
2
+ constructor(httpRequest) {
3
+ this.httpRequest = httpRequest;
4
+ }
5
+ getBalancesByAddresses({
6
+ blockchainId,
7
+ network,
8
+ blockTimestamp,
9
+ addresses
10
+ }) {
11
+ return this.httpRequest.request({
12
+ method: "GET",
13
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/balances",
14
+ path: {
15
+ "blockchainId": blockchainId,
16
+ "network": network
17
+ },
18
+ query: {
19
+ "blockTimestamp": blockTimestamp,
20
+ "addresses": addresses
21
+ }
22
+ });
23
+ }
24
+ }
25
+
26
+ export { PrimaryNetworkBalancesService };