@rabby-wallet/rabby-api 0.7.31 → 0.7.33

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
@@ -13,6 +13,10 @@ interface Options {
13
13
  clientName?: string;
14
14
  clientVersion?: string;
15
15
  }
16
+ declare enum CurveDayType {
17
+ DAY = 1,
18
+ WEEK = 7
19
+ }
16
20
  declare type VersionPrefix = 'v1' | 'v2';
17
21
  declare type ApiOptions<V extends VersionPrefix | void = VersionPrefix> = {
18
22
  restfulPrefix?: V;
@@ -192,7 +196,7 @@ export declare class OpenApiService {
192
196
  ids: string;
193
197
  timeAt: number;
194
198
  }) => Promise<Record<string, number>>;
195
- getNetCurve: (addr: string) => Promise<{
199
+ getNetCurve: (addr: string, days?: CurveDayType) => Promise<{
196
200
  timestamp: number;
197
201
  usd_value: number;
198
202
  }[]>;
package/dist/index.js CHANGED
@@ -36,6 +36,11 @@ import { ethErrors } from 'eth-rpc-errors';
36
36
  import { genSignParams, sleep } from './utils';
37
37
  import { omit } from 'lodash';
38
38
  import { ASYNC_JOB_RETRY_DELAY, ASYNC_JOB_TIMEOUT } from './const';
39
+ var CurveDayType;
40
+ (function (CurveDayType) {
41
+ CurveDayType[CurveDayType["DAY"] = 1] = "DAY";
42
+ CurveDayType[CurveDayType["WEEK"] = 7] = "WEEK";
43
+ })(CurveDayType || (CurveDayType = {}));
39
44
  const maxRPS = 500;
40
45
  export class OpenApiService {
41
46
  constructor(_a) {
@@ -507,10 +512,11 @@ export class OpenApiService {
507
512
  });
508
513
  return data;
509
514
  });
510
- this.getNetCurve = (addr) => __awaiter(this, void 0, void 0, function* () {
515
+ this.getNetCurve = (addr, days = CurveDayType.DAY) => __awaiter(this, void 0, void 0, function* () {
511
516
  const { data } = yield this.request.get('/v1/user/total_net_curve', {
512
517
  params: {
513
518
  id: addr,
519
+ days,
514
520
  },
515
521
  });
516
522
  return data;
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: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.7.31",
3
+ "version": "0.7.33",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [