Skip to content

Commit d480726

Browse files
thephezclaude
andauthored
docs: v3.1 release cleanup (state-transition dedup, deprecated DAPI removal, build-warning fixes) (#151)
* docs(protocol-ref): dedup state transition page and drop deprecated DAPI entries Replace the cramped one-cell type discriminator with a proper catalog table, remove the 7 type-0–8 detail sections that duplicate the canonical identity and data-contract pages, and drop the long-deprecated getIdentities and getIdentitiesByPublicKeyHashes endpoints (removed from the platform proto in v1.0.0). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs: minor formatting update * docs: fix broken cross-references to clean up build warnings Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs: silence Pygments warnings on placeholder JSON blocks Convert affected fences to code-block directives with :force: so JSON highlighting is preserved without lexer errors on schema-style placeholders and JS-literal query examples. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1a8793b commit d480726

7 files changed

Lines changed: 79 additions & 136 deletions

File tree

docs/protocol-ref/data-contract-document.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ The `indices` array consists of one or more objects that each contain:
144144
* An optional `nullSearchable` element that indicates whether the index allows searching for NULL values. If nullSearchable is false (default: true) and all properties of the index are null then no reference is added.
145145
* An optional `contested` element that determines if duplicate values are allowed for the document
146146

147-
```json
147+
:::{code-block} json
148+
:force:
149+
148150
"indices": [
149151
{
150152
"name": "<index name a>",
@@ -171,7 +173,7 @@ The `indices` array consists of one or more objects that each contain:
171173
],
172174
}
173175
]
174-
```
176+
:::
175177

176178
### Contested Indices
177179

@@ -380,7 +382,9 @@ schema](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/schema
380382

381383
This example syntax shows the structure of a documents object that defines two documents, an index, and a required field.
382384

383-
```json
385+
:::{code-block} json
386+
:force:
387+
384388
{
385389
"<document name a>": {
386390
"type": "object",
@@ -425,7 +429,7 @@ This example syntax shows the structure of a documents object that defines two d
425429
"additionalProperties": false
426430
},
427431
}
428-
```
432+
:::
429433

430434
## Document Schema
431435

docs/protocol-ref/state-transition.md

Lines changed: 26 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The list of common fields used by multiple state transitions is defined in [rs-d
2626
| Field | Type | Size | Description |
2727
| --------------- | -------------- | ---- | ----------- |
2828
| $version | unsigned integer | 16 bits | The state transition format version (FeatureVersion). Currently `0` for most transitions, `1` for Batch. This is not the global platform protocol version, which is negotiated separately. |
29-
| type | unsigned integer | 8 bits | State transition type (defined in [rs-dpp](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/state_transition/state_transition_types.rs#L21)):<br>`0` - [data contract create](../protocol-ref/data-contract.md#data-contract-create)<br>`1` - [batch](#batch)<br>`2` - [identity create](../protocol-ref/identity.md#identity-create)<br>`3` - [identity topup](identity.md#identity-topup)<br>`4` - [data contract update](data-contract.md#data-contract-update)<br>`5` - [identity update](identity.md#identity-update)<br>`6` - [identity credit withdrawal](identity.md#identity-credit-withdrawal)<br>`7` - [identity credit transfer](identity.md#identity-credit-transfer)<br>`8` - [masternode vote](#masternode-vote)<br>`9` - [identity credit transfer to addresses](address-system.md#identity-credit-transfer-to-addresses)<br>`10` - [identity create from addresses](address-system.md#identity-create-from-addresses)<br>`11` - [identity topup from addresses](address-system.md#identity-topup-from-addresses)<br>`12` - [address funds transfer](address-system.md#address-funds-transfer)<br>`13` - [address funding from asset lock](address-system.md#address-funding-from-asset-lock)<br>`14` - [address credit withdrawal](address-system.md#address-credit-withdrawal)<br>`15` - [shield](shielded-pool.md#shield)<br>`16` - [shielded transfer](shielded-pool.md#shielded-transfer)<br>`17` - [unshield](shielded-pool.md#unshield)<br>`18` - [shield from asset lock](shielded-pool.md#shield-from-asset-lock)<br>`19` - [shielded withdrawal](shielded-pool.md#shielded-withdrawal) |
29+
| type | unsigned integer | 8 bits | State transition type discriminator (defined in [rs-dpp](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/state_transition/state_transition_types.rs#L21)). See [State Transition Types](#state-transition-types) for the full list. |
3030
| userFeeIncrease | unsigned integer | 16 bits | Extra fee to prioritize processing if the mempool is full. Typically set to zero. |
3131
| signature | array of bytes | 65 bytes |Signature of state transition data |
3232

@@ -42,85 +42,40 @@ Additionally, all state transitions except the identity create and topup state t
4242

4343
## State Transition Types
4444

45-
Dash Platform Protocol defines the [state transition types](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/state_transition/state_transition_types.rs#L21-L43) that perform identity, contract, document, and token operations. See the subsections below for details on each state transition type.
45+
Dash Platform Protocol defines the following [state transition types](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/state_transition/state_transition_types.rs#L21-L43). Most are documented in detail on the protocol reference page for the feature they operate on. Batch and Masternode Vote do not have a dedicated feature page; their formats are documented inline below.
46+
47+
| Type | Name | Documented in |
48+
| --- | --- | --- |
49+
| 0 | Data Contract Create | [Data Contract Create](data-contract.md#data-contract-create) |
50+
| 1 | Batch | [Batch](#batch) (below) |
51+
| 2 | Identity Create | [Identity Create](identity.md#identity-create) |
52+
| 3 | Identity TopUp | [Identity TopUp](identity.md#identity-topup) |
53+
| 4 | Data Contract Update | [Data Contract Update](data-contract.md#data-contract-update) |
54+
| 5 | Identity Update | [Identity Update](identity.md#identity-update) |
55+
| 6 | Identity Credit Withdrawal | [Identity Credit Withdrawal](identity.md#identity-credit-withdrawal) |
56+
| 7 | Identity Credit Transfer | [Identity Credit Transfer](identity.md#identity-credit-transfer) |
57+
| 8 | Masternode Vote | [Masternode Vote](#masternode-vote) (below) |
58+
| 9 | Identity Credit Transfer to Addresses | [Identity Credit Transfer to Addresses](address-system.md#identity-credit-transfer-to-addresses) |
59+
| 10 | Identity Create from Addresses | [Identity Create from Addresses](address-system.md#identity-create-from-addresses) |
60+
| 11 | Identity TopUp from Addresses | [Identity TopUp from Addresses](address-system.md#identity-top-up-from-addresses) |
61+
| 12 | Address Funds Transfer | [Address Funds Transfer](address-system.md#address-funds-transfer) |
62+
| 13 | Address Funding from Asset Lock | [Address Funding from Asset Lock](address-system.md#address-funding-from-asset-lock) |
63+
| 14 | Address Credit Withdrawal | [Address Credit Withdrawal](address-system.md#address-credit-withdrawal) |
64+
| 15 | Shield | [Shield](shielded-pool.md#shield) |
65+
| 16 | Shielded Transfer | [Shielded Transfer](shielded-pool.md#shielded-transfer) |
66+
| 17 | Unshield | [Unshield](shielded-pool.md#unshield) |
67+
| 18 | Shield from Asset Lock | [Shield from Asset Lock](shielded-pool.md#shield-from-asset-lock) |
68+
| 19 | Shielded Withdrawal | [Shielded Withdrawal](shielded-pool.md#shielded-withdrawal) |
4669

4770
### Batch
4871

4972
| Field | Type | Size | Description |
5073
| ----------- | -------------- | ---- | ----------- |
51-
| ownerId | array of bytes | 32 bytes | [Identity](../protocol-ref/identity.md) submitting the document(s) |
74+
| ownerId | array of bytes | 32 bytes | [Identity](../protocol-ref/identity.md) submitting the document(s) or token action(s) |
5275
| transitions | array of transition objects | Varies | A batch of [document](../protocol-ref/document.md#document-overview) or token actions (currently limited to [1 object per batch](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-platform-version/src/version/system_limits/v1.rs#L7)) |
5376

5477
More detailed information about the `transitions` array can be found in the [document section](../protocol-ref/document.md). See the implementation in [rs-dpp](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/mod.rs#L31-L39).
5578

56-
### Data Contract Create
57-
58-
| Field | Type | Size | Description |
59-
| --------------- | -------------- | ---- | ----------- |
60-
| dataContract | [data contract object](../protocol-ref/data-contract.md#data-contract-object) | Varies | Object containing valid [data contract](../protocol-ref/data-contract.md) details |
61-
| identityNonce | unsigned integer | 64 bits | Identity nonce for this transition to prevent replay attacks |
62-
63-
More detailed information about the `dataContract` object can be found in the [data contract section](../protocol-ref/data-contract.md).
64-
65-
### Data Contract Update
66-
67-
| Field | Type | Size | Description |
68-
| --------------- | -------------- | ---- | ----------- |
69-
| dataContract | [data contract object](../protocol-ref/data-contract.md#data-contract-object) | Varies | Object containing valid [data contract](../protocol-ref/data-contract.md) details |
70-
| identityContractNonce | unsigned integer | 64 bits | Identity contract nonce for replay protection |
71-
72-
More detailed information about the `dataContract` object can be found in the [data contract section](../protocol-ref/data-contract.md).
73-
74-
### Identity Create
75-
76-
| Field | Type | Size | Description |
77-
| --------------- | -------------- | ---- | ----------- |
78-
| assetLockProof | array of bytes | 36 bytes | Lock [outpoint](https://docs.dash.org/en/stable/docs/core/resources/glossary.html#outpoint) from the layer 1 locking transaction (36 bytes) |
79-
| publicKeys | array of keys | Varies | [Public key(s)](../protocol-ref/identity.md#identity-publickeys) associated with the identity (maximum number of keys: `6`) |
80-
81-
More detailed information about the `publicKeys` object can be found in the [identity section](../protocol-ref/identity.md).
82-
83-
### Identity TopUp
84-
85-
| Field | Type | Size | Description |
86-
| --------------- | -------------- | ---- | ----------- |
87-
| assetLockProof | array of bytes | 36 bytes | Lock [outpoint](https://docs.dash.org/en/stable/docs/core/resources/glossary.html#outpoint) from the layer 1 locking transaction (36 bytes) |
88-
| identityId | array of bytes | 32 bytes | An [Identity ID](../protocol-ref/identity.md#identity-id) for the identity receiving the topup (can be any identity) (32 bytes) |
89-
90-
### Identity Update
91-
92-
| Field | Type | Size | Description |
93-
| --------------- | -------------- | ---- | ----------- |
94-
| identityId | array of bytes | 32 bytes | The [Identity ID](../protocol-ref/identity.md#identity-id) for the identity being updated |
95-
| revision | unsigned integer | 64 bits | Identity update revision. Used for optimistic concurrency control. Incremented by one with each new update so that the update will fail if the underlying data is modified between reading and writing. |
96-
| nonce | unsigned integer | 64 bits | Identity nonce for this transition to prevent replay attacks |
97-
| addPublicKeys | array of public keys | Varies | (Optional) Array of up to 6 new public keys to add to the identity. Required if adding keys. |
98-
| disablePublicKeys | array of integers | Varies | (Optional) Array of up to 10 existing identity public key ID(s) to disable for the identity. Required if disabling keys. |
99-
100-
### Identity Credit Transfer
101-
102-
| Field | Type | Size | Description |
103-
| --------------- | -------------- | ---- | ----------- |
104-
| identityId | array of bytes | 32 bytes | An [Identity ID](../protocol-ref/identity.md#identity-id) for the identity sending the credits |
105-
| recipientId | array of bytes | 32 bytes | An [Identity ID](../protocol-ref/identity.md#identity-id) for the identity receiving the credits |
106-
| amount | unsigned integer | 64 bits | Number of credits being transferred |
107-
| nonce | unsigned integer | 64 bits | Identity nonce for this transition to prevent replay attacks |
108-
109-
See the implementation in [rs-dpp](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/v0/mod.rs#L42-L53).
110-
111-
### Identity Credit Withdrawal
112-
113-
| Field | Type | Size | Description |
114-
| --------------- | -------------- | ---- | ----------- |
115-
| identityId | array of bytes | 32 bytes | An [Identity ID](../protocol-ref/identity.md#identity-id) for the identity sending the credits |
116-
| amount | unsigned integer | 64 bits | Number of credits being transferred |
117-
| coreFeePerByte | unsigned integer | 32 bits | |
118-
| pooling | unsigned integer | 8 bits | 0 = Never, 1 = If Available, 2 = Standard |
119-
| outputScript | script | Varies | If None, the withdrawal is sent to the address set by Core |
120-
| nonce | unsigned integer | 64 bits | Identity nonce for this transition to prevent replay attacks |
121-
122-
See the implementation in [rs-dpp](https://github.com/dashpay/platform/blob/v3.1-dev/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_withdrawal_transition/v1/mod.rs#L35-L48).
123-
12479
### Masternode Vote
12580

12681
| Field | Type | Size | Description |

docs/reference/dapi-endpoints-platform-endpoints.md

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4627,39 +4627,6 @@ Returns compacted nullifier additions from a specified block height. Compacted c
46274627
| `start_block_height` | String (uint64) | Yes | Block height to start from (as a string due to uint64 size) |
46284628
| `prove` | Boolean | No | Set to `true` to receive a proof that contains the requested changes |
46294629

4630-
## Deprecated Endpoints
4631-
4632-
The following endpoints were recently deprecated. See the [previous version of documentation](https://docs.dash.org/projects/platform/en/2.0.0/docs/reference/dapi-endpoints-platform-endpoints.html) for additional information on these endpoints.
4633-
4634-
### getIdentities
4635-
4636-
:::{attention}
4637-
Deprecated in Dash Platform v1.0.0
4638-
:::
4639-
4640-
**Returns**: [Identity](../explanations/identity.md) information for the requested identities
4641-
4642-
**Parameters**:
4643-
4644-
| Name | Type | Required | Description |
4645-
| ------- | ------- | -------- | ------------ |
4646-
| `ids` | Array | Yes | An array of identity IDs
4647-
| `prove` | Boolean | No | Set to `true` to receive a proof that contains the requested identity
4648-
4649-
### getIdentitiesByPublicKeyHashes
4650-
4651-
:::{attention}
4652-
Deprecated in Dash Platform v1.0.0
4653-
:::
4654-
4655-
**Returns**: An array of [identities](../explanations/identity.md) associated with the provided public key hashes
4656-
**Parameters**:
4657-
4658-
| Name | Type | Required | Description |
4659-
| ------------------- | ------- | -------- | ----------------------------------------------------------------------- |
4660-
| `public_key_hashes` | Bytes | Yes | Public key hashes (sha256-ripemd160) of identity public keys |
4661-
| `prove` | Boolean | No | Set to `true` to receive a proof that contains the requested identities |
4662-
46634630
## Code Reference
46644631

46654632
Implementation details related to the information on this page can be found in:

docs/reference/dapi-endpoints.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ without introducing issues for endpoint consumers.
4343
| [`getIdentity`](../reference/dapi-endpoints-platform-endpoints.md#getidentity) | Returns the requested identity |
4444
| [`getIdentityBalance`](../reference/dapi-endpoints-platform-endpoints.md#getidentitybalance) | Returns the requested identity's balance |
4545
| [`getIdentityBalanceAndRevision`](../reference/dapi-endpoints-platform-endpoints.md#getidentitybalanceandrevision) | Returns the requested identity's balance and revision |
46-
| [`getIdentityByNonUniquePublicKeyHash`](../reference/dapi-endpoints-platform-endpoints.md#getidentitybynonuniquepublickeyhash) | **Added in Dash Platform v2.0.0**<br>Returns one or more identities associated with a public key hash, including for non-unique masternode keys. |
46+
| [`getIdentityByNonUniquePublicKeyHash`](../reference/dapi-endpoints-platform-endpoints.md#getidentitybynonuniquepublickeyhash) | *Added in Dash Platform v2.0.0*<br>Returns one or more identities associated with a public key hash, including for non-unique masternode keys. |
4747
| [`getIdentityByPublicKeyHash`](../reference/dapi-endpoints-platform-endpoints.md#getidentitybypublickeyhash) | Returns the identity associated with the provided public key hash |
4848
| [`getIdentityContractNonce`](../reference/dapi-endpoints-platform-endpoints.md#getidentitycontractnonce) | Returns the identity contract nonce |
4949
| [`getIdentityKeys`](../reference/dapi-endpoints-platform-endpoints.md#getidentitykeys) | Returns the requested identity keys |
@@ -80,7 +80,7 @@ Security groups provide a way to distribute token configuration and update autho
8080
| [`getEvonodesProposedEpochBlocksByIds`](../reference/dapi-endpoints-platform-endpoints.md#getevonodesproposedepochblocksbyids) | *Added in Dash Platform v1.3.0*<br>Retrieves the number of blocks proposed by the specified evonodes in a certain epoch, based on their IDs |
8181
| [`getEvonodesProposedEpochBlocksByRange`](../reference/dapi-endpoints-platform-endpoints.md#getevonodesproposedepochblocksbyrange) | *Added in Dash Platform v1.3.0*<br>Retrieves the number of blocks proposed by evonodes for a specified epoch |
8282
| [`getEpochsInfo`](../reference/dapi-endpoints-platform-endpoints.md#getepochsinfo) | Returns information about the requested epoch(s) |
83-
| [`getFinalizedEpochInfos`](../reference/dapi-endpoints-platform-endpoints.md#getfinalizedepochinfos) | **Added in Dash Platform v2.0.0**<br>Retrieves finalized epoch information within a specified index range |
83+
| [`getFinalizedEpochInfos`](../reference/dapi-endpoints-platform-endpoints.md#getfinalizedepochinfos) | *Added in Dash Platform v2.0.0*<br>Retrieves finalized epoch information within a specified index range |
8484
| [`getPathElements`](../reference/dapi-endpoints-platform-endpoints.md#getpathelements) | *Added in Dash Platform v1.0.0*<br>Returns elements for a specified path in the Platform |
8585
| [`getPrefundedSpecializedBalance`](../reference/dapi-endpoints-platform-endpoints.md#getprefundedspecializedbalance) | *Added in Dash Platform v1.0.0*<br>Returns the pre-funded specialized balance for a specific identity |
8686
| [`getProtocolVersionUpgradeState`](../reference/dapi-endpoints-platform-endpoints.md#getprotocolversionupgradestate) | Returns the number of votes cast for each protocol version |

docs/reference/data-contracts.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,16 @@ The `indices` array consists of one or more objects that each contain:
249249
* An optional `nullSearchable` element that indicates whether the index allows searching for NULL values. If nullSearchable is false (default: true) and all properties of the index are null then no reference is added.
250250
* An optional `contested` element that determines if duplicate values are allowed for the document
251251

252-
```json
253-
"indices": [
252+
:::{code-block} json
253+
:force:
254+
255+
"indices": [
254256
{
255257
"name": "<index name a>",
256258
"properties": [
257259
{ "<field name a>": "<asc"|"desc>" },
258260
{ "<field name b>": "<asc"|"desc>" }
259-
],
261+
],
260262
"unique": true|false,
261263
"nullSearchable": true|false,
262264
"contested": {
@@ -273,10 +275,10 @@ The `indices` array consists of one or more objects that each contain:
273275
"name": "<index name b>",
274276
"properties": [
275277
{ "<field name c>": "<asc"|"desc>" },
276-
],
277-
}
278+
],
279+
}
278280
]
279-
```
281+
:::
280282

281283
#### Contested indices
282284

@@ -343,10 +345,12 @@ The following example (excerpt from the DPNS contract's `preorder` document) cre
343345

344346
This example syntax shows the structure of a document object including all optional properties.
345347

346-
:::{dropdown} Document schema
348+
::::{dropdown} Document schema
347349
:open:
348350

349-
```json
351+
:::{code-block} json
352+
:force:
353+
350354
{
351355
"<document name a>": {
352356
"documentsKeepHistory": true|false,
@@ -411,8 +415,8 @@ This example syntax shows the structure of a document object including all optio
411415
"additionalProperties": false
412416
},
413417
}
414-
```
415418
:::
419+
::::
416420

417421
## General Constraints
418422

0 commit comments

Comments
 (0)