@avalabs/glacier-sdk 2.8.0-canary.f35ad12.0 → 2.8.0-canary.fabddf7.0

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 (118) hide show
  1. package/dist/index.d.ts +1077 -479
  2. package/dist/index.js +462 -153
  3. package/esm/generated/Glacier.d.ts +6 -0
  4. package/esm/generated/Glacier.js +32 -10
  5. package/esm/generated/core/ApiError.js +5 -0
  6. package/esm/generated/core/CancelablePromise.js +11 -6
  7. package/esm/generated/core/request.js +14 -31
  8. package/esm/generated/models/ActiveDelegatorDetails.d.ts +7 -3
  9. package/esm/generated/models/ActiveDelegatorDetails.js +8 -0
  10. package/esm/generated/models/ActiveValidatorDetails.d.ts +14 -6
  11. package/esm/generated/models/ActiveValidatorDetails.js +8 -0
  12. package/esm/generated/models/AddressActivityMetadata.d.ts +12 -0
  13. package/esm/generated/models/Asset.d.ts +3 -1
  14. package/esm/generated/models/AssetWithPriceInfo.d.ts +35 -0
  15. package/esm/generated/models/CChainSharedAssetBalance.d.ts +3 -1
  16. package/esm/generated/models/ChainInfo.d.ts +1 -0
  17. package/esm/generated/models/CompletedDelegatorDetails.d.ts +7 -3
  18. package/esm/generated/models/CompletedDelegatorDetails.js +8 -0
  19. package/esm/generated/models/CompletedValidatorDetails.d.ts +9 -3
  20. package/esm/generated/models/CompletedValidatorDetails.js +8 -0
  21. package/esm/generated/models/ContractSubmissionBody.d.ts +10 -0
  22. package/esm/generated/models/ContractSubmissionErc1155.d.ts +31 -0
  23. package/esm/generated/models/ContractSubmissionErc1155.js +8 -0
  24. package/esm/generated/models/ContractSubmissionErc20.d.ts +31 -0
  25. package/esm/generated/models/ContractSubmissionErc20.js +8 -0
  26. package/esm/generated/models/ContractSubmissionErc721.d.ts +29 -0
  27. package/esm/generated/models/ContractSubmissionErc721.js +8 -0
  28. package/esm/generated/models/ContractSubmissionUnknown.d.ts +25 -0
  29. package/esm/generated/models/ContractSubmissionUnknown.js +8 -0
  30. package/esm/generated/models/Erc1155Contract.d.ts +2 -1
  31. package/esm/generated/models/Erc20Contract.d.ts +2 -1
  32. package/esm/generated/models/Erc721Contract.d.ts +0 -1
  33. package/esm/generated/models/EventType.d.ts +5 -0
  34. package/esm/generated/models/EventType.js +6 -0
  35. package/esm/generated/models/GetChainResponse.d.ts +1 -0
  36. package/esm/generated/models/GetPrimaryNetworkBlockResponse.d.ts +1 -0
  37. package/esm/generated/models/HistoricalReward.d.ts +2 -5
  38. package/esm/generated/models/ImageAsset.d.ts +0 -3
  39. package/esm/generated/models/ListContractsResponse.d.ts +1 -1
  40. package/esm/generated/models/ListNftTokens.d.ts +12 -0
  41. package/esm/generated/models/ListValidatorDetailsResponse.d.ts +3 -2
  42. package/esm/generated/models/ListWebhooksResponse.d.ts +11 -0
  43. package/esm/generated/models/PChainBalance.d.ts +7 -7
  44. package/esm/generated/models/PChainSharedAsset.d.ts +24 -0
  45. package/esm/generated/models/PChainTransaction.d.ts +5 -4
  46. package/esm/generated/models/PChainTransactionType.d.ts +6 -4
  47. package/esm/generated/models/PChainTransactionType.js +6 -4
  48. package/esm/generated/models/PChainUtxo.d.ts +34 -14
  49. package/esm/generated/models/PendingDelegatorDetails.d.ts +7 -3
  50. package/esm/generated/models/PendingDelegatorDetails.js +8 -0
  51. package/esm/generated/models/PendingReward.d.ts +2 -2
  52. package/esm/generated/models/PendingValidatorDetails.d.ts +9 -4
  53. package/esm/generated/models/PendingValidatorDetails.js +8 -0
  54. package/esm/generated/models/PricingProviders.d.ts +5 -0
  55. package/esm/generated/models/PrimaryNetworkAssetCap.d.ts +6 -0
  56. package/esm/generated/models/PrimaryNetworkAssetCap.js +7 -0
  57. package/esm/generated/models/PrimaryNetworkAssetType.d.ts +6 -0
  58. package/esm/generated/models/PrimaryNetworkAssetType.js +7 -0
  59. package/esm/generated/models/PrimaryNetworkBlock.d.ts +1 -0
  60. package/esm/generated/models/PrimaryNetworkTxType.d.ts +6 -4
  61. package/esm/generated/models/PrimaryNetworkTxType.js +6 -4
  62. package/esm/generated/models/RegisterWebhookRequest.d.ts +14 -0
  63. package/esm/generated/models/RemovedValidatorDetails.d.ts +19 -0
  64. package/esm/generated/models/RemovedValidatorDetails.js +8 -0
  65. package/esm/generated/models/RewardType.d.ts +2 -1
  66. package/esm/generated/models/RewardType.js +1 -0
  67. package/esm/generated/models/Rewards.d.ts +2 -0
  68. package/esm/generated/models/SharedSecretsResponse.d.ts +5 -0
  69. package/esm/generated/models/UnknownContract.d.ts +0 -1
  70. package/esm/generated/models/UpdateContractResponse.d.ts +10 -0
  71. package/esm/generated/models/Utxo.d.ts +28 -28
  72. package/esm/generated/models/UtxoCredential.d.ts +2 -2
  73. package/esm/generated/models/ValidationStatusType.d.ts +2 -1
  74. package/esm/generated/models/ValidationStatusType.js +1 -0
  75. package/esm/generated/models/ValidatorHealthDetails.d.ts +20 -0
  76. package/esm/generated/models/WebhookResponse.d.ts +17 -0
  77. package/esm/generated/models/WebhookStatus.d.ts +6 -0
  78. package/esm/generated/models/WebhookStatus.js +7 -0
  79. package/esm/generated/models/WebhookStatusType.d.ts +6 -0
  80. package/esm/generated/models/WebhookStatusType.js +7 -0
  81. package/esm/generated/models/XChainAssetBalance.d.ts +3 -1
  82. package/esm/generated/models/XChainAssetDetails.d.ts +6 -3
  83. package/esm/generated/models/XChainLinearTransaction.d.ts +2 -1
  84. package/esm/generated/models/XChainNonLinearTransaction.d.ts +2 -1
  85. package/esm/generated/models/XChainSharedAssetBalance.d.ts +3 -1
  86. package/esm/generated/models/XChainTransactionType.d.ts +10 -0
  87. package/esm/generated/models/XChainTransactionType.js +11 -0
  88. package/esm/generated/services/DefaultService.d.ts +74 -0
  89. package/esm/generated/services/DefaultService.js +61 -0
  90. package/esm/generated/services/EvmBalancesService.d.ts +25 -25
  91. package/esm/generated/services/EvmBalancesService.js +8 -8
  92. package/esm/generated/services/EvmBlocksService.d.ts +7 -7
  93. package/esm/generated/services/EvmBlocksService.js +4 -4
  94. package/esm/generated/services/EvmChainsService.d.ts +1 -1
  95. package/esm/generated/services/EvmContractsService.d.ts +48 -0
  96. package/esm/generated/services/EvmContractsService.js +36 -0
  97. package/esm/generated/services/EvmTransactionsService.d.ts +91 -49
  98. package/esm/generated/services/EvmTransactionsService.js +33 -33
  99. package/esm/generated/services/NfTsService.d.ts +76 -0
  100. package/esm/generated/services/NfTsService.js +56 -0
  101. package/esm/generated/services/OperationsService.d.ts +11 -11
  102. package/esm/generated/services/OperationsService.js +10 -10
  103. package/esm/generated/services/PrimaryNetworkBlocksService.d.ts +10 -10
  104. package/esm/generated/services/PrimaryNetworkBlocksService.js +8 -8
  105. package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +21 -8
  106. package/esm/generated/services/PrimaryNetworkRewardsService.js +12 -6
  107. package/esm/generated/services/PrimaryNetworkService.d.ts +51 -31
  108. package/esm/generated/services/PrimaryNetworkService.js +27 -17
  109. package/esm/generated/services/PrimaryNetworkTransactionsService.d.ts +20 -16
  110. package/esm/generated/services/PrimaryNetworkTransactionsService.js +8 -8
  111. package/esm/generated/services/PrimaryNetworkUtxOsService.d.ts +5 -5
  112. package/esm/generated/services/PrimaryNetworkUtxOsService.js +2 -2
  113. package/esm/generated/services/PrimaryNetworkVerticesService.d.ts +10 -10
  114. package/esm/generated/services/PrimaryNetworkVerticesService.js +6 -6
  115. package/esm/index.d.ts +25 -1
  116. package/esm/index.js +20 -0
  117. package/package.json +2 -2
  118. package/esm/generated/models/PChainAsset.d.ts +0 -6
@@ -22,19 +22,19 @@ class EvmTransactionsService {
22
22
  listContractDeployments({
23
23
  chainId,
24
24
  address,
25
- pageSize = 10,
26
- pageToken
25
+ pageToken,
26
+ pageSize = 10
27
27
  }) {
28
28
  return this.httpRequest.request({
29
29
  method: "GET",
30
- url: "/v1/chains/{chainId}/addresses/{address}/deployments",
30
+ url: "/v1/chains/{chainId}/contracts/{address}/deployments",
31
31
  path: {
32
32
  "chainId": chainId,
33
33
  "address": address
34
34
  },
35
35
  query: {
36
- "pageSize": pageSize,
37
- "pageToken": pageToken
36
+ "pageToken": pageToken,
37
+ "pageSize": pageSize
38
38
  }
39
39
  });
40
40
  }
@@ -43,8 +43,8 @@ class EvmTransactionsService {
43
43
  address,
44
44
  startBlock,
45
45
  endBlock,
46
- pageSize = 10,
47
- pageToken
46
+ pageToken,
47
+ pageSize = 10
48
48
  }) {
49
49
  return this.httpRequest.request({
50
50
  method: "GET",
@@ -56,16 +56,16 @@ class EvmTransactionsService {
56
56
  query: {
57
57
  "startBlock": startBlock,
58
58
  "endBlock": endBlock,
59
- "pageSize": pageSize,
60
- "pageToken": pageToken
59
+ "pageToken": pageToken,
60
+ "pageSize": pageSize
61
61
  }
62
62
  });
63
63
  }
64
64
  listTransactions({
65
65
  chainId,
66
66
  address,
67
- pageSize = 10,
68
67
  pageToken,
68
+ pageSize = 10,
69
69
  startBlock,
70
70
  endBlock,
71
71
  sortOrder
@@ -78,8 +78,8 @@ class EvmTransactionsService {
78
78
  "address": address
79
79
  },
80
80
  query: {
81
- "pageSize": pageSize,
82
81
  "pageToken": pageToken,
82
+ "pageSize": pageSize,
83
83
  "startBlock": startBlock,
84
84
  "endBlock": endBlock,
85
85
  "sortOrder": sortOrder
@@ -91,8 +91,8 @@ class EvmTransactionsService {
91
91
  address,
92
92
  startBlock,
93
93
  endBlock,
94
- pageSize = 10,
95
- pageToken
94
+ pageToken,
95
+ pageSize = 10
96
96
  }) {
97
97
  return this.httpRequest.request({
98
98
  method: "GET",
@@ -104,8 +104,8 @@ class EvmTransactionsService {
104
104
  query: {
105
105
  "startBlock": startBlock,
106
106
  "endBlock": endBlock,
107
- "pageSize": pageSize,
108
- "pageToken": pageToken
107
+ "pageToken": pageToken,
108
+ "pageSize": pageSize
109
109
  }
110
110
  });
111
111
  }
@@ -114,8 +114,8 @@ class EvmTransactionsService {
114
114
  address,
115
115
  startBlock,
116
116
  endBlock,
117
- pageSize = 10,
118
- pageToken
117
+ pageToken,
118
+ pageSize = 10
119
119
  }) {
120
120
  return this.httpRequest.request({
121
121
  method: "GET",
@@ -127,8 +127,8 @@ class EvmTransactionsService {
127
127
  query: {
128
128
  "startBlock": startBlock,
129
129
  "endBlock": endBlock,
130
- "pageSize": pageSize,
131
- "pageToken": pageToken
130
+ "pageToken": pageToken,
131
+ "pageSize": pageSize
132
132
  }
133
133
  });
134
134
  }
@@ -137,8 +137,8 @@ class EvmTransactionsService {
137
137
  address,
138
138
  startBlock,
139
139
  endBlock,
140
- pageSize = 10,
141
- pageToken
140
+ pageToken,
141
+ pageSize = 10
142
142
  }) {
143
143
  return this.httpRequest.request({
144
144
  method: "GET",
@@ -150,8 +150,8 @@ class EvmTransactionsService {
150
150
  query: {
151
151
  "startBlock": startBlock,
152
152
  "endBlock": endBlock,
153
- "pageSize": pageSize,
154
- "pageToken": pageToken
153
+ "pageToken": pageToken,
154
+ "pageSize": pageSize
155
155
  }
156
156
  });
157
157
  }
@@ -160,8 +160,8 @@ class EvmTransactionsService {
160
160
  address,
161
161
  startBlock,
162
162
  endBlock,
163
- pageSize = 10,
164
- pageToken
163
+ pageToken,
164
+ pageSize = 10
165
165
  }) {
166
166
  return this.httpRequest.request({
167
167
  method: "GET",
@@ -173,8 +173,8 @@ class EvmTransactionsService {
173
173
  query: {
174
174
  "startBlock": startBlock,
175
175
  "endBlock": endBlock,
176
- "pageSize": pageSize,
177
- "pageToken": pageToken
176
+ "pageToken": pageToken,
177
+ "pageSize": pageSize
178
178
  }
179
179
  });
180
180
  }
@@ -183,8 +183,8 @@ class EvmTransactionsService {
183
183
  address,
184
184
  startBlock,
185
185
  endBlock,
186
- pageSize = 10,
187
- pageToken
186
+ pageToken,
187
+ pageSize = 10
188
188
  }) {
189
189
  return this.httpRequest.request({
190
190
  method: "GET",
@@ -196,8 +196,8 @@ class EvmTransactionsService {
196
196
  query: {
197
197
  "startBlock": startBlock,
198
198
  "endBlock": endBlock,
199
- "pageSize": pageSize,
200
- "pageToken": pageToken
199
+ "pageToken": pageToken,
200
+ "pageSize": pageSize
201
201
  }
202
202
  });
203
203
  }
@@ -229,8 +229,8 @@ class EvmTransactionsService {
229
229
  }
230
230
  listLatestTransactions({
231
231
  chainId,
232
- pageSize = 10,
233
232
  pageToken,
233
+ pageSize = 10,
234
234
  status
235
235
  }) {
236
236
  return this.httpRequest.request({
@@ -240,8 +240,8 @@ class EvmTransactionsService {
240
240
  "chainId": chainId
241
241
  },
242
242
  query: {
243
- "pageSize": pageSize,
244
243
  "pageToken": pageToken,
244
+ "pageSize": pageSize,
245
245
  "status": status
246
246
  }
247
247
  });
@@ -0,0 +1,76 @@
1
+ import { Erc1155Token } from '../models/Erc1155Token.js';
2
+ import { Erc721Token } from '../models/Erc721Token.js';
3
+ import { ListNftTokens } from '../models/ListNftTokens.js';
4
+ import { CancelablePromise } from '../core/CancelablePromise.js';
5
+ import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
6
+
7
+ declare class NfTsService {
8
+ readonly httpRequest: BaseHttpRequest;
9
+ constructor(httpRequest: BaseHttpRequest);
10
+ /**
11
+ * Reindex NFT metadata
12
+ * Triggers reindexing of token metadata for an NFT token. Reindexing can only be called once per hour for each NFT token.
13
+ * @returns any
14
+ * @throws ApiError
15
+ */
16
+ reindexNft({ chainId, address, tokenId, }: {
17
+ /**
18
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
19
+ */
20
+ chainId: string;
21
+ /**
22
+ * Contract address on the relevant chain.
23
+ */
24
+ address: string;
25
+ /**
26
+ * TokenId on the contract
27
+ */
28
+ tokenId: string;
29
+ }): CancelablePromise<any>;
30
+ /**
31
+ * List tokens
32
+ * Lists tokens for an NFT contract.
33
+ * @returns ListNftTokens
34
+ * @throws ApiError
35
+ */
36
+ listTokens({ chainId, address, pageToken, pageSize, }: {
37
+ /**
38
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
39
+ */
40
+ chainId: string;
41
+ /**
42
+ * Contract address on the relevant chain.
43
+ */
44
+ address: string;
45
+ /**
46
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
47
+ */
48
+ pageToken?: string;
49
+ /**
50
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
51
+ */
52
+ pageSize?: number;
53
+ }): CancelablePromise<ListNftTokens>;
54
+ /**
55
+ * Get token details
56
+ * Gets token details for a specific token of an NFT contract.
57
+ * @returns any
58
+ * @throws ApiError
59
+ */
60
+ getTokenDetails({ chainId, address, tokenId, }: {
61
+ /**
62
+ * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
63
+ */
64
+ chainId: string;
65
+ /**
66
+ * Contract address on the relevant chain.
67
+ */
68
+ address: string;
69
+ /**
70
+ * TokenId on the contract
71
+ */
72
+ tokenId: string;
73
+ }): CancelablePromise<(Erc721Token | Erc1155Token)>;
74
+ }
75
+
76
+ export { NfTsService };
@@ -0,0 +1,56 @@
1
+ class NfTsService {
2
+ constructor(httpRequest) {
3
+ this.httpRequest = httpRequest;
4
+ }
5
+ reindexNft({
6
+ chainId,
7
+ address,
8
+ tokenId
9
+ }) {
10
+ return this.httpRequest.request({
11
+ method: "POST",
12
+ url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}:reindex",
13
+ path: {
14
+ "chainId": chainId,
15
+ "address": address,
16
+ "tokenId": tokenId
17
+ }
18
+ });
19
+ }
20
+ listTokens({
21
+ chainId,
22
+ address,
23
+ pageToken,
24
+ pageSize = 10
25
+ }) {
26
+ return this.httpRequest.request({
27
+ method: "GET",
28
+ url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens",
29
+ path: {
30
+ "chainId": chainId,
31
+ "address": address
32
+ },
33
+ query: {
34
+ "pageToken": pageToken,
35
+ "pageSize": pageSize
36
+ }
37
+ });
38
+ }
39
+ getTokenDetails({
40
+ chainId,
41
+ address,
42
+ tokenId
43
+ }) {
44
+ return this.httpRequest.request({
45
+ method: "GET",
46
+ url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}",
47
+ path: {
48
+ "chainId": chainId,
49
+ "address": address,
50
+ "tokenId": tokenId
51
+ }
52
+ });
53
+ }
54
+ }
55
+
56
+ export { NfTsService };
@@ -7,17 +7,6 @@ import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
7
7
  declare class OperationsService {
8
8
  readonly httpRequest: BaseHttpRequest;
9
9
  constructor(httpRequest: BaseHttpRequest);
10
- /**
11
- * Create transaction export operation
12
- * Trigger a transaction export operation with given parameters.
13
- *
14
- * The transaction export operation runs asynchronously in the background. The status of the job can be retrieved from the `/v1/operations/:operationId` endpoint using the `operationId` returned from this endpoint.
15
- * @returns OperationStatusResponse
16
- * @throws ApiError
17
- */
18
- postTransactionExportJob({ requestBody, }: {
19
- requestBody: (CreateEvmTransactionExportRequest | CreatePrimaryNetworkTransactionExportRequest);
20
- }): CancelablePromise<OperationStatusResponse>;
21
10
  /**
22
11
  * Get operation
23
12
  * Gets operation details for the given operation id.
@@ -30,6 +19,17 @@ declare class OperationsService {
30
19
  */
31
20
  operationId: string;
32
21
  }): CancelablePromise<OperationStatusResponse>;
22
+ /**
23
+ * Create transaction export operation
24
+ * Trigger a transaction export operation with given parameters.
25
+ *
26
+ * The transaction export operation runs asynchronously in the background. The status of the job can be retrieved from the `/v1/operations/:operationId` endpoint using the `operationId` returned from this endpoint.
27
+ * @returns OperationStatusResponse
28
+ * @throws ApiError
29
+ */
30
+ postTransactionExportJob({ requestBody, }: {
31
+ requestBody: (CreateEvmTransactionExportRequest | CreatePrimaryNetworkTransactionExportRequest);
32
+ }): CancelablePromise<OperationStatusResponse>;
33
33
  }
34
34
 
35
35
  export { OperationsService };
@@ -2,16 +2,6 @@ class OperationsService {
2
2
  constructor(httpRequest) {
3
3
  this.httpRequest = httpRequest;
4
4
  }
5
- postTransactionExportJob({
6
- requestBody
7
- }) {
8
- return this.httpRequest.request({
9
- method: "POST",
10
- url: "/v1/operations/transactions:export",
11
- body: requestBody,
12
- mediaType: "application/json"
13
- });
14
- }
15
5
  getOperationResult({
16
6
  operationId
17
7
  }) {
@@ -23,6 +13,16 @@ class OperationsService {
23
13
  }
24
14
  });
25
15
  }
16
+ postTransactionExportJob({
17
+ requestBody
18
+ }) {
19
+ return this.httpRequest.request({
20
+ method: "POST",
21
+ url: "/v1/operations/transactions:export",
22
+ body: requestBody,
23
+ mediaType: "application/json"
24
+ });
25
+ }
26
26
  }
27
27
 
28
28
  export { OperationsService };
@@ -34,7 +34,7 @@ declare class PrimaryNetworkBlocksService {
34
34
  * @returns ListPrimaryNetworkBlocksResponse
35
35
  * @throws ApiError
36
36
  */
37
- listPrimaryNetworkBlocksByNodeId({ blockchainId, network, nodeId, pageSize, pageToken, }: {
37
+ listPrimaryNetworkBlocksByNodeId({ blockchainId, network, nodeId, pageToken, pageSize, }: {
38
38
  /**
39
39
  * A primary network blockchain id or alias.
40
40
  */
@@ -47,14 +47,14 @@ declare class PrimaryNetworkBlocksService {
47
47
  * A primary network (P or X chain) nodeId.
48
48
  */
49
49
  nodeId: string;
50
- /**
51
- * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
52
- */
53
- pageSize?: number;
54
50
  /**
55
51
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
56
52
  */
57
53
  pageToken?: string;
54
+ /**
55
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
56
+ */
57
+ pageSize?: number;
58
58
  }): CancelablePromise<ListPrimaryNetworkBlocksResponse>;
59
59
  /**
60
60
  * List latest blocks
@@ -62,7 +62,7 @@ declare class PrimaryNetworkBlocksService {
62
62
  * @returns ListPrimaryNetworkBlocksResponse
63
63
  * @throws ApiError
64
64
  */
65
- listLatestPrimaryNetworkBlocks({ blockchainId, network, pageSize, pageToken, }: {
65
+ listLatestPrimaryNetworkBlocks({ blockchainId, network, pageToken, pageSize, }: {
66
66
  /**
67
67
  * A primary network blockchain id or alias.
68
68
  */
@@ -71,14 +71,14 @@ declare class PrimaryNetworkBlocksService {
71
71
  * Either mainnet or a testnet.
72
72
  */
73
73
  network: Network;
74
- /**
75
- * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
76
- */
77
- pageSize?: number;
78
74
  /**
79
75
  * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
80
76
  */
81
77
  pageToken?: string;
78
+ /**
79
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
80
+ */
81
+ pageSize?: number;
82
82
  }): CancelablePromise<ListPrimaryNetworkBlocksResponse>;
83
83
  }
84
84
 
@@ -21,8 +21,8 @@ class PrimaryNetworkBlocksService {
21
21
  blockchainId,
22
22
  network,
23
23
  nodeId,
24
- pageSize = 10,
25
- pageToken
24
+ pageToken,
25
+ pageSize = 10
26
26
  }) {
27
27
  return this.httpRequest.request({
28
28
  method: "GET",
@@ -33,16 +33,16 @@ class PrimaryNetworkBlocksService {
33
33
  "nodeId": nodeId
34
34
  },
35
35
  query: {
36
- "pageSize": pageSize,
37
- "pageToken": pageToken
36
+ "pageToken": pageToken,
37
+ "pageSize": pageSize
38
38
  }
39
39
  });
40
40
  }
41
41
  listLatestPrimaryNetworkBlocks({
42
42
  blockchainId,
43
43
  network,
44
- pageSize = 10,
45
- pageToken
44
+ pageToken,
45
+ pageSize = 10
46
46
  }) {
47
47
  return this.httpRequest.request({
48
48
  method: "GET",
@@ -52,8 +52,8 @@ class PrimaryNetworkBlocksService {
52
52
  "network": network
53
53
  },
54
54
  query: {
55
- "pageSize": pageSize,
56
- "pageToken": pageToken
55
+ "pageToken": pageToken,
56
+ "pageSize": pageSize
57
57
  }
58
58
  });
59
59
  }
@@ -1,3 +1,4 @@
1
+ import { CurrencyCode } from '../models/CurrencyCode.js';
1
2
  import { ListHistoricalRewardsResponse } from '../models/ListHistoricalRewardsResponse.js';
2
3
  import { ListPendingRewardsResponse } from '../models/ListPendingRewardsResponse.js';
3
4
  import { Network } from '../models/Network.js';
@@ -14,23 +15,27 @@ declare class PrimaryNetworkRewardsService {
14
15
  * @returns ListPendingRewardsResponse
15
16
  * @throws ApiError
16
17
  */
17
- listPendingPrimaryNetworkRewards({ network, addresses, pageSize, pageToken, sortOrder, }: {
18
+ listPendingPrimaryNetworkRewards({ network, addresses, pageToken, pageSize, nodeIds, sortOrder, }: {
18
19
  /**
19
20
  * Either mainnet or a testnet.
20
21
  */
21
22
  network: Network;
22
23
  /**
23
- * 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".
24
+ * 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". One of addresses or nodeIds is required.
24
25
  */
25
26
  addresses?: string;
27
+ /**
28
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
29
+ */
30
+ pageToken?: string;
26
31
  /**
27
32
  * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
28
33
  */
29
34
  pageSize?: number;
30
35
  /**
31
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
36
+ * A comma separated list of node ids to filter by. One of addresses or nodeIds is required.
32
37
  */
33
- pageToken?: string;
38
+ nodeIds?: string;
34
39
  /**
35
40
  * 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.
36
41
  */
@@ -42,27 +47,35 @@ declare class PrimaryNetworkRewardsService {
42
47
  * @returns ListHistoricalRewardsResponse
43
48
  * @throws ApiError
44
49
  */
45
- listHistoricalPrimaryNetworkRewards({ network, addresses, pageSize, pageToken, sortOrder, }: {
50
+ listHistoricalPrimaryNetworkRewards({ network, addresses, pageToken, pageSize, nodeIds, sortOrder, currency, }: {
46
51
  /**
47
52
  * Either mainnet or a testnet.
48
53
  */
49
54
  network: Network;
50
55
  /**
51
- * 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".
56
+ * 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". Optional, but at least one of addresses or nodeIds is required.
52
57
  */
53
58
  addresses?: string;
59
+ /**
60
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
61
+ */
62
+ pageToken?: string;
54
63
  /**
55
64
  * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
56
65
  */
57
66
  pageSize?: number;
58
67
  /**
59
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
68
+ * A comma separated list of node ids to filter by. Optional, but at least one of addresses or nodeIds is required.
60
69
  */
61
- pageToken?: string;
70
+ nodeIds?: string;
62
71
  /**
63
72
  * 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.
64
73
  */
65
74
  sortOrder?: SortOrder;
75
+ /**
76
+ * The currency that return values should use. Defaults to USD.
77
+ */
78
+ currency?: CurrencyCode;
66
79
  }): CancelablePromise<ListHistoricalRewardsResponse>;
67
80
  }
68
81
 
@@ -5,8 +5,9 @@ class PrimaryNetworkRewardsService {
5
5
  listPendingPrimaryNetworkRewards({
6
6
  network,
7
7
  addresses,
8
- pageSize = 10,
9
8
  pageToken,
9
+ pageSize = 10,
10
+ nodeIds,
10
11
  sortOrder
11
12
  }) {
12
13
  return this.httpRequest.request({
@@ -17,8 +18,9 @@ class PrimaryNetworkRewardsService {
17
18
  },
18
19
  query: {
19
20
  "addresses": addresses,
20
- "pageSize": pageSize,
21
21
  "pageToken": pageToken,
22
+ "pageSize": pageSize,
23
+ "nodeIds": nodeIds,
22
24
  "sortOrder": sortOrder
23
25
  }
24
26
  });
@@ -26,9 +28,11 @@ class PrimaryNetworkRewardsService {
26
28
  listHistoricalPrimaryNetworkRewards({
27
29
  network,
28
30
  addresses,
29
- pageSize = 10,
30
31
  pageToken,
31
- sortOrder
32
+ pageSize = 10,
33
+ nodeIds,
34
+ sortOrder,
35
+ currency
32
36
  }) {
33
37
  return this.httpRequest.request({
34
38
  method: "GET",
@@ -38,9 +42,11 @@ class PrimaryNetworkRewardsService {
38
42
  },
39
43
  query: {
40
44
  "addresses": addresses,
41
- "pageSize": pageSize,
42
45
  "pageToken": pageToken,
43
- "sortOrder": sortOrder
46
+ "pageSize": pageSize,
47
+ "nodeIds": nodeIds,
48
+ "sortOrder": sortOrder,
49
+ "currency": currency
44
50
  }
45
51
  });
46
52
  }