@avalabs/glacier-sdk 2.8.0-alpha.123 → 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.
- package/dist/index.d.ts +254 -311
- package/dist/index.js +67 -148
- package/esm/generated/Glacier.d.ts +0 -4
- package/esm/generated/Glacier.js +1 -5
- package/esm/generated/core/OpenAPI.js +1 -1
- package/esm/generated/models/ActiveDelegatorDetails.d.ts +15 -0
- package/esm/generated/models/ActiveValidatorDetails.d.ts +20 -0
- package/esm/generated/models/DelegationStatusType.d.ts +3 -1
- package/esm/generated/models/DelegationStatusType.js +2 -0
- package/esm/generated/models/Erc1155Contract.d.ts +36 -0
- package/esm/generated/models/Erc1155Contract.js +8 -0
- package/esm/generated/models/{Contract.d.ts → Erc20Contract.d.ts} +24 -21
- package/esm/generated/models/Erc20Contract.js +8 -0
- package/esm/generated/models/Erc721Contract.d.ts +36 -0
- package/esm/generated/models/Erc721Contract.js +8 -0
- package/esm/generated/models/ImageAsset.d.ts +12 -0
- package/esm/generated/models/ListContractsResponse.d.ts +5 -2
- package/esm/generated/models/ListDelegatorDetailsResponse.d.ts +6 -1
- package/esm/generated/models/ListValidatorDetailsResponse.d.ts +6 -1
- package/esm/generated/models/PendingDelegatorDetails.d.ts +15 -0
- package/esm/generated/models/PendingValidatorDetails.d.ts +12 -0
- package/esm/generated/models/UnknownContract.d.ts +32 -0
- package/esm/generated/models/UnknownContract.js +8 -0
- package/esm/generated/models/ValidationStatusType.d.ts +3 -1
- package/esm/generated/models/ValidationStatusType.js +2 -0
- package/esm/generated/services/PrimaryNetworkService.d.ts +51 -8
- package/esm/generated/services/PrimaryNetworkService.js +34 -7
- package/esm/index.d.ts +9 -11
- package/esm/index.js +4 -5
- package/package.json +2 -2
- package/esm/generated/models/CollectionMetrics.d.ts +0 -41
- package/esm/generated/models/CollectionSortByOption.d.ts +0 -9
- package/esm/generated/models/CollectionSortByOption.js +0 -10
- package/esm/generated/models/ErcType.d.ts +0 -8
- package/esm/generated/models/ErcType.js +0 -9
- package/esm/generated/models/FloorPrice.d.ts +0 -8
- package/esm/generated/models/ListNftCollectionWithMetricsResponse.d.ts +0 -11
- package/esm/generated/models/NftCollection.d.ts +0 -24
- package/esm/generated/models/NftCollectionWithMetrics.d.ts +0 -26
- package/esm/generated/models/TrendingTimeframe.d.ts +0 -7
- package/esm/generated/models/TrendingTimeframe.js +0 -8
- package/esm/generated/services/DefaultService.d.ts +0 -52
- package/esm/generated/services/DefaultService.js +0 -34
- package/esm/generated/services/NfTsService.d.ts +0 -108
- package/esm/generated/services/NfTsService.js +0 -77
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { CollectionMetrics } from './CollectionMetrics.js';
|
|
2
|
-
import { ErcType } from './ErcType.js';
|
|
3
|
-
import { ResourceLink } from './ResourceLink.js';
|
|
4
|
-
|
|
5
|
-
type NftCollectionWithMetrics = {
|
|
6
|
-
/**
|
|
7
|
-
* A wallet or contract address in mixed-case checksum encoding.
|
|
8
|
-
*/
|
|
9
|
-
address: string;
|
|
10
|
-
/**
|
|
11
|
-
* The contract name.
|
|
12
|
-
*/
|
|
13
|
-
name: string;
|
|
14
|
-
/**
|
|
15
|
-
* The contract symbol.
|
|
16
|
-
*/
|
|
17
|
-
symbol: string;
|
|
18
|
-
ercType: ErcType;
|
|
19
|
-
bannerUri?: string;
|
|
20
|
-
logoUri?: string;
|
|
21
|
-
description?: string;
|
|
22
|
-
resourceLinks?: Array<ResourceLink>;
|
|
23
|
-
metrics: CollectionMetrics;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export { NftCollectionWithMetrics };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var TrendingTimeframe = /* @__PURE__ */ ((TrendingTimeframe2) => {
|
|
2
|
-
TrendingTimeframe2["DAY"] = "day";
|
|
3
|
-
TrendingTimeframe2["WEEK"] = "week";
|
|
4
|
-
TrendingTimeframe2["MONTH"] = "month";
|
|
5
|
-
return TrendingTimeframe2;
|
|
6
|
-
})(TrendingTimeframe || {});
|
|
7
|
-
|
|
8
|
-
export { TrendingTimeframe };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { ListDelegatorDetailsResponse } from '../models/ListDelegatorDetailsResponse.js';
|
|
2
|
-
import { Network } from '../models/Network.js';
|
|
3
|
-
import { SortOrder } from '../models/SortOrder.js';
|
|
4
|
-
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
5
|
-
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
6
|
-
|
|
7
|
-
declare class DefaultService {
|
|
8
|
-
readonly httpRequest: BaseHttpRequest;
|
|
9
|
-
constructor(httpRequest: BaseHttpRequest);
|
|
10
|
-
/**
|
|
11
|
-
* List delegators
|
|
12
|
-
* Lists details for delegators.
|
|
13
|
-
* @returns ListDelegatorDetailsResponse
|
|
14
|
-
* @throws ApiError
|
|
15
|
-
*/
|
|
16
|
-
listDelegators({ network, nodeId, delegationStatus, pageSize, pageToken, sortOrder, rewardAddresses, nodeIds, }: {
|
|
17
|
-
/**
|
|
18
|
-
* Either mainnet or a testnet.
|
|
19
|
-
*/
|
|
20
|
-
network: Network;
|
|
21
|
-
/**
|
|
22
|
-
* A primary network (P or X chain) nodeId.
|
|
23
|
-
*/
|
|
24
|
-
nodeId: string;
|
|
25
|
-
/**
|
|
26
|
-
* Delegation status of the node.
|
|
27
|
-
*/
|
|
28
|
-
delegationStatus: 'completed' | 'active' | 'pending';
|
|
29
|
-
/**
|
|
30
|
-
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
31
|
-
*/
|
|
32
|
-
pageSize?: number;
|
|
33
|
-
/**
|
|
34
|
-
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
35
|
-
*/
|
|
36
|
-
pageToken?: string;
|
|
37
|
-
/**
|
|
38
|
-
* The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
|
|
39
|
-
*/
|
|
40
|
-
sortOrder?: SortOrder;
|
|
41
|
-
/**
|
|
42
|
-
* A comma separated list of reward addresses to filter by.
|
|
43
|
-
*/
|
|
44
|
-
rewardAddresses?: string;
|
|
45
|
-
/**
|
|
46
|
-
* A comma separated list of node ids to filter by.
|
|
47
|
-
*/
|
|
48
|
-
nodeIds?: string;
|
|
49
|
-
}): CancelablePromise<ListDelegatorDetailsResponse>;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export { DefaultService };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
class DefaultService {
|
|
2
|
-
constructor(httpRequest) {
|
|
3
|
-
this.httpRequest = httpRequest;
|
|
4
|
-
}
|
|
5
|
-
listDelegators({
|
|
6
|
-
network,
|
|
7
|
-
nodeId,
|
|
8
|
-
delegationStatus,
|
|
9
|
-
pageSize = 10,
|
|
10
|
-
pageToken,
|
|
11
|
-
sortOrder,
|
|
12
|
-
rewardAddresses,
|
|
13
|
-
nodeIds
|
|
14
|
-
}) {
|
|
15
|
-
return this.httpRequest.request({
|
|
16
|
-
method: "GET",
|
|
17
|
-
url: "/v1/networks/{network}/delegators",
|
|
18
|
-
path: {
|
|
19
|
-
"network": network,
|
|
20
|
-
"nodeId": nodeId,
|
|
21
|
-
"delegationStatus": delegationStatus
|
|
22
|
-
},
|
|
23
|
-
query: {
|
|
24
|
-
"pageSize": pageSize,
|
|
25
|
-
"pageToken": pageToken,
|
|
26
|
-
"sortOrder": sortOrder,
|
|
27
|
-
"rewardAddresses": rewardAddresses,
|
|
28
|
-
"nodeIds": nodeIds
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { DefaultService };
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { CollectionSortByOption } from '../models/CollectionSortByOption.js';
|
|
2
|
-
import { Erc1155Token } from '../models/Erc1155Token.js';
|
|
3
|
-
import { Erc721Token } from '../models/Erc721Token.js';
|
|
4
|
-
import { ListNftCollectionWithMetricsResponse } from '../models/ListNftCollectionWithMetricsResponse.js';
|
|
5
|
-
import { NftCollectionWithMetrics } from '../models/NftCollectionWithMetrics.js';
|
|
6
|
-
import { SortOrder } from '../models/SortOrder.js';
|
|
7
|
-
import { TrendingTimeframe } from '../models/TrendingTimeframe.js';
|
|
8
|
-
import { CancelablePromise } from '../core/CancelablePromise.js';
|
|
9
|
-
import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
|
|
10
|
-
|
|
11
|
-
declare class NfTsService {
|
|
12
|
-
readonly httpRequest: BaseHttpRequest;
|
|
13
|
-
constructor(httpRequest: BaseHttpRequest);
|
|
14
|
-
/**
|
|
15
|
-
* Reindex NFT metadata
|
|
16
|
-
* Triggers reindexing of token metadata for NFT contracts. Will return 400 if the NFT has been indexed within the last hour.
|
|
17
|
-
* @returns any
|
|
18
|
-
* @throws ApiError
|
|
19
|
-
*/
|
|
20
|
-
reindexNft({ chainId, address, tokenId, }: {
|
|
21
|
-
/**
|
|
22
|
-
* A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
23
|
-
*/
|
|
24
|
-
chainId: string;
|
|
25
|
-
/**
|
|
26
|
-
* Contract address on the relevant chain.
|
|
27
|
-
*/
|
|
28
|
-
address: string;
|
|
29
|
-
/**
|
|
30
|
-
* TokenId on the contract
|
|
31
|
-
*/
|
|
32
|
-
tokenId: string;
|
|
33
|
-
}): CancelablePromise<any>;
|
|
34
|
-
/**
|
|
35
|
-
* Get collection details
|
|
36
|
-
* Get collection details for a specific contract.
|
|
37
|
-
* @returns NftCollectionWithMetrics
|
|
38
|
-
* @throws ApiError
|
|
39
|
-
*/
|
|
40
|
-
getCollection({ chainId, address, timeframe, }: {
|
|
41
|
-
/**
|
|
42
|
-
* A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
43
|
-
*/
|
|
44
|
-
chainId: string;
|
|
45
|
-
/**
|
|
46
|
-
* Contract address on the relevant chain.
|
|
47
|
-
*/
|
|
48
|
-
address: string;
|
|
49
|
-
/**
|
|
50
|
-
* The timeframe to use for trending listings. Use "DAY" for 24 hours, "WEEK" for 7 days, "MONTH" for 30 days.
|
|
51
|
-
*/
|
|
52
|
-
timeframe?: TrendingTimeframe;
|
|
53
|
-
}): CancelablePromise<NftCollectionWithMetrics>;
|
|
54
|
-
/**
|
|
55
|
-
* List collections
|
|
56
|
-
* Lists details and metrics for collections.
|
|
57
|
-
* @returns ListNftCollectionWithMetricsResponse
|
|
58
|
-
* @throws ApiError
|
|
59
|
-
*/
|
|
60
|
-
listCollections({ chainId, pageSize, pageToken, timeframe, sortBy, sortOrder, }: {
|
|
61
|
-
/**
|
|
62
|
-
* A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
63
|
-
*/
|
|
64
|
-
chainId: string;
|
|
65
|
-
/**
|
|
66
|
-
* The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
|
|
67
|
-
*/
|
|
68
|
-
pageSize?: number;
|
|
69
|
-
/**
|
|
70
|
-
* A page token, received from a previous list call. Provide this to retrieve the subsequent page.
|
|
71
|
-
*/
|
|
72
|
-
pageToken?: string;
|
|
73
|
-
/**
|
|
74
|
-
* The timeframe to use for trending listings. Use "DAY" for 24 hours, "WEEK" for 7 days, "MONTH" for 30 days.
|
|
75
|
-
*/
|
|
76
|
-
timeframe?: TrendingTimeframe;
|
|
77
|
-
/**
|
|
78
|
-
* Which property to sort by, in conjunction with sortOrder.
|
|
79
|
-
*/
|
|
80
|
-
sortBy?: CollectionSortByOption;
|
|
81
|
-
/**
|
|
82
|
-
* The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the `sortBy` query parameter, if provided.
|
|
83
|
-
*/
|
|
84
|
-
sortOrder?: SortOrder;
|
|
85
|
-
}): CancelablePromise<ListNftCollectionWithMetricsResponse>;
|
|
86
|
-
/**
|
|
87
|
-
* Get token details
|
|
88
|
-
* Get token details for a specific token of a contract.
|
|
89
|
-
* @returns any
|
|
90
|
-
* @throws ApiError
|
|
91
|
-
*/
|
|
92
|
-
getTokenDetails({ chainId, address, tokenId, }: {
|
|
93
|
-
/**
|
|
94
|
-
* A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids.
|
|
95
|
-
*/
|
|
96
|
-
chainId: string;
|
|
97
|
-
/**
|
|
98
|
-
* Contract address on the relevant chain.
|
|
99
|
-
*/
|
|
100
|
-
address: string;
|
|
101
|
-
/**
|
|
102
|
-
* TokenId on the contract
|
|
103
|
-
*/
|
|
104
|
-
tokenId: string;
|
|
105
|
-
}): CancelablePromise<(Erc721Token | Erc1155Token)>;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export { NfTsService };
|
|
@@ -1,77 +0,0 @@
|
|
|
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
|
-
getCollection({
|
|
21
|
-
chainId,
|
|
22
|
-
address,
|
|
23
|
-
timeframe
|
|
24
|
-
}) {
|
|
25
|
-
return this.httpRequest.request({
|
|
26
|
-
method: "GET",
|
|
27
|
-
url: "/v1/chains/{chainId}/nfts/collections/{address}",
|
|
28
|
-
path: {
|
|
29
|
-
"chainId": chainId,
|
|
30
|
-
"address": address
|
|
31
|
-
},
|
|
32
|
-
query: {
|
|
33
|
-
"timeframe": timeframe
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
listCollections({
|
|
38
|
-
chainId,
|
|
39
|
-
pageSize = 10,
|
|
40
|
-
pageToken,
|
|
41
|
-
timeframe,
|
|
42
|
-
sortBy,
|
|
43
|
-
sortOrder
|
|
44
|
-
}) {
|
|
45
|
-
return this.httpRequest.request({
|
|
46
|
-
method: "GET",
|
|
47
|
-
url: "/v1/chains/{chainId}/nfts/collections",
|
|
48
|
-
path: {
|
|
49
|
-
"chainId": chainId
|
|
50
|
-
},
|
|
51
|
-
query: {
|
|
52
|
-
"pageSize": pageSize,
|
|
53
|
-
"pageToken": pageToken,
|
|
54
|
-
"timeframe": timeframe,
|
|
55
|
-
"sortBy": sortBy,
|
|
56
|
-
"sortOrder": sortOrder
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
getTokenDetails({
|
|
61
|
-
chainId,
|
|
62
|
-
address,
|
|
63
|
-
tokenId
|
|
64
|
-
}) {
|
|
65
|
-
return this.httpRequest.request({
|
|
66
|
-
method: "GET",
|
|
67
|
-
url: "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}",
|
|
68
|
-
path: {
|
|
69
|
-
"chainId": chainId,
|
|
70
|
-
"address": address,
|
|
71
|
-
"tokenId": tokenId
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export { NfTsService };
|