@avalabs/glacier-sdk 2.8.0-canary.e49772d.0 → 2.8.0-canary.e5344d2.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.
- package/dist/index.d.ts +710 -227
- package/dist/index.js +278 -11
- package/esm/generated/Glacier.d.ts +6 -0
- package/esm/generated/Glacier.js +9 -0
- package/esm/generated/models/ActiveDelegatorDetails.d.ts +7 -3
- package/esm/generated/models/ActiveDelegatorDetails.js +8 -0
- package/esm/generated/models/ActiveValidatorDetails.d.ts +14 -6
- package/esm/generated/models/ActiveValidatorDetails.js +8 -0
- package/esm/generated/models/AddressActivityMetadata.d.ts +9 -0
- package/esm/generated/models/ChainInfo.d.ts +1 -0
- package/esm/generated/models/CompletedDelegatorDetails.d.ts +7 -3
- package/esm/generated/models/CompletedDelegatorDetails.js +8 -0
- package/esm/generated/models/CompletedValidatorDetails.d.ts +9 -3
- package/esm/generated/models/CompletedValidatorDetails.js +8 -0
- package/esm/generated/models/ContractSubmissionBody.d.ts +10 -0
- package/esm/generated/models/ContractSubmissionErc1155.d.ts +31 -0
- package/esm/generated/models/ContractSubmissionErc1155.js +8 -0
- package/esm/generated/models/ContractSubmissionErc20.d.ts +31 -0
- package/esm/generated/models/ContractSubmissionErc20.js +8 -0
- package/esm/generated/models/ContractSubmissionErc721.d.ts +29 -0
- package/esm/generated/models/ContractSubmissionErc721.js +8 -0
- package/esm/generated/models/ContractSubmissionUnknown.d.ts +25 -0
- package/esm/generated/models/ContractSubmissionUnknown.js +8 -0
- package/esm/generated/models/Erc1155Contract.d.ts +2 -1
- package/esm/generated/models/Erc20Contract.d.ts +2 -1
- package/esm/generated/models/Erc721Contract.d.ts +0 -1
- package/esm/generated/models/EventType.d.ts +5 -0
- package/esm/generated/models/EventType.js +6 -0
- package/esm/generated/models/GetChainResponse.d.ts +1 -0
- package/esm/generated/models/GetPrimaryNetworkBlockResponse.d.ts +1 -0
- package/esm/generated/models/ListContractsResponse.d.ts +1 -1
- package/esm/generated/models/ListNftTokens.d.ts +12 -0
- package/esm/generated/models/ListValidatorDetailsResponse.d.ts +1 -1
- package/esm/generated/models/ListWebhooksResponse.d.ts +11 -0
- package/esm/generated/models/PChainTransaction.d.ts +1 -0
- package/esm/generated/models/PChainTransactionType.d.ts +1 -0
- package/esm/generated/models/PChainTransactionType.js +1 -0
- package/esm/generated/models/PendingDelegatorDetails.d.ts +7 -3
- package/esm/generated/models/PendingDelegatorDetails.js +8 -0
- package/esm/generated/models/PendingValidatorDetails.d.ts +9 -4
- package/esm/generated/models/PendingValidatorDetails.js +8 -0
- package/esm/generated/models/PricingProviders.d.ts +5 -0
- package/esm/generated/models/PrimaryNetworkBlock.d.ts +1 -0
- package/esm/generated/models/PrimaryNetworkTxType.d.ts +1 -0
- package/esm/generated/models/PrimaryNetworkTxType.js +1 -0
- package/esm/generated/models/RegisterWebhookRequest.d.ts +14 -0
- package/esm/generated/models/RewardType.d.ts +2 -1
- package/esm/generated/models/RewardType.js +1 -0
- package/esm/generated/models/Rewards.d.ts +2 -0
- package/esm/generated/models/UnknownContract.d.ts +0 -1
- package/esm/generated/models/UpdateContractResponse.d.ts +10 -0
- package/esm/generated/models/ValidatorHealthDetails.d.ts +20 -0
- package/esm/generated/models/WebhookResponse.d.ts +15 -0
- package/esm/generated/models/WebhookStatus.d.ts +6 -0
- package/esm/generated/models/WebhookStatus.js +7 -0
- package/esm/generated/models/WebhookStatusType.d.ts +6 -0
- package/esm/generated/models/WebhookStatusType.js +7 -0
- package/esm/generated/models/XChainLinearTransaction.d.ts +2 -1
- package/esm/generated/models/XChainNonLinearTransaction.d.ts +2 -1
- package/esm/generated/models/XChainTransactionType.d.ts +10 -0
- package/esm/generated/models/XChainTransactionType.js +11 -0
- package/esm/generated/services/DefaultService.d.ts +59 -0
- package/esm/generated/services/DefaultService.js +49 -0
- package/esm/generated/services/EvmContractsService.d.ts +48 -0
- package/esm/generated/services/EvmContractsService.js +36 -0
- package/esm/generated/services/EvmTransactionsService.d.ts +42 -0
- package/esm/generated/services/EvmTransactionsService.js +1 -1
- package/esm/generated/services/NfTsService.d.ts +76 -0
- package/esm/generated/services/NfTsService.js +56 -0
- package/esm/generated/services/OperationsService.d.ts +11 -11
- package/esm/generated/services/OperationsService.js +10 -10
- package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +10 -2
- package/esm/generated/services/PrimaryNetworkRewardsService.js +4 -0
- package/esm/generated/services/PrimaryNetworkService.d.ts +32 -8
- package/esm/generated/services/PrimaryNetworkService.js +16 -4
- package/esm/generated/services/PrimaryNetworkTransactionsService.d.ts +5 -1
- package/esm/index.d.ts +20 -0
- package/esm/index.js +17 -0
- package/package.json +2 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var XChainTransactionType = /* @__PURE__ */ ((XChainTransactionType2) => {
|
|
2
|
+
XChainTransactionType2["BASE_TX"] = "BaseTx";
|
|
3
|
+
XChainTransactionType2["CREATE_ASSET_TX"] = "CreateAssetTx";
|
|
4
|
+
XChainTransactionType2["OPERATION_TX"] = "OperationTx";
|
|
5
|
+
XChainTransactionType2["IMPORT_TX"] = "ImportTx";
|
|
6
|
+
XChainTransactionType2["EXPORT_TX"] = "ExportTx";
|
|
7
|
+
XChainTransactionType2["UNKNOWN"] = "UNKNOWN";
|
|
8
|
+
return XChainTransactionType2;
|
|
9
|
+
})(XChainTransactionType || {});
|
|
10
|
+
|
|
11
|
+
export { XChainTransactionType };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ListWebhooksResponse } from '../models/ListWebhooksResponse.js';
|
|
2
|
+
import { RegisterWebhookRequest } from '../models/RegisterWebhookRequest.js';
|
|
3
|
+
import { WebhookResponse } from '../models/WebhookResponse.js';
|
|
4
|
+
import { WebhookStatus } from '../models/WebhookStatus.js';
|
|
5
|
+
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
6
|
+
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
7
|
+
|
|
8
|
+
declare class DefaultService {
|
|
9
|
+
readonly httpRequest: BaseHttpRequest;
|
|
10
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
11
|
+
/**
|
|
12
|
+
* @returns any
|
|
13
|
+
* @throws ApiError
|
|
14
|
+
*/
|
|
15
|
+
mediaControllerUploadImage(): CancelablePromise<any>;
|
|
16
|
+
/**
|
|
17
|
+
* Register a webhook
|
|
18
|
+
* Registers a new webhook.
|
|
19
|
+
* @returns WebhookResponse
|
|
20
|
+
* @throws ApiError
|
|
21
|
+
*/
|
|
22
|
+
registerWebhook({ requestBody, }: {
|
|
23
|
+
requestBody: RegisterWebhookRequest;
|
|
24
|
+
}): CancelablePromise<WebhookResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* List webhooks
|
|
27
|
+
* Lists webhooks for the user.
|
|
28
|
+
* @returns ListWebhooksResponse
|
|
29
|
+
* @throws ApiError
|
|
30
|
+
*/
|
|
31
|
+
listWebhooks({ pageSize, pageToken, status, }: {
|
|
32
|
+
/**
|
|
33
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
34
|
+
*/
|
|
35
|
+
pageSize?: number;
|
|
36
|
+
/**
|
|
37
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
38
|
+
*/
|
|
39
|
+
pageToken?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Status of the webhook. Use "active" to return only active webhooks, "inactive" to return only inactive webhooks. Else if no status is provided, all configured webhooks will be returned.
|
|
42
|
+
*/
|
|
43
|
+
status?: WebhookStatus;
|
|
44
|
+
}): CancelablePromise<ListWebhooksResponse>;
|
|
45
|
+
/**
|
|
46
|
+
* Deactivate a webhook
|
|
47
|
+
* Deactivates a webhook by ID.
|
|
48
|
+
* @returns WebhookResponse
|
|
49
|
+
* @throws ApiError
|
|
50
|
+
*/
|
|
51
|
+
deactivateWebhook({ id, }: {
|
|
52
|
+
/**
|
|
53
|
+
* The webhook identifier.
|
|
54
|
+
*/
|
|
55
|
+
id: string;
|
|
56
|
+
}): CancelablePromise<WebhookResponse>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { DefaultService };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
class DefaultService {
|
|
2
|
+
constructor(httpRequest) {
|
|
3
|
+
this.httpRequest = httpRequest;
|
|
4
|
+
}
|
|
5
|
+
mediaControllerUploadImage() {
|
|
6
|
+
return this.httpRequest.request({
|
|
7
|
+
method: "POST",
|
|
8
|
+
url: "/v1/media/uploadImage"
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
registerWebhook({
|
|
12
|
+
requestBody
|
|
13
|
+
}) {
|
|
14
|
+
return this.httpRequest.request({
|
|
15
|
+
method: "POST",
|
|
16
|
+
url: "/v1/webhooks",
|
|
17
|
+
body: requestBody,
|
|
18
|
+
mediaType: "application/json"
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
listWebhooks({
|
|
22
|
+
pageSize = 10,
|
|
23
|
+
pageToken,
|
|
24
|
+
status
|
|
25
|
+
}) {
|
|
26
|
+
return this.httpRequest.request({
|
|
27
|
+
method: "GET",
|
|
28
|
+
url: "/v1/webhooks",
|
|
29
|
+
query: {
|
|
30
|
+
"pageSize": pageSize,
|
|
31
|
+
"pageToken": pageToken,
|
|
32
|
+
"status": status
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
deactivateWebhook({
|
|
37
|
+
id
|
|
38
|
+
}) {
|
|
39
|
+
return this.httpRequest.request({
|
|
40
|
+
method: "DELETE",
|
|
41
|
+
url: "/v1/webhooks/{id}",
|
|
42
|
+
path: {
|
|
43
|
+
"id": id
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { DefaultService };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ContractSubmissionBody } from '../models/ContractSubmissionBody.js';
|
|
2
|
+
import { Erc1155Contract } from '../models/Erc1155Contract.js';
|
|
3
|
+
import { Erc20Contract } from '../models/Erc20Contract.js';
|
|
4
|
+
import { Erc721Contract } from '../models/Erc721Contract.js';
|
|
5
|
+
import { UnknownContract } from '../models/UnknownContract.js';
|
|
6
|
+
import { UpdateContractResponse } from '../models/UpdateContractResponse.js';
|
|
7
|
+
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
8
|
+
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
9
|
+
|
|
10
|
+
declare class EvmContractsService {
|
|
11
|
+
readonly httpRequest: BaseHttpRequest;
|
|
12
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
13
|
+
/**
|
|
14
|
+
* Get contract metadata
|
|
15
|
+
* Gets metadata about the contract at the given address.
|
|
16
|
+
* @returns any
|
|
17
|
+
* @throws ApiError
|
|
18
|
+
*/
|
|
19
|
+
getContractMetadata({ chainId, address, }: {
|
|
20
|
+
/**
|
|
21
|
+
* A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
22
|
+
*/
|
|
23
|
+
chainId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Contract address on the relevant chain.
|
|
26
|
+
*/
|
|
27
|
+
address: string;
|
|
28
|
+
}): CancelablePromise<(Erc721Contract | Erc1155Contract | Erc20Contract | UnknownContract)>;
|
|
29
|
+
/**
|
|
30
|
+
* Update contract information
|
|
31
|
+
* Update contract information. Updates will be reviewed by the Ava Labs team before they are published.
|
|
32
|
+
* @returns UpdateContractResponse
|
|
33
|
+
* @throws ApiError
|
|
34
|
+
*/
|
|
35
|
+
updateContractInfo({ chainId, address, requestBody, }: {
|
|
36
|
+
/**
|
|
37
|
+
* A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
38
|
+
*/
|
|
39
|
+
chainId: string;
|
|
40
|
+
/**
|
|
41
|
+
* Contract address on the relevant chain.
|
|
42
|
+
*/
|
|
43
|
+
address: string;
|
|
44
|
+
requestBody: ContractSubmissionBody;
|
|
45
|
+
}): CancelablePromise<UpdateContractResponse>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { EvmContractsService };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
class EvmContractsService {
|
|
2
|
+
constructor(httpRequest) {
|
|
3
|
+
this.httpRequest = httpRequest;
|
|
4
|
+
}
|
|
5
|
+
getContractMetadata({
|
|
6
|
+
chainId,
|
|
7
|
+
address
|
|
8
|
+
}) {
|
|
9
|
+
return this.httpRequest.request({
|
|
10
|
+
method: "GET",
|
|
11
|
+
url: "/v1/chains/{chainId}/addresses/{address}",
|
|
12
|
+
path: {
|
|
13
|
+
"chainId": chainId,
|
|
14
|
+
"address": address
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
updateContractInfo({
|
|
19
|
+
chainId,
|
|
20
|
+
address,
|
|
21
|
+
requestBody
|
|
22
|
+
}) {
|
|
23
|
+
return this.httpRequest.request({
|
|
24
|
+
method: "PATCH",
|
|
25
|
+
url: "/v1/chains/{chainId}/contracts/{address}",
|
|
26
|
+
path: {
|
|
27
|
+
"chainId": chainId,
|
|
28
|
+
"address": address
|
|
29
|
+
},
|
|
30
|
+
body: requestBody,
|
|
31
|
+
mediaType: "application/json"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { EvmContractsService };
|
|
@@ -75,7 +75,13 @@ declare class EvmTransactionsService {
|
|
|
75
75
|
* A wallet address.
|
|
76
76
|
*/
|
|
77
77
|
address: string;
|
|
78
|
+
/**
|
|
79
|
+
* The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
|
|
80
|
+
*/
|
|
78
81
|
startBlock?: number;
|
|
82
|
+
/**
|
|
83
|
+
* The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
|
|
84
|
+
*/
|
|
79
85
|
endBlock?: number;
|
|
80
86
|
/**
|
|
81
87
|
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
@@ -111,7 +117,13 @@ declare class EvmTransactionsService {
|
|
|
111
117
|
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
112
118
|
*/
|
|
113
119
|
pageToken?: string;
|
|
120
|
+
/**
|
|
121
|
+
* The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
|
|
122
|
+
*/
|
|
114
123
|
startBlock?: number;
|
|
124
|
+
/**
|
|
125
|
+
* The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
|
|
126
|
+
*/
|
|
115
127
|
endBlock?: number;
|
|
116
128
|
/**
|
|
117
129
|
* 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.
|
|
@@ -133,7 +145,13 @@ declare class EvmTransactionsService {
|
|
|
133
145
|
* A wallet address.
|
|
134
146
|
*/
|
|
135
147
|
address: string;
|
|
148
|
+
/**
|
|
149
|
+
* The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
|
|
150
|
+
*/
|
|
136
151
|
startBlock?: number;
|
|
152
|
+
/**
|
|
153
|
+
* The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
|
|
154
|
+
*/
|
|
137
155
|
endBlock?: number;
|
|
138
156
|
/**
|
|
139
157
|
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
@@ -159,7 +177,13 @@ declare class EvmTransactionsService {
|
|
|
159
177
|
* A wallet address.
|
|
160
178
|
*/
|
|
161
179
|
address: string;
|
|
180
|
+
/**
|
|
181
|
+
* The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
|
|
182
|
+
*/
|
|
162
183
|
startBlock?: number;
|
|
184
|
+
/**
|
|
185
|
+
* The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
|
|
186
|
+
*/
|
|
163
187
|
endBlock?: number;
|
|
164
188
|
/**
|
|
165
189
|
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
@@ -185,7 +209,13 @@ declare class EvmTransactionsService {
|
|
|
185
209
|
* A wallet address.
|
|
186
210
|
*/
|
|
187
211
|
address: string;
|
|
212
|
+
/**
|
|
213
|
+
* The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
|
|
214
|
+
*/
|
|
188
215
|
startBlock?: number;
|
|
216
|
+
/**
|
|
217
|
+
* The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
|
|
218
|
+
*/
|
|
189
219
|
endBlock?: number;
|
|
190
220
|
/**
|
|
191
221
|
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
@@ -211,7 +241,13 @@ declare class EvmTransactionsService {
|
|
|
211
241
|
* A wallet address.
|
|
212
242
|
*/
|
|
213
243
|
address: string;
|
|
244
|
+
/**
|
|
245
|
+
* The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
|
|
246
|
+
*/
|
|
214
247
|
startBlock?: number;
|
|
248
|
+
/**
|
|
249
|
+
* The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
|
|
250
|
+
*/
|
|
215
251
|
endBlock?: number;
|
|
216
252
|
/**
|
|
217
253
|
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
@@ -239,7 +275,13 @@ declare class EvmTransactionsService {
|
|
|
239
275
|
* A wallet address.
|
|
240
276
|
*/
|
|
241
277
|
address: string;
|
|
278
|
+
/**
|
|
279
|
+
* The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
|
|
280
|
+
*/
|
|
242
281
|
startBlock?: number;
|
|
282
|
+
/**
|
|
283
|
+
* The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
|
|
284
|
+
*/
|
|
243
285
|
endBlock?: number;
|
|
244
286
|
/**
|
|
245
287
|
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
@@ -27,7 +27,7 @@ class EvmTransactionsService {
|
|
|
27
27
|
}) {
|
|
28
28
|
return this.httpRequest.request({
|
|
29
29
|
method: "GET",
|
|
30
|
-
url: "/v1/chains/{chainId}/
|
|
30
|
+
url: "/v1/chains/{chainId}/contracts/{address}/deployments",
|
|
31
31
|
path: {
|
|
32
32
|
"chainId": chainId,
|
|
33
33
|
"address": address
|
|
@@ -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. 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, pageSize, pageToken, }: {
|
|
37
|
+
/**
|
|
38
|
+
* A supported evm chain 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
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
47
|
+
*/
|
|
48
|
+
pageSize?: number;
|
|
49
|
+
/**
|
|
50
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
51
|
+
*/
|
|
52
|
+
pageToken?: string;
|
|
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. 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
|
+
pageSize = 10,
|
|
24
|
+
pageToken
|
|
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
|
+
"pageSize": pageSize,
|
|
35
|
+
"pageToken": pageToken
|
|
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 };
|
|
@@ -14,7 +14,7 @@ declare class PrimaryNetworkRewardsService {
|
|
|
14
14
|
* @returns ListPendingRewardsResponse
|
|
15
15
|
* @throws ApiError
|
|
16
16
|
*/
|
|
17
|
-
listPendingPrimaryNetworkRewards({ network, addresses, pageSize, pageToken, sortOrder, }: {
|
|
17
|
+
listPendingPrimaryNetworkRewards({ network, addresses, pageSize, pageToken, nodeIds, sortOrder, }: {
|
|
18
18
|
/**
|
|
19
19
|
* Either mainnet or a testnet.
|
|
20
20
|
*/
|
|
@@ -31,6 +31,10 @@ declare class PrimaryNetworkRewardsService {
|
|
|
31
31
|
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
32
32
|
*/
|
|
33
33
|
pageToken?: string;
|
|
34
|
+
/**
|
|
35
|
+
* A comma separated list of node ids to filter by.
|
|
36
|
+
*/
|
|
37
|
+
nodeIds?: string;
|
|
34
38
|
/**
|
|
35
39
|
* 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
40
|
*/
|
|
@@ -42,7 +46,7 @@ declare class PrimaryNetworkRewardsService {
|
|
|
42
46
|
* @returns ListHistoricalRewardsResponse
|
|
43
47
|
* @throws ApiError
|
|
44
48
|
*/
|
|
45
|
-
listHistoricalPrimaryNetworkRewards({ network, addresses, pageSize, pageToken, sortOrder, }: {
|
|
49
|
+
listHistoricalPrimaryNetworkRewards({ network, addresses, pageSize, pageToken, nodeIds, sortOrder, }: {
|
|
46
50
|
/**
|
|
47
51
|
* Either mainnet or a testnet.
|
|
48
52
|
*/
|
|
@@ -59,6 +63,10 @@ declare class PrimaryNetworkRewardsService {
|
|
|
59
63
|
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
60
64
|
*/
|
|
61
65
|
pageToken?: string;
|
|
66
|
+
/**
|
|
67
|
+
* A comma separated list of node ids to filter by.
|
|
68
|
+
*/
|
|
69
|
+
nodeIds?: string;
|
|
62
70
|
/**
|
|
63
71
|
* 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
72
|
*/
|
|
@@ -7,6 +7,7 @@ class PrimaryNetworkRewardsService {
|
|
|
7
7
|
addresses,
|
|
8
8
|
pageSize = 10,
|
|
9
9
|
pageToken,
|
|
10
|
+
nodeIds,
|
|
10
11
|
sortOrder
|
|
11
12
|
}) {
|
|
12
13
|
return this.httpRequest.request({
|
|
@@ -19,6 +20,7 @@ class PrimaryNetworkRewardsService {
|
|
|
19
20
|
"addresses": addresses,
|
|
20
21
|
"pageSize": pageSize,
|
|
21
22
|
"pageToken": pageToken,
|
|
23
|
+
"nodeIds": nodeIds,
|
|
22
24
|
"sortOrder": sortOrder
|
|
23
25
|
}
|
|
24
26
|
});
|
|
@@ -28,6 +30,7 @@ class PrimaryNetworkRewardsService {
|
|
|
28
30
|
addresses,
|
|
29
31
|
pageSize = 10,
|
|
30
32
|
pageToken,
|
|
33
|
+
nodeIds,
|
|
31
34
|
sortOrder
|
|
32
35
|
}) {
|
|
33
36
|
return this.httpRequest.request({
|
|
@@ -40,6 +43,7 @@ class PrimaryNetworkRewardsService {
|
|
|
40
43
|
"addresses": addresses,
|
|
41
44
|
"pageSize": pageSize,
|
|
42
45
|
"pageToken": pageToken,
|
|
46
|
+
"nodeIds": nodeIds,
|
|
43
47
|
"sortOrder": sortOrder
|
|
44
48
|
}
|
|
45
49
|
});
|
|
@@ -118,7 +118,7 @@ declare class PrimaryNetworkService {
|
|
|
118
118
|
* @returns ListValidatorDetailsResponse
|
|
119
119
|
* @throws ApiError
|
|
120
120
|
*/
|
|
121
|
-
listValidators({ network, pageSize, pageToken, nodeIds, sortOrder, validationStatus,
|
|
121
|
+
listValidators({ network, pageSize, pageToken, minTimeRemaining, maxTimeRemaining, minDelegationCapacity, maxDelegationCapacity, minFeePercentage, maxFeePercentage, nodeIds, sortOrder, validationStatus, subnetId, }: {
|
|
122
122
|
/**
|
|
123
123
|
* Either mainnet or a testnet.
|
|
124
124
|
*/
|
|
@@ -131,6 +131,30 @@ declare class PrimaryNetworkService {
|
|
|
131
131
|
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
132
132
|
*/
|
|
133
133
|
pageToken?: string;
|
|
134
|
+
/**
|
|
135
|
+
* The minimum validation time remaining, in seconds, used to filter the set of nodes being returned.
|
|
136
|
+
*/
|
|
137
|
+
minTimeRemaining?: any;
|
|
138
|
+
/**
|
|
139
|
+
* The maximum validation time remaining, in seconds, used to filter the set of nodes being returned.
|
|
140
|
+
*/
|
|
141
|
+
maxTimeRemaining?: any;
|
|
142
|
+
/**
|
|
143
|
+
* The minimum delegation capacity, in nAVAX, used to filter the set of nodes being returned. Accepts values between 0 and 720,000,000,000,000,000
|
|
144
|
+
*/
|
|
145
|
+
minDelegationCapacity?: number;
|
|
146
|
+
/**
|
|
147
|
+
* The maximum delegation capacity, in nAVAX, used to filter the set of nodes being returned. Accepts values between 0 and 720,000,000,000,000,000.
|
|
148
|
+
*/
|
|
149
|
+
maxDelegationCapacity?: number;
|
|
150
|
+
/**
|
|
151
|
+
* The minimum fee percentage, used to filter the set of nodes being returned.If this field is populated no subnet validations will be returned, as their fee percentage is null, since subnet delegations are not supported. Default is 2, as per the Avalanche spec.
|
|
152
|
+
*/
|
|
153
|
+
minFeePercentage?: any;
|
|
154
|
+
/**
|
|
155
|
+
* The maximum fee percentage, used to filter the set of nodes being returned. If this field is populated no subnet validations will be returned, as their fee percentage is null, since subnet delegations are not supported. Default is 100.
|
|
156
|
+
*/
|
|
157
|
+
maxFeePercentage?: any;
|
|
134
158
|
/**
|
|
135
159
|
* A comma separated list of node ids to filter by.
|
|
136
160
|
*/
|
|
@@ -144,9 +168,9 @@ declare class PrimaryNetworkService {
|
|
|
144
168
|
*/
|
|
145
169
|
validationStatus?: ValidationStatusType;
|
|
146
170
|
/**
|
|
147
|
-
* The
|
|
171
|
+
* The subnet ID to filter by. If not provided, then all subnets will be returned.
|
|
148
172
|
*/
|
|
149
|
-
|
|
173
|
+
subnetId?: string;
|
|
150
174
|
}): CancelablePromise<ListValidatorDetailsResponse>;
|
|
151
175
|
/**
|
|
152
176
|
* Get single validator details
|
|
@@ -186,7 +210,7 @@ declare class PrimaryNetworkService {
|
|
|
186
210
|
* @returns ListDelegatorDetailsResponse
|
|
187
211
|
* @throws ApiError
|
|
188
212
|
*/
|
|
189
|
-
listDelegators({ network, pageSize, pageToken, sortOrder, delegationStatus,
|
|
213
|
+
listDelegators({ network, pageSize, pageToken, rewardAddresses, sortOrder, delegationStatus, nodeIds, }: {
|
|
190
214
|
/**
|
|
191
215
|
* Either mainnet or a testnet.
|
|
192
216
|
*/
|
|
@@ -199,6 +223,10 @@ declare class PrimaryNetworkService {
|
|
|
199
223
|
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
200
224
|
*/
|
|
201
225
|
pageToken?: string;
|
|
226
|
+
/**
|
|
227
|
+
* A comma separated list of reward addresses to filter by.
|
|
228
|
+
*/
|
|
229
|
+
rewardAddresses?: string;
|
|
202
230
|
/**
|
|
203
231
|
* 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.
|
|
204
232
|
*/
|
|
@@ -207,10 +235,6 @@ declare class PrimaryNetworkService {
|
|
|
207
235
|
* Delegation status of the node.
|
|
208
236
|
*/
|
|
209
237
|
delegationStatus?: DelegationStatusType;
|
|
210
|
-
/**
|
|
211
|
-
* A comma separated list of reward addresses to filter by.
|
|
212
|
-
*/
|
|
213
|
-
rewardAddresses?: string;
|
|
214
238
|
/**
|
|
215
239
|
* A comma separated list of node ids to filter by.
|
|
216
240
|
*/
|