@avalabs/glacier-sdk 2.8.0-canary.5083b17.0 → 2.8.0-canary.50c5939.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.
Files changed (49) hide show
  1. package/dist/index.d.ts +370 -186
  2. package/dist/index.js +221 -117
  3. package/esm/generated/Glacier.d.ts +4 -0
  4. package/esm/generated/Glacier.js +6 -0
  5. package/esm/generated/core/CancelablePromise.d.ts +2 -8
  6. package/esm/generated/core/CancelablePromise.js +38 -36
  7. package/esm/generated/core/request.js +3 -2
  8. package/esm/generated/models/ActiveValidatorDetails.d.ts +5 -0
  9. package/esm/generated/models/AddressActivityMetadata.d.ts +2 -10
  10. package/esm/generated/models/AddressesChangeRequest.d.ts +8 -0
  11. package/esm/generated/models/BlsCredentials.d.ts +6 -0
  12. package/esm/generated/models/ChainInfo.d.ts +1 -1
  13. package/esm/generated/models/CompletedValidatorDetails.d.ts +5 -0
  14. package/esm/generated/models/DeliveredSourceNotIndexedTeleporterMessage.d.ts +2 -0
  15. package/esm/generated/models/DeliveredTeleporterMessage.d.ts +2 -0
  16. package/esm/generated/models/GetChainResponse.d.ts +1 -1
  17. package/esm/generated/models/GlacierApiFeature.d.ts +2 -1
  18. package/esm/generated/models/GlacierApiFeature.js +1 -0
  19. package/esm/generated/models/ListTeleporterMessagesResponse.d.ts +12 -0
  20. package/esm/generated/models/ListWebhookAddressesResponse.d.ts +10 -0
  21. package/esm/generated/models/PChainTransaction.d.ts +5 -0
  22. package/esm/generated/models/PendingTeleporterMessage.d.ts +2 -0
  23. package/esm/generated/models/PendingValidatorDetails.d.ts +6 -0
  24. package/esm/generated/models/PrimaryNetworkOptions.d.ts +1 -1
  25. package/esm/generated/models/RegisterWebhookRequest.d.ts +8 -0
  26. package/esm/generated/models/RemovedValidatorDetails.d.ts +6 -0
  27. package/esm/generated/models/RpcErrorDto.d.ts +7 -0
  28. package/esm/generated/models/RpcErrorResponseDto.d.ts +9 -0
  29. package/esm/generated/models/RpcRequestBodyDto.d.ts +8 -0
  30. package/esm/generated/models/RpcSuccessResponseDto.d.ts +7 -0
  31. package/esm/generated/models/SortByOption.d.ts +9 -0
  32. package/esm/generated/models/SortByOption.js +10 -0
  33. package/esm/generated/models/UpdateWebhookRequest.d.ts +1 -1
  34. package/esm/generated/models/WebhookResponse.d.ts +8 -0
  35. package/esm/generated/services/DefaultService.d.ts +0 -86
  36. package/esm/generated/services/DefaultService.js +0 -73
  37. package/esm/generated/services/EvmBalancesService.d.ts +5 -1
  38. package/esm/generated/services/EvmBalancesService.js +2 -0
  39. package/esm/generated/services/PrimaryNetworkService.d.ts +24 -9
  40. package/esm/generated/services/PrimaryNetworkService.js +10 -4
  41. package/esm/generated/services/RpcService.d.ts +25 -0
  42. package/esm/generated/services/RpcService.js +24 -0
  43. package/esm/generated/services/TeleporterService.d.ts +9 -4
  44. package/esm/generated/services/TeleporterService.js +4 -2
  45. package/esm/generated/services/WebhooksService.d.ts +143 -0
  46. package/esm/generated/services/WebhooksService.js +125 -0
  47. package/esm/index.d.ts +11 -0
  48. package/esm/index.js +3 -0
  49. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -33,71 +33,73 @@ class CancelError extends Error {
33
33
  }
34
34
  }
35
35
  class CancelablePromise {
36
- [Symbol.toStringTag];
37
- _isResolved;
38
- _isRejected;
39
- _isCancelled;
40
- _cancelHandlers;
41
- _promise;
42
- _resolve;
43
- _reject;
36
+ #isResolved;
37
+ #isRejected;
38
+ #isCancelled;
39
+ #cancelHandlers;
40
+ #promise;
41
+ #resolve;
42
+ #reject;
44
43
  constructor(executor) {
45
- this._isResolved = false;
46
- this._isRejected = false;
47
- this._isCancelled = false;
48
- this._cancelHandlers = [];
49
- this._promise = new Promise((resolve, reject) => {
50
- this._resolve = resolve;
51
- this._reject = reject;
44
+ this.#isResolved = false;
45
+ this.#isRejected = false;
46
+ this.#isCancelled = false;
47
+ this.#cancelHandlers = [];
48
+ this.#promise = new Promise((resolve, reject) => {
49
+ this.#resolve = resolve;
50
+ this.#reject = reject;
52
51
  const onResolve = (value) => {
53
- if (this._isResolved || this._isRejected || this._isCancelled) {
52
+ if (this.#isResolved || this.#isRejected || this.#isCancelled) {
54
53
  return;
55
54
  }
56
- this._isResolved = true;
57
- this._resolve?.(value);
55
+ this.#isResolved = true;
56
+ this.#resolve?.(value);
58
57
  };
59
58
  const onReject = (reason) => {
60
- if (this._isResolved || this._isRejected || this._isCancelled) {
59
+ if (this.#isResolved || this.#isRejected || this.#isCancelled) {
61
60
  return;
62
61
  }
63
- this._isRejected = true;
64
- this._reject?.(reason);
62
+ this.#isRejected = true;
63
+ this.#reject?.(reason);
65
64
  };
66
65
  const onCancel = (cancelHandler) => {
67
- if (this._isResolved || this._isRejected || this._isCancelled) {
66
+ if (this.#isResolved || this.#isRejected || this.#isCancelled) {
68
67
  return;
69
68
  }
70
- this._cancelHandlers.push(cancelHandler);
69
+ this.#cancelHandlers.push(cancelHandler);
71
70
  };
72
71
  Object.defineProperty(onCancel, "isResolved", {
73
- get: () => this._isResolved
72
+ get: () => this.#isResolved
74
73
  });
75
74
  Object.defineProperty(onCancel, "isRejected", {
76
- get: () => this._isRejected
75
+ get: () => this.#isRejected
77
76
  });
78
77
  Object.defineProperty(onCancel, "isCancelled", {
79
- get: () => this._isCancelled
78
+ get: () => this.#isCancelled
80
79
  });
81
80
  return executor(onResolve, onReject, onCancel);
82
81
  });
83
82
  }
83
+ get [Symbol.toStringTag]() {
84
+ return "Cancellable Promise";
85
+ }
84
86
  then(onFulfilled, onRejected) {
85
- return this._promise.then(onFulfilled, onRejected);
87
+ return this.#promise.then(onFulfilled, onRejected);
86
88
  }
87
89
  catch(onRejected) {
88
- return this._promise.catch(onRejected);
90
+ return this.#promise.catch(onRejected);
89
91
  }
90
92
  finally(onFinally) {
91
- return this._promise.finally(onFinally);
93
+ return this.#promise.finally(onFinally);
92
94
  }
93
95
  cancel() {
94
- if (this._isResolved || this._isRejected || this._isCancelled) {
96
+ if (this.#isResolved || this.#isRejected || this.#isCancelled) {
95
97
  return;
96
98
  }
97
- this._isCancelled = true;
98
- if (this._cancelHandlers.length) {
99
+ this.#isCancelled = true;
100
+ if (this.#cancelHandlers.length) {
99
101
  try {
100
- for (const cancelHandler of this._cancelHandlers) {
102
+ for (const cancelHandler of this.#cancelHandlers) {
101
103
  cancelHandler();
102
104
  }
103
105
  } catch (error) {
@@ -105,11 +107,11 @@ class CancelablePromise {
105
107
  return;
106
108
  }
107
109
  }
108
- this._cancelHandlers.length = 0;
109
- this._reject?.(new CancelError("Request aborted"));
110
+ this.#cancelHandlers.length = 0;
111
+ this.#reject?.(new CancelError("Request aborted"));
110
112
  }
111
113
  get isCancelled() {
112
- return this._isCancelled;
114
+ return this.#isCancelled;
113
115
  }
114
116
  }
115
117
 
@@ -238,7 +240,7 @@ const getHeaders = async (config, options) => {
238
240
  return new Headers(headers);
239
241
  };
240
242
  const getRequestBody = (options) => {
241
- if (options.body) {
243
+ if (options.body !== void 0) {
242
244
  if (options.mediaType?.includes("/json")) {
243
245
  return JSON.stringify(options.body);
244
246
  } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
@@ -277,7 +279,8 @@ const getResponseBody = async (response) => {
277
279
  try {
278
280
  const contentType = response.headers.get("Content-Type");
279
281
  if (contentType) {
280
- const isJSON = contentType.toLowerCase().startsWith("application/json");
282
+ const jsonTypes = ["application/json", "application/problem+json"];
283
+ const isJSON = jsonTypes.some((type) => contentType.toLowerCase().startsWith(type));
281
284
  if (isJSON) {
282
285
  return await response.json();
283
286
  } else {
@@ -355,79 +358,6 @@ class DefaultService {
355
358
  url: "/v1/media/uploadImage"
356
359
  });
357
360
  }
358
- registerWebhook({
359
- requestBody
360
- }) {
361
- return this.httpRequest.request({
362
- method: "POST",
363
- url: "/v1/webhooks",
364
- body: requestBody,
365
- mediaType: "application/json"
366
- });
367
- }
368
- listWebhooks({
369
- pageToken,
370
- pageSize = 10,
371
- status
372
- }) {
373
- return this.httpRequest.request({
374
- method: "GET",
375
- url: "/v1/webhooks",
376
- query: {
377
- "pageToken": pageToken,
378
- "pageSize": pageSize,
379
- "status": status
380
- }
381
- });
382
- }
383
- getWebhook({
384
- id
385
- }) {
386
- return this.httpRequest.request({
387
- method: "GET",
388
- url: "/v1/webhooks/{id}",
389
- path: {
390
- "id": id
391
- }
392
- });
393
- }
394
- deactivateWebhook({
395
- id
396
- }) {
397
- return this.httpRequest.request({
398
- method: "DELETE",
399
- url: "/v1/webhooks/{id}",
400
- path: {
401
- "id": id
402
- }
403
- });
404
- }
405
- updateWebhook({
406
- id,
407
- requestBody
408
- }) {
409
- return this.httpRequest.request({
410
- method: "PATCH",
411
- url: "/v1/webhooks/{id}",
412
- path: {
413
- "id": id
414
- },
415
- body: requestBody,
416
- mediaType: "application/json"
417
- });
418
- }
419
- generateSharedSecret() {
420
- return this.httpRequest.request({
421
- method: "POST",
422
- url: "/v1/webhooks:generateOrRotateSharedSecret"
423
- });
424
- }
425
- getSharedSecret() {
426
- return this.httpRequest.request({
427
- method: "GET",
428
- url: "/v1/webhooks:getSharedSecret"
429
- });
430
- }
431
361
  }
432
362
 
433
363
  class EvmBalancesService {
@@ -459,6 +389,7 @@ class EvmBalancesService {
459
389
  blockNumber,
460
390
  pageToken,
461
391
  pageSize = 10,
392
+ filterSpamTokens = true,
462
393
  contractAddresses,
463
394
  currency
464
395
  }) {
@@ -473,6 +404,7 @@ class EvmBalancesService {
473
404
  "blockNumber": blockNumber,
474
405
  "pageToken": pageToken,
475
406
  "pageSize": pageSize,
407
+ "filterSpamTokens": filterSpamTokens,
476
408
  "contractAddresses": contractAddresses,
477
409
  "currency": currency
478
410
  }
@@ -1081,6 +1013,7 @@ class PrimaryNetworkService {
1081
1013
  pageToken,
1082
1014
  pageSize = 10,
1083
1015
  nodeIds,
1016
+ sortBy,
1084
1017
  sortOrder,
1085
1018
  validationStatus,
1086
1019
  minDelegationCapacity,
@@ -1089,6 +1022,8 @@ class PrimaryNetworkService {
1089
1022
  maxTimeRemaining,
1090
1023
  minFeePercentage,
1091
1024
  maxFeePercentage,
1025
+ minUptimePerformance,
1026
+ maxUptimePerformance,
1092
1027
  subnetId
1093
1028
  }) {
1094
1029
  return this.httpRequest.request({
@@ -1101,6 +1036,7 @@ class PrimaryNetworkService {
1101
1036
  "pageToken": pageToken,
1102
1037
  "pageSize": pageSize,
1103
1038
  "nodeIds": nodeIds,
1039
+ "sortBy": sortBy,
1104
1040
  "sortOrder": sortOrder,
1105
1041
  "validationStatus": validationStatus,
1106
1042
  "minDelegationCapacity": minDelegationCapacity,
@@ -1109,6 +1045,8 @@ class PrimaryNetworkService {
1109
1045
  "maxTimeRemaining": maxTimeRemaining,
1110
1046
  "minFeePercentage": minFeePercentage,
1111
1047
  "maxFeePercentage": maxFeePercentage,
1048
+ "minUptimePerformance": minUptimePerformance,
1049
+ "maxUptimePerformance": maxUptimePerformance,
1112
1050
  "subnetId": subnetId
1113
1051
  }
1114
1052
  });
@@ -1118,8 +1056,8 @@ class PrimaryNetworkService {
1118
1056
  nodeId,
1119
1057
  pageToken,
1120
1058
  pageSize = 10,
1121
- sortOrder,
1122
- validationStatus
1059
+ validationStatus,
1060
+ sortOrder
1123
1061
  }) {
1124
1062
  return this.httpRequest.request({
1125
1063
  method: "GET",
@@ -1131,8 +1069,8 @@ class PrimaryNetworkService {
1131
1069
  query: {
1132
1070
  "pageToken": pageToken,
1133
1071
  "pageSize": pageSize,
1134
- "sortOrder": sortOrder,
1135
- "validationStatus": validationStatus
1072
+ "validationStatus": validationStatus,
1073
+ "sortOrder": sortOrder
1136
1074
  }
1137
1075
  });
1138
1076
  }
@@ -1505,6 +1443,29 @@ class PrimaryNetworkVerticesService {
1505
1443
  }
1506
1444
  }
1507
1445
 
1446
+ class RpcService {
1447
+ constructor(httpRequest) {
1448
+ this.httpRequest = httpRequest;
1449
+ }
1450
+ rpc({
1451
+ chainId,
1452
+ requestBody
1453
+ }) {
1454
+ return this.httpRequest.request({
1455
+ method: "POST",
1456
+ url: "/v1/ext/bc/{chainId}/rpc",
1457
+ path: {
1458
+ "chainId": chainId
1459
+ },
1460
+ body: requestBody,
1461
+ mediaType: "application/json",
1462
+ errors: {
1463
+ 504: `Request timed out`
1464
+ }
1465
+ });
1466
+ }
1467
+ }
1468
+
1508
1469
  class TeleporterService {
1509
1470
  constructor(httpRequest) {
1510
1471
  this.httpRequest = httpRequest;
@@ -1526,7 +1487,8 @@ class TeleporterService {
1526
1487
  sourceBlockchainId,
1527
1488
  destinationBlockchainId,
1528
1489
  to,
1529
- from
1490
+ from,
1491
+ network
1530
1492
  }) {
1531
1493
  return this.httpRequest.request({
1532
1494
  method: "GET",
@@ -1537,7 +1499,132 @@ class TeleporterService {
1537
1499
  "sourceBlockchainId": sourceBlockchainId,
1538
1500
  "destinationBlockchainId": destinationBlockchainId,
1539
1501
  "to": to,
1540
- "from": from
1502
+ "from": from,
1503
+ "network": network
1504
+ }
1505
+ });
1506
+ }
1507
+ }
1508
+
1509
+ class WebhooksService {
1510
+ constructor(httpRequest) {
1511
+ this.httpRequest = httpRequest;
1512
+ }
1513
+ registerWebhook({
1514
+ requestBody
1515
+ }) {
1516
+ return this.httpRequest.request({
1517
+ method: "POST",
1518
+ url: "/v1/webhooks",
1519
+ body: requestBody,
1520
+ mediaType: "application/json"
1521
+ });
1522
+ }
1523
+ listWebhooks({
1524
+ pageToken,
1525
+ pageSize = 10,
1526
+ status
1527
+ }) {
1528
+ return this.httpRequest.request({
1529
+ method: "GET",
1530
+ url: "/v1/webhooks",
1531
+ query: {
1532
+ "pageToken": pageToken,
1533
+ "pageSize": pageSize,
1534
+ "status": status
1535
+ }
1536
+ });
1537
+ }
1538
+ getWebhook({
1539
+ id
1540
+ }) {
1541
+ return this.httpRequest.request({
1542
+ method: "GET",
1543
+ url: "/v1/webhooks/{id}",
1544
+ path: {
1545
+ "id": id
1546
+ }
1547
+ });
1548
+ }
1549
+ deactivateWebhook({
1550
+ id
1551
+ }) {
1552
+ return this.httpRequest.request({
1553
+ method: "DELETE",
1554
+ url: "/v1/webhooks/{id}",
1555
+ path: {
1556
+ "id": id
1557
+ }
1558
+ });
1559
+ }
1560
+ updateWebhook({
1561
+ id,
1562
+ requestBody
1563
+ }) {
1564
+ return this.httpRequest.request({
1565
+ method: "PATCH",
1566
+ url: "/v1/webhooks/{id}",
1567
+ path: {
1568
+ "id": id
1569
+ },
1570
+ body: requestBody,
1571
+ mediaType: "application/json"
1572
+ });
1573
+ }
1574
+ generateSharedSecret() {
1575
+ return this.httpRequest.request({
1576
+ method: "POST",
1577
+ url: "/v1/webhooks:generateOrRotateSharedSecret"
1578
+ });
1579
+ }
1580
+ getSharedSecret() {
1581
+ return this.httpRequest.request({
1582
+ method: "GET",
1583
+ url: "/v1/webhooks:getSharedSecret"
1584
+ });
1585
+ }
1586
+ addAddressesToWebhook({
1587
+ id,
1588
+ requestBody
1589
+ }) {
1590
+ return this.httpRequest.request({
1591
+ method: "PATCH",
1592
+ url: "/v1/webhooks/{id}/addresses",
1593
+ path: {
1594
+ "id": id
1595
+ },
1596
+ body: requestBody,
1597
+ mediaType: "application/json"
1598
+ });
1599
+ }
1600
+ removeAddressesFromWebhook({
1601
+ id,
1602
+ requestBody
1603
+ }) {
1604
+ return this.httpRequest.request({
1605
+ method: "DELETE",
1606
+ url: "/v1/webhooks/{id}/addresses",
1607
+ path: {
1608
+ "id": id
1609
+ },
1610
+ body: requestBody,
1611
+ mediaType: "application/json"
1612
+ });
1613
+ }
1614
+ getAddressesFromWebhook({
1615
+ id,
1616
+ pageToken,
1617
+ pageSize = 10
1618
+ }) {
1619
+ return this.httpRequest.request({
1620
+ method: "GET",
1621
+ url: "/v1/webhooks/{id}/addresses",
1622
+ path: {
1623
+ "id": id
1624
+ },
1625
+ query: {
1626
+ "pageToken": pageToken,
1627
+ "pageSize": pageSize
1541
1628
  }
1542
1629
  });
1543
1630
  }
@@ -1560,7 +1647,9 @@ class Glacier {
1560
1647
  primaryNetworkTransactions;
1561
1648
  primaryNetworkUtxOs;
1562
1649
  primaryNetworkVertices;
1650
+ rpc;
1563
1651
  teleporter;
1652
+ webhooks;
1564
1653
  request;
1565
1654
  constructor(config, HttpRequest = FetchHttpRequest) {
1566
1655
  this.request = new HttpRequest({
@@ -1590,7 +1679,9 @@ class Glacier {
1590
1679
  this.primaryNetworkTransactions = new PrimaryNetworkTransactionsService(this.request);
1591
1680
  this.primaryNetworkUtxOs = new PrimaryNetworkUtxOsService(this.request);
1592
1681
  this.primaryNetworkVertices = new PrimaryNetworkVerticesService(this.request);
1682
+ this.rpc = new RpcService(this.request);
1593
1683
  this.teleporter = new TeleporterService(this.request);
1684
+ this.webhooks = new WebhooksService(this.request);
1594
1685
  }
1595
1686
  }
1596
1687
 
@@ -1817,6 +1908,7 @@ var EVMOperationType = /* @__PURE__ */ ((EVMOperationType2) => {
1817
1908
 
1818
1909
  var GlacierApiFeature = /* @__PURE__ */ ((GlacierApiFeature2) => {
1819
1910
  GlacierApiFeature2["NFT_INDEXING"] = "nftIndexing";
1911
+ GlacierApiFeature2["WEBHOOKS"] = "webhooks";
1820
1912
  return GlacierApiFeature2;
1821
1913
  })(GlacierApiFeature || {});
1822
1914
 
@@ -2018,6 +2110,15 @@ var RewardType = /* @__PURE__ */ ((RewardType2) => {
2018
2110
  return RewardType2;
2019
2111
  })(RewardType || {});
2020
2112
 
2113
+ var SortByOption = /* @__PURE__ */ ((SortByOption2) => {
2114
+ SortByOption2["BLOCK_INDEX"] = "blockIndex";
2115
+ SortByOption2["DELEGATION_CAPACITY"] = "delegationCapacity";
2116
+ SortByOption2["TIME_REMAINING"] = "timeRemaining";
2117
+ SortByOption2["DELEGATION_FEE"] = "delegationFee";
2118
+ SortByOption2["UPTIME_PERFORMANCE"] = "uptimePerformance";
2119
+ return SortByOption2;
2120
+ })(SortByOption || {});
2121
+
2021
2122
  var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
2022
2123
  SortOrder2["ASC"] = "asc";
2023
2124
  SortOrder2["DESC"] = "desc";
@@ -2164,6 +2265,8 @@ exports.PrimaryNetworkUtxOsService = PrimaryNetworkUtxOsService;
2164
2265
  exports.PrimaryNetworkVerticesService = PrimaryNetworkVerticesService;
2165
2266
  exports.ResourceLinkType = ResourceLinkType;
2166
2267
  exports.RewardType = RewardType;
2268
+ exports.RpcService = RpcService;
2269
+ exports.SortByOption = SortByOption;
2167
2270
  exports.SortOrder = SortOrder;
2168
2271
  exports.TeleporterService = TeleporterService;
2169
2272
  exports.TransactionMethodType = TransactionMethodType;
@@ -2173,5 +2276,6 @@ exports.ValidationStatusType = ValidationStatusType;
2173
2276
  exports.VmName = VmName;
2174
2277
  exports.WebhookStatus = WebhookStatus;
2175
2278
  exports.WebhookStatusType = WebhookStatusType;
2279
+ exports.WebhooksService = WebhooksService;
2176
2280
  exports.XChainId = XChainId;
2177
2281
  exports.XChainTransactionType = XChainTransactionType;
@@ -16,7 +16,9 @@ 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 { RpcService } from './services/RpcService.js';
19
20
  import { TeleporterService } from './services/TeleporterService.js';
21
+ import { WebhooksService } from './services/WebhooksService.js';
20
22
 
21
23
  type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
22
24
  declare class Glacier {
@@ -36,7 +38,9 @@ declare class Glacier {
36
38
  readonly primaryNetworkTransactions: PrimaryNetworkTransactionsService;
37
39
  readonly primaryNetworkUtxOs: PrimaryNetworkUtxOsService;
38
40
  readonly primaryNetworkVertices: PrimaryNetworkVerticesService;
41
+ readonly rpc: RpcService;
39
42
  readonly teleporter: TeleporterService;
43
+ readonly webhooks: WebhooksService;
40
44
  readonly request: BaseHttpRequest;
41
45
  constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
42
46
  }
@@ -15,7 +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';
18
19
  import { TeleporterService } from './services/TeleporterService.js';
20
+ import { WebhooksService } from './services/WebhooksService.js';
19
21
 
20
22
  class Glacier {
21
23
  default;
@@ -34,7 +36,9 @@ class Glacier {
34
36
  primaryNetworkTransactions;
35
37
  primaryNetworkUtxOs;
36
38
  primaryNetworkVertices;
39
+ rpc;
37
40
  teleporter;
41
+ webhooks;
38
42
  request;
39
43
  constructor(config, HttpRequest = FetchHttpRequest) {
40
44
  this.request = new HttpRequest({
@@ -64,7 +68,9 @@ class Glacier {
64
68
  this.primaryNetworkTransactions = new PrimaryNetworkTransactionsService(this.request);
65
69
  this.primaryNetworkUtxOs = new PrimaryNetworkUtxOsService(this.request);
66
70
  this.primaryNetworkVertices = new PrimaryNetworkVerticesService(this.request);
71
+ this.rpc = new RpcService(this.request);
67
72
  this.teleporter = new TeleporterService(this.request);
73
+ this.webhooks = new WebhooksService(this.request);
68
74
  }
69
75
  }
70
76
 
@@ -9,15 +9,9 @@ interface OnCancel {
9
9
  (cancelHandler: () => void): void;
10
10
  }
11
11
  declare class CancelablePromise<T> implements Promise<T> {
12
- readonly [Symbol.toStringTag]: string;
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>;