Open sourceMIT or Apache-2.0v0.1
Everything that touches a token is public.
The ledger, the server, replication, the SDKs and the command line live in one repository, under MIT or Apache-2.0 at your option.
Eight crates and a package.
One Rust workspace and a TypeScript package, built and tested together. Each stamp opens its folder on GitHub.
- 01 · Rust
worglThe library: ledger, note format, transfer protocol, policy, issuer state machine and crash-safe storage.
crates/worgl/ - 02 · Rust
worgl-serverAn HTTP server that hosts many mints side by side, alone or as a three-member cluster.
crates/worgl-server/ - 03 · Rust
worgl-raftRaft replication for each mint, plus a registry of the cluster's mints.
crates/worgl-raft/ - 04 · Rust
worgl-sdkThe holder's side: requests, pays, receives and refreshes notes while keeping the privacy rules.
crates/worgl-sdk/ - 05 · Rust
worgl-clientTyped calls for every route, and a purse that saves itself.
crates/worgl-client/ - 06 · Rust
worgl-cli
crates/worgl-cli/worgl, a command-line purse in a passphrase-encrypted file. - 07 · Rust
worgl-faucetHands out notes of a playground mint to anyone who asks, within limits per address and per day.
crates/worgl-faucet/ - 08 · Rust
worgl-wasm
crates/worgl-wasm/worgl-sdkcompiled to WebAssembly. - 09 · TypeScript
TypeScript SDKA client and purse on the same core, for Node and browsers.
sdk/typescript/
Get it from crates.io.
The libraries, the server and the worgl command are on crates.io. Nothing is on npm yet, so build the TypeScript package from sdk/typescript.
# Rust: add the client to a project, or install the command $ cargo add worgl-client $ cargo install worgl-cli # TypeScript: build the package. It needs the wasm32 target # and wasm-bindgen-cli; sdk/typescript/README.md has the steps. $ git clone https://github.com/zhangheqi/worgl $ cd worgl/sdk/typescript && npm ci && npm run build
Tested on every change.
What the tests hold it toEach links to its test
- 01Pay a note twice at once, and one payment wins.crates/worgl-server/tests/http.rs
- 02Alter any byte of a note, and it is refused.crates/worgl/tests/properties.rs
- 03A payment moves its exact amount, or nothing.crates/worgl-sdk/tests/payments.rs
- 04Stop the leader, and another takes over.crates/worgl-server/tests/cluster.rs
Security
Report a vulnerability privately through GitHub, not in a public issue.
Contributing
CI runs rustfmt, clippy, the tests on Linux and macOS, the minimum Rust version (1.89), the docs, the lifecycle example, the TypeScript SDK against a real server and the playground deploy on every pull request. Commit messages follow Conventional Commits. CI workflow
- rustfmt
- clippy
- tests on Linux
- tests on macOS
- Rust 1.89
- docs
- lifecycle example
- TypeScript SDK
- playground deploy