@avalabs/glacier-sdk 2.8.0-canary.814cfdc.0 → 2.8.0-canary.850ff79.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 +582 -256
- package/dist/index.js +279 -105
- package/esm/generated/Glacier.d.ts +6 -0
- package/esm/generated/Glacier.js +9 -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/AddressActivityMetadata.d.ts +2 -2
- package/esm/generated/models/AddressesChangeRequest.d.ts +8 -0
- package/esm/generated/models/{Asset.d.ts → AggregatedAssetAmount.d.ts} +3 -5
- package/esm/generated/models/{XChainAssetBalance.d.ts → AssetAmount.d.ts} +2 -6
- package/esm/generated/models/AssetWithPriceInfo.d.ts +0 -3
- package/esm/generated/models/CChainExportTransaction.d.ts +3 -3
- package/esm/generated/models/CChainImportTransaction.d.ts +3 -3
- package/esm/generated/models/CChainSharedAssetBalance.d.ts +0 -3
- package/esm/generated/models/ChainInfo.d.ts +1 -3
- package/esm/generated/models/ChainStatus.d.ts +3 -0
- package/esm/generated/models/CreateEvmTransactionExportRequest.d.ts +2 -6
- package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.d.ts +2 -6
- package/esm/generated/models/CurrencyCode.d.ts +3 -0
- package/esm/generated/models/DeliveredSourceNotIndexedTeleporterMessage.d.ts +27 -0
- package/esm/generated/models/DeliveredSourceNotIndexedTeleporterMessage.js +8 -0
- package/esm/generated/models/DeliveredTeleporterMessage.d.ts +29 -0
- package/esm/generated/models/DeliveredTeleporterMessage.js +8 -0
- package/esm/generated/models/EVMInput.d.ts +3 -3
- package/esm/generated/models/EVMOperationType.d.ts +5 -0
- package/esm/generated/models/EVMOperationType.js +6 -0
- package/esm/generated/models/EVMOutput.d.ts +3 -3
- package/esm/generated/models/Erc1155TokenMetadata.d.ts +0 -3
- package/esm/generated/models/Erc721TokenMetadata.d.ts +0 -3
- package/esm/generated/models/GetChainResponse.d.ts +1 -3
- package/esm/generated/models/GlacierApiFeature.d.ts +6 -0
- package/esm/generated/models/GlacierApiFeature.js +7 -0
- package/esm/generated/models/ListNftTokens.d.ts +1 -1
- package/esm/generated/models/ListTransfersResponse.d.ts +1 -1
- package/esm/generated/models/Method.d.ts +0 -3
- package/esm/generated/models/Money.d.ts +0 -3
- package/esm/generated/models/NextPageToken.d.ts +8 -0
- package/esm/generated/models/NftTokenMetadataStatus.d.ts +3 -0
- package/esm/generated/models/OperationType.d.ts +4 -2
- package/esm/generated/models/OperationType.js +3 -1
- package/esm/generated/models/PChainBalance.d.ts +15 -15
- package/esm/generated/models/PChainSharedAsset.d.ts +1 -3
- package/esm/generated/models/PChainTransaction.d.ts +12 -7
- package/esm/generated/models/PChainTransactionType.d.ts +2 -0
- package/esm/generated/models/PChainTransactionType.js +2 -0
- package/esm/generated/models/PChainUtxo.d.ts +2 -2
- package/esm/generated/models/PendingReward.d.ts +3 -3
- package/esm/generated/models/PendingTeleporterMessage.d.ts +27 -0
- package/esm/generated/models/PendingTeleporterMessage.js +8 -0
- package/esm/generated/models/PrimaryNetworkAssetCap.d.ts +3 -0
- package/esm/generated/models/PrimaryNetworkAssetType.d.ts +3 -0
- package/esm/generated/models/PrimaryNetworkOperationType.d.ts +7 -0
- package/esm/generated/models/PrimaryNetworkOperationType.js +8 -0
- package/esm/generated/models/PrimaryNetworkOptions.d.ts +1 -1
- package/esm/generated/models/PrimaryNetworkTxType.d.ts +2 -1
- package/esm/generated/models/PrimaryNetworkTxType.js +2 -1
- package/esm/generated/models/RegisterWebhookRequest.d.ts +8 -3
- 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/Subnet.d.ts +17 -0
- package/esm/generated/models/SubnetOwnershipInfo.d.ts +16 -0
- package/esm/generated/models/TeleporterDestinationTransaction.d.ts +9 -0
- package/esm/generated/models/TeleporterReceipt.d.ts +6 -0
- package/esm/generated/models/TeleporterRewardDetails.d.ts +37 -0
- package/esm/generated/models/TeleporterRewardDetails.js +8 -0
- package/esm/generated/models/TeleporterSourceTransaction.d.ts +7 -0
- package/esm/generated/models/TransactionMethodType.d.ts +3 -0
- package/esm/generated/models/UpdateWebhookRequest.d.ts +12 -0
- package/esm/generated/models/Utxo.d.ts +2 -2
- package/esm/generated/models/WebhookResponse.d.ts +8 -0
- package/esm/generated/models/XChainAssetDetails.d.ts +0 -6
- package/esm/generated/models/XChainBalances.d.ts +3 -3
- package/esm/generated/models/XChainLinearTransaction.d.ts +4 -7
- package/esm/generated/models/XChainNonLinearTransaction.d.ts +4 -7
- package/esm/generated/models/XChainSharedAssetBalance.d.ts +0 -3
- package/esm/generated/models/XChainTransactionType.d.ts +3 -0
- package/esm/generated/services/DefaultService.d.ts +0 -60
- package/esm/generated/services/DefaultService.js +0 -48
- package/esm/generated/services/EvmChainsService.d.ts +6 -1
- package/esm/generated/services/EvmChainsService.js +4 -2
- package/esm/generated/services/PrimaryNetworkService.d.ts +1 -1
- package/esm/generated/services/PrimaryNetworkService.js +1 -1
- package/esm/generated/services/RpcService.d.ts +25 -0
- package/esm/generated/services/RpcService.js +24 -0
- package/esm/generated/services/TeleporterService.d.ts +57 -0
- package/esm/generated/services/TeleporterService.js +39 -0
- package/esm/generated/services/WebhooksService.d.ts +122 -0
- package/esm/generated/services/WebhooksService.js +108 -0
- package/esm/index.d.ts +23 -2
- package/esm/index.js +10 -2
- package/package.json +3 -3
- package/esm/generated/models/CreateEvmTransactionExportRequest.js +0 -8
- package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.js +0 -8
|
@@ -1,8 +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 { WebhookResponse } from '../models/WebhookResponse.js';
|
|
5
|
-
import { WebhookStatus } from '../models/WebhookStatus.js';
|
|
6
1
|
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
7
2
|
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
8
3
|
|
|
@@ -14,61 +9,6 @@ declare class DefaultService {
|
|
|
14
9
|
* @throws ApiError
|
|
15
10
|
*/
|
|
16
11
|
mediaControllerUploadImage(): CancelablePromise<any>;
|
|
17
|
-
/**
|
|
18
|
-
* Register a webhook
|
|
19
|
-
* Registers a new webhook.
|
|
20
|
-
* @returns WebhookResponse
|
|
21
|
-
* @throws ApiError
|
|
22
|
-
*/
|
|
23
|
-
registerWebhook({ requestBody, }: {
|
|
24
|
-
requestBody: RegisterWebhookRequest;
|
|
25
|
-
}): CancelablePromise<WebhookResponse>;
|
|
26
|
-
/**
|
|
27
|
-
* List webhooks
|
|
28
|
-
* Lists webhooks for the user.
|
|
29
|
-
* @returns ListWebhooksResponse
|
|
30
|
-
* @throws ApiError
|
|
31
|
-
*/
|
|
32
|
-
listWebhooks({ pageToken, pageSize, status, }: {
|
|
33
|
-
/**
|
|
34
|
-
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
35
|
-
*/
|
|
36
|
-
pageToken?: string;
|
|
37
|
-
/**
|
|
38
|
-
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
39
|
-
*/
|
|
40
|
-
pageSize?: number;
|
|
41
|
-
/**
|
|
42
|
-
* 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.
|
|
43
|
-
*/
|
|
44
|
-
status?: WebhookStatus;
|
|
45
|
-
}): CancelablePromise<ListWebhooksResponse>;
|
|
46
|
-
/**
|
|
47
|
-
* Deactivate a webhook
|
|
48
|
-
* Deactivates a webhook by ID.
|
|
49
|
-
* @returns WebhookResponse
|
|
50
|
-
* @throws ApiError
|
|
51
|
-
*/
|
|
52
|
-
deactivateWebhook({ id, }: {
|
|
53
|
-
/**
|
|
54
|
-
* The webhook identifier.
|
|
55
|
-
*/
|
|
56
|
-
id: string;
|
|
57
|
-
}): CancelablePromise<WebhookResponse>;
|
|
58
|
-
/**
|
|
59
|
-
* Generate a shared secret
|
|
60
|
-
* Generates a new shared secret.
|
|
61
|
-
* @returns SharedSecretsResponse
|
|
62
|
-
* @throws ApiError
|
|
63
|
-
*/
|
|
64
|
-
generateSharedSecret(): CancelablePromise<SharedSecretsResponse>;
|
|
65
|
-
/**
|
|
66
|
-
* Get a shared secret
|
|
67
|
-
* Get a previously generated shared secret.
|
|
68
|
-
* @returns SharedSecretsResponse
|
|
69
|
-
* @throws ApiError
|
|
70
|
-
*/
|
|
71
|
-
getSharedSecret(): CancelablePromise<SharedSecretsResponse>;
|
|
72
12
|
}
|
|
73
13
|
|
|
74
14
|
export { DefaultService };
|
|
@@ -8,54 +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
|
-
deactivateWebhook({
|
|
37
|
-
id
|
|
38
|
-
}) {
|
|
39
|
-
return this.httpRequest.request({
|
|
40
|
-
method: "DELETE",
|
|
41
|
-
url: "/v1/webhooks/{id}",
|
|
42
|
-
path: {
|
|
43
|
-
"id": id
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
generateSharedSecret() {
|
|
48
|
-
return this.httpRequest.request({
|
|
49
|
-
method: "POST",
|
|
50
|
-
url: "/v1/webhooks:generateOrRotateSharedSecret"
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
getSharedSecret() {
|
|
54
|
-
return this.httpRequest.request({
|
|
55
|
-
method: "GET",
|
|
56
|
-
url: "/v1/webhooks:getSharedSecret"
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
11
|
}
|
|
60
12
|
|
|
61
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?:
|
|
173
|
+
subnetId?: any;
|
|
174
174
|
}): CancelablePromise<ListValidatorDetailsResponse>;
|
|
175
175
|
/**
|
|
176
176
|
* Get single validator details
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RpcErrorResponseDto } from '../models/RpcErrorResponseDto.js';
|
|
2
|
+
import { RpcRequestBodyDto } from '../models/RpcRequestBodyDto.js';
|
|
3
|
+
import { RpcSuccessResponseDto } from '../models/RpcSuccessResponseDto.js';
|
|
4
|
+
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
5
|
+
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
6
|
+
|
|
7
|
+
declare class RpcService {
|
|
8
|
+
readonly httpRequest: BaseHttpRequest;
|
|
9
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
10
|
+
/**
|
|
11
|
+
* Calls JSON-RPC method
|
|
12
|
+
* Calls JSON-RPC method.
|
|
13
|
+
* @returns any
|
|
14
|
+
* @throws ApiError
|
|
15
|
+
*/
|
|
16
|
+
rpc({ chainId, requestBody, }: {
|
|
17
|
+
/**
|
|
18
|
+
* A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
19
|
+
*/
|
|
20
|
+
chainId: string;
|
|
21
|
+
requestBody: (RpcRequestBodyDto | Array<RpcRequestBodyDto>);
|
|
22
|
+
}): CancelablePromise<(RpcSuccessResponseDto | RpcErrorResponseDto)>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { RpcService };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
class RpcService {
|
|
2
|
+
constructor(httpRequest) {
|
|
3
|
+
this.httpRequest = httpRequest;
|
|
4
|
+
}
|
|
5
|
+
rpc({
|
|
6
|
+
chainId,
|
|
7
|
+
requestBody
|
|
8
|
+
}) {
|
|
9
|
+
return this.httpRequest.request({
|
|
10
|
+
method: "POST",
|
|
11
|
+
url: "/v1/ext/bc/{chainId}/rpc",
|
|
12
|
+
path: {
|
|
13
|
+
"chainId": chainId
|
|
14
|
+
},
|
|
15
|
+
body: requestBody,
|
|
16
|
+
mediaType: "application/json",
|
|
17
|
+
errors: {
|
|
18
|
+
504: `Request timed out`
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { RpcService };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { DeliveredSourceNotIndexedTeleporterMessage } from '../models/DeliveredSourceNotIndexedTeleporterMessage.js';
|
|
2
|
+
import { DeliveredTeleporterMessage } from '../models/DeliveredTeleporterMessage.js';
|
|
3
|
+
import { NextPageToken } from '../models/NextPageToken.js';
|
|
4
|
+
import { PendingTeleporterMessage } from '../models/PendingTeleporterMessage.js';
|
|
5
|
+
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
6
|
+
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
7
|
+
|
|
8
|
+
declare class TeleporterService {
|
|
9
|
+
readonly httpRequest: BaseHttpRequest;
|
|
10
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
11
|
+
/**
|
|
12
|
+
* Get a teleporter message
|
|
13
|
+
* Gets a teleporter message by message ID.
|
|
14
|
+
* @returns any
|
|
15
|
+
* @throws ApiError
|
|
16
|
+
*/
|
|
17
|
+
getTeleporterMessage({ messageId, }: {
|
|
18
|
+
/**
|
|
19
|
+
* The message ID of the teleporter message.
|
|
20
|
+
*/
|
|
21
|
+
messageId: string;
|
|
22
|
+
}): CancelablePromise<(PendingTeleporterMessage | DeliveredTeleporterMessage | DeliveredSourceNotIndexedTeleporterMessage)>;
|
|
23
|
+
/**
|
|
24
|
+
* List teleporter messages
|
|
25
|
+
* Lists teleporter messages. Ordered by timestamp in descending order.
|
|
26
|
+
* @returns any
|
|
27
|
+
* @throws ApiError
|
|
28
|
+
*/
|
|
29
|
+
listTeleporterMessages({ pageToken, pageSize, sourceBlockchainId, destinationBlockchainId, to, from, }: {
|
|
30
|
+
/**
|
|
31
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
32
|
+
*/
|
|
33
|
+
pageToken?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
36
|
+
*/
|
|
37
|
+
pageSize?: number;
|
|
38
|
+
/**
|
|
39
|
+
* The base58 encoded blockchain ID or evm chain ID of the source chain that the teleporter message was sent from.
|
|
40
|
+
*/
|
|
41
|
+
sourceBlockchainId?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The base58 encoded blockchain ID or evm chain ID of the destination chain that the teleporter message was sent to.
|
|
44
|
+
*/
|
|
45
|
+
destinationBlockchainId?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The address of the recipient of the teleporter message.
|
|
48
|
+
*/
|
|
49
|
+
to?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The address of the sender of the teleporter message.
|
|
52
|
+
*/
|
|
53
|
+
from?: string;
|
|
54
|
+
}): CancelablePromise<NextPageToken>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { TeleporterService };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
class TeleporterService {
|
|
2
|
+
constructor(httpRequest) {
|
|
3
|
+
this.httpRequest = httpRequest;
|
|
4
|
+
}
|
|
5
|
+
getTeleporterMessage({
|
|
6
|
+
messageId
|
|
7
|
+
}) {
|
|
8
|
+
return this.httpRequest.request({
|
|
9
|
+
method: "GET",
|
|
10
|
+
url: "/v1/teleporter/messages/{messageId}",
|
|
11
|
+
path: {
|
|
12
|
+
"messageId": messageId
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
listTeleporterMessages({
|
|
17
|
+
pageToken,
|
|
18
|
+
pageSize = 10,
|
|
19
|
+
sourceBlockchainId,
|
|
20
|
+
destinationBlockchainId,
|
|
21
|
+
to,
|
|
22
|
+
from
|
|
23
|
+
}) {
|
|
24
|
+
return this.httpRequest.request({
|
|
25
|
+
method: "GET",
|
|
26
|
+
url: "/v1/teleporter/messages",
|
|
27
|
+
query: {
|
|
28
|
+
"pageToken": pageToken,
|
|
29
|
+
"pageSize": pageSize,
|
|
30
|
+
"sourceBlockchainId": sourceBlockchainId,
|
|
31
|
+
"destinationBlockchainId": destinationBlockchainId,
|
|
32
|
+
"to": to,
|
|
33
|
+
"from": from
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { TeleporterService };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { AddressesChangeRequest } from '../models/AddressesChangeRequest.js';
|
|
2
|
+
import { ListWebhooksResponse } from '../models/ListWebhooksResponse.js';
|
|
3
|
+
import { RegisterWebhookRequest } from '../models/RegisterWebhookRequest.js';
|
|
4
|
+
import { SharedSecretsResponse } from '../models/SharedSecretsResponse.js';
|
|
5
|
+
import { UpdateWebhookRequest } from '../models/UpdateWebhookRequest.js';
|
|
6
|
+
import { WebhookResponse } from '../models/WebhookResponse.js';
|
|
7
|
+
import { WebhookStatus } from '../models/WebhookStatus.js';
|
|
8
|
+
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
9
|
+
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
10
|
+
|
|
11
|
+
declare class WebhooksService {
|
|
12
|
+
readonly httpRequest: BaseHttpRequest;
|
|
13
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
14
|
+
/**
|
|
15
|
+
* Register a webhook
|
|
16
|
+
* Registers a new webhook.
|
|
17
|
+
* @returns WebhookResponse
|
|
18
|
+
* @throws ApiError
|
|
19
|
+
*/
|
|
20
|
+
registerWebhook({ requestBody, }: {
|
|
21
|
+
requestBody: RegisterWebhookRequest;
|
|
22
|
+
}): CancelablePromise<WebhookResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* List webhooks
|
|
25
|
+
* Lists webhooks for the user.
|
|
26
|
+
* @returns ListWebhooksResponse
|
|
27
|
+
* @throws ApiError
|
|
28
|
+
*/
|
|
29
|
+
listWebhooks({ pageToken, pageSize, status, }: {
|
|
30
|
+
/**
|
|
31
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
32
|
+
*/
|
|
33
|
+
pageToken?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
36
|
+
*/
|
|
37
|
+
pageSize?: number;
|
|
38
|
+
/**
|
|
39
|
+
* 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.
|
|
40
|
+
*/
|
|
41
|
+
status?: WebhookStatus;
|
|
42
|
+
}): CancelablePromise<ListWebhooksResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Get a webhook by ID
|
|
45
|
+
* Retrieves a webhook by ID.
|
|
46
|
+
* @returns WebhookResponse
|
|
47
|
+
* @throws ApiError
|
|
48
|
+
*/
|
|
49
|
+
getWebhook({ id, }: {
|
|
50
|
+
/**
|
|
51
|
+
* The webhook identifier.
|
|
52
|
+
*/
|
|
53
|
+
id: string;
|
|
54
|
+
}): CancelablePromise<WebhookResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Deactivate a webhook
|
|
57
|
+
* Deactivates a webhook by ID.
|
|
58
|
+
* @returns WebhookResponse
|
|
59
|
+
* @throws ApiError
|
|
60
|
+
*/
|
|
61
|
+
deactivateWebhook({ id, }: {
|
|
62
|
+
/**
|
|
63
|
+
* The webhook identifier.
|
|
64
|
+
*/
|
|
65
|
+
id: string;
|
|
66
|
+
}): CancelablePromise<WebhookResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* Update a webhook
|
|
69
|
+
* Updates an existing webhook.
|
|
70
|
+
* @returns WebhookResponse
|
|
71
|
+
* @throws ApiError
|
|
72
|
+
*/
|
|
73
|
+
updateWebhook({ id, requestBody, }: {
|
|
74
|
+
/**
|
|
75
|
+
* The webhook identifier.
|
|
76
|
+
*/
|
|
77
|
+
id: string;
|
|
78
|
+
requestBody: UpdateWebhookRequest;
|
|
79
|
+
}): CancelablePromise<WebhookResponse>;
|
|
80
|
+
/**
|
|
81
|
+
* Generate a shared secret
|
|
82
|
+
* Generates a new shared secret.
|
|
83
|
+
* @returns SharedSecretsResponse
|
|
84
|
+
* @throws ApiError
|
|
85
|
+
*/
|
|
86
|
+
generateSharedSecret(): CancelablePromise<SharedSecretsResponse>;
|
|
87
|
+
/**
|
|
88
|
+
* Get a shared secret
|
|
89
|
+
* Get a previously generated shared secret.
|
|
90
|
+
* @returns SharedSecretsResponse
|
|
91
|
+
* @throws ApiError
|
|
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>;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export { WebhooksService };
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
addAddressesToWebhook({
|
|
79
|
+
id,
|
|
80
|
+
requestBody
|
|
81
|
+
}) {
|
|
82
|
+
return this.httpRequest.request({
|
|
83
|
+
method: "PATCH",
|
|
84
|
+
url: "/v1/webhooks/{id}/addresses:addAddresses",
|
|
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: "PATCH",
|
|
98
|
+
url: "/v1/webhooks/{id}/addresses:removeAddresses",
|
|
99
|
+
path: {
|
|
100
|
+
"id": id
|
|
101
|
+
},
|
|
102
|
+
body: requestBody,
|
|
103
|
+
mediaType: "application/json"
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export { WebhooksService };
|
package/esm/index.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ 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 {
|
|
9
|
+
export { AddressesChangeRequest } from './generated/models/AddressesChangeRequest.js';
|
|
10
|
+
export { AggregatedAssetAmount } from './generated/models/AggregatedAssetAmount.js';
|
|
11
|
+
export { AssetAmount } from './generated/models/AssetAmount.js';
|
|
10
12
|
export { AssetWithPriceInfo } from './generated/models/AssetWithPriceInfo.js';
|
|
11
13
|
export { Blockchain } from './generated/models/Blockchain.js';
|
|
12
14
|
export { BlockchainId } from './generated/models/BlockchainId.js';
|
|
@@ -33,6 +35,8 @@ export { CreatePrimaryNetworkTransactionExportRequest } from './generated/models
|
|
|
33
35
|
export { CurrencyCode } from './generated/models/CurrencyCode.js';
|
|
34
36
|
export { DelegationStatusType } from './generated/models/DelegationStatusType.js';
|
|
35
37
|
export { DelegatorsDetails } from './generated/models/DelegatorsDetails.js';
|
|
38
|
+
export { DeliveredSourceNotIndexedTeleporterMessage } from './generated/models/DeliveredSourceNotIndexedTeleporterMessage.js';
|
|
39
|
+
export { DeliveredTeleporterMessage } from './generated/models/DeliveredTeleporterMessage.js';
|
|
36
40
|
export { Erc1155Contract } from './generated/models/Erc1155Contract.js';
|
|
37
41
|
export { Erc1155Token } from './generated/models/Erc1155Token.js';
|
|
38
42
|
export { Erc1155TokenBalance } from './generated/models/Erc1155TokenBalance.js';
|
|
@@ -54,6 +58,7 @@ export { EventType } from './generated/models/EventType.js';
|
|
|
54
58
|
export { EvmBlock } from './generated/models/EvmBlock.js';
|
|
55
59
|
export { EVMInput } from './generated/models/EVMInput.js';
|
|
56
60
|
export { EvmNetworkOptions } from './generated/models/EvmNetworkOptions.js';
|
|
61
|
+
export { EVMOperationType } from './generated/models/EVMOperationType.js';
|
|
57
62
|
export { EVMOutput } from './generated/models/EVMOutput.js';
|
|
58
63
|
export { FullNativeTransactionDetails } from './generated/models/FullNativeTransactionDetails.js';
|
|
59
64
|
export { GetChainResponse } from './generated/models/GetChainResponse.js';
|
|
@@ -62,6 +67,7 @@ export { GetNativeBalanceResponse } from './generated/models/GetNativeBalanceRes
|
|
|
62
67
|
export { GetNetworkDetailsResponse } from './generated/models/GetNetworkDetailsResponse.js';
|
|
63
68
|
export { GetPrimaryNetworkBlockResponse } from './generated/models/GetPrimaryNetworkBlockResponse.js';
|
|
64
69
|
export { GetTransactionResponse } from './generated/models/GetTransactionResponse.js';
|
|
70
|
+
export { GlacierApiFeature } from './generated/models/GlacierApiFeature.js';
|
|
65
71
|
export { HistoricalReward } from './generated/models/HistoricalReward.js';
|
|
66
72
|
export { ImageAsset } from './generated/models/ImageAsset.js';
|
|
67
73
|
export { InternalTransaction } from './generated/models/InternalTransaction.js';
|
|
@@ -107,6 +113,7 @@ export { Network } from './generated/models/Network.js';
|
|
|
107
113
|
export { NetworkToken } from './generated/models/NetworkToken.js';
|
|
108
114
|
export { NetworkTokenDetails } from './generated/models/NetworkTokenDetails.js';
|
|
109
115
|
export { NetworkType } from './generated/models/NetworkType.js';
|
|
116
|
+
export { NextPageToken } from './generated/models/NextPageToken.js';
|
|
110
117
|
export { NftTokenMetadataStatus } from './generated/models/NftTokenMetadataStatus.js';
|
|
111
118
|
export { OperationStatus } from './generated/models/OperationStatus.js';
|
|
112
119
|
export { OperationStatusCode } from './generated/models/OperationStatusCode.js';
|
|
@@ -120,6 +127,7 @@ export { PChainTransactionType } from './generated/models/PChainTransactionType.
|
|
|
120
127
|
export { PChainUtxo } from './generated/models/PChainUtxo.js';
|
|
121
128
|
export { PendingDelegatorDetails } from './generated/models/PendingDelegatorDetails.js';
|
|
122
129
|
export { PendingReward } from './generated/models/PendingReward.js';
|
|
130
|
+
export { PendingTeleporterMessage } from './generated/models/PendingTeleporterMessage.js';
|
|
123
131
|
export { PendingValidatorDetails } from './generated/models/PendingValidatorDetails.js';
|
|
124
132
|
export { PricingProviders } from './generated/models/PricingProviders.js';
|
|
125
133
|
export { PrimaryNetwork } from './generated/models/PrimaryNetwork.js';
|
|
@@ -128,6 +136,7 @@ export { PrimaryNetworkAssetType } from './generated/models/PrimaryNetworkAssetT
|
|
|
128
136
|
export { PrimaryNetworkBlock } from './generated/models/PrimaryNetworkBlock.js';
|
|
129
137
|
export { PrimaryNetworkChainInfo } from './generated/models/PrimaryNetworkChainInfo.js';
|
|
130
138
|
export { PrimaryNetworkChainName } from './generated/models/PrimaryNetworkChainName.js';
|
|
139
|
+
export { PrimaryNetworkOperationType } from './generated/models/PrimaryNetworkOperationType.js';
|
|
131
140
|
export { PrimaryNetworkOptions } from './generated/models/PrimaryNetworkOptions.js';
|
|
132
141
|
export { PrimaryNetworkTxType } from './generated/models/PrimaryNetworkTxType.js';
|
|
133
142
|
export { ProposerDetails } from './generated/models/ProposerDetails.js';
|
|
@@ -138,10 +147,19 @@ export { ResourceLinkType } from './generated/models/ResourceLinkType.js';
|
|
|
138
147
|
export { Rewards } from './generated/models/Rewards.js';
|
|
139
148
|
export { RewardType } from './generated/models/RewardType.js';
|
|
140
149
|
export { RichAddress } from './generated/models/RichAddress.js';
|
|
150
|
+
export { RpcErrorDto } from './generated/models/RpcErrorDto.js';
|
|
151
|
+
export { RpcErrorResponseDto } from './generated/models/RpcErrorResponseDto.js';
|
|
152
|
+
export { RpcRequestBodyDto } from './generated/models/RpcRequestBodyDto.js';
|
|
153
|
+
export { RpcSuccessResponseDto } from './generated/models/RpcSuccessResponseDto.js';
|
|
141
154
|
export { SharedSecretsResponse } from './generated/models/SharedSecretsResponse.js';
|
|
142
155
|
export { SortOrder } from './generated/models/SortOrder.js';
|
|
143
156
|
export { StakingDistribution } from './generated/models/StakingDistribution.js';
|
|
144
157
|
export { Subnet } from './generated/models/Subnet.js';
|
|
158
|
+
export { SubnetOwnershipInfo } from './generated/models/SubnetOwnershipInfo.js';
|
|
159
|
+
export { TeleporterDestinationTransaction } from './generated/models/TeleporterDestinationTransaction.js';
|
|
160
|
+
export { TeleporterReceipt } from './generated/models/TeleporterReceipt.js';
|
|
161
|
+
export { TeleporterRewardDetails } from './generated/models/TeleporterRewardDetails.js';
|
|
162
|
+
export { TeleporterSourceTransaction } from './generated/models/TeleporterSourceTransaction.js';
|
|
145
163
|
export { TransactionDetails } from './generated/models/TransactionDetails.js';
|
|
146
164
|
export { TransactionExportMetadata } from './generated/models/TransactionExportMetadata.js';
|
|
147
165
|
export { TransactionMethodType } from './generated/models/TransactionMethodType.js';
|
|
@@ -149,6 +167,7 @@ export { TransactionStatus } from './generated/models/TransactionStatus.js';
|
|
|
149
167
|
export { TransactionVertexDetail } from './generated/models/TransactionVertexDetail.js';
|
|
150
168
|
export { UnknownContract } from './generated/models/UnknownContract.js';
|
|
151
169
|
export { UpdateContractResponse } from './generated/models/UpdateContractResponse.js';
|
|
170
|
+
export { UpdateWebhookRequest } from './generated/models/UpdateWebhookRequest.js';
|
|
152
171
|
export { UtilityAddresses } from './generated/models/UtilityAddresses.js';
|
|
153
172
|
export { Utxo } from './generated/models/Utxo.js';
|
|
154
173
|
export { UtxoCredential } from './generated/models/UtxoCredential.js';
|
|
@@ -160,7 +179,6 @@ export { VmName } from './generated/models/VmName.js';
|
|
|
160
179
|
export { WebhookResponse } from './generated/models/WebhookResponse.js';
|
|
161
180
|
export { WebhookStatus } from './generated/models/WebhookStatus.js';
|
|
162
181
|
export { WebhookStatusType } from './generated/models/WebhookStatusType.js';
|
|
163
|
-
export { XChainAssetBalance } from './generated/models/XChainAssetBalance.js';
|
|
164
182
|
export { XChainAssetDetails } from './generated/models/XChainAssetDetails.js';
|
|
165
183
|
export { XChainBalances } from './generated/models/XChainBalances.js';
|
|
166
184
|
export { XChainId } from './generated/models/XChainId.js';
|
|
@@ -185,3 +203,6 @@ export { PrimaryNetworkRewardsService } from './generated/services/PrimaryNetwor
|
|
|
185
203
|
export { PrimaryNetworkTransactionsService } from './generated/services/PrimaryNetworkTransactionsService.js';
|
|
186
204
|
export { PrimaryNetworkUtxOsService } from './generated/services/PrimaryNetworkUtxOsService.js';
|
|
187
205
|
export { PrimaryNetworkVerticesService } from './generated/services/PrimaryNetworkVerticesService.js';
|
|
206
|
+
export { RpcService } from './generated/services/RpcService.js';
|
|
207
|
+
export { TeleporterService } from './generated/services/TeleporterService.js';
|
|
208
|
+
export { WebhooksService } from './generated/services/WebhooksService.js';
|