@rabby-wallet/rabby-api 0.9.40-beta.1 → 0.9.40
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 +20 -1
- package/dist/index.js +24 -0
- package/dist/types.d.ts +27 -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 } 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 } from './types';
|
|
5
5
|
interface OpenApiStore {
|
|
6
6
|
host: string;
|
|
7
7
|
testnetHost?: string;
|
|
@@ -1272,6 +1272,25 @@ export declare class OpenApiService {
|
|
|
1272
1272
|
}>;
|
|
1273
1273
|
getHotTokenList: () => Promise<TokenDetailWithPriceCurve[]>;
|
|
1274
1274
|
getTokensDetailByUuids: (uuids: string[]) => Promise<TokenDetailWithPriceCurve[]>;
|
|
1275
|
+
getTokenKlineData: (params: {
|
|
1276
|
+
chain_id: string;
|
|
1277
|
+
token_id: string;
|
|
1278
|
+
interval: string;
|
|
1279
|
+
}) => Promise<{
|
|
1280
|
+
data_list: KlineDataItem[];
|
|
1281
|
+
}>;
|
|
1282
|
+
getTokenMarketInfo: (params: {
|
|
1283
|
+
chain_id: string;
|
|
1284
|
+
token_id: string;
|
|
1285
|
+
}) => Promise<TokenMarketInfo>;
|
|
1286
|
+
getTokenHolderInfo: (params: {
|
|
1287
|
+
chain_id: string;
|
|
1288
|
+
token_id: string;
|
|
1289
|
+
}) => Promise<TokenHolderInfo>;
|
|
1290
|
+
getTokenSupplyInfo: (params: {
|
|
1291
|
+
chain_id: string;
|
|
1292
|
+
token_id: string;
|
|
1293
|
+
}) => Promise<TokenSupplyInfo>;
|
|
1275
1294
|
postUserFeedback: (data: {
|
|
1276
1295
|
title: string;
|
|
1277
1296
|
image_url_list: string[];
|
package/dist/index.js
CHANGED
|
@@ -1645,6 +1645,30 @@ export class OpenApiService {
|
|
|
1645
1645
|
});
|
|
1646
1646
|
return data;
|
|
1647
1647
|
});
|
|
1648
|
+
this.getTokenKlineData = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1649
|
+
const { data } = yield this.request.get('/v1/token/market/kline', {
|
|
1650
|
+
params,
|
|
1651
|
+
});
|
|
1652
|
+
return data;
|
|
1653
|
+
});
|
|
1654
|
+
this.getTokenMarketInfo = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1655
|
+
const { data } = yield this.request.get('/v1/token/market/info', {
|
|
1656
|
+
params,
|
|
1657
|
+
});
|
|
1658
|
+
return data;
|
|
1659
|
+
});
|
|
1660
|
+
this.getTokenHolderInfo = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1661
|
+
const { data } = yield this.request.get('/v1/token/market/info/holders', {
|
|
1662
|
+
params,
|
|
1663
|
+
});
|
|
1664
|
+
return data;
|
|
1665
|
+
});
|
|
1666
|
+
this.getTokenSupplyInfo = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1667
|
+
const { data } = yield this.request.get('/v1/token/market/info/supply', {
|
|
1668
|
+
params,
|
|
1669
|
+
});
|
|
1670
|
+
return data;
|
|
1671
|
+
});
|
|
1648
1672
|
this.postUserFeedback = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
1649
1673
|
const { data: response } = yield this.request.post('/v1/feedback/app', data);
|
|
1650
1674
|
return response;
|
package/dist/types.d.ts
CHANGED
|
@@ -227,6 +227,7 @@ export interface TokenItem {
|
|
|
227
227
|
low_credit_score?: boolean;
|
|
228
228
|
cex_ids?: string[];
|
|
229
229
|
fdv?: number | null;
|
|
230
|
+
support_market_data?: boolean;
|
|
230
231
|
}
|
|
231
232
|
export interface TokenItemWithEntity extends TokenItem {
|
|
232
233
|
identity?: TokenEntityDetail;
|
|
@@ -810,6 +811,7 @@ export interface WithdrawAction {
|
|
|
810
811
|
contract_id: string;
|
|
811
812
|
func: string;
|
|
812
813
|
params: string[];
|
|
814
|
+
str_params: string[];
|
|
813
815
|
need_approve: {
|
|
814
816
|
token_id?: string;
|
|
815
817
|
to?: string;
|
|
@@ -1652,6 +1654,31 @@ export declare type GiftEligibilityItem = {
|
|
|
1652
1654
|
has_eligibility: boolean;
|
|
1653
1655
|
can_claimed_usd_value: number;
|
|
1654
1656
|
};
|
|
1657
|
+
export declare type KlineDataItem = [
|
|
1658
|
+
time_at: number,
|
|
1659
|
+
open: number,
|
|
1660
|
+
high: number,
|
|
1661
|
+
low: number,
|
|
1662
|
+
close: number,
|
|
1663
|
+
volume_amount: number,
|
|
1664
|
+
volume_usd_value: number
|
|
1665
|
+
];
|
|
1666
|
+
export declare type TokenMarketInfo = {
|
|
1667
|
+
market: {
|
|
1668
|
+
volume_amount_24h: number | null;
|
|
1669
|
+
volume_usd_value_24h: number | null;
|
|
1670
|
+
txns_24h: number | null;
|
|
1671
|
+
};
|
|
1672
|
+
};
|
|
1673
|
+
export declare type TokenHolderInfo = {
|
|
1674
|
+
holder_count: number | null;
|
|
1675
|
+
};
|
|
1676
|
+
export declare type TokenSupplyInfo = {
|
|
1677
|
+
market_cap_usd_value: number | null;
|
|
1678
|
+
total_supply: number | null;
|
|
1679
|
+
circulating_supply: number | null;
|
|
1680
|
+
max_supply: number | null;
|
|
1681
|
+
};
|
|
1655
1682
|
export declare type UserFeedbackItem = {
|
|
1656
1683
|
id: string;
|
|
1657
1684
|
title: string;
|