@rabby-wallet/rabby-api 0.7.2 → 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 +2 -1
- package/dist/index.js +4 -0
- package/dist/types.d.ts +16 -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;
|
|
@@ -503,5 +503,6 @@ export declare class OpenApiService {
|
|
|
503
503
|
}) => Promise<{
|
|
504
504
|
error_code: number;
|
|
505
505
|
}>;
|
|
506
|
+
getSupportedChains: () => Promise<SupportedChain[]>;
|
|
506
507
|
}
|
|
507
508
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -881,6 +881,10 @@ export class OpenApiService {
|
|
|
881
881
|
const { data } = yield this.request.post('/v1/points/claim_campaign', params);
|
|
882
882
|
return data;
|
|
883
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
|
+
});
|
|
884
888
|
if (store instanceof Promise) {
|
|
885
889
|
store.then((resolvedStore) => {
|
|
886
890
|
this.store = resolvedStore;
|
package/dist/types.d.ts
CHANGED
|
@@ -1122,4 +1122,20 @@ export interface BasicDappInfo {
|
|
|
1122
1122
|
logo_url: string;
|
|
1123
1123
|
}[];
|
|
1124
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;
|
|
1140
|
+
}
|
|
1125
1141
|
export {};
|