@rabby-wallet/rabby-api 0.9.27 → 0.9.28-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 +3 -1
- package/dist/index.js +14 -0
- package/dist/types.d.ts +6 -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 } 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 } from './types';
|
|
5
5
|
interface OpenApiStore {
|
|
6
6
|
host: string;
|
|
7
7
|
testnetHost?: string;
|
|
@@ -1230,5 +1230,7 @@ export declare class OpenApiService {
|
|
|
1230
1230
|
}) => Promise<{
|
|
1231
1231
|
success: boolean;
|
|
1232
1232
|
}>;
|
|
1233
|
+
getHotTokenList: () => Promise<TokenDetailWithPriceCurve[]>;
|
|
1234
|
+
getTokensDetailByUuids: (uuids: string[]) => Promise<TokenDetailWithPriceCurve[]>;
|
|
1233
1235
|
}
|
|
1234
1236
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1593,6 +1593,20 @@ export class OpenApiService {
|
|
|
1593
1593
|
const { data } = yield this.request.post('/v1/token/check_cex', postData);
|
|
1594
1594
|
return data;
|
|
1595
1595
|
});
|
|
1596
|
+
// top 20 tokens
|
|
1597
|
+
this.getHotTokenList = () => __awaiter(this, void 0, void 0, function* () {
|
|
1598
|
+
const { data } = yield this.request.get('/v1/token/hot_list');
|
|
1599
|
+
return data;
|
|
1600
|
+
});
|
|
1601
|
+
// uuid: 'chain:token_id'
|
|
1602
|
+
this.getTokensDetailByUuids = (uuids) => __awaiter(this, void 0, void 0, function* () {
|
|
1603
|
+
const { data } = yield this.request.get('/v1/token/list_by_uuids', {
|
|
1604
|
+
params: {
|
|
1605
|
+
uuids: uuids.join(','),
|
|
1606
|
+
},
|
|
1607
|
+
});
|
|
1608
|
+
return data;
|
|
1609
|
+
});
|
|
1596
1610
|
if (store instanceof Promise) {
|
|
1597
1611
|
store.then((resolvedStore) => {
|
|
1598
1612
|
this.store = resolvedStore;
|
package/dist/types.d.ts
CHANGED
|
@@ -1608,4 +1608,10 @@ declare type RPCDefaultItem = {
|
|
|
1608
1608
|
rpcUrl: string[];
|
|
1609
1609
|
txPushToRPC: boolean;
|
|
1610
1610
|
};
|
|
1611
|
+
export interface TokenDetailWithPriceCurve extends TokenItemWithEntity {
|
|
1612
|
+
price_curve_24h: {
|
|
1613
|
+
time_at: number;
|
|
1614
|
+
price: number;
|
|
1615
|
+
}[];
|
|
1616
|
+
}
|
|
1611
1617
|
export {};
|