@rabby-wallet/rabby-api 0.7.1 → 0.7.3
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 +10 -0
- package/dist/types.d.ts +20 -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, 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';
|
|
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, SupportedChain, 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;
|
|
@@ -409,6 +409,9 @@ export declare class OpenApiService {
|
|
|
409
409
|
getDappsInfo: (params: {
|
|
410
410
|
ids: string[];
|
|
411
411
|
}) => Promise<BasicDappInfo[]>;
|
|
412
|
+
getDappHotTags: (params?: {
|
|
413
|
+
limit: number;
|
|
414
|
+
}) => Promise<string[]>;
|
|
412
415
|
getHotDapps: (params?: {
|
|
413
416
|
limit: number;
|
|
414
417
|
}) => Promise<BasicDappInfo[]>;
|
|
@@ -500,5 +503,6 @@ export declare class OpenApiService {
|
|
|
500
503
|
}) => Promise<{
|
|
501
504
|
error_code: number;
|
|
502
505
|
}>;
|
|
506
|
+
getSupportedChains: () => Promise<SupportedChain[]>;
|
|
503
507
|
}
|
|
504
508
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -819,6 +819,12 @@ export class OpenApiService {
|
|
|
819
819
|
});
|
|
820
820
|
return data;
|
|
821
821
|
});
|
|
822
|
+
this.getDappHotTags = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
823
|
+
const { data } = yield this.request.get('/v1/dapp/hot_tags', {
|
|
824
|
+
params,
|
|
825
|
+
});
|
|
826
|
+
return data;
|
|
827
|
+
});
|
|
822
828
|
this.getHotDapps = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
823
829
|
const { data } = yield this.request.get('/v1/dapp/hot_list', { params });
|
|
824
830
|
return data;
|
|
@@ -875,6 +881,10 @@ export class OpenApiService {
|
|
|
875
881
|
const { data } = yield this.request.post('/v1/points/claim_campaign', params);
|
|
876
882
|
return data;
|
|
877
883
|
});
|
|
884
|
+
this.getSupportedChains = () => __awaiter(this, void 0, void 0, function* () {
|
|
885
|
+
const { data } = yield this.request.get('/v1/wallet/supported_chains');
|
|
886
|
+
return data;
|
|
887
|
+
});
|
|
878
888
|
if (store instanceof Promise) {
|
|
879
889
|
store.then((resolvedStore) => {
|
|
880
890
|
this.store = resolvedStore;
|
package/dist/types.d.ts
CHANGED
|
@@ -1117,5 +1117,25 @@ export interface BasicDappInfo {
|
|
|
1117
1117
|
user_range: string;
|
|
1118
1118
|
tags: string[];
|
|
1119
1119
|
chain_ids: string[];
|
|
1120
|
+
collected_list?: {
|
|
1121
|
+
name: string;
|
|
1122
|
+
logo_url: string;
|
|
1123
|
+
}[];
|
|
1124
|
+
}
|
|
1125
|
+
export interface SupportedChain {
|
|
1126
|
+
id: string;
|
|
1127
|
+
community_id: number;
|
|
1128
|
+
name: string;
|
|
1129
|
+
native_token: {
|
|
1130
|
+
id: string;
|
|
1131
|
+
symbol: string;
|
|
1132
|
+
logo: string;
|
|
1133
|
+
decimals: number;
|
|
1134
|
+
};
|
|
1135
|
+
logo_url: string;
|
|
1136
|
+
white_logo_url?: string;
|
|
1137
|
+
eip_1559: boolean;
|
|
1138
|
+
is_disabled: boolean;
|
|
1139
|
+
explorer_host: string;
|
|
1120
1140
|
}
|
|
1121
1141
|
export {};
|