@rabby-wallet/rabby-api 0.7.11 → 0.7.12

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,7 +1,7 @@
1
1
  import { AxiosAdapter, AxiosRequestConfig } from 'axios';
2
2
  import { RateLimitedAxiosInstance } from 'axios-rate-limit';
3
3
  import { InitOptions, RabbyApiPlugin } from './plugins/intf';
4
- 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
+ import { AddrDescResponse, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainListItem, 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';
5
5
  interface OpenApiStore {
6
6
  host: string;
7
7
  testnetHost?: string;
@@ -542,5 +542,9 @@ export declare class OpenApiService {
542
542
  }) => Promise<{
543
543
  success: boolean;
544
544
  }>;
545
+ getNodeStatusList: () => Promise<NodeStatus[]>;
546
+ getNodeStatusDetail: (params: {
547
+ chain_id: string;
548
+ }) => Promise<NodeStatusDetail>;
545
549
  }
546
550
  export {};
package/dist/index.js CHANGED
@@ -949,6 +949,14 @@ export class OpenApiService {
949
949
  const { data } = yield this.request.post('/v1/user/history_curve/init', params);
950
950
  return data;
951
951
  });
952
+ this.getNodeStatusList = () => __awaiter(this, void 0, void 0, function* () {
953
+ const { data } = yield this.request.get('/v1/node/list');
954
+ return data;
955
+ });
956
+ this.getNodeStatusDetail = (params) => __awaiter(this, void 0, void 0, function* () {
957
+ const { data } = yield this.request.get('/v1/node', { params });
958
+ return data;
959
+ });
952
960
  if (store instanceof Promise) {
953
961
  store.then((resolvedStore) => {
954
962
  this.store = resolvedStore;
package/dist/types.d.ts CHANGED
@@ -1181,4 +1181,48 @@ export interface HistoryCurve {
1181
1181
  id: number;
1182
1182
  };
1183
1183
  }
1184
+ export interface NodeStatus {
1185
+ id: string;
1186
+ chain_id: string;
1187
+ features: {
1188
+ signature_decode: boolean;
1189
+ tx_simulation: boolean;
1190
+ security_check: boolean;
1191
+ evm_tracing: boolean;
1192
+ };
1193
+ tags: string[];
1194
+ official_node_height: number;
1195
+ official_node_timestamp: number;
1196
+ rabby_node_height: number;
1197
+ rabby_data_service_height: number;
1198
+ chain: {
1199
+ id: string;
1200
+ network_id: number;
1201
+ name: string;
1202
+ token_id: string;
1203
+ token_symbol: string;
1204
+ logo_url: string;
1205
+ svg_logo_url: string;
1206
+ block_interval: number;
1207
+ start_at: string;
1208
+ prefix: string;
1209
+ wrapped: string;
1210
+ explorer_host: string;
1211
+ is_support_archive: boolean;
1212
+ eip_1559: boolean;
1213
+ white_logo_url: string;
1214
+ };
1215
+ }
1216
+ interface NodeServiceData {
1217
+ node: NodeDetails;
1218
+ height_list: [number, number, number][];
1219
+ }
1220
+ interface NodeDetails {
1221
+ name: string;
1222
+ tag: string[];
1223
+ }
1224
+ export interface NodeStatusDetail {
1225
+ rabby_rpc: NodeServiceData[];
1226
+ rabby_data_service: NodeServiceData[];
1227
+ }
1184
1228
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.7.11",
3
+ "version": "0.7.12",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [