@avalabs/glacier-sdk 2.8.0-alpha.173 → 2.8.0-alpha.175

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 CHANGED
@@ -60,74 +60,6 @@ declare abstract class BaseHttpRequest {
60
60
  abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
61
61
  }
62
62
 
63
- type AddressActivityMetadata = {
64
- /**
65
- * Ethereum address for the address_activity event type
66
- */
67
- address: string;
68
- /**
69
- * Array of hexadecimal strings of the event signatures.
70
- */
71
- eventSignatures?: Array<string>;
72
- /**
73
- * Whether to include traces in the webhook payload.
74
- */
75
- includeTraces?: boolean;
76
- };
77
-
78
- declare enum EventType {
79
- ADDRESS_ACTIVITY = "address_activity"
80
- }
81
-
82
- declare enum WebhookStatusType {
83
- ACTIVE = "active",
84
- INACTIVE = "inactive"
85
- }
86
-
87
- type WebhookResponse = {
88
- id: string;
89
- eventType: EventType;
90
- metadata: AddressActivityMetadata;
91
- url: string;
92
- chainId: string;
93
- status: WebhookStatusType;
94
- createdAt: number;
95
- name: string;
96
- description: string;
97
- };
98
-
99
- type ListWebhooksResponse = {
100
- /**
101
- * 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.
102
- */
103
- nextPageToken?: string;
104
- webhooks: Array<WebhookResponse>;
105
- };
106
-
107
- type RegisterWebhookRequest = {
108
- url: string;
109
- chainId: string;
110
- eventType: EventType;
111
- metadata: AddressActivityMetadata;
112
- };
113
-
114
- type SharedSecretsResponse = {
115
- secret: string;
116
- };
117
-
118
- type UpdateWebhookRequest = {
119
- name?: string;
120
- description?: string;
121
- url?: string;
122
- status?: WebhookStatusType;
123
- includeTraces?: boolean;
124
- };
125
-
126
- declare enum WebhookStatus {
127
- ACTIVE = "active",
128
- INACTIVE = "inactive"
129
- }
130
-
131
63
  declare class DefaultService {
132
64
  readonly httpRequest: BaseHttpRequest;
133
65
  constructor(httpRequest: BaseHttpRequest);
@@ -136,86 +68,6 @@ declare class DefaultService {
136
68
  * @throws ApiError
137
69
  */
138
70
  mediaControllerUploadImage(): CancelablePromise<any>;
139
- /**
140
- * Register a webhook
141
- * Registers a new webhook.
142
- * @returns WebhookResponse
143
- * @throws ApiError
144
- */
145
- registerWebhook({ requestBody, }: {
146
- requestBody: RegisterWebhookRequest;
147
- }): CancelablePromise<WebhookResponse>;
148
- /**
149
- * List webhooks
150
- * Lists webhooks for the user.
151
- * @returns ListWebhooksResponse
152
- * @throws ApiError
153
- */
154
- listWebhooks({ pageToken, pageSize, status, }: {
155
- /**
156
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
157
- */
158
- pageToken?: string;
159
- /**
160
- * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
161
- */
162
- pageSize?: number;
163
- /**
164
- * 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.
165
- */
166
- status?: WebhookStatus;
167
- }): CancelablePromise<ListWebhooksResponse>;
168
- /**
169
- * Get a webhook by ID
170
- * Retrieves a webhook by ID.
171
- * @returns WebhookResponse
172
- * @throws ApiError
173
- */
174
- getWebhook({ id, }: {
175
- /**
176
- * The webhook identifier.
177
- */
178
- id: string;
179
- }): CancelablePromise<WebhookResponse>;
180
- /**
181
- * Deactivate a webhook
182
- * Deactivates a webhook by ID.
183
- * @returns WebhookResponse
184
- * @throws ApiError
185
- */
186
- deactivateWebhook({ id, }: {
187
- /**
188
- * The webhook identifier.
189
- */
190
- id: string;
191
- }): CancelablePromise<WebhookResponse>;
192
- /**
193
- * Update a webhook
194
- * Updates an existing webhook.
195
- * @returns WebhookResponse
196
- * @throws ApiError
197
- */
198
- updateWebhook({ id, requestBody, }: {
199
- /**
200
- * The webhook identifier.
201
- */
202
- id: string;
203
- requestBody: UpdateWebhookRequest;
204
- }): CancelablePromise<WebhookResponse>;
205
- /**
206
- * Generate a shared secret
207
- * Generates a new shared secret.
208
- * @returns SharedSecretsResponse
209
- * @throws ApiError
210
- */
211
- generateSharedSecret(): CancelablePromise<SharedSecretsResponse>;
212
- /**
213
- * Get a shared secret
214
- * Get a previously generated shared secret.
215
- * @returns SharedSecretsResponse
216
- * @throws ApiError
217
- */
218
- getSharedSecret(): CancelablePromise<SharedSecretsResponse>;
219
71
  }
220
72
 
221
73
  /**
@@ -836,8 +688,13 @@ type GetChainResponse = {
836
688
  networkToken: NetworkToken;
837
689
  chainLogoUri?: string;
838
690
  private?: boolean;
691
+ enabledFeatures?: Array<'nftIndexing'>;
839
692
  };
840
693
 
694
+ declare enum GlacierApiFeature {
695
+ NFT_INDEXING = "nftIndexing"
696
+ }
697
+
841
698
  type ChainInfo = {
842
699
  chainId: string;
843
700
  status: ChainStatus;
@@ -855,6 +712,7 @@ type ChainInfo = {
855
712
  networkToken: NetworkToken;
856
713
  chainLogoUri?: string;
857
714
  private?: boolean;
715
+ enabledFeatures?: Array<'nftIndexing'>;
858
716
  };
859
717
 
860
718
  type ListChainsResponse = {
@@ -875,11 +733,15 @@ declare class EvmChainsService {
875
733
  * @returns ListChainsResponse
876
734
  * @throws ApiError
877
735
  */
878
- supportedChains({ network, }: {
736
+ supportedChains({ network, feature, }: {
879
737
  /**
880
738
  * mainnet or testnet.
881
739
  */
882
740
  network?: NetworkType;
741
+ /**
742
+ * Filter by feature.
743
+ */
744
+ feature?: GlacierApiFeature;
883
745
  }): CancelablePromise<ListChainsResponse>;
884
746
  /**
885
747
  * Get chain information
@@ -2178,7 +2040,7 @@ declare enum PrimaryNetworkOperationType {
2178
2040
  }
2179
2041
 
2180
2042
  type PrimaryNetworkOptions = {
2181
- addresses: Array<string>;
2043
+ addresses?: Array<string>;
2182
2044
  cChainEvmAddresses?: Array<string>;
2183
2045
  includeChains: Array<'11111111111111111111111111111111LpoYY' | '2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM' | '2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm' | '2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5' | 'yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp' | 'p-chain' | 'x-chain' | 'c-chain'>;
2184
2046
  };
@@ -2779,7 +2641,7 @@ declare class PrimaryNetworkService {
2779
2641
  /**
2780
2642
  * The subnet ID to filter by. If not provided, then all subnets will be returned.
2781
2643
  */
2782
- subnetId?: string;
2644
+ subnetId?: any;
2783
2645
  }): CancelablePromise<ListValidatorDetailsResponse>;
2784
2646
  /**
2785
2647
  * Get single validator details
@@ -4422,6 +4284,172 @@ declare class TeleporterService {
4422
4284
  }): CancelablePromise<NextPageToken>;
4423
4285
  }
4424
4286
 
4287
+ type AddressActivityMetadata = {
4288
+ /**
4289
+ * Ethereum address for the address_activity event type
4290
+ */
4291
+ address: string;
4292
+ /**
4293
+ * Array of hexadecimal strings of the event signatures.
4294
+ */
4295
+ eventSignatures?: Array<string>;
4296
+ };
4297
+
4298
+ declare enum EventType {
4299
+ ADDRESS_ACTIVITY = "address_activity"
4300
+ }
4301
+
4302
+ declare enum WebhookStatusType {
4303
+ ACTIVE = "active",
4304
+ INACTIVE = "inactive"
4305
+ }
4306
+
4307
+ type WebhookResponse = {
4308
+ id: string;
4309
+ eventType: EventType;
4310
+ metadata: AddressActivityMetadata;
4311
+ /**
4312
+ * Whether to include traces in the webhook payload.
4313
+ */
4314
+ includeTraces?: boolean;
4315
+ /**
4316
+ * Whether to include logs in the webhook payload.
4317
+ */
4318
+ includeLogs?: boolean;
4319
+ url: string;
4320
+ chainId: string;
4321
+ status: WebhookStatusType;
4322
+ createdAt: number;
4323
+ name: string;
4324
+ description: string;
4325
+ };
4326
+
4327
+ type ListWebhooksResponse = {
4328
+ /**
4329
+ * 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.
4330
+ */
4331
+ nextPageToken?: string;
4332
+ webhooks: Array<WebhookResponse>;
4333
+ };
4334
+
4335
+ type RegisterWebhookRequest = {
4336
+ url: string;
4337
+ chainId: string;
4338
+ eventType: EventType;
4339
+ metadata: AddressActivityMetadata;
4340
+ /**
4341
+ * Whether to include traces in the webhook payload.
4342
+ */
4343
+ includeTraces?: boolean;
4344
+ /**
4345
+ * Whether to include logs in the webhook payload.
4346
+ */
4347
+ includeLogs?: boolean;
4348
+ };
4349
+
4350
+ type SharedSecretsResponse = {
4351
+ secret: string;
4352
+ };
4353
+
4354
+ type UpdateWebhookRequest = {
4355
+ name?: string;
4356
+ description?: string;
4357
+ url?: string;
4358
+ status?: WebhookStatusType;
4359
+ includeTraces?: boolean;
4360
+ includeLogs?: boolean;
4361
+ };
4362
+
4363
+ declare enum WebhookStatus {
4364
+ ACTIVE = "active",
4365
+ INACTIVE = "inactive"
4366
+ }
4367
+
4368
+ declare class WebhooksService {
4369
+ readonly httpRequest: BaseHttpRequest;
4370
+ constructor(httpRequest: BaseHttpRequest);
4371
+ /**
4372
+ * Register a webhook
4373
+ * Registers a new webhook.
4374
+ * @returns WebhookResponse
4375
+ * @throws ApiError
4376
+ */
4377
+ registerWebhook({ requestBody, }: {
4378
+ requestBody: RegisterWebhookRequest;
4379
+ }): CancelablePromise<WebhookResponse>;
4380
+ /**
4381
+ * List webhooks
4382
+ * Lists webhooks for the user.
4383
+ * @returns ListWebhooksResponse
4384
+ * @throws ApiError
4385
+ */
4386
+ listWebhooks({ pageToken, pageSize, status, }: {
4387
+ /**
4388
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
4389
+ */
4390
+ pageToken?: string;
4391
+ /**
4392
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
4393
+ */
4394
+ pageSize?: number;
4395
+ /**
4396
+ * 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.
4397
+ */
4398
+ status?: WebhookStatus;
4399
+ }): CancelablePromise<ListWebhooksResponse>;
4400
+ /**
4401
+ * Get a webhook by ID
4402
+ * Retrieves a webhook by ID.
4403
+ * @returns WebhookResponse
4404
+ * @throws ApiError
4405
+ */
4406
+ getWebhook({ id, }: {
4407
+ /**
4408
+ * The webhook identifier.
4409
+ */
4410
+ id: string;
4411
+ }): CancelablePromise<WebhookResponse>;
4412
+ /**
4413
+ * Deactivate a webhook
4414
+ * Deactivates a webhook by ID.
4415
+ * @returns WebhookResponse
4416
+ * @throws ApiError
4417
+ */
4418
+ deactivateWebhook({ id, }: {
4419
+ /**
4420
+ * The webhook identifier.
4421
+ */
4422
+ id: string;
4423
+ }): CancelablePromise<WebhookResponse>;
4424
+ /**
4425
+ * Update a webhook
4426
+ * Updates an existing webhook.
4427
+ * @returns WebhookResponse
4428
+ * @throws ApiError
4429
+ */
4430
+ updateWebhook({ id, requestBody, }: {
4431
+ /**
4432
+ * The webhook identifier.
4433
+ */
4434
+ id: string;
4435
+ requestBody: UpdateWebhookRequest;
4436
+ }): CancelablePromise<WebhookResponse>;
4437
+ /**
4438
+ * Generate a shared secret
4439
+ * Generates a new shared secret.
4440
+ * @returns SharedSecretsResponse
4441
+ * @throws ApiError
4442
+ */
4443
+ generateSharedSecret(): CancelablePromise<SharedSecretsResponse>;
4444
+ /**
4445
+ * Get a shared secret
4446
+ * Get a previously generated shared secret.
4447
+ * @returns SharedSecretsResponse
4448
+ * @throws ApiError
4449
+ */
4450
+ getSharedSecret(): CancelablePromise<SharedSecretsResponse>;
4451
+ }
4452
+
4425
4453
  type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
4426
4454
  declare class Glacier {
4427
4455
  readonly default: DefaultService;
@@ -4441,6 +4469,7 @@ declare class Glacier {
4441
4469
  readonly primaryNetworkUtxOs: PrimaryNetworkUtxOsService;
4442
4470
  readonly primaryNetworkVertices: PrimaryNetworkVerticesService;
4443
4471
  readonly teleporter: TeleporterService;
4472
+ readonly webhooks: WebhooksService;
4444
4473
  readonly request: BaseHttpRequest;
4445
4474
  constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
4446
4475
  }
@@ -4462,4 +4491,4 @@ declare class ApiError extends Error {
4462
4491
  constructor(request: ApiRequestOptions, response: ApiResult, message: string);
4463
4492
  }
4464
4493
 
4465
- export { ActiveDelegatorDetails, ActiveValidatorDetails, AddressActivityMetadata, AggregatedAssetAmount, ApiError, AssetAmount, AssetWithPriceInfo, BaseHttpRequest, Blockchain, BlockchainId, BlockchainIds, BlockchainInfo, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CompletedDelegatorDetails, CompletedValidatorDetails, ContractDeploymentDetails, ContractSubmissionBody, ContractSubmissionErc1155, ContractSubmissionErc20, ContractSubmissionErc721, ContractSubmissionUnknown, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CurrencyCode, DefaultService, DelegationStatusType, DelegatorsDetails, DeliveredSourceNotIndexedTeleporterMessage, DeliveredTeleporterMessage, EVMInput, EVMOperationType, EVMOutput, Erc1155Contract, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Contract, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Contract, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, EventType, EvmBalancesService, EvmBlock, EvmBlocksService, EvmChainsService, EvmContractsService, EvmNetworkOptions, EvmTransactionsService, FullNativeTransactionDetails, GetChainResponse, GetEvmBlockResponse, GetNativeBalanceResponse, GetNetworkDetailsResponse, GetPrimaryNetworkBlockResponse, GetTransactionResponse, Glacier, HealthCheckService, HistoricalReward, ImageAsset, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlockchainsResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListContractsResponse, ListDelegatorDetailsResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListEvmBlocksResponse, ListHistoricalRewardsResponse, ListInternalTransactionsResponse, ListNativeTransactionsResponse, ListNftTokens, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListPendingRewardsResponse, ListPrimaryNetworkBlocksResponse, ListSubnetsResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListValidatorDetailsResponse, ListWebhooksResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NetworkType, NextPageToken, NfTsService, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainBalance, PChainId, PChainSharedAsset, PChainTransaction, PChainTransactionType, PChainUtxo, PendingDelegatorDetails, PendingReward, PendingTeleporterMessage, PendingValidatorDetails, PricingProviders, PrimaryNetwork, PrimaryNetworkAssetCap, PrimaryNetworkAssetType, PrimaryNetworkBalancesService, PrimaryNetworkBlock, PrimaryNetworkBlocksService, PrimaryNetworkChainInfo, PrimaryNetworkChainName, PrimaryNetworkOperationType, PrimaryNetworkOptions, PrimaryNetworkRewardsService, PrimaryNetworkService, PrimaryNetworkTransactionsService, PrimaryNetworkTxType, PrimaryNetworkUtxOsService, PrimaryNetworkVerticesService, ProposerDetails, RegisterWebhookRequest, RemovedValidatorDetails, ResourceLink, ResourceLinkType, RewardType, Rewards, RichAddress, SharedSecretsResponse, SortOrder, StakingDistribution, Subnet, SubnetOwnershipInfo, TeleporterDestinationTransaction, TeleporterReceipt, TeleporterRewardDetails, TeleporterService, TeleporterSourceTransaction, TransactionDetails, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, UnknownContract, UpdateContractResponse, UpdateWebhookRequest, UtilityAddresses, Utxo, UtxoCredential, UtxoType, ValidationStatusType, ValidatorHealthDetails, ValidatorsDetails, VmName, WebhookResponse, WebhookStatus, WebhookStatusType, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainTransactionType, XChainVertex };
4494
+ export { ActiveDelegatorDetails, ActiveValidatorDetails, AddressActivityMetadata, AggregatedAssetAmount, ApiError, AssetAmount, AssetWithPriceInfo, BaseHttpRequest, Blockchain, BlockchainId, BlockchainIds, BlockchainInfo, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CompletedDelegatorDetails, CompletedValidatorDetails, ContractDeploymentDetails, ContractSubmissionBody, ContractSubmissionErc1155, ContractSubmissionErc20, ContractSubmissionErc721, ContractSubmissionUnknown, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CurrencyCode, DefaultService, DelegationStatusType, DelegatorsDetails, DeliveredSourceNotIndexedTeleporterMessage, DeliveredTeleporterMessage, EVMInput, EVMOperationType, EVMOutput, Erc1155Contract, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Contract, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Contract, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, EventType, EvmBalancesService, EvmBlock, EvmBlocksService, EvmChainsService, EvmContractsService, EvmNetworkOptions, EvmTransactionsService, FullNativeTransactionDetails, GetChainResponse, GetEvmBlockResponse, GetNativeBalanceResponse, GetNetworkDetailsResponse, GetPrimaryNetworkBlockResponse, GetTransactionResponse, Glacier, GlacierApiFeature, HealthCheckService, HistoricalReward, ImageAsset, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlockchainsResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListContractsResponse, ListDelegatorDetailsResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListEvmBlocksResponse, ListHistoricalRewardsResponse, ListInternalTransactionsResponse, ListNativeTransactionsResponse, ListNftTokens, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListPendingRewardsResponse, ListPrimaryNetworkBlocksResponse, ListSubnetsResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListValidatorDetailsResponse, ListWebhooksResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NetworkType, NextPageToken, NfTsService, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainBalance, PChainId, PChainSharedAsset, PChainTransaction, PChainTransactionType, PChainUtxo, PendingDelegatorDetails, PendingReward, PendingTeleporterMessage, PendingValidatorDetails, PricingProviders, PrimaryNetwork, PrimaryNetworkAssetCap, PrimaryNetworkAssetType, PrimaryNetworkBalancesService, PrimaryNetworkBlock, PrimaryNetworkBlocksService, PrimaryNetworkChainInfo, PrimaryNetworkChainName, PrimaryNetworkOperationType, PrimaryNetworkOptions, PrimaryNetworkRewardsService, PrimaryNetworkService, PrimaryNetworkTransactionsService, PrimaryNetworkTxType, PrimaryNetworkUtxOsService, PrimaryNetworkVerticesService, ProposerDetails, RegisterWebhookRequest, RemovedValidatorDetails, ResourceLink, ResourceLinkType, RewardType, Rewards, RichAddress, SharedSecretsResponse, SortOrder, StakingDistribution, Subnet, SubnetOwnershipInfo, TeleporterDestinationTransaction, TeleporterReceipt, TeleporterRewardDetails, TeleporterService, TeleporterSourceTransaction, TransactionDetails, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, UnknownContract, UpdateContractResponse, UpdateWebhookRequest, UtilityAddresses, Utxo, UtxoCredential, UtxoType, ValidationStatusType, ValidatorHealthDetails, ValidatorsDetails, VmName, WebhookResponse, WebhookStatus, WebhookStatusType, WebhooksService, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainTransactionType, XChainVertex };
package/dist/index.js CHANGED
@@ -355,79 +355,6 @@ class DefaultService {
355
355
  url: "/v1/media/uploadImage"
356
356
  });
357
357
  }
358
- registerWebhook({
359
- requestBody
360
- }) {
361
- return this.httpRequest.request({
362
- method: "POST",
363
- url: "/v1/webhooks",
364
- body: requestBody,
365
- mediaType: "application/json"
366
- });
367
- }
368
- listWebhooks({
369
- pageToken,
370
- pageSize = 10,
371
- status
372
- }) {
373
- return this.httpRequest.request({
374
- method: "GET",
375
- url: "/v1/webhooks",
376
- query: {
377
- "pageToken": pageToken,
378
- "pageSize": pageSize,
379
- "status": status
380
- }
381
- });
382
- }
383
- getWebhook({
384
- id
385
- }) {
386
- return this.httpRequest.request({
387
- method: "GET",
388
- url: "/v1/webhooks/{id}",
389
- path: {
390
- "id": id
391
- }
392
- });
393
- }
394
- deactivateWebhook({
395
- id
396
- }) {
397
- return this.httpRequest.request({
398
- method: "DELETE",
399
- url: "/v1/webhooks/{id}",
400
- path: {
401
- "id": id
402
- }
403
- });
404
- }
405
- updateWebhook({
406
- id,
407
- requestBody
408
- }) {
409
- return this.httpRequest.request({
410
- method: "PATCH",
411
- url: "/v1/webhooks/{id}",
412
- path: {
413
- "id": id
414
- },
415
- body: requestBody,
416
- mediaType: "application/json"
417
- });
418
- }
419
- generateSharedSecret() {
420
- return this.httpRequest.request({
421
- method: "POST",
422
- url: "/v1/webhooks:generateOrRotateSharedSecret"
423
- });
424
- }
425
- getSharedSecret() {
426
- return this.httpRequest.request({
427
- method: "GET",
428
- url: "/v1/webhooks:getSharedSecret"
429
- });
430
- }
431
358
  }
432
359
 
433
360
  class EvmBalancesService {
@@ -586,13 +513,15 @@ class EvmChainsService {
586
513
  this.httpRequest = httpRequest;
587
514
  }
588
515
  supportedChains({
589
- network
516
+ network,
517
+ feature
590
518
  }) {
591
519
  return this.httpRequest.request({
592
520
  method: "GET",
593
521
  url: "/v1/chains",
594
522
  query: {
595
- "network": network
523
+ "network": network,
524
+ "feature": feature
596
525
  }
597
526
  });
598
527
  }
@@ -1084,7 +1013,7 @@ class PrimaryNetworkService {
1084
1013
  minDelegationCapacity,
1085
1014
  maxDelegationCapacity,
1086
1015
  minTimeRemaining,
1087
- maxTimeRemaining = 2147483647,
1016
+ maxTimeRemaining,
1088
1017
  minFeePercentage,
1089
1018
  maxFeePercentage,
1090
1019
  subnetId
@@ -1541,6 +1470,85 @@ class TeleporterService {
1541
1470
  }
1542
1471
  }
1543
1472
 
1473
+ class WebhooksService {
1474
+ constructor(httpRequest) {
1475
+ this.httpRequest = httpRequest;
1476
+ }
1477
+ registerWebhook({
1478
+ requestBody
1479
+ }) {
1480
+ return this.httpRequest.request({
1481
+ method: "POST",
1482
+ url: "/v1/webhooks",
1483
+ body: requestBody,
1484
+ mediaType: "application/json"
1485
+ });
1486
+ }
1487
+ listWebhooks({
1488
+ pageToken,
1489
+ pageSize = 10,
1490
+ status
1491
+ }) {
1492
+ return this.httpRequest.request({
1493
+ method: "GET",
1494
+ url: "/v1/webhooks",
1495
+ query: {
1496
+ "pageToken": pageToken,
1497
+ "pageSize": pageSize,
1498
+ "status": status
1499
+ }
1500
+ });
1501
+ }
1502
+ getWebhook({
1503
+ id
1504
+ }) {
1505
+ return this.httpRequest.request({
1506
+ method: "GET",
1507
+ url: "/v1/webhooks/{id}",
1508
+ path: {
1509
+ "id": id
1510
+ }
1511
+ });
1512
+ }
1513
+ deactivateWebhook({
1514
+ id
1515
+ }) {
1516
+ return this.httpRequest.request({
1517
+ method: "DELETE",
1518
+ url: "/v1/webhooks/{id}",
1519
+ path: {
1520
+ "id": id
1521
+ }
1522
+ });
1523
+ }
1524
+ updateWebhook({
1525
+ id,
1526
+ requestBody
1527
+ }) {
1528
+ return this.httpRequest.request({
1529
+ method: "PATCH",
1530
+ url: "/v1/webhooks/{id}",
1531
+ path: {
1532
+ "id": id
1533
+ },
1534
+ body: requestBody,
1535
+ mediaType: "application/json"
1536
+ });
1537
+ }
1538
+ generateSharedSecret() {
1539
+ return this.httpRequest.request({
1540
+ method: "POST",
1541
+ url: "/v1/webhooks:generateOrRotateSharedSecret"
1542
+ });
1543
+ }
1544
+ getSharedSecret() {
1545
+ return this.httpRequest.request({
1546
+ method: "GET",
1547
+ url: "/v1/webhooks:getSharedSecret"
1548
+ });
1549
+ }
1550
+ }
1551
+
1544
1552
  class Glacier {
1545
1553
  default;
1546
1554
  evmBalances;
@@ -1559,6 +1567,7 @@ class Glacier {
1559
1567
  primaryNetworkUtxOs;
1560
1568
  primaryNetworkVertices;
1561
1569
  teleporter;
1570
+ webhooks;
1562
1571
  request;
1563
1572
  constructor(config, HttpRequest = FetchHttpRequest) {
1564
1573
  this.request = new HttpRequest({
@@ -1589,6 +1598,7 @@ class Glacier {
1589
1598
  this.primaryNetworkUtxOs = new PrimaryNetworkUtxOsService(this.request);
1590
1599
  this.primaryNetworkVertices = new PrimaryNetworkVerticesService(this.request);
1591
1600
  this.teleporter = new TeleporterService(this.request);
1601
+ this.webhooks = new WebhooksService(this.request);
1592
1602
  }
1593
1603
  }
1594
1604
 
@@ -1813,6 +1823,11 @@ var EVMOperationType = /* @__PURE__ */ ((EVMOperationType2) => {
1813
1823
  return EVMOperationType2;
1814
1824
  })(EVMOperationType || {});
1815
1825
 
1826
+ var GlacierApiFeature = /* @__PURE__ */ ((GlacierApiFeature2) => {
1827
+ GlacierApiFeature2["NFT_INDEXING"] = "nftIndexing";
1828
+ return GlacierApiFeature2;
1829
+ })(GlacierApiFeature || {});
1830
+
1816
1831
  var InternalTransactionOpCall = /* @__PURE__ */ ((InternalTransactionOpCall2) => {
1817
1832
  InternalTransactionOpCall2["UNKNOWN"] = "UNKNOWN";
1818
1833
  InternalTransactionOpCall2["CALL"] = "CALL";
@@ -2128,6 +2143,7 @@ exports.EvmChainsService = EvmChainsService;
2128
2143
  exports.EvmContractsService = EvmContractsService;
2129
2144
  exports.EvmTransactionsService = EvmTransactionsService;
2130
2145
  exports.Glacier = Glacier;
2146
+ exports.GlacierApiFeature = GlacierApiFeature;
2131
2147
  exports.HealthCheckService = HealthCheckService;
2132
2148
  exports.InternalTransactionOpCall = InternalTransactionOpCall;
2133
2149
  exports.Network = Network;
@@ -2165,5 +2181,6 @@ exports.ValidationStatusType = ValidationStatusType;
2165
2181
  exports.VmName = VmName;
2166
2182
  exports.WebhookStatus = WebhookStatus;
2167
2183
  exports.WebhookStatusType = WebhookStatusType;
2184
+ exports.WebhooksService = WebhooksService;
2168
2185
  exports.XChainId = XChainId;
2169
2186
  exports.XChainTransactionType = XChainTransactionType;
@@ -17,6 +17,7 @@ import { PrimaryNetworkTransactionsService } from './services/PrimaryNetworkTran
17
17
  import { PrimaryNetworkUtxOsService } from './services/PrimaryNetworkUtxOsService.js';
18
18
  import { PrimaryNetworkVerticesService } from './services/PrimaryNetworkVerticesService.js';
19
19
  import { TeleporterService } from './services/TeleporterService.js';
20
+ import { WebhooksService } from './services/WebhooksService.js';
20
21
 
21
22
  type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
22
23
  declare class Glacier {
@@ -37,6 +38,7 @@ declare class Glacier {
37
38
  readonly primaryNetworkUtxOs: PrimaryNetworkUtxOsService;
38
39
  readonly primaryNetworkVertices: PrimaryNetworkVerticesService;
39
40
  readonly teleporter: TeleporterService;
41
+ readonly webhooks: WebhooksService;
40
42
  readonly request: BaseHttpRequest;
41
43
  constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
42
44
  }
@@ -16,6 +16,7 @@ import { PrimaryNetworkTransactionsService } from './services/PrimaryNetworkTran
16
16
  import { PrimaryNetworkUtxOsService } from './services/PrimaryNetworkUtxOsService.js';
17
17
  import { PrimaryNetworkVerticesService } from './services/PrimaryNetworkVerticesService.js';
18
18
  import { TeleporterService } from './services/TeleporterService.js';
19
+ import { WebhooksService } from './services/WebhooksService.js';
19
20
 
20
21
  class Glacier {
21
22
  default;
@@ -35,6 +36,7 @@ class Glacier {
35
36
  primaryNetworkUtxOs;
36
37
  primaryNetworkVertices;
37
38
  teleporter;
39
+ webhooks;
38
40
  request;
39
41
  constructor(config, HttpRequest = FetchHttpRequest) {
40
42
  this.request = new HttpRequest({
@@ -65,6 +67,7 @@ class Glacier {
65
67
  this.primaryNetworkUtxOs = new PrimaryNetworkUtxOsService(this.request);
66
68
  this.primaryNetworkVertices = new PrimaryNetworkVerticesService(this.request);
67
69
  this.teleporter = new TeleporterService(this.request);
70
+ this.webhooks = new WebhooksService(this.request);
68
71
  }
69
72
  }
70
73
 
@@ -7,10 +7,6 @@ type AddressActivityMetadata = {
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
10
  };
15
11
 
16
12
  export { AddressActivityMetadata };
@@ -20,6 +20,7 @@ type ChainInfo = {
20
20
  networkToken: NetworkToken;
21
21
  chainLogoUri?: string;
22
22
  private?: boolean;
23
+ enabledFeatures?: Array<'nftIndexing'>;
23
24
  };
24
25
 
25
26
  export { ChainInfo };
@@ -20,6 +20,7 @@ type GetChainResponse = {
20
20
  networkToken: NetworkToken;
21
21
  chainLogoUri?: string;
22
22
  private?: boolean;
23
+ enabledFeatures?: Array<'nftIndexing'>;
23
24
  };
24
25
 
25
26
  export { GetChainResponse };
@@ -0,0 +1,5 @@
1
+ declare enum GlacierApiFeature {
2
+ NFT_INDEXING = "nftIndexing"
3
+ }
4
+
5
+ export { GlacierApiFeature };
@@ -0,0 +1,6 @@
1
+ var GlacierApiFeature = /* @__PURE__ */ ((GlacierApiFeature2) => {
2
+ GlacierApiFeature2["NFT_INDEXING"] = "nftIndexing";
3
+ return GlacierApiFeature2;
4
+ })(GlacierApiFeature || {});
5
+
6
+ export { GlacierApiFeature };
@@ -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
+ includeTraces?: boolean;
13
+ /**
14
+ * Whether to include logs in the webhook payload.
15
+ */
16
+ includeLogs?: boolean;
9
17
  };
10
18
 
11
19
  export { RegisterWebhookRequest };
@@ -6,6 +6,7 @@ type UpdateWebhookRequest = {
6
6
  url?: string;
7
7
  status?: WebhookStatusType;
8
8
  includeTraces?: boolean;
9
+ includeLogs?: boolean;
9
10
  };
10
11
 
11
12
  export { UpdateWebhookRequest };
@@ -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
+ includeTraces?: 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 };
@@ -1,4 +1,5 @@
1
1
  import { GetChainResponse } from '../models/GetChainResponse.js';
2
+ import { GlacierApiFeature } from '../models/GlacierApiFeature.js';
2
3
  import { ListChainsResponse } from '../models/ListChainsResponse.js';
3
4
  import { NetworkType } from '../models/NetworkType.js';
4
5
  import { CancelablePromise } from '../core/CancelablePromise.js';
@@ -13,11 +14,15 @@ declare class EvmChainsService {
13
14
  * @returns ListChainsResponse
14
15
  * @throws ApiError
15
16
  */
16
- supportedChains({ network, }: {
17
+ supportedChains({ network, feature, }: {
17
18
  /**
18
19
  * mainnet or testnet.
19
20
  */
20
21
  network?: NetworkType;
22
+ /**
23
+ * Filter by feature.
24
+ */
25
+ feature?: GlacierApiFeature;
21
26
  }): CancelablePromise<ListChainsResponse>;
22
27
  /**
23
28
  * Get chain information
@@ -3,13 +3,15 @@ class EvmChainsService {
3
3
  this.httpRequest = httpRequest;
4
4
  }
5
5
  supportedChains({
6
- network
6
+ network,
7
+ feature
7
8
  }) {
8
9
  return this.httpRequest.request({
9
10
  method: "GET",
10
11
  url: "/v1/chains",
11
12
  query: {
12
- "network": network
13
+ "network": network,
14
+ "feature": feature
13
15
  }
14
16
  });
15
17
  }
@@ -170,7 +170,7 @@ declare class PrimaryNetworkService {
170
170
  /**
171
171
  * The subnet ID to filter by. If not provided, then all subnets will be returned.
172
172
  */
173
- subnetId?: string;
173
+ subnetId?: any;
174
174
  }): CancelablePromise<ListValidatorDetailsResponse>;
175
175
  /**
176
176
  * Get single validator details
@@ -91,7 +91,7 @@ class PrimaryNetworkService {
91
91
  minDelegationCapacity,
92
92
  maxDelegationCapacity,
93
93
  minTimeRemaining,
94
- maxTimeRemaining = 2147483647,
94
+ maxTimeRemaining,
95
95
  minFeePercentage,
96
96
  maxFeePercentage,
97
97
  subnetId
@@ -0,0 +1,95 @@
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
+ import { CancelablePromise } from '../core/CancelablePromise.js';
8
+ import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
9
+
10
+ declare class WebhooksService {
11
+ readonly httpRequest: BaseHttpRequest;
12
+ constructor(httpRequest: BaseHttpRequest);
13
+ /**
14
+ * Register a webhook
15
+ * Registers a new webhook.
16
+ * @returns WebhookResponse
17
+ * @throws ApiError
18
+ */
19
+ registerWebhook({ requestBody, }: {
20
+ requestBody: RegisterWebhookRequest;
21
+ }): CancelablePromise<WebhookResponse>;
22
+ /**
23
+ * List webhooks
24
+ * Lists webhooks for the user.
25
+ * @returns ListWebhooksResponse
26
+ * @throws ApiError
27
+ */
28
+ listWebhooks({ pageToken, pageSize, status, }: {
29
+ /**
30
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
31
+ */
32
+ pageToken?: string;
33
+ /**
34
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
35
+ */
36
+ pageSize?: number;
37
+ /**
38
+ * 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.
39
+ */
40
+ status?: WebhookStatus;
41
+ }): CancelablePromise<ListWebhooksResponse>;
42
+ /**
43
+ * Get a webhook by ID
44
+ * Retrieves a webhook by ID.
45
+ * @returns WebhookResponse
46
+ * @throws ApiError
47
+ */
48
+ getWebhook({ id, }: {
49
+ /**
50
+ * The webhook identifier.
51
+ */
52
+ id: string;
53
+ }): CancelablePromise<WebhookResponse>;
54
+ /**
55
+ * Deactivate a webhook
56
+ * Deactivates a webhook by ID.
57
+ * @returns WebhookResponse
58
+ * @throws ApiError
59
+ */
60
+ deactivateWebhook({ id, }: {
61
+ /**
62
+ * The webhook identifier.
63
+ */
64
+ id: string;
65
+ }): CancelablePromise<WebhookResponse>;
66
+ /**
67
+ * Update a webhook
68
+ * Updates an existing webhook.
69
+ * @returns WebhookResponse
70
+ * @throws ApiError
71
+ */
72
+ updateWebhook({ id, requestBody, }: {
73
+ /**
74
+ * The webhook identifier.
75
+ */
76
+ id: string;
77
+ requestBody: UpdateWebhookRequest;
78
+ }): CancelablePromise<WebhookResponse>;
79
+ /**
80
+ * Generate a shared secret
81
+ * Generates a new shared secret.
82
+ * @returns SharedSecretsResponse
83
+ * @throws ApiError
84
+ */
85
+ generateSharedSecret(): CancelablePromise<SharedSecretsResponse>;
86
+ /**
87
+ * Get a shared secret
88
+ * Get a previously generated shared secret.
89
+ * @returns SharedSecretsResponse
90
+ * @throws ApiError
91
+ */
92
+ getSharedSecret(): CancelablePromise<SharedSecretsResponse>;
93
+ }
94
+
95
+ export { WebhooksService };
@@ -0,0 +1,80 @@
1
+ class WebhooksService {
2
+ constructor(httpRequest) {
3
+ this.httpRequest = httpRequest;
4
+ }
5
+ registerWebhook({
6
+ requestBody
7
+ }) {
8
+ return this.httpRequest.request({
9
+ method: "POST",
10
+ url: "/v1/webhooks",
11
+ body: requestBody,
12
+ mediaType: "application/json"
13
+ });
14
+ }
15
+ listWebhooks({
16
+ pageToken,
17
+ pageSize = 10,
18
+ status
19
+ }) {
20
+ return this.httpRequest.request({
21
+ method: "GET",
22
+ url: "/v1/webhooks",
23
+ query: {
24
+ "pageToken": pageToken,
25
+ "pageSize": pageSize,
26
+ "status": status
27
+ }
28
+ });
29
+ }
30
+ getWebhook({
31
+ id
32
+ }) {
33
+ return this.httpRequest.request({
34
+ method: "GET",
35
+ url: "/v1/webhooks/{id}",
36
+ path: {
37
+ "id": id
38
+ }
39
+ });
40
+ }
41
+ deactivateWebhook({
42
+ id
43
+ }) {
44
+ return this.httpRequest.request({
45
+ method: "DELETE",
46
+ url: "/v1/webhooks/{id}",
47
+ path: {
48
+ "id": id
49
+ }
50
+ });
51
+ }
52
+ updateWebhook({
53
+ id,
54
+ requestBody
55
+ }) {
56
+ return this.httpRequest.request({
57
+ method: "PATCH",
58
+ url: "/v1/webhooks/{id}",
59
+ path: {
60
+ "id": id
61
+ },
62
+ body: requestBody,
63
+ mediaType: "application/json"
64
+ });
65
+ }
66
+ generateSharedSecret() {
67
+ return this.httpRequest.request({
68
+ method: "POST",
69
+ url: "/v1/webhooks:generateOrRotateSharedSecret"
70
+ });
71
+ }
72
+ getSharedSecret() {
73
+ return this.httpRequest.request({
74
+ method: "GET",
75
+ url: "/v1/webhooks:getSharedSecret"
76
+ });
77
+ }
78
+ }
79
+
80
+ export { WebhooksService };
package/esm/index.d.ts CHANGED
@@ -66,6 +66,7 @@ export { GetNativeBalanceResponse } from './generated/models/GetNativeBalanceRes
66
66
  export { GetNetworkDetailsResponse } from './generated/models/GetNetworkDetailsResponse.js';
67
67
  export { GetPrimaryNetworkBlockResponse } from './generated/models/GetPrimaryNetworkBlockResponse.js';
68
68
  export { GetTransactionResponse } from './generated/models/GetTransactionResponse.js';
69
+ export { GlacierApiFeature } from './generated/models/GlacierApiFeature.js';
69
70
  export { HistoricalReward } from './generated/models/HistoricalReward.js';
70
71
  export { ImageAsset } from './generated/models/ImageAsset.js';
71
72
  export { InternalTransaction } from './generated/models/InternalTransaction.js';
@@ -198,3 +199,4 @@ export { PrimaryNetworkTransactionsService } from './generated/services/PrimaryN
198
199
  export { PrimaryNetworkUtxOsService } from './generated/services/PrimaryNetworkUtxOsService.js';
199
200
  export { PrimaryNetworkVerticesService } from './generated/services/PrimaryNetworkVerticesService.js';
200
201
  export { TeleporterService } from './generated/services/TeleporterService.js';
202
+ export { WebhooksService } from './generated/services/WebhooksService.js';
package/esm/index.js CHANGED
@@ -31,6 +31,7 @@ export { Erc721Token } from './generated/models/Erc721Token.js';
31
31
  export { Erc721TokenBalance } from './generated/models/Erc721TokenBalance.js';
32
32
  export { EventType } from './generated/models/EventType.js';
33
33
  export { EVMOperationType } from './generated/models/EVMOperationType.js';
34
+ export { GlacierApiFeature } from './generated/models/GlacierApiFeature.js';
34
35
  export { InternalTransactionOpCall } from './generated/models/InternalTransactionOpCall.js';
35
36
  export { Network } from './generated/models/Network.js';
36
37
  export { NetworkType } from './generated/models/NetworkType.js';
@@ -83,3 +84,4 @@ export { PrimaryNetworkTransactionsService } from './generated/services/PrimaryN
83
84
  export { PrimaryNetworkUtxOsService } from './generated/services/PrimaryNetworkUtxOsService.js';
84
85
  export { PrimaryNetworkVerticesService } from './generated/services/PrimaryNetworkVerticesService.js';
85
86
  export { TeleporterService } from './generated/services/TeleporterService.js';
87
+ export { WebhooksService } from './generated/services/WebhooksService.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avalabs/glacier-sdk",
3
- "version": "2.8.0-alpha.173",
3
+ "version": "2.8.0-alpha.175",
4
4
  "description": "sdk for interacting with glacier-api",
5
5
  "author": "Oliver Wang <oliver.wang@avalabs.org>",
6
6
  "homepage": "https://github.com/ava-labs/avalanche-sdks#readme",
@@ -29,5 +29,5 @@
29
29
  "bugs": {
30
30
  "url": "https://github.com/ava-labs/avalanche-sdks/issues"
31
31
  },
32
- "gitHead": "5ca16fafcf312c5072be841ae48bb2fc4d53ec97"
32
+ "gitHead": "ab21a330be8d8c32366bd1ac85a1f8401a1ec8f8"
33
33
  }