@rabby-wallet/rabby-api 0.7.32-beta.1 → 0.7.34

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, BridgeAggregator, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainListItem, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, DbkBridgeHistoryItem, 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, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult } from './types';
4
+ import { AddrDescResponse, BridgeAggregator, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainListItem, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, DbkBridgeHistoryItem, 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, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse } from './types';
5
5
  interface OpenApiStore {
6
6
  host: string;
7
7
  testnetHost?: string;
@@ -915,5 +915,10 @@ export declare class OpenApiService {
915
915
  account_id: string;
916
916
  tx_list: Tx[];
917
917
  }) => Promise<GasAccountCheckResult>;
918
+ parseCommon: (params: {
919
+ typed_data: Record<string, any>;
920
+ origin: string;
921
+ user_addr: string;
922
+ }) => Promise<ParseCommonResponse>;
918
923
  }
919
924
  export {};
package/dist/index.js CHANGED
@@ -1263,6 +1263,10 @@ export class OpenApiService {
1263
1263
  });
1264
1264
  return data;
1265
1265
  });
1266
+ this.parseCommon = (params) => __awaiter(this, void 0, void 0, function* () {
1267
+ const { data } = yield this.request.post('/v1/engine/action/parse_common', params);
1268
+ return data;
1269
+ });
1266
1270
  if (store instanceof Promise) {
1267
1271
  store.then((resolvedStore) => {
1268
1272
  this.store = resolvedStore;
package/dist/types.d.ts CHANGED
@@ -1357,6 +1357,7 @@ export interface ContractInfo {
1357
1357
  auto: null | boolean;
1358
1358
  edit: null | boolean;
1359
1359
  };
1360
+ is_phishing: boolean | null;
1360
1361
  }
1361
1362
  export interface GasAccountCheckResult {
1362
1363
  gas_account_cost: {
@@ -1368,4 +1369,12 @@ export interface GasAccountCheckResult {
1368
1369
  balance_is_enough: boolean;
1369
1370
  chain_not_support: boolean;
1370
1371
  }
1372
+ export interface ParseCommonResponse {
1373
+ input_type: 'typed_data' | 'text' | 'tx';
1374
+ output_type: 'typed_data' | 'text' | 'tx';
1375
+ action: ParseTypedDataResponse['action'] | ParseTextResponse['action'] | ParseTxResponse['action'];
1376
+ log_id: string;
1377
+ pre_exec_result: ExplainTxResponse | null;
1378
+ contract_call_data: ParseTxResponse['contract_call'] | null;
1379
+ }
1371
1380
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.7.32-beta.1",
3
+ "version": "0.7.34",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [