@avalabs/glacier-sdk 2.8.0-alpha.122 → 2.8.0-alpha.124

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 (70) hide show
  1. package/dist/index.d.ts +2254 -2088
  2. package/dist/index.js +298 -222
  3. package/esm/generated/Glacier.d.ts +20 -2
  4. package/esm/generated/Glacier.js +21 -3
  5. package/esm/generated/core/OpenAPI.js +1 -1
  6. package/esm/generated/models/ActiveDelegatorDetails.d.ts +15 -0
  7. package/esm/generated/models/ActiveValidatorDetails.d.ts +20 -0
  8. package/esm/generated/models/CompletedDelegatorDetails.d.ts +15 -0
  9. package/esm/generated/models/ContractDeploymentDetails.d.ts +13 -0
  10. package/esm/generated/models/DelegationStatusType.d.ts +7 -0
  11. package/esm/generated/models/DelegationStatusType.js +8 -0
  12. package/esm/generated/models/Erc1155Contract.d.ts +36 -0
  13. package/esm/generated/models/Erc1155Contract.js +8 -0
  14. package/esm/generated/models/Erc20Contract.d.ts +40 -0
  15. package/esm/generated/models/Erc20Contract.js +8 -0
  16. package/esm/generated/models/Erc721Contract.d.ts +36 -0
  17. package/esm/generated/models/Erc721Contract.js +8 -0
  18. package/esm/generated/models/ImageAsset.d.ts +12 -0
  19. package/esm/generated/models/ListContractsResponse.d.ts +14 -0
  20. package/esm/generated/models/ListDelegatorDetailsResponse.d.ts +16 -0
  21. package/esm/generated/models/ListValidatorDetailsResponse.d.ts +6 -1
  22. package/esm/generated/models/PendingDelegatorDetails.d.ts +15 -0
  23. package/esm/generated/models/PendingValidatorDetails.d.ts +12 -0
  24. package/esm/generated/models/PrimaryNetwork.d.ts +6 -0
  25. package/esm/generated/models/PrimaryNetwork.js +7 -0
  26. package/esm/generated/models/PrimaryNetworkChainInfo.d.ts +5 -2
  27. package/esm/generated/models/PrimaryNetworkChainName.d.ts +7 -0
  28. package/esm/generated/models/PrimaryNetworkChainName.js +8 -0
  29. package/esm/generated/models/StakingDistribution.d.ts +1 -0
  30. package/esm/generated/models/UnknownContract.d.ts +32 -0
  31. package/esm/generated/models/UnknownContract.js +8 -0
  32. package/esm/generated/models/ValidationStatusType.d.ts +3 -1
  33. package/esm/generated/models/ValidationStatusType.js +2 -0
  34. package/esm/generated/models/ValidatorsDetails.d.ts +1 -0
  35. package/esm/generated/services/EvmBalancesService.d.ts +177 -0
  36. package/esm/generated/services/EvmBalancesService.js +116 -0
  37. package/esm/generated/services/EvmBlocksService.d.ts +47 -0
  38. package/esm/generated/services/EvmBlocksService.js +37 -0
  39. package/esm/generated/services/EvmChainsService.d.ts +36 -0
  40. package/esm/generated/services/EvmChainsService.js +29 -0
  41. package/esm/generated/services/{EvmService.d.ts → EvmTransactionsService.d.ts} +9 -314
  42. package/esm/generated/services/{EvmService.js → EvmTransactionsService.js} +7 -219
  43. package/esm/generated/services/PrimaryNetworkBalancesService.d.ts +40 -0
  44. package/esm/generated/services/PrimaryNetworkBalancesService.js +26 -0
  45. package/esm/generated/services/PrimaryNetworkBlocksService.d.ts +85 -0
  46. package/esm/generated/services/PrimaryNetworkBlocksService.js +62 -0
  47. package/esm/generated/services/PrimaryNetworkRewardsService.d.ts +69 -0
  48. package/esm/generated/services/PrimaryNetworkRewardsService.js +49 -0
  49. package/esm/generated/services/PrimaryNetworkService.d.ts +51 -444
  50. package/esm/generated/services/PrimaryNetworkService.js +34 -305
  51. package/esm/generated/services/PrimaryNetworkTransactionsService.d.ts +171 -0
  52. package/esm/generated/services/PrimaryNetworkTransactionsService.js +107 -0
  53. package/esm/generated/services/PrimaryNetworkUtxOsService.d.ts +54 -0
  54. package/esm/generated/services/PrimaryNetworkUtxOsService.js +34 -0
  55. package/esm/generated/services/PrimaryNetworkVerticesService.d.ts +90 -0
  56. package/esm/generated/services/PrimaryNetworkVerticesService.js +64 -0
  57. package/esm/index.d.ts +26 -9
  58. package/esm/index.js +17 -4
  59. package/package.json +2 -2
  60. package/esm/generated/models/CollectionMetrics.d.ts +0 -41
  61. package/esm/generated/models/CollectionSortByOption.d.ts +0 -9
  62. package/esm/generated/models/CollectionSortByOption.js +0 -10
  63. package/esm/generated/models/ErcType.d.ts +0 -8
  64. package/esm/generated/models/ErcType.js +0 -9
  65. package/esm/generated/models/FloorPrice.d.ts +0 -8
  66. package/esm/generated/models/ListNftCollectionWithMetricsResponse.d.ts +0 -11
  67. package/esm/generated/models/NftCollection.d.ts +0 -24
  68. package/esm/generated/models/NftCollectionWithMetrics.d.ts +0 -26
  69. package/esm/generated/models/TrendingTimeframe.d.ts +0 -7
  70. package/esm/generated/models/TrendingTimeframe.js +0 -8
package/dist/index.js CHANGED
@@ -352,7 +352,7 @@ class FetchHttpRequest extends BaseHttpRequest {
352
352
  }
353
353
  }
354
354
 
355
- class EvmService {
355
+ class EvmBalancesService {
356
356
  constructor(httpRequest) {
357
357
  this.httpRequest = httpRequest;
358
358
  }
@@ -465,6 +465,12 @@ class EvmService {
465
465
  }
466
466
  });
467
467
  }
468
+ }
469
+
470
+ class EvmBlocksService {
471
+ constructor(httpRequest) {
472
+ this.httpRequest = httpRequest;
473
+ }
468
474
  getLatestBlocks({
469
475
  chainId,
470
476
  pageSize = 10,
@@ -495,22 +501,11 @@ class EvmService {
495
501
  }
496
502
  });
497
503
  }
498
- getDeploymentTransaction({
499
- chainId,
500
- address,
501
- currency
502
- }) {
503
- return this.httpRequest.request({
504
- method: "GET",
505
- url: "/v1/chains/{chainId}/contracts/{address}/transactions:getDeployment",
506
- path: {
507
- "chainId": chainId,
508
- "address": address
509
- },
510
- query: {
511
- "currency": currency
512
- }
513
- });
504
+ }
505
+
506
+ class EvmChainsService {
507
+ constructor(httpRequest) {
508
+ this.httpRequest = httpRequest;
514
509
  }
515
510
  supportedChains({
516
511
  network
@@ -534,73 +529,45 @@ class EvmService {
534
529
  }
535
530
  });
536
531
  }
537
- reindexNft({
538
- chainId,
539
- address,
540
- tokenId
541
- }) {
542
- return this.httpRequest.request({
543
- method: "POST",
544
- url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}:reindex",
545
- path: {
546
- "chainId": chainId,
547
- "address": address,
548
- "tokenId": tokenId
549
- }
550
- });
532
+ }
533
+
534
+ class EvmTransactionsService {
535
+ constructor(httpRequest) {
536
+ this.httpRequest = httpRequest;
551
537
  }
552
- getCollection({
538
+ getDeploymentTransaction({
553
539
  chainId,
554
540
  address,
555
- timeframe
541
+ currency
556
542
  }) {
557
543
  return this.httpRequest.request({
558
544
  method: "GET",
559
- url: "/v1/chains/{chainId}/nfts/collections/{address}",
545
+ url: "/v1/chains/{chainId}/contracts/{address}/transactions:getDeployment",
560
546
  path: {
561
547
  "chainId": chainId,
562
548
  "address": address
563
549
  },
564
550
  query: {
565
- "timeframe": timeframe
551
+ "currency": currency
566
552
  }
567
553
  });
568
554
  }
569
- listCollections({
555
+ listContractDeployments({
570
556
  chainId,
557
+ address,
571
558
  pageSize = 10,
572
- pageToken,
573
- timeframe,
574
- sortBy,
575
- sortOrder
559
+ pageToken
576
560
  }) {
577
561
  return this.httpRequest.request({
578
562
  method: "GET",
579
- url: "/v1/chains/{chainId}/nfts/collections",
563
+ url: "/v1/chains/{chainId}/addresses/{address}/deployments",
580
564
  path: {
581
- "chainId": chainId
565
+ "chainId": chainId,
566
+ "address": address
582
567
  },
583
568
  query: {
584
569
  "pageSize": pageSize,
585
- "pageToken": pageToken,
586
- "timeframe": timeframe,
587
- "sortBy": sortBy,
588
- "sortOrder": sortOrder
589
- }
590
- });
591
- }
592
- getTokenDetails({
593
- chainId,
594
- address,
595
- tokenId
596
- }) {
597
- return this.httpRequest.request({
598
- method: "GET",
599
- url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}",
600
- path: {
601
- "chainId": chainId,
602
- "address": address,
603
- "tokenId": tokenId
570
+ "pageToken": pageToken
604
571
  }
605
572
  });
606
573
  }
@@ -860,146 +827,166 @@ class PrimaryNetworkService {
860
827
  constructor(httpRequest) {
861
828
  this.httpRequest = httpRequest;
862
829
  }
863
- getTxByHash({
830
+ getAssetDetails({
864
831
  blockchainId,
865
832
  network,
866
- txHash
833
+ assetId
867
834
  }) {
868
835
  return this.httpRequest.request({
869
836
  method: "GET",
870
- url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions/{txHash}",
837
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}",
871
838
  path: {
872
839
  "blockchainId": blockchainId,
873
840
  "network": network,
874
- "txHash": txHash
841
+ "assetId": assetId
875
842
  }
876
843
  });
877
844
  }
878
- listLatestPrimaryNetworkTransactions({
879
- blockchainId,
880
- network,
845
+ getChainIdsForAddresses({
881
846
  addresses,
882
- txTypes,
883
- startTimestamp,
884
- endTimestamp,
847
+ network
848
+ }) {
849
+ return this.httpRequest.request({
850
+ method: "GET",
851
+ url: "/v1/networks/{network}/addresses:listChainIds",
852
+ path: {
853
+ "network": network
854
+ },
855
+ query: {
856
+ "addresses": addresses
857
+ }
858
+ });
859
+ }
860
+ getNetworkDetails({
861
+ network
862
+ }) {
863
+ return this.httpRequest.request({
864
+ method: "GET",
865
+ url: "/v1/networks/{network}",
866
+ path: {
867
+ "network": network
868
+ }
869
+ });
870
+ }
871
+ listBlockchains({
872
+ network,
885
873
  pageSize = 10,
886
874
  pageToken,
887
875
  sortOrder
888
876
  }) {
889
877
  return this.httpRequest.request({
890
878
  method: "GET",
891
- url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions",
879
+ url: "/v1/networks/{network}/blockchains",
892
880
  path: {
893
- "blockchainId": blockchainId,
894
881
  "network": network
895
882
  },
896
883
  query: {
897
- "addresses": addresses,
898
- "txTypes": txTypes,
899
- "startTimestamp": startTimestamp,
900
- "endTimestamp": endTimestamp,
901
884
  "pageSize": pageSize,
902
885
  "pageToken": pageToken,
903
886
  "sortOrder": sortOrder
904
887
  }
905
888
  });
906
889
  }
907
- listActivePrimaryNetworkStakingTransactions({
908
- blockchainId,
890
+ listSubnets({
909
891
  network,
910
- addresses,
911
- txTypes,
912
- startTimestamp,
913
- endTimestamp,
914
892
  pageSize = 10,
915
893
  pageToken,
916
894
  sortOrder
917
895
  }) {
918
896
  return this.httpRequest.request({
919
897
  method: "GET",
920
- url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions:listStaking",
898
+ url: "/v1/networks/{network}/subnets",
921
899
  path: {
922
- "blockchainId": blockchainId,
923
900
  "network": network
924
901
  },
925
902
  query: {
926
- "addresses": addresses,
927
- "txTypes": txTypes,
928
- "startTimestamp": startTimestamp,
929
- "endTimestamp": endTimestamp,
930
903
  "pageSize": pageSize,
931
904
  "pageToken": pageToken,
932
905
  "sortOrder": sortOrder
933
906
  }
934
907
  });
935
908
  }
936
- listPendingPrimaryNetworkRewards({
909
+ listValidators({
937
910
  network,
938
- addresses,
939
911
  pageSize = 10,
940
912
  pageToken,
941
- sortOrder
913
+ nodeIds,
914
+ sortOrder,
915
+ validationStatus,
916
+ minDelegationCapacity
942
917
  }) {
943
918
  return this.httpRequest.request({
944
919
  method: "GET",
945
- url: "/v1/networks/{network}/rewards:listPending",
920
+ url: "/v1/networks/{network}/validators",
946
921
  path: {
947
922
  "network": network
948
923
  },
949
924
  query: {
950
- "addresses": addresses,
951
925
  "pageSize": pageSize,
952
926
  "pageToken": pageToken,
953
- "sortOrder": sortOrder
927
+ "nodeIds": nodeIds,
928
+ "sortOrder": sortOrder,
929
+ "validationStatus": validationStatus,
930
+ "minDelegationCapacity": minDelegationCapacity
954
931
  }
955
932
  });
956
933
  }
957
- listHistoricalPrimaryNetworkRewards({
934
+ getSingleValidatorDetails({
958
935
  network,
959
- addresses,
936
+ nodeId,
960
937
  pageSize = 10,
961
938
  pageToken,
962
- sortOrder
939
+ sortOrder,
940
+ validationStatus
963
941
  }) {
964
942
  return this.httpRequest.request({
965
943
  method: "GET",
966
- url: "/v1/networks/{network}/rewards",
944
+ url: "/v1/networks/{network}/validators/{nodeId}",
967
945
  path: {
968
- "network": network
946
+ "network": network,
947
+ "nodeId": nodeId
969
948
  },
970
949
  query: {
971
- "addresses": addresses,
972
950
  "pageSize": pageSize,
973
951
  "pageToken": pageToken,
974
- "sortOrder": sortOrder
952
+ "sortOrder": sortOrder,
953
+ "validationStatus": validationStatus
975
954
  }
976
955
  });
977
956
  }
978
- getUtxosByAddresses({
979
- blockchainId,
957
+ listDelegators({
980
958
  network,
981
- addresses,
959
+ nodeId,
982
960
  pageSize = 10,
983
961
  pageToken,
984
- assetId,
985
- sortOrder
962
+ sortOrder,
963
+ delegationStatus,
964
+ rewardAddresses,
965
+ nodeIds
986
966
  }) {
987
967
  return this.httpRequest.request({
988
968
  method: "GET",
989
- url: "/v1/networks/{network}/blockchains/{blockchainId}/utxos",
969
+ url: "/v1/networks/{network}/delegators",
990
970
  path: {
991
- "blockchainId": blockchainId,
992
- "network": network
971
+ "network": network,
972
+ "nodeId": nodeId
993
973
  },
994
974
  query: {
995
- "addresses": addresses,
996
975
  "pageSize": pageSize,
997
976
  "pageToken": pageToken,
998
- "assetId": assetId,
999
- "sortOrder": sortOrder
977
+ "sortOrder": sortOrder,
978
+ "delegationStatus": delegationStatus,
979
+ "rewardAddresses": rewardAddresses,
980
+ "nodeIds": nodeIds
1000
981
  }
1001
982
  });
1002
983
  }
984
+ }
985
+
986
+ class PrimaryNetworkBalancesService {
987
+ constructor(httpRequest) {
988
+ this.httpRequest = httpRequest;
989
+ }
1003
990
  getBalancesByAddresses({
1004
991
  blockchainId,
1005
992
  network,
@@ -1019,6 +1006,12 @@ class PrimaryNetworkService {
1019
1006
  }
1020
1007
  });
1021
1008
  }
1009
+ }
1010
+
1011
+ class PrimaryNetworkBlocksService {
1012
+ constructor(httpRequest) {
1013
+ this.httpRequest = httpRequest;
1014
+ }
1022
1015
  getBlockById({
1023
1016
  blockchainId,
1024
1017
  network,
@@ -1074,211 +1067,250 @@ class PrimaryNetworkService {
1074
1067
  }
1075
1068
  });
1076
1069
  }
1077
- listLatestXChainVertices({
1078
- blockchainId,
1070
+ }
1071
+
1072
+ class PrimaryNetworkRewardsService {
1073
+ constructor(httpRequest) {
1074
+ this.httpRequest = httpRequest;
1075
+ }
1076
+ listPendingPrimaryNetworkRewards({
1079
1077
  network,
1078
+ addresses,
1080
1079
  pageSize = 10,
1081
- pageToken
1080
+ pageToken,
1081
+ sortOrder
1082
1082
  }) {
1083
1083
  return this.httpRequest.request({
1084
1084
  method: "GET",
1085
- url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices",
1085
+ url: "/v1/networks/{network}/rewards:listPending",
1086
1086
  path: {
1087
- "blockchainId": blockchainId,
1088
1087
  "network": network
1089
1088
  },
1090
1089
  query: {
1090
+ "addresses": addresses,
1091
1091
  "pageSize": pageSize,
1092
- "pageToken": pageToken
1093
- }
1094
- });
1095
- }
1096
- getVertexByHash({
1097
- vertexHash,
1098
- blockchainId,
1099
- network
1100
- }) {
1101
- return this.httpRequest.request({
1102
- method: "GET",
1103
- url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices/{vertexHash}",
1104
- path: {
1105
- "vertexHash": vertexHash,
1106
- "blockchainId": blockchainId,
1107
- "network": network
1092
+ "pageToken": pageToken,
1093
+ "sortOrder": sortOrder
1108
1094
  }
1109
1095
  });
1110
1096
  }
1111
- getVertexByHeight({
1112
- vertexHeight,
1113
- blockchainId,
1097
+ listHistoricalPrimaryNetworkRewards({
1114
1098
  network,
1099
+ addresses,
1115
1100
  pageSize = 10,
1116
1101
  pageToken,
1117
1102
  sortOrder
1118
1103
  }) {
1119
1104
  return this.httpRequest.request({
1120
1105
  method: "GET",
1121
- url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices:listByHeight",
1106
+ url: "/v1/networks/{network}/rewards",
1122
1107
  path: {
1123
- "blockchainId": blockchainId,
1124
1108
  "network": network
1125
1109
  },
1126
1110
  query: {
1127
- "vertexHeight": vertexHeight,
1111
+ "addresses": addresses,
1128
1112
  "pageSize": pageSize,
1129
1113
  "pageToken": pageToken,
1130
1114
  "sortOrder": sortOrder
1131
1115
  }
1132
1116
  });
1133
1117
  }
1134
- getAssetDetails({
1118
+ }
1119
+
1120
+ class PrimaryNetworkTransactionsService {
1121
+ constructor(httpRequest) {
1122
+ this.httpRequest = httpRequest;
1123
+ }
1124
+ getTxByHash({
1135
1125
  blockchainId,
1136
1126
  network,
1137
- assetId
1127
+ txHash
1138
1128
  }) {
1139
1129
  return this.httpRequest.request({
1140
1130
  method: "GET",
1141
- url: "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}",
1131
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions/{txHash}",
1142
1132
  path: {
1143
1133
  "blockchainId": blockchainId,
1144
1134
  "network": network,
1145
- "assetId": assetId
1135
+ "txHash": txHash
1146
1136
  }
1147
1137
  });
1148
1138
  }
1149
- listAssetTransactions({
1139
+ listLatestPrimaryNetworkTransactions({
1150
1140
  blockchainId,
1151
1141
  network,
1152
- assetId,
1142
+ addresses,
1153
1143
  txTypes,
1154
1144
  startTimestamp,
1155
1145
  endTimestamp,
1156
1146
  pageSize = 10,
1157
- pageToken
1147
+ pageToken,
1148
+ sortOrder
1158
1149
  }) {
1159
1150
  return this.httpRequest.request({
1160
1151
  method: "GET",
1161
- url: "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}/transactions",
1152
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions",
1162
1153
  path: {
1163
1154
  "blockchainId": blockchainId,
1164
- "network": network,
1165
- "assetId": assetId
1155
+ "network": network
1166
1156
  },
1167
1157
  query: {
1158
+ "addresses": addresses,
1168
1159
  "txTypes": txTypes,
1169
1160
  "startTimestamp": startTimestamp,
1170
1161
  "endTimestamp": endTimestamp,
1171
1162
  "pageSize": pageSize,
1172
- "pageToken": pageToken
1163
+ "pageToken": pageToken,
1164
+ "sortOrder": sortOrder
1173
1165
  }
1174
1166
  });
1175
1167
  }
1176
- getChainIdsForAddresses({
1168
+ listActivePrimaryNetworkStakingTransactions({
1169
+ blockchainId,
1170
+ network,
1177
1171
  addresses,
1178
- network
1172
+ txTypes,
1173
+ startTimestamp,
1174
+ endTimestamp,
1175
+ pageSize = 10,
1176
+ pageToken,
1177
+ sortOrder
1179
1178
  }) {
1180
1179
  return this.httpRequest.request({
1181
1180
  method: "GET",
1182
- url: "/v1/networks/{network}/addresses:listChainIds",
1181
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/transactions:listStaking",
1183
1182
  path: {
1183
+ "blockchainId": blockchainId,
1184
1184
  "network": network
1185
1185
  },
1186
1186
  query: {
1187
- "addresses": addresses
1187
+ "addresses": addresses,
1188
+ "txTypes": txTypes,
1189
+ "startTimestamp": startTimestamp,
1190
+ "endTimestamp": endTimestamp,
1191
+ "pageSize": pageSize,
1192
+ "pageToken": pageToken,
1193
+ "sortOrder": sortOrder
1188
1194
  }
1189
1195
  });
1190
1196
  }
1191
- getNetworkDetails({
1192
- network
1197
+ listAssetTransactions({
1198
+ blockchainId,
1199
+ network,
1200
+ assetId,
1201
+ txTypes,
1202
+ startTimestamp,
1203
+ endTimestamp,
1204
+ pageSize = 10,
1205
+ pageToken
1193
1206
  }) {
1194
1207
  return this.httpRequest.request({
1195
1208
  method: "GET",
1196
- url: "/v1/networks/{network}",
1209
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}/transactions",
1197
1210
  path: {
1198
- "network": network
1211
+ "blockchainId": blockchainId,
1212
+ "network": network,
1213
+ "assetId": assetId
1214
+ },
1215
+ query: {
1216
+ "txTypes": txTypes,
1217
+ "startTimestamp": startTimestamp,
1218
+ "endTimestamp": endTimestamp,
1219
+ "pageSize": pageSize,
1220
+ "pageToken": pageToken
1199
1221
  }
1200
1222
  });
1201
1223
  }
1202
- listBlockchains({
1224
+ }
1225
+
1226
+ class PrimaryNetworkUtxOsService {
1227
+ constructor(httpRequest) {
1228
+ this.httpRequest = httpRequest;
1229
+ }
1230
+ getUtxosByAddresses({
1231
+ blockchainId,
1203
1232
  network,
1233
+ addresses,
1204
1234
  pageSize = 10,
1205
1235
  pageToken,
1236
+ assetId,
1237
+ includeSpent,
1206
1238
  sortOrder
1207
1239
  }) {
1208
1240
  return this.httpRequest.request({
1209
1241
  method: "GET",
1210
- url: "/v1/networks/{network}/blockchains",
1242
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/utxos",
1211
1243
  path: {
1244
+ "blockchainId": blockchainId,
1212
1245
  "network": network
1213
1246
  },
1214
1247
  query: {
1248
+ "addresses": addresses,
1215
1249
  "pageSize": pageSize,
1216
1250
  "pageToken": pageToken,
1251
+ "assetId": assetId,
1252
+ "includeSpent": includeSpent,
1217
1253
  "sortOrder": sortOrder
1218
1254
  }
1219
1255
  });
1220
1256
  }
1221
- listSubnets({
1257
+ }
1258
+
1259
+ class PrimaryNetworkVerticesService {
1260
+ constructor(httpRequest) {
1261
+ this.httpRequest = httpRequest;
1262
+ }
1263
+ listLatestXChainVertices({
1264
+ blockchainId,
1222
1265
  network,
1223
1266
  pageSize = 10,
1224
- pageToken,
1225
- sortOrder
1267
+ pageToken
1226
1268
  }) {
1227
1269
  return this.httpRequest.request({
1228
1270
  method: "GET",
1229
- url: "/v1/networks/{network}/subnets",
1271
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices",
1230
1272
  path: {
1273
+ "blockchainId": blockchainId,
1231
1274
  "network": network
1232
1275
  },
1233
1276
  query: {
1234
1277
  "pageSize": pageSize,
1235
- "pageToken": pageToken,
1236
- "sortOrder": sortOrder
1278
+ "pageToken": pageToken
1237
1279
  }
1238
1280
  });
1239
1281
  }
1240
- listValidators({
1241
- network,
1242
- validationStatus,
1243
- pageSize = 10,
1244
- pageToken,
1245
- nodeIds,
1246
- sortOrder,
1247
- minDelegationCapacity
1282
+ getVertexByHash({
1283
+ vertexHash,
1284
+ blockchainId,
1285
+ network
1248
1286
  }) {
1249
1287
  return this.httpRequest.request({
1250
1288
  method: "GET",
1251
- url: "/v1/networks/{network}/validators",
1289
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices/{vertexHash}",
1252
1290
  path: {
1253
- "network": network,
1254
- "validationStatus": validationStatus
1255
- },
1256
- query: {
1257
- "pageSize": pageSize,
1258
- "pageToken": pageToken,
1259
- "nodeIds": nodeIds,
1260
- "sortOrder": sortOrder,
1261
- "minDelegationCapacity": minDelegationCapacity
1291
+ "vertexHash": vertexHash,
1292
+ "blockchainId": blockchainId,
1293
+ "network": network
1262
1294
  }
1263
1295
  });
1264
1296
  }
1265
- getSingleValidatorDetails({
1297
+ getVertexByHeight({
1298
+ vertexHeight,
1299
+ blockchainId,
1266
1300
  network,
1267
- nodeId,
1268
- validationStatus,
1269
1301
  pageSize = 10,
1270
1302
  pageToken,
1271
1303
  sortOrder
1272
1304
  }) {
1273
1305
  return this.httpRequest.request({
1274
1306
  method: "GET",
1275
- url: "/v1/networks/{network}/validators/{nodeId}",
1307
+ url: "/v1/networks/{network}/blockchains/{blockchainId}/vertices:listByHeight",
1276
1308
  path: {
1277
- "network": network,
1278
- "nodeId": nodeId,
1279
- "validationStatus": validationStatus
1309
+ "blockchainId": blockchainId,
1310
+ "network": network
1280
1311
  },
1281
1312
  query: {
1313
+ "vertexHeight": vertexHeight,
1282
1314
  "pageSize": pageSize,
1283
1315
  "pageToken": pageToken,
1284
1316
  "sortOrder": sortOrder
@@ -1291,7 +1323,7 @@ class Glacier {
1291
1323
  constructor(config, HttpRequest = FetchHttpRequest) {
1292
1324
  var _a, _b, _c, _d;
1293
1325
  this.request = new HttpRequest({
1294
- BASE: (_a = config == null ? void 0 : config.BASE) != null ? _a : "",
1326
+ BASE: (_a = config == null ? void 0 : config.BASE) != null ? _a : "https://glacier-api-dev.avax.network",
1295
1327
  VERSION: (_b = config == null ? void 0 : config.VERSION) != null ? _b : "Beta",
1296
1328
  WITH_CREDENTIALS: (_c = config == null ? void 0 : config.WITH_CREDENTIALS) != null ? _c : false,
1297
1329
  CREDENTIALS: (_d = config == null ? void 0 : config.CREDENTIALS) != null ? _d : "include",
@@ -1301,15 +1333,24 @@ class Glacier {
1301
1333
  HEADERS: config == null ? void 0 : config.HEADERS,
1302
1334
  ENCODE_PATH: config == null ? void 0 : config.ENCODE_PATH
1303
1335
  });
1304
- this.evm = new EvmService(this.request);
1336
+ this.evmBalances = new EvmBalancesService(this.request);
1337
+ this.evmBlocks = new EvmBlocksService(this.request);
1338
+ this.evmChains = new EvmChainsService(this.request);
1339
+ this.evmTransactions = new EvmTransactionsService(this.request);
1305
1340
  this.healthCheck = new HealthCheckService(this.request);
1306
1341
  this.operations = new OperationsService(this.request);
1307
1342
  this.primaryNetwork = new PrimaryNetworkService(this.request);
1343
+ this.primaryNetworkBalances = new PrimaryNetworkBalancesService(this.request);
1344
+ this.primaryNetworkBlocks = new PrimaryNetworkBlocksService(this.request);
1345
+ this.primaryNetworkRewards = new PrimaryNetworkRewardsService(this.request);
1346
+ this.primaryNetworkTransactions = new PrimaryNetworkTransactionsService(this.request);
1347
+ this.primaryNetworkUtxOs = new PrimaryNetworkUtxOsService(this.request);
1348
+ this.primaryNetworkVertices = new PrimaryNetworkVerticesService(this.request);
1308
1349
  }
1309
1350
  }
1310
1351
 
1311
1352
  const OpenAPI = {
1312
- BASE: "",
1353
+ BASE: "https://glacier-api-dev.avax.network",
1313
1354
  VERSION: "Beta",
1314
1355
  WITH_CREDENTIALS: false,
1315
1356
  CREDENTIALS: "include",
@@ -1361,15 +1402,6 @@ var ChainStatus = /* @__PURE__ */ ((ChainStatus2) => {
1361
1402
  return ChainStatus2;
1362
1403
  })(ChainStatus || {});
1363
1404
 
1364
- var CollectionSortByOption = /* @__PURE__ */ ((CollectionSortByOption2) => {
1365
- CollectionSortByOption2["COLLECTION_ADDRESS"] = "collectionAddress";
1366
- CollectionSortByOption2["SALE_TIMESTAMP"] = "saleTimestamp";
1367
- CollectionSortByOption2["VOLUME"] = "volume";
1368
- CollectionSortByOption2["VOLUME_CHANGE"] = "volumeChange";
1369
- CollectionSortByOption2["FLOOR_PRICE"] = "floorPrice";
1370
- return CollectionSortByOption2;
1371
- })(CollectionSortByOption || {});
1372
-
1373
1405
  exports.CreateEvmTransactionExportRequest = void 0;
1374
1406
  ((CreateEvmTransactionExportRequest2) => {
1375
1407
  ((type2) => {
@@ -1402,6 +1434,20 @@ var CurrencyCode = /* @__PURE__ */ ((CurrencyCode2) => {
1402
1434
  return CurrencyCode2;
1403
1435
  })(CurrencyCode || {});
1404
1436
 
1437
+ var DelegationStatusType = /* @__PURE__ */ ((DelegationStatusType2) => {
1438
+ DelegationStatusType2["COMPLETED"] = "completed";
1439
+ DelegationStatusType2["ACTIVE"] = "active";
1440
+ DelegationStatusType2["PENDING"] = "pending";
1441
+ return DelegationStatusType2;
1442
+ })(DelegationStatusType || {});
1443
+
1444
+ exports.Erc1155Contract = void 0;
1445
+ ((Erc1155Contract2) => {
1446
+ ((ercType2) => {
1447
+ ercType2["ERC_1155"] = "ERC-1155";
1448
+ })(Erc1155Contract2.ercType || (Erc1155Contract2.ercType = {}));
1449
+ })(exports.Erc1155Contract || (exports.Erc1155Contract = {}));
1450
+
1405
1451
  exports.Erc1155Token = void 0;
1406
1452
  ((Erc1155Token2) => {
1407
1453
  ((ercType2) => {
@@ -1416,6 +1462,13 @@ exports.Erc1155TokenBalance = void 0;
1416
1462
  })(Erc1155TokenBalance2.ercType || (Erc1155TokenBalance2.ercType = {}));
1417
1463
  })(exports.Erc1155TokenBalance || (exports.Erc1155TokenBalance = {}));
1418
1464
 
1465
+ exports.Erc20Contract = void 0;
1466
+ ((Erc20Contract2) => {
1467
+ ((ercType2) => {
1468
+ ercType2["ERC_20"] = "ERC-20";
1469
+ })(Erc20Contract2.ercType || (Erc20Contract2.ercType = {}));
1470
+ })(exports.Erc20Contract || (exports.Erc20Contract = {}));
1471
+
1419
1472
  exports.Erc20Token = void 0;
1420
1473
  ((Erc20Token2) => {
1421
1474
  ((ercType2) => {
@@ -1430,6 +1483,13 @@ exports.Erc20TokenBalance = void 0;
1430
1483
  })(Erc20TokenBalance2.ercType || (Erc20TokenBalance2.ercType = {}));
1431
1484
  })(exports.Erc20TokenBalance || (exports.Erc20TokenBalance = {}));
1432
1485
 
1486
+ exports.Erc721Contract = void 0;
1487
+ ((Erc721Contract2) => {
1488
+ ((ercType2) => {
1489
+ ercType2["ERC_721"] = "ERC-721";
1490
+ })(Erc721Contract2.ercType || (Erc721Contract2.ercType = {}));
1491
+ })(exports.Erc721Contract || (exports.Erc721Contract = {}));
1492
+
1433
1493
  exports.Erc721Token = void 0;
1434
1494
  ((Erc721Token2) => {
1435
1495
  ((ercType2) => {
@@ -1444,14 +1504,6 @@ exports.Erc721TokenBalance = void 0;
1444
1504
  })(Erc721TokenBalance2.ercType || (Erc721TokenBalance2.ercType = {}));
1445
1505
  })(exports.Erc721TokenBalance || (exports.Erc721TokenBalance = {}));
1446
1506
 
1447
- var ErcType = /* @__PURE__ */ ((ErcType2) => {
1448
- ErcType2["ERC_20"] = "ERC-20";
1449
- ErcType2["ERC_721"] = "ERC-721";
1450
- ErcType2["ERC_1155"] = "ERC-1155";
1451
- ErcType2["UNKNOWN"] = "UNKNOWN";
1452
- return ErcType2;
1453
- })(ErcType || {});
1454
-
1455
1507
  var InternalTransactionOpCall = /* @__PURE__ */ ((InternalTransactionOpCall2) => {
1456
1508
  InternalTransactionOpCall2["UNKNOWN"] = "UNKNOWN";
1457
1509
  InternalTransactionOpCall2["CALL"] = "CALL";
@@ -1533,6 +1585,19 @@ var PChainTransactionType = /* @__PURE__ */ ((PChainTransactionType2) => {
1533
1585
  return PChainTransactionType2;
1534
1586
  })(PChainTransactionType || {});
1535
1587
 
1588
+ var PrimaryNetwork = /* @__PURE__ */ ((PrimaryNetwork2) => {
1589
+ PrimaryNetwork2["MAINNET"] = "mainnet";
1590
+ PrimaryNetwork2["FUJI"] = "fuji";
1591
+ return PrimaryNetwork2;
1592
+ })(PrimaryNetwork || {});
1593
+
1594
+ var PrimaryNetworkChainName = /* @__PURE__ */ ((PrimaryNetworkChainName2) => {
1595
+ PrimaryNetworkChainName2["P_CHAIN"] = "p-chain";
1596
+ PrimaryNetworkChainName2["X_CHAIN"] = "x-chain";
1597
+ PrimaryNetworkChainName2["C_CHAIN"] = "c-chain";
1598
+ return PrimaryNetworkChainName2;
1599
+ })(PrimaryNetworkChainName || {});
1600
+
1536
1601
  var PrimaryNetworkTxType = /* @__PURE__ */ ((PrimaryNetworkTxType2) => {
1537
1602
  PrimaryNetworkTxType2["ADD_VALIDATOR_TX"] = "AddValidatorTx";
1538
1603
  PrimaryNetworkTxType2["ADD_DELEGATOR_TX"] = "AddDelegatorTx";
@@ -1599,12 +1664,12 @@ var TransactionStatus = /* @__PURE__ */ ((TransactionStatus2) => {
1599
1664
  return TransactionStatus2;
1600
1665
  })(TransactionStatus || {});
1601
1666
 
1602
- var TrendingTimeframe = /* @__PURE__ */ ((TrendingTimeframe2) => {
1603
- TrendingTimeframe2["DAY"] = "day";
1604
- TrendingTimeframe2["WEEK"] = "week";
1605
- TrendingTimeframe2["MONTH"] = "month";
1606
- return TrendingTimeframe2;
1607
- })(TrendingTimeframe || {});
1667
+ exports.UnknownContract = void 0;
1668
+ ((UnknownContract2) => {
1669
+ ((ercType2) => {
1670
+ ercType2["UNKNOWN"] = "UNKNOWN";
1671
+ })(UnknownContract2.ercType || (UnknownContract2.ercType = {}));
1672
+ })(exports.UnknownContract || (exports.UnknownContract = {}));
1608
1673
 
1609
1674
  var UtxoType = /* @__PURE__ */ ((UtxoType2) => {
1610
1675
  UtxoType2["STAKE"] = "STAKE";
@@ -1614,6 +1679,8 @@ var UtxoType = /* @__PURE__ */ ((UtxoType2) => {
1614
1679
 
1615
1680
  var ValidationStatusType = /* @__PURE__ */ ((ValidationStatusType2) => {
1616
1681
  ValidationStatusType2["COMPLETED"] = "completed";
1682
+ ValidationStatusType2["ACTIVE"] = "active";
1683
+ ValidationStatusType2["PENDING"] = "pending";
1617
1684
  return ValidationStatusType2;
1618
1685
  })(ValidationStatusType || {});
1619
1686
 
@@ -1654,10 +1721,12 @@ exports.BlockchainIds = BlockchainIds;
1654
1721
  exports.CancelError = CancelError;
1655
1722
  exports.CancelablePromise = CancelablePromise;
1656
1723
  exports.ChainStatus = ChainStatus;
1657
- exports.CollectionSortByOption = CollectionSortByOption;
1658
1724
  exports.CurrencyCode = CurrencyCode;
1659
- exports.ErcType = ErcType;
1660
- exports.EvmService = EvmService;
1725
+ exports.DelegationStatusType = DelegationStatusType;
1726
+ exports.EvmBalancesService = EvmBalancesService;
1727
+ exports.EvmBlocksService = EvmBlocksService;
1728
+ exports.EvmChainsService = EvmChainsService;
1729
+ exports.EvmTransactionsService = EvmTransactionsService;
1661
1730
  exports.Glacier = Glacier;
1662
1731
  exports.HealthCheckService = HealthCheckService;
1663
1732
  exports.InternalTransactionOpCall = InternalTransactionOpCall;
@@ -1671,14 +1740,21 @@ exports.OperationType = OperationType;
1671
1740
  exports.OperationsService = OperationsService;
1672
1741
  exports.PChainId = PChainId;
1673
1742
  exports.PChainTransactionType = PChainTransactionType;
1743
+ exports.PrimaryNetwork = PrimaryNetwork;
1744
+ exports.PrimaryNetworkBalancesService = PrimaryNetworkBalancesService;
1745
+ exports.PrimaryNetworkBlocksService = PrimaryNetworkBlocksService;
1746
+ exports.PrimaryNetworkChainName = PrimaryNetworkChainName;
1747
+ exports.PrimaryNetworkRewardsService = PrimaryNetworkRewardsService;
1674
1748
  exports.PrimaryNetworkService = PrimaryNetworkService;
1749
+ exports.PrimaryNetworkTransactionsService = PrimaryNetworkTransactionsService;
1675
1750
  exports.PrimaryNetworkTxType = PrimaryNetworkTxType;
1751
+ exports.PrimaryNetworkUtxOsService = PrimaryNetworkUtxOsService;
1752
+ exports.PrimaryNetworkVerticesService = PrimaryNetworkVerticesService;
1676
1753
  exports.ResourceLinkType = ResourceLinkType;
1677
1754
  exports.RewardType = RewardType;
1678
1755
  exports.SortOrder = SortOrder;
1679
1756
  exports.TransactionMethodType = TransactionMethodType;
1680
1757
  exports.TransactionStatus = TransactionStatus;
1681
- exports.TrendingTimeframe = TrendingTimeframe;
1682
1758
  exports.UtxoType = UtxoType;
1683
1759
  exports.ValidationStatusType = ValidationStatusType;
1684
1760
  exports.VmName = VmName;