@rabby-wallet/rabby-api 0.7.0-alpha.5 → 0.7.0-alpha.7
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 +17 -0
- package/dist/types.d.ts +9 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosAdapter, AxiosRequestConfig } from 'axios';
|
|
2
2
|
import { RateLimitedAxiosInstance } from 'axios-rate-limit';
|
|
3
|
-
import { AddrDescResponse, ApprovalStatus, AssetItem, CEXQuote, Cex, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, ExplainTxResponse, ExplainTypedDataResponse, GasLevel, GetTxResponse, LatestExplainTxResponse, MempoolCheckDetail, NFTApprovalResponse, NFTItem, ParseTextResponse, ParseTxResponse, ParseTypedDataResponse, PendingTxItem, Protocol, SecurityCheckResponse, ServerChain, SlippageStatus, Summary, SwapTradeList, TokenApproval, TokenItem, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain } from './types';
|
|
3
|
+
import { AddrDescResponse, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, ExplainTxResponse, ExplainTypedDataResponse, GasLevel, GetTxResponse, LatestExplainTxResponse, MempoolCheckDetail, NFTApprovalResponse, NFTItem, ParseTextResponse, ParseTxResponse, ParseTypedDataResponse, PendingTxItem, Protocol, SecurityCheckResponse, ServerChain, SlippageStatus, Summary, SwapTradeList, TokenApproval, TokenItem, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain } from './types';
|
|
4
4
|
import { InitOptions, RabbyApiPlugin } from './plugins/intf';
|
|
5
5
|
interface OpenApiStore {
|
|
6
6
|
host: string;
|
|
@@ -393,5 +393,24 @@ export declare class OpenApiService {
|
|
|
393
393
|
is_success: boolean;
|
|
394
394
|
count: number;
|
|
395
395
|
}>;
|
|
396
|
+
searchDapp: (params?: {
|
|
397
|
+
q?: string;
|
|
398
|
+
chain_id?: string;
|
|
399
|
+
start?: number;
|
|
400
|
+
limit?: number;
|
|
401
|
+
}) => Promise<{
|
|
402
|
+
page: {
|
|
403
|
+
limit: number;
|
|
404
|
+
start: number;
|
|
405
|
+
total: number;
|
|
406
|
+
};
|
|
407
|
+
dapps: BasicDappInfo[];
|
|
408
|
+
}>;
|
|
409
|
+
getDappsInfo: (params: {
|
|
410
|
+
ids: string[];
|
|
411
|
+
}) => Promise<BasicDappInfo[]>;
|
|
412
|
+
getHotDapps: (params?: {
|
|
413
|
+
limit: number;
|
|
414
|
+
}) => Promise<BasicDappInfo[]>;
|
|
396
415
|
}
|
|
397
416
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -806,6 +806,23 @@ export class OpenApiService {
|
|
|
806
806
|
const { data } = yield this.request.post('/v1/wallet/support_selector', params);
|
|
807
807
|
return data;
|
|
808
808
|
});
|
|
809
|
+
this.searchDapp = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
810
|
+
const { data } = yield this.request.get('/v1/dapp/search', { params });
|
|
811
|
+
return data;
|
|
812
|
+
});
|
|
813
|
+
this.getDappsInfo = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
814
|
+
var _s;
|
|
815
|
+
const { data } = yield this.request.get('/v1/dapp/list', {
|
|
816
|
+
params: {
|
|
817
|
+
ids: (_s = params === null || params === void 0 ? void 0 : params.ids) === null || _s === void 0 ? void 0 : _s.join(','),
|
|
818
|
+
},
|
|
819
|
+
});
|
|
820
|
+
return data;
|
|
821
|
+
});
|
|
822
|
+
this.getHotDapps = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
823
|
+
const { data } = yield this.request.get('/v1/dapp/hot_list', { params });
|
|
824
|
+
return data;
|
|
825
|
+
});
|
|
809
826
|
if (store instanceof Promise) {
|
|
810
827
|
store.then((resolvedStore) => {
|
|
811
828
|
this.store = resolvedStore;
|
package/dist/types.d.ts
CHANGED
|
@@ -1109,4 +1109,13 @@ export interface PendingTxItem {
|
|
|
1109
1109
|
};
|
|
1110
1110
|
};
|
|
1111
1111
|
}
|
|
1112
|
+
export interface BasicDappInfo {
|
|
1113
|
+
id: string;
|
|
1114
|
+
name: string;
|
|
1115
|
+
logo_url: string | null;
|
|
1116
|
+
description: string;
|
|
1117
|
+
user_range: string;
|
|
1118
|
+
tags: string[];
|
|
1119
|
+
chain_ids: string[];
|
|
1120
|
+
}
|
|
1112
1121
|
export {};
|