mol_crypto_lib 0.1.1562 → 0.1.1564
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/node.d.ts +1 -1
- package/node.deps.json +1 -1
- package/node.js +8 -8
- package/node.js.map +1 -1
- package/node.mjs +8 -8
- package/node.test.js +8 -8
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +1 -1
- package/web.deps.json +1 -1
- package/web.js +8 -8
- package/web.js.map +1 -1
- package/web.mjs +8 -8
package/node.mjs
CHANGED
@@ -208,6 +208,13 @@ var $;
|
|
208
208
|
return this.setUint32(offset, next, true), next;
|
209
209
|
$mol_fail(new Error(`Wrong uint32 value ${next}`));
|
210
210
|
}
|
211
|
+
int64(offset, next) {
|
212
|
+
if (next === undefined)
|
213
|
+
return this.getBigInt64(offset, true);
|
214
|
+
if (next >= -(2n ** 63n) && next < 2n ** 63n)
|
215
|
+
return this.setBigInt64(offset, next, true), next;
|
216
|
+
$mol_fail(new Error(`Wrong int64 value ${next}`));
|
217
|
+
}
|
211
218
|
uint48(offset, next) {
|
212
219
|
if (next === undefined)
|
213
220
|
return this.getUint48(offset, true);
|
@@ -215,17 +222,10 @@ var $;
|
|
215
222
|
return this.setUint48(offset, next, true), next;
|
216
223
|
$mol_fail(new Error(`Wrong uint48 value ${next}`));
|
217
224
|
}
|
218
|
-
int64(offset, next) {
|
219
|
-
if (next === undefined)
|
220
|
-
return this.getBigInt64(offset, true);
|
221
|
-
if (next >= -(2 ** 63) && next < 2 ** 63)
|
222
|
-
return this.setBigInt64(offset, next, true), next;
|
223
|
-
$mol_fail(new Error(`Wrong int64 value ${next}`));
|
224
|
-
}
|
225
225
|
uint64(offset, next) {
|
226
226
|
if (next === undefined)
|
227
227
|
return this.getBigUint64(offset, true);
|
228
|
-
if (next >=
|
228
|
+
if (next >= 0n && next < 2n ** 64n)
|
229
229
|
return this.setBigUint64(offset, next, true), next;
|
230
230
|
$mol_fail(new Error(`Wrong uint64 value ${next}`));
|
231
231
|
}
|
package/node.test.js
CHANGED
@@ -199,6 +199,13 @@ var $;
|
|
199
199
|
return this.setUint32(offset, next, true), next;
|
200
200
|
$mol_fail(new Error(`Wrong uint32 value ${next}`));
|
201
201
|
}
|
202
|
+
int64(offset, next) {
|
203
|
+
if (next === undefined)
|
204
|
+
return this.getBigInt64(offset, true);
|
205
|
+
if (next >= -(2n ** 63n) && next < 2n ** 63n)
|
206
|
+
return this.setBigInt64(offset, next, true), next;
|
207
|
+
$mol_fail(new Error(`Wrong int64 value ${next}`));
|
208
|
+
}
|
202
209
|
uint48(offset, next) {
|
203
210
|
if (next === undefined)
|
204
211
|
return this.getUint48(offset, true);
|
@@ -206,17 +213,10 @@ var $;
|
|
206
213
|
return this.setUint48(offset, next, true), next;
|
207
214
|
$mol_fail(new Error(`Wrong uint48 value ${next}`));
|
208
215
|
}
|
209
|
-
int64(offset, next) {
|
210
|
-
if (next === undefined)
|
211
|
-
return this.getBigInt64(offset, true);
|
212
|
-
if (next >= -(2 ** 63) && next < 2 ** 63)
|
213
|
-
return this.setBigInt64(offset, next, true), next;
|
214
|
-
$mol_fail(new Error(`Wrong int64 value ${next}`));
|
215
|
-
}
|
216
216
|
uint64(offset, next) {
|
217
217
|
if (next === undefined)
|
218
218
|
return this.getBigUint64(offset, true);
|
219
|
-
if (next >=
|
219
|
+
if (next >= 0n && next < 2n ** 64n)
|
220
220
|
return this.setBigUint64(offset, next, true), next;
|
221
221
|
$mol_fail(new Error(`Wrong uint64 value ${next}`));
|
222
222
|
}
|