@avalabs/glacier-sdk 2.8.0-canary.9b911e2.0 → 2.8.0-canary.a18b4e4.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 +75 -14
- package/dist/index.js +52 -3
- package/esm/generated/Glacier.d.ts +2 -0
- package/esm/generated/Glacier.js +2 -0
- package/esm/generated/models/Erc1155Contract.d.ts +2 -1
- package/esm/generated/models/Erc20Contract.d.ts +2 -1
- package/esm/generated/models/Erc721Contract.d.ts +0 -1
- package/esm/generated/models/ImageAsset.d.ts +0 -3
- package/esm/generated/models/PricingProviders.d.ts +5 -0
- package/esm/generated/models/UnknownContract.d.ts +0 -1
- package/esm/generated/services/NfTsService.d.ts +69 -0
- package/esm/generated/services/NfTsService.js +50 -0
- package/esm/generated/services/PrimaryNetworkService.d.ts +1 -5
- package/esm/generated/services/PrimaryNetworkService.js +1 -3
- package/esm/generated/services/PrimaryNetworkTransactionsService.d.ts +5 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.js +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1012,9 +1012,6 @@ type ContractDeploymentDetails = {
|
|
|
1012
1012
|
};
|
|
1013
1013
|
|
|
1014
1014
|
type ImageAsset = {
|
|
1015
|
-
/**
|
|
1016
|
-
* INPUT ONLY
|
|
1017
|
-
*/
|
|
1018
1015
|
assetId?: string;
|
|
1019
1016
|
/**
|
|
1020
1017
|
* OUTPUT ONLY
|
|
@@ -1022,6 +1019,10 @@ type ImageAsset = {
|
|
|
1022
1019
|
imageUri?: string;
|
|
1023
1020
|
};
|
|
1024
1021
|
|
|
1022
|
+
type PricingProviders = {
|
|
1023
|
+
coingeckoCoinId?: string;
|
|
1024
|
+
};
|
|
1025
|
+
|
|
1025
1026
|
declare enum ResourceLinkType {
|
|
1026
1027
|
BLOG = "Blog",
|
|
1027
1028
|
COIN_GECKO = "CoinGecko",
|
|
@@ -1059,7 +1060,6 @@ type Erc1155Contract = {
|
|
|
1059
1060
|
logoAsset?: ImageAsset;
|
|
1060
1061
|
bannerAsset?: ImageAsset;
|
|
1061
1062
|
color?: string;
|
|
1062
|
-
coingeckoCoinId?: string;
|
|
1063
1063
|
resourceLinks?: Array<ResourceLink>;
|
|
1064
1064
|
tags?: Array<string>;
|
|
1065
1065
|
/**
|
|
@@ -1072,6 +1072,7 @@ type Erc1155Contract = {
|
|
|
1072
1072
|
* The contract symbol.
|
|
1073
1073
|
*/
|
|
1074
1074
|
symbol?: string;
|
|
1075
|
+
pricingProviders?: PricingProviders;
|
|
1075
1076
|
};
|
|
1076
1077
|
declare namespace Erc1155Contract {
|
|
1077
1078
|
enum ercType {
|
|
@@ -1090,7 +1091,6 @@ type Erc20Contract = {
|
|
|
1090
1091
|
logoAsset?: ImageAsset;
|
|
1091
1092
|
bannerAsset?: ImageAsset;
|
|
1092
1093
|
color?: string;
|
|
1093
|
-
coingeckoCoinId?: string;
|
|
1094
1094
|
resourceLinks?: Array<ResourceLink>;
|
|
1095
1095
|
tags?: Array<string>;
|
|
1096
1096
|
/**
|
|
@@ -1107,6 +1107,7 @@ type Erc20Contract = {
|
|
|
1107
1107
|
* The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
|
|
1108
1108
|
*/
|
|
1109
1109
|
decimals: number;
|
|
1110
|
+
pricingProviders: PricingProviders;
|
|
1110
1111
|
};
|
|
1111
1112
|
declare namespace Erc20Contract {
|
|
1112
1113
|
enum ercType {
|
|
@@ -1125,7 +1126,6 @@ type Erc721Contract = {
|
|
|
1125
1126
|
logoAsset?: ImageAsset;
|
|
1126
1127
|
bannerAsset?: ImageAsset;
|
|
1127
1128
|
color?: string;
|
|
1128
|
-
coingeckoCoinId?: string;
|
|
1129
1129
|
resourceLinks?: Array<ResourceLink>;
|
|
1130
1130
|
tags?: Array<string>;
|
|
1131
1131
|
/**
|
|
@@ -1156,7 +1156,6 @@ type UnknownContract = {
|
|
|
1156
1156
|
logoAsset?: ImageAsset;
|
|
1157
1157
|
bannerAsset?: ImageAsset;
|
|
1158
1158
|
color?: string;
|
|
1159
|
-
coingeckoCoinId?: string;
|
|
1160
1159
|
resourceLinks?: Array<ResourceLink>;
|
|
1161
1160
|
tags?: Array<string>;
|
|
1162
1161
|
/**
|
|
@@ -1731,6 +1730,67 @@ declare class HealthCheckService {
|
|
|
1731
1730
|
}>;
|
|
1732
1731
|
}
|
|
1733
1732
|
|
|
1733
|
+
declare class NfTsService {
|
|
1734
|
+
readonly httpRequest: BaseHttpRequest;
|
|
1735
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
1736
|
+
/**
|
|
1737
|
+
* Reindex NFT metadata
|
|
1738
|
+
* Triggers reindexing of token metadata for an NFT token. Reindexing can only be called once per hour for each NFT token.
|
|
1739
|
+
* @returns any
|
|
1740
|
+
* @throws ApiError
|
|
1741
|
+
*/
|
|
1742
|
+
reindexNft({ chainId, address, tokenId, }: {
|
|
1743
|
+
/**
|
|
1744
|
+
* A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
1745
|
+
*/
|
|
1746
|
+
chainId: string;
|
|
1747
|
+
/**
|
|
1748
|
+
* Contract address on the relevant chain.
|
|
1749
|
+
*/
|
|
1750
|
+
address: string;
|
|
1751
|
+
/**
|
|
1752
|
+
* TokenId on the contract
|
|
1753
|
+
*/
|
|
1754
|
+
tokenId: string;
|
|
1755
|
+
}): CancelablePromise<any>;
|
|
1756
|
+
/**
|
|
1757
|
+
* Get token details
|
|
1758
|
+
* Gets token details for a specific token of an NFT contract.
|
|
1759
|
+
* @returns any
|
|
1760
|
+
* @throws ApiError
|
|
1761
|
+
*/
|
|
1762
|
+
getTokenDetails({ chainId, address, tokenId, }: {
|
|
1763
|
+
/**
|
|
1764
|
+
* A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
1765
|
+
*/
|
|
1766
|
+
chainId: string;
|
|
1767
|
+
/**
|
|
1768
|
+
* Contract address on the relevant chain.
|
|
1769
|
+
*/
|
|
1770
|
+
address: string;
|
|
1771
|
+
/**
|
|
1772
|
+
* TokenId on the contract
|
|
1773
|
+
*/
|
|
1774
|
+
tokenId: string;
|
|
1775
|
+
}): CancelablePromise<(Erc721Token | Erc1155Token)>;
|
|
1776
|
+
/**
|
|
1777
|
+
* Get collection details
|
|
1778
|
+
* Gets collection details for a NFT contract.
|
|
1779
|
+
* @returns any
|
|
1780
|
+
* @throws ApiError
|
|
1781
|
+
*/
|
|
1782
|
+
getCollection({ chainId, address, }: {
|
|
1783
|
+
/**
|
|
1784
|
+
* A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
1785
|
+
*/
|
|
1786
|
+
chainId: string;
|
|
1787
|
+
/**
|
|
1788
|
+
* Contract address on the relevant chain.
|
|
1789
|
+
*/
|
|
1790
|
+
address: string;
|
|
1791
|
+
}): CancelablePromise<(Erc721Contract | Erc1155Contract)>;
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1734
1794
|
type EvmNetworkOptions = {
|
|
1735
1795
|
addresses: Array<string>;
|
|
1736
1796
|
includeChains: Array<string>;
|
|
@@ -2256,15 +2316,11 @@ declare class PrimaryNetworkService {
|
|
|
2256
2316
|
* @returns ListDelegatorDetailsResponse
|
|
2257
2317
|
* @throws ApiError
|
|
2258
2318
|
*/
|
|
2259
|
-
listDelegators({ network,
|
|
2319
|
+
listDelegators({ network, pageSize, pageToken, sortOrder, delegationStatus, rewardAddresses, nodeIds, }: {
|
|
2260
2320
|
/**
|
|
2261
2321
|
* Either mainnet or a testnet.
|
|
2262
2322
|
*/
|
|
2263
2323
|
network: Network;
|
|
2264
|
-
/**
|
|
2265
|
-
* A primary network (P or X chain) nodeId.
|
|
2266
|
-
*/
|
|
2267
|
-
nodeId: string;
|
|
2268
2324
|
/**
|
|
2269
2325
|
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
2270
2326
|
*/
|
|
@@ -3311,7 +3367,11 @@ declare class PrimaryNetworkTransactionsService {
|
|
|
3311
3367
|
}): CancelablePromise<(PChainTransaction | XChainNonLinearTransaction | XChainLinearTransaction | CChainExportTransaction | CChainImportTransaction)>;
|
|
3312
3368
|
/**
|
|
3313
3369
|
* List latest transactions
|
|
3314
|
-
* Lists the latest transactions on one of the Primary Network chains.
|
|
3370
|
+
* Lists the latest transactions on one of the Primary Network chains.
|
|
3371
|
+
*
|
|
3372
|
+
* Transactions are filterable by addresses.
|
|
3373
|
+
*
|
|
3374
|
+
* Given that each transaction may return a large number of UTXO objects, bounded only by the maximum transaction size, the query may return less transactions than the provided page size. The result will contain less results than the page size if the number of utxos contained in the resulting transactions reach a performance threshold.
|
|
3315
3375
|
* @returns any
|
|
3316
3376
|
* @throws ApiError
|
|
3317
3377
|
*/
|
|
@@ -3610,6 +3670,7 @@ declare class Glacier {
|
|
|
3610
3670
|
readonly evmChains: EvmChainsService;
|
|
3611
3671
|
readonly evmTransactions: EvmTransactionsService;
|
|
3612
3672
|
readonly healthCheck: HealthCheckService;
|
|
3673
|
+
readonly nfTs: NfTsService;
|
|
3613
3674
|
readonly operations: OperationsService;
|
|
3614
3675
|
readonly primaryNetwork: PrimaryNetworkService;
|
|
3615
3676
|
readonly primaryNetworkBalances: PrimaryNetworkBalancesService;
|
|
@@ -3639,4 +3700,4 @@ declare class ApiError extends Error {
|
|
|
3639
3700
|
constructor(request: ApiRequestOptions, response: ApiResult, message: string);
|
|
3640
3701
|
}
|
|
3641
3702
|
|
|
3642
|
-
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, 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, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainAsset, PChainBalance, PChainId, PChainSharedAsset, PChainTransaction, PChainTransactionType, PChainUtxo, PendingDelegatorDetails, PendingReward, PendingValidatorDetails, 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, ValidatorsDetails, VmName, XChainAssetBalance, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainVertex };
|
|
3703
|
+
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, 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, ValidatorsDetails, VmName, XChainAssetBalance, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainVertex };
|
package/dist/index.js
CHANGED
|
@@ -796,6 +796,55 @@ class HealthCheckService {
|
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
798
|
|
|
799
|
+
class NfTsService {
|
|
800
|
+
constructor(httpRequest) {
|
|
801
|
+
this.httpRequest = httpRequest;
|
|
802
|
+
}
|
|
803
|
+
reindexNft({
|
|
804
|
+
chainId,
|
|
805
|
+
address,
|
|
806
|
+
tokenId
|
|
807
|
+
}) {
|
|
808
|
+
return this.httpRequest.request({
|
|
809
|
+
method: "POST",
|
|
810
|
+
url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}:reindex",
|
|
811
|
+
path: {
|
|
812
|
+
"chainId": chainId,
|
|
813
|
+
"address": address,
|
|
814
|
+
"tokenId": tokenId
|
|
815
|
+
}
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
getTokenDetails({
|
|
819
|
+
chainId,
|
|
820
|
+
address,
|
|
821
|
+
tokenId
|
|
822
|
+
}) {
|
|
823
|
+
return this.httpRequest.request({
|
|
824
|
+
method: "GET",
|
|
825
|
+
url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}",
|
|
826
|
+
path: {
|
|
827
|
+
"chainId": chainId,
|
|
828
|
+
"address": address,
|
|
829
|
+
"tokenId": tokenId
|
|
830
|
+
}
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
getCollection({
|
|
834
|
+
chainId,
|
|
835
|
+
address
|
|
836
|
+
}) {
|
|
837
|
+
return this.httpRequest.request({
|
|
838
|
+
method: "GET",
|
|
839
|
+
url: "/v1/chains/{chainId}/nfts/collections/{address}",
|
|
840
|
+
path: {
|
|
841
|
+
"chainId": chainId,
|
|
842
|
+
"address": address
|
|
843
|
+
}
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
|
|
799
848
|
class OperationsService {
|
|
800
849
|
constructor(httpRequest) {
|
|
801
850
|
this.httpRequest = httpRequest;
|
|
@@ -956,7 +1005,6 @@ class PrimaryNetworkService {
|
|
|
956
1005
|
}
|
|
957
1006
|
listDelegators({
|
|
958
1007
|
network,
|
|
959
|
-
nodeId,
|
|
960
1008
|
pageSize = 10,
|
|
961
1009
|
pageToken,
|
|
962
1010
|
sortOrder,
|
|
@@ -968,8 +1016,7 @@ class PrimaryNetworkService {
|
|
|
968
1016
|
method: "GET",
|
|
969
1017
|
url: "/v1/networks/{network}/delegators",
|
|
970
1018
|
path: {
|
|
971
|
-
"network": network
|
|
972
|
-
"nodeId": nodeId
|
|
1019
|
+
"network": network
|
|
973
1020
|
},
|
|
974
1021
|
query: {
|
|
975
1022
|
"pageSize": pageSize,
|
|
@@ -1338,6 +1385,7 @@ class Glacier {
|
|
|
1338
1385
|
this.evmChains = new EvmChainsService(this.request);
|
|
1339
1386
|
this.evmTransactions = new EvmTransactionsService(this.request);
|
|
1340
1387
|
this.healthCheck = new HealthCheckService(this.request);
|
|
1388
|
+
this.nfTs = new NfTsService(this.request);
|
|
1341
1389
|
this.operations = new OperationsService(this.request);
|
|
1342
1390
|
this.primaryNetwork = new PrimaryNetworkService(this.request);
|
|
1343
1391
|
this.primaryNetworkBalances = new PrimaryNetworkBalancesService(this.request);
|
|
@@ -1732,6 +1780,7 @@ exports.HealthCheckService = HealthCheckService;
|
|
|
1732
1780
|
exports.InternalTransactionOpCall = InternalTransactionOpCall;
|
|
1733
1781
|
exports.Network = Network;
|
|
1734
1782
|
exports.NetworkType = NetworkType;
|
|
1783
|
+
exports.NfTsService = NfTsService;
|
|
1735
1784
|
exports.NftTokenMetadataStatus = NftTokenMetadataStatus;
|
|
1736
1785
|
exports.OpenAPI = OpenAPI;
|
|
1737
1786
|
exports.OperationStatus = OperationStatus;
|
|
@@ -5,6 +5,7 @@ import { EvmBlocksService } from './services/EvmBlocksService.js';
|
|
|
5
5
|
import { EvmChainsService } from './services/EvmChainsService.js';
|
|
6
6
|
import { EvmTransactionsService } from './services/EvmTransactionsService.js';
|
|
7
7
|
import { HealthCheckService } from './services/HealthCheckService.js';
|
|
8
|
+
import { NfTsService } from './services/NfTsService.js';
|
|
8
9
|
import { OperationsService } from './services/OperationsService.js';
|
|
9
10
|
import { PrimaryNetworkService } from './services/PrimaryNetworkService.js';
|
|
10
11
|
import { PrimaryNetworkBalancesService } from './services/PrimaryNetworkBalancesService.js';
|
|
@@ -21,6 +22,7 @@ declare class Glacier {
|
|
|
21
22
|
readonly evmChains: EvmChainsService;
|
|
22
23
|
readonly evmTransactions: EvmTransactionsService;
|
|
23
24
|
readonly healthCheck: HealthCheckService;
|
|
25
|
+
readonly nfTs: NfTsService;
|
|
24
26
|
readonly operations: OperationsService;
|
|
25
27
|
readonly primaryNetwork: PrimaryNetworkService;
|
|
26
28
|
readonly primaryNetworkBalances: PrimaryNetworkBalancesService;
|
package/esm/generated/Glacier.js
CHANGED
|
@@ -4,6 +4,7 @@ import { EvmBlocksService } from './services/EvmBlocksService.js';
|
|
|
4
4
|
import { EvmChainsService } from './services/EvmChainsService.js';
|
|
5
5
|
import { EvmTransactionsService } from './services/EvmTransactionsService.js';
|
|
6
6
|
import { HealthCheckService } from './services/HealthCheckService.js';
|
|
7
|
+
import { NfTsService } from './services/NfTsService.js';
|
|
7
8
|
import { OperationsService } from './services/OperationsService.js';
|
|
8
9
|
import { PrimaryNetworkService } from './services/PrimaryNetworkService.js';
|
|
9
10
|
import { PrimaryNetworkBalancesService } from './services/PrimaryNetworkBalancesService.js';
|
|
@@ -32,6 +33,7 @@ class Glacier {
|
|
|
32
33
|
this.evmChains = new EvmChainsService(this.request);
|
|
33
34
|
this.evmTransactions = new EvmTransactionsService(this.request);
|
|
34
35
|
this.healthCheck = new HealthCheckService(this.request);
|
|
36
|
+
this.nfTs = new NfTsService(this.request);
|
|
35
37
|
this.operations = new OperationsService(this.request);
|
|
36
38
|
this.primaryNetwork = new PrimaryNetworkService(this.request);
|
|
37
39
|
this.primaryNetworkBalances = new PrimaryNetworkBalancesService(this.request);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ContractDeploymentDetails } from './ContractDeploymentDetails.js';
|
|
2
2
|
import { ImageAsset } from './ImageAsset.js';
|
|
3
|
+
import { PricingProviders } from './PricingProviders.js';
|
|
3
4
|
import { ResourceLink } from './ResourceLink.js';
|
|
4
5
|
|
|
5
6
|
type Erc1155Contract = {
|
|
@@ -13,7 +14,6 @@ type Erc1155Contract = {
|
|
|
13
14
|
logoAsset?: ImageAsset;
|
|
14
15
|
bannerAsset?: ImageAsset;
|
|
15
16
|
color?: string;
|
|
16
|
-
coingeckoCoinId?: string;
|
|
17
17
|
resourceLinks?: Array<ResourceLink>;
|
|
18
18
|
tags?: Array<string>;
|
|
19
19
|
/**
|
|
@@ -26,6 +26,7 @@ type Erc1155Contract = {
|
|
|
26
26
|
* The contract symbol.
|
|
27
27
|
*/
|
|
28
28
|
symbol?: string;
|
|
29
|
+
pricingProviders?: PricingProviders;
|
|
29
30
|
};
|
|
30
31
|
declare namespace Erc1155Contract {
|
|
31
32
|
enum ercType {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ContractDeploymentDetails } from './ContractDeploymentDetails.js';
|
|
2
2
|
import { ImageAsset } from './ImageAsset.js';
|
|
3
|
+
import { PricingProviders } from './PricingProviders.js';
|
|
3
4
|
import { ResourceLink } from './ResourceLink.js';
|
|
4
5
|
|
|
5
6
|
type Erc20Contract = {
|
|
@@ -13,7 +14,6 @@ type Erc20Contract = {
|
|
|
13
14
|
logoAsset?: ImageAsset;
|
|
14
15
|
bannerAsset?: ImageAsset;
|
|
15
16
|
color?: string;
|
|
16
|
-
coingeckoCoinId?: string;
|
|
17
17
|
resourceLinks?: Array<ResourceLink>;
|
|
18
18
|
tags?: Array<string>;
|
|
19
19
|
/**
|
|
@@ -30,6 +30,7 @@ type Erc20Contract = {
|
|
|
30
30
|
* The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation.
|
|
31
31
|
*/
|
|
32
32
|
decimals: number;
|
|
33
|
+
pricingProviders: PricingProviders;
|
|
33
34
|
};
|
|
34
35
|
declare namespace Erc20Contract {
|
|
35
36
|
enum ercType {
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Erc1155Contract } from '../models/Erc1155Contract.js';
|
|
2
|
+
import { Erc1155Token } from '../models/Erc1155Token.js';
|
|
3
|
+
import { Erc721Contract } from '../models/Erc721Contract.js';
|
|
4
|
+
import { Erc721Token } from '../models/Erc721Token.js';
|
|
5
|
+
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
6
|
+
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
7
|
+
|
|
8
|
+
declare class NfTsService {
|
|
9
|
+
readonly httpRequest: BaseHttpRequest;
|
|
10
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
11
|
+
/**
|
|
12
|
+
* Reindex NFT metadata
|
|
13
|
+
* Triggers reindexing of token metadata for an NFT token. Reindexing can only be called once per hour for each NFT token.
|
|
14
|
+
* @returns any
|
|
15
|
+
* @throws ApiError
|
|
16
|
+
*/
|
|
17
|
+
reindexNft({ chainId, address, tokenId, }: {
|
|
18
|
+
/**
|
|
19
|
+
* A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
20
|
+
*/
|
|
21
|
+
chainId: string;
|
|
22
|
+
/**
|
|
23
|
+
* Contract address on the relevant chain.
|
|
24
|
+
*/
|
|
25
|
+
address: string;
|
|
26
|
+
/**
|
|
27
|
+
* TokenId on the contract
|
|
28
|
+
*/
|
|
29
|
+
tokenId: string;
|
|
30
|
+
}): CancelablePromise<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Get token details
|
|
33
|
+
* Gets token details for a specific token of an NFT contract.
|
|
34
|
+
* @returns any
|
|
35
|
+
* @throws ApiError
|
|
36
|
+
*/
|
|
37
|
+
getTokenDetails({ chainId, address, tokenId, }: {
|
|
38
|
+
/**
|
|
39
|
+
* A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
40
|
+
*/
|
|
41
|
+
chainId: string;
|
|
42
|
+
/**
|
|
43
|
+
* Contract address on the relevant chain.
|
|
44
|
+
*/
|
|
45
|
+
address: string;
|
|
46
|
+
/**
|
|
47
|
+
* TokenId on the contract
|
|
48
|
+
*/
|
|
49
|
+
tokenId: string;
|
|
50
|
+
}): CancelablePromise<(Erc721Token | Erc1155Token)>;
|
|
51
|
+
/**
|
|
52
|
+
* Get collection details
|
|
53
|
+
* Gets collection details for a NFT contract.
|
|
54
|
+
* @returns any
|
|
55
|
+
* @throws ApiError
|
|
56
|
+
*/
|
|
57
|
+
getCollection({ chainId, address, }: {
|
|
58
|
+
/**
|
|
59
|
+
* A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
60
|
+
*/
|
|
61
|
+
chainId: string;
|
|
62
|
+
/**
|
|
63
|
+
* Contract address on the relevant chain.
|
|
64
|
+
*/
|
|
65
|
+
address: string;
|
|
66
|
+
}): CancelablePromise<(Erc721Contract | Erc1155Contract)>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { NfTsService };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
class NfTsService {
|
|
2
|
+
constructor(httpRequest) {
|
|
3
|
+
this.httpRequest = httpRequest;
|
|
4
|
+
}
|
|
5
|
+
reindexNft({
|
|
6
|
+
chainId,
|
|
7
|
+
address,
|
|
8
|
+
tokenId
|
|
9
|
+
}) {
|
|
10
|
+
return this.httpRequest.request({
|
|
11
|
+
method: "POST",
|
|
12
|
+
url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}:reindex",
|
|
13
|
+
path: {
|
|
14
|
+
"chainId": chainId,
|
|
15
|
+
"address": address,
|
|
16
|
+
"tokenId": tokenId
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
getTokenDetails({
|
|
21
|
+
chainId,
|
|
22
|
+
address,
|
|
23
|
+
tokenId
|
|
24
|
+
}) {
|
|
25
|
+
return this.httpRequest.request({
|
|
26
|
+
method: "GET",
|
|
27
|
+
url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}",
|
|
28
|
+
path: {
|
|
29
|
+
"chainId": chainId,
|
|
30
|
+
"address": address,
|
|
31
|
+
"tokenId": tokenId
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
getCollection({
|
|
36
|
+
chainId,
|
|
37
|
+
address
|
|
38
|
+
}) {
|
|
39
|
+
return this.httpRequest.request({
|
|
40
|
+
method: "GET",
|
|
41
|
+
url: "/v1/chains/{chainId}/nfts/collections/{address}",
|
|
42
|
+
path: {
|
|
43
|
+
"chainId": chainId,
|
|
44
|
+
"address": address
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { NfTsService };
|
|
@@ -186,15 +186,11 @@ declare class PrimaryNetworkService {
|
|
|
186
186
|
* @returns ListDelegatorDetailsResponse
|
|
187
187
|
* @throws ApiError
|
|
188
188
|
*/
|
|
189
|
-
listDelegators({ network,
|
|
189
|
+
listDelegators({ network, pageSize, pageToken, sortOrder, delegationStatus, rewardAddresses, nodeIds, }: {
|
|
190
190
|
/**
|
|
191
191
|
* Either mainnet or a testnet.
|
|
192
192
|
*/
|
|
193
193
|
network: Network;
|
|
194
|
-
/**
|
|
195
|
-
* A primary network (P or X chain) nodeId.
|
|
196
|
-
*/
|
|
197
|
-
nodeId: string;
|
|
198
194
|
/**
|
|
199
195
|
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
200
196
|
*/
|
|
@@ -131,7 +131,6 @@ class PrimaryNetworkService {
|
|
|
131
131
|
}
|
|
132
132
|
listDelegators({
|
|
133
133
|
network,
|
|
134
|
-
nodeId,
|
|
135
134
|
pageSize = 10,
|
|
136
135
|
pageToken,
|
|
137
136
|
sortOrder,
|
|
@@ -143,8 +142,7 @@ class PrimaryNetworkService {
|
|
|
143
142
|
method: "GET",
|
|
144
143
|
url: "/v1/networks/{network}/delegators",
|
|
145
144
|
path: {
|
|
146
|
-
"network": network
|
|
147
|
-
"nodeId": nodeId
|
|
145
|
+
"network": network
|
|
148
146
|
},
|
|
149
147
|
query: {
|
|
150
148
|
"pageSize": pageSize,
|
|
@@ -40,7 +40,11 @@ declare class PrimaryNetworkTransactionsService {
|
|
|
40
40
|
}): CancelablePromise<(PChainTransaction | XChainNonLinearTransaction | XChainLinearTransaction | CChainExportTransaction | CChainImportTransaction)>;
|
|
41
41
|
/**
|
|
42
42
|
* List latest transactions
|
|
43
|
-
* Lists the latest transactions on one of the Primary Network chains.
|
|
43
|
+
* Lists the latest transactions on one of the Primary Network chains.
|
|
44
|
+
*
|
|
45
|
+
* Transactions are filterable by addresses.
|
|
46
|
+
*
|
|
47
|
+
* Given that each transaction may return a large number of UTXO objects, bounded only by the maximum transaction size, the query may return less transactions than the provided page size. The result will contain less results than the page size if the number of utxos contained in the resulting transactions reach a performance threshold.
|
|
44
48
|
* @returns any
|
|
45
49
|
* @throws ApiError
|
|
46
50
|
*/
|
package/esm/index.d.ts
CHANGED
|
@@ -112,6 +112,7 @@ export { PChainUtxo } from './generated/models/PChainUtxo.js';
|
|
|
112
112
|
export { PendingDelegatorDetails } from './generated/models/PendingDelegatorDetails.js';
|
|
113
113
|
export { PendingReward } from './generated/models/PendingReward.js';
|
|
114
114
|
export { PendingValidatorDetails } from './generated/models/PendingValidatorDetails.js';
|
|
115
|
+
export { PricingProviders } from './generated/models/PricingProviders.js';
|
|
115
116
|
export { PrimaryNetwork } from './generated/models/PrimaryNetwork.js';
|
|
116
117
|
export { PrimaryNetworkBlock } from './generated/models/PrimaryNetworkBlock.js';
|
|
117
118
|
export { PrimaryNetworkChainInfo } from './generated/models/PrimaryNetworkChainInfo.js';
|
|
@@ -153,6 +154,7 @@ export { EvmBlocksService } from './generated/services/EvmBlocksService.js';
|
|
|
153
154
|
export { EvmChainsService } from './generated/services/EvmChainsService.js';
|
|
154
155
|
export { EvmTransactionsService } from './generated/services/EvmTransactionsService.js';
|
|
155
156
|
export { HealthCheckService } from './generated/services/HealthCheckService.js';
|
|
157
|
+
export { NfTsService } from './generated/services/NfTsService.js';
|
|
156
158
|
export { OperationsService } from './generated/services/OperationsService.js';
|
|
157
159
|
export { PrimaryNetworkService } from './generated/services/PrimaryNetworkService.js';
|
|
158
160
|
export { PrimaryNetworkBalancesService } from './generated/services/PrimaryNetworkBalancesService.js';
|
package/esm/index.js
CHANGED
|
@@ -50,6 +50,7 @@ export { EvmBlocksService } from './generated/services/EvmBlocksService.js';
|
|
|
50
50
|
export { EvmChainsService } from './generated/services/EvmChainsService.js';
|
|
51
51
|
export { EvmTransactionsService } from './generated/services/EvmTransactionsService.js';
|
|
52
52
|
export { HealthCheckService } from './generated/services/HealthCheckService.js';
|
|
53
|
+
export { NfTsService } from './generated/services/NfTsService.js';
|
|
53
54
|
export { OperationsService } from './generated/services/OperationsService.js';
|
|
54
55
|
export { PrimaryNetworkService } from './generated/services/PrimaryNetworkService.js';
|
|
55
56
|
export { PrimaryNetworkBalancesService } from './generated/services/PrimaryNetworkBalancesService.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avalabs/glacier-sdk",
|
|
3
|
-
"version": "2.8.0-canary.
|
|
3
|
+
"version": "2.8.0-canary.a18b4e4.0+a18b4e4",
|
|
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": "
|
|
32
|
+
"gitHead": "a18b4e4968306df140321320437290753563f31e"
|
|
33
33
|
}
|