SDK for the Dusk blockchain. Manage profiles and balances, create and sign transactions, interact with contracts, and fetch chain data. Works in Deno, and modern browsers.
w3sper SDK
w3sper is a JavaScript library designed to enhance secure and private
communication within the Dusk Network ecosystem. With w3sper, developers can
integrate privacy-focused blockchain features seamlessly into web applications,
harnessing the power of the Dusk Network’s privacy-centric technology.
Key Features
- Address & Account Management: Easily create and manage profiles for both public accounts and shielded addresses, supporting secure and private identity handling.
- Balance & Transaction Management: Access account balances, transfer tokens between shielded addresses and public accounts, create and sign transactions, and manage gas efficiently.
- Offline Transaction Creation: Generate signed transactions offline for public accounts, enabling secure transaction handling without an internet connection.
- Event Subscription: Subscribe to network and contract events in real time, allowing seamless access to blockchain updates.
- Contract Interactions: Query contract states and create custom transactions for contract interactions, making decentralized application development more flexible.
- Proof Management: Generate and delegate cryptographic proofs for enhanced privacy and security.
Installation
To install the w3sper SDK, run the following command:
deno add jsr:@dusk/w3sper
Installation
Development
To set up w3sper locally, follow these steps:
Prerequisites
Make sure you have the following dependencies installed:
- Deno
- Rust and Cargo for wallet-core compilation
Compilation Steps
Compile wallet-core WASM
The wasm task is used to compile the WASM module from wallet-core. Run the
following command:
deno task wasm
Prepare the local node state
The state task initializes the required state for running a local Dusk node.
Run:
deno task state
Start the local node
Use the rusk task to start the local Dusk node:
deno task rusk
Run tests
Execute the tests to verify everything is working as expected:
deno task test
License
This project is licensed under the the Mozilla Public License Version 2.0.
Add Package
deno add jsr:@dusk/w3sper
Import symbol
import * as w_sper from "@dusk/w3sper";
Import directly with a jsr specifier
import * as w_sper from "jsr:@dusk/w3sper";
Add Package
pnpm i jsr:@dusk/w3sper
pnpm dlx jsr add @dusk/w3sper
Import symbol
import * as w_sper from "@dusk/w3sper";
Add Package
yarn add jsr:@dusk/w3sper
yarn dlx jsr add @dusk/w3sper
Import symbol
import * as w_sper from "@dusk/w3sper";
Add Package
vlt install jsr:@dusk/w3sper
Import symbol
import * as w_sper from "@dusk/w3sper";
Add Package
npx jsr add @dusk/w3sper
Import symbol
import * as w_sper from "@dusk/w3sper";
Add Package
bunx jsr add @dusk/w3sper
Import symbol
import * as w_sper from "@dusk/w3sper";