@rabby-wallet/rabby-api 0.7.33 → 0.7.35

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;
@@ -783,6 +783,15 @@ export declare class OpenApiService {
783
783
  to_chain_id: string;
784
784
  to_token_id: string;
785
785
  }) => Promise<Omit<BridgeQuote, 'tx'>[]>;
786
+ getBridgeQuoteListV2: (params: {
787
+ aggregator_id: string;
788
+ user_addr: string;
789
+ from_chain_id: string;
790
+ from_token_id: string;
791
+ from_token_raw_amount: string;
792
+ to_chain_id: string;
793
+ to_token_id: string;
794
+ }) => Promise<Omit<BridgeQuote, 'tx'>[]>;
786
795
  getBridgeQuote: (params: {
787
796
  aggregator_id: string;
788
797
  bridge_id: string;
@@ -915,5 +924,10 @@ export declare class OpenApiService {
915
924
  account_id: string;
916
925
  tx_list: Tx[];
917
926
  }) => Promise<GasAccountCheckResult>;
927
+ parseCommon: (params: {
928
+ typed_data: Record<string, any>;
929
+ origin: string;
930
+ user_addr: string;
931
+ }) => Promise<ParseCommonResponse>;
918
932
  }
919
933
  export {};
package/dist/index.js CHANGED
@@ -1152,6 +1152,12 @@ export class OpenApiService {
1152
1152
  });
1153
1153
  return data;
1154
1154
  });
1155
+ this.getBridgeQuoteListV2 = (params) => __awaiter(this, void 0, void 0, function* () {
1156
+ const { data } = yield this.request.get('/v2/bridge/quote_list', {
1157
+ params,
1158
+ });
1159
+ return data;
1160
+ });
1155
1161
  this.getBridgeQuote = (params) => __awaiter(this, void 0, void 0, function* () {
1156
1162
  const { data } = yield this.request.get('/v1/bridge/quote', {
1157
1163
  params,
@@ -1263,6 +1269,10 @@ export class OpenApiService {
1263
1269
  });
1264
1270
  return data;
1265
1271
  });
1272
+ this.parseCommon = (params) => __awaiter(this, void 0, void 0, function* () {
1273
+ const { data } = yield this.request.post('/v1/engine/action/parse_common', params);
1274
+ return data;
1275
+ });
1266
1276
  if (store instanceof Promise) {
1267
1277
  store.then((resolvedStore) => {
1268
1278
  this.store = resolvedStore;
package/dist/types.d.ts CHANGED
@@ -1369,4 +1369,12 @@ export interface GasAccountCheckResult {
1369
1369
  balance_is_enough: boolean;
1370
1370
  chain_not_support: boolean;
1371
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
+ }
1372
1380
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.7.33",
3
+ "version": "0.7.35",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [