@rabby-wallet/rabby-api 0.9.33 → 0.9.34-alpha.1
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 +13 -1
- package/dist/index.js +20 -0
- package/dist/types.d.ts +28 -1
- 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 } 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, UserFeedbackUploadedImage } from './types';
|
|
5
5
|
interface OpenApiStore {
|
|
6
6
|
host: string;
|
|
7
7
|
testnetHost?: string;
|
|
@@ -936,6 +936,9 @@ export declare class OpenApiService {
|
|
|
936
936
|
has_eligibility: boolean;
|
|
937
937
|
can_claimed_usd_value: number;
|
|
938
938
|
}>;
|
|
939
|
+
checkGasAccountGiftEligibilityBatch: (params: {
|
|
940
|
+
ids: string[];
|
|
941
|
+
}) => Promise<GiftEligibilityItem[]>;
|
|
939
942
|
confirmIapOrder: (postData: {
|
|
940
943
|
transaction_id: string;
|
|
941
944
|
device_type: 'android' | 'ios';
|
|
@@ -1246,5 +1249,14 @@ export declare class OpenApiService {
|
|
|
1246
1249
|
}>;
|
|
1247
1250
|
getHotTokenList: () => Promise<TokenDetailWithPriceCurve[]>;
|
|
1248
1251
|
getTokensDetailByUuids: (uuids: string[]) => Promise<TokenDetailWithPriceCurve[]>;
|
|
1252
|
+
postUserFeedback: (data: {
|
|
1253
|
+
title: string;
|
|
1254
|
+
image_url_list: string[];
|
|
1255
|
+
content: string;
|
|
1256
|
+
}) => Promise<UserFeedbackItem>;
|
|
1257
|
+
getUserFeedback: (id: string) => Promise<UserFeedbackItem>;
|
|
1258
|
+
uploadUserFeedbackImage: (data: {
|
|
1259
|
+
image: File | Blob;
|
|
1260
|
+
}) => Promise<UserFeedbackUploadedImage>;
|
|
1249
1261
|
}
|
|
1250
1262
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1303,6 +1303,10 @@ export class OpenApiService {
|
|
|
1303
1303
|
});
|
|
1304
1304
|
return data;
|
|
1305
1305
|
});
|
|
1306
|
+
this.checkGasAccountGiftEligibilityBatch = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1307
|
+
const { data } = yield this.request.post('/v1/gas_account/check_eligibility/batch', params);
|
|
1308
|
+
return data;
|
|
1309
|
+
});
|
|
1306
1310
|
this.confirmIapOrder = (postData) => __awaiter(this, void 0, void 0, function* () {
|
|
1307
1311
|
const { data } = yield this.request.post('/v1/gas_account/confirm_iap_order', postData);
|
|
1308
1312
|
return data;
|
|
@@ -1622,6 +1626,22 @@ export class OpenApiService {
|
|
|
1622
1626
|
});
|
|
1623
1627
|
return data;
|
|
1624
1628
|
});
|
|
1629
|
+
this.postUserFeedback = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
1630
|
+
const { data: response } = yield this.request.post('/v1/feedback/app', data);
|
|
1631
|
+
return response;
|
|
1632
|
+
});
|
|
1633
|
+
this.getUserFeedback = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
1634
|
+
const { data } = yield this.request.get('/v1/feedback/app', {
|
|
1635
|
+
params: { id },
|
|
1636
|
+
});
|
|
1637
|
+
return data;
|
|
1638
|
+
});
|
|
1639
|
+
this.uploadUserFeedbackImage = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
1640
|
+
const formData = new FormData();
|
|
1641
|
+
formData.append('file', data.image);
|
|
1642
|
+
const { data: response } = yield this.request.post(`/v1/feedback/upload`, formData);
|
|
1643
|
+
return response;
|
|
1644
|
+
});
|
|
1625
1645
|
if (store instanceof Promise) {
|
|
1626
1646
|
store.then((resolvedStore) => {
|
|
1627
1647
|
this.store = resolvedStore;
|
package/dist/types.d.ts
CHANGED
|
@@ -1600,7 +1600,16 @@ export interface AppChainItem {
|
|
|
1600
1600
|
}
|
|
1601
1601
|
export interface AppChainListResponse {
|
|
1602
1602
|
apps: AppChainItem[];
|
|
1603
|
-
|
|
1603
|
+
error_apps: {
|
|
1604
|
+
create_at: number;
|
|
1605
|
+
id: string;
|
|
1606
|
+
is_support_portfolio: boolean;
|
|
1607
|
+
is_visible: boolean;
|
|
1608
|
+
logo_url: string;
|
|
1609
|
+
name: string;
|
|
1610
|
+
site_url: string;
|
|
1611
|
+
update_at: number;
|
|
1612
|
+
}[];
|
|
1604
1613
|
}
|
|
1605
1614
|
export declare type DefaultRPCRes = {
|
|
1606
1615
|
message: string;
|
|
@@ -1618,4 +1627,22 @@ export interface TokenDetailWithPriceCurve extends TokenItemWithEntity {
|
|
|
1618
1627
|
price: number;
|
|
1619
1628
|
}[];
|
|
1620
1629
|
}
|
|
1630
|
+
export declare type GiftEligibilityItem = {
|
|
1631
|
+
id?: string;
|
|
1632
|
+
has_eligibility: boolean;
|
|
1633
|
+
can_claimed_usd_value: number;
|
|
1634
|
+
};
|
|
1635
|
+
export declare type UserFeedbackItem = {
|
|
1636
|
+
id: string;
|
|
1637
|
+
title: string;
|
|
1638
|
+
content: string;
|
|
1639
|
+
image_url_list: string[];
|
|
1640
|
+
status: 'pending' | 'reviewing' | 'closed';
|
|
1641
|
+
create_at: number;
|
|
1642
|
+
comment: string | null;
|
|
1643
|
+
comment_at: number | null;
|
|
1644
|
+
};
|
|
1645
|
+
export declare type UserFeedbackUploadedImage = {
|
|
1646
|
+
image_url: string;
|
|
1647
|
+
};
|
|
1621
1648
|
export {};
|