@rabby-wallet/rabby-api 0.7.7 → 0.7.8

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, 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';
3
+ import { AddrDescResponse, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainListItem, 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;
@@ -512,6 +512,18 @@ export declare class OpenApiService {
512
512
  error_code: number;
513
513
  }>;
514
514
  getSupportedChains: () => Promise<SupportedChain[]>;
515
+ searchChainList: (params?: {
516
+ limit?: number;
517
+ start?: number;
518
+ q?: string;
519
+ }) => Promise<{
520
+ page: {
521
+ start: number;
522
+ limit: number;
523
+ total: number;
524
+ };
525
+ chain_list: ChainListItem[];
526
+ }>;
515
527
  getHistoryCurve: (addr: string) => Promise<HistoryCurve>;
516
528
  getHistoryCurveSupportedList: () => Promise<{
517
529
  supported_chains: string[];
package/dist/index.js CHANGED
@@ -894,6 +894,12 @@ export class OpenApiService {
894
894
  const { data } = yield this.request.get('/v1/wallet/supported_chains');
895
895
  return data;
896
896
  });
897
+ this.searchChainList = (params) => __awaiter(this, void 0, void 0, function* () {
898
+ const { data } = yield this.request.get('/v1/chain/total_list', {
899
+ params,
900
+ });
901
+ return data;
902
+ });
897
903
  this.getHistoryCurve = (addr) => __awaiter(this, void 0, void 0, function* () {
898
904
  const { data } = yield this.request.get('/v1/user/history_curve', {
899
905
  params: { id: addr },
package/dist/types.d.ts CHANGED
@@ -1139,6 +1139,18 @@ export interface SupportedChain {
1139
1139
  is_disabled: boolean;
1140
1140
  explorer_host: string;
1141
1141
  }
1142
+ export interface ChainListItem {
1143
+ chain_id: number;
1144
+ name: string;
1145
+ short_name: string;
1146
+ native_currency: {
1147
+ name: string;
1148
+ symbol: string;
1149
+ decimals: number;
1150
+ };
1151
+ explorer: string | null;
1152
+ rpc: null | string;
1153
+ }
1142
1154
  export interface HistoryCurve {
1143
1155
  create_at: number;
1144
1156
  executor_name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.7.7",
3
+ "version": "0.7.8",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [