@avalabs/glacier-sdk 2.8.0-canary.5083b17.0 → 2.8.0-canary.50c5939.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 +370 -186
- package/dist/index.js +221 -117
- package/esm/generated/Glacier.d.ts +4 -0
- package/esm/generated/Glacier.js +6 -0
- package/esm/generated/core/CancelablePromise.d.ts +2 -8
- package/esm/generated/core/CancelablePromise.js +38 -36
- package/esm/generated/core/request.js +3 -2
- package/esm/generated/models/ActiveValidatorDetails.d.ts +5 -0
- package/esm/generated/models/AddressActivityMetadata.d.ts +2 -10
- package/esm/generated/models/AddressesChangeRequest.d.ts +8 -0
- package/esm/generated/models/BlsCredentials.d.ts +6 -0
- package/esm/generated/models/ChainInfo.d.ts +1 -1
- package/esm/generated/models/CompletedValidatorDetails.d.ts +5 -0
- package/esm/generated/models/DeliveredSourceNotIndexedTeleporterMessage.d.ts +2 -0
- package/esm/generated/models/DeliveredTeleporterMessage.d.ts +2 -0
- package/esm/generated/models/GetChainResponse.d.ts +1 -1
- package/esm/generated/models/GlacierApiFeature.d.ts +2 -1
- package/esm/generated/models/GlacierApiFeature.js +1 -0
- package/esm/generated/models/ListTeleporterMessagesResponse.d.ts +12 -0
- package/esm/generated/models/ListWebhookAddressesResponse.d.ts +10 -0
- package/esm/generated/models/PChainTransaction.d.ts +5 -0
- package/esm/generated/models/PendingTeleporterMessage.d.ts +2 -0
- package/esm/generated/models/PendingValidatorDetails.d.ts +6 -0
- package/esm/generated/models/PrimaryNetworkOptions.d.ts +1 -1
- package/esm/generated/models/RegisterWebhookRequest.d.ts +8 -0
- package/esm/generated/models/RemovedValidatorDetails.d.ts +6 -0
- package/esm/generated/models/RpcErrorDto.d.ts +7 -0
- package/esm/generated/models/RpcErrorResponseDto.d.ts +9 -0
- package/esm/generated/models/RpcRequestBodyDto.d.ts +8 -0
- package/esm/generated/models/RpcSuccessResponseDto.d.ts +7 -0
- package/esm/generated/models/SortByOption.d.ts +9 -0
- package/esm/generated/models/SortByOption.js +10 -0
- package/esm/generated/models/UpdateWebhookRequest.d.ts +1 -1
- package/esm/generated/models/WebhookResponse.d.ts +8 -0
- package/esm/generated/services/DefaultService.d.ts +0 -86
- package/esm/generated/services/DefaultService.js +0 -73
- package/esm/generated/services/EvmBalancesService.d.ts +5 -1
- package/esm/generated/services/EvmBalancesService.js +2 -0
- package/esm/generated/services/PrimaryNetworkService.d.ts +24 -9
- package/esm/generated/services/PrimaryNetworkService.js +10 -4
- package/esm/generated/services/RpcService.d.ts +25 -0
- package/esm/generated/services/RpcService.js +24 -0
- package/esm/generated/services/TeleporterService.d.ts +9 -4
- package/esm/generated/services/TeleporterService.js +4 -2
- package/esm/generated/services/WebhooksService.d.ts +143 -0
- package/esm/generated/services/WebhooksService.js +125 -0
- package/esm/index.d.ts +11 -0
- package/esm/index.js +3 -0
- package/package.json +3 -3
|
@@ -8,71 +8,73 @@ class CancelError extends Error {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
class CancelablePromise {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
_reject;
|
|
11
|
+
#isResolved;
|
|
12
|
+
#isRejected;
|
|
13
|
+
#isCancelled;
|
|
14
|
+
#cancelHandlers;
|
|
15
|
+
#promise;
|
|
16
|
+
#resolve;
|
|
17
|
+
#reject;
|
|
19
18
|
constructor(executor) {
|
|
20
|
-
this
|
|
21
|
-
this
|
|
22
|
-
this
|
|
23
|
-
this
|
|
24
|
-
this
|
|
25
|
-
this
|
|
26
|
-
this
|
|
19
|
+
this.#isResolved = false;
|
|
20
|
+
this.#isRejected = false;
|
|
21
|
+
this.#isCancelled = false;
|
|
22
|
+
this.#cancelHandlers = [];
|
|
23
|
+
this.#promise = new Promise((resolve, reject) => {
|
|
24
|
+
this.#resolve = resolve;
|
|
25
|
+
this.#reject = reject;
|
|
27
26
|
const onResolve = (value) => {
|
|
28
|
-
if (this
|
|
27
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
29
28
|
return;
|
|
30
29
|
}
|
|
31
|
-
this
|
|
32
|
-
this
|
|
30
|
+
this.#isResolved = true;
|
|
31
|
+
this.#resolve?.(value);
|
|
33
32
|
};
|
|
34
33
|
const onReject = (reason) => {
|
|
35
|
-
if (this
|
|
34
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
36
35
|
return;
|
|
37
36
|
}
|
|
38
|
-
this
|
|
39
|
-
this
|
|
37
|
+
this.#isRejected = true;
|
|
38
|
+
this.#reject?.(reason);
|
|
40
39
|
};
|
|
41
40
|
const onCancel = (cancelHandler) => {
|
|
42
|
-
if (this
|
|
41
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
43
42
|
return;
|
|
44
43
|
}
|
|
45
|
-
this.
|
|
44
|
+
this.#cancelHandlers.push(cancelHandler);
|
|
46
45
|
};
|
|
47
46
|
Object.defineProperty(onCancel, "isResolved", {
|
|
48
|
-
get: () => this
|
|
47
|
+
get: () => this.#isResolved
|
|
49
48
|
});
|
|
50
49
|
Object.defineProperty(onCancel, "isRejected", {
|
|
51
|
-
get: () => this
|
|
50
|
+
get: () => this.#isRejected
|
|
52
51
|
});
|
|
53
52
|
Object.defineProperty(onCancel, "isCancelled", {
|
|
54
|
-
get: () => this
|
|
53
|
+
get: () => this.#isCancelled
|
|
55
54
|
});
|
|
56
55
|
return executor(onResolve, onReject, onCancel);
|
|
57
56
|
});
|
|
58
57
|
}
|
|
58
|
+
get [Symbol.toStringTag]() {
|
|
59
|
+
return "Cancellable Promise";
|
|
60
|
+
}
|
|
59
61
|
then(onFulfilled, onRejected) {
|
|
60
|
-
return this.
|
|
62
|
+
return this.#promise.then(onFulfilled, onRejected);
|
|
61
63
|
}
|
|
62
64
|
catch(onRejected) {
|
|
63
|
-
return this.
|
|
65
|
+
return this.#promise.catch(onRejected);
|
|
64
66
|
}
|
|
65
67
|
finally(onFinally) {
|
|
66
|
-
return this.
|
|
68
|
+
return this.#promise.finally(onFinally);
|
|
67
69
|
}
|
|
68
70
|
cancel() {
|
|
69
|
-
if (this
|
|
71
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
70
72
|
return;
|
|
71
73
|
}
|
|
72
|
-
this
|
|
73
|
-
if (this.
|
|
74
|
+
this.#isCancelled = true;
|
|
75
|
+
if (this.#cancelHandlers.length) {
|
|
74
76
|
try {
|
|
75
|
-
for (const cancelHandler of this
|
|
77
|
+
for (const cancelHandler of this.#cancelHandlers) {
|
|
76
78
|
cancelHandler();
|
|
77
79
|
}
|
|
78
80
|
} catch (error) {
|
|
@@ -80,11 +82,11 @@ class CancelablePromise {
|
|
|
80
82
|
return;
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
|
-
this.
|
|
84
|
-
this
|
|
85
|
+
this.#cancelHandlers.length = 0;
|
|
86
|
+
this.#reject?.(new CancelError("Request aborted"));
|
|
85
87
|
}
|
|
86
88
|
get isCancelled() {
|
|
87
|
-
return this
|
|
89
|
+
return this.#isCancelled;
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
|
|
@@ -126,7 +126,7 @@ const getHeaders = async (config, options) => {
|
|
|
126
126
|
return new Headers(headers);
|
|
127
127
|
};
|
|
128
128
|
const getRequestBody = (options) => {
|
|
129
|
-
if (options.body) {
|
|
129
|
+
if (options.body !== void 0) {
|
|
130
130
|
if (options.mediaType?.includes("/json")) {
|
|
131
131
|
return JSON.stringify(options.body);
|
|
132
132
|
} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
|
|
@@ -165,7 +165,8 @@ const getResponseBody = async (response) => {
|
|
|
165
165
|
try {
|
|
166
166
|
const contentType = response.headers.get("Content-Type");
|
|
167
167
|
if (contentType) {
|
|
168
|
-
const
|
|
168
|
+
const jsonTypes = ["application/json", "application/problem+json"];
|
|
169
|
+
const isJSON = jsonTypes.some((type) => contentType.toLowerCase().startsWith(type));
|
|
169
170
|
if (isJSON) {
|
|
170
171
|
return await response.json();
|
|
171
172
|
} else {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BlsCredentials } from './BlsCredentials.js';
|
|
1
2
|
import { Rewards } from './Rewards.js';
|
|
2
3
|
import { ValidatorHealthDetails } from './ValidatorHealthDetails.js';
|
|
3
4
|
|
|
@@ -9,6 +10,10 @@ type ActiveValidatorDetails = {
|
|
|
9
10
|
delegationFee?: string;
|
|
10
11
|
startTimestamp: number;
|
|
11
12
|
endTimestamp: number;
|
|
13
|
+
/**
|
|
14
|
+
* Present for AddPermissionlessValidatorTx
|
|
15
|
+
*/
|
|
16
|
+
blsCredentials?: BlsCredentials;
|
|
12
17
|
stakePercentage: number;
|
|
13
18
|
delegatorCount: number;
|
|
14
19
|
amountDelegated?: string;
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
type AddressActivityMetadata = {
|
|
2
2
|
/**
|
|
3
|
-
* Ethereum address for the address_activity event type
|
|
3
|
+
* Ethereum address(es) for the address_activity event type
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
addresses: Array<any[]>;
|
|
6
6
|
/**
|
|
7
7
|
* Array of hexadecimal strings of the event signatures.
|
|
8
8
|
*/
|
|
9
9
|
eventSignatures?: Array<string>;
|
|
10
|
-
/**
|
|
11
|
-
* Whether to include traces in the webhook payload.
|
|
12
|
-
*/
|
|
13
|
-
includeTraces?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Whether to include logs in the webhook payload.
|
|
16
|
-
*/
|
|
17
|
-
includeLogs?: boolean;
|
|
18
10
|
};
|
|
19
11
|
|
|
20
12
|
export { AddressActivityMetadata };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BlsCredentials } from './BlsCredentials.js';
|
|
1
2
|
import { Rewards } from './Rewards.js';
|
|
2
3
|
|
|
3
4
|
type CompletedValidatorDetails = {
|
|
@@ -8,6 +9,10 @@ type CompletedValidatorDetails = {
|
|
|
8
9
|
delegationFee?: string;
|
|
9
10
|
startTimestamp: number;
|
|
10
11
|
endTimestamp: number;
|
|
12
|
+
/**
|
|
13
|
+
* Present for AddPermissionlessValidatorTx
|
|
14
|
+
*/
|
|
15
|
+
blsCredentials?: BlsCredentials;
|
|
11
16
|
delegatorCount: number;
|
|
12
17
|
rewards: Rewards;
|
|
13
18
|
validationStatus: CompletedValidatorDetails.validationStatus;
|
|
@@ -7,6 +7,8 @@ type DeliveredSourceNotIndexedTeleporterMessage = {
|
|
|
7
7
|
teleporterContractAddress: string;
|
|
8
8
|
sourceBlockchainId: string;
|
|
9
9
|
destinationBlockchainId: string;
|
|
10
|
+
sourceEvmChainId: string;
|
|
11
|
+
destinationEvmChainId: string;
|
|
10
12
|
messageNonce: string;
|
|
11
13
|
from: string;
|
|
12
14
|
to: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DeliveredTeleporterMessage } from './DeliveredTeleporterMessage.js';
|
|
2
|
+
import { PendingTeleporterMessage } from './PendingTeleporterMessage.js';
|
|
3
|
+
|
|
4
|
+
type ListTeleporterMessagesResponse = {
|
|
5
|
+
/**
|
|
6
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
7
|
+
*/
|
|
8
|
+
nextPageToken?: string;
|
|
9
|
+
messages: Array<(PendingTeleporterMessage | DeliveredTeleporterMessage)>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { ListTeleporterMessagesResponse };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type ListWebhookAddressesResponse = {
|
|
2
|
+
/**
|
|
3
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
4
|
+
*/
|
|
5
|
+
nextPageToken?: string;
|
|
6
|
+
addresses: Array<string>;
|
|
7
|
+
totalAddresses: number;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { ListWebhookAddressesResponse };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AssetAmount } from './AssetAmount.js';
|
|
2
|
+
import { BlsCredentials } from './BlsCredentials.js';
|
|
2
3
|
import { PChainTransactionType } from './PChainTransactionType.js';
|
|
3
4
|
import { PChainUtxo } from './PChainUtxo.js';
|
|
4
5
|
import { SubnetOwnershipInfo } from './SubnetOwnershipInfo.js';
|
|
@@ -72,6 +73,10 @@ type PChainTransaction = {
|
|
|
72
73
|
* Subnet owner details for the CreateSubnetTx or TransferSubnetOwnershipTx
|
|
73
74
|
*/
|
|
74
75
|
subnetOwnershipInfo?: SubnetOwnershipInfo;
|
|
76
|
+
/**
|
|
77
|
+
* Present for AddPermissionlessValidatorTx
|
|
78
|
+
*/
|
|
79
|
+
blsCredentials?: BlsCredentials;
|
|
75
80
|
};
|
|
76
81
|
|
|
77
82
|
export { PChainTransaction };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { BlsCredentials } from './BlsCredentials.js';
|
|
2
|
+
|
|
1
3
|
type PendingValidatorDetails = {
|
|
2
4
|
txHash: string;
|
|
3
5
|
nodeId: string;
|
|
@@ -6,6 +8,10 @@ type PendingValidatorDetails = {
|
|
|
6
8
|
delegationFee?: string;
|
|
7
9
|
startTimestamp: number;
|
|
8
10
|
endTimestamp: number;
|
|
11
|
+
/**
|
|
12
|
+
* Present for AddPermissionlessValidatorTx
|
|
13
|
+
*/
|
|
14
|
+
blsCredentials?: BlsCredentials;
|
|
9
15
|
validationStatus: PendingValidatorDetails.validationStatus;
|
|
10
16
|
};
|
|
11
17
|
declare namespace PendingValidatorDetails {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type PrimaryNetworkOptions = {
|
|
2
|
-
addresses
|
|
2
|
+
addresses?: Array<string>;
|
|
3
3
|
cChainEvmAddresses?: Array<string>;
|
|
4
4
|
includeChains: Array<'11111111111111111111111111111111LpoYY' | '2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM' | '2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm' | '2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5' | 'yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp' | 'p-chain' | 'x-chain' | 'c-chain'>;
|
|
5
5
|
};
|
|
@@ -6,6 +6,14 @@ type RegisterWebhookRequest = {
|
|
|
6
6
|
chainId: string;
|
|
7
7
|
eventType: EventType;
|
|
8
8
|
metadata: AddressActivityMetadata;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to include traces in the webhook payload.
|
|
11
|
+
*/
|
|
12
|
+
includeInternalTxs?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to include logs in the webhook payload.
|
|
15
|
+
*/
|
|
16
|
+
includeLogs?: boolean;
|
|
9
17
|
};
|
|
10
18
|
|
|
11
19
|
export { RegisterWebhookRequest };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { BlsCredentials } from './BlsCredentials.js';
|
|
2
|
+
|
|
1
3
|
type RemovedValidatorDetails = {
|
|
2
4
|
txHash: string;
|
|
3
5
|
nodeId: string;
|
|
@@ -6,6 +8,10 @@ type RemovedValidatorDetails = {
|
|
|
6
8
|
delegationFee?: string;
|
|
7
9
|
startTimestamp: number;
|
|
8
10
|
endTimestamp: number;
|
|
11
|
+
/**
|
|
12
|
+
* Present for AddPermissionlessValidatorTx
|
|
13
|
+
*/
|
|
14
|
+
blsCredentials?: BlsCredentials;
|
|
9
15
|
removeTxHash: string;
|
|
10
16
|
removeTimestamp: number;
|
|
11
17
|
validationStatus: RemovedValidatorDetails.validationStatus;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var SortByOption = /* @__PURE__ */ ((SortByOption2) => {
|
|
2
|
+
SortByOption2["BLOCK_INDEX"] = "blockIndex";
|
|
3
|
+
SortByOption2["DELEGATION_CAPACITY"] = "delegationCapacity";
|
|
4
|
+
SortByOption2["TIME_REMAINING"] = "timeRemaining";
|
|
5
|
+
SortByOption2["DELEGATION_FEE"] = "delegationFee";
|
|
6
|
+
SortByOption2["UPTIME_PERFORMANCE"] = "uptimePerformance";
|
|
7
|
+
return SortByOption2;
|
|
8
|
+
})(SortByOption || {});
|
|
9
|
+
|
|
10
|
+
export { SortByOption };
|
|
@@ -6,6 +6,14 @@ type WebhookResponse = {
|
|
|
6
6
|
id: string;
|
|
7
7
|
eventType: EventType;
|
|
8
8
|
metadata: AddressActivityMetadata;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to include traces in the webhook payload.
|
|
11
|
+
*/
|
|
12
|
+
includeInternalTxs?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to include logs in the webhook payload.
|
|
15
|
+
*/
|
|
16
|
+
includeLogs?: boolean;
|
|
9
17
|
url: string;
|
|
10
18
|
chainId: string;
|
|
11
19
|
status: WebhookStatusType;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { ListWebhooksResponse } from '../models/ListWebhooksResponse.js';
|
|
2
|
-
import { RegisterWebhookRequest } from '../models/RegisterWebhookRequest.js';
|
|
3
|
-
import { SharedSecretsResponse } from '../models/SharedSecretsResponse.js';
|
|
4
|
-
import { UpdateWebhookRequest } from '../models/UpdateWebhookRequest.js';
|
|
5
|
-
import { WebhookResponse } from '../models/WebhookResponse.js';
|
|
6
|
-
import { WebhookStatus } from '../models/WebhookStatus.js';
|
|
7
1
|
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
8
2
|
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
9
3
|
|
|
@@ -15,86 +9,6 @@ declare class DefaultService {
|
|
|
15
9
|
* @throws ApiError
|
|
16
10
|
*/
|
|
17
11
|
mediaControllerUploadImage(): CancelablePromise<any>;
|
|
18
|
-
/**
|
|
19
|
-
* Register a webhook
|
|
20
|
-
* Registers a new webhook.
|
|
21
|
-
* @returns WebhookResponse
|
|
22
|
-
* @throws ApiError
|
|
23
|
-
*/
|
|
24
|
-
registerWebhook({ requestBody, }: {
|
|
25
|
-
requestBody: RegisterWebhookRequest;
|
|
26
|
-
}): CancelablePromise<WebhookResponse>;
|
|
27
|
-
/**
|
|
28
|
-
* List webhooks
|
|
29
|
-
* Lists webhooks for the user.
|
|
30
|
-
* @returns ListWebhooksResponse
|
|
31
|
-
* @throws ApiError
|
|
32
|
-
*/
|
|
33
|
-
listWebhooks({ pageToken, pageSize, status, }: {
|
|
34
|
-
/**
|
|
35
|
-
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
36
|
-
*/
|
|
37
|
-
pageToken?: string;
|
|
38
|
-
/**
|
|
39
|
-
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
40
|
-
*/
|
|
41
|
-
pageSize?: number;
|
|
42
|
-
/**
|
|
43
|
-
* 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.
|
|
44
|
-
*/
|
|
45
|
-
status?: WebhookStatus;
|
|
46
|
-
}): CancelablePromise<ListWebhooksResponse>;
|
|
47
|
-
/**
|
|
48
|
-
* Get a webhook by ID
|
|
49
|
-
* Retrieves a webhook by ID.
|
|
50
|
-
* @returns WebhookResponse
|
|
51
|
-
* @throws ApiError
|
|
52
|
-
*/
|
|
53
|
-
getWebhook({ id, }: {
|
|
54
|
-
/**
|
|
55
|
-
* The webhook identifier.
|
|
56
|
-
*/
|
|
57
|
-
id: string;
|
|
58
|
-
}): CancelablePromise<WebhookResponse>;
|
|
59
|
-
/**
|
|
60
|
-
* Deactivate a webhook
|
|
61
|
-
* Deactivates a webhook by ID.
|
|
62
|
-
* @returns WebhookResponse
|
|
63
|
-
* @throws ApiError
|
|
64
|
-
*/
|
|
65
|
-
deactivateWebhook({ id, }: {
|
|
66
|
-
/**
|
|
67
|
-
* The webhook identifier.
|
|
68
|
-
*/
|
|
69
|
-
id: string;
|
|
70
|
-
}): CancelablePromise<WebhookResponse>;
|
|
71
|
-
/**
|
|
72
|
-
* Update a webhook
|
|
73
|
-
* Updates an existing webhook.
|
|
74
|
-
* @returns WebhookResponse
|
|
75
|
-
* @throws ApiError
|
|
76
|
-
*/
|
|
77
|
-
updateWebhook({ id, requestBody, }: {
|
|
78
|
-
/**
|
|
79
|
-
* The webhook identifier.
|
|
80
|
-
*/
|
|
81
|
-
id: string;
|
|
82
|
-
requestBody: UpdateWebhookRequest;
|
|
83
|
-
}): CancelablePromise<WebhookResponse>;
|
|
84
|
-
/**
|
|
85
|
-
* Generate a shared secret
|
|
86
|
-
* Generates a new shared secret.
|
|
87
|
-
* @returns SharedSecretsResponse
|
|
88
|
-
* @throws ApiError
|
|
89
|
-
*/
|
|
90
|
-
generateSharedSecret(): CancelablePromise<SharedSecretsResponse>;
|
|
91
|
-
/**
|
|
92
|
-
* Get a shared secret
|
|
93
|
-
* Get a previously generated shared secret.
|
|
94
|
-
* @returns SharedSecretsResponse
|
|
95
|
-
* @throws ApiError
|
|
96
|
-
*/
|
|
97
|
-
getSharedSecret(): CancelablePromise<SharedSecretsResponse>;
|
|
98
12
|
}
|
|
99
13
|
|
|
100
14
|
export { DefaultService };
|
|
@@ -8,79 +8,6 @@ class DefaultService {
|
|
|
8
8
|
url: "/v1/media/uploadImage"
|
|
9
9
|
});
|
|
10
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
|
-
pageToken,
|
|
23
|
-
pageSize = 10,
|
|
24
|
-
status
|
|
25
|
-
}) {
|
|
26
|
-
return this.httpRequest.request({
|
|
27
|
-
method: "GET",
|
|
28
|
-
url: "/v1/webhooks",
|
|
29
|
-
query: {
|
|
30
|
-
"pageToken": pageToken,
|
|
31
|
-
"pageSize": pageSize,
|
|
32
|
-
"status": status
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
getWebhook({
|
|
37
|
-
id
|
|
38
|
-
}) {
|
|
39
|
-
return this.httpRequest.request({
|
|
40
|
-
method: "GET",
|
|
41
|
-
url: "/v1/webhooks/{id}",
|
|
42
|
-
path: {
|
|
43
|
-
"id": id
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
deactivateWebhook({
|
|
48
|
-
id
|
|
49
|
-
}) {
|
|
50
|
-
return this.httpRequest.request({
|
|
51
|
-
method: "DELETE",
|
|
52
|
-
url: "/v1/webhooks/{id}",
|
|
53
|
-
path: {
|
|
54
|
-
"id": id
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
updateWebhook({
|
|
59
|
-
id,
|
|
60
|
-
requestBody
|
|
61
|
-
}) {
|
|
62
|
-
return this.httpRequest.request({
|
|
63
|
-
method: "PATCH",
|
|
64
|
-
url: "/v1/webhooks/{id}",
|
|
65
|
-
path: {
|
|
66
|
-
"id": id
|
|
67
|
-
},
|
|
68
|
-
body: requestBody,
|
|
69
|
-
mediaType: "application/json"
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
generateSharedSecret() {
|
|
73
|
-
return this.httpRequest.request({
|
|
74
|
-
method: "POST",
|
|
75
|
-
url: "/v1/webhooks:generateOrRotateSharedSecret"
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
getSharedSecret() {
|
|
79
|
-
return this.httpRequest.request({
|
|
80
|
-
method: "GET",
|
|
81
|
-
url: "/v1/webhooks:getSharedSecret"
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
11
|
}
|
|
85
12
|
|
|
86
13
|
export { DefaultService };
|
|
@@ -46,7 +46,7 @@ declare class EvmBalancesService {
|
|
|
46
46
|
* @returns ListErc20BalancesResponse
|
|
47
47
|
* @throws ApiError
|
|
48
48
|
*/
|
|
49
|
-
listErc20Balances({ chainId, address, blockNumber, pageToken, pageSize, contractAddresses, currency, }: {
|
|
49
|
+
listErc20Balances({ chainId, address, blockNumber, pageToken, pageSize, filterSpamTokens, contractAddresses, currency, }: {
|
|
50
50
|
/**
|
|
51
51
|
* A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
52
52
|
*/
|
|
@@ -67,6 +67,10 @@ declare class EvmBalancesService {
|
|
|
67
67
|
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
68
68
|
*/
|
|
69
69
|
pageSize?: number;
|
|
70
|
+
/**
|
|
71
|
+
* whether to filter out spam tokens from the response. Default is true.
|
|
72
|
+
*/
|
|
73
|
+
filterSpamTokens?: boolean;
|
|
70
74
|
/**
|
|
71
75
|
* A comma separated list of contract addresses to filter by.
|
|
72
76
|
*/
|