@rabby-wallet/rabby-api 0.9.57 → 0.9.58-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 +4 -1
- package/dist/index.js +4 -0
- package/dist/types.d.ts +9 -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, LiquidityPoolItem, LiquidityPoolHistoryItem, NFTDetail, NFTTradingConfig, PrepareAcceptNFTOfferResponse, PrepareListingNFTResponse, CreateListingNFTOfferResponse, NFTListingResponse, MemeListResponse, TokenMarketCategoryListResponse, TokenMarketTokenListResponse } 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, 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 } from './types';
|
|
5
5
|
interface OpenApiStore {
|
|
6
6
|
host: string;
|
|
7
7
|
testnetHost?: string;
|
|
@@ -139,6 +139,9 @@ export declare class OpenApiService {
|
|
|
139
139
|
change_percent: number;
|
|
140
140
|
last_price: number;
|
|
141
141
|
}>;
|
|
142
|
+
getTokenPriceList: (params: {
|
|
143
|
+
uuids: string[];
|
|
144
|
+
}) => Promise<TokenPriceListResponse>;
|
|
142
145
|
tokenAuthorizedList: <V extends VersionPrefix | undefined>(id: string, chain_id: string, options?: ApiOptions<V> | undefined) => Promise<TokenApproval[]>;
|
|
143
146
|
userNFTAuthorizedList: (id: string, chain_id: string) => Promise<NFTApprovalResponse>;
|
|
144
147
|
getDEXList: (chain_id: string) => Promise<{
|
package/dist/index.js
CHANGED
|
@@ -404,6 +404,10 @@ export class OpenApiService {
|
|
|
404
404
|
});
|
|
405
405
|
return data;
|
|
406
406
|
});
|
|
407
|
+
this.getTokenPriceList = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
408
|
+
const { data } = yield this.request.post('/v1/token/price_list', params);
|
|
409
|
+
return data;
|
|
410
|
+
});
|
|
407
411
|
this.tokenAuthorizedList = (id, chain_id, options) => __awaiter(this, void 0, void 0, function* () {
|
|
408
412
|
const { restfulPrefix = 'v1' } = options || {};
|
|
409
413
|
const { data } = yield this.request.get(`/${restfulPrefix}/user/token_authorized_list`, {
|
package/dist/types.d.ts
CHANGED
|
@@ -230,10 +230,19 @@ export interface TokenItem {
|
|
|
230
230
|
cex_ids?: string[];
|
|
231
231
|
fdv?: number | null;
|
|
232
232
|
support_market_data?: boolean;
|
|
233
|
+
launchpad?: TokenMarketTokenRelatedItem | null;
|
|
234
|
+
asset?: TokenMarketTokenRelatedItem | null;
|
|
235
|
+
market_status?: string;
|
|
233
236
|
}
|
|
234
237
|
export interface TokenItemWithEntity extends TokenItem {
|
|
235
238
|
identity?: TokenEntityDetail;
|
|
236
239
|
}
|
|
240
|
+
export interface TokenPriceListItem {
|
|
241
|
+
price: number;
|
|
242
|
+
price_24h_change?: number | null;
|
|
243
|
+
price_update_at?: number | null;
|
|
244
|
+
}
|
|
245
|
+
export declare type TokenPriceListResponse = Record<string, TokenPriceListItem>;
|
|
237
246
|
export interface TransferingNFTItem {
|
|
238
247
|
chain: string;
|
|
239
248
|
collection: {
|