@avalabs/glacier-sdk 2.8.0-canary.cde943d.0 → 2.8.0-canary.cf01dde.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 +401 -124
- package/dist/index.js +113 -22
- package/esm/generated/Glacier.d.ts +2 -0
- package/esm/generated/Glacier.js +3 -0
- package/esm/generated/models/AddressActivityMetadata.d.ts +4 -1
- package/esm/generated/models/AssetWithPriceInfo.d.ts +34 -0
- package/esm/generated/models/DeliveredSourceNotIndexedTeleporterMessage.d.ts +24 -0
- package/esm/generated/models/DeliveredSourceNotIndexedTeleporterMessage.js +8 -0
- package/esm/generated/models/DeliveredTeleporterMessage.d.ts +26 -0
- package/esm/generated/models/DeliveredTeleporterMessage.js +8 -0
- package/esm/generated/models/HistoricalReward.d.ts +2 -5
- package/esm/generated/models/ListValidatorDetailsResponse.d.ts +2 -1
- package/esm/generated/models/NextPageToken.d.ts +8 -0
- package/esm/generated/models/PChainBalance.d.ts +7 -7
- package/esm/generated/models/PChainSharedAsset.d.ts +22 -0
- package/esm/generated/models/PChainTransaction.d.ts +4 -4
- package/esm/generated/models/PChainTransactionType.d.ts +6 -5
- package/esm/generated/models/PChainTransactionType.js +6 -5
- package/esm/generated/models/PChainUtxo.d.ts +34 -14
- package/esm/generated/models/PendingReward.d.ts +2 -2
- package/esm/generated/models/PendingTeleporterMessage.d.ts +24 -0
- package/esm/generated/models/PendingTeleporterMessage.js +8 -0
- package/esm/generated/models/PrimaryNetworkTxType.d.ts +6 -5
- package/esm/generated/models/PrimaryNetworkTxType.js +6 -5
- package/esm/generated/models/RemovedValidatorDetails.d.ts +19 -0
- package/esm/generated/models/RemovedValidatorDetails.js +8 -0
- package/esm/generated/models/SharedSecretsResponse.d.ts +5 -0
- package/esm/generated/models/TeleporterDestinationTransaction.d.ts +9 -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/Utxo.d.ts +28 -28
- package/esm/generated/models/UtxoCredential.d.ts +2 -2
- package/esm/generated/models/ValidationStatusType.d.ts +2 -1
- package/esm/generated/models/ValidationStatusType.js +1 -0
- package/esm/generated/services/DefaultService.d.ts +8 -0
- package/esm/generated/services/DefaultService.js +6 -0
- package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +10 -5
- package/esm/generated/services/PrimaryNetworkRewardsService.js +4 -2
- package/esm/generated/services/PrimaryNetworkService.d.ts +19 -19
- package/esm/generated/services/PrimaryNetworkService.js +10 -10
- package/esm/generated/services/TeleporterService.d.ts +65 -0
- package/esm/generated/services/TeleporterService.js +43 -0
- package/esm/index.d.ts +11 -1
- package/esm/index.js +6 -0
- package/package.json +2 -2
- package/esm/generated/models/PChainAsset.d.ts +0 -6
package/dist/index.js
CHANGED
|
@@ -391,6 +391,12 @@ class DefaultService {
|
|
|
391
391
|
}
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
|
+
generateSharedSecret() {
|
|
395
|
+
return this.httpRequest.request({
|
|
396
|
+
method: "POST",
|
|
397
|
+
url: "/v1/webhooks:generateSharedSecret"
|
|
398
|
+
});
|
|
399
|
+
}
|
|
394
400
|
}
|
|
395
401
|
|
|
396
402
|
class EvmBalancesService {
|
|
@@ -1041,15 +1047,15 @@ class PrimaryNetworkService {
|
|
|
1041
1047
|
network,
|
|
1042
1048
|
pageSize = 10,
|
|
1043
1049
|
pageToken,
|
|
1044
|
-
|
|
1045
|
-
|
|
1050
|
+
nodeIds,
|
|
1051
|
+
sortOrder,
|
|
1052
|
+
validationStatus,
|
|
1046
1053
|
minDelegationCapacity,
|
|
1047
1054
|
maxDelegationCapacity,
|
|
1055
|
+
minTimeRemaining,
|
|
1056
|
+
maxTimeRemaining,
|
|
1048
1057
|
minFeePercentage,
|
|
1049
1058
|
maxFeePercentage,
|
|
1050
|
-
nodeIds,
|
|
1051
|
-
sortOrder,
|
|
1052
|
-
validationStatus,
|
|
1053
1059
|
subnetId
|
|
1054
1060
|
}) {
|
|
1055
1061
|
return this.httpRequest.request({
|
|
@@ -1061,15 +1067,15 @@ class PrimaryNetworkService {
|
|
|
1061
1067
|
query: {
|
|
1062
1068
|
"pageSize": pageSize,
|
|
1063
1069
|
"pageToken": pageToken,
|
|
1064
|
-
"
|
|
1065
|
-
"
|
|
1070
|
+
"nodeIds": nodeIds,
|
|
1071
|
+
"sortOrder": sortOrder,
|
|
1072
|
+
"validationStatus": validationStatus,
|
|
1066
1073
|
"minDelegationCapacity": minDelegationCapacity,
|
|
1067
1074
|
"maxDelegationCapacity": maxDelegationCapacity,
|
|
1075
|
+
"minTimeRemaining": minTimeRemaining,
|
|
1076
|
+
"maxTimeRemaining": maxTimeRemaining,
|
|
1068
1077
|
"minFeePercentage": minFeePercentage,
|
|
1069
1078
|
"maxFeePercentage": maxFeePercentage,
|
|
1070
|
-
"nodeIds": nodeIds,
|
|
1071
|
-
"sortOrder": sortOrder,
|
|
1072
|
-
"validationStatus": validationStatus,
|
|
1073
1079
|
"subnetId": subnetId
|
|
1074
1080
|
}
|
|
1075
1081
|
});
|
|
@@ -1243,7 +1249,8 @@ class PrimaryNetworkRewardsService {
|
|
|
1243
1249
|
pageSize = 10,
|
|
1244
1250
|
pageToken,
|
|
1245
1251
|
nodeIds,
|
|
1246
|
-
sortOrder
|
|
1252
|
+
sortOrder,
|
|
1253
|
+
currency
|
|
1247
1254
|
}) {
|
|
1248
1255
|
return this.httpRequest.request({
|
|
1249
1256
|
method: "GET",
|
|
@@ -1256,7 +1263,8 @@ class PrimaryNetworkRewardsService {
|
|
|
1256
1263
|
"pageSize": pageSize,
|
|
1257
1264
|
"pageToken": pageToken,
|
|
1258
1265
|
"nodeIds": nodeIds,
|
|
1259
|
-
"sortOrder": sortOrder
|
|
1266
|
+
"sortOrder": sortOrder,
|
|
1267
|
+
"currency": currency
|
|
1260
1268
|
}
|
|
1261
1269
|
});
|
|
1262
1270
|
}
|
|
@@ -1464,6 +1472,48 @@ class PrimaryNetworkVerticesService {
|
|
|
1464
1472
|
}
|
|
1465
1473
|
}
|
|
1466
1474
|
|
|
1475
|
+
class TeleporterService {
|
|
1476
|
+
constructor(httpRequest) {
|
|
1477
|
+
this.httpRequest = httpRequest;
|
|
1478
|
+
}
|
|
1479
|
+
getTeleporterMessage({
|
|
1480
|
+
sourceBlockchainId,
|
|
1481
|
+
destinationBlockchainId,
|
|
1482
|
+
messageId
|
|
1483
|
+
}) {
|
|
1484
|
+
return this.httpRequest.request({
|
|
1485
|
+
method: "GET",
|
|
1486
|
+
url: "/v1/teleporter/messages:getMessage",
|
|
1487
|
+
query: {
|
|
1488
|
+
"sourceBlockchainId": sourceBlockchainId,
|
|
1489
|
+
"destinationBlockchainId": destinationBlockchainId,
|
|
1490
|
+
"messageId": messageId
|
|
1491
|
+
}
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
listTeleporterMessages({
|
|
1495
|
+
pageSize = 10,
|
|
1496
|
+
pageToken,
|
|
1497
|
+
sourceBlockchainId,
|
|
1498
|
+
destinationBlockchainId,
|
|
1499
|
+
to,
|
|
1500
|
+
from
|
|
1501
|
+
}) {
|
|
1502
|
+
return this.httpRequest.request({
|
|
1503
|
+
method: "GET",
|
|
1504
|
+
url: "/v1/teleporter/messages",
|
|
1505
|
+
query: {
|
|
1506
|
+
"pageSize": pageSize,
|
|
1507
|
+
"pageToken": pageToken,
|
|
1508
|
+
"sourceBlockchainId": sourceBlockchainId,
|
|
1509
|
+
"destinationBlockchainId": destinationBlockchainId,
|
|
1510
|
+
"to": to,
|
|
1511
|
+
"from": from
|
|
1512
|
+
}
|
|
1513
|
+
});
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1467
1517
|
class Glacier {
|
|
1468
1518
|
default;
|
|
1469
1519
|
evmBalances;
|
|
@@ -1481,6 +1531,7 @@ class Glacier {
|
|
|
1481
1531
|
primaryNetworkTransactions;
|
|
1482
1532
|
primaryNetworkUtxOs;
|
|
1483
1533
|
primaryNetworkVertices;
|
|
1534
|
+
teleporter;
|
|
1484
1535
|
request;
|
|
1485
1536
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
1486
1537
|
this.request = new HttpRequest({
|
|
@@ -1510,6 +1561,7 @@ class Glacier {
|
|
|
1510
1561
|
this.primaryNetworkTransactions = new PrimaryNetworkTransactionsService(this.request);
|
|
1511
1562
|
this.primaryNetworkUtxOs = new PrimaryNetworkUtxOsService(this.request);
|
|
1512
1563
|
this.primaryNetworkVertices = new PrimaryNetworkVerticesService(this.request);
|
|
1564
|
+
this.teleporter = new TeleporterService(this.request);
|
|
1513
1565
|
}
|
|
1514
1566
|
}
|
|
1515
1567
|
|
|
@@ -1661,6 +1713,20 @@ var DelegationStatusType = /* @__PURE__ */ ((DelegationStatusType2) => {
|
|
|
1661
1713
|
return DelegationStatusType2;
|
|
1662
1714
|
})(DelegationStatusType || {});
|
|
1663
1715
|
|
|
1716
|
+
exports.DeliveredSourceNotIndexedTeleporterMessage = void 0;
|
|
1717
|
+
((DeliveredSourceNotIndexedTeleporterMessage2) => {
|
|
1718
|
+
((status2) => {
|
|
1719
|
+
status2["DELIVERED_SOURCE_NOT_INDEXED"] = "delivered_source_not_indexed";
|
|
1720
|
+
})(DeliveredSourceNotIndexedTeleporterMessage2.status || (DeliveredSourceNotIndexedTeleporterMessage2.status = {}));
|
|
1721
|
+
})(exports.DeliveredSourceNotIndexedTeleporterMessage || (exports.DeliveredSourceNotIndexedTeleporterMessage = {}));
|
|
1722
|
+
|
|
1723
|
+
exports.DeliveredTeleporterMessage = void 0;
|
|
1724
|
+
((DeliveredTeleporterMessage2) => {
|
|
1725
|
+
((status2) => {
|
|
1726
|
+
status2["DELIVERED"] = "delivered";
|
|
1727
|
+
})(DeliveredTeleporterMessage2.status || (DeliveredTeleporterMessage2.status = {}));
|
|
1728
|
+
})(exports.DeliveredTeleporterMessage || (exports.DeliveredTeleporterMessage = {}));
|
|
1729
|
+
|
|
1664
1730
|
exports.Erc1155Contract = void 0;
|
|
1665
1731
|
((Erc1155Contract2) => {
|
|
1666
1732
|
((ercType2) => {
|
|
@@ -1796,17 +1862,18 @@ var PChainId = /* @__PURE__ */ ((PChainId2) => {
|
|
|
1796
1862
|
|
|
1797
1863
|
var PChainTransactionType = /* @__PURE__ */ ((PChainTransactionType2) => {
|
|
1798
1864
|
PChainTransactionType2["ADD_VALIDATOR_TX"] = "AddValidatorTx";
|
|
1799
|
-
PChainTransactionType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
|
|
1800
|
-
PChainTransactionType2["ADD_PERMISSIONLESS_VALIDATOR_TX"] = "AddPermissionlessValidatorTx";
|
|
1801
|
-
PChainTransactionType2["ADD_PERMISSIONLESS_DELEGATOR_TX"] = "AddPermissionlessDelegatorTx";
|
|
1802
1865
|
PChainTransactionType2["ADD_SUBNET_VALIDATOR_TX"] = "AddSubnetValidatorTx";
|
|
1803
|
-
PChainTransactionType2["
|
|
1804
|
-
PChainTransactionType2["REWARD_VALIDATOR_TX"] = "RewardValidatorTx";
|
|
1866
|
+
PChainTransactionType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
|
|
1805
1867
|
PChainTransactionType2["CREATE_CHAIN_TX"] = "CreateChainTx";
|
|
1806
1868
|
PChainTransactionType2["CREATE_SUBNET_TX"] = "CreateSubnetTx";
|
|
1807
1869
|
PChainTransactionType2["IMPORT_TX"] = "ImportTx";
|
|
1808
1870
|
PChainTransactionType2["EXPORT_TX"] = "ExportTx";
|
|
1809
1871
|
PChainTransactionType2["ADVANCE_TIME_TX"] = "AdvanceTimeTx";
|
|
1872
|
+
PChainTransactionType2["REWARD_VALIDATOR_TX"] = "RewardValidatorTx";
|
|
1873
|
+
PChainTransactionType2["REMOVE_SUBNET_VALIDATOR_TX"] = "RemoveSubnetValidatorTx";
|
|
1874
|
+
PChainTransactionType2["TRANSFORM_SUBNET_TX"] = "TransformSubnetTx";
|
|
1875
|
+
PChainTransactionType2["ADD_PERMISSIONLESS_VALIDATOR_TX"] = "AddPermissionlessValidatorTx";
|
|
1876
|
+
PChainTransactionType2["ADD_PERMISSIONLESS_DELEGATOR_TX"] = "AddPermissionlessDelegatorTx";
|
|
1810
1877
|
PChainTransactionType2["UNKNOWN"] = "UNKNOWN";
|
|
1811
1878
|
return PChainTransactionType2;
|
|
1812
1879
|
})(PChainTransactionType || {});
|
|
@@ -1818,6 +1885,13 @@ exports.PendingDelegatorDetails = void 0;
|
|
|
1818
1885
|
})(PendingDelegatorDetails2.delegationStatus || (PendingDelegatorDetails2.delegationStatus = {}));
|
|
1819
1886
|
})(exports.PendingDelegatorDetails || (exports.PendingDelegatorDetails = {}));
|
|
1820
1887
|
|
|
1888
|
+
exports.PendingTeleporterMessage = void 0;
|
|
1889
|
+
((PendingTeleporterMessage2) => {
|
|
1890
|
+
((status2) => {
|
|
1891
|
+
status2["PENDING"] = "pending";
|
|
1892
|
+
})(PendingTeleporterMessage2.status || (PendingTeleporterMessage2.status = {}));
|
|
1893
|
+
})(exports.PendingTeleporterMessage || (exports.PendingTeleporterMessage = {}));
|
|
1894
|
+
|
|
1821
1895
|
exports.PendingValidatorDetails = void 0;
|
|
1822
1896
|
((PendingValidatorDetails2) => {
|
|
1823
1897
|
((validationStatus2) => {
|
|
@@ -1840,17 +1914,18 @@ var PrimaryNetworkChainName = /* @__PURE__ */ ((PrimaryNetworkChainName2) => {
|
|
|
1840
1914
|
|
|
1841
1915
|
var PrimaryNetworkTxType = /* @__PURE__ */ ((PrimaryNetworkTxType2) => {
|
|
1842
1916
|
PrimaryNetworkTxType2["ADD_VALIDATOR_TX"] = "AddValidatorTx";
|
|
1843
|
-
PrimaryNetworkTxType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
|
|
1844
|
-
PrimaryNetworkTxType2["ADD_PERMISSIONLESS_VALIDATOR_TX"] = "AddPermissionlessValidatorTx";
|
|
1845
|
-
PrimaryNetworkTxType2["ADD_PERMISSIONLESS_DELEGATOR_TX"] = "AddPermissionlessDelegatorTx";
|
|
1846
1917
|
PrimaryNetworkTxType2["ADD_SUBNET_VALIDATOR_TX"] = "AddSubnetValidatorTx";
|
|
1847
|
-
PrimaryNetworkTxType2["
|
|
1848
|
-
PrimaryNetworkTxType2["REWARD_VALIDATOR_TX"] = "RewardValidatorTx";
|
|
1918
|
+
PrimaryNetworkTxType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
|
|
1849
1919
|
PrimaryNetworkTxType2["CREATE_CHAIN_TX"] = "CreateChainTx";
|
|
1850
1920
|
PrimaryNetworkTxType2["CREATE_SUBNET_TX"] = "CreateSubnetTx";
|
|
1851
1921
|
PrimaryNetworkTxType2["IMPORT_TX"] = "ImportTx";
|
|
1852
1922
|
PrimaryNetworkTxType2["EXPORT_TX"] = "ExportTx";
|
|
1853
1923
|
PrimaryNetworkTxType2["ADVANCE_TIME_TX"] = "AdvanceTimeTx";
|
|
1924
|
+
PrimaryNetworkTxType2["REWARD_VALIDATOR_TX"] = "RewardValidatorTx";
|
|
1925
|
+
PrimaryNetworkTxType2["REMOVE_SUBNET_VALIDATOR_TX"] = "RemoveSubnetValidatorTx";
|
|
1926
|
+
PrimaryNetworkTxType2["TRANSFORM_SUBNET_TX"] = "TransformSubnetTx";
|
|
1927
|
+
PrimaryNetworkTxType2["ADD_PERMISSIONLESS_VALIDATOR_TX"] = "AddPermissionlessValidatorTx";
|
|
1928
|
+
PrimaryNetworkTxType2["ADD_PERMISSIONLESS_DELEGATOR_TX"] = "AddPermissionlessDelegatorTx";
|
|
1854
1929
|
PrimaryNetworkTxType2["UNKNOWN"] = "UNKNOWN";
|
|
1855
1930
|
PrimaryNetworkTxType2["BASE_TX"] = "BaseTx";
|
|
1856
1931
|
PrimaryNetworkTxType2["CREATE_ASSET_TX"] = "CreateAssetTx";
|
|
@@ -1858,6 +1933,13 @@ var PrimaryNetworkTxType = /* @__PURE__ */ ((PrimaryNetworkTxType2) => {
|
|
|
1858
1933
|
return PrimaryNetworkTxType2;
|
|
1859
1934
|
})(PrimaryNetworkTxType || {});
|
|
1860
1935
|
|
|
1936
|
+
exports.RemovedValidatorDetails = void 0;
|
|
1937
|
+
((RemovedValidatorDetails2) => {
|
|
1938
|
+
((validationStatus2) => {
|
|
1939
|
+
validationStatus2["REMOVED"] = "removed";
|
|
1940
|
+
})(RemovedValidatorDetails2.validationStatus || (RemovedValidatorDetails2.validationStatus = {}));
|
|
1941
|
+
})(exports.RemovedValidatorDetails || (exports.RemovedValidatorDetails = {}));
|
|
1942
|
+
|
|
1861
1943
|
var ResourceLinkType = /* @__PURE__ */ ((ResourceLinkType2) => {
|
|
1862
1944
|
ResourceLinkType2["BLOG"] = "Blog";
|
|
1863
1945
|
ResourceLinkType2["COIN_GECKO"] = "CoinGecko";
|
|
@@ -1893,6 +1975,13 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
1893
1975
|
return SortOrder2;
|
|
1894
1976
|
})(SortOrder || {});
|
|
1895
1977
|
|
|
1978
|
+
exports.TeleporterRewardDetails = void 0;
|
|
1979
|
+
((TeleporterRewardDetails2) => {
|
|
1980
|
+
((ercType2) => {
|
|
1981
|
+
ercType2["ERC_20"] = "ERC-20";
|
|
1982
|
+
})(TeleporterRewardDetails2.ercType || (TeleporterRewardDetails2.ercType = {}));
|
|
1983
|
+
})(exports.TeleporterRewardDetails || (exports.TeleporterRewardDetails = {}));
|
|
1984
|
+
|
|
1896
1985
|
var TransactionMethodType = /* @__PURE__ */ ((TransactionMethodType2) => {
|
|
1897
1986
|
TransactionMethodType2["NATIVE_TRANSFER"] = "NATIVE_TRANSFER";
|
|
1898
1987
|
TransactionMethodType2["CONTRACT_CALL"] = "CONTRACT_CALL";
|
|
@@ -1923,6 +2012,7 @@ var ValidationStatusType = /* @__PURE__ */ ((ValidationStatusType2) => {
|
|
|
1923
2012
|
ValidationStatusType2["COMPLETED"] = "completed";
|
|
1924
2013
|
ValidationStatusType2["ACTIVE"] = "active";
|
|
1925
2014
|
ValidationStatusType2["PENDING"] = "pending";
|
|
2015
|
+
ValidationStatusType2["REMOVED"] = "removed";
|
|
1926
2016
|
return ValidationStatusType2;
|
|
1927
2017
|
})(ValidationStatusType || {});
|
|
1928
2018
|
|
|
@@ -2021,6 +2111,7 @@ exports.PrimaryNetworkVerticesService = PrimaryNetworkVerticesService;
|
|
|
2021
2111
|
exports.ResourceLinkType = ResourceLinkType;
|
|
2022
2112
|
exports.RewardType = RewardType;
|
|
2023
2113
|
exports.SortOrder = SortOrder;
|
|
2114
|
+
exports.TeleporterService = TeleporterService;
|
|
2024
2115
|
exports.TransactionMethodType = TransactionMethodType;
|
|
2025
2116
|
exports.TransactionStatus = TransactionStatus;
|
|
2026
2117
|
exports.UtxoType = UtxoType;
|
|
@@ -16,6 +16,7 @@ import { PrimaryNetworkRewardsService } from './services/PrimaryNetworkRewardsSe
|
|
|
16
16
|
import { PrimaryNetworkTransactionsService } from './services/PrimaryNetworkTransactionsService.js';
|
|
17
17
|
import { PrimaryNetworkUtxOsService } from './services/PrimaryNetworkUtxOsService.js';
|
|
18
18
|
import { PrimaryNetworkVerticesService } from './services/PrimaryNetworkVerticesService.js';
|
|
19
|
+
import { TeleporterService } from './services/TeleporterService.js';
|
|
19
20
|
|
|
20
21
|
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
|
21
22
|
declare class Glacier {
|
|
@@ -35,6 +36,7 @@ declare class Glacier {
|
|
|
35
36
|
readonly primaryNetworkTransactions: PrimaryNetworkTransactionsService;
|
|
36
37
|
readonly primaryNetworkUtxOs: PrimaryNetworkUtxOsService;
|
|
37
38
|
readonly primaryNetworkVertices: PrimaryNetworkVerticesService;
|
|
39
|
+
readonly teleporter: TeleporterService;
|
|
38
40
|
readonly request: BaseHttpRequest;
|
|
39
41
|
constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
|
|
40
42
|
}
|
package/esm/generated/Glacier.js
CHANGED
|
@@ -15,6 +15,7 @@ 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 { TeleporterService } from './services/TeleporterService.js';
|
|
18
19
|
|
|
19
20
|
class Glacier {
|
|
20
21
|
default;
|
|
@@ -33,6 +34,7 @@ class Glacier {
|
|
|
33
34
|
primaryNetworkTransactions;
|
|
34
35
|
primaryNetworkUtxOs;
|
|
35
36
|
primaryNetworkVertices;
|
|
37
|
+
teleporter;
|
|
36
38
|
request;
|
|
37
39
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
38
40
|
this.request = new HttpRequest({
|
|
@@ -62,6 +64,7 @@ class Glacier {
|
|
|
62
64
|
this.primaryNetworkTransactions = new PrimaryNetworkTransactionsService(this.request);
|
|
63
65
|
this.primaryNetworkUtxOs = new PrimaryNetworkUtxOsService(this.request);
|
|
64
66
|
this.primaryNetworkVertices = new PrimaryNetworkVerticesService(this.request);
|
|
67
|
+
this.teleporter = new TeleporterService(this.request);
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
70
|
|
|
@@ -3,7 +3,10 @@ type AddressActivityMetadata = {
|
|
|
3
3
|
* Ethereum address for the address_activity event type
|
|
4
4
|
*/
|
|
5
5
|
address: string;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Array of hexadecimal strings of the event signatures.
|
|
8
|
+
*/
|
|
9
|
+
eventSignatures?: Array<string>;
|
|
7
10
|
};
|
|
8
11
|
|
|
9
12
|
export { AddressActivityMetadata };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Money } from './Money.js';
|
|
2
|
+
|
|
3
|
+
type AssetWithPriceInfo = {
|
|
4
|
+
/**
|
|
5
|
+
* Unique ID for an asset.
|
|
6
|
+
*/
|
|
7
|
+
assetId: string;
|
|
8
|
+
/**
|
|
9
|
+
* Name of this asset.
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* Symbol for this asset (max 4 characters).
|
|
14
|
+
*/
|
|
15
|
+
symbol: string;
|
|
16
|
+
/**
|
|
17
|
+
* Denomination of this asset to represent fungibility.
|
|
18
|
+
*/
|
|
19
|
+
denomination: number;
|
|
20
|
+
/**
|
|
21
|
+
* Type of asset like SECP256K1 or NFT.
|
|
22
|
+
*/
|
|
23
|
+
type: string;
|
|
24
|
+
/**
|
|
25
|
+
* Amount of the asset.
|
|
26
|
+
*/
|
|
27
|
+
amount: string;
|
|
28
|
+
/**
|
|
29
|
+
* The historical asset price at the time the reward was granted, if available. Note, this is only provided if the reward occured more than 24 hours ago.
|
|
30
|
+
*/
|
|
31
|
+
historicalPrice?: Money;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { AssetWithPriceInfo };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TeleporterDestinationTransaction } from './TeleporterDestinationTransaction.js';
|
|
2
|
+
import { TeleporterRewardDetails } from './TeleporterRewardDetails.js';
|
|
3
|
+
|
|
4
|
+
type DeliveredSourceNotIndexedTeleporterMessage = {
|
|
5
|
+
sourceBlockchainId: string;
|
|
6
|
+
destinationBlockchainId: string;
|
|
7
|
+
messageId: string;
|
|
8
|
+
from: string;
|
|
9
|
+
to: string;
|
|
10
|
+
data?: string;
|
|
11
|
+
messageExecuted: boolean;
|
|
12
|
+
receipts: Array<string>;
|
|
13
|
+
receiptDelivered: boolean;
|
|
14
|
+
rewardDetails: TeleporterRewardDetails;
|
|
15
|
+
destinationTransaction: TeleporterDestinationTransaction;
|
|
16
|
+
status: DeliveredSourceNotIndexedTeleporterMessage.status;
|
|
17
|
+
};
|
|
18
|
+
declare namespace DeliveredSourceNotIndexedTeleporterMessage {
|
|
19
|
+
enum status {
|
|
20
|
+
DELIVERED_SOURCE_NOT_INDEXED = "delivered_source_not_indexed"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
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,26 @@
|
|
|
1
|
+
import { TeleporterDestinationTransaction } from './TeleporterDestinationTransaction.js';
|
|
2
|
+
import { TeleporterRewardDetails } from './TeleporterRewardDetails.js';
|
|
3
|
+
import { TeleporterSourceTransaction } from './TeleporterSourceTransaction.js';
|
|
4
|
+
|
|
5
|
+
type DeliveredTeleporterMessage = {
|
|
6
|
+
sourceBlockchainId: string;
|
|
7
|
+
destinationBlockchainId: string;
|
|
8
|
+
messageId: string;
|
|
9
|
+
from: string;
|
|
10
|
+
to: string;
|
|
11
|
+
data?: string;
|
|
12
|
+
messageExecuted: boolean;
|
|
13
|
+
receipts: Array<string>;
|
|
14
|
+
receiptDelivered: boolean;
|
|
15
|
+
rewardDetails: TeleporterRewardDetails;
|
|
16
|
+
sourceTransaction: TeleporterSourceTransaction;
|
|
17
|
+
destinationTransaction: TeleporterDestinationTransaction;
|
|
18
|
+
status: DeliveredTeleporterMessage.status;
|
|
19
|
+
};
|
|
20
|
+
declare namespace DeliveredTeleporterMessage {
|
|
21
|
+
enum status {
|
|
22
|
+
DELIVERED = "delivered"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
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 { AssetWithPriceInfo } from './AssetWithPriceInfo.js';
|
|
2
2
|
import { RewardType } from './RewardType.js';
|
|
3
3
|
|
|
4
4
|
type HistoricalReward = {
|
|
@@ -14,10 +14,7 @@ type HistoricalReward = {
|
|
|
14
14
|
rewardType: RewardType;
|
|
15
15
|
utxoId: string;
|
|
16
16
|
outputIndex: number;
|
|
17
|
-
|
|
18
|
-
* An object containing P-chain Asset ID and the amount of that Asset ID.
|
|
19
|
-
*/
|
|
20
|
-
reward: PChainAsset;
|
|
17
|
+
reward: AssetWithPriceInfo;
|
|
21
18
|
rewardTxHash: string;
|
|
22
19
|
};
|
|
23
20
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ActiveValidatorDetails } from './ActiveValidatorDetails.js';
|
|
2
2
|
import { CompletedValidatorDetails } from './CompletedValidatorDetails.js';
|
|
3
3
|
import { PendingValidatorDetails } from './PendingValidatorDetails.js';
|
|
4
|
+
import { RemovedValidatorDetails } from './RemovedValidatorDetails.js';
|
|
4
5
|
|
|
5
6
|
type ListValidatorDetailsResponse = {
|
|
6
7
|
/**
|
|
@@ -10,7 +11,7 @@ type ListValidatorDetailsResponse = {
|
|
|
10
11
|
/**
|
|
11
12
|
* The list of validator Details.
|
|
12
13
|
*/
|
|
13
|
-
validators: Array<(CompletedValidatorDetails | ActiveValidatorDetails | PendingValidatorDetails)>;
|
|
14
|
+
validators: Array<(CompletedValidatorDetails | ActiveValidatorDetails | PendingValidatorDetails | RemovedValidatorDetails)>;
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
export { ListValidatorDetailsResponse };
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Asset } from './Asset.js';
|
|
2
2
|
import { PChainSharedAsset } from './PChainSharedAsset.js';
|
|
3
3
|
|
|
4
4
|
type PChainBalance = {
|
|
5
5
|
/**
|
|
6
6
|
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is consumable by any transaction.
|
|
7
7
|
*/
|
|
8
|
-
unlockedUnstaked: Array<
|
|
8
|
+
unlockedUnstaked: Array<Asset>;
|
|
9
9
|
/**
|
|
10
10
|
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of staked Avax that is consumable by any transaction when the staking period ends.
|
|
11
11
|
*/
|
|
12
|
-
unlockedStaked: Array<
|
|
12
|
+
unlockedStaked: Array<Asset>;
|
|
13
13
|
/**
|
|
14
14
|
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is locked at the platform level and not consumable by any transaction at the current time.
|
|
15
15
|
*/
|
|
16
|
-
lockedPlatform: Array<
|
|
16
|
+
lockedPlatform: Array<Asset>;
|
|
17
17
|
/**
|
|
18
18
|
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unstaked Avax that is locked at the platform level and only consumeable for staking transactions.
|
|
19
19
|
*/
|
|
20
|
-
lockedStakeable: Array<
|
|
20
|
+
lockedStakeable: Array<Asset>;
|
|
21
21
|
/**
|
|
22
22
|
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of staked Avax that will be locked when the staking period ends.
|
|
23
23
|
*/
|
|
24
|
-
lockedStaked: Array<
|
|
24
|
+
lockedStaked: Array<Asset>;
|
|
25
25
|
/**
|
|
26
26
|
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of staked Avax whose staking period has not yet started.
|
|
27
27
|
*/
|
|
28
|
-
pendingStaked: Array<
|
|
28
|
+
pendingStaked: Array<Asset>;
|
|
29
29
|
/**
|
|
30
30
|
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Denotes the amount of unlocked Avax in the atomic memory between P-Chain and other chain.
|
|
31
31
|
*/
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
type PChainSharedAsset = {
|
|
2
|
+
/**
|
|
3
|
+
* Unique ID for an asset.
|
|
4
|
+
*/
|
|
2
5
|
assetId: string;
|
|
6
|
+
/**
|
|
7
|
+
* Name of this asset.
|
|
8
|
+
*/
|
|
9
|
+
name: string;
|
|
10
|
+
/**
|
|
11
|
+
* Symbol for this asset (max 4 characters).
|
|
12
|
+
*/
|
|
13
|
+
symbol: string;
|
|
14
|
+
/**
|
|
15
|
+
* Denomination of this asset to represent fungibility.
|
|
16
|
+
*/
|
|
17
|
+
denomination: number;
|
|
18
|
+
/**
|
|
19
|
+
* Type of asset like SECP256K1 or NFT.
|
|
20
|
+
*/
|
|
21
|
+
type: string;
|
|
22
|
+
/**
|
|
23
|
+
* Amount of the asset.
|
|
24
|
+
*/
|
|
3
25
|
amount: string;
|
|
4
26
|
sharedWithChainId: string;
|
|
5
27
|
status: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Asset } from './Asset.js';
|
|
2
2
|
import { PChainTransactionType } from './PChainTransactionType.js';
|
|
3
3
|
import { PChainUtxo } from './PChainUtxo.js';
|
|
4
4
|
|
|
@@ -27,15 +27,15 @@ type PChainTransaction = {
|
|
|
27
27
|
/**
|
|
28
28
|
* A list of objects containing P-chain Asset ID and the amount of that Asset ID.
|
|
29
29
|
*/
|
|
30
|
-
value: Array<
|
|
30
|
+
value: Array<Asset>;
|
|
31
31
|
/**
|
|
32
32
|
* A list of objects containing P-chain Asset ID and the amount of that Asset ID.
|
|
33
33
|
*/
|
|
34
|
-
amountBurned: Array<
|
|
34
|
+
amountBurned: Array<Asset>;
|
|
35
35
|
/**
|
|
36
36
|
* A list of objects containing P-chain Asset ID and the amount of that Asset ID. Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
|
|
37
37
|
*/
|
|
38
|
-
amountStaked: Array<
|
|
38
|
+
amountStaked: Array<Asset>;
|
|
39
39
|
/**
|
|
40
40
|
* Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx
|
|
41
41
|
*/
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
declare enum PChainTransactionType {
|
|
2
2
|
ADD_VALIDATOR_TX = "AddValidatorTx",
|
|
3
|
-
ADD_DELEGATOR_TX = "AddDelegatorTx",
|
|
4
|
-
ADD_PERMISSIONLESS_VALIDATOR_TX = "AddPermissionlessValidatorTx",
|
|
5
|
-
ADD_PERMISSIONLESS_DELEGATOR_TX = "AddPermissionlessDelegatorTx",
|
|
6
3
|
ADD_SUBNET_VALIDATOR_TX = "AddSubnetValidatorTx",
|
|
7
|
-
|
|
8
|
-
REWARD_VALIDATOR_TX = "RewardValidatorTx",
|
|
4
|
+
ADD_DELEGATOR_TX = "AddDelegatorTx",
|
|
9
5
|
CREATE_CHAIN_TX = "CreateChainTx",
|
|
10
6
|
CREATE_SUBNET_TX = "CreateSubnetTx",
|
|
11
7
|
IMPORT_TX = "ImportTx",
|
|
12
8
|
EXPORT_TX = "ExportTx",
|
|
13
9
|
ADVANCE_TIME_TX = "AdvanceTimeTx",
|
|
10
|
+
REWARD_VALIDATOR_TX = "RewardValidatorTx",
|
|
11
|
+
REMOVE_SUBNET_VALIDATOR_TX = "RemoveSubnetValidatorTx",
|
|
12
|
+
TRANSFORM_SUBNET_TX = "TransformSubnetTx",
|
|
13
|
+
ADD_PERMISSIONLESS_VALIDATOR_TX = "AddPermissionlessValidatorTx",
|
|
14
|
+
ADD_PERMISSIONLESS_DELEGATOR_TX = "AddPermissionlessDelegatorTx",
|
|
14
15
|
UNKNOWN = "UNKNOWN"
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
var PChainTransactionType = /* @__PURE__ */ ((PChainTransactionType2) => {
|
|
2
2
|
PChainTransactionType2["ADD_VALIDATOR_TX"] = "AddValidatorTx";
|
|
3
|
-
PChainTransactionType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
|
|
4
|
-
PChainTransactionType2["ADD_PERMISSIONLESS_VALIDATOR_TX"] = "AddPermissionlessValidatorTx";
|
|
5
|
-
PChainTransactionType2["ADD_PERMISSIONLESS_DELEGATOR_TX"] = "AddPermissionlessDelegatorTx";
|
|
6
3
|
PChainTransactionType2["ADD_SUBNET_VALIDATOR_TX"] = "AddSubnetValidatorTx";
|
|
7
|
-
PChainTransactionType2["
|
|
8
|
-
PChainTransactionType2["REWARD_VALIDATOR_TX"] = "RewardValidatorTx";
|
|
4
|
+
PChainTransactionType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
|
|
9
5
|
PChainTransactionType2["CREATE_CHAIN_TX"] = "CreateChainTx";
|
|
10
6
|
PChainTransactionType2["CREATE_SUBNET_TX"] = "CreateSubnetTx";
|
|
11
7
|
PChainTransactionType2["IMPORT_TX"] = "ImportTx";
|
|
12
8
|
PChainTransactionType2["EXPORT_TX"] = "ExportTx";
|
|
13
9
|
PChainTransactionType2["ADVANCE_TIME_TX"] = "AdvanceTimeTx";
|
|
10
|
+
PChainTransactionType2["REWARD_VALIDATOR_TX"] = "RewardValidatorTx";
|
|
11
|
+
PChainTransactionType2["REMOVE_SUBNET_VALIDATOR_TX"] = "RemoveSubnetValidatorTx";
|
|
12
|
+
PChainTransactionType2["TRANSFORM_SUBNET_TX"] = "TransformSubnetTx";
|
|
13
|
+
PChainTransactionType2["ADD_PERMISSIONLESS_VALIDATOR_TX"] = "AddPermissionlessValidatorTx";
|
|
14
|
+
PChainTransactionType2["ADD_PERMISSIONLESS_DELEGATOR_TX"] = "AddPermissionlessDelegatorTx";
|
|
14
15
|
PChainTransactionType2["UNKNOWN"] = "UNKNOWN";
|
|
15
16
|
return PChainTransactionType2;
|
|
16
17
|
})(PChainTransactionType || {});
|