@avalabs/glacier-sdk 2.8.0-canary.d5ec74d.0 → 2.8.0-canary.dbdabf5.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 +501 -240
- package/dist/index.js +183 -61
- package/esm/generated/Glacier.d.ts +4 -0
- package/esm/generated/Glacier.js +6 -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 +5 -0
- package/esm/generated/models/GlacierApiFeature.js +6 -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/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/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 -53
- package/esm/generated/services/DefaultService.js +0 -42
- 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/TeleporterService.d.ts +57 -0
- package/esm/generated/services/TeleporterService.js +39 -0
- package/esm/generated/services/WebhooksService.d.ts +95 -0
- package/esm/generated/services/WebhooksService.js +80 -0
- package/esm/index.d.ts +17 -2
- package/esm/index.js +9 -2
- package/package.json +2 -2
- package/esm/generated/models/CreateEvmTransactionExportRequest.js +0 -8
- package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.js +0 -8
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The contract call type. NATIVE_TRANSFER indicates a transfer of the native token without any smart-contract interaction. CONTRACT_CALL indicates a smart-contract interaction. CONTRACT_CREATION indicates a smart-contract creation.
|
|
3
|
+
*/
|
|
1
4
|
declare enum TransactionMethodType {
|
|
2
5
|
NATIVE_TRANSFER = "NATIVE_TRANSFER",
|
|
3
6
|
CONTRACT_CALL = "CONTRACT_CALL",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WebhookStatusType } from './WebhookStatusType.js';
|
|
2
|
+
|
|
3
|
+
type UpdateWebhookRequest = {
|
|
4
|
+
name?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
status?: WebhookStatusType;
|
|
8
|
+
includeTraces?: boolean;
|
|
9
|
+
includeLogs?: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { UpdateWebhookRequest };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AssetAmount } from './AssetAmount.js';
|
|
2
2
|
import { UtxoCredential } from './UtxoCredential.js';
|
|
3
3
|
|
|
4
4
|
type Utxo = {
|
|
@@ -6,7 +6,7 @@ type Utxo = {
|
|
|
6
6
|
* Addresses that are eligible to sign the consumption of this output.
|
|
7
7
|
*/
|
|
8
8
|
addresses: Array<string>;
|
|
9
|
-
asset:
|
|
9
|
+
asset: AssetAmount;
|
|
10
10
|
/**
|
|
11
11
|
* Blockchain ID on which this output is consumed on.
|
|
12
12
|
*/
|
|
@@ -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;
|
|
@@ -18,17 +18,11 @@ type XChainAssetDetails = {
|
|
|
18
18
|
* Denomination of this asset to represent fungibility.
|
|
19
19
|
*/
|
|
20
20
|
denomination: number;
|
|
21
|
-
/**
|
|
22
|
-
* Type of asset like SECP256K1 or NFT.
|
|
23
|
-
*/
|
|
24
21
|
type: PrimaryNetworkAssetType;
|
|
25
22
|
/**
|
|
26
23
|
* Timestamp in seconds this asset was created on.
|
|
27
24
|
*/
|
|
28
25
|
createdAtTimestamp: number;
|
|
29
|
-
/**
|
|
30
|
-
* Cap represents if an asset is a variable or fixed cap asset.
|
|
31
|
-
*/
|
|
32
26
|
cap: PrimaryNetworkAssetCap;
|
|
33
27
|
};
|
|
34
28
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AggregatedAssetAmount } from './AggregatedAssetAmount.js';
|
|
2
2
|
import { XChainSharedAssetBalance } from './XChainSharedAssetBalance.js';
|
|
3
3
|
|
|
4
4
|
type XChainBalances = {
|
|
5
5
|
/**
|
|
6
6
|
* A list of objects containing X-chain Asset balance information.
|
|
7
7
|
*/
|
|
8
|
-
locked: Array<
|
|
8
|
+
locked: Array<AggregatedAssetAmount>;
|
|
9
9
|
/**
|
|
10
10
|
* A list of objects containing X-chain Asset balance information.
|
|
11
11
|
*/
|
|
12
|
-
unlocked: Array<
|
|
12
|
+
unlocked: Array<AggregatedAssetAmount>;
|
|
13
13
|
atomicMemoryUnlocked: Array<XChainSharedAssetBalance>;
|
|
14
14
|
atomicMemoryLocked: Array<XChainSharedAssetBalance>;
|
|
15
15
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AssetAmount } from './AssetAmount.js';
|
|
2
2
|
import { Utxo } from './Utxo.js';
|
|
3
3
|
import { XChainAssetDetails } from './XChainAssetDetails.js';
|
|
4
4
|
import { XChainTransactionType } from './XChainTransactionType.js';
|
|
@@ -16,9 +16,6 @@ type XChainLinearTransaction = {
|
|
|
16
16
|
* Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices.
|
|
17
17
|
*/
|
|
18
18
|
timestamp: number;
|
|
19
|
-
/**
|
|
20
|
-
* Type of transaction.
|
|
21
|
-
*/
|
|
22
19
|
txType: XChainTransactionType;
|
|
23
20
|
/**
|
|
24
21
|
* Hex encoded memo bytes for this transaction.
|
|
@@ -29,11 +26,11 @@ type XChainLinearTransaction = {
|
|
|
29
26
|
/**
|
|
30
27
|
* Assets unlocked by inputs of this transaction.
|
|
31
28
|
*/
|
|
32
|
-
amountUnlocked: Array<
|
|
29
|
+
amountUnlocked: Array<AssetAmount>;
|
|
33
30
|
/**
|
|
34
31
|
* Assets created by outputs of this transaction.
|
|
35
32
|
*/
|
|
36
|
-
amountCreated: Array<
|
|
33
|
+
amountCreated: Array<AssetAmount>;
|
|
37
34
|
/**
|
|
38
35
|
* Source chain for an atomic transaction.
|
|
39
36
|
*/
|
|
@@ -43,7 +40,7 @@ type XChainLinearTransaction = {
|
|
|
43
40
|
*/
|
|
44
41
|
destinationChain?: string;
|
|
45
42
|
/**
|
|
46
|
-
*
|
|
43
|
+
* AssetAmount details of the asset created in CreateAssetTx
|
|
47
44
|
*/
|
|
48
45
|
assetCreated?: XChainAssetDetails;
|
|
49
46
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AssetAmount } from './AssetAmount.js';
|
|
2
2
|
import { TransactionVertexDetail } from './TransactionVertexDetail.js';
|
|
3
3
|
import { Utxo } from './Utxo.js';
|
|
4
4
|
import { XChainAssetDetails } from './XChainAssetDetails.js';
|
|
@@ -17,9 +17,6 @@ type XChainNonLinearTransaction = {
|
|
|
17
17
|
* Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices.
|
|
18
18
|
*/
|
|
19
19
|
timestamp: number;
|
|
20
|
-
/**
|
|
21
|
-
* Type of transaction.
|
|
22
|
-
*/
|
|
23
20
|
txType: XChainTransactionType;
|
|
24
21
|
/**
|
|
25
22
|
* Hex encoded memo bytes for this transaction.
|
|
@@ -30,11 +27,11 @@ type XChainNonLinearTransaction = {
|
|
|
30
27
|
/**
|
|
31
28
|
* Assets unlocked by inputs of this transaction.
|
|
32
29
|
*/
|
|
33
|
-
amountUnlocked: Array<
|
|
30
|
+
amountUnlocked: Array<AssetAmount>;
|
|
34
31
|
/**
|
|
35
32
|
* Assets created by outputs of this transaction.
|
|
36
33
|
*/
|
|
37
|
-
amountCreated: Array<
|
|
34
|
+
amountCreated: Array<AssetAmount>;
|
|
38
35
|
/**
|
|
39
36
|
* Source chain for an atomic transaction.
|
|
40
37
|
*/
|
|
@@ -44,7 +41,7 @@ type XChainNonLinearTransaction = {
|
|
|
44
41
|
*/
|
|
45
42
|
destinationChain?: string;
|
|
46
43
|
/**
|
|
47
|
-
*
|
|
44
|
+
* AssetAmount details of the asset created in CreateAssetTx
|
|
48
45
|
*/
|
|
49
46
|
assetCreated?: XChainAssetDetails;
|
|
50
47
|
/**
|
|
@@ -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,54 +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
12
|
}
|
|
66
13
|
|
|
67
14
|
export { DefaultService };
|
|
@@ -8,48 +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:generateSharedSecret"
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
11
|
}
|
|
54
12
|
|
|
55
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,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,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 };
|