@avalabs/glacier-sdk 2.8.0-alpha.8 → 2.8.0-alpha.80

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.
@@ -0,0 +1,148 @@
1
+ var CurrencyCode = /* @__PURE__ */ ((CurrencyCode2) => {
2
+ CurrencyCode2["Usd"] = "usd";
3
+ CurrencyCode2["Eur"] = "eur";
4
+ CurrencyCode2["Aud"] = "aud";
5
+ CurrencyCode2["Cad"] = "cad";
6
+ CurrencyCode2["Chf"] = "chf";
7
+ CurrencyCode2["Clp"] = "clp";
8
+ CurrencyCode2["Cny"] = "cny";
9
+ CurrencyCode2["Czk"] = "czk";
10
+ CurrencyCode2["Dkk"] = "dkk";
11
+ CurrencyCode2["Gbp"] = "gbp";
12
+ CurrencyCode2["Hkd"] = "hkd";
13
+ CurrencyCode2["Huf"] = "huf";
14
+ CurrencyCode2["Jpy"] = "jpy";
15
+ CurrencyCode2["Nzd"] = "nzd";
16
+ return CurrencyCode2;
17
+ })(CurrencyCode || {});
18
+ var NftTokenMetadataStatus = /* @__PURE__ */ ((NftTokenMetadataStatus2) => {
19
+ NftTokenMetadataStatus2["UNKNOWN"] = "UNKNOWN";
20
+ NftTokenMetadataStatus2["MISSING_TOKEN"] = "MISSING_TOKEN";
21
+ NftTokenMetadataStatus2["INVALID_TOKEN_URI"] = "INVALID_TOKEN_URI";
22
+ NftTokenMetadataStatus2["INVALID_TOKEN_URI_SCHEME"] = "INVALID_TOKEN_URI_SCHEME";
23
+ NftTokenMetadataStatus2["UNREACHABLE_TOKEN_URI"] = "UNREACHABLE_TOKEN_URI";
24
+ NftTokenMetadataStatus2["THROTTLED_TOKEN_URI"] = "THROTTLED_TOKEN_URI";
25
+ NftTokenMetadataStatus2["METADATA_CONTENT_TOO_LARGE"] = "METADATA_CONTENT_TOO_LARGE";
26
+ NftTokenMetadataStatus2["INVALID_METADATA"] = "INVALID_METADATA";
27
+ NftTokenMetadataStatus2["INVALID_METADATA_JSON"] = "INVALID_METADATA_JSON";
28
+ NftTokenMetadataStatus2["INDEXED"] = "INDEXED";
29
+ NftTokenMetadataStatus2["UNINDEXED"] = "UNINDEXED";
30
+ return NftTokenMetadataStatus2;
31
+ })(NftTokenMetadataStatus || {});
32
+ var InternalTransactionOpCall = /* @__PURE__ */ ((InternalTransactionOpCall2) => {
33
+ InternalTransactionOpCall2["UNKNOWN"] = "UNKNOWN";
34
+ InternalTransactionOpCall2["CALL"] = "CALL";
35
+ InternalTransactionOpCall2["CREATE"] = "CREATE";
36
+ InternalTransactionOpCall2["CREATE2"] = "CREATE2";
37
+ InternalTransactionOpCall2["CALLCODE"] = "CALLCODE";
38
+ InternalTransactionOpCall2["DELEGATECALL"] = "DELEGATECALL";
39
+ InternalTransactionOpCall2["STATICCALL"] = "STATICCALL";
40
+ return InternalTransactionOpCall2;
41
+ })(InternalTransactionOpCall || {});
42
+ var TransactionMethodType = /* @__PURE__ */ ((TransactionMethodType2) => {
43
+ TransactionMethodType2["NATIVE_TRANSFER"] = "NATIVE_TRANSFER";
44
+ TransactionMethodType2["CONTRACT_CALL"] = "CONTRACT_CALL";
45
+ TransactionMethodType2["CONTRACT_CREATION"] = "CONTRACT_CREATION";
46
+ return TransactionMethodType2;
47
+ })(TransactionMethodType || {});
48
+ var ContractType = /* @__PURE__ */ ((ContractType2) => {
49
+ ContractType2["ERC20"] = "ERC-20";
50
+ ContractType2["ERC721"] = "ERC-721";
51
+ ContractType2["Other"] = "Other";
52
+ return ContractType2;
53
+ })(ContractType || {});
54
+ var AssetType = /* @__PURE__ */ ((AssetType2) => {
55
+ AssetType2["FixedCap"] = "Fixed Cap";
56
+ AssetType2["UnlimitedCap"] = "Unlimited Cap";
57
+ AssetType2["Stablecoin"] = "Stablecoin";
58
+ AssetType2["NFT"] = "NFT";
59
+ return AssetType2;
60
+ })(AssetType || {});
61
+ var ResourceLinkType = /* @__PURE__ */ ((ResourceLinkType2) => {
62
+ ResourceLinkType2["Twitter"] = "Twitter";
63
+ ResourceLinkType2["Facebook"] = "Facebook";
64
+ ResourceLinkType2["Discord"] = "Discord";
65
+ ResourceLinkType2["Telegram"] = "Telegram";
66
+ ResourceLinkType2["Blog"] = "Blog";
67
+ ResourceLinkType2["Medium"] = "Medium";
68
+ ResourceLinkType2["Whitepaper"] = "Whitepaper";
69
+ ResourceLinkType2["CoinGecko"] = "CoinGecko";
70
+ ResourceLinkType2["CoinMarketCap"] = "CoinMarketCap";
71
+ ResourceLinkType2["LinkedIn"] = "LinkedIn";
72
+ ResourceLinkType2["Reddit"] = "Reddit";
73
+ ResourceLinkType2["Support"] = "Support";
74
+ ResourceLinkType2["Github"] = "Github";
75
+ ResourceLinkType2["Documentation"] = "Documentation";
76
+ return ResourceLinkType2;
77
+ })(ResourceLinkType || {});
78
+ var ReviewStatus = /* @__PURE__ */ ((ReviewStatus2) => {
79
+ ReviewStatus2["Pending"] = "Pending";
80
+ ReviewStatus2["Approved"] = "Approved";
81
+ return ReviewStatus2;
82
+ })(ReviewStatus || {});
83
+ var TransactionStatus = /* @__PURE__ */ ((TransactionStatus2) => {
84
+ TransactionStatus2["Failed"] = "failed";
85
+ TransactionStatus2["Success"] = "success";
86
+ return TransactionStatus2;
87
+ })(TransactionStatus || {});
88
+ var VmName = /* @__PURE__ */ ((VmName2) => {
89
+ VmName2["EVM"] = "EVM";
90
+ VmName2["BITCOIN"] = "BITCOIN";
91
+ VmName2["ETHEREUM"] = "ETHEREUM";
92
+ return VmName2;
93
+ })(VmName || {});
94
+ var BlockchainId = /* @__PURE__ */ ((BlockchainId2) => {
95
+ BlockchainId2["Value11111111111111111111111111111111LpoYY"] = "11111111111111111111111111111111LpoYY";
96
+ BlockchainId2["Value2OYMBNV4ENHyqk2FjjV5NVQLDbtmNJzq5S3Qs3Lo6FtnC6FByM"] = "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM";
97
+ return BlockchainId2;
98
+ })(BlockchainId || {});
99
+ var Network = /* @__PURE__ */ ((Network2) => {
100
+ Network2["Mainnet"] = "mainnet";
101
+ Network2["Fuji"] = "fuji";
102
+ return Network2;
103
+ })(Network || {});
104
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
105
+ SortOrder2["Asc"] = "asc";
106
+ SortOrder2["Desc"] = "desc";
107
+ return SortOrder2;
108
+ })(SortOrder || {});
109
+ var ErcType = /* @__PURE__ */ ((ErcType2) => {
110
+ ErcType2["ERC20"] = "ERC-20";
111
+ ErcType2["ERC721"] = "ERC-721";
112
+ ErcType2["ERC1155"] = "ERC-1155";
113
+ return ErcType2;
114
+ })(ErcType || {});
115
+ var SortByOption = /* @__PURE__ */ ((SortByOption2) => {
116
+ SortByOption2["LastEventTimestamp"] = "lastEventTimestamp";
117
+ return SortByOption2;
118
+ })(SortByOption || {});
119
+ var ListingType = /* @__PURE__ */ ((ListingType2) => {
120
+ ListingType2["SALE"] = "SALE";
121
+ ListingType2["AUCTION"] = "AUCTION";
122
+ return ListingType2;
123
+ })(ListingType || {});
124
+ var ListingCurrencyType = /* @__PURE__ */ ((ListingCurrencyType2) => {
125
+ ListingCurrencyType2["NATIVE"] = "NATIVE";
126
+ ListingCurrencyType2["ERC20"] = "ERC20";
127
+ return ListingCurrencyType2;
128
+ })(ListingCurrencyType || {});
129
+ var ListingEventType = /* @__PURE__ */ ((ListingEventType2) => {
130
+ ListingEventType2["OPEN_LISTING"] = "OPEN_LISTING";
131
+ ListingEventType2["CANCEL_LISTING"] = "CANCEL_LISTING";
132
+ ListingEventType2["PURCHASE_LISTING"] = "PURCHASE_LISTING";
133
+ ListingEventType2["CLOSE_AUCTION"] = "CLOSE_AUCTION";
134
+ return ListingEventType2;
135
+ })(ListingEventType || {});
136
+ var TrendingTimeframe = /* @__PURE__ */ ((TrendingTimeframe2) => {
137
+ TrendingTimeframe2["Day"] = "day";
138
+ TrendingTimeframe2["Week"] = "week";
139
+ TrendingTimeframe2["Month"] = "month";
140
+ return TrendingTimeframe2;
141
+ })(TrendingTimeframe || {});
142
+ var NftSearchResultTypeOption = /* @__PURE__ */ ((NftSearchResultTypeOption2) => {
143
+ NftSearchResultTypeOption2["Token"] = "token";
144
+ NftSearchResultTypeOption2["Collection"] = "collection";
145
+ return NftSearchResultTypeOption2;
146
+ })(NftSearchResultTypeOption || {});
147
+
148
+ export { AssetType, BlockchainId, ContractType, CurrencyCode, ErcType, InternalTransactionOpCall, ListingCurrencyType, ListingEventType, ListingType, Network, NftSearchResultTypeOption, NftTokenMetadataStatus, ResourceLinkType, ReviewStatus, SortByOption, SortOrder, TransactionMethodType, TransactionStatus, TrendingTimeframe, VmName };
@@ -1,93 +1,128 @@
1
- import { HttpOptions } from '@avalabs/utils-sdk';
2
- import { ChainInfo, Chains, CurrencyCode, Erc20Balances, Erc721Balances, ListTransactionDetails, NativeBalance, TransactionDetails } from './generated/models';
3
- import { HealthStatusCheck } from './types';
4
- export declare class GlacierClient {
5
- private baseUrl;
6
- private version;
7
- private httpOptions?;
8
- private httpClient;
9
- constructor(baseUrl: string, version?: string, httpOptions?: HttpOptions | undefined);
10
- /**
11
- *
12
- * @name HealthCheck
13
- * @summary Get the health of the service.
14
- * @request GET:/${version}/health-check
15
- * @response `200` `{ status?: string, info?: Record<string, { status?: string }>, error?: Record<string, { status?: string }>, details?: Record<string, { status?: string }> }` The Health Check is successful
16
- * @response `503` `{ status?: string, info?: Record<string, { status?: string }>, error?: Record<string, { status?: string }>, details?: Record<string, { status?: string }> }` The Health Check is not successful
17
- */
18
- healthCheck(params?: Record<string, any>, customOptions?: HttpOptions): Promise<HealthStatusCheck>;
19
- /**
20
- * No description
21
- *
22
- * @name GetNativeBalance
23
- * @summary Get native token balance of a wallet address for a given chain.
24
- * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:getNative
25
- * @response `200` `NativeBalanceDto`
26
- */
27
- getNativeBalance(chainId: string, address: string, query?: {
28
- currency?: CurrencyCode;
29
- }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<NativeBalance>;
30
- /**
31
- *
32
- * @name ListErc20Balances
33
- * @summary Get erc-20 token balances of a wallet address for a given chain.
34
- * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:listErc20
35
- * @response `200` `Erc20BalancesDto`
36
- */
37
- listErc20Balances(chainId: string, address: string, query?: {
38
- pageSize?: number;
39
- pageToken?: string;
40
- currency?: CurrencyCode;
41
- }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<Erc20Balances>;
42
- /**
43
- * No description
44
- *
45
- * @name ListErc721Balances
46
- * @summary Get erc-721 token balances of a wallet address for a given chain.
47
- * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:listErc721
48
- * @response `200` `Erc721BalancesDto`
49
- */
50
- listErc721Balances(chainId: string, address: string, query?: {
51
- pageSize?: number;
52
- pageToken?: string;
53
- currency?: CurrencyCode;
54
- }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<Erc721Balances>;
55
- /**
56
- * @description Gets a list of transactions where the given wallet address had an on-chain interaction for a given chain. The erc20 transfers, erc721 transfers, and internal transactions returned as part of the native transactions are only those where the address had an interaction. Therefore the transactions returned from this list may not be complete representations of the on-chain data. For a complete view of a transaction use the `/chains/:chainId/transactions/:txHash` endpoint.
57
- *
58
- * @name ListTransactions
59
- * @summary Gets a list of transactions for a wallet address and chain.
60
- * @request GET:/v1/chains/{chainId}/addresses/{address}/transactions
61
- * @response `200` `ListTransactionDetailsDto`
62
- */
63
- listTransactions(chainId: string, address: string, query?: {
64
- pageSize?: number;
65
- pageToken?: string;
66
- }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListTransactionDetails>;
67
- /**
68
- *
69
- * @name GetTransaction
70
- * @summary Gets the details of a single transaction.
71
- * @request GET:/v1/chains/{chainId}/transactions/{txHash}
72
- * @response `200` `TransactionDetailsDto`
73
- */
74
- getTransaction(chainId: string, txHash: string, params?: Record<string, any>, customOptions?: HttpOptions): Promise<TransactionDetails>;
75
- /**
76
- *
77
- * @name SupportedChains
78
- * @summary Gets the list of chains supported by the api.
79
- * @request GET:/v1/chains
80
- * @response `200` `ChainsDto`
81
- */
82
- supportedChains(params?: Record<string, any>, customOptions?: HttpOptions): Promise<Chains>;
83
- /**
84
- * No description
85
- *
86
- * @name GetChainInfo
87
- * @summary Gets chain information by chain id.
88
- * @request GET:/v1/chains/{chainId}
89
- * @response `200` `ChainInfoDto`
90
- */
91
- getChainInfo(chainId: string, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ChainInfo>;
92
- }
93
- //# sourceMappingURL=glacierClient.d.ts.map
1
+ import { HttpOptions } from '@avalabs/utils-sdk';
2
+ import { CurrencyCode, GetNativeBalanceResponse, ListErc20BalancesResponse, ListErc721BalancesResponse, ListTransactionDetailsResponse, TransactionDetails, ListChainsResponse, ChainInfo, Network, SortOrder, ListPChainTransactionsResponse } from './generated/models.js';
3
+ import { HealthStatusCheck } from './types.js';
4
+
5
+ declare class GlacierClient {
6
+ private baseUrl;
7
+ private version;
8
+ private httpOptions?;
9
+ private httpClient;
10
+ constructor(baseUrl: string, version?: string, httpOptions?: HttpOptions | undefined);
11
+ /**
12
+ *
13
+ * @name HealthCheck
14
+ * @summary Get the health of the service.
15
+ * @request GET:/${version}/health-check
16
+ * @response `200` `{ status?: string, info?: Record<string, { status?: string }>, error?: Record<string, { status?: string }>, details?: Record<string, { status?: string }> }` The Health Check is successful
17
+ * @response `503` `{ status?: string, info?: Record<string, { status?: string }>, error?: Record<string, { status?: string }>, details?: Record<string, { status?: string }> }` The Health Check is not successful
18
+ */
19
+ healthCheck(params?: Record<string, any>, customOptions?: HttpOptions): Promise<HealthStatusCheck>;
20
+ /**
21
+ * No description
22
+ *
23
+ * @name GetNativeBalance
24
+ * @summary Get native token balance of a wallet address for a given chain.
25
+ * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:getNative
26
+ * @response `200` `NativeBalanceDto`
27
+ */
28
+ getNativeBalance(chainId: string, address: string, query?: {
29
+ currency?: CurrencyCode;
30
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<GetNativeBalanceResponse>;
31
+ /**
32
+ *
33
+ * @name ListErc20Balances
34
+ * @summary Get erc-20 token balances of a wallet address for a given chain.
35
+ * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:listErc20
36
+ * @response `200` `Erc20BalancesDto`
37
+ */
38
+ listErc20Balances(chainId: string, address: string, query?: {
39
+ pageSize?: number;
40
+ pageToken?: string;
41
+ currency?: CurrencyCode;
42
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListErc20BalancesResponse>;
43
+ /**
44
+ * No description
45
+ *
46
+ * @name ListErc721Balances
47
+ * @summary Get erc-721 token balances of a wallet address for a given chain.
48
+ * @request GET:/v1/chains/{chainId}/addresses/{address}/balances:listErc721
49
+ * @response `200` `Erc721BalancesDto`
50
+ */
51
+ listErc721Balances(chainId: string, address: string, query?: {
52
+ pageSize?: number;
53
+ pageToken?: string;
54
+ currency?: CurrencyCode;
55
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListErc721BalancesResponse>;
56
+ /**
57
+ * @description Gets a list of transactions where the given wallet address had an on-chain interaction for a given chain. The erc20 transfers, erc721 transfers, and internal transactions returned as part of the native transactions are only those where the address had an interaction. Therefore the transactions returned from this list may not be complete representations of the on-chain data. For a complete view of a transaction use the `/chains/:chainId/transactions/:txHash` endpoint.
58
+ *
59
+ * @name ListTransactions
60
+ * @summary Gets a list of transactions for a wallet address and chain.
61
+ * @request GET:/v1/chains/{chainId}/addresses/{address}/transactions
62
+ * @response `200` `ListTransactionDetailsDto`
63
+ */
64
+ listTransactions(chainId: string, address: string, query?: {
65
+ pageSize?: number;
66
+ pageToken?: string;
67
+ }, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListTransactionDetailsResponse>;
68
+ /**
69
+ *
70
+ * @name GetTransaction
71
+ * @summary Gets the details of a single transaction.
72
+ * @request GET:/v1/chains/{chainId}/transactions/{txHash}
73
+ * @response `200` `TransactionDetailsDto`
74
+ */
75
+ getTransaction(chainId: string, txHash: string, params?: Record<string, any>, customOptions?: HttpOptions): Promise<TransactionDetails>;
76
+ /**
77
+ *
78
+ * @name SupportedChains
79
+ * @summary Gets the list of chains supported by the api.
80
+ * @request GET:/v1/chains
81
+ * @response `200` `ChainsDto`
82
+ */
83
+ supportedChains(params?: Record<string, any>, customOptions?: HttpOptions): Promise<ListChainsResponse>;
84
+ /**
85
+ * No description
86
+ *
87
+ * @name GetChainInfo
88
+ * @summary Gets chain information by chain id.
89
+ * @request GET:/v1/chains/{chainId}
90
+ * @response `200` `ChainInfoDto`
91
+ */
92
+ getChainInfo(chainId: string, params?: Record<string, any>, customOptions?: HttpOptions): Promise<ChainInfo>;
93
+ /**
94
+ * No description
95
+ *
96
+ * @tags Primary Network
97
+ * @name listActiveStakingTransactions
98
+ * @summary Returns active staking transactions for supplied addresses.
99
+ * @request GET:/v1/networks/{network}/blockchains/{blockchainId}/transactions:listStaking
100
+ */
101
+ listActiveStakingTransactions: (blockchainId: string, network: Network, query?: {
102
+ /**
103
+ * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
104
+ * @example "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg"
105
+ */
106
+ addresses?: string;
107
+ /**
108
+ * The maximum number of items to return. The minimum page size
109
+ * is 1. The maximum pageSize is 100.
110
+ * @min 1
111
+ * @max 100
112
+ * @default 10
113
+ * @example "10"
114
+ */
115
+ pageSize?: number;
116
+ /** A page token, received from a previous list call. Provide this to retrieve the subsequent page. */
117
+ pageToken?: string;
118
+ /**
119
+ * The order by which to sort results. Use "asc" for ascending
120
+ * order, "desc" for descending order. Sorted by timestamp or the `sortBy`
121
+ * query parameter, if provided.
122
+ * @example "asc"
123
+ */
124
+ sortOrder?: SortOrder;
125
+ }, params?: Record<string, string>, customOptions?: HttpOptions) => Promise<ListPChainTransactionsResponse>;
126
+ }
127
+
128
+ export { GlacierClient };
@@ -0,0 +1,94 @@
1
+ import { HttpClient } from '@avalabs/utils-sdk';
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ class GlacierClient {
20
+ constructor(baseUrl, version = "v1", httpOptions) {
21
+ this.baseUrl = baseUrl;
22
+ this.version = version;
23
+ this.httpOptions = httpOptions;
24
+ this.listActiveStakingTransactions = (blockchainId, network, query, params = {}, customOptions = {}) => {
25
+ return this.httpClient.get(
26
+ `/networks/${network}/blockchains/${blockchainId}/transactions:listStaking`,
27
+ __spreadValues(__spreadValues({}, query), params),
28
+ customOptions
29
+ );
30
+ };
31
+ this.httpClient = new HttpClient(
32
+ `${this.baseUrl}/${this.version}`,
33
+ this.httpOptions
34
+ );
35
+ }
36
+ healthCheck(params = {}, customOptions = {}) {
37
+ return this.httpClient.get(
38
+ `/health-check`,
39
+ params,
40
+ customOptions
41
+ );
42
+ }
43
+ getNativeBalance(chainId, address, query, params = {}, customOptions = {}) {
44
+ return this.httpClient.get(
45
+ `/chains/${chainId}/addresses/${address}/balances:getNative`,
46
+ __spreadValues(__spreadValues({}, query), params),
47
+ customOptions
48
+ );
49
+ }
50
+ listErc20Balances(chainId, address, query, params = {}, customOptions = {}) {
51
+ return this.httpClient.get(
52
+ `/chains/${chainId}/addresses/${address}/balances:listErc20`,
53
+ __spreadValues(__spreadValues({}, query), params),
54
+ customOptions
55
+ );
56
+ }
57
+ listErc721Balances(chainId, address, query, params = {}, customOptions = {}) {
58
+ return this.httpClient.get(
59
+ `/chains/${chainId}/addresses/${address}/balances:listErc721`,
60
+ __spreadValues(__spreadValues({}, query), params),
61
+ customOptions
62
+ );
63
+ }
64
+ listTransactions(chainId, address, query, params = {}, customOptions = {}) {
65
+ return this.httpClient.get(
66
+ `/chains/${chainId}/addresses/${address}/transactions`,
67
+ __spreadValues(__spreadValues({}, query), params),
68
+ customOptions
69
+ );
70
+ }
71
+ getTransaction(chainId, txHash, params = {}, customOptions = {}) {
72
+ return this.httpClient.get(
73
+ `/chains/${chainId}/transactions/${txHash}`,
74
+ params,
75
+ customOptions
76
+ );
77
+ }
78
+ supportedChains(params = {}, customOptions = {}) {
79
+ return this.httpClient.get(
80
+ `/chains`,
81
+ params,
82
+ customOptions
83
+ );
84
+ }
85
+ getChainInfo(chainId, params = {}, customOptions = {}) {
86
+ return this.httpClient.get(
87
+ `/chains/${chainId}`,
88
+ params,
89
+ customOptions
90
+ );
91
+ }
92
+ }
93
+
94
+ export { GlacierClient };
package/esm/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { Address, AssetType, BlockchainId, CancelListingEventResponse, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, CloseAuctionEventResponse, ContractType, CurrencyCode, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, ErcType, FullNativeTransactionDetails, GetBlockResponse, GetChainResponse, GetContractInformationResponse, GetNativeBalanceResponse, GetPChainBlockResponse, GetPChainTransactionResponse, GetTransactionResponse, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlocksResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListInternalTransactionsResponse, ListListingMetricsResponse, ListListingsResponse, ListNativeTransactionsResponse, ListPChainBalancesResponse, ListPChainBlocksResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListXChainVerticesResponse, ListingCurrencyType, ListingEventType, ListingMetricsMap, ListingMetricsResponse, ListingResponse, ListingType, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NftCollection, NftFilterOptionsProperty, NftSearchBody, NftSearchResultTypeOption, NftTokenMetadataStatus, OpenListingEventResponse, OperationInfoResponse, OperationRequestBody, OperationResultResponse, PChainAsset, PChainBalance, PChainBlock, PChainConsumedUtxo, PChainEmittedUtxo, PChainTransaction, PChainUtxo, PaginationParams, ProposerDetails, PurchaseListingEventResponse, ResourceLink, ResourceLinkType, ReviewStatus, RichAddress, SortByOption, SortOrder, TokenWithPrice, TransactionDetails, TransactionMethodType, TransactionStatus, TrendingTimeframe, UtilityAddresses, VmName, XChainVertex } from './generated/models.js';
2
+ export { GlacierClient } from './glacierClient.js';
package/esm/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { AssetType, BlockchainId, ContractType, CurrencyCode, ErcType, InternalTransactionOpCall, ListingCurrencyType, ListingEventType, ListingType, Network, NftSearchResultTypeOption, NftTokenMetadataStatus, ResourceLinkType, ReviewStatus, SortByOption, SortOrder, TransactionMethodType, TransactionStatus, TrendingTimeframe, VmName } from './generated/models.js';
2
+ export { GlacierClient } from './glacierClient.js';
@@ -1,13 +1,14 @@
1
- export interface HealthStatusCheck {
2
- status?: string;
3
- info?: Record<string, {
4
- status?: string;
5
- }>;
6
- error?: Record<string, {
7
- status?: string;
8
- }>;
9
- details?: Record<string, {
10
- status?: string;
11
- }>;
12
- }
13
- //# sourceMappingURL=types.d.ts.map
1
+ interface HealthStatusCheck {
2
+ status?: string;
3
+ info?: Record<string, {
4
+ status?: string;
5
+ }>;
6
+ error?: Record<string, {
7
+ status?: string;
8
+ }>;
9
+ details?: Record<string, {
10
+ status?: string;
11
+ }>;
12
+ }
13
+
14
+ export { HealthStatusCheck };
package/package.json CHANGED
@@ -1,25 +1,23 @@
1
1
  {
2
2
  "name": "@avalabs/glacier-sdk",
3
- "version": "2.8.0-alpha.8",
3
+ "version": "2.8.0-alpha.80",
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",
7
7
  "license": "ISC",
8
8
  "main": "dist/index.js",
9
+ "module": "esm/index.js",
9
10
  "typings": "dist/index.d.ts",
11
+ "files": [
12
+ "dist",
13
+ "esm"
14
+ ],
15
+ "sideEffects": false,
10
16
  "publishConfig": {
11
17
  "access": "restricted"
12
18
  },
13
19
  "devDependencies": {
14
- "@rollup/plugin-json": "^4.1.0",
15
- "@rollup/plugin-typescript": "^8.2.1",
16
- "@zerollup/ts-transform-paths": "^1.7.18",
17
- "rollup": "^2.47.0",
18
- "rollup-plugin-commonjs": "^10.1.0",
19
- "rollup-plugin-delete": "^2.0.0",
20
- "rollup-plugin-typescript2": "^0.30.0",
21
- "swagger-typescript-api": "10.0.1",
22
- "ttypescript": "^1.5.12"
20
+ "swagger-typescript-api": "12.0.3"
23
21
  },
24
22
  "repository": {
25
23
  "type": "git",
@@ -29,14 +27,13 @@
29
27
  "codegen": "node ./swagger/generateModels.js",
30
28
  "start": "rollup -c --watch",
31
29
  "build": "rollup -c",
32
- "build:prod": "rollup -c --environment BUILD:production",
33
30
  "lint": "eslint --fix -c ./.eslintrc.js \"src/**/*.ts*\""
34
31
  },
35
32
  "bugs": {
36
33
  "url": "https://github.com/ava-labs/avalanche-sdks/issues"
37
34
  },
38
35
  "dependencies": {
39
- "@avalabs/utils-sdk": "2.8.0-alpha.8"
36
+ "@avalabs/utils-sdk": "2.8.0-alpha.80"
40
37
  },
41
- "gitHead": "99459a99ee95f82208ab259d516a2d626eee100e"
38
+ "gitHead": "96d11ae6b3c67b8666ff18ae230ecb9ff25fff13"
42
39
  }