@rabby-wallet/rabby-api 0.6.15-alpha.2 → 0.6.15-alpha.4

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
@@ -106,6 +106,7 @@ export declare class OpenApiService {
106
106
  pay_token_id: string;
107
107
  pay_token_raw_amount: string;
108
108
  receive_token_id: string;
109
+ slippage?: string | number;
109
110
  }) => Promise<{
110
111
  receive_token_raw_amount: number;
111
112
  dex_approve_to: string;
@@ -279,5 +280,8 @@ export declare class OpenApiService {
279
280
  chainId?: string | undefined;
280
281
  isAll: boolean;
281
282
  }) => Promise<CollectionList[]>;
283
+ gasPriceStats: (chainId: string) => Promise<{
284
+ median: number;
285
+ }>;
282
286
  }
283
287
  export {};
package/dist/index.js CHANGED
@@ -295,7 +295,7 @@ export class OpenApiService {
295
295
  return data === null || data === void 0 ? void 0 : data.filter((token) => getChain(token.chain));
296
296
  });
297
297
  this._customListToken = (uuids, id, isTestnet = false) => __awaiter(this, void 0, void 0, function* () {
298
- if ((uuids === null || uuids === void 0 ? void 0 : uuids.length) || !id) {
298
+ if (!(uuids === null || uuids === void 0 ? void 0 : uuids.length) || !id) {
299
299
  return [];
300
300
  }
301
301
  const { data } = yield this.request.post('/v1/user/specific_token_list', {
@@ -707,6 +707,12 @@ export class OpenApiService {
707
707
  } }, this._getRequestOptions(chainId)));
708
708
  return data;
709
709
  });
710
+ this.gasPriceStats = (chainId) => __awaiter(this, void 0, void 0, function* () {
711
+ const { data } = yield this.request.get('/v1/wallet/gas_price_stats', Object.assign({ params: {
712
+ chain_id: chainId,
713
+ } }, this._getRequestOptions(chainId)));
714
+ return data;
715
+ });
710
716
  this.store = store;
711
717
  this.adapter = adapter;
712
718
  }
package/dist/types.d.ts CHANGED
@@ -115,6 +115,7 @@ export interface TokenItem {
115
115
  usd_value?: number;
116
116
  raw_amount?: string;
117
117
  raw_amount_hex_str?: string;
118
+ price_24h_change?: number | null;
118
119
  }
119
120
  export interface TransferingNFTItem {
120
121
  chain: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.6.15-alpha.2",
3
+ "version": "0.6.15-alpha.4",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist"