@rabby-wallet/rabby-api 0.9.60-beta.1 → 0.9.60-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 +7 -2
- package/dist/index.js +7 -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, TokenPriceListResponse, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList, BuyPaymentMethod, GasAccountInfo, GasAccountBridgeSupportTokenList, GasAccountBridgeQuote, GasAccountBridgeCreateResponse, GasAccountRechargeStatus, 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, NFTDetail, NFTTradingConfig, PrepareAcceptNFTOfferResponse, PrepareListingNFTResponse, CreateListingNFTOfferResponse, NFTListingResponse, MemeListResponse, TokenMarketCategoryListResponse, TokenMarketTokenListResponse, PerpTopTokenV3 } 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, TokenPriceListResponse, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList, BuyPaymentMethod, GasAccountInfo, GasAccountBridgeSupportTokenList, GasAccountBridgeQuote, GasAccountBridgeCreateResponse, GasAccountRechargeStatus, 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, NFTDetail, NFTTradingConfig, PrepareAcceptNFTOfferResponse, PrepareListingNFTResponse, CreateListingNFTOfferResponse, NFTListingResponse, MemeListResponse, TokenMarketCategoryListResponse, TokenMarketTokenListResponse, PerpTopTokenV3, PerpTopTokenCategory } from './types';
|
|
5
5
|
interface OpenApiStore {
|
|
6
6
|
host: string;
|
|
7
7
|
testnetHost?: string;
|
|
@@ -996,15 +996,20 @@ export declare class OpenApiService {
|
|
|
996
996
|
}) => Promise<PerpTopToken[]>;
|
|
997
997
|
/**
|
|
998
998
|
* @param params.dex_id - The ID of the DEX to get the top tokens for. If not provided, hyperliquid default DEXs will be included. if all is provided, all DEXs will be included. and xyz is xyz dex tokens
|
|
999
|
+
* @param params.lang - The translations in item.category
|
|
999
1000
|
* @returns A list of top tokens for the given DEX.
|
|
1000
1001
|
*/
|
|
1001
1002
|
getPerpTopTokenListV3: (params: {
|
|
1002
1003
|
dex_id?: string;
|
|
1004
|
+
lang?: string;
|
|
1003
1005
|
}) => Promise<PerpTopTokenV3[]>;
|
|
1004
1006
|
getPerpTokenDetail: (params: {
|
|
1005
1007
|
name: string;
|
|
1006
1008
|
lang: string;
|
|
1007
|
-
}) => Promise<PerpTopTokenV3
|
|
1009
|
+
}) => Promise<PerpTopTokenV3>;
|
|
1010
|
+
getPerpTokenCategories: (params: {
|
|
1011
|
+
lang?: string;
|
|
1012
|
+
}) => Promise<PerpTopTokenCategory[]>;
|
|
1008
1013
|
getPerpsBridgeIsSupportToken: (params: {
|
|
1009
1014
|
token_id: string;
|
|
1010
1015
|
chain_id: string;
|
package/dist/index.js
CHANGED
|
@@ -1365,6 +1365,7 @@ export class OpenApiService {
|
|
|
1365
1365
|
});
|
|
1366
1366
|
/**
|
|
1367
1367
|
* @param params.dex_id - The ID of the DEX to get the top tokens for. If not provided, hyperliquid default DEXs will be included. if all is provided, all DEXs will be included. and xyz is xyz dex tokens
|
|
1368
|
+
* @param params.lang - The translations in item.category
|
|
1368
1369
|
* @returns A list of top tokens for the given DEX.
|
|
1369
1370
|
*/
|
|
1370
1371
|
this.getPerpTopTokenListV3 = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1379,6 +1380,12 @@ export class OpenApiService {
|
|
|
1379
1380
|
});
|
|
1380
1381
|
return data;
|
|
1381
1382
|
});
|
|
1383
|
+
this.getPerpTokenCategories = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1384
|
+
const { data } = yield this.request.get('/v1/token/hyperliquid_categories_v3', {
|
|
1385
|
+
params,
|
|
1386
|
+
});
|
|
1387
|
+
return data;
|
|
1388
|
+
});
|
|
1382
1389
|
this.getPerpsBridgeIsSupportToken = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1383
1390
|
const { data } = yield this.request.get('/v2/bridge/hyperliquid/support_token', {
|
|
1384
1391
|
params,
|
package/dist/types.d.ts
CHANGED
|
@@ -1554,10 +1554,18 @@ export interface PerpTopTokenV3 {
|
|
|
1554
1554
|
daily_volume: number;
|
|
1555
1555
|
dex_id?: string;
|
|
1556
1556
|
category?: string;
|
|
1557
|
+
category_id?: string;
|
|
1557
1558
|
display_name?: string;
|
|
1558
1559
|
brief?: string;
|
|
1559
1560
|
description?: string;
|
|
1560
1561
|
}
|
|
1562
|
+
export interface PerpTopTokenCategory {
|
|
1563
|
+
id: string;
|
|
1564
|
+
name: string;
|
|
1565
|
+
priority: number;
|
|
1566
|
+
is_disable: boolean;
|
|
1567
|
+
translations: Record<string, string>;
|
|
1568
|
+
}
|
|
1561
1569
|
export interface GasAccountCheckResult {
|
|
1562
1570
|
gas_account_cost: {
|
|
1563
1571
|
total_cost: number;
|