@pezkuwi/wasm-crypto 7.5.8 → 7.5.10
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/LICENSE +201 -0
- package/bundle-pezkuwi-wasm-crypto.js +777 -0
- package/bundle.d.ts +37 -0
- package/bundle.js +165 -0
- package/cjs/bundle.d.ts +37 -0
- package/cjs/bundle.js +171 -0
- package/cjs/index.js +5 -0
- package/cjs/init.js +21 -0
- package/cjs/initNone.js +20 -0
- package/cjs/initOnlyAsm.js +20 -0
- package/cjs/initOnlyWasm.js +20 -0
- package/cjs/initWasmAsm.js +20 -0
- package/cjs/package.json +3 -0
- package/cjs/packageDetect.js +10 -0
- package/cjs/packageInfo.js +4 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/{src/init.ts → init.d.ts} +2 -11
- package/init.js +17 -0
- package/initNone.d.ts +10 -0
- package/{src/initNone.ts → initNone.js} +4 -10
- package/initOnlyAsm.d.ts +10 -0
- package/{src/initOnlyAsm.ts → initOnlyAsm.js} +4 -10
- package/initOnlyWasm.d.ts +10 -0
- package/{src/initOnlyWasm.ts → initOnlyWasm.js} +4 -10
- package/initWasmAsm.d.ts +10 -0
- package/{src/initWasmAsm.ts → initWasmAsm.js} +4 -10
- package/package.json +163 -17
- package/packageDetect.d.ts +1 -0
- package/{src/packageDetect.ts → packageDetect.js} +0 -8
- package/packageInfo.d.ts +6 -0
- package/packageInfo.js +1 -0
- package/Cargo.toml +0 -50
- package/Xargo.toml +0 -2
- package/build/bundle.d.ts +0 -37
- package/src/bundle.ts +0 -247
- package/src/index.ts +0 -6
- package/src/lib.rs +0 -24
- package/src/mod.ts +0 -4
- package/src/packageInfo.ts +0 -6
- package/src/rs/.editorconfig +0 -10
- package/src/rs/bip39.rs +0 -139
- package/src/rs/ed25519.rs +0 -142
- package/src/rs/hashing.rs +0 -322
- package/src/rs/secp256k1.rs +0 -150
- package/src/rs/sr25519.rs +0 -331
- package/src/rs/vrf.rs +0 -144
- package/test/all/bip39.js +0 -86
- package/test/all/ed25519.js +0 -84
- package/test/all/hashing.js +0 -138
- package/test/all/index.js +0 -126
- package/test/all/secp256k1.js +0 -105
- package/test/all/sr25519.js +0 -211
- package/test/all/vrf.js +0 -74
- package/test/asm.js +0 -10
- package/test/deno.ts +0 -37
- package/test/jest.spec.ts +0 -24
- package/test/loader-build.js +0 -39
- package/test/wasm.js +0 -8
- package/tsconfig.build.json +0 -19
- package/tsconfig.spec.json +0 -16
- /package/{build → cjs}/index.d.ts +0 -0
- /package/{build → cjs}/init.d.ts +0 -0
- /package/{build → cjs}/initNone.d.ts +0 -0
- /package/{build → cjs}/initOnlyAsm.d.ts +0 -0
- /package/{build → cjs}/initOnlyWasm.d.ts +0 -0
- /package/{build → cjs}/initWasmAsm.d.ts +0 -0
- /package/{build → cjs}/packageDetect.d.ts +0 -0
- /package/{build → cjs}/packageInfo.d.ts +0 -0
package/test/deno.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
// This is a Deno file, so we can allow .ts imports
|
|
5
|
-
/* eslint-disable import/extensions */
|
|
6
|
-
|
|
7
|
-
// NOTE We don't use ts-expect-error here since the build folder may or may
|
|
8
|
-
// not exist (so the error may or may not be there)
|
|
9
|
-
//
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
11
|
-
// @ts-ignore This should only run against the compiled ouput, where this should exist
|
|
12
|
-
import * as wasm from '../build-deno/mod.ts';
|
|
13
|
-
import { initRun, tests } from './all/index.js';
|
|
14
|
-
|
|
15
|
-
type Tests = Record<string, (wasm: unknown) => void>;
|
|
16
|
-
|
|
17
|
-
declare const globalThis: {
|
|
18
|
-
it: (name: string, fn: () => void) => unknown;
|
|
19
|
-
};
|
|
20
|
-
declare const Deno: {
|
|
21
|
-
test: (name: string, test: () => unknown) => unknown;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
await initRun('wasm', wasm);
|
|
25
|
-
|
|
26
|
-
// We use it to denote the tests
|
|
27
|
-
globalThis.it = (name: string, fn: () => void) => Deno.test(name, () => fn());
|
|
28
|
-
|
|
29
|
-
Object
|
|
30
|
-
.entries<Tests>(tests)
|
|
31
|
-
.forEach(([describeName, tests]) => {
|
|
32
|
-
console.log('***', describeName);
|
|
33
|
-
|
|
34
|
-
Object
|
|
35
|
-
.values(tests)
|
|
36
|
-
.forEach((test) => test(wasm));
|
|
37
|
-
});
|
package/test/jest.spec.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
/// <reference types="@pezkuwi/dev-test/globals.d.ts" />
|
|
5
|
-
|
|
6
|
-
// NOTE We don't use ts-expect-error here since the build folder may or may
|
|
7
|
-
// not exist (so the error may or may not be there)
|
|
8
|
-
//
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
10
|
-
// @ts-ignore This should only run against the compiled ouput, where this should exist
|
|
11
|
-
import * as wasm from '../build/index.js';
|
|
12
|
-
import { initRun, tests } from './all/index.js';
|
|
13
|
-
|
|
14
|
-
describe('wasm-crypto', (): void => {
|
|
15
|
-
beforeAll(() => initRun('wasm', wasm));
|
|
16
|
-
|
|
17
|
-
for (const name of Object.keys(tests)) {
|
|
18
|
-
describe(`${name}`, (): void => {
|
|
19
|
-
Object
|
|
20
|
-
.values<(wasm: unknown) => void>(tests[name as keyof typeof tests])
|
|
21
|
-
.forEach((fn) => fn(wasm));
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
});
|
package/test/loader-build.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import process from 'node:process';
|
|
6
|
-
import { pathToFileURL } from 'node:url';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Adjusts the resolver to point to the build output
|
|
10
|
-
*
|
|
11
|
-
* @param {*} specifier
|
|
12
|
-
* @param {*} context
|
|
13
|
-
* @param {*} nextResolve
|
|
14
|
-
* @returns {*}
|
|
15
|
-
*/
|
|
16
|
-
export function resolve (specifier, context, nextResolve) {
|
|
17
|
-
if (specifier.startsWith('@pezkuwi/wasm-')) {
|
|
18
|
-
const parts = specifier.split(/[\\/]/);
|
|
19
|
-
|
|
20
|
-
return {
|
|
21
|
-
format: 'module',
|
|
22
|
-
shortCircuit: true,
|
|
23
|
-
url: pathToFileURL(
|
|
24
|
-
path.join(
|
|
25
|
-
process.cwd(),
|
|
26
|
-
['packages', parts[1], 'build', ...parts.slice(2)]
|
|
27
|
-
.join('/')
|
|
28
|
-
.replace(/\/wasm-crypto-init\/build$/, '/wasm-crypto-init/build/wasm.js')
|
|
29
|
-
.replace(/\/wasm-crypto-init\/build\/asm$/, '/wasm-crypto-init/build/asm.js')
|
|
30
|
-
.replace(/\/wasm-crypto\/build\/initOnlyAsm$/, '/wasm-crypto/build/initOnlyAsm.js')
|
|
31
|
-
.replace(/\/build\/packageInfo$/, '/build/packageInfo.js')
|
|
32
|
-
.replace(/\/build$/, '/build/index.js')
|
|
33
|
-
)
|
|
34
|
-
).href
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return nextResolve(specifier, context);
|
|
39
|
-
}
|
package/test/wasm.js
DELETED
package/tsconfig.build.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"baseUrl": "..",
|
|
5
|
-
"outDir": "./build",
|
|
6
|
-
"rootDir": "./src"
|
|
7
|
-
},
|
|
8
|
-
"exclude": [
|
|
9
|
-
"**/mod.ts",
|
|
10
|
-
"**/test/**/*"
|
|
11
|
-
],
|
|
12
|
-
"references": [
|
|
13
|
-
{ "path": "../wasm-bridge/tsconfig.build.json" },
|
|
14
|
-
{ "path": "../wasm-crypto-init/tsconfig.build.json" },
|
|
15
|
-
{ "path": "../wasm-crypto-asmjs/tsconfig.build.json" },
|
|
16
|
-
{ "path": "../wasm-crypto-wasm/tsconfig.build.json" },
|
|
17
|
-
{ "path": "../wasm-util/tsconfig.build.json" }
|
|
18
|
-
]
|
|
19
|
-
}
|
package/tsconfig.spec.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"baseUrl": "..",
|
|
5
|
-
"outDir": "./build",
|
|
6
|
-
"rootDir": "./test",
|
|
7
|
-
"emitDeclarationOnly": false,
|
|
8
|
-
"noEmit": true
|
|
9
|
-
},
|
|
10
|
-
"include": [
|
|
11
|
-
"**/test/**/*"
|
|
12
|
-
],
|
|
13
|
-
"references": [
|
|
14
|
-
{ "path": "../wasm-crypto/tsconfig.build.json" }
|
|
15
|
-
]
|
|
16
|
-
}
|
|
File without changes
|
/package/{build → cjs}/init.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|