Skip to content
20 changes: 20 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,26 @@ When updating documentation values that include GitHub source links:
- Update the line anchor (`#L`) to match the correct line **in the branch the link points to**
- When available, use the local platform repository checkout to verify line numbers against the correct branch

## Adding a new doc page

A new page is only visible in the rendered site if it appears in a Sphinx toctree. Sphinx will emit a `document isn't included in any toctree` warning at build time for any orphaned page, and the page won't show up in the sidebar.

Top-level toctrees live in [docs/index.md](docs/index.md), grouped by section caption (`Tutorials`, `Explanations`, `Reference`, `Platform Protocol Reference`, `Resources`). When you add a new page under `docs/<section>/`, add its path (without the `.md` extension) to the matching toctree in `docs/index.md`. After editing the toctree, run `python scripts/sync_sidebar.py` so the custom sidebar template picks up the new entry.

Tutorials and the TUI section use nested `index.md` files with their own toctrees — check the parent `index.md` of the directory you're adding to.

## DAPI endpoint reference

The DAPI endpoint reference is split between an overview page (`docs/reference/dapi-endpoints.md`) and per-section detail pages (`docs/reference/dapi-endpoints-*.md`). The authoritative list of endpoints lives in the platform proto at `https://github.com/dashpay/platform/tree/<branch>/packages/dapi-grpc/protos` — check the proto when adding or modifying entries.

When you add or materially update an entry on a detail page, also update the matching row on `dapi-endpoints.md`:

- Keep the description in sync between the two pages.
- Prefix the overview row's description with `**Added in Dash Platform vX.Y.Z**` (new endpoints) or `**Updated in Dash Platform vX.Y.Z**` (modified endpoints), followed by `<br>` and the description. Use **bold** for the current release's annotations; older releases use *italics*.
- For a whole new endpoint group, wrap the new section in a `:::{versionadded} X.Y.Z` admonition above its table — see Security Groups, Tokens, Address System, and Shielded Transactions for the pattern.

For the full per-release endpoint review process (proto diff, example refresh, demoting annotations to italics), see [RELEASE.md](RELEASE.md).

## File Patterns

- Documentation files: `docs/**/*.md`
Expand Down
14 changes: 14 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Release Checklist

Per-release tasks for the docs. For editing conventions, see [CLAUDE.md](CLAUDE.md).

## DAPI endpoint review

1. Diff the platform proto between the previous release tag and the current release branch — that's the source of truth for what changed. Proto source: `https://github.com/dashpay/platform/tree/<branch>/packages/dapi-grpc/protos`.
2. For each affected endpoint, update both the detail page (`docs/reference/dapi-endpoints-*.md`) and the matching row on the overview page (`docs/reference/dapi-endpoints.md`), with the bold version annotation on the overview row.
3. Demote the previous release's bold annotations on the overview page to italics.
4. Re-run example requests against testnet and refresh response examples if necessary. Testnet state may have been wiped, so even unchanged endpoints may have stale data.

## Update "Previous version" links

Several pages (including the DAPI endpoints pages) link to the previous version of the docs. These links are not updated automatically. Search the site for "previous version" and update each link to point to the appropriate version.
16 changes: 11 additions & 5 deletions _static/dashmint-lite.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,24 @@ <h2>Browse cards</h2>
// package and serves it as a browser-native ES module. Pinned to the same
// version the React app at ../package.json depends on so both UIs behave
// identically against the same testnet contract.
import { EvoSDK } from 'https://esm.sh/@dashevo/evo-sdk@3.1.0-dev.1';
import { EvoSDK } from 'https://esm.sh/@dashevo/evo-sdk@4.0.0-rc.2';

// The "card" data contract is already published on testnet by the React app.
// Anyone querying with the same contract id hits the same documents.
const CONTRACT_ID = '4eJR4pgV9mQdyoodfTTwFUp3SYBRJbUrJ5X1ViN2zBhY';
// The token-enabled "card" data contract is already published on testnet by
// the React app. Anyone querying with the same contract id hits the same
// documents.
const CONTRACT_ID = '5hK6SMfN4m2vU1t9qhvngUUQjsXeMNwr8MZdFeGBH8Aa';
const DOC_TYPE = 'card';

// Connect to testnet. testnetTrusted() uses the SDK's bundled list of trusted
// nodes — no node URL or config needed. connect() does the gRPC handshake
// + initial sync. No identity or signing is required for read-only queries.
//
// Workaround: pin the platform protocol version for evo-sdk dev.6 so the
// SDK doesn't ask testnet for a newer protocol it can't decode. Mirrors
// PLATFORM_VERSION_OVERRIDE in setupDashClient-core.mjs. Remove once a
// fixed SDK release lands.
async function connectSdk() {
const sdk = EvoSDK.testnetTrusted();
const sdk = EvoSDK.testnetTrusted({ version: 11 });
await sdk.connect();
return sdk;
}
Expand Down
2 changes: 1 addition & 1 deletion _static/dashnote-lite.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ <h2>Get note by ID</h2>
// package and serves it as a browser-native ES module. Pinned to the same
// version the React app at ../package.json depends on so both UIs behave
// identically against the same testnet contract.
import { EvoSDK } from 'https://esm.sh/@dashevo/evo-sdk@3.1.0-dev.1';
import { EvoSDK } from 'https://esm.sh/@dashevo/evo-sdk@4.0.0-rc.2';

// The "note" data contract is already published on testnet by the React app.
// Anyone querying with the same contract id hits the same documents.
Expand Down
2 changes: 1 addition & 1 deletion _static/dashproof-lite.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ <h2>History by chainId</h2>
// package and serves it as a browser-native ES module. Pinned to the same
// version the React app at ../package.json depends on so both UIs behave
// identically against the same testnet contract.
import { EvoSDK } from 'https://esm.sh/@dashevo/evo-sdk@3.1.0-dev.1';
import { EvoSDK } from 'https://esm.sh/@dashevo/evo-sdk@4.0.0-rc.2';

// The "anchor" data contract is already published on testnet by the React app.
// Anyone querying with the same contract id hits the same documents.
Expand Down
80 changes: 80 additions & 0 deletions _templates/sidebar-main.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,46 @@
</ul>
</details>
</li>
<li class="toctree-l1 has-children">
<a class="reference internal" href="docs/tutorials/tokens.html">
Tokens
</a>
<details>
<summary>
<span class="toctree-toggle" role="presentation">
<i class="fa-solid fa-chevron-down">
</i>
</span>
</summary>
<ul>
<li class="toctree-l2">
<a class="reference internal" href="docs/tutorials/tokens/register-a-token-contract.html">
Register a token contract
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="docs/tutorials/tokens/retrieve-token-info.html">
Retrieve token info
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="docs/tutorials/tokens/mint-tokens.html">
Mint tokens
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="docs/tutorials/tokens/burn-tokens.html">
Burn tokens
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="docs/tutorials/tokens/transfer-tokens-to-an-identity.html">
Transfer tokens to an identity
</a>
</li>
</ul>
</details>
</li>
<li class="toctree-l1 has-children">
<a class="reference internal" href="docs/tutorials/example-apps.html">
Example apps
Expand All @@ -180,6 +220,26 @@
DashMint Lab — NFT marketplace
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="docs/tutorials/example-apps/dashnote.html">
Dashnote
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="docs/tutorials/example-apps/dashmint-lite.html">
DashMint Lite
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="docs/tutorials/example-apps/dashnote-lite.html">
Dashnote Lite
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="docs/tutorials/example-apps/dashproof-lite.html">
DashProof Lite
</a>
</li>
</ul>
</details>
</li>
Expand Down Expand Up @@ -315,6 +375,11 @@
DashPay
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="docs/explanations/shielded-pool.html">
Shielded Pool
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="docs/explanations/fees.html">
Fees
Expand All @@ -330,6 +395,11 @@
Non-Fungible Tokens (NFTs)
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="docs/explanations/proofs.html">
Proofs
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="docs/explanations/query.html">
Query Capabilities
Expand Down Expand Up @@ -377,6 +447,11 @@
</ul>
</details>
</li>
<li class="toctree-l1">
<a class="reference internal" href="docs/reference/platform-proofs.html">
Platform Proofs
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="docs/reference/query-syntax.html">
Query Syntax
Expand Down Expand Up @@ -459,6 +534,11 @@
Platform Address System
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="docs/protocol-ref/shielded-pool.html">
Shielded Pool
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="docs/protocol-ref/protocol-constants.html">
Protocol Constants
Expand Down
1 change: 1 addition & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
'.DS_Store',
'README.md',
'CLAUDE.md',
'RELEASE.md',
'.devcontainer',
'.codex',
'.local',
Expand Down
2 changes: 1 addition & 1 deletion docs/explanations/platform-protocol-data-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ For more detailed information, see the [Platform Protocol Reference - Data Contr

## Example Contract

The [DashPay contract](https://github.com/dashpay/platform/blob/master/packages/dashpay-contract/schema/dashpay.schema.json) is included below for reference. It defines a `contact` document and a `profile` document. Each of these documents then defines the properties and indices they require:
The [DashPay contract](https://github.com/dashpay/platform/blob/master/packages/dashpay-contract/schema/v1/dashpay.schema.json) is included below for reference. It defines a `contactRequest` document, a `profile` document, and a `contactInfo` document. Each of these documents then defines the properties and indices they require:

:::{dropdown} DashPay contract
```json
Expand Down
5 changes: 3 additions & 2 deletions docs/explanations/platform-protocol-data-trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Given a number of technical considerations (security, masternode processing capa

Since all application data is submitted in the form of documents, data triggers are defined in the context of documents. To provide even more granularity, they also incorporate the document `action` so separate triggers can be created for the `CREATE`, `REPLACE`, or `DELETE` actions.

Which trigger runs for a given contract, document type, and action is defined in the data trigger [binding list](https://github.com/dashpay/platform/blob/master/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/list/v0/mod.rs). The trigger implementations linked in the tables below (for example the shared `reject` trigger) are generic and do not name the contracts that use them - the binding list is what associates each action with its trigger.

As an example, DPP contains several [data triggers for DPNS](https://github.com/dashpay/platform/tree/master/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/dpns). The `domain` document has added constraints for creation, replacing, deleting, transferring, purchasing, and updating prices:

| Data Contract | Document | Action(s) | Trigger Description |
Expand All @@ -40,7 +42,6 @@ In addition to DPNS, DPP ships data triggers for a small set of other system con
| - | - | - | - |
| DashPay | `contactRequest` | [`CREATE`](https://github.com/dashpay/platform/tree/master/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/dashpay) | Enforces DashPay-specific rules on outgoing contact requests |
| ---- | ---- | ---- | ---- |
| Withdrawals | `withdrawal` | [`CREATE`/`REPLACE`/`DELETE`](https://github.com/dashpay/platform/tree/master/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/withdrawals) | Enforces withdrawal status transitions and prevents direct external mutation of withdrawal documents |
| Feature flags | (various) | [Protocol-version updates](https://github.com/dashpay/platform/tree/master/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/feature_flags) | Restricts feature flag changes to the authorized feature-flag identity |
| Withdrawals | `withdrawal` | [`REPLACE`/`DELETE`](https://github.com/dashpay/platform/tree/master/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/withdrawals) | Enforces withdrawal status transitions and prevents direct external mutation of withdrawal documents |

When document state transitions are received, DPP checks if there is a trigger associated with the document type and action. If a trigger is found, DPP executes the trigger logic. Successful execution of the trigger logic is necessary for the document to be accepted and applied to the [platform state](../explanations/drive-platform-state.md).
2 changes: 1 addition & 1 deletion docs/explanations/platform-protocol-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Documents are defined in an application's [Data Contract](../explanations/platfo

### Base Fields

Dash Platform Protocol (DPP) defines a set of base fields that must be present in all documents. For the [reference implementation](https://github.com/dashpay/platform/tree/master/packages/rs-dpp), the base fields shown below are defined in the [document base schema](https://github.com/dashpay/platform/blob/master/packages/rs-dpp/src/schema/document/v0/documentBase.json).
Dash Platform Protocol (DPP) defines a set of base fields that must be present in all documents. For the [reference implementation](https://github.com/dashpay/platform/tree/master/packages/rs-dpp), the base fields shown below are defined in the [document base fields](https://github.com/dashpay/platform/blob/master/packages/rs-dpp/src/document/fields.rs).

| Field Name | Description |
| - | - |
Expand Down
6 changes: 6 additions & 0 deletions docs/explanations/platform-protocol-state-transition.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ The following table contains a list of currently defined payload types:
| [Address Funds Transfer](../protocol-ref/address-system.md#address-funds-transfer) (`12`) | Transfer funds between Platform addresses |
| [Address Funding From Asset Lock](../protocol-ref/address-system.md#address-funding-from-asset-lock) (`13`) | Fund a Platform address using an asset lock proof |
| [Address Credit Withdrawal](../protocol-ref/address-system.md#address-credit-withdrawal) (`14`) | Withdraw credits from a Platform address |
| [Shield](../protocol-ref/shielded-pool.md#shield) (`15`) | Move transparent Platform funds into the [shielded pool](../explanations/shielded-pool.md) |
| [Shielded Transfer](../protocol-ref/shielded-pool.md#shielded-transfer) (`16`) | Transfer value privately between shielded notes |
| [Unshield](../protocol-ref/shielded-pool.md#unshield) (`17`) | Move funds from the shielded pool back to a Platform address |
| [Shield From Asset Lock](../protocol-ref/shielded-pool.md#shield-from-asset-lock) (`18`) | Fund the shielded pool directly from an asset lock proof |
| [Shielded Withdrawal](../protocol-ref/shielded-pool.md#shielded-withdrawal) (`19`) | Withdraw funds from the shielded pool to Dash Core (L1) |
| [Identity Create From Shielded Pool](../protocol-ref/shielded-pool.md#identity-create-from-shielded-pool) (`20`) | Create a new identity funded from the shielded pool |

### Application Usage

Expand Down
Loading
Loading