@ocap/util 1.16.8 → 1.16.9

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.
Files changed (2) hide show
  1. package/lib/index.d.ts +6 -5
  2. package/package.json +6 -4
package/lib/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  // Generate by [js2dts@0.3.3](https://github.com/whxaxes/js2dts#readme)
2
2
 
3
+ import * as bnJs from 'bn.js';
3
4
  /**
4
5
  * Validates if a value is an Uint8Array.
5
6
  *
@@ -106,15 +107,15 @@ declare function toAddress(did: string): string;
106
107
  declare const _Lib: _Lib.T100;
107
108
  declare namespace _Lib {
108
109
  export interface T100 {
109
- BN: any;
110
+ BN: typeof bnJs;
110
111
  isBN: (object: any) => boolean;
111
112
  isBigNumber: (object: any) => boolean;
112
113
  isHexPrefixed: (str: string) => boolean;
113
114
  stripHexPrefix: (str: string) => any;
114
115
  utf8ToHex: (str: string) => string;
115
116
  hexToUtf8: (hex: string) => string;
116
- numberToHex: (value: any) => string;
117
- hexToNumber: (value: any) => number;
117
+ numberToHex: (value: string | number | bnJs) => string;
118
+ hexToNumber: (value: string | number | bnJs) => number;
118
119
  isHex: (hex: string) => boolean;
119
120
  isHexStrict: (hex: string) => boolean;
120
121
  isUint8Array: typeof isUint8Array;
@@ -123,8 +124,8 @@ declare namespace _Lib {
123
124
  toHex: (value: any, returnType: boolean) => string;
124
125
  numberToString: (arg: any) => any;
125
126
  fromUnitToToken: (input: string | number, decimal?: number, optionsInput?: any) => string;
126
- fromTokenToUnit: (input: string, decimal?: number) => any;
127
- toBN: (number: any) => any;
127
+ fromTokenToUnit: (input: string, decimal?: number) => bnJs;
128
+ toBN: (number: string | number | bnJs) => bnJs;
128
129
  toUint8Array: typeof toUint8Array;
129
130
  toBuffer: typeof toBuffer;
130
131
  toBase58: typeof toBase58;
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@ocap/util",
3
- "version": "1.16.8",
3
+ "version": "1.16.9",
4
4
  "description": "utils shared across multiple forge js libs, works in both node.js and browser",
5
5
  "keywords": [
6
- "forge",
7
6
  "arcblock",
8
7
  "node.js",
9
8
  "browser",
@@ -25,13 +24,16 @@
25
24
  },
26
25
  "devDependencies": {
27
26
  "jest": "^27.3.1",
28
- "jsdoc-to-markdown": "^5.0.0"
27
+ "jsdoc-to-markdown": "^7.1.1"
29
28
  },
30
29
  "author": {
31
30
  "name": "wangshijun",
32
31
  "email": "shijun@arcblock.io",
33
32
  "url": "https://github.com/wangshijun"
34
33
  },
34
+ "contributors": [
35
+ "wangshijun <shijun@arcblock.io> (https://github.com/wangshijun)"
36
+ ],
35
37
  "homepage": "https://github.com/ArcBlock/asset-chain/tree/master/core/forge-util",
36
38
  "license": "Apache-2.0",
37
39
  "main": "lib/index.js",
@@ -56,5 +58,5 @@
56
58
  "bugs": {
57
59
  "url": "https://github.com/ArcBlock/asset-chain/issues"
58
60
  },
59
- "gitHead": "15e9623edafa6fcb628f67f0c9e26e64ab01bcd2"
61
+ "gitHead": "16fb7ce43033d07f83794914f2d5dda731f80814"
60
62
  }