@avalabs/glacier-sdk 2.8.0-canary.cf01dde.0 → 2.8.0-canary.d02981d.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 +745 -476
- package/dist/index.js +356 -198
- package/esm/generated/Glacier.d.ts +4 -0
- package/esm/generated/Glacier.js +6 -0
- package/esm/generated/core/CancelablePromise.d.ts +2 -8
- package/esm/generated/core/CancelablePromise.js +38 -36
- package/esm/generated/core/request.js +3 -2
- package/esm/generated/models/ActiveValidatorDetails.d.ts +5 -0
- package/esm/generated/models/AddressActivityMetadata.d.ts +2 -2
- package/esm/generated/models/AddressesChangeRequest.d.ts +8 -0
- package/esm/generated/models/{XChainAssetBalance.d.ts → AggregatedAssetAmount.d.ts} +5 -6
- package/esm/generated/models/{Asset.d.ts → AssetAmount.d.ts} +5 -6
- package/esm/generated/models/AssetWithPriceInfo.d.ts +2 -4
- package/esm/generated/models/BlsCredentials.d.ts +6 -0
- 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 +3 -4
- package/esm/generated/models/ChainInfo.d.ts +1 -3
- package/esm/generated/models/ChainStatus.d.ts +3 -0
- package/esm/generated/models/CompletedValidatorDetails.d.ts +5 -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 +7 -2
- package/esm/generated/models/DeliveredTeleporterMessage.d.ts +7 -2
- 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/ListTeleporterMessagesResponse.d.ts +12 -0
- package/esm/generated/models/ListTransfersResponse.d.ts +1 -1
- package/esm/generated/models/ListWebhookAddressesResponse.d.ts +10 -0
- package/esm/generated/models/Method.d.ts +0 -3
- package/esm/generated/models/Money.d.ts +0 -3
- 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 +4 -4
- package/esm/generated/models/PChainTransaction.d.ts +17 -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 +7 -2
- package/esm/generated/models/PendingValidatorDetails.d.ts +6 -0
- package/esm/generated/models/PrimaryNetworkAssetCap.d.ts +9 -0
- package/esm/generated/models/PrimaryNetworkAssetCap.js +7 -0
- package/esm/generated/models/PrimaryNetworkAssetType.d.ts +9 -0
- package/esm/generated/models/PrimaryNetworkAssetType.js +7 -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/RemovedValidatorDetails.d.ts +6 -0
- package/esm/generated/models/RpcErrorDto.d.ts +7 -0
- package/esm/generated/models/RpcErrorResponseDto.d.ts +9 -0
- package/esm/generated/models/RpcRequestBodyDto.d.ts +8 -0
- package/esm/generated/models/RpcSuccessResponseDto.d.ts +7 -0
- package/esm/generated/models/SortByOption.d.ts +9 -0
- package/esm/generated/models/SortByOption.js +10 -0
- package/esm/generated/models/Subnet.d.ts +17 -0
- package/esm/generated/models/SubnetOwnershipInfo.d.ts +16 -0
- package/esm/generated/models/TeleporterReceipt.d.ts +6 -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 +10 -0
- package/esm/generated/models/XChainAssetDetails.d.ts +5 -8
- 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 +3 -4
- package/esm/generated/models/XChainTransactionType.d.ts +3 -0
- package/esm/generated/services/DefaultService.d.ts +0 -53
- package/esm/generated/services/DefaultService.js +0 -42
- package/esm/generated/services/EvmBalancesService.d.ts +27 -23
- package/esm/generated/services/EvmBalancesService.js +10 -8
- package/esm/generated/services/EvmBlocksService.d.ts +7 -7
- package/esm/generated/services/EvmBlocksService.js +4 -4
- package/esm/generated/services/EvmChainsService.d.ts +7 -2
- package/esm/generated/services/EvmChainsService.js +4 -2
- package/esm/generated/services/EvmContractsService.d.ts +2 -2
- package/esm/generated/services/EvmTransactionsService.d.ts +57 -57
- package/esm/generated/services/EvmTransactionsService.js +32 -32
- package/esm/generated/services/NfTsService.d.ts +8 -8
- package/esm/generated/services/NfTsService.js +4 -4
- package/esm/generated/services/PrimaryNetworkBlocksService.d.ts +10 -10
- package/esm/generated/services/PrimaryNetworkBlocksService.js +8 -8
- package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +12 -12
- package/esm/generated/services/PrimaryNetworkRewardsService.js +4 -4
- package/esm/generated/services/PrimaryNetworkService.d.ts +51 -36
- package/esm/generated/services/PrimaryNetworkService.js +20 -14
- package/esm/generated/services/PrimaryNetworkTransactionsService.d.ts +16 -16
- package/esm/generated/services/PrimaryNetworkTransactionsService.js +8 -8
- package/esm/generated/services/PrimaryNetworkUtxOsService.d.ts +5 -5
- package/esm/generated/services/PrimaryNetworkUtxOsService.js +2 -2
- package/esm/generated/services/PrimaryNetworkVerticesService.d.ts +10 -10
- package/esm/generated/services/PrimaryNetworkVerticesService.js +6 -6
- package/esm/generated/services/RpcService.d.ts +25 -0
- package/esm/generated/services/RpcService.js +24 -0
- package/esm/generated/services/TeleporterService.d.ts +22 -25
- package/esm/generated/services/TeleporterService.js +8 -10
- package/esm/generated/services/WebhooksService.d.ts +143 -0
- package/esm/generated/services/WebhooksService.js +125 -0
- package/esm/index.d.ts +21 -2
- package/esm/index.js +8 -2
- package/package.json +3 -3
- package/esm/generated/models/CreateEvmTransactionExportRequest.js +0 -8
- package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.js +0 -8
|
@@ -15,7 +15,7 @@ declare class PrimaryNetworkVerticesService {
|
|
|
15
15
|
* @returns ListXChainVerticesResponse
|
|
16
16
|
* @throws ApiError
|
|
17
17
|
*/
|
|
18
|
-
listLatestXChainVertices({ blockchainId, network,
|
|
18
|
+
listLatestXChainVertices({ blockchainId, network, pageToken, pageSize, }: {
|
|
19
19
|
/**
|
|
20
20
|
* A primary network blockchain id or alias.
|
|
21
21
|
*/
|
|
@@ -24,14 +24,14 @@ declare class PrimaryNetworkVerticesService {
|
|
|
24
24
|
* Either mainnet or a testnet.
|
|
25
25
|
*/
|
|
26
26
|
network: Network;
|
|
27
|
-
/**
|
|
28
|
-
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
29
|
-
*/
|
|
30
|
-
pageSize?: number;
|
|
31
27
|
/**
|
|
32
28
|
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
33
29
|
*/
|
|
34
30
|
pageToken?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
33
|
+
*/
|
|
34
|
+
pageSize?: number;
|
|
35
35
|
}): CancelablePromise<ListXChainVerticesResponse>;
|
|
36
36
|
/**
|
|
37
37
|
* Get vertex
|
|
@@ -59,7 +59,7 @@ declare class PrimaryNetworkVerticesService {
|
|
|
59
59
|
* @returns ListXChainVerticesResponse
|
|
60
60
|
* @throws ApiError
|
|
61
61
|
*/
|
|
62
|
-
getVertexByHeight({ vertexHeight, blockchainId, network,
|
|
62
|
+
getVertexByHeight({ vertexHeight, blockchainId, network, pageToken, pageSize, sortOrder, }: {
|
|
63
63
|
/**
|
|
64
64
|
* The height of a vertex.
|
|
65
65
|
*/
|
|
@@ -72,14 +72,14 @@ declare class PrimaryNetworkVerticesService {
|
|
|
72
72
|
* Either mainnet or a testnet.
|
|
73
73
|
*/
|
|
74
74
|
network: Network;
|
|
75
|
-
/**
|
|
76
|
-
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
77
|
-
*/
|
|
78
|
-
pageSize?: number;
|
|
79
75
|
/**
|
|
80
76
|
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
81
77
|
*/
|
|
82
78
|
pageToken?: string;
|
|
79
|
+
/**
|
|
80
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
81
|
+
*/
|
|
82
|
+
pageSize?: number;
|
|
83
83
|
/**
|
|
84
84
|
* The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
|
|
85
85
|
*/
|
|
@@ -5,8 +5,8 @@ class PrimaryNetworkVerticesService {
|
|
|
5
5
|
listLatestXChainVertices({
|
|
6
6
|
blockchainId,
|
|
7
7
|
network,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
pageToken,
|
|
9
|
+
pageSize = 10
|
|
10
10
|
}) {
|
|
11
11
|
return this.httpRequest.request({
|
|
12
12
|
method: "GET",
|
|
@@ -16,8 +16,8 @@ class PrimaryNetworkVerticesService {
|
|
|
16
16
|
"network": network
|
|
17
17
|
},
|
|
18
18
|
query: {
|
|
19
|
-
"
|
|
20
|
-
"
|
|
19
|
+
"pageToken": pageToken,
|
|
20
|
+
"pageSize": pageSize
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -40,8 +40,8 @@ class PrimaryNetworkVerticesService {
|
|
|
40
40
|
vertexHeight,
|
|
41
41
|
blockchainId,
|
|
42
42
|
network,
|
|
43
|
-
pageSize = 10,
|
|
44
43
|
pageToken,
|
|
44
|
+
pageSize = 10,
|
|
45
45
|
sortOrder
|
|
46
46
|
}) {
|
|
47
47
|
return this.httpRequest.request({
|
|
@@ -53,8 +53,8 @@ class PrimaryNetworkVerticesService {
|
|
|
53
53
|
},
|
|
54
54
|
query: {
|
|
55
55
|
"vertexHeight": vertexHeight,
|
|
56
|
-
"pageSize": pageSize,
|
|
57
56
|
"pageToken": pageToken,
|
|
57
|
+
"pageSize": pageSize,
|
|
58
58
|
"sortOrder": sortOrder
|
|
59
59
|
}
|
|
60
60
|
});
|
|
@@ -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 };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DeliveredSourceNotIndexedTeleporterMessage } from '../models/DeliveredSourceNotIndexedTeleporterMessage.js';
|
|
2
2
|
import { DeliveredTeleporterMessage } from '../models/DeliveredTeleporterMessage.js';
|
|
3
|
-
import {
|
|
3
|
+
import { ListTeleporterMessagesResponse } from '../models/ListTeleporterMessagesResponse.js';
|
|
4
|
+
import { NetworkType } from '../models/NetworkType.js';
|
|
4
5
|
import { PendingTeleporterMessage } from '../models/PendingTeleporterMessage.js';
|
|
5
6
|
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
6
7
|
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
@@ -10,56 +11,52 @@ declare class TeleporterService {
|
|
|
10
11
|
constructor(httpRequest: BaseHttpRequest);
|
|
11
12
|
/**
|
|
12
13
|
* Get a teleporter message
|
|
13
|
-
* Gets a teleporter message by
|
|
14
|
+
* Gets a teleporter message by message ID.
|
|
14
15
|
* @returns any
|
|
15
16
|
* @throws ApiError
|
|
16
17
|
*/
|
|
17
|
-
getTeleporterMessage({
|
|
18
|
-
/**
|
|
19
|
-
* The base58 encoded blockchain ID of the source chain that the teleporter message was sent from.
|
|
20
|
-
*/
|
|
21
|
-
sourceBlockchainId: any;
|
|
22
|
-
/**
|
|
23
|
-
* The base58 encoded blockchain ID of the destination chain that the teleporter message was sent to.
|
|
24
|
-
*/
|
|
25
|
-
destinationBlockchainId: any;
|
|
18
|
+
getTeleporterMessage({ messageId, }: {
|
|
26
19
|
/**
|
|
27
20
|
* The message ID of the teleporter message.
|
|
28
21
|
*/
|
|
29
|
-
messageId:
|
|
22
|
+
messageId: string;
|
|
30
23
|
}): CancelablePromise<(PendingTeleporterMessage | DeliveredTeleporterMessage | DeliveredSourceNotIndexedTeleporterMessage)>;
|
|
31
24
|
/**
|
|
32
25
|
* List teleporter messages
|
|
33
26
|
* Lists teleporter messages. Ordered by timestamp in descending order.
|
|
34
|
-
* @returns
|
|
27
|
+
* @returns ListTeleporterMessagesResponse
|
|
35
28
|
* @throws ApiError
|
|
36
29
|
*/
|
|
37
|
-
listTeleporterMessages({
|
|
38
|
-
/**
|
|
39
|
-
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
40
|
-
*/
|
|
41
|
-
pageSize?: number;
|
|
30
|
+
listTeleporterMessages({ pageToken, pageSize, sourceBlockchainId, destinationBlockchainId, to, from, network, }: {
|
|
42
31
|
/**
|
|
43
32
|
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
44
33
|
*/
|
|
45
34
|
pageToken?: string;
|
|
46
35
|
/**
|
|
47
|
-
* The
|
|
36
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
48
37
|
*/
|
|
49
|
-
|
|
38
|
+
pageSize?: number;
|
|
50
39
|
/**
|
|
51
|
-
* The base58 encoded blockchain ID of the
|
|
40
|
+
* The base58 encoded blockchain ID or evm chain ID of the source chain that the teleporter message was sent from.
|
|
52
41
|
*/
|
|
53
|
-
|
|
42
|
+
sourceBlockchainId?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The base58 encoded blockchain ID or evm chain ID of the destination chain that the teleporter message was sent to.
|
|
45
|
+
*/
|
|
46
|
+
destinationBlockchainId?: string;
|
|
54
47
|
/**
|
|
55
48
|
* The address of the recipient of the teleporter message.
|
|
56
49
|
*/
|
|
57
|
-
to?:
|
|
50
|
+
to?: string;
|
|
58
51
|
/**
|
|
59
52
|
* The address of the sender of the teleporter message.
|
|
60
53
|
*/
|
|
61
|
-
from?:
|
|
62
|
-
|
|
54
|
+
from?: string;
|
|
55
|
+
/**
|
|
56
|
+
* mainnet or testnet.
|
|
57
|
+
*/
|
|
58
|
+
network?: NetworkType;
|
|
59
|
+
}): CancelablePromise<ListTeleporterMessagesResponse>;
|
|
63
60
|
}
|
|
64
61
|
|
|
65
62
|
export { TeleporterService };
|
|
@@ -3,38 +3,36 @@ class TeleporterService {
|
|
|
3
3
|
this.httpRequest = httpRequest;
|
|
4
4
|
}
|
|
5
5
|
getTeleporterMessage({
|
|
6
|
-
sourceBlockchainId,
|
|
7
|
-
destinationBlockchainId,
|
|
8
6
|
messageId
|
|
9
7
|
}) {
|
|
10
8
|
return this.httpRequest.request({
|
|
11
9
|
method: "GET",
|
|
12
|
-
url: "/v1/teleporter/messages
|
|
13
|
-
|
|
14
|
-
"sourceBlockchainId": sourceBlockchainId,
|
|
15
|
-
"destinationBlockchainId": destinationBlockchainId,
|
|
10
|
+
url: "/v1/teleporter/messages/{messageId}",
|
|
11
|
+
path: {
|
|
16
12
|
"messageId": messageId
|
|
17
13
|
}
|
|
18
14
|
});
|
|
19
15
|
}
|
|
20
16
|
listTeleporterMessages({
|
|
21
|
-
pageSize = 10,
|
|
22
17
|
pageToken,
|
|
18
|
+
pageSize = 10,
|
|
23
19
|
sourceBlockchainId,
|
|
24
20
|
destinationBlockchainId,
|
|
25
21
|
to,
|
|
26
|
-
from
|
|
22
|
+
from,
|
|
23
|
+
network
|
|
27
24
|
}) {
|
|
28
25
|
return this.httpRequest.request({
|
|
29
26
|
method: "GET",
|
|
30
27
|
url: "/v1/teleporter/messages",
|
|
31
28
|
query: {
|
|
32
|
-
"pageSize": pageSize,
|
|
33
29
|
"pageToken": pageToken,
|
|
30
|
+
"pageSize": pageSize,
|
|
34
31
|
"sourceBlockchainId": sourceBlockchainId,
|
|
35
32
|
"destinationBlockchainId": destinationBlockchainId,
|
|
36
33
|
"to": to,
|
|
37
|
-
"from": from
|
|
34
|
+
"from": from,
|
|
35
|
+
"network": network
|
|
38
36
|
}
|
|
39
37
|
});
|
|
40
38
|
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { AddressesChangeRequest } from '../models/AddressesChangeRequest.js';
|
|
2
|
+
import { ListWebhookAddressesResponse } from '../models/ListWebhookAddressesResponse.js';
|
|
3
|
+
import { ListWebhooksResponse } from '../models/ListWebhooksResponse.js';
|
|
4
|
+
import { RegisterWebhookRequest } from '../models/RegisterWebhookRequest.js';
|
|
5
|
+
import { SharedSecretsResponse } from '../models/SharedSecretsResponse.js';
|
|
6
|
+
import { UpdateWebhookRequest } from '../models/UpdateWebhookRequest.js';
|
|
7
|
+
import { WebhookResponse } from '../models/WebhookResponse.js';
|
|
8
|
+
import { WebhookStatus } from '../models/WebhookStatus.js';
|
|
9
|
+
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
10
|
+
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
11
|
+
|
|
12
|
+
declare class WebhooksService {
|
|
13
|
+
readonly httpRequest: BaseHttpRequest;
|
|
14
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
15
|
+
/**
|
|
16
|
+
* Create a webhook
|
|
17
|
+
* Create a new webhook.
|
|
18
|
+
* @returns WebhookResponse
|
|
19
|
+
* @throws ApiError
|
|
20
|
+
*/
|
|
21
|
+
registerWebhook({ requestBody, }: {
|
|
22
|
+
requestBody: RegisterWebhookRequest;
|
|
23
|
+
}): CancelablePromise<WebhookResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* List webhooks
|
|
26
|
+
* Lists webhooks for the user.
|
|
27
|
+
* @returns ListWebhooksResponse
|
|
28
|
+
* @throws ApiError
|
|
29
|
+
*/
|
|
30
|
+
listWebhooks({ pageToken, pageSize, status, }: {
|
|
31
|
+
/**
|
|
32
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
33
|
+
*/
|
|
34
|
+
pageToken?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
37
|
+
*/
|
|
38
|
+
pageSize?: number;
|
|
39
|
+
/**
|
|
40
|
+
* 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.
|
|
41
|
+
*/
|
|
42
|
+
status?: WebhookStatus;
|
|
43
|
+
}): CancelablePromise<ListWebhooksResponse>;
|
|
44
|
+
/**
|
|
45
|
+
* Get a webhook by ID
|
|
46
|
+
* Retrieves a webhook by ID.
|
|
47
|
+
* @returns WebhookResponse
|
|
48
|
+
* @throws ApiError
|
|
49
|
+
*/
|
|
50
|
+
getWebhook({ id, }: {
|
|
51
|
+
/**
|
|
52
|
+
* The webhook identifier.
|
|
53
|
+
*/
|
|
54
|
+
id: string;
|
|
55
|
+
}): CancelablePromise<WebhookResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* Deactivate a webhook
|
|
58
|
+
* Deactivates a webhook by ID.
|
|
59
|
+
* @returns WebhookResponse
|
|
60
|
+
* @throws ApiError
|
|
61
|
+
*/
|
|
62
|
+
deactivateWebhook({ id, }: {
|
|
63
|
+
/**
|
|
64
|
+
* The webhook identifier.
|
|
65
|
+
*/
|
|
66
|
+
id: string;
|
|
67
|
+
}): CancelablePromise<WebhookResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Update a webhook
|
|
70
|
+
* Updates an existing webhook.
|
|
71
|
+
* @returns WebhookResponse
|
|
72
|
+
* @throws ApiError
|
|
73
|
+
*/
|
|
74
|
+
updateWebhook({ id, requestBody, }: {
|
|
75
|
+
/**
|
|
76
|
+
* The webhook identifier.
|
|
77
|
+
*/
|
|
78
|
+
id: string;
|
|
79
|
+
requestBody: UpdateWebhookRequest;
|
|
80
|
+
}): CancelablePromise<WebhookResponse>;
|
|
81
|
+
/**
|
|
82
|
+
* Generate a shared secret
|
|
83
|
+
* Generates a new shared secret.
|
|
84
|
+
* @returns SharedSecretsResponse
|
|
85
|
+
* @throws ApiError
|
|
86
|
+
*/
|
|
87
|
+
generateSharedSecret(): CancelablePromise<SharedSecretsResponse>;
|
|
88
|
+
/**
|
|
89
|
+
* Get a shared secret
|
|
90
|
+
* Get a previously generated shared secret.
|
|
91
|
+
* @returns SharedSecretsResponse
|
|
92
|
+
* @throws ApiError
|
|
93
|
+
*/
|
|
94
|
+
getSharedSecret(): CancelablePromise<SharedSecretsResponse>;
|
|
95
|
+
/**
|
|
96
|
+
* Add addresses to webhook
|
|
97
|
+
* Add addresses to webhook.
|
|
98
|
+
* @returns WebhookResponse
|
|
99
|
+
* @throws ApiError
|
|
100
|
+
*/
|
|
101
|
+
addAddressesToWebhook({ id, requestBody, }: {
|
|
102
|
+
/**
|
|
103
|
+
* The webhook identifier.
|
|
104
|
+
*/
|
|
105
|
+
id: string;
|
|
106
|
+
requestBody: AddressesChangeRequest;
|
|
107
|
+
}): CancelablePromise<WebhookResponse>;
|
|
108
|
+
/**
|
|
109
|
+
* Remove addresses from webhook
|
|
110
|
+
* Remove addresses from webhook.
|
|
111
|
+
* @returns WebhookResponse
|
|
112
|
+
* @throws ApiError
|
|
113
|
+
*/
|
|
114
|
+
removeAddressesFromWebhook({ id, requestBody, }: {
|
|
115
|
+
/**
|
|
116
|
+
* The webhook identifier.
|
|
117
|
+
*/
|
|
118
|
+
id: string;
|
|
119
|
+
requestBody: AddressesChangeRequest;
|
|
120
|
+
}): CancelablePromise<WebhookResponse>;
|
|
121
|
+
/**
|
|
122
|
+
* List adresses by webhook
|
|
123
|
+
* List adresses by webhook.
|
|
124
|
+
* @returns ListWebhookAddressesResponse
|
|
125
|
+
* @throws ApiError
|
|
126
|
+
*/
|
|
127
|
+
getAddressesFromWebhook({ id, pageToken, pageSize, }: {
|
|
128
|
+
/**
|
|
129
|
+
* The webhook identifier.
|
|
130
|
+
*/
|
|
131
|
+
id: string;
|
|
132
|
+
/**
|
|
133
|
+
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
134
|
+
*/
|
|
135
|
+
pageToken?: string;
|
|
136
|
+
/**
|
|
137
|
+
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
138
|
+
*/
|
|
139
|
+
pageSize?: number;
|
|
140
|
+
}): CancelablePromise<ListWebhookAddressesResponse>;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export { WebhooksService };
|
|
@@ -0,0 +1,125 @@
|
|
|
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",
|
|
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
|
+
}
|
|
106
|
+
getAddressesFromWebhook({
|
|
107
|
+
id,
|
|
108
|
+
pageToken,
|
|
109
|
+
pageSize = 10
|
|
110
|
+
}) {
|
|
111
|
+
return this.httpRequest.request({
|
|
112
|
+
method: "GET",
|
|
113
|
+
url: "/v1/webhooks/{id}/addresses",
|
|
114
|
+
path: {
|
|
115
|
+
"id": id
|
|
116
|
+
},
|
|
117
|
+
query: {
|
|
118
|
+
"pageToken": pageToken,
|
|
119
|
+
"pageSize": pageSize
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export { WebhooksService };
|
package/esm/index.d.ts
CHANGED
|
@@ -6,12 +6,15 @@ 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';
|
|
13
15
|
export { BlockchainIds } from './generated/models/BlockchainIds.js';
|
|
14
16
|
export { BlockchainInfo } from './generated/models/BlockchainInfo.js';
|
|
17
|
+
export { BlsCredentials } from './generated/models/BlsCredentials.js';
|
|
15
18
|
export { CChainAtomicBalances } from './generated/models/CChainAtomicBalances.js';
|
|
16
19
|
export { CChainExportTransaction } from './generated/models/CChainExportTransaction.js';
|
|
17
20
|
export { CChainImportTransaction } from './generated/models/CChainImportTransaction.js';
|
|
@@ -56,6 +59,7 @@ export { EventType } from './generated/models/EventType.js';
|
|
|
56
59
|
export { EvmBlock } from './generated/models/EvmBlock.js';
|
|
57
60
|
export { EVMInput } from './generated/models/EVMInput.js';
|
|
58
61
|
export { EvmNetworkOptions } from './generated/models/EvmNetworkOptions.js';
|
|
62
|
+
export { EVMOperationType } from './generated/models/EVMOperationType.js';
|
|
59
63
|
export { EVMOutput } from './generated/models/EVMOutput.js';
|
|
60
64
|
export { FullNativeTransactionDetails } from './generated/models/FullNativeTransactionDetails.js';
|
|
61
65
|
export { GetChainResponse } from './generated/models/GetChainResponse.js';
|
|
@@ -64,6 +68,7 @@ export { GetNativeBalanceResponse } from './generated/models/GetNativeBalanceRes
|
|
|
64
68
|
export { GetNetworkDetailsResponse } from './generated/models/GetNetworkDetailsResponse.js';
|
|
65
69
|
export { GetPrimaryNetworkBlockResponse } from './generated/models/GetPrimaryNetworkBlockResponse.js';
|
|
66
70
|
export { GetTransactionResponse } from './generated/models/GetTransactionResponse.js';
|
|
71
|
+
export { GlacierApiFeature } from './generated/models/GlacierApiFeature.js';
|
|
67
72
|
export { HistoricalReward } from './generated/models/HistoricalReward.js';
|
|
68
73
|
export { ImageAsset } from './generated/models/ImageAsset.js';
|
|
69
74
|
export { InternalTransaction } from './generated/models/InternalTransaction.js';
|
|
@@ -93,10 +98,12 @@ export { ListPChainUtxosResponse } from './generated/models/ListPChainUtxosRespo
|
|
|
93
98
|
export { ListPendingRewardsResponse } from './generated/models/ListPendingRewardsResponse.js';
|
|
94
99
|
export { ListPrimaryNetworkBlocksResponse } from './generated/models/ListPrimaryNetworkBlocksResponse.js';
|
|
95
100
|
export { ListSubnetsResponse } from './generated/models/ListSubnetsResponse.js';
|
|
101
|
+
export { ListTeleporterMessagesResponse } from './generated/models/ListTeleporterMessagesResponse.js';
|
|
96
102
|
export { ListTransactionDetailsResponse } from './generated/models/ListTransactionDetailsResponse.js';
|
|
97
103
|
export { ListTransfersResponse } from './generated/models/ListTransfersResponse.js';
|
|
98
104
|
export { ListUtxosResponse } from './generated/models/ListUtxosResponse.js';
|
|
99
105
|
export { ListValidatorDetailsResponse } from './generated/models/ListValidatorDetailsResponse.js';
|
|
106
|
+
export { ListWebhookAddressesResponse } from './generated/models/ListWebhookAddressesResponse.js';
|
|
100
107
|
export { ListWebhooksResponse } from './generated/models/ListWebhooksResponse.js';
|
|
101
108
|
export { ListXChainBalancesResponse } from './generated/models/ListXChainBalancesResponse.js';
|
|
102
109
|
export { ListXChainTransactionsResponse } from './generated/models/ListXChainTransactionsResponse.js';
|
|
@@ -127,9 +134,12 @@ export { PendingTeleporterMessage } from './generated/models/PendingTeleporterMe
|
|
|
127
134
|
export { PendingValidatorDetails } from './generated/models/PendingValidatorDetails.js';
|
|
128
135
|
export { PricingProviders } from './generated/models/PricingProviders.js';
|
|
129
136
|
export { PrimaryNetwork } from './generated/models/PrimaryNetwork.js';
|
|
137
|
+
export { PrimaryNetworkAssetCap } from './generated/models/PrimaryNetworkAssetCap.js';
|
|
138
|
+
export { PrimaryNetworkAssetType } from './generated/models/PrimaryNetworkAssetType.js';
|
|
130
139
|
export { PrimaryNetworkBlock } from './generated/models/PrimaryNetworkBlock.js';
|
|
131
140
|
export { PrimaryNetworkChainInfo } from './generated/models/PrimaryNetworkChainInfo.js';
|
|
132
141
|
export { PrimaryNetworkChainName } from './generated/models/PrimaryNetworkChainName.js';
|
|
142
|
+
export { PrimaryNetworkOperationType } from './generated/models/PrimaryNetworkOperationType.js';
|
|
133
143
|
export { PrimaryNetworkOptions } from './generated/models/PrimaryNetworkOptions.js';
|
|
134
144
|
export { PrimaryNetworkTxType } from './generated/models/PrimaryNetworkTxType.js';
|
|
135
145
|
export { ProposerDetails } from './generated/models/ProposerDetails.js';
|
|
@@ -140,11 +150,18 @@ export { ResourceLinkType } from './generated/models/ResourceLinkType.js';
|
|
|
140
150
|
export { Rewards } from './generated/models/Rewards.js';
|
|
141
151
|
export { RewardType } from './generated/models/RewardType.js';
|
|
142
152
|
export { RichAddress } from './generated/models/RichAddress.js';
|
|
153
|
+
export { RpcErrorDto } from './generated/models/RpcErrorDto.js';
|
|
154
|
+
export { RpcErrorResponseDto } from './generated/models/RpcErrorResponseDto.js';
|
|
155
|
+
export { RpcRequestBodyDto } from './generated/models/RpcRequestBodyDto.js';
|
|
156
|
+
export { RpcSuccessResponseDto } from './generated/models/RpcSuccessResponseDto.js';
|
|
143
157
|
export { SharedSecretsResponse } from './generated/models/SharedSecretsResponse.js';
|
|
158
|
+
export { SortByOption } from './generated/models/SortByOption.js';
|
|
144
159
|
export { SortOrder } from './generated/models/SortOrder.js';
|
|
145
160
|
export { StakingDistribution } from './generated/models/StakingDistribution.js';
|
|
146
161
|
export { Subnet } from './generated/models/Subnet.js';
|
|
162
|
+
export { SubnetOwnershipInfo } from './generated/models/SubnetOwnershipInfo.js';
|
|
147
163
|
export { TeleporterDestinationTransaction } from './generated/models/TeleporterDestinationTransaction.js';
|
|
164
|
+
export { TeleporterReceipt } from './generated/models/TeleporterReceipt.js';
|
|
148
165
|
export { TeleporterRewardDetails } from './generated/models/TeleporterRewardDetails.js';
|
|
149
166
|
export { TeleporterSourceTransaction } from './generated/models/TeleporterSourceTransaction.js';
|
|
150
167
|
export { TransactionDetails } from './generated/models/TransactionDetails.js';
|
|
@@ -154,6 +171,7 @@ export { TransactionStatus } from './generated/models/TransactionStatus.js';
|
|
|
154
171
|
export { TransactionVertexDetail } from './generated/models/TransactionVertexDetail.js';
|
|
155
172
|
export { UnknownContract } from './generated/models/UnknownContract.js';
|
|
156
173
|
export { UpdateContractResponse } from './generated/models/UpdateContractResponse.js';
|
|
174
|
+
export { UpdateWebhookRequest } from './generated/models/UpdateWebhookRequest.js';
|
|
157
175
|
export { UtilityAddresses } from './generated/models/UtilityAddresses.js';
|
|
158
176
|
export { Utxo } from './generated/models/Utxo.js';
|
|
159
177
|
export { UtxoCredential } from './generated/models/UtxoCredential.js';
|
|
@@ -165,7 +183,6 @@ export { VmName } from './generated/models/VmName.js';
|
|
|
165
183
|
export { WebhookResponse } from './generated/models/WebhookResponse.js';
|
|
166
184
|
export { WebhookStatus } from './generated/models/WebhookStatus.js';
|
|
167
185
|
export { WebhookStatusType } from './generated/models/WebhookStatusType.js';
|
|
168
|
-
export { XChainAssetBalance } from './generated/models/XChainAssetBalance.js';
|
|
169
186
|
export { XChainAssetDetails } from './generated/models/XChainAssetDetails.js';
|
|
170
187
|
export { XChainBalances } from './generated/models/XChainBalances.js';
|
|
171
188
|
export { XChainId } from './generated/models/XChainId.js';
|
|
@@ -190,4 +207,6 @@ export { PrimaryNetworkRewardsService } from './generated/services/PrimaryNetwor
|
|
|
190
207
|
export { PrimaryNetworkTransactionsService } from './generated/services/PrimaryNetworkTransactionsService.js';
|
|
191
208
|
export { PrimaryNetworkUtxOsService } from './generated/services/PrimaryNetworkUtxOsService.js';
|
|
192
209
|
export { PrimaryNetworkVerticesService } from './generated/services/PrimaryNetworkVerticesService.js';
|
|
210
|
+
export { RpcService } from './generated/services/RpcService.js';
|
|
193
211
|
export { TeleporterService } from './generated/services/TeleporterService.js';
|
|
212
|
+
export { WebhooksService } from './generated/services/WebhooksService.js';
|