@avalabs/glacier-sdk 2.8.0-alpha.179 → 2.8.0-alpha.180
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 +40 -6
- package/dist/index.js +29 -0
- package/esm/generated/models/AddressActivityMetadata.d.ts +2 -2
- package/esm/generated/models/AddressesChangeRequest.d.ts +8 -0
- package/esm/generated/models/ChainInfo.d.ts +1 -1
- 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/services/WebhooksService.d.ts +27 -0
- package/esm/generated/services/WebhooksService.js +28 -0
- package/esm/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -682,11 +682,12 @@ type GetChainResponse = {
|
|
|
682
682
|
networkToken: NetworkToken;
|
|
683
683
|
chainLogoUri?: string;
|
|
684
684
|
private?: boolean;
|
|
685
|
-
enabledFeatures?: Array<'nftIndexing'>;
|
|
685
|
+
enabledFeatures?: Array<'nftIndexing' | 'webhooks'>;
|
|
686
686
|
};
|
|
687
687
|
|
|
688
688
|
declare enum GlacierApiFeature {
|
|
689
|
-
NFT_INDEXING = "nftIndexing"
|
|
689
|
+
NFT_INDEXING = "nftIndexing",
|
|
690
|
+
WEBHOOKS = "webhooks"
|
|
690
691
|
}
|
|
691
692
|
|
|
692
693
|
type ChainInfo = {
|
|
@@ -706,7 +707,7 @@ type ChainInfo = {
|
|
|
706
707
|
networkToken: NetworkToken;
|
|
707
708
|
chainLogoUri?: string;
|
|
708
709
|
private?: boolean;
|
|
709
|
-
enabledFeatures?: Array<'nftIndexing'>;
|
|
710
|
+
enabledFeatures?: Array<'nftIndexing' | 'webhooks'>;
|
|
710
711
|
};
|
|
711
712
|
|
|
712
713
|
type ListChainsResponse = {
|
|
@@ -4321,11 +4322,18 @@ declare class TeleporterService {
|
|
|
4321
4322
|
}): CancelablePromise<NextPageToken>;
|
|
4322
4323
|
}
|
|
4323
4324
|
|
|
4325
|
+
type AddressesChangeRequest = {
|
|
4326
|
+
/**
|
|
4327
|
+
* Ethereum address(es) for the address_activity event type
|
|
4328
|
+
*/
|
|
4329
|
+
addresses: Array<any[]>;
|
|
4330
|
+
};
|
|
4331
|
+
|
|
4324
4332
|
type AddressActivityMetadata = {
|
|
4325
4333
|
/**
|
|
4326
|
-
* Ethereum address for the address_activity event type
|
|
4334
|
+
* Ethereum address(es) for the address_activity event type
|
|
4327
4335
|
*/
|
|
4328
|
-
|
|
4336
|
+
addresses: Array<any[]>;
|
|
4329
4337
|
/**
|
|
4330
4338
|
* Array of hexadecimal strings of the event signatures.
|
|
4331
4339
|
*/
|
|
@@ -4485,6 +4493,32 @@ declare class WebhooksService {
|
|
|
4485
4493
|
* @throws ApiError
|
|
4486
4494
|
*/
|
|
4487
4495
|
getSharedSecret(): CancelablePromise<SharedSecretsResponse>;
|
|
4496
|
+
/**
|
|
4497
|
+
* Add address(es) to a webhook
|
|
4498
|
+
* Adding address(es) to a given webhook.
|
|
4499
|
+
* @returns WebhookResponse
|
|
4500
|
+
* @throws ApiError
|
|
4501
|
+
*/
|
|
4502
|
+
addAddressesToWebhook({ id, requestBody, }: {
|
|
4503
|
+
/**
|
|
4504
|
+
* The webhook identifier.
|
|
4505
|
+
*/
|
|
4506
|
+
id: string;
|
|
4507
|
+
requestBody: AddressesChangeRequest;
|
|
4508
|
+
}): CancelablePromise<WebhookResponse>;
|
|
4509
|
+
/**
|
|
4510
|
+
* Remove address(es) from a webhook
|
|
4511
|
+
* Removing address(es) from a given webhook.
|
|
4512
|
+
* @returns WebhookResponse
|
|
4513
|
+
* @throws ApiError
|
|
4514
|
+
*/
|
|
4515
|
+
removeAddressesFromWebhook({ id, requestBody, }: {
|
|
4516
|
+
/**
|
|
4517
|
+
* The webhook identifier.
|
|
4518
|
+
*/
|
|
4519
|
+
id: string;
|
|
4520
|
+
requestBody: AddressesChangeRequest;
|
|
4521
|
+
}): CancelablePromise<WebhookResponse>;
|
|
4488
4522
|
}
|
|
4489
4523
|
|
|
4490
4524
|
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
|
@@ -4529,4 +4563,4 @@ declare class ApiError extends Error {
|
|
|
4529
4563
|
constructor(request: ApiRequestOptions, response: ApiResult, message: string);
|
|
4530
4564
|
}
|
|
4531
4565
|
|
|
4532
|
-
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, RpcErrorDto, RpcErrorResponseDto, RpcRequestBodyDto, RpcService, RpcSuccessResponseDto, 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 };
|
|
4566
|
+
export { ActiveDelegatorDetails, ActiveValidatorDetails, AddressActivityMetadata, AddressesChangeRequest, 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, RpcErrorDto, RpcErrorResponseDto, RpcRequestBodyDto, RpcService, RpcSuccessResponseDto, 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
|
@@ -1573,6 +1573,34 @@ class WebhooksService {
|
|
|
1573
1573
|
url: "/v1/webhooks:getSharedSecret"
|
|
1574
1574
|
});
|
|
1575
1575
|
}
|
|
1576
|
+
addAddressesToWebhook({
|
|
1577
|
+
id,
|
|
1578
|
+
requestBody
|
|
1579
|
+
}) {
|
|
1580
|
+
return this.httpRequest.request({
|
|
1581
|
+
method: "PATCH",
|
|
1582
|
+
url: "/v1/webhooks/{id}/addresses",
|
|
1583
|
+
path: {
|
|
1584
|
+
"id": id
|
|
1585
|
+
},
|
|
1586
|
+
body: requestBody,
|
|
1587
|
+
mediaType: "application/json"
|
|
1588
|
+
});
|
|
1589
|
+
}
|
|
1590
|
+
removeAddressesFromWebhook({
|
|
1591
|
+
id,
|
|
1592
|
+
requestBody
|
|
1593
|
+
}) {
|
|
1594
|
+
return this.httpRequest.request({
|
|
1595
|
+
method: "DELETE",
|
|
1596
|
+
url: "/v1/webhooks/{id}/addresses",
|
|
1597
|
+
path: {
|
|
1598
|
+
"id": id
|
|
1599
|
+
},
|
|
1600
|
+
body: requestBody,
|
|
1601
|
+
mediaType: "application/json"
|
|
1602
|
+
});
|
|
1603
|
+
}
|
|
1576
1604
|
}
|
|
1577
1605
|
|
|
1578
1606
|
class Glacier {
|
|
@@ -1853,6 +1881,7 @@ var EVMOperationType = /* @__PURE__ */ ((EVMOperationType2) => {
|
|
|
1853
1881
|
|
|
1854
1882
|
var GlacierApiFeature = /* @__PURE__ */ ((GlacierApiFeature2) => {
|
|
1855
1883
|
GlacierApiFeature2["NFT_INDEXING"] = "nftIndexing";
|
|
1884
|
+
GlacierApiFeature2["WEBHOOKS"] = "webhooks";
|
|
1856
1885
|
return GlacierApiFeature2;
|
|
1857
1886
|
})(GlacierApiFeature || {});
|
|
1858
1887
|
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AddressesChangeRequest } from '../models/AddressesChangeRequest.js';
|
|
1
2
|
import { ListWebhooksResponse } from '../models/ListWebhooksResponse.js';
|
|
2
3
|
import { RegisterWebhookRequest } from '../models/RegisterWebhookRequest.js';
|
|
3
4
|
import { SharedSecretsResponse } from '../models/SharedSecretsResponse.js';
|
|
@@ -90,6 +91,32 @@ declare class WebhooksService {
|
|
|
90
91
|
* @throws ApiError
|
|
91
92
|
*/
|
|
92
93
|
getSharedSecret(): CancelablePromise<SharedSecretsResponse>;
|
|
94
|
+
/**
|
|
95
|
+
* Add address(es) to a webhook
|
|
96
|
+
* Adding address(es) to a given webhook.
|
|
97
|
+
* @returns WebhookResponse
|
|
98
|
+
* @throws ApiError
|
|
99
|
+
*/
|
|
100
|
+
addAddressesToWebhook({ id, requestBody, }: {
|
|
101
|
+
/**
|
|
102
|
+
* The webhook identifier.
|
|
103
|
+
*/
|
|
104
|
+
id: string;
|
|
105
|
+
requestBody: AddressesChangeRequest;
|
|
106
|
+
}): CancelablePromise<WebhookResponse>;
|
|
107
|
+
/**
|
|
108
|
+
* Remove address(es) from a webhook
|
|
109
|
+
* Removing address(es) from a given webhook.
|
|
110
|
+
* @returns WebhookResponse
|
|
111
|
+
* @throws ApiError
|
|
112
|
+
*/
|
|
113
|
+
removeAddressesFromWebhook({ id, requestBody, }: {
|
|
114
|
+
/**
|
|
115
|
+
* The webhook identifier.
|
|
116
|
+
*/
|
|
117
|
+
id: string;
|
|
118
|
+
requestBody: AddressesChangeRequest;
|
|
119
|
+
}): CancelablePromise<WebhookResponse>;
|
|
93
120
|
}
|
|
94
121
|
|
|
95
122
|
export { WebhooksService };
|
|
@@ -75,6 +75,34 @@ class WebhooksService {
|
|
|
75
75
|
url: "/v1/webhooks:getSharedSecret"
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
+
addAddressesToWebhook({
|
|
79
|
+
id,
|
|
80
|
+
requestBody
|
|
81
|
+
}) {
|
|
82
|
+
return this.httpRequest.request({
|
|
83
|
+
method: "PATCH",
|
|
84
|
+
url: "/v1/webhooks/{id}/addresses",
|
|
85
|
+
path: {
|
|
86
|
+
"id": id
|
|
87
|
+
},
|
|
88
|
+
body: requestBody,
|
|
89
|
+
mediaType: "application/json"
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
removeAddressesFromWebhook({
|
|
93
|
+
id,
|
|
94
|
+
requestBody
|
|
95
|
+
}) {
|
|
96
|
+
return this.httpRequest.request({
|
|
97
|
+
method: "DELETE",
|
|
98
|
+
url: "/v1/webhooks/{id}/addresses",
|
|
99
|
+
path: {
|
|
100
|
+
"id": id
|
|
101
|
+
},
|
|
102
|
+
body: requestBody,
|
|
103
|
+
mediaType: "application/json"
|
|
104
|
+
});
|
|
105
|
+
}
|
|
78
106
|
}
|
|
79
107
|
|
|
80
108
|
export { WebhooksService };
|
package/esm/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { OpenAPI, OpenAPIConfig } from './generated/core/OpenAPI.js';
|
|
|
6
6
|
export { ActiveDelegatorDetails } from './generated/models/ActiveDelegatorDetails.js';
|
|
7
7
|
export { ActiveValidatorDetails } from './generated/models/ActiveValidatorDetails.js';
|
|
8
8
|
export { AddressActivityMetadata } from './generated/models/AddressActivityMetadata.js';
|
|
9
|
+
export { AddressesChangeRequest } from './generated/models/AddressesChangeRequest.js';
|
|
9
10
|
export { AggregatedAssetAmount } from './generated/models/AggregatedAssetAmount.js';
|
|
10
11
|
export { AssetAmount } from './generated/models/AssetAmount.js';
|
|
11
12
|
export { AssetWithPriceInfo } from './generated/models/AssetWithPriceInfo.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avalabs/glacier-sdk",
|
|
3
|
-
"version": "2.8.0-alpha.
|
|
3
|
+
"version": "2.8.0-alpha.180",
|
|
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": "
|
|
32
|
+
"gitHead": "c6cea59b19c272343824d113f724f30e5f9b3103"
|
|
33
33
|
}
|