Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41c7af32c9 | ||
|
|
68d698502d | ||
|
|
3d4a87af6a | ||
|
|
77b1e338cf | ||
|
|
3af17400ba | ||
|
|
e16029776f | ||
|
|
61624a627b | ||
|
|
c964570806 | ||
|
|
f32846d41b | ||
|
|
705b08765b | ||
|
|
4f6771e758 | ||
|
|
731dee91e4 | ||
|
|
b82e28ad4e | ||
|
|
6d5b3f5404 | ||
|
|
1f643dd705 | ||
|
|
af9491f7fd | ||
|
|
7377da8e7e | ||
|
|
32fa12c3fa | ||
|
|
6aabb2f869 | ||
|
|
0edb0289a9 | ||
|
|
004996d772 | ||
|
|
7611fd1788 | ||
|
|
e4f85e2358 | ||
|
|
6c5e7deaa5 | ||
|
|
1f024c1da0 | ||
|
|
26b6cf843a | ||
|
|
8e54efe4a5 | ||
|
|
daecf47197 | ||
|
|
6f5ed67aad | ||
|
|
8556566c1d |
@@ -1,5 +1,19 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 7.3.2 Dec 6, 2023
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Apply fixes for OOB array access
|
||||||
|
|
||||||
|
|
||||||
|
## 7.3.1 Nov 17, 2023
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Drop support for Node 16 (EOL 11 Sep 2023)
|
||||||
|
|
||||||
|
|
||||||
## 7.2.2 Aug 17, 2023
|
## 7.2.2 Aug 17, 2023
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
597 Jaco 7.2.2 (#535)
|
612 Jaco 7.3.2 (#553)
|
||||||
1 Evgeny Fixed type (#121)
|
1 Evgeny Fixed type (#121)
|
||||||
1 Shunfan Zhou Support sr25519 agreement (#209)
|
1 Shunfan Zhou Support sr25519 agreement (#209)
|
||||||
1 Steve Degosserie Expose Schnorrkel's VRF capabilities (#170)
|
1 Steve Degosserie Expose Schnorrkel's VRF capabilities (#170)
|
||||||
|
|||||||
+8
-9
@@ -14,10 +14,10 @@
|
|||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.2.2",
|
"version": "7.3.2",
|
||||||
"versions": {
|
"versions": {
|
||||||
"git": "7.2.2",
|
"git": "7.3.2",
|
||||||
"npm": "7.2.2"
|
"npm": "7.3.2"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
@@ -25,7 +25,6 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "yarn build:wasm",
|
"build": "yarn build:wasm",
|
||||||
"build:js": "./scripts/build-js.sh",
|
"build:js": "./scripts/build-js.sh",
|
||||||
"build:mac": "PATH=\"/opt/homebrew/opt/llvm/bin:$PATH\" CC=/opt/homebrew/opt/llvm/bin/clang AR=/opt/homebrew/opt/llvm/bin/llvm-ar yarn build",
|
|
||||||
"build:release": "polkadot-ci-ghact-build",
|
"build:release": "polkadot-ci-ghact-build",
|
||||||
"build:rollup": "polkadot-exec-rollup --config",
|
"build:rollup": "polkadot-exec-rollup --config",
|
||||||
"build:wasm": "./scripts/build.sh",
|
"build:wasm": "./scripts/build.sh",
|
||||||
@@ -44,12 +43,12 @@
|
|||||||
"test:wasm-crypto:rust": "cd packages/wasm-crypto && RUST_BACKTRACE=full cargo test --release -- --test-threads=1 --nocapture"
|
"test:wasm-crypto:rust": "cd packages/wasm-crypto && RUST_BACKTRACE=full cargo test --release -- --test-threads=1 --nocapture"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/dev": "^0.76.15",
|
"@polkadot/dev": "^0.77.1",
|
||||||
"@polkadot/util": "^12.3.2",
|
"@polkadot/util": "^12.6.1",
|
||||||
"@types/node": "^20.5.0",
|
"@types/node": "^20.9.1",
|
||||||
"fflate": "^0.8.0"
|
"fflate": "^0.8.1"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"typescript": "^5.1.6"
|
"typescript": "^5.2.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"bugs": "https://github.com/polkadot-js/wasm/issues",
|
"bugs": "https://github.com/polkadot-js/wasm/issues",
|
||||||
"description": "A bridge layer between JS and Wasm",
|
"description": "A bridge layer between JS and Wasm",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=18"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/polkadot-js/wasm/tree/master/packages/wasm-bridge#readme",
|
"homepage": "https://github.com/polkadot-js/wasm/tree/master/packages/wasm-bridge#readme",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -18,15 +18,15 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.2.2",
|
"version": "7.3.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@polkadot/wasm-util": "7.2.2",
|
"@polkadot/wasm-util": "7.3.2",
|
||||||
"tslib": "^2.6.1"
|
"tslib": "^2.6.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/util": "^12.3.2",
|
"@polkadot/util": "^12.6.1",
|
||||||
"@polkadot/x-randomvalues": "^12.3.2"
|
"@polkadot/x-randomvalues": "^12.6.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@polkadot/util": "*",
|
"@polkadot/util": "*",
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/wasm-bridge', path: 'auto', type: 'auto', version: '7.2.2' };
|
export const packageInfo = { name: '@polkadot/wasm-bridge', path: 'auto', type: 'auto', version: '7.3.2' };
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"bugs": "https://github.com/polkadot-js/wasm/issues",
|
"bugs": "https://github.com/polkadot-js/wasm/issues",
|
||||||
"description": "Asm.js content for wasm-crypto",
|
"description": "Asm.js content for wasm-crypto",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=18"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/polkadot-js/wasm/tree/master/packages/wasm-crypto-asmjs#readme",
|
"homepage": "https://github.com/polkadot-js/wasm/tree/master/packages/wasm-crypto-asmjs#readme",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -15,13 +15,13 @@
|
|||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.2.2",
|
"version": "7.3.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.6.1"
|
"tslib": "^2.6.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/util": "^12.3.2"
|
"@polkadot/util": "^12.6.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@polkadot/util": "*"
|
"@polkadot/util": "*"
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/wasm-crypto-asmjs', path: 'auto', type: 'auto', version: '7.2.2' };
|
export const packageInfo = { name: '@polkadot/wasm-crypto-asmjs', path: 'auto', type: 'auto', version: '7.3.2' };
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"bugs": "https://github.com/polkadot-js/wasm/issues",
|
"bugs": "https://github.com/polkadot-js/wasm/issues",
|
||||||
"description": "Init handlers for wasm-crypto",
|
"description": "Init handlers for wasm-crypto",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=18"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/polkadot-js/wasm/tree/master/packages/wasm-crypto-init#readme",
|
"homepage": "https://github.com/polkadot-js/wasm/tree/master/packages/wasm-crypto-init#readme",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -18,20 +18,20 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.2.2",
|
"version": "7.3.2",
|
||||||
"browser": "wasm.js",
|
"browser": "wasm.js",
|
||||||
"main": "wasm.js",
|
"main": "wasm.js",
|
||||||
"react-native": "asm.js",
|
"react-native": "asm.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@polkadot/wasm-bridge": "7.2.2",
|
"@polkadot/wasm-bridge": "7.3.2",
|
||||||
"@polkadot/wasm-crypto-asmjs": "7.2.2",
|
"@polkadot/wasm-crypto-asmjs": "7.3.2",
|
||||||
"@polkadot/wasm-crypto-wasm": "7.2.2",
|
"@polkadot/wasm-crypto-wasm": "7.3.2",
|
||||||
"@polkadot/wasm-util": "7.2.2",
|
"@polkadot/wasm-util": "7.3.2",
|
||||||
"tslib": "^2.6.1"
|
"tslib": "^2.6.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/util": "^12.3.2",
|
"@polkadot/util": "^12.6.1",
|
||||||
"@polkadot/x-randomvalues": "^12.3.2"
|
"@polkadot/x-randomvalues": "^12.6.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@polkadot/util": "*",
|
"@polkadot/util": "*",
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/wasm-crypto-init', path: 'auto', type: 'auto', version: '7.2.2' };
|
export const packageInfo = { name: '@polkadot/wasm-crypto-init', path: 'auto', type: 'auto', version: '7.3.2' };
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"bugs": "https://github.com/polkadot-js/wasm/issues",
|
"bugs": "https://github.com/polkadot-js/wasm/issues",
|
||||||
"description": "Wasm content for wasm-crypto",
|
"description": "Wasm content for wasm-crypto",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=18"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/polkadot-js/wasm/tree/master/packages/wasm-crypto-wasm#readme",
|
"homepage": "https://github.com/polkadot-js/wasm/tree/master/packages/wasm-crypto-wasm#readme",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -15,14 +15,14 @@
|
|||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.2.2",
|
"version": "7.3.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@polkadot/wasm-util": "7.2.2",
|
"@polkadot/wasm-util": "7.3.2",
|
||||||
"tslib": "^2.6.1"
|
"tslib": "^2.6.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/util": "^12.3.2"
|
"@polkadot/util": "^12.6.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@polkadot/util": "*"
|
"@polkadot/util": "*"
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/wasm-crypto-wasm', path: 'auto', type: 'auto', version: '7.2.2' };
|
export const packageInfo = { name: '@polkadot/wasm-crypto-wasm', path: 'auto', type: 'auto', version: '7.3.2' };
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"bugs": "https://github.com/polkadot-js/wasm/issues",
|
"bugs": "https://github.com/polkadot-js/wasm/issues",
|
||||||
"description": "A wasm interface layer for use by @polkadot/util-crypto",
|
"description": "A wasm interface layer for use by @polkadot/util-crypto",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=18"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/polkadot-js/wasm/tree/master/packages/wasm-crypto#readme",
|
"homepage": "https://github.com/polkadot-js/wasm/tree/master/packages/wasm-crypto#readme",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -26,19 +26,19 @@
|
|||||||
"./initWasmAsm.cjs"
|
"./initWasmAsm.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.2.2",
|
"version": "7.3.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@polkadot/wasm-bridge": "7.2.2",
|
"@polkadot/wasm-bridge": "7.3.2",
|
||||||
"@polkadot/wasm-crypto-asmjs": "7.2.2",
|
"@polkadot/wasm-crypto-asmjs": "7.3.2",
|
||||||
"@polkadot/wasm-crypto-init": "7.2.2",
|
"@polkadot/wasm-crypto-init": "7.3.2",
|
||||||
"@polkadot/wasm-crypto-wasm": "7.2.2",
|
"@polkadot/wasm-crypto-wasm": "7.3.2",
|
||||||
"@polkadot/wasm-util": "7.2.2",
|
"@polkadot/wasm-util": "7.3.2",
|
||||||
"tslib": "^2.6.1"
|
"tslib": "^2.6.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/util": "^12.3.2",
|
"@polkadot/util": "^12.6.1",
|
||||||
"@polkadot/x-randomvalues": "^12.3.2"
|
"@polkadot/x-randomvalues": "^12.6.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@polkadot/util": "*",
|
"@polkadot/util": "*",
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/wasm-crypto', path: 'auto', type: 'auto', version: '7.2.2' };
|
export const packageInfo = { name: '@polkadot/wasm-crypto', path: 'auto', type: 'auto', version: '7.3.2' };
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"bugs": "https://github.com/polkadot-js/wasm/issues",
|
"bugs": "https://github.com/polkadot-js/wasm/issues",
|
||||||
"description": "Utilities used exclusively inside Wasm decoding",
|
"description": "Utilities used exclusively inside Wasm decoding",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=18"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/polkadot-js/wasm/tree/master/packages/wasm-util#readme",
|
"homepage": "https://github.com/polkadot-js/wasm/tree/master/packages/wasm-util#readme",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -18,13 +18,13 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "7.2.2",
|
"version": "7.3.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.6.1"
|
"tslib": "^2.6.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/util": "^12.3.2"
|
"@polkadot/util": "^12.6.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@polkadot/util": "*"
|
"@polkadot/util": "*"
|
||||||
|
|||||||
@@ -3,33 +3,33 @@
|
|||||||
|
|
||||||
// Use an array for our indexer - this is faster than using map access. In
|
// Use an array for our indexer - this is faster than using map access. In
|
||||||
// this case we assume ASCII-only inputs, so we cannot overflow the array
|
// this case we assume ASCII-only inputs, so we cannot overflow the array
|
||||||
const chr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
const CHR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' as const;
|
||||||
const map = new Array<number>(256);
|
const map = new Array<number>(256);
|
||||||
|
|
||||||
// We use charCodeAt for access here and in the decoder loop - this is faster
|
// We use charCodeAt for access here and in the decoder loop - this is faster
|
||||||
// on lookups (array + numbers) and also faster than accessing the specific
|
// on lookups (array + numbers) and also faster than accessing the specific
|
||||||
// character via data[i]
|
// character via data[i]
|
||||||
for (let i = 0, count = chr.length; i < count; i++) {
|
for (let i = 0, count = CHR.length; i < count; i++) {
|
||||||
map[chr.charCodeAt(i)] = i;
|
map[CHR.charCodeAt(i)] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name base64Decode
|
* @name base64Decode
|
||||||
* @description
|
* @description
|
||||||
* A base64Decoding function that operates in all environments. Unlike decoding
|
* A base64 decoding function that operates in all environments. Unlike decoding
|
||||||
* from Buffer (Node.js only) or atob (browser-only) this implementation is
|
* from Buffer (Node.js only) or atob (browser-only) this implementation is
|
||||||
* slightly slower, but it is platform independent.
|
* slightly slower, but it is platform independent.
|
||||||
*
|
*
|
||||||
* For our usage, since we have access to the static final size (where used), we
|
* For our usage, since we have access to the static final size, so we decode
|
||||||
* decode to a specified output buffer. This also means we have applied a number
|
* to a specified output buffer. This also means we have applied a number of
|
||||||
* of optimizations based on this - checking output position instead of chars.
|
* optimizations based on this - checking output position instead of chars.
|
||||||
*/
|
*/
|
||||||
export function base64Decode (data: string, out: Uint8Array): Uint8Array {
|
export function base64Decode (data: string, out: Uint8Array): Uint8Array {
|
||||||
let byte = 0;
|
let byte = 0;
|
||||||
let bits = 0;
|
let bits = 0;
|
||||||
let pos = -1;
|
let pos = -1;
|
||||||
|
|
||||||
for (let i = 0, count = out.length; pos < count; i++) {
|
for (let i = 0, last = out.length - 1; pos !== last; i++) {
|
||||||
// each character represents 6 bits
|
// each character represents 6 bits
|
||||||
byte = (byte << 6) | map[data.charCodeAt(i)];
|
byte = (byte << 6) | map[data.charCodeAt(i)];
|
||||||
|
|
||||||
|
|||||||
@@ -92,10 +92,12 @@ const hMap = ((cd: Uint8Array, mb: number, r: 0 | 1) => {
|
|||||||
// u16 "map": index -> # of codes with bit length = index
|
// u16 "map": index -> # of codes with bit length = index
|
||||||
const l = new u16(mb);
|
const l = new u16(mb);
|
||||||
// length of cd must be 288 (total # of codes)
|
// length of cd must be 288 (total # of codes)
|
||||||
for (; i < s; ++i) ++l[cd[i] - 1];
|
for (; i < s; ++i) {
|
||||||
|
if (cd[i]) ++l[cd[i] - 1];
|
||||||
|
}
|
||||||
// u16 "map": index -> minimum code for bit length = index
|
// u16 "map": index -> minimum code for bit length = index
|
||||||
const le = new u16(mb);
|
const le = new u16(mb);
|
||||||
for (i = 0; i < mb; ++i) {
|
for (i = 1; i < mb; ++i) {
|
||||||
le[i] = (le[i - 1] + l[i - 1]) << 1;
|
le[i] = (le[i - 1] + l[i - 1]) << 1;
|
||||||
}
|
}
|
||||||
let co: Uint16Array;
|
let co: Uint16Array;
|
||||||
@@ -116,13 +118,17 @@ const hMap = ((cd: Uint8Array, mb: number, r: 0 | 1) => {
|
|||||||
// m is end value
|
// m is end value
|
||||||
for (const m = v | ((1 << r) - 1); v <= m; ++v) {
|
for (const m = v | ((1 << r) - 1); v <= m; ++v) {
|
||||||
// every 16 bit value starting with the code yields the same result
|
// every 16 bit value starting with the code yields the same result
|
||||||
co[rev[v] >>> rvb] = sv;
|
co[rev[v] >> rvb] = sv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
co = new u16(s);
|
co = new u16(s);
|
||||||
for (i = 0; i < s; ++i) co[i] = rev[le[cd[i] - 1]++] >>> (15 - cd[i]);
|
for (i = 0; i < s; ++i) {
|
||||||
|
if (cd[i]) {
|
||||||
|
co[i] = rev[le[cd[i] - 1]++] >> (15 - cd[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return co;
|
return co;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/wasm-util', path: 'auto', type: 'auto', version: '7.2.2' };
|
export const packageInfo = { name: '@polkadot/wasm-util', path: 'auto', type: 'auto', version: '7.3.2' };
|
||||||
|
|||||||
+13
-1
@@ -11,7 +11,19 @@ echo "*** Building JavaScript"
|
|||||||
echo "*** Building WASM"
|
echo "*** Building WASM"
|
||||||
cd packages
|
cd packages
|
||||||
|
|
||||||
PKG_NAME=wasm-crypto ../scripts/build-wasm.sh
|
unamestr=`uname`
|
||||||
|
|
||||||
|
# For Mac we set extra paths for clang
|
||||||
|
if [[ "$unamestr" == "Darwin" ]]; then
|
||||||
|
if [ ! -f "/opt/homebrew/opt/llvm/bin/clang" ]; then
|
||||||
|
echo "FATAL: Ensure you have clang installed via homebrew"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
PATH="/opt/homebrew/opt/llvm/bin:$PATH" CC=/opt/homebrew/opt/llvm/bin/clang AR=/opt/homebrew/opt/llvm/bin/llvm-ar PKG_NAME=wasm-crypto ../scripts/build-wasm.sh
|
||||||
|
else
|
||||||
|
PKG_NAME=wasm-crypto ../scripts/build-wasm.sh
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$WITH_DENO" ]; then
|
if [ -z "$WITH_DENO" ]; then
|
||||||
yarn test:wasm-crypto:js
|
yarn test:wasm-crypto:js
|
||||||
|
|||||||
Reference in New Issue
Block a user