mirror of
https://github.com/HerodotusDev/pedersen-wasm.git
synced 2026-05-22 13:06:21 +00:00
No description
- Rust 83.5%
- TypeScript 16.5%
| src | ||
| .gitignore | ||
| benchmark.ts | ||
| Cargo.toml | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| rust-toolchain.toml | ||
| tsconfig.json | ||
| yarn.lock | ||
Pedersen Hash
This library exposes the following functions:
pub fn pedersen(x: &str, y: &str) -> String: Geometry version.
pub fn starknet_pedersen(x: Vec<u8>, y: Vec<u8>) -> String: Starknet reference implementation
pub fn starknet_pedersen_cairo(x: Vec<u8>, y: Vec<u8>) -> String: Cairo output format of starknet_pedersen.
Note: pedersen output is padded to 32 bytes. If an hex string is passed to it, it's expected to be big endian. Otherwise, all inputs are little-endian.
Building pkg
$> wasm-pack build --target nodejs --release
Running the benchmark
$> ts-node benchmark.ts