@rabby-wallet/rabby-api 0.7.2 → 0.7.4-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 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, HistoryCurve, 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,10 @@ export declare class OpenApiService {
503
503
  }) => Promise<{
504
504
  error_code: number;
505
505
  }>;
506
+ getSupportedChains: () => Promise<SupportedChain[]>;
507
+ getHistoryCurve: (addr: string) => Promise<HistoryCurve>;
508
+ getHistoryCurveSupportedList: () => Promise<{
509
+ supported_chains: string[];
510
+ }>;
506
511
  }
507
512
  export {};
package/dist/index.js CHANGED
@@ -881,6 +881,20 @@ 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
+ });
888
+ this.getHistoryCurve = (addr) => __awaiter(this, void 0, void 0, function* () {
889
+ const { data } = yield this.request.get('v1/user/history_curve', {
890
+ params: { id: addr },
891
+ });
892
+ return data;
893
+ });
894
+ this.getHistoryCurveSupportedList = () => __awaiter(this, void 0, void 0, function* () {
895
+ const { data } = yield this.request.get('v1/chain/classify_supported_list');
896
+ return data;
897
+ });
884
898
  if (store instanceof Promise) {
885
899
  store.then((resolvedStore) => {
886
900
  this.store = resolvedStore;
package/dist/types.d.ts CHANGED
@@ -1122,4 +1122,42 @@ 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
+ need_estimate_gas?: boolean;
1138
+ eip_1559: boolean;
1139
+ is_disabled: boolean;
1140
+ explorer_host: string;
1141
+ }
1142
+ export interface HistoryCurve {
1143
+ create_at: number;
1144
+ executor_name: string;
1145
+ executor_params: {
1146
+ addr: string;
1147
+ };
1148
+ executor_version: string;
1149
+ id: string;
1150
+ job?: null | {
1151
+ create_at: number;
1152
+ id: string;
1153
+ status: 'pending' | 'running';
1154
+ };
1155
+ result?: null | {
1156
+ create_at: number;
1157
+ data: {
1158
+ usd_value_list: number[][];
1159
+ };
1160
+ id: number;
1161
+ };
1162
+ }
1125
1163
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.7.2",
3
+ "version": "0.7.4-alpha.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [