Skip to content

Commit 0ef0386

Browse files
authored
Merge pull request #121 from dusk-network/docs/rusk-alignment
Align docs with rusk
2 parents 2a11238 + 8ec2702 commit 0ef0386

10 files changed

Lines changed: 64 additions & 66 deletions

File tree

src/content/docs/developer/integrations/exchanges.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ description: "Practical notes for listing DUSK: connectivity, deposits/withdrawa
88
- Decide how you'll access the network:
99
- Run your own node (recommended for production).
1010
- Use public endpoints (good for prototyping).
11-
- Run (or use) an archive node if you need address-based history queries.
11+
- Run (or use) an archive node if you need address-based history queries such as `fullMoonlightHistory` or `moonlightHistory`.
1212
- Support Moonlight (public) deposits and withdrawals.
1313
- Handle finality and reverts: treat funds as final once the containing block is `finalized`, and re-process if a block is reverted.
1414
- Use the memo field if you need per-user tagging.
1515

16+
:::tip[Use W3sper for Transaction Submission]
17+
For transaction construction, signing, and submission, prefer the [W3sper SDK](/developer/integrations/w3sper). Use raw HTTP endpoints only if you are building lower-level infrastructure around RUES.
18+
:::
19+
1620
## Network Access
1721

1822
Base URLs:
@@ -30,7 +34,7 @@ For the full HTTP/WS API and event subscription model (RUES), see [/developer/in
3034

3135
Two common approaches:
3236

33-
- **Archive GraphQL (simplest):** poll `fullMoonlightHistory` or `moonlightHistory`. See [/developer/integrations/historical_events](/developer/integrations/historical_events).
37+
- **Archive GraphQL (simplest):** poll `fullMoonlightHistory` or `moonlightHistory` on an archive-enabled node. See [/developer/integrations/historical_events](/developer/integrations/historical_events).
3438
- **Real-time (RUES):** subscribe to blocks/transactions and correlate with GraphQL `tx(hash: ...)` lookups.
3539

3640
## Submitting Withdrawals

src/content/docs/developer/integrations/historical_events.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ description: Documentation on the access to blockchain transaction history for p
55

66
## Overview
77

8-
The GraphQL API provides access to finalized historical blockchain transaction-events, involving public (Moonlight) `DUSK` value transfers. It includes two primary endpoints:
8+
These queries are **archive-only**. You need an archive-enabled node, or a public archive endpoint, to use them. On a non-archive node they are unavailable.
9+
10+
The archive GraphQL API provides access to finalized historical blockchain transaction-events involving public (Moonlight) `DUSK` value transfers. It includes two primary endpoints:
911

1012
1. `moonlightHistory`
1113
2. `fullMoonlightHistory`

src/content/docs/developer/integrations/http-api.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ title: HTTP API
33
description: Query nodes, broadcast transactions, and subscribe to real-time events using RUES over HTTP and WebSocket.
44
---
55

6+
:::tip[Prefer W3sper First]
7+
For application integrations, prefer the [W3sper SDK](/developer/integrations/w3sper). It wraps transaction building, proving, submission, and common node interactions.
8+
:::
9+
610
The <a href="https://github.com/dusk-network/rusk/wiki/RUES-%28Rusk-Universal-Event-System%29" target="_blank"><strong>Rusk Universal Event System (RUES)</strong></a> is the public interface exposed by Dusk nodes.
711

12+
This page covers the common low-level HTTP and WebSocket surface. Treat it as an implementation guide, not as a frozen protocol spec.
13+
814
- Use **HTTP `POST`** for request/response calls (query node state, submit transactions, generate proofs, etc.).
915
- Use **WebSocket + HTTP `GET`/`DELETE`** for real-time event subscriptions.
1016

@@ -52,6 +58,10 @@ If the requested version is incompatible, the node rejects the request.
5258
**Method**: `POST`
5359
**Body**: a GraphQL query string.
5460

61+
:::note
62+
Archive-only GraphQL fields such as `moonlightHistory`, `fullMoonlightHistory`, and `finalizedEvents` require an archive-enabled node.
63+
:::
64+
5565
### Get the schema (SDL)
5666

5767
Send an empty body to retrieve the schema:
@@ -257,5 +267,5 @@ Events are sent as WebSocket **binary messages**:
257267
2. JSON header bytes (includes `Content-Location`).
258268
3. Raw event data bytes (format depends on the event).
259269

260-
If you need historical data (archive), use GraphQL queries such as `moonlightHistory` and `finalizedEvents`.
270+
If you need historical data, use an archive-enabled node and GraphQL queries such as `moonlightHistory`, `fullMoonlightHistory`, and `finalizedEvents`.
261271
See: [Retrieve historical events](/developer/integrations/historical_events).

src/content/docs/developer/integrations/w3sper.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ title: W3sper SDK
33
description: JavaScript SDK for generating profiles, building transactions, and querying Dusk nodes.
44
---
55

6-
W3sper (`@dusk/w3sper`) is the JavaScript SDK used by Dusk apps and tooling to interact with nodes.
6+
W3sper (`@dusk/w3sper`) is the JavaScript SDK used by Dusk apps and tooling to interact with nodes. Prefer it over calling raw RUES endpoints directly from application code.
77

88
## Install
99

1010
```sh
11-
npm install @dusk/w3sper
11+
deno add jsr:@dusk/w3sper
1212
```
1313

1414
## Connect
@@ -75,15 +75,17 @@ console.log(tip.block.header);
7575

7676
## Offline Mode (Optional)
7777

78-
When you call `Network.connect(...)`, W3sper loads the wallet-core WASM driver from the node (`/static/drivers/`).
79-
For offline usage, load the driver yourself:
78+
When you call `Network.connect(...)`, W3sper loads the matching `wallet-core` WASM driver from the node.
79+
For the current 1.6 line, that driver is served as `wallet-core-1.6.0.wasm`.
80+
81+
For offline usage, download that same versioned driver and load it yourself:
8082

8183
```js
8284
import { ProfileGenerator, useAsProtocolDriver } from "@dusk/w3sper";
8385

8486
async function getLocalWasmBuffer() {
8587
// Must return bytes (Uint8Array/ArrayBuffer). Adjust to your environment.
86-
return Deno.readFile("./wallet-core.wasm");
88+
return Deno.readFile("./wallet-core-1.6.0.wasm");
8789
}
8890

8991
const seeder = () => crypto.getRandomValues(new Uint8Array(64));
@@ -97,8 +99,8 @@ await useAsProtocolDriver(await getLocalWasmBuffer()).then(async () => {
9799

98100
WASM download URLs:
99101

100-
- Mainnet: `https://nodes.dusk.network/static/drivers/wallet-core.wasm`
101-
- Testnet: `https://testnet.nodes.dusk.network/static/drivers/wallet-core.wasm`
102+
- Mainnet: `https://nodes.dusk.network/static/drivers/wallet-core-1.6.0.wasm`
103+
- Testnet: `https://testnet.nodes.dusk.network/static/drivers/wallet-core-1.6.0.wasm`
102104

103105
## Units
104106

src/content/docs/learn/glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Accounts in Dusk manage transactions with different visibility levels. An accoun
1111

1212
#### Archive Node
1313

14-
An [archive node](/operator/archive-node) stores the full historical record of the Dusk blockchain and does not participate in consensus.
14+
An [archive node](/operator/archive-node) stores the full historical record of the Dusk blockchain and exposes archive-specific historical queries. Archive mode can also participate in consensus because it extends the regular node stack rather than replacing it.
1515

1616
#### Citadel
1717

src/content/docs/learn/hyperstaking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Stake abstraction requires contracts to interact with the genesis **Stake Contra
4444
- Transfer contract source:
4545
<a href="https://raw.githubusercontent.com/dusk-network/contracts/main/genesis/transfer/src/state.rs" target="_blank" rel="noreferrer">genesis/transfer</a>
4646
- Example implementation:
47-
<a href="https://raw.githubusercontent.com/dusk-network/rusk/refs/heads/master/contracts/charlie/src/state.rs" target="_blank" rel="noreferrer">rusk/contracts/charlie</a>
47+
<a href="https://raw.githubusercontent.com/dusk-network/rusk/refs/heads/master/contracts/tests/charlie/src/state.rs" target="_blank" rel="noreferrer">rusk/contracts/tests/charlie</a>
4848

4949
### Required Stake Contract calls
5050

src/content/docs/learn/rusk-wallet.md

Lines changed: 21 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@ description: "The official CLI wallet for Dusk: scripting, staking, and operator
77

88
If you prefer a UI for everyday transfers, use the [Web Wallet](/learn/web-wallet).
99

10+
Use these as the source of truth for your installed version:
11+
12+
- The upstream CLI reference:
13+
<a href="https://github.com/dusk-network/rusk/blob/master/rusk-wallet/src/bin/README.md" target="_blank" rel="noreferrer">rusk-wallet/src/bin/README.md</a>
14+
- The current releases:
15+
<a href="https://github.com/dusk-network/rusk/releases?q=rusk+wallet&expanded=true" target="_blank" rel="noreferrer">Rusk releases</a>
16+
- Your local help output:
17+
`rusk-wallet --help` and `rusk-wallet <command> --help`
18+
1019
## Install
1120

12-
- Download a prebuilt binary from the <a href="https://github.com/dusk-network/rusk/releases?q=rusk+wallet&expanded=true" target="_blank" rel="noreferrer">Rusk releases page</a>.
21+
- Download a prebuilt binary from the releases page.
1322
- Or build from source from the <a href="https://github.com/dusk-network/rusk" target="_blank" rel="noreferrer">rusk repo</a>.
1423

1524
## Usage
@@ -33,61 +42,27 @@ rusk-wallet --help
3342
rusk-wallet <command> --help
3443
```
3544

36-
The full CLI command reference lives in the upstream README:
37-
<a href="https://github.com/dusk-network/rusk/blob/master/rusk-wallet/src/bin/README.md" target="_blank" rel="noreferrer">rusk-wallet/src/bin/README.md</a>.
38-
39-
## Common tasks
40-
41-
### Create or restore a wallet
42-
43-
```bash
44-
rusk-wallet create
45-
```
46-
47-
```bash
48-
rusk-wallet restore
49-
```
45+
## Non-interactive use (automation)
5046

51-
### Check balance
47+
Most commands prompt for a wallet password when they need to decrypt secrets. For automation, you can provide it via `RUSK_WALLET_PWD`:
5248

5349
```bash
50+
export RUSK_WALLET_PWD=<your_password>
5451
rusk-wallet balance
5552
```
5653

57-
### Transfer funds
58-
59-
Use the built-in help for the exact flags:
54+
For exporting provisioner keys in headless environments:
6055

6156
```bash
62-
rusk-wallet transfer --help
57+
export RUSK_WALLET_EXPORT_PWD=<export_password>
6358
```
6459

65-
### Stake (owner key optional)
66-
67-
A Dusk stake has two roles:
68-
69-
- **Consensus key**: used to participate in consensus.
70-
- **Owner key**: the address that can `unstake` and `withdraw`.
71-
72-
If you don't specify `--owner`, the consensus key is also the owner.
73-
74-
```bash
75-
# Stake with the default owner (consensus key)
76-
rusk-wallet stake --amt 1000
77-
78-
# Stake with a separate owner address
79-
rusk-wallet stake --amt 1000 --owner <OWNER_ADDRESS>
80-
```
81-
82-
For the node-operator flow (exporting consensus keys, staking, and monitoring with `stake-info`), follow: [Wallet setup](/operator/guides/node-wallet-setup).
83-
84-
## Non-interactive use (automation)
60+
Only do this in controlled environments, and be careful not to leak passwords via shell history, logs, or CI output.
8561

86-
Most commands prompt for a wallet password when they need to decrypt secrets. For automation, you can provide it via `RUSK_WALLET_PWD`:
62+
## Operator workflows
8763

88-
```bash
89-
export RUSK_WALLET_PWD=<your_password>
90-
rusk-wallet balance
91-
```
64+
If you are using the wallet for provisioner or archive-node operations, see:
9265

93-
Only do this in controlled environments, and be careful not to leak passwords via shell history, logs, or CI output.
66+
- [Node wallet setup](/operator/guides/node-wallet-setup)
67+
- [Provisioner node](/operator/provisioner)
68+
- [Archive node](/operator/archive-node)

src/content/docs/operator/archive-node.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ title: Run an archive node
33
description: Learn about Dusk archive nodes that store and give access to Dusk’s historical data.
44
---
55

6-
Archive nodes extend the functionality of [Provisioners](/operator/provisioner) by also preserving a complete historical record of the Dusk blockchain. While Provisioners are focused solely on the current state, archive nodes provide essential long-term data access that supports applications, users, researchers, and auditors who need comprehensive historical information.
6+
Archive nodes extend the functionality of [Provisioners](/operator/provisioner) by also preserving a complete historical record of the Dusk blockchain. While provisioners focus on the current state and consensus duties, archive mode adds long-term historical data access for applications, users, researchers, and auditors.
77

8-
Archive nodes play a unique role in the Dusk Network by focusing on data storage and accessibility, rather than participating in consensus. This means they are not required to stake DUSK, as they serve an entirely supportive function for dApps and services that rely on historical records.
8+
Archive nodes are commonly run as data-serving infrastructure and do not need to stake DUSK. However, archive mode is built on top of the regular node stack, so an archive node can also be configured to participate in consensus if you choose to stake and run it that way.
99

1010
In short, archive nodes:
1111
- Provide additional historical data (such as events emitted by contracts) that is not stored by a Provisioner node
12-
- Can participate in consensus, by staking DUSK. However, they are not required to.
12+
- Expose archive-only GraphQL queries such as `moonlightHistory`, `fullMoonlightHistory`, and `finalizedEvents`
13+
- Can also participate in consensus by staking DUSK, though that is optional
1314

1415
:::tip[Run an Archive node]
1516
If you want to quickly launch & run an archive node, you can use the <a href="https://github.com/dusk-network/node-installer" target="_blank">node installer</a> by following [the archive guide](/operator/archive-node).
@@ -83,7 +84,9 @@ You can check which GraphQL queries are available by retrieving the schema (SDL)
8384
curl -s -X POST "http://<your-node-host>:8080/on/graphql/query"
8485
```
8586

86-
This should now return a different list than a normal node returns. An example endpoint that is now available is the **checkBlock** endpoint, which returns true or false whether a block height matches a specific block hash, which can also be queried only for finalized blocks.
87+
This should now return a different schema than a normal node returns. Archive-enabled nodes expose additional historical queries such as `moonlightHistory`, `fullMoonlightHistory`, and `finalizedEvents`.
88+
89+
A regular node also exposes `checkBlock`, but the `onlyFinalized: true` behavior below is archive-only.
8790

8891
In order to test this endpoint, you can run the following command.
8992

src/content/docs/operator/guides/manual-resync.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ ruskquery block-height
6565
Once your node is close to the current block height, you can restake your DUSK tokens:
6666

6767
```sh
68-
rusk-wallet stake <amount>
68+
rusk-wallet stake --amt <amount>
6969
```
7070
Replace `<amount>` with the number of DUSK tokens you wish to stake.
7171

src/content/docs/operator/troubleshooting.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ Answer with a capital **Y**, otherwise the operation will abort.
3131
Run the `ruskreset` command to fix this.
3232

3333
#### "stake" command not recognized
34-
If staking via Moonlight, you can launch:
34+
Use the current CLI help output as the source of truth for your installed wallet version. The normal staking flow uses `stake`, for example:
3535

3636
```bash
37-
rusk-wallet moonlight-stake --amt 3000
37+
rusk-wallet --help
38+
rusk-wallet stake --help
39+
rusk-wallet stake --amt 3000
3840
```
3941

4042
#### Serialization error

0 commit comments

Comments
 (0)