yescrypt-wasm
Version:
WebAssembly module for Yescrypt
48 lines (47 loc) • 2.14 kB
JSON
{
"name": "yescrypt-wasm",
"version": "1.0.4",
"description": "WebAssembly module for Yescrypt",
"license": "BSD 2-Clause",
"author": "CPUchain",
"type": "module",
"main": "./lib/index.cjs",
"module": "./lib/index.js",
"browser": "./lib/yescrypt.umd.js",
"types": "./lib/index.d.ts",
"exports": {
".": {
"import": "./lib/index.js",
"require": "./lib/index.cjs",
"default": "./lib/index.js"
}
},
"keywords": [
"yescrypt",
"proof-of-work",
"hashing",
"wasm",
"webassembly"
],
"repository": {
"type": "git",
"url": "git+https://github.com/cpuchain/yescrypt-js.git"
},
"scripts": {
"lint": "eslint src/**/*.ts scripts/**/*.ts test/*.ts --ignore-pattern src/*.d.ts",
"build:wasm-bundle": "tsx scripts/bundle.ts",
"build:wasm-beautify": "js-beautify src/yescrypt_wasm.js -o src/yescrypt_wasm.js",
"build:wasm": "emcc ../yescrypt-c/yescrypt-opt.c ../yescrypt-c/yescrypt-common.c ../yescrypt-c/yescrypt.c ../yescrypt-c/sha256.c ../yescrypt-c/insecure_memzero.c -O3 -s WASM=1 -s MODULARIZE=1 -s EXPORTED_FUNCTIONS=\"['_scrypt_hash', '_yescrypt_hash', '_scrypt_kdf_wasm', '_yescrypt_kdf_wasm', '_yescrypt_kdf_full', '_yescrypt_hash_full_str', '_scrypt_hash_full', '_malloc', '_free']\" -s EXPORTED_RUNTIME_METHODS=\"['ccall', 'cwrap', 'UTF8ToString', 'HEAPU8']\" -s EXPORT_NAME=\"yescrypt_wasm\" -s EXPORT_ES6=\"1\" -s INITIAL_HEAP=\"33554432\" -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=2147483648 -s FILESYSTEM=0 -s ENVIRONMENT=\"web,worker,node\" -o src/yescrypt_wasm.js --emit-tsd yescrypt_wasm.d.ts && yarn build:wasm-beautify && yarn build:wasm-bundle",
"build": "tsc -p tsconfig.build.json --noEmit && rollup -c",
"bench": "node scripts/bench.js",
"test": "tsx --test"
},
"devDependencies": {
"@cpuchain/eslint": "^1.0.14",
"@cpuchain/rollup": "^1.0.13",
"@types/node": "^25.9.3",
"js-beautify": "^1.15.4",
"tsx": "^4.22.4",
"typescript": "^6.0.3"
}
}