@rabby-wallet/rabby-api 0.9.27-beta.0 → 0.9.28-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 +3 -1
- package/dist/index.js +14 -0
- package/dist/types.d.ts +8 -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
|
@@ -93,6 +93,7 @@ export interface CopyTradeTokenItemV2 extends CopyTradeTokenItem {
|
|
|
93
93
|
buy_amount: number;
|
|
94
94
|
buy_usd_value: number;
|
|
95
95
|
pnl_usd_value: number;
|
|
96
|
+
price_change: number;
|
|
96
97
|
}
|
|
97
98
|
export interface CopyTradeTokenListV2Response {
|
|
98
99
|
token_list: CopyTradeTokenItemV2[];
|
|
@@ -939,6 +940,7 @@ export interface AddrDescResponse {
|
|
|
939
940
|
is_spam: boolean | null;
|
|
940
941
|
is_scam: boolean | null;
|
|
941
942
|
name: string;
|
|
943
|
+
id: string;
|
|
942
944
|
};
|
|
943
945
|
}
|
|
944
946
|
export interface SendAction {
|
|
@@ -1606,4 +1608,10 @@ declare type RPCDefaultItem = {
|
|
|
1606
1608
|
rpcUrl: string[];
|
|
1607
1609
|
txPushToRPC: boolean;
|
|
1608
1610
|
};
|
|
1611
|
+
export interface TokenDetailWithPriceCurve extends TokenItemWithEntity {
|
|
1612
|
+
price_curve_24h: {
|
|
1613
|
+
time_at: number;
|
|
1614
|
+
price: number;
|
|
1615
|
+
}[];
|
|
1616
|
+
}
|
|
1609
1617
|
export {};
|