@rabby-wallet/rabby-api 0.8.3 → 0.8.4-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
@@ -932,5 +932,60 @@ export declare class OpenApiService {
932
932
  origin: string;
933
933
  user_addr: string;
934
934
  }) => Promise<ParseCommonResponse>;
935
+ getRecommendBridgeToChain: (params: {
936
+ from_chain_id: string;
937
+ }) => Promise<{
938
+ to_chain_id: string;
939
+ }>;
940
+ getRecommendFromToken: (params: {
941
+ user_addr: string;
942
+ from_chain_id: string;
943
+ from_token_id: string;
944
+ from_token_amount: string;
945
+ to_chain_id: string;
946
+ to_token_id: string;
947
+ }) => Promise<{
948
+ token_list: TokenItem[];
949
+ }>;
950
+ getBridgeToTokenList: (params: {
951
+ from_chain_id: string;
952
+ from_token_id?: string;
953
+ q?: string;
954
+ }) => Promise<{
955
+ token_list: (TokenItem & {
956
+ trade_volume_24h: 'low' | 'middle' | 'high';
957
+ })[];
958
+ }>;
959
+ getBridgeQuoteV2: (params: {
960
+ aggregator_id: string;
961
+ user_addr: string;
962
+ from_chain_id: string;
963
+ from_token_id: string;
964
+ from_token_raw_amount: string;
965
+ to_chain_id: string;
966
+ to_token_id: string;
967
+ slippage: string;
968
+ }) => Promise<Omit<BridgeQuote, 'tx'>[]>;
969
+ getBridgeQuoteTxV2: (params: {
970
+ aggregator_id: string;
971
+ bridge_id: string;
972
+ user_addr: string;
973
+ from_chain_id: string;
974
+ from_token_id: string;
975
+ from_token_raw_amount: string;
976
+ to_chain_id: string;
977
+ to_token_id: string;
978
+ slippage: string;
979
+ }) => Promise<BridgeQuote>;
980
+ isSameBridgeToken: (params: {
981
+ from_chain_id: string;
982
+ from_token_id: string;
983
+ to_chain_id: string;
984
+ to_token_id: string;
985
+ }) => Promise<{
986
+ is_same: boolean;
987
+ aggregator_id: string;
988
+ }[]>;
989
+ getBridgeSupportChainV2: () => Promise<string[]>;
935
990
  }
936
991
  export {};
package/dist/index.js CHANGED
@@ -1281,6 +1281,46 @@ export class OpenApiService {
1281
1281
  const { data } = yield this.request.post('/v1/engine/action/parse_common', params);
1282
1282
  return data;
1283
1283
  });
1284
+ this.getRecommendBridgeToChain = (params) => __awaiter(this, void 0, void 0, function* () {
1285
+ const { data } = yield this.request.get('/v2/bridge/recommend/to_chain', {
1286
+ params,
1287
+ });
1288
+ return data;
1289
+ });
1290
+ this.getRecommendFromToken = (params) => __awaiter(this, void 0, void 0, function* () {
1291
+ const { data } = yield this.request.get('/v2/bridge/recommend/from_token_list', {
1292
+ params,
1293
+ });
1294
+ return data;
1295
+ });
1296
+ this.getBridgeToTokenList = (params) => __awaiter(this, void 0, void 0, function* () {
1297
+ const { data } = yield this.request.get('/v2/bridge/recommend/to_token_list', {
1298
+ params,
1299
+ });
1300
+ return data;
1301
+ });
1302
+ this.getBridgeQuoteV2 = (params) => __awaiter(this, void 0, void 0, function* () {
1303
+ const { data } = yield this.request.get('/v2/bridge/quote_list', {
1304
+ params,
1305
+ });
1306
+ return data;
1307
+ });
1308
+ this.getBridgeQuoteTxV2 = (params) => __awaiter(this, void 0, void 0, function* () {
1309
+ const { data } = yield this.request.get('/v2/bridge/quote', {
1310
+ params,
1311
+ });
1312
+ return data;
1313
+ });
1314
+ this.isSameBridgeToken = (params) => __awaiter(this, void 0, void 0, function* () {
1315
+ const { data } = yield this.request.get('/v2/bridge/same_token', {
1316
+ params,
1317
+ });
1318
+ return data;
1319
+ });
1320
+ this.getBridgeSupportChainV2 = () => __awaiter(this, void 0, void 0, function* () {
1321
+ const { data } = yield this.request.get('/v2/bridge/supported_chains');
1322
+ return data;
1323
+ });
1284
1324
  if (store instanceof Promise) {
1285
1325
  store.then((resolvedStore) => {
1286
1326
  this.store = resolvedStore;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.8.3",
3
+ "version": "0.8.4-beta.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [