@rabby-wallet/rabby-api 0.9.65 → 0.9.66-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 +5 -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, 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, GetClientFeedbackMessagesParams, GetClientFeedbackMessagesResponse, GetClientFeedbackUnreadParams, GetClientFeedbackUnreadResponse, PostClientFeedbackMessageParams, PostClientFeedbackMessageResponse, UploadClientFeedbackParams, UploadClientFeedbackResponse, PerpTopToken, KlineDataItem, TokenMarketInfo, TokenHolderInfo, TokenSupplyInfo, MarketSummary, MarketTradingHistoryItem, TokenHolderSummary, TokenHolderItem, CurrencyItem, PerpBridgeQuote, LiquidityPoolItem, LiquidityPoolHistoryItem, NFTDetail, NFTTradingConfig, PrepareAcceptNFTOfferResponse, PrepareListingNFTResponse, CreateListingNFTOfferResponse, NFTListingResponse, MemeListResponse, TokenMarketCategoryListResponse, TokenMarketTokenListResponse, PerpTopTokenV3, PerpTopTokenCategory, StakingFilterListParams, StakingFilterListResponse, StakingPoolCurveParams, StakingPoolCurveResponse, StakingPoolListParams, StakingPoolListResponse, StakingPoolParams, StakingPoolResponse } from './types';
|
|
4
|
+
import { AddrDescResponse, WalletVersionInfoResponse, 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, GetClientFeedbackMessagesParams, GetClientFeedbackMessagesResponse, GetClientFeedbackUnreadParams, GetClientFeedbackUnreadResponse, PostClientFeedbackMessageParams, PostClientFeedbackMessageResponse, UploadClientFeedbackParams, UploadClientFeedbackResponse, PerpTopToken, KlineDataItem, TokenMarketInfo, TokenHolderInfo, TokenSupplyInfo, MarketSummary, MarketTradingHistoryItem, TokenHolderSummary, TokenHolderItem, CurrencyItem, PerpBridgeQuote, LiquidityPoolItem, LiquidityPoolHistoryItem, NFTDetail, NFTTradingConfig, PrepareAcceptNFTOfferResponse, PrepareListingNFTResponse, CreateListingNFTOfferResponse, NFTListingResponse, MemeListResponse, TokenMarketCategoryListResponse, TokenMarketTokenListResponse, PerpTopTokenV3, PerpTopTokenCategory, StakingFilterListParams, StakingFilterListResponse, StakingPoolCurveParams, StakingPoolCurveResponse, StakingPoolListParams, StakingPoolListResponse, StakingPoolParams, StakingPoolResponse } from './types';
|
|
5
5
|
interface OpenApiStore {
|
|
6
6
|
host: string;
|
|
7
7
|
testnetHost?: string;
|
|
@@ -257,6 +257,9 @@ export declare class OpenApiService {
|
|
|
257
257
|
getLatestVersion: () => Promise<{
|
|
258
258
|
version_tag: string;
|
|
259
259
|
}>;
|
|
260
|
+
getVersionInfo: (params: {
|
|
261
|
+
version_id: string;
|
|
262
|
+
}) => Promise<WalletVersionInfoResponse>;
|
|
260
263
|
addOriginFeedback: (params: {
|
|
261
264
|
user_addr: string;
|
|
262
265
|
origin: string;
|
|
@@ -938,6 +941,7 @@ export declare class OpenApiService {
|
|
|
938
941
|
from_token_raw_amount: string;
|
|
939
942
|
to_chain_id: string;
|
|
940
943
|
to_token_id: string;
|
|
944
|
+
slippage?: string;
|
|
941
945
|
fee_rate?: number;
|
|
942
946
|
}) => Promise<Omit<BridgeQuote, 'tx'>[]>;
|
|
943
947
|
getBridgeQuote: (params: {
|
package/dist/index.js
CHANGED
|
@@ -574,6 +574,10 @@ export class OpenApiService {
|
|
|
574
574
|
const { data } = yield this.request.get('/v1/wallet/version');
|
|
575
575
|
return data;
|
|
576
576
|
});
|
|
577
|
+
this.getVersionInfo = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
578
|
+
const { data } = yield this.request.get('/v1/wallet/version_info', { params });
|
|
579
|
+
return data;
|
|
580
|
+
});
|
|
577
581
|
this.addOriginFeedback = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
578
582
|
const { data } = yield this.request.post('/v1/wallet/add_origin_feedback', {
|
|
579
583
|
user_addr: params.user_addr,
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { CHAINS_ENUM } from '@debank/common';
|
|
2
|
+
export interface WalletVersionInfo {
|
|
3
|
+
id: string;
|
|
4
|
+
level: number;
|
|
5
|
+
changelog: string;
|
|
6
|
+
}
|
|
7
|
+
export interface WalletVersionInfoResponse {
|
|
8
|
+
version: WalletVersionInfo | null;
|
|
9
|
+
latest_version: WalletVersionInfo | null;
|
|
10
|
+
}
|
|
2
11
|
export interface Chain {
|
|
3
12
|
id: number;
|
|
4
13
|
name: string;
|