starknet 3.16.0 → 3.16.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## [3.16.3](https://github.com/0xs34n/starknet.js/compare/v3.16.2...v3.16.3) (2022-07-15)
2
+
3
+ ### Bug Fixes
4
+
5
+ - allow hex to be mixed case ([fa84e55](https://github.com/0xs34n/starknet.js/commit/fa84e558602d1ff134defc3e0f7123c1f4d04775))
6
+
7
+ ## [3.16.2](https://github.com/0xs34n/starknet.js/compare/v3.16.1...v3.16.2) (2022-07-14)
8
+
9
+ ### Bug Fixes
10
+
11
+ - **docs:** account.address ([d935b95](https://github.com/0xs34n/starknet.js/commit/d935b95c3bb54977c420efbd25cd85dcd12d1b17))
12
+
13
+ ## [3.16.1](https://github.com/0xs34n/starknet.js/compare/v3.16.0...v3.16.1) (2022-07-02)
14
+
15
+ ### Bug Fixes
16
+
17
+ - **test:** for new devnet version ([63d145f](https://github.com/0xs34n/starknet.js/commit/63d145f1fba90cca9e679f115525801ee140ceec))
18
+
1
19
  # [3.16.0](https://github.com/0xs34n/starknet.js/compare/v3.15.6...v3.16.0) (2022-06-29)
2
20
 
3
21
  ### Features
@@ -14,7 +14,7 @@ export const compiledTestDapp = readContract('TestDapp');
14
14
 
15
15
  const DEFAULT_TEST_PROVIDER_BASE_URL = 'http://127.0.0.1:5050/';
16
16
  const DEFAULT_TEST_ACCOUNT_ADDRESS = // run `starknet-devnet --seed 0` and this will be the first account
17
- '0x65d53c8ec4178096167b35a08e16e548d8075cb08ad7bc63d07966ca13569dc';
17
+ '0x7e00d496e324876bbc8531f2d9a82bf154d1a04a50218ee74cdd372f75a551a';
18
18
  const DEFAULT_TEST_ACCOUNT_PRIVATE_KEY = '0xe3e70682c2094cac629f6fbed82c07cd';
19
19
 
20
20
  const BASE_URL = process.env.TEST_PROVIDER_BASE_URL || DEFAULT_TEST_PROVIDER_BASE_URL;
@@ -35,6 +35,10 @@ function isHex(hex) {
35
35
  }
36
36
  exports.isHex = isHex;
37
37
  function toBN(number, base) {
38
+ if (typeof number === 'string') {
39
+ // eslint-disable-next-line no-param-reassign
40
+ number = number.toLowerCase();
41
+ }
38
42
  if (typeof number === 'string' && isHex(number) && !base)
39
43
  return new bn_js_1.default((0, encode_1.removeHexPrefix)(number), 'hex');
40
44
  return new bn_js_1.default(number, base);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starknet",
3
- "version": "3.16.0",
3
+ "version": "3.16.3",
4
4
  "description": "JavaScript library for StarkNet",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,6 +10,10 @@ export function isHex(hex: string): boolean {
10
10
  }
11
11
 
12
12
  export function toBN(number: BigNumberish, base?: number | 'hex') {
13
+ if (typeof number === 'string') {
14
+ // eslint-disable-next-line no-param-reassign
15
+ number = number.toLowerCase();
16
+ }
13
17
  if (typeof number === 'string' && isHex(number) && !base)
14
18
  return new BN(removeHexPrefix(number), 'hex');
15
19
  return new BN(number, base);
package/utils/number.js CHANGED
@@ -62,6 +62,10 @@ function isHex(hex) {
62
62
  }
63
63
  exports.isHex = isHex;
64
64
  function toBN(number, base) {
65
+ if (typeof number === 'string') {
66
+ // eslint-disable-next-line no-param-reassign
67
+ number = number.toLowerCase();
68
+ }
65
69
  if (typeof number === 'string' && isHex(number) && !base)
66
70
  return new bn_js_1.default((0, encode_1.removeHexPrefix)(number), 'hex');
67
71
  return new bn_js_1.default(number, base);
@@ -18,7 +18,7 @@ For creating new instance of Account, account contract must be deployed. Also th
18
18
 
19
19
  ## Account Properties
20
20
 
21
- contract.**address** => _string_
21
+ account.**address** => _string_
22
22
 
23
23
  The address of the account contract
24
24