Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ jobs:
runs-on: ubuntu-latest
env:
DEFAULT_REF: next
DEFAULT_TUTORIALS_REF: main
# v0.14 pins tutorials to the PR #186 branch (kbg/chore/v14-migration)
# so the live /next/ ingest matches what v0.14 snapshot was cut from.
# TODO: flip back to `main` once 0xMiden/tutorials#186 merges upstream.
DEFAULT_TUTORIALS_REF: kbg/chore/v14-migration
steps:
- name: Checkout docs site
uses: actions/checkout@v4
Expand Down
16 changes: 8 additions & 8 deletions .release/release-manifest.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: "0.13" # the label to snapshot (used if no manual override)
version: "0.14" # the label to snapshot (used if no manual override)
refs: # exact, immutable refs per source repo (tags or release branches)
protocol: "refs/tags/v0.13.3"
node: "refs/tags/v0.13.4"
miden-client: "refs/tags/v0.13.0"
tutorials: "refs/heads/main"
miden-vm: "refs/tags/v0.20.6"
compiler: "refs/tags/0.7.0"
next_version: "0.14"
protocol: "refs/tags/v0.14.4"
node: "refs/tags/v0.14.9"
miden-client: "refs/tags/v0.14.4"
tutorials: "refs/pull/186/head"
miden-vm: "refs/tags/v0.22.1"
compiler: "refs/tags/v0.8.1"
next_version: "0.15"
2 changes: 1 addition & 1 deletion docs/builder/get-started/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ npm run dev
Open the dev-server URL in the browser and watch the devtools console for output.

:::tip
For detailed frontend setup guidance (React, wallets, UI), see the [Tutorials section](../tutorials/rust-compiler/).
For detailed frontend setup guidance (React, wallets, UI), see the [Tutorials section](../tutorials/).
:::

## Creating Accounts Programmatically
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ struct CounterContract {
}
```

The `#[component]` attribute marks this as a Miden [Account component](/core-concepts/miden-base/account). The `count_map` field is a `StorageMap` stored in a named storage slot of the account. In v0.13, storage slots are identified by name rather than explicit index numbers — the slot name is derived automatically from the component's package name and field name (e.g., `miden::component::miden_counter_account::count_map`).
The `#[component]` attribute marks this as a Miden [Account component](/core-concepts/protocol/account). The `count_map` field is a `StorageMap` stored in a named storage slot of the account. In v0.13, storage slots are identified by name rather than explicit index numbers — the slot name is derived automatically from the component's package name and field name (e.g., `miden::component::miden_counter_account::count_map`).

**Important**: Storage slots in Miden hold `Word` values, which are composed of four field elements (`Felt`). Each `Felt` is a 64-bit unsigned integer (u64). The `StorageMap` provides a key-value interface within a single storage slot, allowing you to store multiple key-value pairs within the four-element word structure.

Expand Down
2 changes: 1 addition & 1 deletion docs/builder/get-started/your-first-smart-contract/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ Congratulations! You've successfully completed the Miden smart contract quick st

To deepen your knowledge, we recommend exploring the following resources:

- Visit the [Tutorials section](../../tutorials/rust-compiler/) for detailed, hands-on guides on topics such as contract interactions, advanced storage, custom note scripting, and integrating with external applications.
- Visit the [Tutorials section](../../tutorials/) for detailed, hands-on guides on topics such as contract interactions, advanced storage, custom note scripting, and integrating with external applications.
- For in-depth technical explanations of core concepts, consult the [Core Concepts section](../../../core-concepts/) of the documentation. Here you'll find comprehensive information on Miden's architecture, account model, transaction lifecycle, and the underlying zero-knowledge technology that powers the network.

The foundational patterns and concepts you've practiced in this Quick Start will enable you to build complex, privacy-preserving applications on the Miden network. Continue with the resources above to take your development further!
6 changes: 1 addition & 5 deletions docs/builder/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ pagination_next: null

Accounts, notes, and transactions — authored in Rust, compiled to MASM, proved client-side.

<Callout variant="info" title="v0.13 · v0.14 in development">
v0.13 is the current stable release and the target of these docs. v0.14 ships with the next docs snapshot. See the [migration guide](./migration/) for what changed.
</Callout>

## Start here

<CardGrid cols={2}>
Expand All @@ -29,7 +25,7 @@ Accounts, notes, and transactions — authored in Rust, compiled to MASM, proved
<Card title="Smart contracts" href="./smart-contracts" eyebrow="Reference">
Accounts, notes, storage, components, transactions — the full Rust SDK surface.
</Card>
<Card title="Tutorials" href="./tutorials/rust-compiler" eyebrow="Walkthroughs">
<Card title="Tutorials" href="./tutorials" eyebrow="Walkthroughs">
Real-world examples: the Miden Bank, private multisig, custom note scripts.
</Card>
<Card title="Development helpers" href="./tutorials#development-helpers" eyebrow="How-to">
Expand Down
74 changes: 48 additions & 26 deletions docs/builder/tools/clients/index.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,52 @@
---
title: Client
title: Clients
description: "Miden client SDKs — Rust, TypeScript, and React surfaces for accounts, transactions, notes, and client-side proving."
sidebar_position: 1
pagination_prev: null
---

# Miden client

The Miden client is the user-facing entry point to the Miden network. It manages accounts, builds and executes transactions, produces zero-knowledge proofs, and synchronises local state with the node. The same client logic ships across four consumer surfaces so you can pick the runtime that fits your application:

| Surface | Package | Best for |
| --- | --- | --- |
| **Rust library** | `miden-client` crate | Native services, proving infrastructure, tests |
| **Rust CLI** | `miden-client` binary | Scripting, local exploration, ops workflows |
| **Web SDK** | `@miden-sdk/miden-sdk` (npm) | Browser and Node apps, Electron, service workers |
| **React SDK** | `@miden-sdk/react` (npm) | React / Next.js / React Native dApps |

Navigate to each surface via the sidebar on the left.

## How the surfaces relate

- The **Rust library** contains the core state machine, transaction executor, prover, keystore abstraction, and note transport.
- The **Rust CLI** wraps the library and exposes its functionality as commands.
- The **Web SDK** compiles the Rust library to WebAssembly and exposes a typed JavaScript API (the `MidenClient` class). It is the canonical TypeScript/JavaScript entry point.
- The **React SDK** wraps the Web SDK with a `MidenProvider` and a family of hooks (`useMiden`, `useAccount`, `useSend`, …). It shares the exact same on-chain semantics.

Pick whichever surface matches your application — each section documents the full API for that runtime.

## Common topics

Errors, diagnostics, and other behaviour that is shared across all surfaces is documented once under **Common errors** in the sidebar.
# Clients

The Miden client manages accounts, builds and executes transactions, produces zero-knowledge proofs, and synchronises local state with the node. The same core ships across three consumer surfaces — pick the runtime that matches your application. All three share the same on-chain semantics.

## SDKs

<CardGrid cols={3}>
<Card title="Rust" href="./rust-client/" eyebrow="Rust · SDK + CLI">
Native Rust library and CLI. Best for services, proving infrastructure, tests, scripting, and local exploration.
</Card>
<Card title="TypeScript" href="./web-client/" eyebrow="TypeScript · Browser">
`@miden-sdk/miden-sdk` — Rust compiled to WebAssembly with a typed TypeScript API. Browser, Node, Electron, service workers.
</Card>
<Card title="React" href="./react-sdk/" eyebrow="React · Hooks">
`@miden-sdk/react` — `MidenProvider` + hooks (`useMiden`, `useAccount`, `useSend`, …) wrapping the Web SDK.
</Card>
</CardGrid>

## Pick a surface

<CardGrid cols={2}>
<Card title="Rust library" eyebrow="Core · Native">
Core state machine, transaction executor, prover, keystore abstraction, and note transport. Use it in native services, backend proving infrastructure, and integration tests.
</Card>
<Card title="Rust CLI" eyebrow="Scripting · Ops">
Wraps the library as commands. Shipped in the same `miden-client` crate — good for local exploration and ops workflows.
</Card>
<Card title="Web SDK" eyebrow="WASM · Browser">
Rust library compiled to WebAssembly with a typed `MidenClient` JavaScript class. Canonical TS/JS entry point for browser and Node apps.
</Card>
<Card title="React SDK" eyebrow="Hooks · dApps">
`MidenProvider` + hooks wrapping the Web SDK. Drop it into a React / Next.js / React Native app for instant Miden integration.
</Card>
</CardGrid>

## Shared topics

<CardGrid cols={2}>
<Card title="Common errors" href="./common-errors" eyebrow="Diagnostics">
Errors, diagnostic output, and recovery patterns shared across all surfaces.
</Card>
<Card title="Tutorials" href="../../tutorials/" eyebrow="Walkthroughs">
End-to-end walkthroughs using each client surface — Miden Bank, recipes, helpers.
</Card>
</CardGrid>
2 changes: 1 addition & 1 deletion docs/builder/tutorials/helpers/pitfalls.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,4 +502,4 @@ See these patterns in context in the [miden-bank repository](https://github.com/

- **[Debugging Guide](./debugging)** - Troubleshoot errors
- **[Testing Guide](./testing)** - MockChain patterns
- **[Miden Bank Tutorial](../tutorials/miden-bank/)** - See these patterns in context
- **[Miden Bank Tutorial](../miden-bank/)** - See these patterns in context
2 changes: 1 addition & 1 deletion docs/builder/tutorials/helpers/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -607,4 +607,4 @@ See the complete test implementations in the [miden-bank repository](https://git

- **[Debugging Guide](./debugging)** - Troubleshoot common issues
- **[Common Pitfalls](./pitfalls)** - Avoid known gotchas
- **[Miden Bank Tutorial](../tutorials/miden-bank/)** - See testing in action
- **[Miden Bank Tutorial](../miden-bank/)** - See testing in action
26 changes: 13 additions & 13 deletions docs/builder/tutorials/miden-bank/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@ Every part builds on the previous one and includes:
## Walkthrough

<CardGrid cols={2}>
<Card title="Part 0: Project setup" href="./00-project-setup" eyebrow="Start here">
<Card title="Part 0: Project setup" href="./project-setup" eyebrow="Start here">
Create your project with `miden new` and understand the workspace structure.
</Card>
<Card title="Part 1: Account components" href="./01-account-components" eyebrow="Component model">
<Card title="Part 1: Account components" href="./account-components" eyebrow="Component model">
Learn `#[component]`, `Value` storage, and `StorageMap` for managing state.
</Card>
<Card title="Part 2: Constants & constraints" href="./02-constants-constraints" eyebrow="Business rules">
<Card title="Part 2: Constants & constraints" href="./constants-constraints" eyebrow="Business rules">
Define constants and validate inputs with assertions.
</Card>
<Card title="Part 3: Asset management" href="./03-asset-management" eyebrow="Vault ops">
<Card title="Part 3: Asset management" href="./asset-management" eyebrow="Vault ops">
Handle fungible assets with vault operations and balance tracking.
</Card>
<Card title="Part 4: Note scripts" href="./04-note-scripts" eyebrow="Consuming notes">
<Card title="Part 4: Note scripts" href="./note-scripts" eyebrow="Consuming notes">
Write scripts that execute when notes are consumed.
</Card>
<Card title="Part 5: Cross-component calls" href="./05-cross-component-calls" eyebrow="Composition">
<Card title="Part 5: Cross-component calls" href="./cross-component-calls" eyebrow="Composition">
Call account methods from note scripts via bindings.
</Card>
<Card title="Part 6: Transaction scripts" href="./06-transaction-scripts" eyebrow="Account ops">
<Card title="Part 6: Transaction scripts" href="./transaction-scripts" eyebrow="Account ops">
Write scripts for account initialization and owner operations.
</Card>
<Card title="Part 7: Output notes" href="./07-output-notes" eyebrow="Emitting notes">
<Card title="Part 7: Output notes" href="./output-notes" eyebrow="Emitting notes">
Create P2ID notes programmatically for withdrawals.
</Card>
<Card title="Part 8: Complete flows" href="./08-complete-flows" eyebrow="End-to-end">
<Card title="Part 8: Complete flows" href="./complete-flows" eyebrow="End-to-end">
Walk through end-to-end deposit and withdraw operations.
</Card>
</CardGrid>
Expand Down Expand Up @@ -96,13 +96,13 @@ cd miden-tutorials/examples/miden-bank
## Supplementary guides

<CardGrid cols={3}>
<Card title="Testing with MockChain" href="../rust-compiler/testing" eyebrow="Guide">
<Card title="Testing with MockChain" href="../helpers/testing" eyebrow="Guide">
Learn to test your contracts with MockChain for local simulation.
</Card>
<Card title="Debugging" href="../rust-compiler/debugging" eyebrow="Guide">
<Card title="Debugging" href="../helpers/debugging" eyebrow="Guide">
Interpret errors and debug common issues.
</Card>
<Card title="Common pitfalls" href="../rust-compiler/pitfalls" eyebrow="Guide">
<Card title="Common pitfalls" href="../helpers/pitfalls" eyebrow="Guide">
Avoid known issues and limitations.
</Card>
</CardGrid>
Expand All @@ -113,4 +113,4 @@ cd miden-tutorials/examples/miden-bank
- Join the [Build on Miden](https://t.me/BuildOnMiden) Telegram for support.
- Review the complete code in the [examples/miden-bank](https://github.com/0xMiden/miden-tutorials/tree/main/examples/miden-bank) directory.

Ready? Start with [Part 0: Project setup](./00-project-setup).
Ready? Start with [Part 0: Project setup](./project-setup).
2 changes: 1 addition & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ const config: Config = {
items: [
{ label: "Get started", to: "/builder/get-started" },
{ label: "Smart contracts", to: "/builder/smart-contracts" },
{ label: "Tutorials", to: "/builder/tutorials/rust-compiler" },
{ label: "Tutorials", to: "/builder/tutorials" },
{ label: "Tools", to: "/builder/tools" },
{ label: "Migration", to: "/builder/migration" },
],
Expand Down
64 changes: 59 additions & 5 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,26 @@ const sidebars: SidebarsConfig = {
label: "Tutorials",
link: { type: "doc", id: "builder/tutorials/index" },
items: [
"builder/tutorials/miden-bank/index",
{
type: "category",
label: "Miden Bank",
link: { type: "doc", id: "builder/tutorials/miden-bank/index" },
collapsed: true,
items: [
// Docusaurus's default numberPrefixParser strips the "00-" style
// prefix from the doc ID, so files like 00-project-setup.md get
// the doc ID "project-setup" (and URL slug to match).
"builder/tutorials/miden-bank/project-setup",
"builder/tutorials/miden-bank/account-components",
"builder/tutorials/miden-bank/constants-constraints",
"builder/tutorials/miden-bank/asset-management",
"builder/tutorials/miden-bank/note-scripts",
"builder/tutorials/miden-bank/cross-component-calls",
"builder/tutorials/miden-bank/transaction-scripts",
"builder/tutorials/miden-bank/output-notes",
"builder/tutorials/miden-bank/complete-flows",
],
},
{
type: "category",
label: "Recipes",
Expand Down Expand Up @@ -122,10 +141,7 @@ const sidebars: SidebarsConfig = {
link: { type: "doc", id: "builder/tutorials/recipes/web/index" },
collapsed: true,
items: [
// NOTE: "builder/tutorials/recipes/web/setup_guide" lives
// only on 0xMiden/tutorials#186 (kbg/chore/v14-migration).
// Re-add once that PR merges into tutorials' main —
// it'll be part of the v0.14 release branch meanwhile.
"builder/tutorials/recipes/web/setup_guide",
"builder/tutorials/recipes/web/counter_contract_tutorial",
"builder/tutorials/recipes/web/create_deploy_tutorial",
"builder/tutorials/recipes/web/mint_consume_create_tutorial",
Expand Down Expand Up @@ -158,6 +174,44 @@ const sidebars: SidebarsConfig = {
label: "Clients",
link: { type: "doc", id: "builder/tools/clients/index" },
items: [
{
type: "category",
label: "Rust",
link: { type: "doc", id: "builder/tools/clients/rust-client/index" },
items: [
"builder/tools/clients/rust-client/install-and-run",
"builder/tools/clients/rust-client/features",
"builder/tools/clients/rust-client/design",
{
type: "category",
label: "Get started",
link: { type: "doc", id: "builder/tools/clients/rust-client/get-started/index" },
items: [
"builder/tools/clients/rust-client/get-started/create-account-use-faucet",
"builder/tools/clients/rust-client/get-started/p2p-public",
"builder/tools/clients/rust-client/get-started/p2p-private",
],
},
{
type: "category",
label: "CLI",
link: { type: "doc", id: "builder/tools/clients/rust-client/cli/index" },
items: [
"builder/tools/clients/rust-client/cli/cli-config",
"builder/tools/clients/rust-client/cli/cli-troubleshooting",
],
},
"builder/tools/clients/rust-client/examples",
"builder/tools/clients/rust-client/library",
"builder/tools/clients/rust-client/api-docs",
// NOTE: debugging.md exists in v0.14.4 (and the v0.14
// snapshot) but was removed on miden-client's `next`
// branch. The live /next/ build ingests from `next`,
// so listing it here would fail sidebar validation.
// Re-add if a future miden-vNN release brings the page
// back.
],
},
{
type: "category",
label: "TypeScript",
Expand Down
2 changes: 1 addition & 1 deletion src/components/VersionNote/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface VersionNoteProps {

export default function VersionNote({
subject = "Full documentation",
stableVersion = "v0.13",
stableVersion = "v0.14",
}: VersionNoteProps): JSX.Element {
return (
<div className={styles.container}>
Expand Down
6 changes: 6 additions & 0 deletions versioned_docs/version-0.14/builder/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"label": "Builder",
"position": 1,
"collapsible": false,
"collapsed": false
}
Loading
Loading