@avalabs/glacier-sdk 2.8.0-canary.fe6d2a3.0 → 2.8.0-canary.fedc8b0.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 +671 -272
- package/dist/index.js +320 -109
- 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 +29 -0
- package/esm/generated/models/DeliveredSourceNotIndexedTeleporterMessage.js +8 -0
- package/esm/generated/models/DeliveredTeleporterMessage.d.ts +31 -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/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/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 +29 -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/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/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/EvmBalancesService.d.ts +5 -1
- package/esm/generated/services/EvmBalancesService.js +2 -0
- package/esm/generated/services/EvmChainsService.d.ts +6 -1
- package/esm/generated/services/EvmChainsService.js +4 -2
- package/esm/generated/services/PrimaryNetworkService.d.ts +24 -9
- package/esm/generated/services/PrimaryNetworkService.js +11 -5
- package/esm/generated/services/RpcService.d.ts +25 -0
- package/esm/generated/services/RpcService.js +24 -0
- package/esm/generated/services/TeleporterService.d.ts +62 -0
- package/esm/generated/services/TeleporterService.js +41 -0
- package/esm/generated/services/WebhooksService.d.ts +143 -0
- package/esm/generated/services/WebhooksService.js +125 -0
- package/esm/index.d.ts +26 -2
- package/esm/index.js +11 -2
- package/package.json +3 -3
- package/esm/generated/models/CreateEvmTransactionExportRequest.js +0 -8
- package/esm/generated/models/CreatePrimaryNetworkTransactionExportRequest.js +0 -8
package/esm/generated/Glacier.js
CHANGED
|
@@ -15,6 +15,9 @@ import { PrimaryNetworkRewardsService } from './services/PrimaryNetworkRewardsSe
|
|
|
15
15
|
import { PrimaryNetworkTransactionsService } from './services/PrimaryNetworkTransactionsService.js';
|
|
16
16
|
import { PrimaryNetworkUtxOsService } from './services/PrimaryNetworkUtxOsService.js';
|
|
17
17
|
import { PrimaryNetworkVerticesService } from './services/PrimaryNetworkVerticesService.js';
|
|
18
|
+
import { RpcService } from './services/RpcService.js';
|
|
19
|
+
import { TeleporterService } from './services/TeleporterService.js';
|
|
20
|
+
import { WebhooksService } from './services/WebhooksService.js';
|
|
18
21
|
|
|
19
22
|
class Glacier {
|
|
20
23
|
default;
|
|
@@ -33,6 +36,9 @@ class Glacier {
|
|
|
33
36
|
primaryNetworkTransactions;
|
|
34
37
|
primaryNetworkUtxOs;
|
|
35
38
|
primaryNetworkVertices;
|
|
39
|
+
rpc;
|
|
40
|
+
teleporter;
|
|
41
|
+
webhooks;
|
|
36
42
|
request;
|
|
37
43
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
38
44
|
this.request = new HttpRequest({
|
|
@@ -62,6 +68,9 @@ class Glacier {
|
|
|
62
68
|
this.primaryNetworkTransactions = new PrimaryNetworkTransactionsService(this.request);
|
|
63
69
|
this.primaryNetworkUtxOs = new PrimaryNetworkUtxOsService(this.request);
|
|
64
70
|
this.primaryNetworkVertices = new PrimaryNetworkVerticesService(this.request);
|
|
71
|
+
this.rpc = new RpcService(this.request);
|
|
72
|
+
this.teleporter = new TeleporterService(this.request);
|
|
73
|
+
this.webhooks = new WebhooksService(this.request);
|
|
65
74
|
}
|
|
66
75
|
}
|
|
67
76
|
|
|
@@ -9,15 +9,9 @@ interface OnCancel {
|
|
|
9
9
|
(cancelHandler: () => void): void;
|
|
10
10
|
}
|
|
11
11
|
declare class CancelablePromise<T> implements Promise<T> {
|
|
12
|
-
|
|
13
|
-
private _isResolved;
|
|
14
|
-
private _isRejected;
|
|
15
|
-
private _isCancelled;
|
|
16
|
-
private readonly _cancelHandlers;
|
|
17
|
-
private readonly _promise;
|
|
18
|
-
private _resolve?;
|
|
19
|
-
private _reject?;
|
|
12
|
+
#private;
|
|
20
13
|
constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
|
|
14
|
+
get [Symbol.toStringTag](): string;
|
|
21
15
|
then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
22
16
|
catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
|
|
23
17
|
finally(onFinally?: (() => void) | null): Promise<T>;
|
|
@@ -8,71 +8,73 @@ class CancelError extends Error {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
class CancelablePromise {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
_reject;
|
|
11
|
+
#isResolved;
|
|
12
|
+
#isRejected;
|
|
13
|
+
#isCancelled;
|
|
14
|
+
#cancelHandlers;
|
|
15
|
+
#promise;
|
|
16
|
+
#resolve;
|
|
17
|
+
#reject;
|
|
19
18
|
constructor(executor) {
|
|
20
|
-
this
|
|
21
|
-
this
|
|
22
|
-
this
|
|
23
|
-
this
|
|
24
|
-
this
|
|
25
|
-
this
|
|
26
|
-
this
|
|
19
|
+
this.#isResolved = false;
|
|
20
|
+
this.#isRejected = false;
|
|
21
|
+
this.#isCancelled = false;
|
|
22
|
+
this.#cancelHandlers = [];
|
|
23
|
+
this.#promise = new Promise((resolve, reject) => {
|
|
24
|
+
this.#resolve = resolve;
|
|
25
|
+
this.#reject = reject;
|
|
27
26
|
const onResolve = (value) => {
|
|
28
|
-
if (this
|
|
27
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
29
28
|
return;
|
|
30
29
|
}
|
|
31
|
-
this
|
|
32
|
-
this
|
|
30
|
+
this.#isResolved = true;
|
|
31
|
+
this.#resolve?.(value);
|
|
33
32
|
};
|
|
34
33
|
const onReject = (reason) => {
|
|
35
|
-
if (this
|
|
34
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
36
35
|
return;
|
|
37
36
|
}
|
|
38
|
-
this
|
|
39
|
-
this
|
|
37
|
+
this.#isRejected = true;
|
|
38
|
+
this.#reject?.(reason);
|
|
40
39
|
};
|
|
41
40
|
const onCancel = (cancelHandler) => {
|
|
42
|
-
if (this
|
|
41
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
43
42
|
return;
|
|
44
43
|
}
|
|
45
|
-
this.
|
|
44
|
+
this.#cancelHandlers.push(cancelHandler);
|
|
46
45
|
};
|
|
47
46
|
Object.defineProperty(onCancel, "isResolved", {
|
|
48
|
-
get: () => this
|
|
47
|
+
get: () => this.#isResolved
|
|
49
48
|
});
|
|
50
49
|
Object.defineProperty(onCancel, "isRejected", {
|
|
51
|
-
get: () => this
|
|
50
|
+
get: () => this.#isRejected
|
|
52
51
|
});
|
|
53
52
|
Object.defineProperty(onCancel, "isCancelled", {
|
|
54
|
-
get: () => this
|
|
53
|
+
get: () => this.#isCancelled
|
|
55
54
|
});
|
|
56
55
|
return executor(onResolve, onReject, onCancel);
|
|
57
56
|
});
|
|
58
57
|
}
|
|
58
|
+
get [Symbol.toStringTag]() {
|
|
59
|
+
return "Cancellable Promise";
|
|
60
|
+
}
|
|
59
61
|
then(onFulfilled, onRejected) {
|
|
60
|
-
return this.
|
|
62
|
+
return this.#promise.then(onFulfilled, onRejected);
|
|
61
63
|
}
|
|
62
64
|
catch(onRejected) {
|
|
63
|
-
return this.
|
|
65
|
+
return this.#promise.catch(onRejected);
|
|
64
66
|
}
|
|
65
67
|
finally(onFinally) {
|
|
66
|
-
return this.
|
|
68
|
+
return this.#promise.finally(onFinally);
|
|
67
69
|
}
|
|
68
70
|
cancel() {
|
|
69
|
-
if (this
|
|
71
|
+
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
70
72
|
return;
|
|
71
73
|
}
|
|
72
|
-
this
|
|
73
|
-
if (this.
|
|
74
|
+
this.#isCancelled = true;
|
|
75
|
+
if (this.#cancelHandlers.length) {
|
|
74
76
|
try {
|
|
75
|
-
for (const cancelHandler of this
|
|
77
|
+
for (const cancelHandler of this.#cancelHandlers) {
|
|
76
78
|
cancelHandler();
|
|
77
79
|
}
|
|
78
80
|
} catch (error) {
|
|
@@ -80,11 +82,11 @@ class CancelablePromise {
|
|
|
80
82
|
return;
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
|
-
this.
|
|
84
|
-
this
|
|
85
|
+
this.#cancelHandlers.length = 0;
|
|
86
|
+
this.#reject?.(new CancelError("Request aborted"));
|
|
85
87
|
}
|
|
86
88
|
get isCancelled() {
|
|
87
|
-
return this
|
|
89
|
+
return this.#isCancelled;
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
|
|
@@ -126,7 +126,7 @@ const getHeaders = async (config, options) => {
|
|
|
126
126
|
return new Headers(headers);
|
|
127
127
|
};
|
|
128
128
|
const getRequestBody = (options) => {
|
|
129
|
-
if (options.body) {
|
|
129
|
+
if (options.body !== void 0) {
|
|
130
130
|
if (options.mediaType?.includes("/json")) {
|
|
131
131
|
return JSON.stringify(options.body);
|
|
132
132
|
} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
|
|
@@ -165,7 +165,8 @@ const getResponseBody = async (response) => {
|
|
|
165
165
|
try {
|
|
166
166
|
const contentType = response.headers.get("Content-Type");
|
|
167
167
|
if (contentType) {
|
|
168
|
-
const
|
|
168
|
+
const jsonTypes = ["application/json", "application/problem+json"];
|
|
169
|
+
const isJSON = jsonTypes.some((type) => contentType.toLowerCase().startsWith(type));
|
|
169
170
|
if (isJSON) {
|
|
170
171
|
return await response.json();
|
|
171
172
|
} else {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
type AddressActivityMetadata = {
|
|
2
2
|
/**
|
|
3
|
-
* Ethereum address for the address_activity event type
|
|
3
|
+
* Ethereum address(es) for the address_activity event type
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
addresses: Array<any[]>;
|
|
6
6
|
/**
|
|
7
7
|
* Array of hexadecimal strings of the event signatures.
|
|
8
8
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PrimaryNetworkAssetType } from './PrimaryNetworkAssetType.js';
|
|
2
2
|
|
|
3
|
-
type
|
|
3
|
+
type AggregatedAssetAmount = {
|
|
4
4
|
/**
|
|
5
5
|
* Unique ID for an asset.
|
|
6
6
|
*/
|
|
@@ -17,14 +17,12 @@ type Asset = {
|
|
|
17
17
|
* Denomination of this asset to represent fungibility.
|
|
18
18
|
*/
|
|
19
19
|
denomination: number;
|
|
20
|
-
/**
|
|
21
|
-
* Type of asset like SECP256K1 or NFT.
|
|
22
|
-
*/
|
|
23
20
|
type: PrimaryNetworkAssetType;
|
|
24
21
|
/**
|
|
25
22
|
* Amount of the asset.
|
|
26
23
|
*/
|
|
27
24
|
amount: string;
|
|
25
|
+
utxoCount: number;
|
|
28
26
|
};
|
|
29
27
|
|
|
30
|
-
export {
|
|
28
|
+
export { AggregatedAssetAmount };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PrimaryNetworkAssetType } from './PrimaryNetworkAssetType.js';
|
|
2
2
|
|
|
3
|
-
type
|
|
3
|
+
type AssetAmount = {
|
|
4
4
|
/**
|
|
5
5
|
* Unique ID for an asset.
|
|
6
6
|
*/
|
|
@@ -17,15 +17,11 @@ type XChainAssetBalance = {
|
|
|
17
17
|
* Denomination of this asset to represent fungibility.
|
|
18
18
|
*/
|
|
19
19
|
denomination: number;
|
|
20
|
-
/**
|
|
21
|
-
* Type of asset like SECP256K1 or NFT.
|
|
22
|
-
*/
|
|
23
20
|
type: PrimaryNetworkAssetType;
|
|
24
21
|
/**
|
|
25
22
|
* Amount of the asset.
|
|
26
23
|
*/
|
|
27
24
|
amount: string;
|
|
28
|
-
utxoCount: number;
|
|
29
25
|
};
|
|
30
26
|
|
|
31
|
-
export {
|
|
27
|
+
export { AssetAmount };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AssetAmount } from './AssetAmount.js';
|
|
2
2
|
import { EVMInput } from './EVMInput.js';
|
|
3
3
|
import { Utxo } from './Utxo.js';
|
|
4
4
|
|
|
@@ -26,11 +26,11 @@ type CChainExportTransaction = {
|
|
|
26
26
|
/**
|
|
27
27
|
* Assets unlocked by inputs of this transaction.
|
|
28
28
|
*/
|
|
29
|
-
amountUnlocked: Array<
|
|
29
|
+
amountUnlocked: Array<AssetAmount>;
|
|
30
30
|
/**
|
|
31
31
|
* Assets created by outputs of this transaction.
|
|
32
32
|
*/
|
|
33
|
-
amountCreated: Array<
|
|
33
|
+
amountCreated: Array<AssetAmount>;
|
|
34
34
|
/**
|
|
35
35
|
* Source chain for an atomic transaction.
|
|
36
36
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AssetAmount } from './AssetAmount.js';
|
|
2
2
|
import { EVMOutput } from './EVMOutput.js';
|
|
3
3
|
import { Utxo } from './Utxo.js';
|
|
4
4
|
|
|
@@ -26,11 +26,11 @@ type CChainImportTransaction = {
|
|
|
26
26
|
/**
|
|
27
27
|
* Assets unlocked by inputs of this transaction.
|
|
28
28
|
*/
|
|
29
|
-
amountUnlocked: Array<
|
|
29
|
+
amountUnlocked: Array<AssetAmount>;
|
|
30
30
|
/**
|
|
31
31
|
* Assets created by outputs of this transaction.
|
|
32
32
|
*/
|
|
33
|
-
amountCreated: Array<
|
|
33
|
+
amountCreated: Array<AssetAmount>;
|
|
34
34
|
/**
|
|
35
35
|
* Source chain for an atomic transaction.
|
|
36
36
|
*/
|
|
@@ -5,9 +5,6 @@ import { VmName } from './VmName.js';
|
|
|
5
5
|
|
|
6
6
|
type ChainInfo = {
|
|
7
7
|
chainId: string;
|
|
8
|
-
/**
|
|
9
|
-
* Status of chain nodes. Chain nodes can become temporarily `UNAVAILABLE` for several reasons, such as validator stake falling below threshold. If chain nodes are `UNAVAILABLE`, requests that rely on data from the chain nodes may return 503 errors.
|
|
10
|
-
*/
|
|
11
8
|
status: ChainStatus;
|
|
12
9
|
chainName: string;
|
|
13
10
|
description: string;
|
|
@@ -23,6 +20,7 @@ type ChainInfo = {
|
|
|
23
20
|
networkToken: NetworkToken;
|
|
24
21
|
chainLogoUri?: string;
|
|
25
22
|
private?: boolean;
|
|
23
|
+
enabledFeatures?: Array<'nftIndexing' | 'webhooks'>;
|
|
26
24
|
};
|
|
27
25
|
|
|
28
26
|
export { ChainInfo };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status of chain nodes. Chain nodes can become temporarily `UNAVAILABLE` for several reasons, such as validator stake falling below threshold. If chain nodes are `UNAVAILABLE`, requests that rely on data from the chain nodes may return 503 errors.
|
|
3
|
+
*/
|
|
1
4
|
declare enum ChainStatus {
|
|
2
5
|
OK = "OK",
|
|
3
6
|
UNAVAILABLE = "UNAVAILABLE"
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EvmNetworkOptions } from './EvmNetworkOptions.js';
|
|
2
|
+
import { EVMOperationType } from './EVMOperationType.js';
|
|
2
3
|
|
|
3
4
|
type CreateEvmTransactionExportRequest = {
|
|
4
|
-
type:
|
|
5
|
+
type: EVMOperationType;
|
|
5
6
|
firstDate: string;
|
|
6
7
|
lastDate: string;
|
|
7
8
|
/**
|
|
@@ -14,10 +15,5 @@ type CreateEvmTransactionExportRequest = {
|
|
|
14
15
|
endDate: string;
|
|
15
16
|
options: EvmNetworkOptions;
|
|
16
17
|
};
|
|
17
|
-
declare namespace CreateEvmTransactionExportRequest {
|
|
18
|
-
enum type {
|
|
19
|
-
TRANSACTION_EXPORT_EVM = "TRANSACTION_EXPORT_EVM"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
18
|
|
|
23
19
|
export { CreateEvmTransactionExportRequest };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { PrimaryNetworkOperationType } from './PrimaryNetworkOperationType.js';
|
|
1
2
|
import { PrimaryNetworkOptions } from './PrimaryNetworkOptions.js';
|
|
2
3
|
|
|
3
4
|
type CreatePrimaryNetworkTransactionExportRequest = {
|
|
4
|
-
type:
|
|
5
|
+
type: PrimaryNetworkOperationType;
|
|
5
6
|
firstDate: string;
|
|
6
7
|
lastDate: string;
|
|
7
8
|
/**
|
|
@@ -14,10 +15,5 @@ type CreatePrimaryNetworkTransactionExportRequest = {
|
|
|
14
15
|
endDate: string;
|
|
15
16
|
options: PrimaryNetworkOptions;
|
|
16
17
|
};
|
|
17
|
-
declare namespace CreatePrimaryNetworkTransactionExportRequest {
|
|
18
|
-
enum type {
|
|
19
|
-
TRANSACTION_EXPORT_PRIMARY_NETWORK = "TRANSACTION_EXPORT_PRIMARY_NETWORK"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
18
|
|
|
23
19
|
export { CreatePrimaryNetworkTransactionExportRequest };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TeleporterDestinationTransaction } from './TeleporterDestinationTransaction.js';
|
|
2
|
+
import { TeleporterReceipt } from './TeleporterReceipt.js';
|
|
3
|
+
import { TeleporterRewardDetails } from './TeleporterRewardDetails.js';
|
|
4
|
+
|
|
5
|
+
type DeliveredSourceNotIndexedTeleporterMessage = {
|
|
6
|
+
messageId: string;
|
|
7
|
+
teleporterContractAddress: string;
|
|
8
|
+
sourceBlockchainId: string;
|
|
9
|
+
destinationBlockchainId: string;
|
|
10
|
+
sourceEvmChainId: string;
|
|
11
|
+
destinationEvmChainId: string;
|
|
12
|
+
messageNonce: string;
|
|
13
|
+
from: string;
|
|
14
|
+
to: string;
|
|
15
|
+
data?: string;
|
|
16
|
+
messageExecuted: boolean;
|
|
17
|
+
receipts: Array<TeleporterReceipt>;
|
|
18
|
+
receiptDelivered: boolean;
|
|
19
|
+
rewardDetails: TeleporterRewardDetails;
|
|
20
|
+
destinationTransaction: TeleporterDestinationTransaction;
|
|
21
|
+
status: DeliveredSourceNotIndexedTeleporterMessage.status;
|
|
22
|
+
};
|
|
23
|
+
declare namespace DeliveredSourceNotIndexedTeleporterMessage {
|
|
24
|
+
enum status {
|
|
25
|
+
DELIVERED_SOURCE_NOT_INDEXED = "delivered_source_not_indexed"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { DeliveredSourceNotIndexedTeleporterMessage };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var DeliveredSourceNotIndexedTeleporterMessage;
|
|
2
|
+
((DeliveredSourceNotIndexedTeleporterMessage2) => {
|
|
3
|
+
((status2) => {
|
|
4
|
+
status2["DELIVERED_SOURCE_NOT_INDEXED"] = "delivered_source_not_indexed";
|
|
5
|
+
})(DeliveredSourceNotIndexedTeleporterMessage2.status || (DeliveredSourceNotIndexedTeleporterMessage2.status = {}));
|
|
6
|
+
})(DeliveredSourceNotIndexedTeleporterMessage || (DeliveredSourceNotIndexedTeleporterMessage = {}));
|
|
7
|
+
|
|
8
|
+
export { DeliveredSourceNotIndexedTeleporterMessage };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TeleporterDestinationTransaction } from './TeleporterDestinationTransaction.js';
|
|
2
|
+
import { TeleporterReceipt } from './TeleporterReceipt.js';
|
|
3
|
+
import { TeleporterRewardDetails } from './TeleporterRewardDetails.js';
|
|
4
|
+
import { TeleporterSourceTransaction } from './TeleporterSourceTransaction.js';
|
|
5
|
+
|
|
6
|
+
type DeliveredTeleporterMessage = {
|
|
7
|
+
messageId: string;
|
|
8
|
+
teleporterContractAddress: string;
|
|
9
|
+
sourceBlockchainId: string;
|
|
10
|
+
destinationBlockchainId: string;
|
|
11
|
+
sourceEvmChainId: string;
|
|
12
|
+
destinationEvmChainId: string;
|
|
13
|
+
messageNonce: string;
|
|
14
|
+
from: string;
|
|
15
|
+
to: string;
|
|
16
|
+
data?: string;
|
|
17
|
+
messageExecuted: boolean;
|
|
18
|
+
receipts: Array<TeleporterReceipt>;
|
|
19
|
+
receiptDelivered: boolean;
|
|
20
|
+
rewardDetails: TeleporterRewardDetails;
|
|
21
|
+
sourceTransaction: TeleporterSourceTransaction;
|
|
22
|
+
destinationTransaction: TeleporterDestinationTransaction;
|
|
23
|
+
status: DeliveredTeleporterMessage.status;
|
|
24
|
+
};
|
|
25
|
+
declare namespace DeliveredTeleporterMessage {
|
|
26
|
+
enum status {
|
|
27
|
+
DELIVERED = "delivered"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { DeliveredTeleporterMessage };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var DeliveredTeleporterMessage;
|
|
2
|
+
((DeliveredTeleporterMessage2) => {
|
|
3
|
+
((status2) => {
|
|
4
|
+
status2["DELIVERED"] = "delivered";
|
|
5
|
+
})(DeliveredTeleporterMessage2.status || (DeliveredTeleporterMessage2.status = {}));
|
|
6
|
+
})(DeliveredTeleporterMessage || (DeliveredTeleporterMessage = {}));
|
|
7
|
+
|
|
8
|
+
export { DeliveredTeleporterMessage };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AssetAmount } from './AssetAmount.js';
|
|
2
2
|
import { UtxoCredential } from './UtxoCredential.js';
|
|
3
3
|
|
|
4
4
|
type EVMInput = {
|
|
@@ -7,9 +7,9 @@ type EVMInput = {
|
|
|
7
7
|
*/
|
|
8
8
|
fromAddress: string;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* AssetAmount details for the asset being transferred.
|
|
11
11
|
*/
|
|
12
|
-
asset:
|
|
12
|
+
asset: AssetAmount;
|
|
13
13
|
/**
|
|
14
14
|
* Credentials that signed this transaction.
|
|
15
15
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AssetAmount } from './AssetAmount.js';
|
|
2
2
|
|
|
3
3
|
type EVMOutput = {
|
|
4
4
|
/**
|
|
@@ -6,9 +6,9 @@ type EVMOutput = {
|
|
|
6
6
|
*/
|
|
7
7
|
toAddress: string;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* AssetAmount details for the asset being transferred.
|
|
10
10
|
*/
|
|
11
|
-
asset:
|
|
11
|
+
asset: AssetAmount;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export { EVMOutput };
|
|
@@ -5,9 +5,6 @@ import { VmName } from './VmName.js';
|
|
|
5
5
|
|
|
6
6
|
type GetChainResponse = {
|
|
7
7
|
chainId: string;
|
|
8
|
-
/**
|
|
9
|
-
* Status of chain nodes. Chain nodes can become temporarily `UNAVAILABLE` for several reasons, such as validator stake falling below threshold. If chain nodes are `UNAVAILABLE`, requests that rely on data from the chain nodes may return 503 errors.
|
|
10
|
-
*/
|
|
11
8
|
status: ChainStatus;
|
|
12
9
|
chainName: string;
|
|
13
10
|
description: string;
|
|
@@ -23,6 +20,7 @@ type GetChainResponse = {
|
|
|
23
20
|
networkToken: NetworkToken;
|
|
24
21
|
chainLogoUri?: string;
|
|
25
22
|
private?: boolean;
|
|
23
|
+
enabledFeatures?: Array<'nftIndexing' | 'webhooks'>;
|
|
26
24
|
};
|
|
27
25
|
|
|
28
26
|
export { GetChainResponse };
|
|
@@ -6,7 +6,7 @@ type ListNftTokens = {
|
|
|
6
6
|
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
7
7
|
*/
|
|
8
8
|
nextPageToken?: string;
|
|
9
|
-
tokens:
|
|
9
|
+
tokens: Array<(Erc721Token | Erc1155Token)>;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export { ListNftTokens };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DeliveredTeleporterMessage } from './DeliveredTeleporterMessage.js';
|
|
2
|
+
import { PendingTeleporterMessage } from './PendingTeleporterMessage.js';
|
|
3
|
+
|
|
4
|
+
type ListTeleporterMessagesResponse = {
|
|
5
|
+
/**
|
|
6
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
7
|
+
*/
|
|
8
|
+
nextPageToken?: string;
|
|
9
|
+
messages: Array<(PendingTeleporterMessage | DeliveredTeleporterMessage)>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { ListTeleporterMessagesResponse };
|
|
@@ -7,7 +7,7 @@ type ListTransfersResponse = {
|
|
|
7
7
|
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
8
8
|
*/
|
|
9
9
|
nextPageToken?: string;
|
|
10
|
-
transfers:
|
|
10
|
+
transfers: Array<(Erc20Transfer | Erc721Transfer | Erc1155Transfer)>;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export { ListTransfersResponse };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type ListWebhookAddressesResponse = {
|
|
2
|
+
/**
|
|
3
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
|
|
4
|
+
*/
|
|
5
|
+
nextPageToken?: string;
|
|
6
|
+
addresses: Array<string>;
|
|
7
|
+
totalAddresses: number;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { ListWebhookAddressesResponse };
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { TransactionMethodType } from './TransactionMethodType.js';
|
|
2
2
|
|
|
3
3
|
type Method = {
|
|
4
|
-
/**
|
|
5
|
-
* 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.
|
|
6
|
-
*/
|
|
7
4
|
callType: TransactionMethodType;
|
|
8
5
|
/**
|
|
9
6
|
* The contract method hash identifier. The method hash is only set if the `callType` is `CONTRACT_CALL`.
|