@rabby-wallet/rabby-api 0.9.38-beta.1 → 0.9.38-beta.2

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
@@ -1,7 +1,7 @@
1
1
  import { AxiosAdapter, AxiosRequestConfig } from 'axios';
2
2
  import { RateLimitedAxiosInstance } from 'axios-rate-limit';
3
3
  import { InitOptions, RabbyApiPlugin } from './plugins/intf';
4
- import { AddrDescResponse, BridgeAggregator, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainListItem, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, DbkBridgeHistoryItem, ExplainTxResponse, ExplainTypedDataResponse, GasLevel, GetTxResponse, HistoryCurve, LatestExplainTxResponse, MempoolCheckDetail, NFTApprovalResponse, NFTItem, NodeStatus, NodeStatusDetail, ParseTextResponse, ParseTxResponse, ParseTypedDataResponse, PendingTxItem, Protocol, SecurityCheckResponse, ServerChain, SlippageStatus, Summary, SupportedChain, SwapTradeList, TokenApproval, TokenItem, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList, BuyPaymentMethod, GasAccountInfo, TokenEntityDetail, TokenItemWithEntity, ProjectItem, CopyTradeTokenListResponse, CopyTradeRecentBuyListResponse, CopyTradePnlListResponse, AppChainListResponse, CopyTradeTokenListV2Response, CopyTradeRecentBuyListV2Response, CopyTradeTokenItemV2, CopyTradeSameToken, DefaultRPCRes, TokenDetailWithPriceCurve, GiftEligibilityItem, UserFeedbackItem, PerpTopToken, KlineDataItem, TokenMarketInfo } from './types';
4
+ import { AddrDescResponse, BridgeAggregator, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainListItem, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, DbkBridgeHistoryItem, ExplainTxResponse, ExplainTypedDataResponse, GasLevel, GetTxResponse, HistoryCurve, LatestExplainTxResponse, MempoolCheckDetail, NFTApprovalResponse, NFTItem, NodeStatus, NodeStatusDetail, ParseTextResponse, ParseTxResponse, ParseTypedDataResponse, PendingTxItem, Protocol, SecurityCheckResponse, ServerChain, SlippageStatus, Summary, SupportedChain, SwapTradeList, TokenApproval, TokenItem, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList, BuyPaymentMethod, GasAccountInfo, TokenEntityDetail, TokenItemWithEntity, ProjectItem, CopyTradeTokenListResponse, CopyTradeRecentBuyListResponse, CopyTradePnlListResponse, AppChainListResponse, CopyTradeTokenListV2Response, CopyTradeRecentBuyListV2Response, CopyTradeTokenItemV2, CopyTradeSameToken, DefaultRPCRes, TokenDetailWithPriceCurve, GiftEligibilityItem, UserFeedbackItem, PerpTopToken, KlineDataItem, TokenMarketInfo, TokenHolderInfo, TokenSupplyInfo } from './types';
5
5
  interface OpenApiStore {
6
6
  host: string;
7
7
  testnetHost?: string;
@@ -1272,14 +1272,6 @@ export declare class OpenApiService {
1272
1272
  }>;
1273
1273
  getHotTokenList: () => Promise<TokenDetailWithPriceCurve[]>;
1274
1274
  getTokensDetailByUuids: (uuids: string[]) => Promise<TokenDetailWithPriceCurve[]>;
1275
- postUserFeedback: (data: {
1276
- title: string;
1277
- image_url_list: string[];
1278
- content: string;
1279
- extra?: UserFeedbackItem['extra'];
1280
- }) => Promise<UserFeedbackItem>;
1281
- getUserFeedback: (id: string) => Promise<UserFeedbackItem>;
1282
- getUserFeedbackList: (id: string | string[]) => Promise<UserFeedbackItem[]>;
1283
1275
  getTokenKlineData: (params: {
1284
1276
  chain_id: string;
1285
1277
  token_id: string;
@@ -1291,5 +1283,21 @@ export declare class OpenApiService {
1291
1283
  chain_id: string;
1292
1284
  token_id: string;
1293
1285
  }) => Promise<TokenMarketInfo>;
1286
+ getTokenHolderInfo: (params: {
1287
+ chain_id: string;
1288
+ token_id: string;
1289
+ }) => Promise<TokenHolderInfo>;
1290
+ getTokenSupplyInfo: (params: {
1291
+ chain_id: string;
1292
+ token_id: string;
1293
+ }) => Promise<TokenSupplyInfo>;
1294
+ postUserFeedback: (data: {
1295
+ title: string;
1296
+ image_url_list: string[];
1297
+ content: string;
1298
+ extra?: UserFeedbackItem['extra'];
1299
+ }) => Promise<UserFeedbackItem>;
1300
+ getUserFeedback: (id: string) => Promise<UserFeedbackItem>;
1301
+ getUserFeedbackList: (id: string | string[]) => Promise<UserFeedbackItem[]>;
1294
1302
  }
1295
1303
  export {};
package/dist/index.js CHANGED
@@ -1645,6 +1645,30 @@ export class OpenApiService {
1645
1645
  });
1646
1646
  return data;
1647
1647
  });
1648
+ this.getTokenKlineData = (params) => __awaiter(this, void 0, void 0, function* () {
1649
+ const { data } = yield this.request.get('/v1/token/market/kline', {
1650
+ params,
1651
+ });
1652
+ return data;
1653
+ });
1654
+ this.getTokenMarketInfo = (params) => __awaiter(this, void 0, void 0, function* () {
1655
+ const { data } = yield this.request.get('/v1/token/market/info', {
1656
+ params,
1657
+ });
1658
+ return data;
1659
+ });
1660
+ this.getTokenHolderInfo = (params) => __awaiter(this, void 0, void 0, function* () {
1661
+ const { data } = yield this.request.get('/v1/token/market/info/holders', {
1662
+ params,
1663
+ });
1664
+ return data;
1665
+ });
1666
+ this.getTokenSupplyInfo = (params) => __awaiter(this, void 0, void 0, function* () {
1667
+ const { data } = yield this.request.get('/v1/token/market/info/supply', {
1668
+ params,
1669
+ });
1670
+ return data;
1671
+ });
1648
1672
  this.postUserFeedback = (data) => __awaiter(this, void 0, void 0, function* () {
1649
1673
  const { data: response } = yield this.request.post('/v1/feedback/app', data);
1650
1674
  return response;
@@ -1662,18 +1686,6 @@ export class OpenApiService {
1662
1686
  });
1663
1687
  return data;
1664
1688
  });
1665
- this.getTokenKlineData = (params) => __awaiter(this, void 0, void 0, function* () {
1666
- const { data } = yield this.request.get('/v1/token/market/kline', {
1667
- params,
1668
- });
1669
- return data;
1670
- });
1671
- this.getTokenMarketInfo = (params) => __awaiter(this, void 0, void 0, function* () {
1672
- const { data } = yield this.request.get('/v1/token/market/info', {
1673
- params,
1674
- });
1675
- return data;
1676
- });
1677
1689
  if (store instanceof Promise) {
1678
1690
  store.then((resolvedStore) => {
1679
1691
  this.store = resolvedStore;
package/dist/types.d.ts CHANGED
@@ -227,6 +227,7 @@ export interface TokenItem {
227
227
  low_credit_score?: boolean;
228
228
  cex_ids?: string[];
229
229
  fdv?: number | null;
230
+ support_market_data?: boolean;
230
231
  }
231
232
  export interface TokenItemWithEntity extends TokenItem {
232
233
  identity?: TokenEntityDetail;
@@ -1640,17 +1641,6 @@ export declare type GiftEligibilityItem = {
1640
1641
  has_eligibility: boolean;
1641
1642
  can_claimed_usd_value: number;
1642
1643
  };
1643
- export declare type UserFeedbackItem = {
1644
- id: string;
1645
- title: string;
1646
- content: string;
1647
- image_url_list: string[];
1648
- status: 'pending' | 'complete' | 'closed';
1649
- create_at: number;
1650
- comment: string | null;
1651
- comment_at: number | null;
1652
- extra?: any | null;
1653
- };
1654
1644
  export declare type KlineDataItem = [
1655
1645
  time_at: number,
1656
1646
  open: number,
@@ -1661,22 +1651,30 @@ export declare type KlineDataItem = [
1661
1651
  volume_usd_value: number
1662
1652
  ];
1663
1653
  export declare type TokenMarketInfo = {
1664
- id: string;
1665
- chain: string;
1666
- price: number;
1667
- price_24h_change: number;
1668
- support_market_data: boolean;
1669
1654
  market: {
1670
- market_cap_usd_value: number | null;
1671
- total_supply: number | null;
1672
1655
  volume_amount_24h: number | null;
1673
1656
  volume_usd_value_24h: number | null;
1674
1657
  txns_24h: number | null;
1675
- holder_count: number | null;
1676
- max_supply: number | null;
1677
1658
  };
1678
- name: string;
1679
- symbol: string;
1680
- logo_url: string;
1659
+ };
1660
+ export declare type TokenHolderInfo = {
1661
+ holder_count: number | null;
1662
+ };
1663
+ export declare type TokenSupplyInfo = {
1664
+ market_cap_usd_value: number | null;
1665
+ total_supply: number | null;
1666
+ circulating_supply: number | null;
1667
+ max_supply: number | null;
1668
+ };
1669
+ export declare type UserFeedbackItem = {
1670
+ id: string;
1671
+ title: string;
1672
+ content: string;
1673
+ image_url_list: string[];
1674
+ status: 'pending' | 'complete' | 'closed';
1675
+ create_at: number;
1676
+ comment: string | null;
1677
+ comment_at: number | null;
1678
+ extra?: any | null;
1681
1679
  };
1682
1680
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.9.38-beta.1",
3
+ "version": "0.9.38-beta.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [