README.md
September 6, 2022 Β· View on GitHub
#TREX-Demo-Wallet-Rust-WebAssembly This repo provides WASM codes for decentralized timed-release encryption algorithms. This WASM code would be built into a package and run in browsers to support web applications.
π οΈ Build with wasm-pack build
wasm-pack build
π¬ Test in Headless Browsers with wasm-pack test
wasm-pack test --headless --firefox
π Publish to NPM with wasm-pack publish
wasm-pack publish
π Batteries Included
wasm-bindgenfor communicating between WebAssembly and JavaScript.console_error_panic_hookfor logging panic messages to the developer console.wee_alloc, an allocator optimized for small code size.
π Folder Description
- [
lib] wasm interface - [
elgamal] public_key & private_keyοΌencrypt with pubkey - [
elgamal_utils] some algorithms for generating public_key - [
mt_utils] mt19937 random Variant algorithm utils - [
tx_sign] sign tx with Sha256 & ecdsa - [
utils] system generate utils for panic! - [
wallet] Wallet core class, contain send_transaction function