@rabby-wallet/rabby-api 0.7.7 → 0.7.8-beta.0

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, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, ExplainTxResponse, ExplainTypedDataResponse, GasLevel, GetTxResponse, HistoryCurve, LatestExplainTxResponse, MempoolCheckDetail, NFTApprovalResponse, NFTItem, NodeStatus, NodeStatusDetail, 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;
@@ -529,5 +529,9 @@ export declare class OpenApiService {
529
529
  }) => Promise<{
530
530
  success: boolean;
531
531
  }>;
532
+ nodeStatusList: () => Promise<NodeStatus[]>;
533
+ nodeStatus: (params: {
534
+ chain_id: string;
535
+ }) => Promise<NodeStatusDetail>;
532
536
  }
533
537
  export {};
package/dist/index.js CHANGED
@@ -914,6 +914,14 @@ export class OpenApiService {
914
914
  const { data } = yield this.request.post('/v1/user/history_curve/init', params);
915
915
  return data;
916
916
  });
917
+ this.nodeStatusList = () => __awaiter(this, void 0, void 0, function* () {
918
+ const { data } = yield this.request.post('/v1/node/list');
919
+ return data;
920
+ });
921
+ this.nodeStatus = (params) => __awaiter(this, void 0, void 0, function* () {
922
+ const { data } = yield this.request.post('/v1/node', params);
923
+ return data;
924
+ });
917
925
  if (store instanceof Promise) {
918
926
  store.then((resolvedStore) => {
919
927
  this.store = resolvedStore;
package/dist/types.d.ts CHANGED
@@ -1160,4 +1160,48 @@ export interface HistoryCurve {
1160
1160
  id: number;
1161
1161
  };
1162
1162
  }
1163
+ export interface NodeStatus {
1164
+ id: string;
1165
+ chain_id: string;
1166
+ features: {
1167
+ signature_decode: boolean;
1168
+ tx_simulation: boolean;
1169
+ security_check: boolean;
1170
+ evm_tracing: boolean;
1171
+ };
1172
+ tags: string[];
1173
+ official_node_height: number;
1174
+ official_node_timestamp: number;
1175
+ rabby_node_height: number;
1176
+ rabby_data_service_height: number;
1177
+ chain: {
1178
+ id: string;
1179
+ network_id: number;
1180
+ name: string;
1181
+ token_id: string;
1182
+ token_symbol: string;
1183
+ logo_url: string;
1184
+ svg_logo_url: string;
1185
+ block_interval: number;
1186
+ start_at: string;
1187
+ prefix: string;
1188
+ wrapped: string;
1189
+ explorer_host: string;
1190
+ is_support_archive: boolean;
1191
+ eip_1559: boolean;
1192
+ white_logo_url: string;
1193
+ };
1194
+ }
1195
+ interface NodeServiceData {
1196
+ node: NodeDetails;
1197
+ height_list: [number, number, number][];
1198
+ }
1199
+ interface NodeDetails {
1200
+ name: string;
1201
+ tag: string[];
1202
+ }
1203
+ export interface NodeStatusDetail {
1204
+ rabby_rpc: NodeServiceData[];
1205
+ rabby_data_service: NodeServiceData[];
1206
+ }
1163
1207
  export {};
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-beta.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [