@avalabs/glacier-sdk 2.8.0-canary.7233ef7.0 → 2.8.0-canary.72ea4bc.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 +390 -124
- package/dist/index.js +107 -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/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/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 +10 -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
|
@@ -1047,15 +1047,15 @@ class PrimaryNetworkService {
|
|
|
1047
1047
|
network,
|
|
1048
1048
|
pageSize = 10,
|
|
1049
1049
|
pageToken,
|
|
1050
|
-
|
|
1051
|
-
|
|
1050
|
+
nodeIds,
|
|
1051
|
+
sortOrder,
|
|
1052
|
+
validationStatus,
|
|
1052
1053
|
minDelegationCapacity,
|
|
1053
1054
|
maxDelegationCapacity,
|
|
1055
|
+
minTimeRemaining,
|
|
1056
|
+
maxTimeRemaining,
|
|
1054
1057
|
minFeePercentage,
|
|
1055
1058
|
maxFeePercentage,
|
|
1056
|
-
nodeIds,
|
|
1057
|
-
sortOrder,
|
|
1058
|
-
validationStatus,
|
|
1059
1059
|
subnetId
|
|
1060
1060
|
}) {
|
|
1061
1061
|
return this.httpRequest.request({
|
|
@@ -1067,15 +1067,15 @@ class PrimaryNetworkService {
|
|
|
1067
1067
|
query: {
|
|
1068
1068
|
"pageSize": pageSize,
|
|
1069
1069
|
"pageToken": pageToken,
|
|
1070
|
-
"
|
|
1071
|
-
"
|
|
1070
|
+
"nodeIds": nodeIds,
|
|
1071
|
+
"sortOrder": sortOrder,
|
|
1072
|
+
"validationStatus": validationStatus,
|
|
1072
1073
|
"minDelegationCapacity": minDelegationCapacity,
|
|
1073
1074
|
"maxDelegationCapacity": maxDelegationCapacity,
|
|
1075
|
+
"minTimeRemaining": minTimeRemaining,
|
|
1076
|
+
"maxTimeRemaining": maxTimeRemaining,
|
|
1074
1077
|
"minFeePercentage": minFeePercentage,
|
|
1075
1078
|
"maxFeePercentage": maxFeePercentage,
|
|
1076
|
-
"nodeIds": nodeIds,
|
|
1077
|
-
"sortOrder": sortOrder,
|
|
1078
|
-
"validationStatus": validationStatus,
|
|
1079
1079
|
"subnetId": subnetId
|
|
1080
1080
|
}
|
|
1081
1081
|
});
|
|
@@ -1249,7 +1249,8 @@ class PrimaryNetworkRewardsService {
|
|
|
1249
1249
|
pageSize = 10,
|
|
1250
1250
|
pageToken,
|
|
1251
1251
|
nodeIds,
|
|
1252
|
-
sortOrder
|
|
1252
|
+
sortOrder,
|
|
1253
|
+
currency
|
|
1253
1254
|
}) {
|
|
1254
1255
|
return this.httpRequest.request({
|
|
1255
1256
|
method: "GET",
|
|
@@ -1262,7 +1263,8 @@ class PrimaryNetworkRewardsService {
|
|
|
1262
1263
|
"pageSize": pageSize,
|
|
1263
1264
|
"pageToken": pageToken,
|
|
1264
1265
|
"nodeIds": nodeIds,
|
|
1265
|
-
"sortOrder": sortOrder
|
|
1266
|
+
"sortOrder": sortOrder,
|
|
1267
|
+
"currency": currency
|
|
1266
1268
|
}
|
|
1267
1269
|
});
|
|
1268
1270
|
}
|
|
@@ -1470,6 +1472,48 @@ class PrimaryNetworkVerticesService {
|
|
|
1470
1472
|
}
|
|
1471
1473
|
}
|
|
1472
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
|
+
|
|
1473
1517
|
class Glacier {
|
|
1474
1518
|
default;
|
|
1475
1519
|
evmBalances;
|
|
@@ -1487,6 +1531,7 @@ class Glacier {
|
|
|
1487
1531
|
primaryNetworkTransactions;
|
|
1488
1532
|
primaryNetworkUtxOs;
|
|
1489
1533
|
primaryNetworkVertices;
|
|
1534
|
+
teleporter;
|
|
1490
1535
|
request;
|
|
1491
1536
|
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
1492
1537
|
this.request = new HttpRequest({
|
|
@@ -1516,6 +1561,7 @@ class Glacier {
|
|
|
1516
1561
|
this.primaryNetworkTransactions = new PrimaryNetworkTransactionsService(this.request);
|
|
1517
1562
|
this.primaryNetworkUtxOs = new PrimaryNetworkUtxOsService(this.request);
|
|
1518
1563
|
this.primaryNetworkVertices = new PrimaryNetworkVerticesService(this.request);
|
|
1564
|
+
this.teleporter = new TeleporterService(this.request);
|
|
1519
1565
|
}
|
|
1520
1566
|
}
|
|
1521
1567
|
|
|
@@ -1667,6 +1713,20 @@ var DelegationStatusType = /* @__PURE__ */ ((DelegationStatusType2) => {
|
|
|
1667
1713
|
return DelegationStatusType2;
|
|
1668
1714
|
})(DelegationStatusType || {});
|
|
1669
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
|
+
|
|
1670
1730
|
exports.Erc1155Contract = void 0;
|
|
1671
1731
|
((Erc1155Contract2) => {
|
|
1672
1732
|
((ercType2) => {
|
|
@@ -1802,17 +1862,18 @@ var PChainId = /* @__PURE__ */ ((PChainId2) => {
|
|
|
1802
1862
|
|
|
1803
1863
|
var PChainTransactionType = /* @__PURE__ */ ((PChainTransactionType2) => {
|
|
1804
1864
|
PChainTransactionType2["ADD_VALIDATOR_TX"] = "AddValidatorTx";
|
|
1805
|
-
PChainTransactionType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
|
|
1806
|
-
PChainTransactionType2["ADD_PERMISSIONLESS_VALIDATOR_TX"] = "AddPermissionlessValidatorTx";
|
|
1807
|
-
PChainTransactionType2["ADD_PERMISSIONLESS_DELEGATOR_TX"] = "AddPermissionlessDelegatorTx";
|
|
1808
1865
|
PChainTransactionType2["ADD_SUBNET_VALIDATOR_TX"] = "AddSubnetValidatorTx";
|
|
1809
|
-
PChainTransactionType2["
|
|
1810
|
-
PChainTransactionType2["REWARD_VALIDATOR_TX"] = "RewardValidatorTx";
|
|
1866
|
+
PChainTransactionType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
|
|
1811
1867
|
PChainTransactionType2["CREATE_CHAIN_TX"] = "CreateChainTx";
|
|
1812
1868
|
PChainTransactionType2["CREATE_SUBNET_TX"] = "CreateSubnetTx";
|
|
1813
1869
|
PChainTransactionType2["IMPORT_TX"] = "ImportTx";
|
|
1814
1870
|
PChainTransactionType2["EXPORT_TX"] = "ExportTx";
|
|
1815
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";
|
|
1816
1877
|
PChainTransactionType2["UNKNOWN"] = "UNKNOWN";
|
|
1817
1878
|
return PChainTransactionType2;
|
|
1818
1879
|
})(PChainTransactionType || {});
|
|
@@ -1824,6 +1885,13 @@ exports.PendingDelegatorDetails = void 0;
|
|
|
1824
1885
|
})(PendingDelegatorDetails2.delegationStatus || (PendingDelegatorDetails2.delegationStatus = {}));
|
|
1825
1886
|
})(exports.PendingDelegatorDetails || (exports.PendingDelegatorDetails = {}));
|
|
1826
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
|
+
|
|
1827
1895
|
exports.PendingValidatorDetails = void 0;
|
|
1828
1896
|
((PendingValidatorDetails2) => {
|
|
1829
1897
|
((validationStatus2) => {
|
|
@@ -1846,17 +1914,18 @@ var PrimaryNetworkChainName = /* @__PURE__ */ ((PrimaryNetworkChainName2) => {
|
|
|
1846
1914
|
|
|
1847
1915
|
var PrimaryNetworkTxType = /* @__PURE__ */ ((PrimaryNetworkTxType2) => {
|
|
1848
1916
|
PrimaryNetworkTxType2["ADD_VALIDATOR_TX"] = "AddValidatorTx";
|
|
1849
|
-
PrimaryNetworkTxType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
|
|
1850
|
-
PrimaryNetworkTxType2["ADD_PERMISSIONLESS_VALIDATOR_TX"] = "AddPermissionlessValidatorTx";
|
|
1851
|
-
PrimaryNetworkTxType2["ADD_PERMISSIONLESS_DELEGATOR_TX"] = "AddPermissionlessDelegatorTx";
|
|
1852
1917
|
PrimaryNetworkTxType2["ADD_SUBNET_VALIDATOR_TX"] = "AddSubnetValidatorTx";
|
|
1853
|
-
PrimaryNetworkTxType2["
|
|
1854
|
-
PrimaryNetworkTxType2["REWARD_VALIDATOR_TX"] = "RewardValidatorTx";
|
|
1918
|
+
PrimaryNetworkTxType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
|
|
1855
1919
|
PrimaryNetworkTxType2["CREATE_CHAIN_TX"] = "CreateChainTx";
|
|
1856
1920
|
PrimaryNetworkTxType2["CREATE_SUBNET_TX"] = "CreateSubnetTx";
|
|
1857
1921
|
PrimaryNetworkTxType2["IMPORT_TX"] = "ImportTx";
|
|
1858
1922
|
PrimaryNetworkTxType2["EXPORT_TX"] = "ExportTx";
|
|
1859
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";
|
|
1860
1929
|
PrimaryNetworkTxType2["UNKNOWN"] = "UNKNOWN";
|
|
1861
1930
|
PrimaryNetworkTxType2["BASE_TX"] = "BaseTx";
|
|
1862
1931
|
PrimaryNetworkTxType2["CREATE_ASSET_TX"] = "CreateAssetTx";
|
|
@@ -1864,6 +1933,13 @@ var PrimaryNetworkTxType = /* @__PURE__ */ ((PrimaryNetworkTxType2) => {
|
|
|
1864
1933
|
return PrimaryNetworkTxType2;
|
|
1865
1934
|
})(PrimaryNetworkTxType || {});
|
|
1866
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
|
+
|
|
1867
1943
|
var ResourceLinkType = /* @__PURE__ */ ((ResourceLinkType2) => {
|
|
1868
1944
|
ResourceLinkType2["BLOG"] = "Blog";
|
|
1869
1945
|
ResourceLinkType2["COIN_GECKO"] = "CoinGecko";
|
|
@@ -1899,6 +1975,13 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
1899
1975
|
return SortOrder2;
|
|
1900
1976
|
})(SortOrder || {});
|
|
1901
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
|
+
|
|
1902
1985
|
var TransactionMethodType = /* @__PURE__ */ ((TransactionMethodType2) => {
|
|
1903
1986
|
TransactionMethodType2["NATIVE_TRANSFER"] = "NATIVE_TRANSFER";
|
|
1904
1987
|
TransactionMethodType2["CONTRACT_CALL"] = "CONTRACT_CALL";
|
|
@@ -1929,6 +2012,7 @@ var ValidationStatusType = /* @__PURE__ */ ((ValidationStatusType2) => {
|
|
|
1929
2012
|
ValidationStatusType2["COMPLETED"] = "completed";
|
|
1930
2013
|
ValidationStatusType2["ACTIVE"] = "active";
|
|
1931
2014
|
ValidationStatusType2["PENDING"] = "pending";
|
|
2015
|
+
ValidationStatusType2["REMOVED"] = "removed";
|
|
1932
2016
|
return ValidationStatusType2;
|
|
1933
2017
|
})(ValidationStatusType || {});
|
|
1934
2018
|
|
|
@@ -2027,6 +2111,7 @@ exports.PrimaryNetworkVerticesService = PrimaryNetworkVerticesService;
|
|
|
2027
2111
|
exports.ResourceLinkType = ResourceLinkType;
|
|
2028
2112
|
exports.RewardType = RewardType;
|
|
2029
2113
|
exports.SortOrder = SortOrder;
|
|
2114
|
+
exports.TeleporterService = TeleporterService;
|
|
2030
2115
|
exports.TransactionMethodType = TransactionMethodType;
|
|
2031
2116
|
exports.TransactionStatus = TransactionStatus;
|
|
2032
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 || {});
|
|
@@ -1,31 +1,51 @@
|
|
|
1
|
+
import { Asset } from './Asset.js';
|
|
1
2
|
import { RewardType } from './RewardType.js';
|
|
2
3
|
import { UtxoType } from './UtxoType.js';
|
|
3
4
|
|
|
4
5
|
type PChainUtxo = {
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
+
* Addresses that are eligible to sign the consumption of this output.
|
|
7
8
|
*/
|
|
8
9
|
addresses: Array<string>;
|
|
10
|
+
asset: Asset;
|
|
11
|
+
/**
|
|
12
|
+
* Blockchain ID on which this output is consumed on.
|
|
13
|
+
*/
|
|
14
|
+
consumedOnChainId: string;
|
|
15
|
+
/**
|
|
16
|
+
* Transaction ID that consumed this output.
|
|
17
|
+
*/
|
|
18
|
+
consumingTxHash?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Blockchain ID on which this output is created on.
|
|
21
|
+
*/
|
|
22
|
+
createdOnChainId: string;
|
|
23
|
+
/**
|
|
24
|
+
* UTXO ID for this output.
|
|
25
|
+
*/
|
|
9
26
|
utxoId: string;
|
|
10
|
-
|
|
11
|
-
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated
|
|
29
|
+
*/
|
|
30
|
+
amount: string;
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated
|
|
33
|
+
*/
|
|
34
|
+
assetId: string;
|
|
12
35
|
blockNumber: string;
|
|
13
36
|
blockTimestamp: number;
|
|
14
|
-
consumingTxHash?: string;
|
|
15
|
-
consumingBlockTimestamp?: number;
|
|
16
37
|
consumingBlockNumber?: string;
|
|
17
|
-
|
|
18
|
-
utxoType: UtxoType;
|
|
19
|
-
amount: string;
|
|
20
|
-
stakeableLocktime?: number;
|
|
38
|
+
consumingBlockTimestamp?: number;
|
|
21
39
|
platformLocktime?: number;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
40
|
+
outputIndex: number;
|
|
41
|
+
rewardType?: RewardType;
|
|
42
|
+
stakeableLocktime?: number;
|
|
25
43
|
staked?: boolean;
|
|
26
|
-
|
|
44
|
+
threshold?: number;
|
|
45
|
+
txHash: string;
|
|
27
46
|
utxoEndTimestamp?: number;
|
|
28
|
-
|
|
47
|
+
utxoStartTimestamp?: number;
|
|
48
|
+
utxoType: UtxoType;
|
|
29
49
|
};
|
|
30
50
|
|
|
31
51
|
export { PChainUtxo };
|