@rabby-wallet/rabby-api 0.9.69 → 0.9.70

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ## Install
4
4
 
5
5
  ```bash
6
- npm install @rabby-wallet/rabby-api @debank/common
6
+ npm install @rabby-wallet/rabby-api
7
7
  ```
8
8
 
9
9
  ## Usage
package/dist/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { CHAINS_ENUM } from '@debank/common';
2
1
  export interface WalletVersionInfo {
3
2
  id: string;
4
3
  level: number;
@@ -14,7 +13,7 @@ export interface Chain {
14
13
  name: string;
15
14
  hex: string;
16
15
  logo: string;
17
- enum: CHAINS_ENUM;
16
+ enum: string;
18
17
  serverId: string;
19
18
  network: string;
20
19
  nativeTokenSymbol: string;
package/dist/utils.d.ts CHANGED
@@ -1,13 +1,9 @@
1
- import { CHAINS } from '@debank/common';
2
- import { AxiosRequestConfig } from 'axios';
3
- export declare const getChain: (chainId?: string) => import("@debank/common").Chain | null;
4
- export declare const getChainByNetwork: (network?: string | number) => import("@debank/common").Chain | null;
1
+ import { AxiosRequestConfig, GenericAbortSignal } from 'axios';
5
2
  export declare const INITIAL_OPENAPI_URL = "https://api.rabby.io";
6
3
  export declare const INITIAL_TESTNET_OPENAPI_URL = "https://api.testnet.rabby.io/";
7
- export { CHAINS };
8
4
  export declare function genSignParams(config: AxiosRequestConfig): {
9
5
  method: any;
10
6
  url: string;
11
7
  params: Partial<any>;
12
8
  };
13
- export declare function sleep(ms?: number, signal?: AbortController['signal']): Promise<void>;
9
+ export declare function sleep(ms?: number, signal?: GenericAbortSignal): Promise<void>;
package/dist/utils.js CHANGED
@@ -1,24 +1,7 @@
1
- import { isNil, keyBy, omitBy } from 'lodash';
2
- import { CHAINS } from '@debank/common';
1
+ import { isNil, omitBy } from 'lodash';
3
2
  import { decode } from 'qss';
4
- const chainsDict = keyBy(CHAINS, 'serverId');
5
- export const getChain = (chainId) => {
6
- if (!chainId) {
7
- return null;
8
- }
9
- return chainsDict[chainId];
10
- };
11
- const chainNetworkDict = keyBy(CHAINS, 'network');
12
- export const getChainByNetwork = (network) => {
13
- if (!network) {
14
- return null;
15
- }
16
- network = network.toString();
17
- return chainNetworkDict[network.startsWith('0x') ? +network : network];
18
- };
19
3
  export const INITIAL_OPENAPI_URL = 'https://api.rabby.io';
20
4
  export const INITIAL_TESTNET_OPENAPI_URL = 'https://api.testnet.rabby.io/';
21
- export { CHAINS };
22
5
  export function genSignParams(config) {
23
6
  var _a, _b, _c;
24
7
  let params = omitBy((_a = config.params) !== null && _a !== void 0 ? _a : {}, isNil);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-api",
3
- "version": "0.9.69",
3
+ "version": "0.9.70",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -11,30 +11,29 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@rabby-wallet/rabby-sign": "0.4.0",
14
- "axios": "^0.27.2",
15
- "axios-rate-limit": "^1.3.0",
16
- "eth-rpc-errors": "^4.0.3",
17
- "lodash": "^4.17.21",
18
- "qss": "^2.0.3"
14
+ "axios": "0.35.0",
15
+ "axios-rate-limit": "1.3.0",
16
+ "eth-rpc-errors": "4.0.3",
17
+ "lodash": "4.18.1",
18
+ "qss": "2.0.3"
19
19
  },
20
20
  "devDependencies": {
21
- "@babel/preset-env": "^7.19.1",
22
- "@debank/common": "^0.3.9",
23
- "@types/jest": "^29.0.3",
24
- "@types/lodash": "^4.14.185",
25
- "@types/node": "^18.7.18",
26
- "axios-mock-adapter": "^1.21.2",
27
- "babel-jest": "^29.0.3",
28
- "husky": ">=6",
29
- "jest": "^29.0.3",
30
- "jest-environment-jsdom": "^29.5.0",
31
- "jest-mock-axios": "^4.7.0-beta",
32
- "lint-staged": ">=10",
33
- "prettier": "^2.7.1",
34
- "rimraf": "^3.0.2",
35
- "ts-jest": "^29.0.1",
36
- "ts-node": "^10.9.1",
37
- "typescript": "^4.8.3"
21
+ "@babel/preset-env": "7.19.1",
22
+ "@types/jest": "29.0.3",
23
+ "@types/lodash": "4.14.185",
24
+ "@types/node": "18.7.18",
25
+ "axios-mock-adapter": "1.21.2",
26
+ "babel-jest": "29.0.3",
27
+ "husky": "8.0.1",
28
+ "jest": "29.0.3",
29
+ "jest-environment-jsdom": "29.5.0",
30
+ "jest-mock-axios": "4.7.0-beta",
31
+ "lint-staged": "13.0.3",
32
+ "prettier": "2.7.1",
33
+ "rimraf": "3.0.2",
34
+ "ts-jest": "29.0.1",
35
+ "ts-node": "10.9.1",
36
+ "typescript": "4.8.3"
38
37
  },
39
38
  "scripts": {
40
39
  "test": "jest --env=./test/jsdom-env-hack.js",
@@ -44,7 +43,6 @@
44
43
  "prepare": "husky install"
45
44
  },
46
45
  "peerDependencies": {
47
- "@debank/common": "^0.3.9",
48
46
  "@rabby-wallet/rabby-sign": ">= 0.3"
49
47
  },
50
48
  "author": "",