@avalabs/glacier-sdk 2.8.0-canary.c69ce41.0 → 2.8.0-canary.c7d9a06.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -60,6 +60,16 @@ declare abstract class BaseHttpRequest {
60
60
  abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
61
61
  }
62
62
 
63
+ declare class DefaultService {
64
+ readonly httpRequest: BaseHttpRequest;
65
+ constructor(httpRequest: BaseHttpRequest);
66
+ /**
67
+ * @returns any
68
+ * @throws ApiError
69
+ */
70
+ mediaControllerUploadImage(): CancelablePromise<any>;
71
+ }
72
+
63
73
  declare enum CurrencyCode {
64
74
  USD = "usd",
65
75
  EUR = "eur",
@@ -743,18 +753,6 @@ declare class EvmChainsService {
743
753
  }): CancelablePromise<GetChainResponse>;
744
754
  }
745
755
 
746
- type ContractDeploymentDetails = {
747
- txHash: string;
748
- /**
749
- * The address that initiated the transaction which deployed this contract.
750
- */
751
- deployerAddress: string;
752
- /**
753
- * The contract address which deployed this contract via smart contract. This field is only populated when the contract was deployed as part of smart contract execution.
754
- */
755
- deployerContractAddress?: string;
756
- };
757
-
758
756
  type ImageAsset = {
759
757
  assetId?: string;
760
758
  /**
@@ -793,6 +791,120 @@ type ResourceLink = {
793
791
  url: string;
794
792
  };
795
793
 
794
+ type ContractSubmissionErc1155 = {
795
+ description?: string;
796
+ officialSite?: string;
797
+ email?: string;
798
+ logoAsset?: ImageAsset;
799
+ bannerAsset?: ImageAsset;
800
+ color?: string;
801
+ resourceLinks?: Array<ResourceLink>;
802
+ tags?: Array<string>;
803
+ /**
804
+ * The contract name.
805
+ */
806
+ name: string;
807
+ ercType: ContractSubmissionErc1155.ercType;
808
+ /**
809
+ * The contract symbol.
810
+ */
811
+ symbol: string;
812
+ pricingProviders?: PricingProviders;
813
+ };
814
+ declare namespace ContractSubmissionErc1155 {
815
+ enum ercType {
816
+ ERC_1155 = "ERC-1155"
817
+ }
818
+ }
819
+
820
+ type ContractSubmissionErc20 = {
821
+ description?: string;
822
+ officialSite?: string;
823
+ email?: string;
824
+ logoAsset?: ImageAsset;
825
+ bannerAsset?: ImageAsset;
826
+ color?: string;
827
+ resourceLinks?: Array<ResourceLink>;
828
+ tags?: Array<string>;
829
+ /**
830
+ * The contract name.
831
+ */
832
+ name: string;
833
+ ercType: ContractSubmissionErc20.ercType;
834
+ /**
835
+ * The contract symbol.
836
+ */
837
+ symbol: string;
838
+ pricingProviders?: PricingProviders;
839
+ };
840
+ declare namespace ContractSubmissionErc20 {
841
+ enum ercType {
842
+ ERC_20 = "ERC-20"
843
+ }
844
+ }
845
+
846
+ type ContractSubmissionErc721 = {
847
+ description?: string;
848
+ officialSite?: string;
849
+ email?: string;
850
+ logoAsset?: ImageAsset;
851
+ bannerAsset?: ImageAsset;
852
+ color?: string;
853
+ resourceLinks?: Array<ResourceLink>;
854
+ tags?: Array<string>;
855
+ /**
856
+ * The contract name.
857
+ */
858
+ name: string;
859
+ ercType: ContractSubmissionErc721.ercType;
860
+ /**
861
+ * The contract symbol.
862
+ */
863
+ symbol: string;
864
+ };
865
+ declare namespace ContractSubmissionErc721 {
866
+ enum ercType {
867
+ ERC_721 = "ERC-721"
868
+ }
869
+ }
870
+
871
+ type ContractSubmissionUnknown = {
872
+ description?: string;
873
+ officialSite?: string;
874
+ email?: string;
875
+ logoAsset?: ImageAsset;
876
+ bannerAsset?: ImageAsset;
877
+ color?: string;
878
+ resourceLinks?: Array<ResourceLink>;
879
+ tags?: Array<string>;
880
+ /**
881
+ * The contract name.
882
+ */
883
+ name: string;
884
+ ercType: ContractSubmissionUnknown.ercType;
885
+ };
886
+ declare namespace ContractSubmissionUnknown {
887
+ enum ercType {
888
+ UNKNOWN = "UNKNOWN"
889
+ }
890
+ }
891
+
892
+ type ContractSubmissionBody = {
893
+ contract: (ContractSubmissionErc1155 | ContractSubmissionErc20 | ContractSubmissionErc721 | ContractSubmissionUnknown);
894
+ };
895
+
896
+ type ContractDeploymentDetails = {
897
+ txHash: string;
898
+ /**
899
+ * The address that initiated the transaction which deployed this contract.
900
+ */
901
+ deployerAddress: string;
902
+ /**
903
+ * The contract address which deployed this contract via smart contract. This field is only populated when the contract was deployed as part of smart contract execution.
904
+ */
905
+ deployerContractAddress?: string;
906
+ };
907
+
796
908
  type Erc1155Contract = {
797
909
  /**
798
910
  * The contract name.
@@ -915,6 +1027,10 @@ declare namespace UnknownContract {
915
1027
  }
916
1028
  }
917
1029
 
1030
+ type UpdateContractResponse = {
1031
+ contract: (UnknownContract | Erc20Contract | Erc721Contract | Erc1155Contract);
1032
+ };
1033
+
918
1034
  declare class EvmContractsService {
919
1035
  readonly httpRequest: BaseHttpRequest;
920
1036
  constructor(httpRequest: BaseHttpRequest);
@@ -934,6 +1050,23 @@ declare class EvmContractsService {
934
1050
  */
935
1051
  address: string;
936
1052
  }): CancelablePromise<(Erc721Contract | Erc1155Contract | Erc20Contract | UnknownContract)>;
1053
+ /**
1054
+ * Update contract information
1055
+ * Update contract information. Updates will be reviewed by the Ava Labs team before they are published.
1056
+ * @returns UpdateContractResponse
1057
+ * @throws ApiError
1058
+ */
1059
+ updateContractInfo({ chainId, address, requestBody, }: {
1060
+ /**
1061
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
1062
+ */
1063
+ chainId: string;
1064
+ /**
1065
+ * Contract address on the relevant chain.
1066
+ */
1067
+ address: string;
1068
+ requestBody: ContractSubmissionBody;
1069
+ }): CancelablePromise<UpdateContractResponse>;
937
1070
  }
938
1071
 
939
1072
  type Erc1155Token = {
@@ -2095,6 +2228,7 @@ type ValidatorHealthDetails = {
2095
2228
  };
2096
2229
 
2097
2230
  type ActiveValidatorDetails = {
2231
+ txHash: string;
2098
2232
  nodeId: string;
2099
2233
  subnetId: string;
2100
2234
  amountStaked: string;
@@ -2118,6 +2252,7 @@ declare namespace ActiveValidatorDetails {
2118
2252
  }
2119
2253
 
2120
2254
  type CompletedValidatorDetails = {
2255
+ txHash: string;
2121
2256
  nodeId: string;
2122
2257
  subnetId: string;
2123
2258
  amountStaked: string;
@@ -2135,6 +2270,7 @@ declare namespace CompletedValidatorDetails {
2135
2270
  }
2136
2271
 
2137
2272
  type PendingValidatorDetails = {
2273
+ txHash: string;
2138
2274
  nodeId: string;
2139
2275
  subnetId: string;
2140
2276
  amountStaked: string;
@@ -2313,7 +2449,7 @@ declare class PrimaryNetworkService {
2313
2449
  * @returns ListValidatorDetailsResponse
2314
2450
  * @throws ApiError
2315
2451
  */
2316
- listValidators({ network, pageSize, pageToken, minTimeRemaining, maxTimeRemaining, minDelegationCapacity, maxDelegationCapacity, minFeePercentage, maxFeePercentage, nodeIds, sortOrder, validationStatus, }: {
2452
+ listValidators({ network, pageSize, pageToken, minTimeRemaining, maxTimeRemaining, minDelegationCapacity, maxDelegationCapacity, minFeePercentage, maxFeePercentage, nodeIds, sortOrder, validationStatus, subnetId, }: {
2317
2453
  /**
2318
2454
  * Either mainnet or a testnet.
2319
2455
  */
@@ -2327,11 +2463,11 @@ declare class PrimaryNetworkService {
2327
2463
  */
2328
2464
  pageToken?: string;
2329
2465
  /**
2330
- * The minimum delegation time remaining, in seconds, used to filter the set of nodes being returned.
2466
+ * The minimum validation time remaining, in seconds, used to filter the set of nodes being returned.
2331
2467
  */
2332
2468
  minTimeRemaining?: any;
2333
2469
  /**
2334
- * The maximum delegation time remaining, in seconds, used to filter the set of nodes being returned.
2470
+ * The maximum validation time remaining, in seconds, used to filter the set of nodes being returned.
2335
2471
  */
2336
2472
  maxTimeRemaining?: any;
2337
2473
  /**
@@ -2343,11 +2479,11 @@ declare class PrimaryNetworkService {
2343
2479
  */
2344
2480
  maxDelegationCapacity?: number;
2345
2481
  /**
2346
- * The minimum fee percentage, used to filter the set of nodes being returned. Default is 2, as per the Avalanche spec.
2482
+ * The minimum fee percentage, used to filter the set of nodes being returned.If this field is populated no subnet validations will be returned, as their fee percentage is null, since subnet delegations are not supported. Default is 2, as per the Avalanche spec.
2347
2483
  */
2348
2484
  minFeePercentage?: any;
2349
2485
  /**
2350
- * The maximum fee percentage, used to filter the set of nodes being returned. Default is 100.
2486
+ * The maximum fee percentage, used to filter the set of nodes being returned. If this field is populated no subnet validations will be returned, as their fee percentage is null, since subnet delegations are not supported. Default is 100.
2351
2487
  */
2352
2488
  maxFeePercentage?: any;
2353
2489
  /**
@@ -2362,6 +2498,10 @@ declare class PrimaryNetworkService {
2362
2498
  * Validation status of the node.
2363
2499
  */
2364
2500
  validationStatus?: ValidationStatusType;
2501
+ /**
2502
+ * The subnet ID to filter by. If not provided, then all subnets will be returned.
2503
+ */
2504
+ subnetId?: string;
2365
2505
  }): CancelablePromise<ListValidatorDetailsResponse>;
2366
2506
  /**
2367
2507
  * Get single validator details
@@ -3762,6 +3902,7 @@ declare class PrimaryNetworkVerticesService {
3762
3902
 
3763
3903
  type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
3764
3904
  declare class Glacier {
3905
+ readonly default: DefaultService;
3765
3906
  readonly evmBalances: EvmBalancesService;
3766
3907
  readonly evmBlocks: EvmBlocksService;
3767
3908
  readonly evmChains: EvmChainsService;
@@ -3798,4 +3939,4 @@ declare class ApiError extends Error {
3798
3939
  constructor(request: ApiRequestOptions, response: ApiResult, message: string);
3799
3940
  }
3800
3941
 
3801
- export { ActiveDelegatorDetails, ActiveValidatorDetails, ApiError, Asset, BaseHttpRequest, Blockchain, BlockchainId, BlockchainIds, BlockchainInfo, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CompletedDelegatorDetails, CompletedValidatorDetails, ContractDeploymentDetails, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CurrencyCode, DelegationStatusType, DelegatorsDetails, EVMInput, EVMOutput, Erc1155Contract, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Contract, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Contract, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, EvmBalancesService, EvmBlock, EvmBlocksService, EvmChainsService, EvmContractsService, EvmNetworkOptions, EvmTransactionsService, FullNativeTransactionDetails, GetChainResponse, GetEvmBlockResponse, GetNativeBalanceResponse, GetNetworkDetailsResponse, GetPrimaryNetworkBlockResponse, GetTransactionResponse, Glacier, HealthCheckService, HistoricalReward, ImageAsset, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlockchainsResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListContractsResponse, ListDelegatorDetailsResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListEvmBlocksResponse, ListHistoricalRewardsResponse, ListInternalTransactionsResponse, ListNativeTransactionsResponse, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListPendingRewardsResponse, ListPrimaryNetworkBlocksResponse, ListSubnetsResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListValidatorDetailsResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NetworkType, NfTsService, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainAsset, PChainBalance, PChainId, PChainSharedAsset, PChainTransaction, PChainTransactionType, PChainUtxo, PendingDelegatorDetails, PendingReward, PendingValidatorDetails, PricingProviders, PrimaryNetwork, PrimaryNetworkBalancesService, PrimaryNetworkBlock, PrimaryNetworkBlocksService, PrimaryNetworkChainInfo, PrimaryNetworkChainName, PrimaryNetworkOptions, PrimaryNetworkRewardsService, PrimaryNetworkService, PrimaryNetworkTransactionsService, PrimaryNetworkTxType, PrimaryNetworkUtxOsService, PrimaryNetworkVerticesService, ProposerDetails, ResourceLink, ResourceLinkType, RewardType, Rewards, RichAddress, SortOrder, StakingDistribution, Subnet, TransactionDetails, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, UnknownContract, UtilityAddresses, Utxo, UtxoCredential, UtxoType, ValidationStatusType, ValidatorHealthDetails, ValidatorsDetails, VmName, XChainAssetBalance, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainVertex };
3942
+ export { ActiveDelegatorDetails, ActiveValidatorDetails, ApiError, Asset, BaseHttpRequest, Blockchain, BlockchainId, BlockchainIds, BlockchainInfo, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CompletedDelegatorDetails, CompletedValidatorDetails, ContractDeploymentDetails, ContractSubmissionBody, ContractSubmissionErc1155, ContractSubmissionErc20, ContractSubmissionErc721, ContractSubmissionUnknown, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CurrencyCode, DefaultService, DelegationStatusType, DelegatorsDetails, EVMInput, EVMOutput, Erc1155Contract, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Contract, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Contract, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, EvmBalancesService, EvmBlock, EvmBlocksService, EvmChainsService, EvmContractsService, EvmNetworkOptions, EvmTransactionsService, FullNativeTransactionDetails, GetChainResponse, GetEvmBlockResponse, GetNativeBalanceResponse, GetNetworkDetailsResponse, GetPrimaryNetworkBlockResponse, GetTransactionResponse, Glacier, HealthCheckService, HistoricalReward, ImageAsset, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlockchainsResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListContractsResponse, ListDelegatorDetailsResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListEvmBlocksResponse, ListHistoricalRewardsResponse, ListInternalTransactionsResponse, ListNativeTransactionsResponse, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListPendingRewardsResponse, ListPrimaryNetworkBlocksResponse, ListSubnetsResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListValidatorDetailsResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NetworkType, NfTsService, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainAsset, PChainBalance, PChainId, PChainSharedAsset, PChainTransaction, PChainTransactionType, PChainUtxo, PendingDelegatorDetails, PendingReward, PendingValidatorDetails, PricingProviders, PrimaryNetwork, PrimaryNetworkBalancesService, PrimaryNetworkBlock, PrimaryNetworkBlocksService, PrimaryNetworkChainInfo, PrimaryNetworkChainName, PrimaryNetworkOptions, PrimaryNetworkRewardsService, PrimaryNetworkService, PrimaryNetworkTransactionsService, PrimaryNetworkTxType, PrimaryNetworkUtxOsService, PrimaryNetworkVerticesService, ProposerDetails, ResourceLink, ResourceLinkType, RewardType, Rewards, RichAddress, SortOrder, StakingDistribution, Subnet, TransactionDetails, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, UnknownContract, UpdateContractResponse, UtilityAddresses, Utxo, UtxoCredential, UtxoType, ValidationStatusType, ValidatorHealthDetails, ValidatorsDetails, VmName, XChainAssetBalance, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainVertex };
package/dist/index.js CHANGED
@@ -345,6 +345,18 @@ class FetchHttpRequest extends BaseHttpRequest {
345
345
  }
346
346
  }
347
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
+ }
359
+
348
360
  class EvmBalancesService {
349
361
  constructor(httpRequest) {
350
362
  this.httpRequest = httpRequest;
@@ -541,6 +553,22 @@ class EvmContractsService {
541
553
  }
542
554
  });
543
555
  }
556
+ updateContractInfo({
557
+ chainId,
558
+ address,
559
+ requestBody
560
+ }) {
561
+ return this.httpRequest.request({
562
+ method: "PATCH",
563
+ url: "/v1/chains/{chainId}/contracts/{address}",
564
+ path: {
565
+ "chainId": chainId,
566
+ "address": address
567
+ },
568
+ body: requestBody,
569
+ mediaType: "application/json"
570
+ });
571
+ }
544
572
  }
545
573
 
546
574
  class EvmTransactionsService {
@@ -966,7 +994,8 @@ class PrimaryNetworkService {
966
994
  maxFeePercentage,
967
995
  nodeIds,
968
996
  sortOrder,
969
- validationStatus
997
+ validationStatus,
998
+ subnetId
970
999
  }) {
971
1000
  return this.httpRequest.request({
972
1001
  method: "GET",
@@ -985,7 +1014,8 @@ class PrimaryNetworkService {
985
1014
  "maxFeePercentage": maxFeePercentage,
986
1015
  "nodeIds": nodeIds,
987
1016
  "sortOrder": sortOrder,
988
- "validationStatus": validationStatus
1017
+ "validationStatus": validationStatus,
1018
+ "subnetId": subnetId
989
1019
  }
990
1020
  });
991
1021
  }
@@ -1380,6 +1410,7 @@ class PrimaryNetworkVerticesService {
1380
1410
  }
1381
1411
 
1382
1412
  class Glacier {
1413
+ default;
1383
1414
  evmBalances;
1384
1415
  evmBlocks;
1385
1416
  evmChains;
@@ -1408,6 +1439,7 @@ class Glacier {
1408
1439
  HEADERS: config?.HEADERS,
1409
1440
  ENCODE_PATH: config?.ENCODE_PATH
1410
1441
  });
1442
+ this.default = new DefaultService(this.request);
1411
1443
  this.evmBalances = new EvmBalancesService(this.request);
1412
1444
  this.evmBlocks = new EvmBlocksService(this.request);
1413
1445
  this.evmChains = new EvmChainsService(this.request);
@@ -1507,6 +1539,34 @@ exports.CompletedValidatorDetails = void 0;
1507
1539
  })(CompletedValidatorDetails2.validationStatus || (CompletedValidatorDetails2.validationStatus = {}));
1508
1540
  })(exports.CompletedValidatorDetails || (exports.CompletedValidatorDetails = {}));
1509
1541
 
1542
+ exports.ContractSubmissionErc1155 = void 0;
1543
+ ((ContractSubmissionErc11552) => {
1544
+ ((ercType2) => {
1545
+ ercType2["ERC_1155"] = "ERC-1155";
1546
+ })(ContractSubmissionErc11552.ercType || (ContractSubmissionErc11552.ercType = {}));
1547
+ })(exports.ContractSubmissionErc1155 || (exports.ContractSubmissionErc1155 = {}));
1548
+
1549
+ exports.ContractSubmissionErc20 = void 0;
1550
+ ((ContractSubmissionErc202) => {
1551
+ ((ercType2) => {
1552
+ ercType2["ERC_20"] = "ERC-20";
1553
+ })(ContractSubmissionErc202.ercType || (ContractSubmissionErc202.ercType = {}));
1554
+ })(exports.ContractSubmissionErc20 || (exports.ContractSubmissionErc20 = {}));
1555
+
1556
+ exports.ContractSubmissionErc721 = void 0;
1557
+ ((ContractSubmissionErc7212) => {
1558
+ ((ercType2) => {
1559
+ ercType2["ERC_721"] = "ERC-721";
1560
+ })(ContractSubmissionErc7212.ercType || (ContractSubmissionErc7212.ercType = {}));
1561
+ })(exports.ContractSubmissionErc721 || (exports.ContractSubmissionErc721 = {}));
1562
+
1563
+ exports.ContractSubmissionUnknown = void 0;
1564
+ ((ContractSubmissionUnknown2) => {
1565
+ ((ercType2) => {
1566
+ ercType2["UNKNOWN"] = "UNKNOWN";
1567
+ })(ContractSubmissionUnknown2.ercType || (ContractSubmissionUnknown2.ercType = {}));
1568
+ })(exports.ContractSubmissionUnknown || (exports.ContractSubmissionUnknown = {}));
1569
+
1510
1570
  exports.CreateEvmTransactionExportRequest = void 0;
1511
1571
  ((CreateEvmTransactionExportRequest2) => {
1512
1572
  ((type2) => {
@@ -1844,6 +1904,7 @@ exports.CancelError = CancelError;
1844
1904
  exports.CancelablePromise = CancelablePromise;
1845
1905
  exports.ChainStatus = ChainStatus;
1846
1906
  exports.CurrencyCode = CurrencyCode;
1907
+ exports.DefaultService = DefaultService;
1847
1908
  exports.DelegationStatusType = DelegationStatusType;
1848
1909
  exports.EvmBalancesService = EvmBalancesService;
1849
1910
  exports.EvmBlocksService = EvmBlocksService;
@@ -1,5 +1,6 @@
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';
@@ -18,6 +19,7 @@ import { PrimaryNetworkVerticesService } from './services/PrimaryNetworkVertices
18
19
 
19
20
  type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
20
21
  declare class Glacier {
22
+ readonly default: DefaultService;
21
23
  readonly evmBalances: EvmBalancesService;
22
24
  readonly evmBlocks: EvmBlocksService;
23
25
  readonly evmChains: EvmChainsService;
@@ -1,4 +1,5 @@
1
1
  import { FetchHttpRequest } from './core/FetchHttpRequest.js';
2
+ import { DefaultService } from './services/DefaultService.js';
2
3
  import { EvmBalancesService } from './services/EvmBalancesService.js';
3
4
  import { EvmBlocksService } from './services/EvmBlocksService.js';
4
5
  import { EvmChainsService } from './services/EvmChainsService.js';
@@ -16,6 +17,7 @@ import { PrimaryNetworkUtxOsService } from './services/PrimaryNetworkUtxOsServic
16
17
  import { PrimaryNetworkVerticesService } from './services/PrimaryNetworkVerticesService.js';
17
18
 
18
19
  class Glacier {
20
+ default;
19
21
  evmBalances;
20
22
  evmBlocks;
21
23
  evmChains;
@@ -44,6 +46,7 @@ class Glacier {
44
46
  HEADERS: config?.HEADERS,
45
47
  ENCODE_PATH: config?.ENCODE_PATH
46
48
  });
49
+ this.default = new DefaultService(this.request);
47
50
  this.evmBalances = new EvmBalancesService(this.request);
48
51
  this.evmBlocks = new EvmBlocksService(this.request);
49
52
  this.evmChains = new EvmChainsService(this.request);
@@ -2,6 +2,7 @@ import { Rewards } from './Rewards.js';
2
2
  import { ValidatorHealthDetails } from './ValidatorHealthDetails.js';
3
3
 
4
4
  type ActiveValidatorDetails = {
5
+ txHash: string;
5
6
  nodeId: string;
6
7
  subnetId: string;
7
8
  amountStaked: string;
@@ -1,6 +1,7 @@
1
1
  import { Rewards } from './Rewards.js';
2
2
 
3
3
  type CompletedValidatorDetails = {
4
+ txHash: string;
4
5
  nodeId: string;
5
6
  subnetId: string;
6
7
  amountStaked: string;
@@ -0,0 +1,10 @@
1
+ import { ContractSubmissionErc1155 } from './ContractSubmissionErc1155.js';
2
+ import { ContractSubmissionErc20 } from './ContractSubmissionErc20.js';
3
+ import { ContractSubmissionErc721 } from './ContractSubmissionErc721.js';
4
+ import { ContractSubmissionUnknown } from './ContractSubmissionUnknown.js';
5
+
6
+ type ContractSubmissionBody = {
7
+ contract: (ContractSubmissionErc1155 | ContractSubmissionErc20 | ContractSubmissionErc721 | ContractSubmissionUnknown);
8
+ };
9
+
10
+ export { ContractSubmissionBody };
@@ -0,0 +1,31 @@
1
+ import { ImageAsset } from './ImageAsset.js';
2
+ import { PricingProviders } from './PricingProviders.js';
3
+ import { ResourceLink } from './ResourceLink.js';
4
+
5
+ type ContractSubmissionErc1155 = {
6
+ description?: string;
7
+ officialSite?: string;
8
+ email?: string;
9
+ logoAsset?: ImageAsset;
10
+ bannerAsset?: ImageAsset;
11
+ color?: string;
12
+ resourceLinks?: Array<ResourceLink>;
13
+ tags?: Array<string>;
14
+ /**
15
+ * The contract name.
16
+ */
17
+ name: string;
18
+ ercType: ContractSubmissionErc1155.ercType;
19
+ /**
20
+ * The contract symbol.
21
+ */
22
+ symbol: string;
23
+ pricingProviders?: PricingProviders;
24
+ };
25
+ declare namespace ContractSubmissionErc1155 {
26
+ enum ercType {
27
+ ERC_1155 = "ERC-1155"
28
+ }
29
+ }
30
+
31
+ export { ContractSubmissionErc1155 };
@@ -0,0 +1,8 @@
1
+ var ContractSubmissionErc1155;
2
+ ((ContractSubmissionErc11552) => {
3
+ ((ercType2) => {
4
+ ercType2["ERC_1155"] = "ERC-1155";
5
+ })(ContractSubmissionErc11552.ercType || (ContractSubmissionErc11552.ercType = {}));
6
+ })(ContractSubmissionErc1155 || (ContractSubmissionErc1155 = {}));
7
+
8
+ export { ContractSubmissionErc1155 };
@@ -0,0 +1,31 @@
1
+ import { ImageAsset } from './ImageAsset.js';
2
+ import { PricingProviders } from './PricingProviders.js';
3
+ import { ResourceLink } from './ResourceLink.js';
4
+
5
+ type ContractSubmissionErc20 = {
6
+ description?: string;
7
+ officialSite?: string;
8
+ email?: string;
9
+ logoAsset?: ImageAsset;
10
+ bannerAsset?: ImageAsset;
11
+ color?: string;
12
+ resourceLinks?: Array<ResourceLink>;
13
+ tags?: Array<string>;
14
+ /**
15
+ * The contract name.
16
+ */
17
+ name: string;
18
+ ercType: ContractSubmissionErc20.ercType;
19
+ /**
20
+ * The contract symbol.
21
+ */
22
+ symbol: string;
23
+ pricingProviders?: PricingProviders;
24
+ };
25
+ declare namespace ContractSubmissionErc20 {
26
+ enum ercType {
27
+ ERC_20 = "ERC-20"
28
+ }
29
+ }
30
+
31
+ export { ContractSubmissionErc20 };
@@ -0,0 +1,8 @@
1
+ var ContractSubmissionErc20;
2
+ ((ContractSubmissionErc202) => {
3
+ ((ercType2) => {
4
+ ercType2["ERC_20"] = "ERC-20";
5
+ })(ContractSubmissionErc202.ercType || (ContractSubmissionErc202.ercType = {}));
6
+ })(ContractSubmissionErc20 || (ContractSubmissionErc20 = {}));
7
+
8
+ export { ContractSubmissionErc20 };
@@ -0,0 +1,29 @@
1
+ import { ImageAsset } from './ImageAsset.js';
2
+ import { ResourceLink } from './ResourceLink.js';
3
+
4
+ type ContractSubmissionErc721 = {
5
+ description?: string;
6
+ officialSite?: string;
7
+ email?: string;
8
+ logoAsset?: ImageAsset;
9
+ bannerAsset?: ImageAsset;
10
+ color?: string;
11
+ resourceLinks?: Array<ResourceLink>;
12
+ tags?: Array<string>;
13
+ /**
14
+ * The contract name.
15
+ */
16
+ name: string;
17
+ ercType: ContractSubmissionErc721.ercType;
18
+ /**
19
+ * The contract symbol.
20
+ */
21
+ symbol: string;
22
+ };
23
+ declare namespace ContractSubmissionErc721 {
24
+ enum ercType {
25
+ ERC_721 = "ERC-721"
26
+ }
27
+ }
28
+
29
+ export { ContractSubmissionErc721 };
@@ -0,0 +1,8 @@
1
+ var ContractSubmissionErc721;
2
+ ((ContractSubmissionErc7212) => {
3
+ ((ercType2) => {
4
+ ercType2["ERC_721"] = "ERC-721";
5
+ })(ContractSubmissionErc7212.ercType || (ContractSubmissionErc7212.ercType = {}));
6
+ })(ContractSubmissionErc721 || (ContractSubmissionErc721 = {}));
7
+
8
+ export { ContractSubmissionErc721 };
@@ -0,0 +1,25 @@
1
+ import { ImageAsset } from './ImageAsset.js';
2
+ import { ResourceLink } from './ResourceLink.js';
3
+
4
+ type ContractSubmissionUnknown = {
5
+ description?: string;
6
+ officialSite?: string;
7
+ email?: string;
8
+ logoAsset?: ImageAsset;
9
+ bannerAsset?: ImageAsset;
10
+ color?: string;
11
+ resourceLinks?: Array<ResourceLink>;
12
+ tags?: Array<string>;
13
+ /**
14
+ * The contract name.
15
+ */
16
+ name: string;
17
+ ercType: ContractSubmissionUnknown.ercType;
18
+ };
19
+ declare namespace ContractSubmissionUnknown {
20
+ enum ercType {
21
+ UNKNOWN = "UNKNOWN"
22
+ }
23
+ }
24
+
25
+ export { ContractSubmissionUnknown };
@@ -0,0 +1,8 @@
1
+ var ContractSubmissionUnknown;
2
+ ((ContractSubmissionUnknown2) => {
3
+ ((ercType2) => {
4
+ ercType2["UNKNOWN"] = "UNKNOWN";
5
+ })(ContractSubmissionUnknown2.ercType || (ContractSubmissionUnknown2.ercType = {}));
6
+ })(ContractSubmissionUnknown || (ContractSubmissionUnknown = {}));
7
+
8
+ export { ContractSubmissionUnknown };
@@ -1,4 +1,5 @@
1
1
  type PendingValidatorDetails = {
2
+ txHash: string;
2
3
  nodeId: string;
3
4
  subnetId: string;
4
5
  amountStaked: string;
@@ -0,0 +1,10 @@
1
+ import { Erc1155Contract } from './Erc1155Contract.js';
2
+ import { Erc20Contract } from './Erc20Contract.js';
3
+ import { Erc721Contract } from './Erc721Contract.js';
4
+ import { UnknownContract } from './UnknownContract.js';
5
+
6
+ type UpdateContractResponse = {
7
+ contract: (UnknownContract | Erc20Contract | Erc721Contract | Erc1155Contract);
8
+ };
9
+
10
+ export { UpdateContractResponse };
@@ -0,0 +1,14 @@
1
+ import { CancelablePromise } from '../core/CancelablePromise.js';
2
+ import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
3
+
4
+ declare class DefaultService {
5
+ readonly httpRequest: BaseHttpRequest;
6
+ constructor(httpRequest: BaseHttpRequest);
7
+ /**
8
+ * @returns any
9
+ * @throws ApiError
10
+ */
11
+ mediaControllerUploadImage(): CancelablePromise<any>;
12
+ }
13
+
14
+ export { DefaultService };
@@ -0,0 +1,13 @@
1
+ class DefaultService {
2
+ constructor(httpRequest) {
3
+ this.httpRequest = httpRequest;
4
+ }
5
+ mediaControllerUploadImage() {
6
+ return this.httpRequest.request({
7
+ method: "POST",
8
+ url: "/v1/media/uploadImage"
9
+ });
10
+ }
11
+ }
12
+
13
+ export { DefaultService };
@@ -1,7 +1,9 @@
1
+ import { ContractSubmissionBody } from '../models/ContractSubmissionBody.js';
1
2
  import { Erc1155Contract } from '../models/Erc1155Contract.js';
2
3
  import { Erc20Contract } from '../models/Erc20Contract.js';
3
4
  import { Erc721Contract } from '../models/Erc721Contract.js';
4
5
  import { UnknownContract } from '../models/UnknownContract.js';
6
+ import { UpdateContractResponse } from '../models/UpdateContractResponse.js';
5
7
  import { CancelablePromise } from '../core/CancelablePromise.js';
6
8
  import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
7
9
 
@@ -24,6 +26,23 @@ declare class EvmContractsService {
24
26
  */
25
27
  address: string;
26
28
  }): CancelablePromise<(Erc721Contract | Erc1155Contract | Erc20Contract | UnknownContract)>;
29
+ /**
30
+ * Update contract information
31
+ * Update contract information. Updates will be reviewed by the Ava Labs team before they are published.
32
+ * @returns UpdateContractResponse
33
+ * @throws ApiError
34
+ */
35
+ updateContractInfo({ chainId, address, requestBody, }: {
36
+ /**
37
+ * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
38
+ */
39
+ chainId: string;
40
+ /**
41
+ * Contract address on the relevant chain.
42
+ */
43
+ address: string;
44
+ requestBody: ContractSubmissionBody;
45
+ }): CancelablePromise<UpdateContractResponse>;
27
46
  }
28
47
 
29
48
  export { EvmContractsService };
@@ -15,6 +15,22 @@ class EvmContractsService {
15
15
  }
16
16
  });
17
17
  }
18
+ updateContractInfo({
19
+ chainId,
20
+ address,
21
+ requestBody
22
+ }) {
23
+ return this.httpRequest.request({
24
+ method: "PATCH",
25
+ url: "/v1/chains/{chainId}/contracts/{address}",
26
+ path: {
27
+ "chainId": chainId,
28
+ "address": address
29
+ },
30
+ body: requestBody,
31
+ mediaType: "application/json"
32
+ });
33
+ }
18
34
  }
19
35
 
20
36
  export { EvmContractsService };
@@ -118,7 +118,7 @@ declare class PrimaryNetworkService {
118
118
  * @returns ListValidatorDetailsResponse
119
119
  * @throws ApiError
120
120
  */
121
- listValidators({ network, pageSize, pageToken, minTimeRemaining, maxTimeRemaining, minDelegationCapacity, maxDelegationCapacity, minFeePercentage, maxFeePercentage, nodeIds, sortOrder, validationStatus, }: {
121
+ listValidators({ network, pageSize, pageToken, minTimeRemaining, maxTimeRemaining, minDelegationCapacity, maxDelegationCapacity, minFeePercentage, maxFeePercentage, nodeIds, sortOrder, validationStatus, subnetId, }: {
122
122
  /**
123
123
  * Either mainnet or a testnet.
124
124
  */
@@ -132,11 +132,11 @@ declare class PrimaryNetworkService {
132
132
  */
133
133
  pageToken?: string;
134
134
  /**
135
- * The minimum delegation time remaining, in seconds, used to filter the set of nodes being returned.
135
+ * The minimum validation time remaining, in seconds, used to filter the set of nodes being returned.
136
136
  */
137
137
  minTimeRemaining?: any;
138
138
  /**
139
- * The maximum delegation time remaining, in seconds, used to filter the set of nodes being returned.
139
+ * The maximum validation time remaining, in seconds, used to filter the set of nodes being returned.
140
140
  */
141
141
  maxTimeRemaining?: any;
142
142
  /**
@@ -148,11 +148,11 @@ declare class PrimaryNetworkService {
148
148
  */
149
149
  maxDelegationCapacity?: number;
150
150
  /**
151
- * The minimum fee percentage, used to filter the set of nodes being returned. Default is 2, as per the Avalanche spec.
151
+ * The minimum fee percentage, used to filter the set of nodes being returned.If this field is populated no subnet validations will be returned, as their fee percentage is null, since subnet delegations are not supported. Default is 2, as per the Avalanche spec.
152
152
  */
153
153
  minFeePercentage?: any;
154
154
  /**
155
- * The maximum fee percentage, used to filter the set of nodes being returned. Default is 100.
155
+ * The maximum fee percentage, used to filter the set of nodes being returned. If this field is populated no subnet validations will be returned, as their fee percentage is null, since subnet delegations are not supported. Default is 100.
156
156
  */
157
157
  maxFeePercentage?: any;
158
158
  /**
@@ -167,6 +167,10 @@ declare class PrimaryNetworkService {
167
167
  * Validation status of the node.
168
168
  */
169
169
  validationStatus?: ValidationStatusType;
170
+ /**
171
+ * The subnet ID to filter by. If not provided, then all subnets will be returned.
172
+ */
173
+ subnetId?: string;
170
174
  }): CancelablePromise<ListValidatorDetailsResponse>;
171
175
  /**
172
176
  * Get single validator details
@@ -93,7 +93,8 @@ class PrimaryNetworkService {
93
93
  maxFeePercentage,
94
94
  nodeIds,
95
95
  sortOrder,
96
- validationStatus
96
+ validationStatus,
97
+ subnetId
97
98
  }) {
98
99
  return this.httpRequest.request({
99
100
  method: "GET",
@@ -112,7 +113,8 @@ class PrimaryNetworkService {
112
113
  "maxFeePercentage": maxFeePercentage,
113
114
  "nodeIds": nodeIds,
114
115
  "sortOrder": sortOrder,
115
- "validationStatus": validationStatus
116
+ "validationStatus": validationStatus,
117
+ "subnetId": subnetId
116
118
  }
117
119
  });
118
120
  }
package/esm/index.d.ts CHANGED
@@ -21,6 +21,11 @@ export { ChainStatus } from './generated/models/ChainStatus.js';
21
21
  export { CompletedDelegatorDetails } from './generated/models/CompletedDelegatorDetails.js';
22
22
  export { CompletedValidatorDetails } from './generated/models/CompletedValidatorDetails.js';
23
23
  export { ContractDeploymentDetails } from './generated/models/ContractDeploymentDetails.js';
24
+ export { ContractSubmissionBody } from './generated/models/ContractSubmissionBody.js';
25
+ export { ContractSubmissionErc1155 } from './generated/models/ContractSubmissionErc1155.js';
26
+ export { ContractSubmissionErc20 } from './generated/models/ContractSubmissionErc20.js';
27
+ export { ContractSubmissionErc721 } from './generated/models/ContractSubmissionErc721.js';
28
+ export { ContractSubmissionUnknown } from './generated/models/ContractSubmissionUnknown.js';
24
29
  export { CreateEvmTransactionExportRequest } from './generated/models/CreateEvmTransactionExportRequest.js';
25
30
  export { CreatePrimaryNetworkTransactionExportRequest } from './generated/models/CreatePrimaryNetworkTransactionExportRequest.js';
26
31
  export { CurrencyCode } from './generated/models/CurrencyCode.js';
@@ -134,6 +139,7 @@ export { TransactionMethodType } from './generated/models/TransactionMethodType.
134
139
  export { TransactionStatus } from './generated/models/TransactionStatus.js';
135
140
  export { TransactionVertexDetail } from './generated/models/TransactionVertexDetail.js';
136
141
  export { UnknownContract } from './generated/models/UnknownContract.js';
142
+ export { UpdateContractResponse } from './generated/models/UpdateContractResponse.js';
137
143
  export { UtilityAddresses } from './generated/models/UtilityAddresses.js';
138
144
  export { Utxo } from './generated/models/Utxo.js';
139
145
  export { UtxoCredential } from './generated/models/UtxoCredential.js';
@@ -150,6 +156,7 @@ export { XChainLinearTransaction } from './generated/models/XChainLinearTransact
150
156
  export { XChainNonLinearTransaction } from './generated/models/XChainNonLinearTransaction.js';
151
157
  export { XChainSharedAssetBalance } from './generated/models/XChainSharedAssetBalance.js';
152
158
  export { XChainVertex } from './generated/models/XChainVertex.js';
159
+ export { DefaultService } from './generated/services/DefaultService.js';
153
160
  export { EvmBalancesService } from './generated/services/EvmBalancesService.js';
154
161
  export { EvmBlocksService } from './generated/services/EvmBlocksService.js';
155
162
  export { EvmChainsService } from './generated/services/EvmChainsService.js';
package/esm/index.js CHANGED
@@ -12,6 +12,10 @@ export { CChainImportTransaction } from './generated/models/CChainImportTransact
12
12
  export { ChainStatus } from './generated/models/ChainStatus.js';
13
13
  export { CompletedDelegatorDetails } from './generated/models/CompletedDelegatorDetails.js';
14
14
  export { CompletedValidatorDetails } from './generated/models/CompletedValidatorDetails.js';
15
+ export { ContractSubmissionErc1155 } from './generated/models/ContractSubmissionErc1155.js';
16
+ export { ContractSubmissionErc20 } from './generated/models/ContractSubmissionErc20.js';
17
+ export { ContractSubmissionErc721 } from './generated/models/ContractSubmissionErc721.js';
18
+ export { ContractSubmissionUnknown } from './generated/models/ContractSubmissionUnknown.js';
15
19
  export { CreateEvmTransactionExportRequest } from './generated/models/CreateEvmTransactionExportRequest.js';
16
20
  export { CreatePrimaryNetworkTransactionExportRequest } from './generated/models/CreatePrimaryNetworkTransactionExportRequest.js';
17
21
  export { CurrencyCode } from './generated/models/CurrencyCode.js';
@@ -51,6 +55,7 @@ export { VmName } from './generated/models/VmName.js';
51
55
  export { XChainId } from './generated/models/XChainId.js';
52
56
  export { XChainLinearTransaction } from './generated/models/XChainLinearTransaction.js';
53
57
  export { XChainNonLinearTransaction } from './generated/models/XChainNonLinearTransaction.js';
58
+ export { DefaultService } from './generated/services/DefaultService.js';
54
59
  export { EvmBalancesService } from './generated/services/EvmBalancesService.js';
55
60
  export { EvmBlocksService } from './generated/services/EvmBlocksService.js';
56
61
  export { EvmChainsService } from './generated/services/EvmChainsService.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avalabs/glacier-sdk",
3
- "version": "2.8.0-canary.c69ce41.0+c69ce41",
3
+ "version": "2.8.0-canary.c7d9a06.0+c7d9a06",
4
4
  "description": "sdk for interacting with glacier-api",
5
5
  "author": "Oliver Wang <oliver.wang@avalabs.org>",
6
6
  "homepage": "https://github.com/ava-labs/avalanche-sdks#readme",
@@ -29,5 +29,5 @@
29
29
  "bugs": {
30
30
  "url": "https://github.com/ava-labs/avalanche-sdks/issues"
31
31
  },
32
- "gitHead": "c69ce41b8a1cd48ee018fdecfb5454dede2ae947"
32
+ "gitHead": "c7d9a068dbba9ce65a49df29028548e9c138bca6"
33
33
  }