@avalabs/glacier-sdk 2.8.0-canary.3610e84.0 → 2.8.0-canary.430ff95.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 (83) hide show
  1. package/dist/index.d.ts +728 -252
  2. package/dist/index.js +332 -61
  3. package/esm/generated/Glacier.d.ts +6 -0
  4. package/esm/generated/Glacier.js +32 -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/Erc1155Contract.d.ts +2 -1
  28. package/esm/generated/models/Erc20Contract.d.ts +2 -1
  29. package/esm/generated/models/Erc721Contract.d.ts +0 -1
  30. package/esm/generated/models/EventType.d.ts +5 -0
  31. package/esm/generated/models/EventType.js +6 -0
  32. package/esm/generated/models/GetChainResponse.d.ts +1 -0
  33. package/esm/generated/models/GetPrimaryNetworkBlockResponse.d.ts +1 -0
  34. package/esm/generated/models/ImageAsset.d.ts +0 -3
  35. package/esm/generated/models/ListContractsResponse.d.ts +1 -1
  36. package/esm/generated/models/ListNftTokens.d.ts +12 -0
  37. package/esm/generated/models/ListValidatorDetailsResponse.d.ts +1 -1
  38. package/esm/generated/models/ListWebhooksResponse.d.ts +11 -0
  39. package/esm/generated/models/PChainTransaction.d.ts +1 -0
  40. package/esm/generated/models/PChainTransactionType.d.ts +1 -0
  41. package/esm/generated/models/PChainTransactionType.js +1 -0
  42. package/esm/generated/models/PendingDelegatorDetails.d.ts +7 -3
  43. package/esm/generated/models/PendingDelegatorDetails.js +8 -0
  44. package/esm/generated/models/PendingValidatorDetails.d.ts +9 -4
  45. package/esm/generated/models/PendingValidatorDetails.js +8 -0
  46. package/esm/generated/models/PricingProviders.d.ts +5 -0
  47. package/esm/generated/models/PrimaryNetworkBlock.d.ts +1 -0
  48. package/esm/generated/models/PrimaryNetworkTxType.d.ts +1 -0
  49. package/esm/generated/models/PrimaryNetworkTxType.js +1 -0
  50. package/esm/generated/models/RegisterWebhookRequest.d.ts +14 -0
  51. package/esm/generated/models/RewardType.d.ts +2 -1
  52. package/esm/generated/models/RewardType.js +1 -0
  53. package/esm/generated/models/Rewards.d.ts +2 -0
  54. package/esm/generated/models/UnknownContract.d.ts +0 -1
  55. package/esm/generated/models/UpdateContractResponse.d.ts +10 -0
  56. package/esm/generated/models/ValidatorHealthDetails.d.ts +20 -0
  57. package/esm/generated/models/WebhookResponse.d.ts +15 -0
  58. package/esm/generated/models/WebhookStatus.d.ts +6 -0
  59. package/esm/generated/models/WebhookStatus.js +7 -0
  60. package/esm/generated/models/WebhookStatusType.d.ts +6 -0
  61. package/esm/generated/models/WebhookStatusType.js +7 -0
  62. package/esm/generated/models/XChainLinearTransaction.d.ts +2 -1
  63. package/esm/generated/models/XChainNonLinearTransaction.d.ts +2 -1
  64. package/esm/generated/models/XChainTransactionType.d.ts +10 -0
  65. package/esm/generated/models/XChainTransactionType.js +11 -0
  66. package/esm/generated/services/DefaultService.d.ts +59 -0
  67. package/esm/generated/services/DefaultService.js +49 -0
  68. package/esm/generated/services/EvmContractsService.d.ts +48 -0
  69. package/esm/generated/services/EvmContractsService.js +36 -0
  70. package/esm/generated/services/EvmTransactionsService.d.ts +42 -0
  71. package/esm/generated/services/EvmTransactionsService.js +1 -1
  72. package/esm/generated/services/NfTsService.d.ts +76 -0
  73. package/esm/generated/services/NfTsService.js +56 -0
  74. package/esm/generated/services/OperationsService.d.ts +11 -11
  75. package/esm/generated/services/OperationsService.js +10 -10
  76. package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +10 -2
  77. package/esm/generated/services/PrimaryNetworkRewardsService.js +4 -0
  78. package/esm/generated/services/PrimaryNetworkService.d.ts +32 -12
  79. package/esm/generated/services/PrimaryNetworkService.js +17 -7
  80. package/esm/generated/services/PrimaryNetworkTransactionsService.d.ts +5 -1
  81. package/esm/index.d.ts +20 -0
  82. package/esm/index.js +17 -0
  83. 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
@@ -796,20 +872,65 @@ class HealthCheckService {
796
872
  }
797
873
  }
798
874
 
799
- class OperationsService {
875
+ class NfTsService {
800
876
  constructor(httpRequest) {
801
877
  this.httpRequest = httpRequest;
802
878
  }
803
- postTransactionExportJob({
804
- requestBody
879
+ reindexNft({
880
+ chainId,
881
+ address,
882
+ tokenId
805
883
  }) {
806
884
  return this.httpRequest.request({
807
885
  method: "POST",
808
- url: "/v1/operations/transactions:export",
809
- body: requestBody,
810
- mediaType: "application/json"
886
+ url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}:reindex",
887
+ path: {
888
+ "chainId": chainId,
889
+ "address": address,
890
+ "tokenId": tokenId
891
+ }
811
892
  });
812
893
  }
894
+ listTokens({
895
+ chainId,
896
+ address,
897
+ pageSize = 10,
898
+ pageToken
899
+ }) {
900
+ return this.httpRequest.request({
901
+ method: "GET",
902
+ url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens",
903
+ path: {
904
+ "chainId": chainId,
905
+ "address": address
906
+ },
907
+ query: {
908
+ "pageSize": pageSize,
909
+ "pageToken": pageToken
910
+ }
911
+ });
912
+ }
913
+ getTokenDetails({
914
+ chainId,
915
+ address,
916
+ tokenId
917
+ }) {
918
+ return this.httpRequest.request({
919
+ method: "GET",
920
+ url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}",
921
+ path: {
922
+ "chainId": chainId,
923
+ "address": address,
924
+ "tokenId": tokenId
925
+ }
926
+ });
927
+ }
928
+ }
929
+
930
+ class OperationsService {
931
+ constructor(httpRequest) {
932
+ this.httpRequest = httpRequest;
933
+ }
813
934
  getOperationResult({
814
935
  operationId
815
936
  }) {
@@ -821,6 +942,16 @@ class OperationsService {
821
942
  }
822
943
  });
823
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
+ }
824
955
  }
825
956
 
826
957
  class PrimaryNetworkService {
@@ -910,10 +1041,16 @@ class PrimaryNetworkService {
910
1041
  network,
911
1042
  pageSize = 10,
912
1043
  pageToken,
1044
+ minTimeRemaining,
1045
+ maxTimeRemaining,
1046
+ minDelegationCapacity,
1047
+ maxDelegationCapacity,
1048
+ minFeePercentage,
1049
+ maxFeePercentage,
913
1050
  nodeIds,
914
1051
  sortOrder,
915
1052
  validationStatus,
916
- minDelegationCapacity
1053
+ subnetId
917
1054
  }) {
918
1055
  return this.httpRequest.request({
919
1056
  method: "GET",
@@ -924,10 +1061,16 @@ class PrimaryNetworkService {
924
1061
  query: {
925
1062
  "pageSize": pageSize,
926
1063
  "pageToken": pageToken,
1064
+ "minTimeRemaining": minTimeRemaining,
1065
+ "maxTimeRemaining": maxTimeRemaining,
1066
+ "minDelegationCapacity": minDelegationCapacity,
1067
+ "maxDelegationCapacity": maxDelegationCapacity,
1068
+ "minFeePercentage": minFeePercentage,
1069
+ "maxFeePercentage": maxFeePercentage,
927
1070
  "nodeIds": nodeIds,
928
1071
  "sortOrder": sortOrder,
929
1072
  "validationStatus": validationStatus,
930
- "minDelegationCapacity": minDelegationCapacity
1073
+ "subnetId": subnetId
931
1074
  }
932
1075
  });
933
1076
  }
@@ -956,27 +1099,25 @@ class PrimaryNetworkService {
956
1099
  }
957
1100
  listDelegators({
958
1101
  network,
959
- nodeId,
960
1102
  pageSize = 10,
961
1103
  pageToken,
1104
+ rewardAddresses,
962
1105
  sortOrder,
963
1106
  delegationStatus,
964
- rewardAddresses,
965
1107
  nodeIds
966
1108
  }) {
967
1109
  return this.httpRequest.request({
968
1110
  method: "GET",
969
1111
  url: "/v1/networks/{network}/delegators",
970
1112
  path: {
971
- "network": network,
972
- "nodeId": nodeId
1113
+ "network": network
973
1114
  },
974
1115
  query: {
975
1116
  "pageSize": pageSize,
976
1117
  "pageToken": pageToken,
1118
+ "rewardAddresses": rewardAddresses,
977
1119
  "sortOrder": sortOrder,
978
1120
  "delegationStatus": delegationStatus,
979
- "rewardAddresses": rewardAddresses,
980
1121
  "nodeIds": nodeIds
981
1122
  }
982
1123
  });
@@ -1078,6 +1219,7 @@ class PrimaryNetworkRewardsService {
1078
1219
  addresses,
1079
1220
  pageSize = 10,
1080
1221
  pageToken,
1222
+ nodeIds,
1081
1223
  sortOrder
1082
1224
  }) {
1083
1225
  return this.httpRequest.request({
@@ -1090,6 +1232,7 @@ class PrimaryNetworkRewardsService {
1090
1232
  "addresses": addresses,
1091
1233
  "pageSize": pageSize,
1092
1234
  "pageToken": pageToken,
1235
+ "nodeIds": nodeIds,
1093
1236
  "sortOrder": sortOrder
1094
1237
  }
1095
1238
  });
@@ -1099,6 +1242,7 @@ class PrimaryNetworkRewardsService {
1099
1242
  addresses,
1100
1243
  pageSize = 10,
1101
1244
  pageToken,
1245
+ nodeIds,
1102
1246
  sortOrder
1103
1247
  }) {
1104
1248
  return this.httpRequest.request({
@@ -1111,6 +1255,7 @@ class PrimaryNetworkRewardsService {
1111
1255
  "addresses": addresses,
1112
1256
  "pageSize": pageSize,
1113
1257
  "pageToken": pageToken,
1258
+ "nodeIds": nodeIds,
1114
1259
  "sortOrder": sortOrder
1115
1260
  }
1116
1261
  });
@@ -1320,24 +1465,43 @@ class PrimaryNetworkVerticesService {
1320
1465
  }
1321
1466
 
1322
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;
1323
1485
  constructor(config, HttpRequest = FetchHttpRequest) {
1324
- var _a, _b, _c, _d;
1325
1486
  this.request = new HttpRequest({
1326
- BASE: (_a = config == null ? void 0 : config.BASE) != null ? _a : "https://glacier-api-dev.avax.network",
1327
- VERSION: (_b = config == null ? void 0 : config.VERSION) != null ? _b : "Beta",
1328
- WITH_CREDENTIALS: (_c = config == null ? void 0 : config.WITH_CREDENTIALS) != null ? _c : false,
1329
- CREDENTIALS: (_d = config == null ? void 0 : config.CREDENTIALS) != null ? _d : "include",
1330
- TOKEN: config == null ? void 0 : config.TOKEN,
1331
- USERNAME: config == null ? void 0 : config.USERNAME,
1332
- PASSWORD: config == null ? void 0 : config.PASSWORD,
1333
- HEADERS: config == null ? void 0 : config.HEADERS,
1334
- 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
1335
1496
  });
1497
+ this.default = new DefaultService(this.request);
1336
1498
  this.evmBalances = new EvmBalancesService(this.request);
1337
1499
  this.evmBlocks = new EvmBlocksService(this.request);
1338
1500
  this.evmChains = new EvmChainsService(this.request);
1501
+ this.evmContracts = new EvmContractsService(this.request);
1339
1502
  this.evmTransactions = new EvmTransactionsService(this.request);
1340
1503
  this.healthCheck = new HealthCheckService(this.request);
1504
+ this.nfTs = new NfTsService(this.request);
1341
1505
  this.operations = new OperationsService(this.request);
1342
1506
  this.primaryNetwork = new PrimaryNetworkService(this.request);
1343
1507
  this.primaryNetworkBalances = new PrimaryNetworkBalancesService(this.request);
@@ -1361,6 +1525,20 @@ const OpenAPI = {
1361
1525
  ENCODE_PATH: void 0
1362
1526
  };
1363
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
+
1364
1542
  var BlockchainId = /* @__PURE__ */ ((BlockchainId2) => {
1365
1543
  BlockchainId2["_11111111111111111111111111111111LPO_YY"] = "11111111111111111111111111111111LpoYY";
1366
1544
  BlockchainId2["_2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M"] = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM";
@@ -1402,6 +1580,48 @@ var ChainStatus = /* @__PURE__ */ ((ChainStatus2) => {
1402
1580
  return ChainStatus2;
1403
1581
  })(ChainStatus || {});
1404
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
+
1405
1625
  exports.CreateEvmTransactionExportRequest = void 0;
1406
1626
  ((CreateEvmTransactionExportRequest2) => {
1407
1627
  ((type2) => {
@@ -1504,6 +1724,11 @@ exports.Erc721TokenBalance = void 0;
1504
1724
  })(Erc721TokenBalance2.ercType || (Erc721TokenBalance2.ercType = {}));
1505
1725
  })(exports.Erc721TokenBalance || (exports.Erc721TokenBalance = {}));
1506
1726
 
1727
+ var EventType = /* @__PURE__ */ ((EventType2) => {
1728
+ EventType2["ADDRESS_ACTIVITY"] = "address_activity";
1729
+ return EventType2;
1730
+ })(EventType || {});
1731
+
1507
1732
  var InternalTransactionOpCall = /* @__PURE__ */ ((InternalTransactionOpCall2) => {
1508
1733
  InternalTransactionOpCall2["UNKNOWN"] = "UNKNOWN";
1509
1734
  InternalTransactionOpCall2["CALL"] = "CALL";
@@ -1573,6 +1798,7 @@ var PChainTransactionType = /* @__PURE__ */ ((PChainTransactionType2) => {
1573
1798
  PChainTransactionType2["ADD_VALIDATOR_TX"] = "AddValidatorTx";
1574
1799
  PChainTransactionType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
1575
1800
  PChainTransactionType2["ADD_PERMISSIONLESS_VALIDATOR_TX"] = "AddPermissionlessValidatorTx";
1801
+ PChainTransactionType2["ADD_PERMISSIONLESS_DELEGATOR_TX"] = "AddPermissionlessDelegatorTx";
1576
1802
  PChainTransactionType2["ADD_SUBNET_VALIDATOR_TX"] = "AddSubnetValidatorTx";
1577
1803
  PChainTransactionType2["REMOVE_SUBNET_VALIDATOR_TX"] = "RemoveSubnetValidatorTx";
1578
1804
  PChainTransactionType2["REWARD_VALIDATOR_TX"] = "RewardValidatorTx";
@@ -1585,6 +1811,20 @@ var PChainTransactionType = /* @__PURE__ */ ((PChainTransactionType2) => {
1585
1811
  return PChainTransactionType2;
1586
1812
  })(PChainTransactionType || {});
1587
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
+
1588
1828
  var PrimaryNetwork = /* @__PURE__ */ ((PrimaryNetwork2) => {
1589
1829
  PrimaryNetwork2["MAINNET"] = "mainnet";
1590
1830
  PrimaryNetwork2["FUJI"] = "fuji";
@@ -1602,6 +1842,7 @@ var PrimaryNetworkTxType = /* @__PURE__ */ ((PrimaryNetworkTxType2) => {
1602
1842
  PrimaryNetworkTxType2["ADD_VALIDATOR_TX"] = "AddValidatorTx";
1603
1843
  PrimaryNetworkTxType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
1604
1844
  PrimaryNetworkTxType2["ADD_PERMISSIONLESS_VALIDATOR_TX"] = "AddPermissionlessValidatorTx";
1845
+ PrimaryNetworkTxType2["ADD_PERMISSIONLESS_DELEGATOR_TX"] = "AddPermissionlessDelegatorTx";
1605
1846
  PrimaryNetworkTxType2["ADD_SUBNET_VALIDATOR_TX"] = "AddSubnetValidatorTx";
1606
1847
  PrimaryNetworkTxType2["REMOVE_SUBNET_VALIDATOR_TX"] = "RemoveSubnetValidatorTx";
1607
1848
  PrimaryNetworkTxType2["REWARD_VALIDATOR_TX"] = "RewardValidatorTx";
@@ -1642,6 +1883,7 @@ var ResourceLinkType = /* @__PURE__ */ ((ResourceLinkType2) => {
1642
1883
  var RewardType = /* @__PURE__ */ ((RewardType2) => {
1643
1884
  RewardType2["VALIDATOR"] = "VALIDATOR";
1644
1885
  RewardType2["DELEGATOR"] = "DELEGATOR";
1886
+ RewardType2["VALIDATOR_FEE"] = "VALIDATOR_FEE";
1645
1887
  return RewardType2;
1646
1888
  })(RewardType || {});
1647
1889
 
@@ -1691,6 +1933,18 @@ var VmName = /* @__PURE__ */ ((VmName2) => {
1691
1933
  return VmName2;
1692
1934
  })(VmName || {});
1693
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
+
1694
1948
  var XChainId = /* @__PURE__ */ ((XChainId2) => {
1695
1949
  XChainId2["_2O_YMBNV4E_NHYQK2FJJ_V5N_VQLDBTM_NJZQ5S3QS3LO6FTN_C6FBY_M"] = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM";
1696
1950
  XChainId2["_2JVSBOINJ9C2J33VNTVZ_YT_VJNZD_N2NKIWW_KJCUM_HUWEB5DB_BRM"] = "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm";
@@ -1714,6 +1968,16 @@ exports.XChainNonLinearTransaction = void 0;
1714
1968
  })(XChainNonLinearTransaction2.chainFormat || (XChainNonLinearTransaction2.chainFormat = {}));
1715
1969
  })(exports.XChainNonLinearTransaction || (exports.XChainNonLinearTransaction = {}));
1716
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
+
1717
1981
  exports.ApiError = ApiError;
1718
1982
  exports.BaseHttpRequest = BaseHttpRequest;
1719
1983
  exports.BlockchainId = BlockchainId;
@@ -1722,16 +1986,20 @@ exports.CancelError = CancelError;
1722
1986
  exports.CancelablePromise = CancelablePromise;
1723
1987
  exports.ChainStatus = ChainStatus;
1724
1988
  exports.CurrencyCode = CurrencyCode;
1989
+ exports.DefaultService = DefaultService;
1725
1990
  exports.DelegationStatusType = DelegationStatusType;
1991
+ exports.EventType = EventType;
1726
1992
  exports.EvmBalancesService = EvmBalancesService;
1727
1993
  exports.EvmBlocksService = EvmBlocksService;
1728
1994
  exports.EvmChainsService = EvmChainsService;
1995
+ exports.EvmContractsService = EvmContractsService;
1729
1996
  exports.EvmTransactionsService = EvmTransactionsService;
1730
1997
  exports.Glacier = Glacier;
1731
1998
  exports.HealthCheckService = HealthCheckService;
1732
1999
  exports.InternalTransactionOpCall = InternalTransactionOpCall;
1733
2000
  exports.Network = Network;
1734
2001
  exports.NetworkType = NetworkType;
2002
+ exports.NfTsService = NfTsService;
1735
2003
  exports.NftTokenMetadataStatus = NftTokenMetadataStatus;
1736
2004
  exports.OpenAPI = OpenAPI;
1737
2005
  exports.OperationStatus = OperationStatus;
@@ -1758,4 +2026,7 @@ exports.TransactionStatus = TransactionStatus;
1758
2026
  exports.UtxoType = UtxoType;
1759
2027
  exports.ValidationStatusType = ValidationStatusType;
1760
2028
  exports.VmName = VmName;
2029
+ exports.WebhookStatus = WebhookStatus;
2030
+ exports.WebhookStatusType = WebhookStatusType;
1761
2031
  exports.XChainId = XChainId;
2032
+ exports.XChainTransactionType = XChainTransactionType;