@rabby-wallet/rabby-api 0.9.43 → 0.9.44-beta.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 +19 -1
- package/dist/index.js +13 -0
- package/dist/types.d.ts +30 -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, KlineDataItem, TokenMarketInfo, TokenHolderInfo, TokenSupplyInfo, MarketSummary, MarketTradingHistoryItem, TokenHolderSummary, TokenHolderItem, CurrencyItem, PerpBridgeQuote } 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, MarketSummary, MarketTradingHistoryItem, TokenHolderSummary, TokenHolderItem, CurrencyItem, PerpBridgeQuote, LiquidityPoolItem, LiquidityPoolHistoryItem } from './types';
|
|
5
5
|
interface OpenApiStore {
|
|
6
6
|
host: string;
|
|
7
7
|
testnetHost?: string;
|
|
@@ -1352,5 +1352,23 @@ export declare class OpenApiService {
|
|
|
1352
1352
|
}) => Promise<{
|
|
1353
1353
|
data_list: TokenHolderItem[];
|
|
1354
1354
|
}>;
|
|
1355
|
+
getLiquidityPoolList: (params: {
|
|
1356
|
+
token_id: string;
|
|
1357
|
+
chain_id: string;
|
|
1358
|
+
}) => Promise<LiquidityPoolItem[]>;
|
|
1359
|
+
getLiquidityPoolHistoryList: (params: {
|
|
1360
|
+
token_id: string;
|
|
1361
|
+
chain_id: string;
|
|
1362
|
+
action?: 'add' | 'remove';
|
|
1363
|
+
limit?: number;
|
|
1364
|
+
cursor?: string;
|
|
1365
|
+
}) => Promise<{
|
|
1366
|
+
pagination: {
|
|
1367
|
+
limit: number;
|
|
1368
|
+
has_next: boolean;
|
|
1369
|
+
next_cursor?: string;
|
|
1370
|
+
};
|
|
1371
|
+
data_list: LiquidityPoolHistoryItem[];
|
|
1372
|
+
}>;
|
|
1355
1373
|
}
|
|
1356
1374
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1734,6 +1734,19 @@ export class OpenApiService {
|
|
|
1734
1734
|
});
|
|
1735
1735
|
return data;
|
|
1736
1736
|
});
|
|
1737
|
+
// top 5
|
|
1738
|
+
this.getLiquidityPoolList = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1739
|
+
const { data } = yield this.request.get('/v1/token/market/liquidity_pool/list', {
|
|
1740
|
+
params,
|
|
1741
|
+
});
|
|
1742
|
+
return data;
|
|
1743
|
+
});
|
|
1744
|
+
this.getLiquidityPoolHistoryList = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1745
|
+
const { data } = yield this.request.get('/v1/token/market/liquidity_pool/list', {
|
|
1746
|
+
params,
|
|
1747
|
+
});
|
|
1748
|
+
return data;
|
|
1749
|
+
});
|
|
1737
1750
|
if (store instanceof Promise) {
|
|
1738
1751
|
store.then((resolvedStore) => {
|
|
1739
1752
|
this.store = resolvedStore;
|
package/dist/types.d.ts
CHANGED
|
@@ -1779,4 +1779,34 @@ export declare type TokenHolderItem = {
|
|
|
1779
1779
|
amount?: number;
|
|
1780
1780
|
ratio?: number;
|
|
1781
1781
|
};
|
|
1782
|
+
export declare type LiquidityPoolItem = {
|
|
1783
|
+
id: string;
|
|
1784
|
+
tokens: {
|
|
1785
|
+
id: string;
|
|
1786
|
+
amount: number;
|
|
1787
|
+
symbol: string;
|
|
1788
|
+
price: number;
|
|
1789
|
+
usd_value: number;
|
|
1790
|
+
}[];
|
|
1791
|
+
project: {
|
|
1792
|
+
id: string;
|
|
1793
|
+
name: string;
|
|
1794
|
+
logo_url: string;
|
|
1795
|
+
};
|
|
1796
|
+
pool_id: string;
|
|
1797
|
+
usd_value: number;
|
|
1798
|
+
};
|
|
1799
|
+
export declare type LiquidityPoolHistoryItem = {
|
|
1800
|
+
id: string;
|
|
1801
|
+
tx_id: string;
|
|
1802
|
+
time_at: number;
|
|
1803
|
+
action: 'add' | 'remove';
|
|
1804
|
+
tokens: {
|
|
1805
|
+
id: string;
|
|
1806
|
+
amount: number;
|
|
1807
|
+
symbol: string;
|
|
1808
|
+
price: number;
|
|
1809
|
+
usd_value: number;
|
|
1810
|
+
}[];
|
|
1811
|
+
};
|
|
1782
1812
|
export {};
|