)`.
@@ -300,7 +302,7 @@ See [XRPL.org](http://xrpl.org) for solutions to all the world's problems.
To make it easier to link to pages that are commonly cited, you can add a `{% raw-partial file="/docs/_snippets/common-links.md /%}` tag to a Markdown file, and then use centrally defined reference-style links such as `[account_info method][]` or `[Payment transaction][]`. The contents of the common-links file are in alphabetical order. (They were first generated by script, but are maintained manually.)
-### Code Samples
+## Code Samples
Format method names and other code structures inline enclosing the code in backtick (`) characters. For example:
@@ -314,14 +316,16 @@ For longer code blocks, use three backtics (```) followed by the lan
For example:
-```javascript
- const prepared = await client.autofill({
- "TransactionType": "Payment",
- "Account": standby_wallet.address,
- "Amount": xrpl.xrpToDrops(sendAmount),
- "Destination": standbyDestinationField.value
- })
-```
+
+```javascript
+const prepared = await client.autofill({
+ "TransactionType": "Payment",
+ "Account": standby_wallet.address,
+ "Amount": xrpl.xrpToDrops(sendAmount),
+ "Destination": standbyDestinationField.value
+})
+```
+
renders as
@@ -334,6 +338,14 @@ renders as
})
```
+## Markdoc Components
+
+The files are processed with [Markdoc](https://markdoc.dev/), which means they can contain special tags in `{% ... %}` syntax. In addition to Redocly's built-in tags, this repository has some custom tags defined in `/@theme/markdoc/`.
+
+### Badges
+
+See [New Features](#new-features).
+
### Partials
If you have text that you use frequently, or text that requires periodic update in a number of places in the documentation, you can create a _snippet file for reuse.
@@ -371,4 +383,78 @@ There I was, happy as a lark, skipping through the daisies, when I shyly handed
Alas, if only I had heeded that sage advice, I would not rue the day as I do today.
+### Not-Enabled Badge
+
+The `{% not-enabled /%}` Markdoc component displays a yellow flask icon with a tooltip about how the feature is not available on the production XRP Ledger. Use this when discussing amendments that are open for voting but not currently enabled. Example: {% not-enabled /%}
+
+This tag is self-closing, and it takes no parameters.
+
+### Repo Link
+
+This tag links to a particular file in the source code repository for this site, usually a code sample. For example:
+
+
+{% repo-link path="_code-samples/build-a-desktop-wallet/js/1_ledger-index.js" %}`1-ledger-index/index.js`{% /repo-link %}
+
+
+becomes: {% repo-link path="_code-samples/build-a-desktop-wallet/js/1_ledger-index.js" %}`1-ledger-index/index.js`{% /repo-link %}
+
+If you are working from a fork or branch of the site, all such links can be updated at once with a site configuration change.
+
+
+### Try It
+
+The `{% try-it ... /%}` Markdoc tag provides a convenient shortcut for linking to the WebSocket tool as a button. This tag is self-closing.
+Example:
+
+{% try-it method="account_currencies" server="testnet" /%}
+
+Example syntax:
+
+
+{% try-it method="account_currencies" server="testnet" /%}
+
+
+The text of the button is normally "Try it!" in English, and can be translated by setting the `component.tryit` key in the localization's `translations.yaml` file.
+
+This tag takes the following parameters:
+
+| Parameter | Required? | Description |
+|---|---|---|
+| `method` | Yes | The ID of the anchor to use on the WebSocket Tool page. For most WebSocket API methods, this is the API method exactly, but it could contain more. For example, different `ledger_entry` variations use a suffix like `ledger_entry-nft-page`. If you are documenting a new method, you must also add that method to the WebSocket tool by editing `/resources/dev-tools/components/websocket-api/data/command-list.json`. |
+| `server` | No | A specific server to use for the request. You may want to specify the server if a method is specific to Clio or `rippled` servers, or if the example uses data or amendments that are only on a specific test network. |
+
+The values you can provide to the `server` parameter are as follows:
+
+| `server` value | Server to use |
+|---|---|
+| (Omitted) | The WebSocket tool's default server (currently s1.ripple.com) |
+| `s1` | Ripple's s1.ripple.com Mainnet public cluster, typically served by Clio servers. |
+| `s2` | Ripple's s2.ripple.com Mainnet full-history public cluster, typically served by Clio servers. |
+| `xrplcluster` | The `xrplcluster.com` cluster of public servers, typically served by `rippled` servers with a lightweight proxy in front. |
+| `devnet` | The `s.altnet.rippletest.net` cluster of Testnet servers. |
+| `testnet` | The `s.devnet.rippletest.net` cluster of Devnet servers. |
+
+### Tx Example
+
+The `{% tx-example ... /%}` Markdoc tag provides a convenient shortcut for linking to the WebSocket tool as a button with a body pre-filled to look up a specific example transaction. This tag is self-closing. Example:
+
+{% tx-example txid="1AF19BF9717DA0B05A3BFC5007873E7743BA54C0311CCCCC60776AAEAC5C4635" /%}
+
+Example syntax:
+
+
+{% tx-example txid="1AF19BF9717DA0B05A3BFC5007873E7743BA54C0311CCCCC60776AAEAC5C4635" /%}
+
+
+The text of the button is normally "Query example transaction" in English, and can be translated by setting the `component.queryexampletx` key in the localization's `translations.yaml` file.
+
+This tag takes the following parameters:
+
+| Parameter | Required? | Description |
+|---|---|---|
+| `txid` | Yes | The unique hash of the transaction to look up. |
+| `server` | No | A specific server to use for the request. Possible values are the same as `{% try-it %}` as defined above. For example, you may need to specify `devnet` to show a transaction added by an amendment that isn't enabled on Mainnet. |
+
+
{% child-pages /%}
diff --git a/resources/dev-tools/components/websocket-api/data/command-list.json b/resources/dev-tools/components/websocket-api/data/command-list.json
index ebf7aa661d..8a57f20d75 100644
--- a/resources/dev-tools/components/websocket-api/data/command-list.json
+++ b/resources/dev-tools/components/websocket-api/data/command-list.json
@@ -132,7 +132,8 @@
"ledger_index": "validated",
"transactions": false,
"expand": false,
- "owner_funds": false
+ "owner_funds": false,
+ "api_version": 2
}
},
{
@@ -508,6 +509,16 @@
"command": "fee"
}
},
+ {
+ "name": "manifest",
+ "description": "Look up manifest information for a given validator public key.",
+ "link": "/docs/references/http-websocket-apis/public-api-methods/server-info-methods/manifest",
+ "body": {
+ "id": "manifest_example",
+ "command": "manifest",
+ "public_key": "nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p"
+ }
+ },
{
"name": "server_definitions",
"description": "Returns an SDK-compatible definitions.json, generated from the rippled server being queried.",
@@ -524,14 +535,6 @@
"command": "server_info"
}
},
- {
- "name": "version",
- "description": "Retrieves the API version information. When you connect to a cluster that includes a Clio server, the Clio method is used.",
- "link": "/docs/references/http-websocket-apis/public-api-methods/server-info-methods/version",
- "body": {
- "command": "version"
- }
- },
{
"name": "server_state",
"description": "Reports a machine-readable version of various information about the rippled server being queried.",
@@ -539,6 +542,14 @@
"body": {
"command": "server_state"
}
+ },
+ {
+ "name": "version",
+ "description": "Retrieves the API version information. When you connect to a cluster that includes a Clio server, the Clio method is used.",
+ "link": "/docs/references/http-websocket-apis/public-api-methods/server-info-methods/version",
+ "body": {
+ "command": "version"
+ }
}
]
},
diff --git a/sidebars.yaml b/sidebars.yaml
index 90f09bd1ba..869edabe58 100644
--- a/sidebars.yaml
+++ b/sidebars.yaml
@@ -355,8 +355,8 @@
- page: docs/references/protocol/transactions/types/index.md
expanded: false
items:
- - page: docs/references/protocol/transactions/types/accountset.md
- page: docs/references/protocol/transactions/types/accountdelete.md
+ - page: docs/references/protocol/transactions/types/accountset.md
- page: docs/references/protocol/transactions/types/ammbid.md
- page: docs/references/protocol/transactions/types/ammclawback.md
- page: docs/references/protocol/transactions/types/ammcreate.md