KASPA WASM32 SDK
WASM32 API bindings for the Kaspa Rust infrastructure
Download
The current official release of WASM SDK is available for download from the Rusty Kaspa Releases page
General overview of the WASM SDK can be found in the WASM SDK README
Always make sure that you are using a matching versions of Rusty Kaspa and WASM SDK.
Development releases (below) offer the latest features and are generally stable. If your application requires a high level of security, it is recommended to use the official release from GitHub or build from source. Avoid using NPM modules if your application requires a high level of security.
Documentation
Please note that documentation is a work-in-progress and is not yet complete (with exception of TypeDoc and RustDoc that are built from source). You can find help on Discord#development.
- TypeDoc (TypeScript): https://kaspa.aspectron.org/docs/
- WASM SDK integration guide (Currently outdated but contains useful information for low-level integrations): https://kaspa.aspectron.org
- RustDoc (Full Kaspa SDK): https://docs.rs/kaspa-wasm/latest/kaspa-wasm/
- RustDoc (Wallet SDK): https://docs.rs/kaspa-wasm/latest/kaspa-wallet-core/
Please note that latest TypeDoc builds are generated from development builds (below).
JavaScript and TypeScript Examples
WASM SDK examples can be found at https://github.com/kaspanet/rusty-kaspa/tree/master/wasm/examples.
This folder contains examples for both NodeJS and Web applications. Examples are also included in the WASM SDK release.
Key examples:
- Using RPC
- Mnemonics and private key seeds
- Get balance by address
- Key derivation
- Kaspa addresses
- DAA Score subscription
- Sending and receiving transactions
- Interfacing with the Wallet runtime
Wallet runtime is a module that provides a high-level interface for opening and interacting with Kaspa wallets created using the Wallet API in both Rust and WASM SDKs. Wallet runtime provides wallet interoperability among applications that use it (such as Kaspa CLI and Kaspa NG).
Please refer to Running Web Examples section in the WASM SDK README for instructions on running these examples inside of a web browser.
Build from source
- Follow the instructions in https://github.com/kaspanet/rusty-kaspa README.md file
- Build WASM binaries by running
build-web
orbuild-node
in the/wasm
folder of the Rusty Kaspa repository (kaspa-wasm
crate);
Development Builds
The following builds are staged from branches with ongoing development and are generally stable with exceptions to the newly introduced features.
The current working branch for these builds is https://github.com/aspectron/rusty-kaspa/tree/typescript
Building from source, examples, and additional WASM SDK information can be found in the WASM SDK README
Releases
- rusty-kaspa-wasm32-sdk-latest.zip
- older releases ...
- TypeDoc (TypeScript): https://kaspa.aspectron.org/docs/