@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.
Files changed (49) hide show
  1. package/dist/index.d.ts +370 -186
  2. package/dist/index.js +221 -117
  3. package/esm/generated/Glacier.d.ts +4 -0
  4. package/esm/generated/Glacier.js +6 -0
  5. package/esm/generated/core/CancelablePromise.d.ts +2 -8
  6. package/esm/generated/core/CancelablePromise.js +38 -36
  7. package/esm/generated/core/request.js +3 -2
  8. package/esm/generated/models/ActiveValidatorDetails.d.ts +5 -0
  9. package/esm/generated/models/AddressActivityMetadata.d.ts +2 -10
  10. package/esm/generated/models/AddressesChangeRequest.d.ts +8 -0
  11. package/esm/generated/models/BlsCredentials.d.ts +6 -0
  12. package/esm/generated/models/ChainInfo.d.ts +1 -1
  13. package/esm/generated/models/CompletedValidatorDetails.d.ts +5 -0
  14. package/esm/generated/models/DeliveredSourceNotIndexedTeleporterMessage.d.ts +2 -0
  15. package/esm/generated/models/DeliveredTeleporterMessage.d.ts +2 -0
  16. package/esm/generated/models/GetChainResponse.d.ts +1 -1
  17. package/esm/generated/models/GlacierApiFeature.d.ts +2 -1
  18. package/esm/generated/models/GlacierApiFeature.js +1 -0
  19. package/esm/generated/models/ListTeleporterMessagesResponse.d.ts +12 -0
  20. package/esm/generated/models/ListWebhookAddressesResponse.d.ts +10 -0
  21. package/esm/generated/models/PChainTransaction.d.ts +5 -0
  22. package/esm/generated/models/PendingTeleporterMessage.d.ts +2 -0
  23. package/esm/generated/models/PendingValidatorDetails.d.ts +6 -0
  24. package/esm/generated/models/PrimaryNetworkOptions.d.ts +1 -1
  25. package/esm/generated/models/RegisterWebhookRequest.d.ts +8 -0
  26. package/esm/generated/models/RemovedValidatorDetails.d.ts +6 -0
  27. package/esm/generated/models/RpcErrorDto.d.ts +7 -0
  28. package/esm/generated/models/RpcErrorResponseDto.d.ts +9 -0
  29. package/esm/generated/models/RpcRequestBodyDto.d.ts +8 -0
  30. package/esm/generated/models/RpcSuccessResponseDto.d.ts +7 -0
  31. package/esm/generated/models/SortByOption.d.ts +9 -0
  32. package/esm/generated/models/SortByOption.js +10 -0
  33. package/esm/generated/models/UpdateWebhookRequest.d.ts +1 -1
  34. package/esm/generated/models/WebhookResponse.d.ts +8 -0
  35. package/esm/generated/services/DefaultService.d.ts +0 -86
  36. package/esm/generated/services/DefaultService.js +0 -73
  37. package/esm/generated/services/EvmBalancesService.d.ts +5 -1
  38. package/esm/generated/services/EvmBalancesService.js +2 -0
  39. package/esm/generated/services/PrimaryNetworkService.d.ts +24 -9
  40. package/esm/generated/services/PrimaryNetworkService.js +10 -4
  41. package/esm/generated/services/RpcService.d.ts +25 -0
  42. package/esm/generated/services/RpcService.js +24 -0
  43. package/esm/generated/services/TeleporterService.d.ts +9 -4
  44. package/esm/generated/services/TeleporterService.js +4 -2
  45. package/esm/generated/services/WebhooksService.d.ts +143 -0
  46. package/esm/generated/services/WebhooksService.js +125 -0
  47. package/esm/index.d.ts +11 -0
  48. package/esm/index.js +3 -0
  49. package/package.json +3 -3
@@ -8,71 +8,73 @@ class CancelError extends Error {
8
8
  }
9
9
  }
10
10
  class CancelablePromise {
11
- [Symbol.toStringTag];
12
- _isResolved;
13
- _isRejected;
14
- _isCancelled;
15
- _cancelHandlers;
16
- _promise;
17
- _resolve;
18
- _reject;
11
+ #isResolved;
12
+ #isRejected;
13
+ #isCancelled;
14
+ #cancelHandlers;
15
+ #promise;
16
+ #resolve;
17
+ #reject;
19
18
  constructor(executor) {
20
- this._isResolved = false;
21
- this._isRejected = false;
22
- this._isCancelled = false;
23
- this._cancelHandlers = [];
24
- this._promise = new Promise((resolve, reject) => {
25
- this._resolve = resolve;
26
- this._reject = reject;
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._isResolved || this._isRejected || this._isCancelled) {
27
+ if (this.#isResolved || this.#isRejected || this.#isCancelled) {
29
28
  return;
30
29
  }
31
- this._isResolved = true;
32
- this._resolve?.(value);
30
+ this.#isResolved = true;
31
+ this.#resolve?.(value);
33
32
  };
34
33
  const onReject = (reason) => {
35
- if (this._isResolved || this._isRejected || this._isCancelled) {
34
+ if (this.#isResolved || this.#isRejected || this.#isCancelled) {
36
35
  return;
37
36
  }
38
- this._isRejected = true;
39
- this._reject?.(reason);
37
+ this.#isRejected = true;
38
+ this.#reject?.(reason);
40
39
  };
41
40
  const onCancel = (cancelHandler) => {
42
- if (this._isResolved || this._isRejected || this._isCancelled) {
41
+ if (this.#isResolved || this.#isRejected || this.#isCancelled) {
43
42
  return;
44
43
  }
45
- this._cancelHandlers.push(cancelHandler);
44
+ this.#cancelHandlers.push(cancelHandler);
46
45
  };
47
46
  Object.defineProperty(onCancel, "isResolved", {
48
- get: () => this._isResolved
47
+ get: () => this.#isResolved
49
48
  });
50
49
  Object.defineProperty(onCancel, "isRejected", {
51
- get: () => this._isRejected
50
+ get: () => this.#isRejected
52
51
  });
53
52
  Object.defineProperty(onCancel, "isCancelled", {
54
- get: () => this._isCancelled
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._promise.then(onFulfilled, onRejected);
62
+ return this.#promise.then(onFulfilled, onRejected);
61
63
  }
62
64
  catch(onRejected) {
63
- return this._promise.catch(onRejected);
65
+ return this.#promise.catch(onRejected);
64
66
  }
65
67
  finally(onFinally) {
66
- return this._promise.finally(onFinally);
68
+ return this.#promise.finally(onFinally);
67
69
  }
68
70
  cancel() {
69
- if (this._isResolved || this._isRejected || this._isCancelled) {
71
+ if (this.#isResolved || this.#isRejected || this.#isCancelled) {
70
72
  return;
71
73
  }
72
- this._isCancelled = true;
73
- if (this._cancelHandlers.length) {
74
+ this.#isCancelled = true;
75
+ if (this.#cancelHandlers.length) {
74
76
  try {
75
- for (const cancelHandler of this._cancelHandlers) {
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._cancelHandlers.length = 0;
84
- this._reject?.(new CancelError("Request aborted"));
85
+ this.#cancelHandlers.length = 0;
86
+ this.#reject?.(new CancelError("Request aborted"));
85
87
  }
86
88
  get isCancelled() {
87
- return this._isCancelled;
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 isJSON = contentType.toLowerCase().startsWith("application/json");
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
- address: string;
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 };
@@ -0,0 +1,8 @@
1
+ type AddressesChangeRequest = {
2
+ /**
3
+ * Ethereum address(es) for the address_activity event type
4
+ */
5
+ addresses: Array<any[]>;
6
+ };
7
+
8
+ export { AddressesChangeRequest };
@@ -0,0 +1,6 @@
1
+ type BlsCredentials = {
2
+ publicKey: string;
3
+ proofOfPossession: string;
4
+ };
5
+
6
+ export { BlsCredentials };
@@ -20,7 +20,7 @@ type ChainInfo = {
20
20
  networkToken: NetworkToken;
21
21
  chainLogoUri?: string;
22
22
  private?: boolean;
23
- enabledFeatures?: Array<'nftIndexing'>;
23
+ enabledFeatures?: Array<'nftIndexing' | 'webhooks'>;
24
24
  };
25
25
 
26
26
  export { ChainInfo };
@@ -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;
@@ -8,6 +8,8 @@ type DeliveredTeleporterMessage = {
8
8
  teleporterContractAddress: string;
9
9
  sourceBlockchainId: string;
10
10
  destinationBlockchainId: string;
11
+ sourceEvmChainId: string;
12
+ destinationEvmChainId: string;
11
13
  messageNonce: string;
12
14
  from: string;
13
15
  to: string;
@@ -20,7 +20,7 @@ type GetChainResponse = {
20
20
  networkToken: NetworkToken;
21
21
  chainLogoUri?: string;
22
22
  private?: boolean;
23
- enabledFeatures?: Array<'nftIndexing'>;
23
+ enabledFeatures?: Array<'nftIndexing' | 'webhooks'>;
24
24
  };
25
25
 
26
26
  export { GetChainResponse };
@@ -1,5 +1,6 @@
1
1
  declare enum GlacierApiFeature {
2
- NFT_INDEXING = "nftIndexing"
2
+ NFT_INDEXING = "nftIndexing",
3
+ WEBHOOKS = "webhooks"
3
4
  }
4
5
 
5
6
  export { GlacierApiFeature };
@@ -1,5 +1,6 @@
1
1
  var GlacierApiFeature = /* @__PURE__ */ ((GlacierApiFeature2) => {
2
2
  GlacierApiFeature2["NFT_INDEXING"] = "nftIndexing";
3
+ GlacierApiFeature2["WEBHOOKS"] = "webhooks";
3
4
  return GlacierApiFeature2;
4
5
  })(GlacierApiFeature || {});
5
6
 
@@ -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 };
@@ -7,6 +7,8 @@ type PendingTeleporterMessage = {
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;
@@ -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: Array<string>;
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,7 @@
1
+ type RpcErrorDto = {
2
+ code: number;
3
+ message: string;
4
+ data?: Record<string, any>;
5
+ };
6
+
7
+ export { RpcErrorDto };
@@ -0,0 +1,9 @@
1
+ import { RpcErrorDto } from './RpcErrorDto.js';
2
+
3
+ type RpcErrorResponseDto = {
4
+ jsonrpc: string;
5
+ id?: (string | number);
6
+ error: RpcErrorDto;
7
+ };
8
+
9
+ export { RpcErrorResponseDto };
@@ -0,0 +1,8 @@
1
+ type RpcRequestBodyDto = {
2
+ method: string;
3
+ params?: Record<string, any>;
4
+ id?: (string | number);
5
+ jsonrpc?: string;
6
+ };
7
+
8
+ export { RpcRequestBodyDto };
@@ -0,0 +1,7 @@
1
+ type RpcSuccessResponseDto = {
2
+ jsonrpc: string;
3
+ id?: (string | number);
4
+ result: Record<string, any>;
5
+ };
6
+
7
+ export { RpcSuccessResponseDto };
@@ -0,0 +1,9 @@
1
+ declare enum SortByOption {
2
+ BLOCK_INDEX = "blockIndex",
3
+ DELEGATION_CAPACITY = "delegationCapacity",
4
+ TIME_REMAINING = "timeRemaining",
5
+ DELEGATION_FEE = "delegationFee",
6
+ UPTIME_PERFORMANCE = "uptimePerformance"
7
+ }
8
+
9
+ export { SortByOption };
@@ -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 };
@@ -5,7 +5,7 @@ type UpdateWebhookRequest = {
5
5
  description?: string;
6
6
  url?: string;
7
7
  status?: WebhookStatusType;
8
- includeTraces?: boolean;
8
+ includeInternalTxs?: boolean;
9
9
  includeLogs?: boolean;
10
10
  };
11
11
 
@@ -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
  */