@quantovainc/qcore 0.4.0 → 0.4.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/package.json +1 -1
- package/pkg/package.json +1 -1
- package/pkg/qcore_js_bg.wasm +0 -0
- package/pkg-node/package.json +1 -1
- package/pkg-node/qcore_js_bg.wasm +0 -0
- package/shared.js +2 -0
- package/shared.mjs +2 -0
package/package.json
CHANGED
package/pkg/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "qcore-js",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "The JavaScript binding for the Quantova client core, generated over QCore with wasm-bindgen. The core does the key derivation, the post quantum signing, and the wire, the page does the fetch.",
|
|
5
|
-
"version": "0.4.
|
|
5
|
+
"version": "0.4.1",
|
|
6
6
|
"license": "Apache-2.0 OR MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
package/pkg/qcore_js_bg.wasm
CHANGED
|
Binary file
|
package/pkg-node/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qcore-js",
|
|
3
3
|
"description": "The JavaScript binding for the Quantova client core, generated over QCore with wasm-bindgen. The core does the key derivation, the post quantum signing, and the wire, the page does the fetch.",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
Binary file
|
package/shared.js
CHANGED
|
@@ -29,6 +29,7 @@ function accountNonce(nonce) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
const VALIDITY_BLOCKS = 300n;
|
|
32
|
+
const ORDER_HOLD_UNTIL = 1n << 62n;
|
|
32
33
|
const MAX_PLAUSIBLE_HEAD = 1n << 40n;
|
|
33
34
|
const HEAD_BLOCKS_PER_SEC = 4n;
|
|
34
35
|
const HEAD_SLACK_SECS = 60n;
|
|
@@ -613,6 +614,7 @@ function makeClient(core) {
|
|
|
613
614
|
const signed = JSON.parse(
|
|
614
615
|
core.sign_call(callerSeedHex, accountIndex(callerIndex), contract, order.call_args, accountNonceUsed, meterLimitOf(meterLimit), String(fee), chainId, until, String(transferFee))
|
|
615
616
|
);
|
|
617
|
+
this._guardSigned(orderKey, nonce, order.call_args, ORDER_HOLD_UNTIL, expectedOrderNonce != null);
|
|
616
618
|
this._guardSigned(from, accountNonceUsed, signed.tx_hex, until, expectedNonce != null);
|
|
617
619
|
const outcome = await this.submit(signed.tx_hex);
|
|
618
620
|
this._remember(from, accountNonceUsed, outcome);
|
package/shared.mjs
CHANGED
|
@@ -29,6 +29,7 @@ function accountNonce(nonce) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
const VALIDITY_BLOCKS = 300n;
|
|
32
|
+
const ORDER_HOLD_UNTIL = 1n << 62n;
|
|
32
33
|
const MAX_PLAUSIBLE_HEAD = 1n << 40n;
|
|
33
34
|
const HEAD_BLOCKS_PER_SEC = 4n;
|
|
34
35
|
const HEAD_SLACK_SECS = 60n;
|
|
@@ -613,6 +614,7 @@ function makeClient(core) {
|
|
|
613
614
|
const signed = JSON.parse(
|
|
614
615
|
core.sign_call(callerSeedHex, accountIndex(callerIndex), contract, order.call_args, accountNonceUsed, meterLimitOf(meterLimit), String(fee), chainId, until, String(transferFee))
|
|
615
616
|
);
|
|
617
|
+
this._guardSigned(orderKey, nonce, order.call_args, ORDER_HOLD_UNTIL, expectedOrderNonce != null);
|
|
616
618
|
this._guardSigned(from, accountNonceUsed, signed.tx_hex, until, expectedNonce != null);
|
|
617
619
|
const outcome = await this.submit(signed.tx_hex);
|
|
618
620
|
this._remember(from, accountNonceUsed, outcome);
|