@avalabs/glacier-sdk 2.8.0-canary.ca01c76.0 → 2.8.0-canary.cde943d.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 (77) hide show
  1. package/dist/index.d.ts +757 -342
  2. package/dist/index.js +293 -71
  3. package/esm/generated/Glacier.d.ts +4 -0
  4. package/esm/generated/Glacier.js +30 -10
  5. package/esm/generated/core/ApiError.js +5 -0
  6. package/esm/generated/core/CancelablePromise.js +11 -6
  7. package/esm/generated/core/request.js +14 -31
  8. package/esm/generated/models/ActiveDelegatorDetails.d.ts +7 -3
  9. package/esm/generated/models/ActiveDelegatorDetails.js +8 -0
  10. package/esm/generated/models/ActiveValidatorDetails.d.ts +14 -6
  11. package/esm/generated/models/ActiveValidatorDetails.js +8 -0
  12. package/esm/generated/models/AddressActivityMetadata.d.ts +9 -0
  13. package/esm/generated/models/ChainInfo.d.ts +1 -0
  14. package/esm/generated/models/CompletedDelegatorDetails.d.ts +7 -3
  15. package/esm/generated/models/CompletedDelegatorDetails.js +8 -0
  16. package/esm/generated/models/CompletedValidatorDetails.d.ts +9 -3
  17. package/esm/generated/models/CompletedValidatorDetails.js +8 -0
  18. package/esm/generated/models/ContractSubmissionBody.d.ts +10 -0
  19. package/esm/generated/models/ContractSubmissionErc1155.d.ts +31 -0
  20. package/esm/generated/models/ContractSubmissionErc1155.js +8 -0
  21. package/esm/generated/models/ContractSubmissionErc20.d.ts +31 -0
  22. package/esm/generated/models/ContractSubmissionErc20.js +8 -0
  23. package/esm/generated/models/ContractSubmissionErc721.d.ts +29 -0
  24. package/esm/generated/models/ContractSubmissionErc721.js +8 -0
  25. package/esm/generated/models/ContractSubmissionUnknown.d.ts +25 -0
  26. package/esm/generated/models/ContractSubmissionUnknown.js +8 -0
  27. package/esm/generated/models/Erc20Contract.d.ts +1 -1
  28. package/esm/generated/models/EventType.d.ts +5 -0
  29. package/esm/generated/models/EventType.js +6 -0
  30. package/esm/generated/models/GetChainResponse.d.ts +1 -0
  31. package/esm/generated/models/GetPrimaryNetworkBlockResponse.d.ts +1 -0
  32. package/esm/generated/models/ListContractsResponse.d.ts +1 -1
  33. package/esm/generated/models/ListNftTokens.d.ts +12 -0
  34. package/esm/generated/models/ListValidatorDetailsResponse.d.ts +1 -1
  35. package/esm/generated/models/ListWebhooksResponse.d.ts +11 -0
  36. package/esm/generated/models/PChainTransaction.d.ts +1 -0
  37. package/esm/generated/models/PChainTransactionType.d.ts +1 -0
  38. package/esm/generated/models/PChainTransactionType.js +1 -0
  39. package/esm/generated/models/PendingDelegatorDetails.d.ts +7 -3
  40. package/esm/generated/models/PendingDelegatorDetails.js +8 -0
  41. package/esm/generated/models/PendingValidatorDetails.d.ts +9 -4
  42. package/esm/generated/models/PendingValidatorDetails.js +8 -0
  43. package/esm/generated/models/PrimaryNetworkBlock.d.ts +1 -0
  44. package/esm/generated/models/PrimaryNetworkTxType.d.ts +1 -0
  45. package/esm/generated/models/PrimaryNetworkTxType.js +1 -0
  46. package/esm/generated/models/RegisterWebhookRequest.d.ts +14 -0
  47. package/esm/generated/models/RewardType.d.ts +2 -1
  48. package/esm/generated/models/RewardType.js +1 -0
  49. package/esm/generated/models/Rewards.d.ts +2 -0
  50. package/esm/generated/models/UpdateContractResponse.d.ts +10 -0
  51. package/esm/generated/models/ValidatorHealthDetails.d.ts +20 -0
  52. package/esm/generated/models/WebhookResponse.d.ts +15 -0
  53. package/esm/generated/models/WebhookStatus.d.ts +6 -0
  54. package/esm/generated/models/WebhookStatus.js +7 -0
  55. package/esm/generated/models/WebhookStatusType.d.ts +6 -0
  56. package/esm/generated/models/WebhookStatusType.js +7 -0
  57. package/esm/generated/models/XChainLinearTransaction.d.ts +2 -1
  58. package/esm/generated/models/XChainNonLinearTransaction.d.ts +2 -1
  59. package/esm/generated/models/XChainTransactionType.d.ts +10 -0
  60. package/esm/generated/models/XChainTransactionType.js +11 -0
  61. package/esm/generated/services/DefaultService.d.ts +59 -0
  62. package/esm/generated/services/DefaultService.js +49 -0
  63. package/esm/generated/services/EvmContractsService.d.ts +48 -0
  64. package/esm/generated/services/EvmContractsService.js +36 -0
  65. package/esm/generated/services/EvmTransactionsService.d.ts +42 -0
  66. package/esm/generated/services/EvmTransactionsService.js +1 -1
  67. package/esm/generated/services/NfTsService.d.ts +20 -13
  68. package/esm/generated/services/NfTsService.js +15 -9
  69. package/esm/generated/services/OperationsService.d.ts +11 -11
  70. package/esm/generated/services/OperationsService.js +10 -10
  71. package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +10 -2
  72. package/esm/generated/services/PrimaryNetworkRewardsService.js +4 -0
  73. package/esm/generated/services/PrimaryNetworkService.d.ts +32 -8
  74. package/esm/generated/services/PrimaryNetworkService.js +16 -4
  75. package/esm/index.d.ts +18 -0
  76. package/esm/index.js +16 -0
  77. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -7,6 +7,11 @@ class BaseHttpRequest {
7
7
  }
8
8
 
9
9
  class ApiError extends Error {
10
+ url;
11
+ status;
12
+ statusText;
13
+ body;
14
+ request;
10
15
  constructor(request, response, message) {
11
16
  super(message);
12
17
  this.name = "ApiError";
@@ -28,6 +33,14 @@ class CancelError extends Error {
28
33
  }
29
34
  }
30
35
  class CancelablePromise {
36
+ [Symbol.toStringTag];
37
+ _isResolved;
38
+ _isRejected;
39
+ _isCancelled;
40
+ _cancelHandlers;
41
+ _promise;
42
+ _resolve;
43
+ _reject;
31
44
  constructor(executor) {
32
45
  this._isResolved = false;
33
46
  this._isRejected = false;
@@ -37,20 +50,18 @@ class CancelablePromise {
37
50
  this._resolve = resolve;
38
51
  this._reject = reject;
39
52
  const onResolve = (value) => {
40
- var _a;
41
53
  if (this._isResolved || this._isRejected || this._isCancelled) {
42
54
  return;
43
55
  }
44
56
  this._isResolved = true;
45
- (_a = this._resolve) == null ? void 0 : _a.call(this, value);
57
+ this._resolve?.(value);
46
58
  };
47
59
  const onReject = (reason) => {
48
- var _a;
49
60
  if (this._isResolved || this._isRejected || this._isCancelled) {
50
61
  return;
51
62
  }
52
63
  this._isRejected = true;
53
- (_a = this._reject) == null ? void 0 : _a.call(this, reason);
64
+ this._reject?.(reason);
54
65
  };
55
66
  const onCancel = (cancelHandler) => {
56
67
  if (this._isResolved || this._isRejected || this._isCancelled) {
@@ -80,7 +91,6 @@ class CancelablePromise {
80
91
  return this._promise.finally(onFinally);
81
92
  }
82
93
  cancel() {
83
- var _a;
84
94
  if (this._isResolved || this._isRejected || this._isCancelled) {
85
95
  return;
86
96
  }
@@ -96,32 +106,13 @@ class CancelablePromise {
96
106
  }
97
107
  }
98
108
  this._cancelHandlers.length = 0;
99
- (_a = this._reject) == null ? void 0 : _a.call(this, new CancelError("Request aborted"));
109
+ this._reject?.(new CancelError("Request aborted"));
100
110
  }
101
111
  get isCancelled() {
102
112
  return this._isCancelled;
103
113
  }
104
114
  }
105
115
 
106
- var __defProp = Object.defineProperty;
107
- var __defProps = Object.defineProperties;
108
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
109
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
110
- var __hasOwnProp = Object.prototype.hasOwnProperty;
111
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
112
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
113
- var __spreadValues = (a, b) => {
114
- for (var prop in b || (b = {}))
115
- if (__hasOwnProp.call(b, prop))
116
- __defNormalProp(a, prop, b[prop]);
117
- if (__getOwnPropSymbols)
118
- for (var prop of __getOwnPropSymbols(b)) {
119
- if (__propIsEnum.call(b, prop))
120
- __defNormalProp(a, prop, b[prop]);
121
- }
122
- return a;
123
- };
124
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
125
116
  const isDefined = (value) => {
126
117
  return value !== void 0 && value !== null;
127
118
  };
@@ -175,8 +166,7 @@ const getQueryString = (params) => {
175
166
  const getUrl = (config, options) => {
176
167
  const encoder = config.ENCODE_PATH || encodeURI;
177
168
  const path = options.url.replace("{api-version}", config.VERSION).replace(/{(.*?)}/g, (substring, group) => {
178
- var _a;
179
- if ((_a = options.path) == null ? void 0 : _a.hasOwnProperty(group)) {
169
+ if (options.path?.hasOwnProperty(group)) {
180
170
  return encoder(String(options.path[group]));
181
171
  }
182
172
  return substring;
@@ -219,9 +209,12 @@ const getHeaders = async (config, options) => {
219
209
  const username = await resolve(options, config.USERNAME);
220
210
  const password = await resolve(options, config.PASSWORD);
221
211
  const additionalHeaders = await resolve(options, config.HEADERS);
222
- const headers = Object.entries(__spreadValues(__spreadValues({
223
- Accept: "application/json"
224
- }, additionalHeaders), options.headers)).filter(([_, value]) => isDefined(value)).reduce((headers2, [key, value]) => __spreadProps(__spreadValues({}, headers2), {
212
+ const headers = Object.entries({
213
+ Accept: "application/json",
214
+ ...additionalHeaders,
215
+ ...options.headers
216
+ }).filter(([_, value]) => isDefined(value)).reduce((headers2, [key, value]) => ({
217
+ ...headers2,
225
218
  [key]: String(value)
226
219
  }), {});
227
220
  if (isStringWithValue(token)) {
@@ -245,9 +238,8 @@ const getHeaders = async (config, options) => {
245
238
  return new Headers(headers);
246
239
  };
247
240
  const getRequestBody = (options) => {
248
- var _a;
249
241
  if (options.body) {
250
- if ((_a = options.mediaType) == null ? void 0 : _a.includes("/json")) {
242
+ if (options.mediaType?.includes("/json")) {
251
243
  return JSON.stringify(options.body);
252
244
  } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
253
245
  return options.body;
@@ -261,7 +253,7 @@ const sendRequest = async (config, options, url, body, formData, headers, onCanc
261
253
  const controller = new AbortController();
262
254
  const request2 = {
263
255
  headers,
264
- body: body != null ? body : formData,
256
+ body: body ?? formData,
265
257
  method: options.method,
266
258
  signal: controller.signal
267
259
  };
@@ -299,15 +291,16 @@ const getResponseBody = async (response) => {
299
291
  return void 0;
300
292
  };
301
293
  const catchErrorCodes = (options, result) => {
302
- const errors = __spreadValues({
294
+ const errors = {
303
295
  400: "Bad Request",
304
296
  401: "Unauthorized",
305
297
  403: "Forbidden",
306
298
  404: "Not Found",
307
299
  500: "Internal Server Error",
308
300
  502: "Bad Gateway",
309
- 503: "Service Unavailable"
310
- }, options.errors);
301
+ 503: "Service Unavailable",
302
+ ...options.errors
303
+ };
311
304
  const error = errors[result.status];
312
305
  if (error) {
313
306
  throw new ApiError(options, result, error);
@@ -332,7 +325,7 @@ const request = (config, options) => {
332
325
  ok: response.ok,
333
326
  status: response.status,
334
327
  statusText: response.statusText,
335
- body: responseHeader != null ? responseHeader : responseBody
328
+ body: responseHeader ?? responseBody
336
329
  };
337
330
  catchErrorCodes(options, result);
338
331
  resolve2(result.body);
@@ -352,6 +345,54 @@ class FetchHttpRequest extends BaseHttpRequest {
352
345
  }
353
346
  }
354
347
 
348
+ class DefaultService {
349
+ constructor(httpRequest) {
350
+ this.httpRequest = httpRequest;
351
+ }
352
+ mediaControllerUploadImage() {
353
+ return this.httpRequest.request({
354
+ method: "POST",
355
+ url: "/v1/media/uploadImage"
356
+ });
357
+ }
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
+ pageSize = 10,
370
+ pageToken,
371
+ status
372
+ }) {
373
+ return this.httpRequest.request({
374
+ method: "GET",
375
+ url: "/v1/webhooks",
376
+ query: {
377
+ "pageSize": pageSize,
378
+ "pageToken": pageToken,
379
+ "status": status
380
+ }
381
+ });
382
+ }
383
+ deactivateWebhook({
384
+ id
385
+ }) {
386
+ return this.httpRequest.request({
387
+ method: "DELETE",
388
+ url: "/v1/webhooks/{id}",
389
+ path: {
390
+ "id": id
391
+ }
392
+ });
393
+ }
394
+ }
395
+
355
396
  class EvmBalancesService {
356
397
  constructor(httpRequest) {
357
398
  this.httpRequest = httpRequest;
@@ -531,6 +572,41 @@ class EvmChainsService {
531
572
  }
532
573
  }
533
574
 
575
+ class EvmContractsService {
576
+ constructor(httpRequest) {
577
+ this.httpRequest = httpRequest;
578
+ }
579
+ getContractMetadata({
580
+ chainId,
581
+ address
582
+ }) {
583
+ return this.httpRequest.request({
584
+ method: "GET",
585
+ url: "/v1/chains/{chainId}/addresses/{address}",
586
+ path: {
587
+ "chainId": chainId,
588
+ "address": address
589
+ }
590
+ });
591
+ }
592
+ updateContractInfo({
593
+ chainId,
594
+ address,
595
+ requestBody
596
+ }) {
597
+ return this.httpRequest.request({
598
+ method: "PATCH",
599
+ url: "/v1/chains/{chainId}/contracts/{address}",
600
+ path: {
601
+ "chainId": chainId,
602
+ "address": address
603
+ },
604
+ body: requestBody,
605
+ mediaType: "application/json"
606
+ });
607
+ }
608
+ }
609
+
534
610
  class EvmTransactionsService {
535
611
  constructor(httpRequest) {
536
612
  this.httpRequest = httpRequest;
@@ -560,7 +636,7 @@ class EvmTransactionsService {
560
636
  }) {
561
637
  return this.httpRequest.request({
562
638
  method: "GET",
563
- url: "/v1/chains/{chainId}/addresses/{address}/deployments",
639
+ url: "/v1/chains/{chainId}/contracts/{address}/deployments",
564
640
  path: {
565
641
  "chainId": chainId,
566
642
  "address": address
@@ -815,31 +891,37 @@ class NfTsService {
815
891
  }
816
892
  });
817
893
  }
818
- getTokenDetails({
894
+ listTokens({
819
895
  chainId,
820
896
  address,
821
- tokenId
897
+ pageSize = 10,
898
+ pageToken
822
899
  }) {
823
900
  return this.httpRequest.request({
824
901
  method: "GET",
825
- url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}",
902
+ url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens",
826
903
  path: {
827
904
  "chainId": chainId,
828
- "address": address,
829
- "tokenId": tokenId
905
+ "address": address
906
+ },
907
+ query: {
908
+ "pageSize": pageSize,
909
+ "pageToken": pageToken
830
910
  }
831
911
  });
832
912
  }
833
- getCollection({
913
+ getTokenDetails({
834
914
  chainId,
835
- address
915
+ address,
916
+ tokenId
836
917
  }) {
837
918
  return this.httpRequest.request({
838
919
  method: "GET",
839
- url: "/v1/chains/{chainId}/nfts/collections/{address}",
920
+ url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}",
840
921
  path: {
841
922
  "chainId": chainId,
842
- "address": address
923
+ "address": address,
924
+ "tokenId": tokenId
843
925
  }
844
926
  });
845
927
  }
@@ -849,16 +931,6 @@ class OperationsService {
849
931
  constructor(httpRequest) {
850
932
  this.httpRequest = httpRequest;
851
933
  }
852
- postTransactionExportJob({
853
- requestBody
854
- }) {
855
- return this.httpRequest.request({
856
- method: "POST",
857
- url: "/v1/operations/transactions:export",
858
- body: requestBody,
859
- mediaType: "application/json"
860
- });
861
- }
862
934
  getOperationResult({
863
935
  operationId
864
936
  }) {
@@ -870,6 +942,16 @@ class OperationsService {
870
942
  }
871
943
  });
872
944
  }
945
+ postTransactionExportJob({
946
+ requestBody
947
+ }) {
948
+ return this.httpRequest.request({
949
+ method: "POST",
950
+ url: "/v1/operations/transactions:export",
951
+ body: requestBody,
952
+ mediaType: "application/json"
953
+ });
954
+ }
873
955
  }
874
956
 
875
957
  class PrimaryNetworkService {
@@ -959,10 +1041,16 @@ class PrimaryNetworkService {
959
1041
  network,
960
1042
  pageSize = 10,
961
1043
  pageToken,
1044
+ minTimeRemaining,
1045
+ maxTimeRemaining,
1046
+ minDelegationCapacity,
1047
+ maxDelegationCapacity,
1048
+ minFeePercentage,
1049
+ maxFeePercentage,
962
1050
  nodeIds,
963
1051
  sortOrder,
964
1052
  validationStatus,
965
- minDelegationCapacity
1053
+ subnetId
966
1054
  }) {
967
1055
  return this.httpRequest.request({
968
1056
  method: "GET",
@@ -973,10 +1061,16 @@ class PrimaryNetworkService {
973
1061
  query: {
974
1062
  "pageSize": pageSize,
975
1063
  "pageToken": pageToken,
1064
+ "minTimeRemaining": minTimeRemaining,
1065
+ "maxTimeRemaining": maxTimeRemaining,
1066
+ "minDelegationCapacity": minDelegationCapacity,
1067
+ "maxDelegationCapacity": maxDelegationCapacity,
1068
+ "minFeePercentage": minFeePercentage,
1069
+ "maxFeePercentage": maxFeePercentage,
976
1070
  "nodeIds": nodeIds,
977
1071
  "sortOrder": sortOrder,
978
1072
  "validationStatus": validationStatus,
979
- "minDelegationCapacity": minDelegationCapacity
1073
+ "subnetId": subnetId
980
1074
  }
981
1075
  });
982
1076
  }
@@ -1007,9 +1101,9 @@ class PrimaryNetworkService {
1007
1101
  network,
1008
1102
  pageSize = 10,
1009
1103
  pageToken,
1104
+ rewardAddresses,
1010
1105
  sortOrder,
1011
1106
  delegationStatus,
1012
- rewardAddresses,
1013
1107
  nodeIds
1014
1108
  }) {
1015
1109
  return this.httpRequest.request({
@@ -1021,9 +1115,9 @@ class PrimaryNetworkService {
1021
1115
  query: {
1022
1116
  "pageSize": pageSize,
1023
1117
  "pageToken": pageToken,
1118
+ "rewardAddresses": rewardAddresses,
1024
1119
  "sortOrder": sortOrder,
1025
1120
  "delegationStatus": delegationStatus,
1026
- "rewardAddresses": rewardAddresses,
1027
1121
  "nodeIds": nodeIds
1028
1122
  }
1029
1123
  });
@@ -1125,6 +1219,7 @@ class PrimaryNetworkRewardsService {
1125
1219
  addresses,
1126
1220
  pageSize = 10,
1127
1221
  pageToken,
1222
+ nodeIds,
1128
1223
  sortOrder
1129
1224
  }) {
1130
1225
  return this.httpRequest.request({
@@ -1137,6 +1232,7 @@ class PrimaryNetworkRewardsService {
1137
1232
  "addresses": addresses,
1138
1233
  "pageSize": pageSize,
1139
1234
  "pageToken": pageToken,
1235
+ "nodeIds": nodeIds,
1140
1236
  "sortOrder": sortOrder
1141
1237
  }
1142
1238
  });
@@ -1146,6 +1242,7 @@ class PrimaryNetworkRewardsService {
1146
1242
  addresses,
1147
1243
  pageSize = 10,
1148
1244
  pageToken,
1245
+ nodeIds,
1149
1246
  sortOrder
1150
1247
  }) {
1151
1248
  return this.httpRequest.request({
@@ -1158,6 +1255,7 @@ class PrimaryNetworkRewardsService {
1158
1255
  "addresses": addresses,
1159
1256
  "pageSize": pageSize,
1160
1257
  "pageToken": pageToken,
1258
+ "nodeIds": nodeIds,
1161
1259
  "sortOrder": sortOrder
1162
1260
  }
1163
1261
  });
@@ -1367,22 +1465,40 @@ class PrimaryNetworkVerticesService {
1367
1465
  }
1368
1466
 
1369
1467
  class Glacier {
1468
+ default;
1469
+ evmBalances;
1470
+ evmBlocks;
1471
+ evmChains;
1472
+ evmContracts;
1473
+ evmTransactions;
1474
+ healthCheck;
1475
+ nfTs;
1476
+ operations;
1477
+ primaryNetwork;
1478
+ primaryNetworkBalances;
1479
+ primaryNetworkBlocks;
1480
+ primaryNetworkRewards;
1481
+ primaryNetworkTransactions;
1482
+ primaryNetworkUtxOs;
1483
+ primaryNetworkVertices;
1484
+ request;
1370
1485
  constructor(config, HttpRequest = FetchHttpRequest) {
1371
- var _a, _b, _c, _d;
1372
1486
  this.request = new HttpRequest({
1373
- BASE: (_a = config == null ? void 0 : config.BASE) != null ? _a : "https://glacier-api-dev.avax.network",
1374
- VERSION: (_b = config == null ? void 0 : config.VERSION) != null ? _b : "Beta",
1375
- WITH_CREDENTIALS: (_c = config == null ? void 0 : config.WITH_CREDENTIALS) != null ? _c : false,
1376
- CREDENTIALS: (_d = config == null ? void 0 : config.CREDENTIALS) != null ? _d : "include",
1377
- TOKEN: config == null ? void 0 : config.TOKEN,
1378
- USERNAME: config == null ? void 0 : config.USERNAME,
1379
- PASSWORD: config == null ? void 0 : config.PASSWORD,
1380
- HEADERS: config == null ? void 0 : config.HEADERS,
1381
- ENCODE_PATH: config == null ? void 0 : config.ENCODE_PATH
1487
+ BASE: config?.BASE ?? "https://glacier-api-dev.avax.network",
1488
+ VERSION: config?.VERSION ?? "Beta",
1489
+ WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
1490
+ CREDENTIALS: config?.CREDENTIALS ?? "include",
1491
+ TOKEN: config?.TOKEN,
1492
+ USERNAME: config?.USERNAME,
1493
+ PASSWORD: config?.PASSWORD,
1494
+ HEADERS: config?.HEADERS,
1495
+ ENCODE_PATH: config?.ENCODE_PATH
1382
1496
  });
1497
+ this.default = new DefaultService(this.request);
1383
1498
  this.evmBalances = new EvmBalancesService(this.request);
1384
1499
  this.evmBlocks = new EvmBlocksService(this.request);
1385
1500
  this.evmChains = new EvmChainsService(this.request);
1501
+ this.evmContracts = new EvmContractsService(this.request);
1386
1502
  this.evmTransactions = new EvmTransactionsService(this.request);
1387
1503
  this.healthCheck = new HealthCheckService(this.request);
1388
1504
  this.nfTs = new NfTsService(this.request);
@@ -1409,6 +1525,20 @@ const OpenAPI = {
1409
1525
  ENCODE_PATH: void 0
1410
1526
  };
1411
1527
 
1528
+ exports.ActiveDelegatorDetails = void 0;
1529
+ ((ActiveDelegatorDetails2) => {
1530
+ ((delegationStatus2) => {
1531
+ delegationStatus2["ACTIVE"] = "active";
1532
+ })(ActiveDelegatorDetails2.delegationStatus || (ActiveDelegatorDetails2.delegationStatus = {}));
1533
+ })(exports.ActiveDelegatorDetails || (exports.ActiveDelegatorDetails = {}));
1534
+
1535
+ exports.ActiveValidatorDetails = void 0;
1536
+ ((ActiveValidatorDetails2) => {
1537
+ ((validationStatus2) => {
1538
+ validationStatus2["ACTIVE"] = "active";
1539
+ })(ActiveValidatorDetails2.validationStatus || (ActiveValidatorDetails2.validationStatus = {}));
1540
+ })(exports.ActiveValidatorDetails || (exports.ActiveValidatorDetails = {}));
1541
+
1412
1542
  var BlockchainId = /* @__PURE__ */ ((BlockchainId2) => {
1413
1543
  BlockchainId2["_11111111111111111111111111111111LPO_YY"] = "11111111111111111111111111111111LpoYY";
1414
1544
  BlockchainId2["_2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M"] = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM";
@@ -1450,6 +1580,48 @@ var ChainStatus = /* @__PURE__ */ ((ChainStatus2) => {
1450
1580
  return ChainStatus2;
1451
1581
  })(ChainStatus || {});
1452
1582
 
1583
+ exports.CompletedDelegatorDetails = void 0;
1584
+ ((CompletedDelegatorDetails2) => {
1585
+ ((delegationStatus2) => {
1586
+ delegationStatus2["COMPLETED"] = "completed";
1587
+ })(CompletedDelegatorDetails2.delegationStatus || (CompletedDelegatorDetails2.delegationStatus = {}));
1588
+ })(exports.CompletedDelegatorDetails || (exports.CompletedDelegatorDetails = {}));
1589
+
1590
+ exports.CompletedValidatorDetails = void 0;
1591
+ ((CompletedValidatorDetails2) => {
1592
+ ((validationStatus2) => {
1593
+ validationStatus2["COMPLETED"] = "completed";
1594
+ })(CompletedValidatorDetails2.validationStatus || (CompletedValidatorDetails2.validationStatus = {}));
1595
+ })(exports.CompletedValidatorDetails || (exports.CompletedValidatorDetails = {}));
1596
+
1597
+ exports.ContractSubmissionErc1155 = void 0;
1598
+ ((ContractSubmissionErc11552) => {
1599
+ ((ercType2) => {
1600
+ ercType2["ERC_1155"] = "ERC-1155";
1601
+ })(ContractSubmissionErc11552.ercType || (ContractSubmissionErc11552.ercType = {}));
1602
+ })(exports.ContractSubmissionErc1155 || (exports.ContractSubmissionErc1155 = {}));
1603
+
1604
+ exports.ContractSubmissionErc20 = void 0;
1605
+ ((ContractSubmissionErc202) => {
1606
+ ((ercType2) => {
1607
+ ercType2["ERC_20"] = "ERC-20";
1608
+ })(ContractSubmissionErc202.ercType || (ContractSubmissionErc202.ercType = {}));
1609
+ })(exports.ContractSubmissionErc20 || (exports.ContractSubmissionErc20 = {}));
1610
+
1611
+ exports.ContractSubmissionErc721 = void 0;
1612
+ ((ContractSubmissionErc7212) => {
1613
+ ((ercType2) => {
1614
+ ercType2["ERC_721"] = "ERC-721";
1615
+ })(ContractSubmissionErc7212.ercType || (ContractSubmissionErc7212.ercType = {}));
1616
+ })(exports.ContractSubmissionErc721 || (exports.ContractSubmissionErc721 = {}));
1617
+
1618
+ exports.ContractSubmissionUnknown = void 0;
1619
+ ((ContractSubmissionUnknown2) => {
1620
+ ((ercType2) => {
1621
+ ercType2["UNKNOWN"] = "UNKNOWN";
1622
+ })(ContractSubmissionUnknown2.ercType || (ContractSubmissionUnknown2.ercType = {}));
1623
+ })(exports.ContractSubmissionUnknown || (exports.ContractSubmissionUnknown = {}));
1624
+
1453
1625
  exports.CreateEvmTransactionExportRequest = void 0;
1454
1626
  ((CreateEvmTransactionExportRequest2) => {
1455
1627
  ((type2) => {
@@ -1552,6 +1724,11 @@ exports.Erc721TokenBalance = void 0;
1552
1724
  })(Erc721TokenBalance2.ercType || (Erc721TokenBalance2.ercType = {}));
1553
1725
  })(exports.Erc721TokenBalance || (exports.Erc721TokenBalance = {}));
1554
1726
 
1727
+ var EventType = /* @__PURE__ */ ((EventType2) => {
1728
+ EventType2["ADDRESS_ACTIVITY"] = "address_activity";
1729
+ return EventType2;
1730
+ })(EventType || {});
1731
+
1555
1732
  var InternalTransactionOpCall = /* @__PURE__ */ ((InternalTransactionOpCall2) => {
1556
1733
  InternalTransactionOpCall2["UNKNOWN"] = "UNKNOWN";
1557
1734
  InternalTransactionOpCall2["CALL"] = "CALL";
@@ -1621,6 +1798,7 @@ var PChainTransactionType = /* @__PURE__ */ ((PChainTransactionType2) => {
1621
1798
  PChainTransactionType2["ADD_VALIDATOR_TX"] = "AddValidatorTx";
1622
1799
  PChainTransactionType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
1623
1800
  PChainTransactionType2["ADD_PERMISSIONLESS_VALIDATOR_TX"] = "AddPermissionlessValidatorTx";
1801
+ PChainTransactionType2["ADD_PERMISSIONLESS_DELEGATOR_TX"] = "AddPermissionlessDelegatorTx";
1624
1802
  PChainTransactionType2["ADD_SUBNET_VALIDATOR_TX"] = "AddSubnetValidatorTx";
1625
1803
  PChainTransactionType2["REMOVE_SUBNET_VALIDATOR_TX"] = "RemoveSubnetValidatorTx";
1626
1804
  PChainTransactionType2["REWARD_VALIDATOR_TX"] = "RewardValidatorTx";
@@ -1633,6 +1811,20 @@ var PChainTransactionType = /* @__PURE__ */ ((PChainTransactionType2) => {
1633
1811
  return PChainTransactionType2;
1634
1812
  })(PChainTransactionType || {});
1635
1813
 
1814
+ exports.PendingDelegatorDetails = void 0;
1815
+ ((PendingDelegatorDetails2) => {
1816
+ ((delegationStatus2) => {
1817
+ delegationStatus2["PENDING"] = "pending";
1818
+ })(PendingDelegatorDetails2.delegationStatus || (PendingDelegatorDetails2.delegationStatus = {}));
1819
+ })(exports.PendingDelegatorDetails || (exports.PendingDelegatorDetails = {}));
1820
+
1821
+ exports.PendingValidatorDetails = void 0;
1822
+ ((PendingValidatorDetails2) => {
1823
+ ((validationStatus2) => {
1824
+ validationStatus2["PENDING"] = "pending";
1825
+ })(PendingValidatorDetails2.validationStatus || (PendingValidatorDetails2.validationStatus = {}));
1826
+ })(exports.PendingValidatorDetails || (exports.PendingValidatorDetails = {}));
1827
+
1636
1828
  var PrimaryNetwork = /* @__PURE__ */ ((PrimaryNetwork2) => {
1637
1829
  PrimaryNetwork2["MAINNET"] = "mainnet";
1638
1830
  PrimaryNetwork2["FUJI"] = "fuji";
@@ -1650,6 +1842,7 @@ var PrimaryNetworkTxType = /* @__PURE__ */ ((PrimaryNetworkTxType2) => {
1650
1842
  PrimaryNetworkTxType2["ADD_VALIDATOR_TX"] = "AddValidatorTx";
1651
1843
  PrimaryNetworkTxType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
1652
1844
  PrimaryNetworkTxType2["ADD_PERMISSIONLESS_VALIDATOR_TX"] = "AddPermissionlessValidatorTx";
1845
+ PrimaryNetworkTxType2["ADD_PERMISSIONLESS_DELEGATOR_TX"] = "AddPermissionlessDelegatorTx";
1653
1846
  PrimaryNetworkTxType2["ADD_SUBNET_VALIDATOR_TX"] = "AddSubnetValidatorTx";
1654
1847
  PrimaryNetworkTxType2["REMOVE_SUBNET_VALIDATOR_TX"] = "RemoveSubnetValidatorTx";
1655
1848
  PrimaryNetworkTxType2["REWARD_VALIDATOR_TX"] = "RewardValidatorTx";
@@ -1690,6 +1883,7 @@ var ResourceLinkType = /* @__PURE__ */ ((ResourceLinkType2) => {
1690
1883
  var RewardType = /* @__PURE__ */ ((RewardType2) => {
1691
1884
  RewardType2["VALIDATOR"] = "VALIDATOR";
1692
1885
  RewardType2["DELEGATOR"] = "DELEGATOR";
1886
+ RewardType2["VALIDATOR_FEE"] = "VALIDATOR_FEE";
1693
1887
  return RewardType2;
1694
1888
  })(RewardType || {});
1695
1889
 
@@ -1739,6 +1933,18 @@ var VmName = /* @__PURE__ */ ((VmName2) => {
1739
1933
  return VmName2;
1740
1934
  })(VmName || {});
1741
1935
 
1936
+ var WebhookStatus = /* @__PURE__ */ ((WebhookStatus2) => {
1937
+ WebhookStatus2["ACTIVE"] = "active";
1938
+ WebhookStatus2["INACTIVE"] = "inactive";
1939
+ return WebhookStatus2;
1940
+ })(WebhookStatus || {});
1941
+
1942
+ var WebhookStatusType = /* @__PURE__ */ ((WebhookStatusType2) => {
1943
+ WebhookStatusType2["ACTIVE"] = "active";
1944
+ WebhookStatusType2["INACTIVE"] = "inactive";
1945
+ return WebhookStatusType2;
1946
+ })(WebhookStatusType || {});
1947
+
1742
1948
  var XChainId = /* @__PURE__ */ ((XChainId2) => {
1743
1949
  XChainId2["_2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M"] = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM";
1744
1950
  XChainId2["_2JVSBOINJ9C2J33VNTVZ_YT_VJNZD_N2NKIWW_KJCUM_HUWEB5DB_BRM"] = "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm";
@@ -1762,6 +1968,16 @@ exports.XChainNonLinearTransaction = void 0;
1762
1968
  })(XChainNonLinearTransaction2.chainFormat || (XChainNonLinearTransaction2.chainFormat = {}));
1763
1969
  })(exports.XChainNonLinearTransaction || (exports.XChainNonLinearTransaction = {}));
1764
1970
 
1971
+ var XChainTransactionType = /* @__PURE__ */ ((XChainTransactionType2) => {
1972
+ XChainTransactionType2["BASE_TX"] = "BaseTx";
1973
+ XChainTransactionType2["CREATE_ASSET_TX"] = "CreateAssetTx";
1974
+ XChainTransactionType2["OPERATION_TX"] = "OperationTx";
1975
+ XChainTransactionType2["IMPORT_TX"] = "ImportTx";
1976
+ XChainTransactionType2["EXPORT_TX"] = "ExportTx";
1977
+ XChainTransactionType2["UNKNOWN"] = "UNKNOWN";
1978
+ return XChainTransactionType2;
1979
+ })(XChainTransactionType || {});
1980
+
1765
1981
  exports.ApiError = ApiError;
1766
1982
  exports.BaseHttpRequest = BaseHttpRequest;
1767
1983
  exports.BlockchainId = BlockchainId;
@@ -1770,10 +1986,13 @@ exports.CancelError = CancelError;
1770
1986
  exports.CancelablePromise = CancelablePromise;
1771
1987
  exports.ChainStatus = ChainStatus;
1772
1988
  exports.CurrencyCode = CurrencyCode;
1989
+ exports.DefaultService = DefaultService;
1773
1990
  exports.DelegationStatusType = DelegationStatusType;
1991
+ exports.EventType = EventType;
1774
1992
  exports.EvmBalancesService = EvmBalancesService;
1775
1993
  exports.EvmBlocksService = EvmBlocksService;
1776
1994
  exports.EvmChainsService = EvmChainsService;
1995
+ exports.EvmContractsService = EvmContractsService;
1777
1996
  exports.EvmTransactionsService = EvmTransactionsService;
1778
1997
  exports.Glacier = Glacier;
1779
1998
  exports.HealthCheckService = HealthCheckService;
@@ -1807,4 +2026,7 @@ exports.TransactionStatus = TransactionStatus;
1807
2026
  exports.UtxoType = UtxoType;
1808
2027
  exports.ValidationStatusType = ValidationStatusType;
1809
2028
  exports.VmName = VmName;
2029
+ exports.WebhookStatus = WebhookStatus;
2030
+ exports.WebhookStatusType = WebhookStatusType;
1810
2031
  exports.XChainId = XChainId;
2032
+ exports.XChainTransactionType = XChainTransactionType;
@@ -1,8 +1,10 @@
1
1
  import { BaseHttpRequest } from './core/BaseHttpRequest.js';
2
2
  import { OpenAPIConfig } from './core/OpenAPI.js';
3
+ import { DefaultService } from './services/DefaultService.js';
3
4
  import { EvmBalancesService } from './services/EvmBalancesService.js';
4
5
  import { EvmBlocksService } from './services/EvmBlocksService.js';
5
6
  import { EvmChainsService } from './services/EvmChainsService.js';
7
+ import { EvmContractsService } from './services/EvmContractsService.js';
6
8
  import { EvmTransactionsService } from './services/EvmTransactionsService.js';
7
9
  import { HealthCheckService } from './services/HealthCheckService.js';
8
10
  import { NfTsService } from './services/NfTsService.js';
@@ -17,9 +19,11 @@ import { PrimaryNetworkVerticesService } from './services/PrimaryNetworkVertices
17
19
 
18
20
  type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
19
21
  declare class Glacier {
22
+ readonly default: DefaultService;
20
23
  readonly evmBalances: EvmBalancesService;
21
24
  readonly evmBlocks: EvmBlocksService;
22
25
  readonly evmChains: EvmChainsService;
26
+ readonly evmContracts: EvmContractsService;
23
27
  readonly evmTransactions: EvmTransactionsService;
24
28
  readonly healthCheck: HealthCheckService;
25
29
  readonly nfTs: NfTsService;