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 +18 -0
- package/__tests__/fixtures.ts +1 -1
- package/dist/utils/number.js +4 -0
- package/package.json +1 -1
- package/src/utils/number.ts +4 -0
- package/utils/number.js +4 -0
- package/www/docs/API/account.md +1 -1
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
|
package/__tests__/fixtures.ts
CHANGED
|
@@ -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
|
-
'
|
|
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;
|
package/dist/utils/number.js
CHANGED
|
@@ -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
package/src/utils/number.ts
CHANGED
|
@@ -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);
|
package/www/docs/API/account.md
CHANGED