@cashscript/utils 0.7.0 → 0.7.1
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/main/data.js +1 -1
- package/dist/module/data.js +1 -1
- package/package.json +3 -2
package/dist/main/data.js
CHANGED
|
@@ -23,7 +23,7 @@ function encodeInt(int) {
|
|
|
23
23
|
return (0, libauth_1.bigIntToScriptNumber)(BigInt(int));
|
|
24
24
|
}
|
|
25
25
|
exports.encodeInt = encodeInt;
|
|
26
|
-
function decodeInt(encodedInt, maxLength) {
|
|
26
|
+
function decodeInt(encodedInt, maxLength = 8) {
|
|
27
27
|
const options = { maximumScriptNumberByteLength: maxLength };
|
|
28
28
|
const result = (0, libauth_1.parseBytesAsScriptNumber)(encodedInt, options);
|
|
29
29
|
if ((0, libauth_1.isScriptNumberError)(result)) {
|
package/dist/module/data.js
CHANGED
|
@@ -17,7 +17,7 @@ export function decodeBool(encodedBool) {
|
|
|
17
17
|
export function encodeInt(int) {
|
|
18
18
|
return bigIntToScriptNumber(BigInt(int));
|
|
19
19
|
}
|
|
20
|
-
export function decodeInt(encodedInt, maxLength) {
|
|
20
|
+
export function decodeInt(encodedInt, maxLength = 8) {
|
|
21
21
|
const options = { maximumScriptNumberByteLength: maxLength };
|
|
22
22
|
const result = parseBytesAsScriptNumber(encodedInt, options);
|
|
23
23
|
if (isScriptNumberError(result)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cashscript/utils",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "CashScript utilities and types",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bitcoin cash",
|
|
@@ -46,5 +46,6 @@
|
|
|
46
46
|
"jest": "^26.6.3",
|
|
47
47
|
"ts-jest": "^26.5.1",
|
|
48
48
|
"typescript": "^4.1.5"
|
|
49
|
-
}
|
|
49
|
+
},
|
|
50
|
+
"gitHead": "ba6756003d0d220c5d8c67c8459c65ced0152189"
|
|
50
51
|
}
|