@rabby-wallet/rabby-api 0.9.34 → 0.9.35-beta.1

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
@@ -874,10 +874,23 @@ export declare class OpenApiService {
874
874
  user_addr: string;
875
875
  start: number;
876
876
  limit: number;
877
+ is_all?: boolean;
877
878
  }) => Promise<{
878
879
  history_list: BridgeHistory[];
879
880
  total_cnt: number;
880
881
  }>;
882
+ buildBridgeTx: (params: {
883
+ aggregator_id: string;
884
+ bridge_id: string;
885
+ user_addr: string;
886
+ from_chain_id: string;
887
+ from_token_id: string;
888
+ from_token_raw_amount: string;
889
+ to_chain_id: string;
890
+ to_token_id: string;
891
+ slippage: string;
892
+ quote_key: string;
893
+ }) => Promise<Tx>;
881
894
  postBridgeHistory: (params: {
882
895
  aggregator_id: string;
883
896
  bridge_id: string;
@@ -1145,6 +1158,7 @@ export declare class OpenApiService {
1145
1158
  }) => Promise<TokenItem[]>;
1146
1159
  searchTokensV2: (params: {
1147
1160
  q: string;
1161
+ chain_id?: string;
1148
1162
  }) => Promise<TokenItemWithEntity[]>;
1149
1163
  getCopyTradingChainList: () => Promise<string[]>;
1150
1164
  getCopyTradingTokenList: (params: {
package/dist/index.js CHANGED
@@ -1251,6 +1251,12 @@ export class OpenApiService {
1251
1251
  });
1252
1252
  return data;
1253
1253
  });
1254
+ this.buildBridgeTx = (params) => __awaiter(this, void 0, void 0, function* () {
1255
+ const { data } = yield this.request.get('/v2/bridge/build_tx', {
1256
+ params,
1257
+ });
1258
+ return data;
1259
+ });
1254
1260
  this.postBridgeHistory = (params) => __awaiter(this, void 0, void 0, function* () {
1255
1261
  const { data } = yield this.request.post('/v1/bridge/history', params);
1256
1262
  return data;
package/dist/types.d.ts CHANGED
@@ -1433,12 +1433,14 @@ export interface BridgeQuote {
1433
1433
  to: string;
1434
1434
  value: string;
1435
1435
  };
1436
+ quote_key: Record<string, any>;
1436
1437
  }
1437
1438
  export interface BridgeHistory {
1438
1439
  aggregator: Exclude<BridgeAggregator, 'bridge_list'>;
1439
1440
  bridge: BridgeItem;
1440
1441
  from_token: TokenItem;
1441
1442
  to_token: TokenItem;
1443
+ to_actual_token: TokenItem;
1442
1444
  quote: {
1443
1445
  pay_token_amount: number;
1444
1446
  receive_token_amount: number;
@@ -1448,7 +1450,7 @@ export interface BridgeHistory {
1448
1450
  receive_token_amount: number;
1449
1451
  };
1450
1452
  detail_url: string;
1451
- status: 'pending' | 'completed';
1453
+ status: 'pending' | 'completed' | 'failed';
1452
1454
  create_at: number;
1453
1455
  from_tx: {
1454
1456
  tx_id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.9.34",
3
+ "version": "0.9.35-beta.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [