@rabby-wallet/rabby-api 0.9.37 → 0.9.38-beta.1
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 +13 -1
- package/dist/index.js +12 -0
- package/dist/types.d.ts +29 -0
- package/package.json +1 -1
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 } 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 } from './types';
|
|
5
5
|
interface OpenApiStore {
|
|
6
6
|
host: string;
|
|
7
7
|
testnetHost?: string;
|
|
@@ -1276,8 +1276,20 @@ export declare class OpenApiService {
|
|
|
1276
1276
|
title: string;
|
|
1277
1277
|
image_url_list: string[];
|
|
1278
1278
|
content: string;
|
|
1279
|
+
extra?: UserFeedbackItem['extra'];
|
|
1279
1280
|
}) => Promise<UserFeedbackItem>;
|
|
1280
1281
|
getUserFeedback: (id: string) => Promise<UserFeedbackItem>;
|
|
1281
1282
|
getUserFeedbackList: (id: string | string[]) => Promise<UserFeedbackItem[]>;
|
|
1283
|
+
getTokenKlineData: (params: {
|
|
1284
|
+
chain_id: string;
|
|
1285
|
+
token_id: string;
|
|
1286
|
+
interval: string;
|
|
1287
|
+
}) => Promise<{
|
|
1288
|
+
data_list: KlineDataItem[];
|
|
1289
|
+
}>;
|
|
1290
|
+
getTokenMarketInfo: (params: {
|
|
1291
|
+
chain_id: string;
|
|
1292
|
+
token_id: string;
|
|
1293
|
+
}) => Promise<TokenMarketInfo>;
|
|
1282
1294
|
}
|
|
1283
1295
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1662,6 +1662,18 @@ export class OpenApiService {
|
|
|
1662
1662
|
});
|
|
1663
1663
|
return data;
|
|
1664
1664
|
});
|
|
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
|
+
});
|
|
1665
1677
|
if (store instanceof Promise) {
|
|
1666
1678
|
store.then((resolvedStore) => {
|
|
1667
1679
|
this.store = resolvedStore;
|
package/dist/types.d.ts
CHANGED
|
@@ -1649,5 +1649,34 @@ export declare type UserFeedbackItem = {
|
|
|
1649
1649
|
create_at: number;
|
|
1650
1650
|
comment: string | null;
|
|
1651
1651
|
comment_at: number | null;
|
|
1652
|
+
extra?: any | null;
|
|
1653
|
+
};
|
|
1654
|
+
export declare type KlineDataItem = [
|
|
1655
|
+
time_at: number,
|
|
1656
|
+
open: number,
|
|
1657
|
+
high: number,
|
|
1658
|
+
low: number,
|
|
1659
|
+
close: number,
|
|
1660
|
+
volume_amount: number,
|
|
1661
|
+
volume_usd_value: number
|
|
1662
|
+
];
|
|
1663
|
+
export declare type TokenMarketInfo = {
|
|
1664
|
+
id: string;
|
|
1665
|
+
chain: string;
|
|
1666
|
+
price: number;
|
|
1667
|
+
price_24h_change: number;
|
|
1668
|
+
support_market_data: boolean;
|
|
1669
|
+
market: {
|
|
1670
|
+
market_cap_usd_value: number | null;
|
|
1671
|
+
total_supply: number | null;
|
|
1672
|
+
volume_amount_24h: number | null;
|
|
1673
|
+
volume_usd_value_24h: number | null;
|
|
1674
|
+
txns_24h: number | null;
|
|
1675
|
+
holder_count: number | null;
|
|
1676
|
+
max_supply: number | null;
|
|
1677
|
+
};
|
|
1678
|
+
name: string;
|
|
1679
|
+
symbol: string;
|
|
1680
|
+
logo_url: string;
|
|
1652
1681
|
};
|
|
1653
1682
|
export {};
|