Migrate content syntax via script

The changes in this commit were auto-generated by running

tool/migrate.sh

Following this commit, the Dactyl build no longer works but the Redocly
build (mostly) should.
This commit is contained in:
mDuo13
2024-01-31 16:09:41 -08:00
parent 96121303b2
commit 554a3732d4
898 changed files with 19879 additions and 18631 deletions

View File

@@ -8,17 +8,16 @@ labels:
# channel_authorize
[[Source]](https://github.com/XRPLF/rippled/blob/d4a56f223a3b80f64ff70b4e90ab6792806929ca/src/ripple/rpc/handlers/PayChanClaim.cpp#L41 "Source")
_(Added by the [PayChan amendment][] to be enabled. [New in: rippled 0.33.0][])_
_(Added by the [PayChan amendment][] to be enabled. {% badge href="https://github.com/XRPLF/rippled/releases/tag/0.33.0" %}New in: rippled 0.33.0{% /badge %})_
The `channel_authorize` method creates a signature that can be used to redeem a specific amount of XRP from a payment channel.
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": "channel_authorize_example_id1",
@@ -29,9 +28,9 @@ An example of the request format:
"amount": "1000000",
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
POST http://localhost:5005/
Content-Type: application/json
@@ -46,40 +45,40 @@ Content-Type: application/json
}]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
#Syntax: channel_authorize <private_key> [<key_type>] <channel_id> <drops>
rippled channel_authorize s████████████████████████████ secp256k1 5DB01B7FFED6B67E6B0414DED11E051D2EE2B7619CE0EAA6286D67A3A4D5BDB3 1000000
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
The request includes the following parameters:
| Field | Type | Description |
|-------|------|-------------|
| `channel_id` | String | The unique ID of the payment channel to use.
| `secret` | String | _(Optional)_ The secret key to use to sign the claim. This must be the same key pair as the public key specified in the channel. Cannot be used with `seed`, `seed_hex`, or `passphrase`. [Updated in: rippled 1.4.0][] |
| `seed` | String | _(Optional)_ The secret seed to use to sign the claim. This must be the same key pair as the public key specified in the channel. Must be in the XRP Ledger's [base58][] format. If provided, you must also specify the `key_type`. Cannot be used with `secret`, `seed_hex`, or `passphrase`. [New in: rippled 1.4.0][] |
| `seed_hex` | String | _(Optional)_ The secret seed to use to sign the claim. This must be the same key pair as the public key specified in the channel. Must be in hexadecimal format. If provided, you must also specify the `key_type`. Cannot be used with `secret`, `seed`, or `passphrase`. [New in: rippled 1.4.0][] |
| `passphrase` | String | _(Optional)_ A string passphrase to use to sign the claim. This must be the same key pair as the public key specified in the channel. The [key derived from this passphrase](cryptographic-keys.html#key-derivation) must match the public key specified in the channel. If provided, you must also specify the `key_type`. Cannot be used with `secret`, `seed`, or `seed_hex`. [New in: rippled 1.4.0][] |
| `key_type` | String | _(Optional)_ The [signing algorithm](cryptographic-keys.html#signing-algorithms) of the cryptographic key pair provided. Valid types are `secp256k1` or `ed25519`. The default is `secp256k1`. [New in: rippled 1.4.0][] |
| `secret` | String | _(Optional)_ The secret key to use to sign the claim. This must be the same key pair as the public key specified in the channel. Cannot be used with `seed`, `seed_hex`, or `passphrase`. {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.4.0" %}Updated in: rippled 1.4.0{% /badge %} |
| `seed` | String | _(Optional)_ The secret seed to use to sign the claim. This must be the same key pair as the public key specified in the channel. Must be in the XRP Ledger's [base58][] format. If provided, you must also specify the `key_type`. Cannot be used with `secret`, `seed_hex`, or `passphrase`. {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.4.0" %}New in: rippled 1.4.0{% /badge %} |
| `seed_hex` | String | _(Optional)_ The secret seed to use to sign the claim. This must be the same key pair as the public key specified in the channel. Must be in hexadecimal format. If provided, you must also specify the `key_type`. Cannot be used with `secret`, `seed`, or `passphrase`. {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.4.0" %}New in: rippled 1.4.0{% /badge %} |
| `passphrase` | String | _(Optional)_ A string passphrase to use to sign the claim. This must be the same key pair as the public key specified in the channel. The [key derived from this passphrase](../../../../concepts/accounts/cryptographic-keys.md#key-derivation) must match the public key specified in the channel. If provided, you must also specify the `key_type`. Cannot be used with `secret`, `seed`, or `seed_hex`. {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.4.0" %}New in: rippled 1.4.0{% /badge %} |
| `key_type` | String | _(Optional)_ The [signing algorithm](../../../../concepts/accounts/cryptographic-keys.md#signing-algorithms) of the cryptographic key pair provided. Valid types are `secp256k1` or `ed25519`. The default is `secp256k1`. {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.4.0" %}New in: rippled 1.4.0{% /badge %} |
| `amount` | String | Cumulative amount of XRP, in drops, to authorize. If the destination has already received a lesser amount of XRP from this channel, the signature created by this method can be redeemed for the difference. |
The request **must** specify exactly one of `secret`, `seed`, `seed_hex`, or `passphrase`.
**Warning:** Do not send secret keys to untrusted servers or through unsecured network connections. (This includes the `secret`, `seed`, `seed_hex`, or `passphrase` fields of this request.) You should only use this method on a secure, encrypted network connection to a server you run or fully trust with your funds. Otherwise, eavesdroppers could use your secret key to sign claims and take all the money from this payment channel and anything else using the same key pair. See [Set Up Secure Signing](secure-signing.html) for instructions.
**Warning:** Do not send secret keys to untrusted servers or through unsecured network connections. (This includes the `secret`, `seed`, `seed_hex`, or `passphrase` fields of this request.) You should only use this method on a secure, encrypted network connection to a server you run or fully trust with your funds. Otherwise, eavesdroppers could use your secret key to sign claims and take all the money from this payment channel and anything else using the same key pair. See [Set Up Secure Signing](../../../../concepts/transactions/secure-signing.md) for instructions.
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": "channel_authorize_example_id1",
@@ -89,9 +88,9 @@ An example of a successful response:
}
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
200 OK
@@ -102,9 +101,9 @@ An example of a successful response:
}
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```json
{
"result": {
@@ -113,8 +112,9 @@ An example of a successful response:
}
}
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
The response follows the [standard format][], with a successful result containing the following fields:
@@ -125,12 +125,9 @@ The response follows the [standard format][], with a successful result containin
## Possible Errors
* Any of the [universal error types][].
* `badKeyType` - The `key_type` parameter in the request is not a valid key type. (Valid types are `secp256k1` or `ed25519`.) [New in: rippled 1.4.0][]
* `badKeyType` - The `key_type` parameter in the request is not a valid key type. (Valid types are `secp256k1` or `ed25519`.) {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.4.0" %}New in: rippled 1.4.0{% /badge %}
* `badSeed` - The `secret` in the request is not a valid secret key.
* `channelAmtMalformed` - The `amount` in the request is not a valid [XRP amount][XRP, in drops].
* `channelMalformed` - The `channel_id` in the request is not a valid Channel ID. The Channel ID should be a 256-bit (64-character) hexadecimal string.
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% raw-partial file="/_snippets/common-links.md" /%}

View File

@@ -8,17 +8,16 @@ labels:
# channel_verify
[[Source]](https://github.com/XRPLF/rippled/blob/d4a56f223a3b80f64ff70b4e90ab6792806929ca/src/ripple/rpc/handlers/PayChanClaim.cpp#L89 "Source")
_(Added by the [PayChan amendment][] to be enabled. [New in: rippled 0.33.0][])_
_(Added by the [PayChan amendment][] to be enabled. {% badge href="https://github.com/XRPLF/rippled/releases/tag/0.33.0" %}New in: rippled 0.33.0{% /badge %})_
The `channel_verify` method checks the validity of a signature that can be used to redeem a specific amount of XRP from a payment channel.
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": 1,
@@ -29,9 +28,9 @@ An example of the request format:
"amount": "1000000"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "channel_verify",
@@ -43,15 +42,16 @@ An example of the request format:
}]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
#Syntax: channel_verify <public_key> <channel_id> <amount> <signature>
rippled channel_verify aB44YfzW24VDEJQ2UuLPV2PvqcPCSoLnL7y5M1EzhdW4LnK5xMS3 5DB01B7FFED6B67E6B0414DED11E051D2EE2B7619CE0EAA6286D67A3A4D5BDB3 1000000 304402204EF0AFB78AC23ED1C472E74F4299C0C21F1B21D07EFC0A3838A420F76D783A400220154FB11B6F54320666E4C36CA7F686C16A3A0456800BBC43746F34AF50290064
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
The request includes the following parameters:
@@ -59,17 +59,16 @@ The request includes the following parameters:
|-------|------|-------------|
| `amount` | String | The amount of [XRP, in drops][], the provided `signature` authorizes. |
| `channel_id` | String | The Channel ID of the channel that provides the XRP. This is a 64-character hexadecimal string. |
| `public_key` | String | The public key of the channel and the key pair that was used to create the signature, in hexadecimal or the XRP Ledger's [base58][] format. [Updated in: rippled 0.90.0][] |
| `public_key` | String | The public key of the channel and the key pair that was used to create the signature, in hexadecimal or the XRP Ledger's [base58][] format. {% badge href="https://github.com/XRPLF/rippled/releases/tag/0.90.0" %}Updated in: rippled 0.90.0{% /badge %} |
| `signature` | String | The signature to verify, in hexadecimal. |
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": 1,
@@ -80,9 +79,9 @@ An example of a successful response:
}
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
200 OK
@@ -93,9 +92,9 @@ An example of a successful response:
}
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```json
{
"result": {
@@ -104,8 +103,9 @@ An example of a successful response:
}
}
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
The response follows the [standard format][], with a successful result containing the following fields:
@@ -119,10 +119,8 @@ The response follows the [standard format][], with a successful result containin
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `publicMalformed` - The `public_key` field of the request is not a valid public key in the correct format. Public keys are 33 bytes and must be represented in base58 or hexadecimal. The [base58 representation of account public keys starts with the letter `a`](base58-encodings.html). The hexadecimal representation is 66 characters long.
* `publicMalformed` - The `public_key` field of the request is not a valid public key in the correct format. Public keys are 33 bytes and must be represented in base58 or hexadecimal. The [base58 representation of account public keys starts with the letter `a`](../../../protocol/data-types/base58-encodings.md). The hexadecimal representation is 66 characters long.
* `channelMalformed` - The `channel_id` field of the request is not a valid Channel ID. The Channel ID must be a 256-bit (64-character) hexadecimal string.
* `channelAmtMalformed` - The value specified in the `amount` field was not a valid [XRP amount][XRP, in drops].
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}
{% raw-partial file="/_snippets/common-links.md" /%}

View File

@@ -1,8 +1,12 @@
---
html: payment-channel-methods.html
parent: public-api-methods.html
template: pagetype-category.html.jinja
metadata:
indexPage: true
---
# Payment Channel Methods
Payment channels are a tool for facilitating repeated, unidirectional payments, or temporary credit between two parties. Use these methods to work with payment channels.
Payment channels are a tool for facilitating repeated, unidirectional payments, or temporary credit between two parties. Use these methods to work with payment channels.
{% child-pages /%}