Rename API method categories

This commit is contained in:
mDuo13
2022-06-28 04:09:37 -07:00
parent 42117756c6
commit 3458809228
160 changed files with 279 additions and 257 deletions

View File

@@ -0,0 +1,71 @@
---
html: admin-api-methods.html
parent: http-websocket-apis.html
blurb: これらの管理APIメソッドを使用してrippledサーバーを管理します。
labels:
- コアサーバー
---
# 管理APIメソッド
`rippled`サーバーと直接通信する際には管理APIメソッドを使用します。管理メソッドは、信頼できるサーバー運用担当者のみを対象としています。管理メソッドには、サーバーの管理、監視、デバッグのためのコマンドが含まれています。
管理コマンドを使用できるのは、管理者として、`rippled.cfg`ファイルに指定されているホストとポートで`rippled`サーバーに接続している場合に限られます。デフォルトでは、コマンドラインクライアントが管理接続を使用します。`rippled`への接続についての詳細は、[rippled API入門](get-started-using-http-websocket-apis.html)を参照してください。
## [キー生成メソッド](key-generation-methods.html)
キーを生成および管理するには、以下のメソッドを使用します。
* **[`validation_create`](validation_create.html)** - 新しいrippledバリデータのキーを生成します。
* **[`wallet_propose`](wallet_propose.html)** - 新規アカウントのキーを生成します。
## [ロギングおよびデータ管理のメソッド](logging-and-data-management-methods.html)
ログレベルとその他のデータ(レジャーなど)の管理には、以下のメソッドを使用します。
* **[`can_delete`](can_delete.html)** - 特定レジャーまでのレジャーのオンライン削除を許可します。
* **[`download_shard`](download_shard.html)** - レジャー履歴の特定のシャードをダウンロードします。
* **[`ledger_cleaner`](ledger_cleaner.html)** - レジャークリーナーサービスが破損データを確認するように設定します。
* **[`ledger_request`](ledger_request.html)** - ピアサーバーに対し特定のレジャーバージョンを照会します。
* **[`log_level`](log_level.html)** - ログの詳細レベルを取得または変更します。
* **[`logrotate`](logrotate.html)** - ログファイルを再度開きます。
## [サーバー制御メソッド](server-control-methods.html)
rippledサーバーの管理には、以下のメソッドを使用します。
* **[`connect`](connect.html)** - rippledサーバーを特定のピアに強制的に接続します。
* **[`ledger_accept`](ledger_accept.html)** - スタンドアロンモードでレジャーを閉鎖し、次のレジャーに進みます。
* **[`stop`](stop.html)** - rippledサーバーをシャットダウンします。
* **[`validation_seed`](validation_seed.html)** - 検証に使用するキーを一時的に設定します。
## [ステータスおよびデバッグメソッド](status-and-debugging-methods.html)
ネットワークとサーバーのステータスを確認するには、以下のメソッドを使用します。
* **[`consensus_info`](consensus_info.html)** - 発生したコンセンサスの状態に関する情報を取得します。
* **[`feature`](feature.html)** - プロトコルAmendmentに関する情報を取得します。
* **[`fetch_info`](fetch_info.html)** - サーバーとネットワークの同期に関する情報を取得します。
* **[`get_counts`](get_counts.html)** - サーバー内部とメモリー使用状況に関する統計情報を取得します。
* **[`peers`](peers.html)** - 接続しているピアサーバーに関する情報を取得します。
* **[`print`](print.html)** - 内部サブシステムに関する情報を取得します。
* **[`validators`](validators.html)** - 現在のバリデータに関する情報を取得します。
* **[`validator_list_sites`](validator_list_sites.html)** - バリデータリストを公開するサイトに関する情報を取得します。
## 廃止予定のメソッド
以下の管理コマンドは廃止予定であり、今後予告なしに削除される可能性があります。
* `ledger_header` - 代わりに[ledgerメソッド][]を使用してください。
* `unl_add``unl_delete``unl_list``unl_load``unl_network``unl_reset``unl_score` - 代わりに UNL管理用構成ファイルを使用してください。
* `wallet_seed` - 代わりに[wallet_proposeメソッド][]を使用してください。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,91 @@
---
html: admin-api-methods.html
parent: http-websocket-apis.html
blurb: Administer an XRP Ledger server with these API methods.
labels:
- Core Server
---
# Admin API Methods
Administer a `rippled` server using these admin API methods. Admin methods are meant only for trusted personnel in charge of keeping the server operational. Admin methods include commands for managing, monitoring, and debugging the server.
Admin commands are available only if you connect to `rippled` on a host and port that the `rippled.cfg` file identifies as admin. By default, the commandline client uses an admin connection. For more information on connecting to `rippled`, see [Getting Started with the `rippled` API](get-started-using-http-websocket-apis.html).
## [Key Generation Methods](key-generation-methods.html)
Use these methods to generate and manage keys.
* **[`validation_create`](validation_create.html)** - Generate formatted for `rippled` node key pair. (Validators should use [tokens](run-rippled-as-a-validator.html) instead of keys generated by this method.)
* **[`wallet_propose`](wallet_propose.html)** - Generate keys for a new account.
## [Logging and Data Management Methods](logging-and-data-management-methods.html)
Use these methods to manage log levels and other data, such as ledgers.
* **[`can_delete`](can_delete.html)** - Allow online deletion of ledgers up to a specific ledger.
* **[`download_shard`](download_shard.html)** - Download a specific shard of ledger history.
* **[`ledger_cleaner`](ledger_cleaner.html)** - Configure the ledger cleaner service to check for corrupted data.
* **[`ledger_request`](ledger_request.html)** - Query a peer server for a specific ledger version.
* **[`log_level`](log_level.html)** - Get or modify log verbosity.
* **[`logrotate`](logrotate.html)** - Reopen the log file.
* **[`node_to_shard`](node_to_shard.html)** - Copy data from the ledger store to the shard store.
## [Server Control Methods](server-control-methods.html)
Use these methods to manage the `rippled` server.
* **[`ledger_accept`](ledger_accept.html)** - Close and advance the ledger in stand-alone mode.
* **[`stop`](stop.html)** - Shut down the `rippled` server.
## [Signing Methods](signing-methods.html)
Use these methods to sign transactions.
* **[`sign`](sign.html)** - Cryptographically sign a transaction.
* **[`sign_for`](sign_for.html)** - Contribute to a multi-signature.
By default, these methods are [admin-only](get-started-using-http-websocket-apis.html#admin-access). They can be used as public methods if the server admin has [enabled public signing](enable-public-signing.html).
## [Peer Management Methods](peer-management-methods.html)
Use these methods to manage the server's connections in the peer-to-peer XRP Ledger network.
* **[`connect`](connect.html)** - Force the `rippled` server to connect to a specific peer.
* **[`peer_reservations_add`](peer_reservations_add.html)** - Add or update a reserved slot for a specific peer.
* **[`peer_reservations_del`](peer_reservations_del.html)** - Remove a reserved slot for a specific peer.
* **[`peer_reservations_list`](peer_reservations_list.html)** - List reserved slots for specific peers.
* **[`peers`](peers.html)** - Get information about the peer servers connected.
## [Status and Debugging Methods](status-and-debugging-methods.html)
Use these methods to check the status of the network and server.
* **[`consensus_info`](consensus_info.html)** - Get information about the state of consensus as it happens.
* **[`feature`](feature.html)** - Get information about protocol amendments.
* **[`fetch_info`](fetch_info.html)** - Get information about the server's sync with the network.
* **[`get_counts`](get_counts.html)** - Get statistics about the server's internals and memory usage.
* **[`manifest`](manifest.html)** - Get the latest public key information about a known validator.
* **[`print`](print.html)** - Get information about internal subsystems.
* **[`validator_info`](validator_info.html)** - Get information about the server's validator settings, if configured as a validator.
* **[`validator_list_sites`](validator_list_sites.html)** - Get information about sites that publish validator lists.
* **[`validators`](validators.html)** - Get information about the current validators.
## Deprecated Methods
The following admin commands are deprecated and may be removed without further notice:
* `ledger_header` - Use the [ledger method][] instead.
* `unl_add`, `unl_delete`, `unl_list`, `unl_load`, `unl_network`, `unl_reset`, `unl_score` - Use the `validators.txt` config file for UNL management instead.
* `wallet_seed` - Use the [wallet_propose method][] instead.
The [validation_seed method][] has been removed since `rippled` v0.29.1.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,119 @@
---
html: validation_create.html
parent: key-generation-methods.html
blurb: rippledサーバーがネットワークに対して自身の身元を識別させるのに使用できる暗号鍵を生成します。
labels:
- セキュリティ
- コアサーバー
---
# validation_create
[[ソース]](https://github.com/ripple/rippled/blob/315a8b6b602798a4cff4d8e1911936011e12abdb/src/ripple/rpc/handlers/ValidationCreate.cpp "Source")
`validation_create`コマンドキーを使用して、[`rippled`サーバーがネットワークに対して自身の身元を識別させるのに使用できる暗号鍵](peer-protocol.html#ノードキーペア)を生成します。[wallet_proposeメソッド][]と同様に、このメソッドでは適切なフォーマットで一連のキーが単に生成されるだけです。XRP Ledgerのデータやサーバー構成は変更されません。
_`validation_create`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
サーバーを設定することにより、生成されたキーペアを検証の署名(検証キーペア)に使用するか、または通常のピアツーピア通信の署名([ノードキーペア](peer-protocol.html#ノードキーペア))に使用するかを指定できます。
**ヒント:** 堅牢なバリデータを設定するには、`validator-keys`ツール(`rippled` RPMに付属を使用してバリデータトークンローテーション可能とオフラインマスターキーを生成してください。詳細は、[rippledサーバーで検証を有効化](run-rippled-as-a-validator.html#3-rippledサーバーで検証を有効化)を参照してください。
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 0,
"command": "validation_create",
"secret": "BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE"
}
```
*JSON-RPC*
```json
{
"method": "validation_create",
"params": [
{
"secret": "BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE"
}
]
}
```
*コマンドライン*
```sh
#Syntax: validation_create [secret]
rippled validation_create "BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE"
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:---------|:-------|:---------------------------------------------------------|
| `secret` | 文字列 | _省略可_ クレデンシャルを生成するときにこの値をシードとして使用します。同じシークレットを使用すると常に同じクレデンシャルが生成されます。シードは[RFC-1751](https://tools.ietf.org/html/rfc1751)フォーマットまたはXRP Ledgerの[base58][]フォーマットで指定できます。省略すると、ランダムシードが生成されます。 |
**注記:** バリデータのセキュリティは、シードのエントロピーに応じて異なります。シークレット値が強力なランダム性のソースを使用して生成されている場合を除き、実際の事業目的のためにシークレット値を使用しないでください。新しいクレデンシャルを初めて生成するときには`secret`を省略することが推奨されます。
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
{
"result" : {
"status" : "success",
"validation_key" : "FAWN JAVA JADE HEAL VARY HER REEL SHAW GAIL ARCH BEN IRMA",
"validation_public_key" : "n9Mxf6qD4J55XeLSCEpqaePW4GjoCR5U1ZeGZGJUCNe3bQa4yQbG",
"validation_seed" : "ssZkdwURFMBXenJPbrpE14b6noJSu"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"status" : "success",
"validation_key" : "FAWN JAVA JADE HEAL VARY HER REEL SHAW GAIL ARCH BEN IRMA",
"validation_public_key" : "n9Mxf6qD4J55XeLSCEpqaePW4GjoCR5U1ZeGZGJUCNe3bQa4yQbG",
"validation_seed" : "ssZkdwURFMBXenJPbrpE14b6noJSu"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:------------------------|:-------|:------------------------------------------|
| `validation_key` | 文字列 | これらの検証クレデンシャルのシークレットキー([RFC-1751](https://tools.ietf.org/html/rfc1751)フォーマット)。 |
| `validation_public_key` | 文字列 | これらの検証クレデンシャルの公開鍵XRP Ledgerの[base58][]エンコード文字列フォーマット)。 |
| `validation_seed` | 文字列 | これらの検証クレデンシャルのシークレットキーXRP Ledgerの[base58][]エンコード文字列フォーマット)。 |
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
* `badSeed` - 要求に無効なシード値が指定されていました。この場合は通常、シード値が異なるフォーマットの有効文字列(アカウントアドレス、検証の公開鍵など)である可能性があります。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,119 @@
---
html: validation_create.html
parent: key-generation-methods.html
blurb: Generate keys for a rippled server to identify itself to the network.
labels:
- Security
- Core Server
---
# validation_create
[[Source]](https://github.com/ripple/rippled/blob/315a8b6b602798a4cff4d8e1911936011e12abdb/src/ripple/rpc/handlers/ValidationCreate.cpp "Source")
Use the `validation_create` command to generate [cryptographic keys a `rippled` server can use to identify itself to the network](peer-protocol.html#node-key-pair). Similar to the [wallet_propose method][], this method only generates a set of keys in the proper format. It does not any makes changes to the XRP Ledger data or server configuration.
_The `validation_create` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
You can configure your server to use the generated key pair to sign validations (validation key pair) or regular peer-to-peer communications ([node key pair](peer-protocol.html#node-key-pair)).
**Tip:** For configuring a robust validator, you should use the `validator-keys` tool (included in the `rippled` RPM) to generate validator tokens (which can be rotated) with an offline master key. For more information, see [Validator Setup](run-rippled-as-a-validator.html#3-enable-validation-on-your-rippled-server).
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 0,
"command": "validation_create",
"secret": "BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE"
}
```
*JSON-RPC*
```json
{
"method": "validation_create",
"params": [
{
"secret": "BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE"
}
]
}
```
*Commandline*
```sh
#Syntax: validation_create [secret]
rippled validation_create "BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE"
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:---------|:-------|:---------------------------------------------------------|
| `secret` | String | _(Optional)_ Use this value as a seed to generate the credentials. The same secret always generates the same credentials. You can provide the seed in [RFC-1751](https://tools.ietf.org/html/rfc1751) format or the XRP Ledger's [base58][] format. If omitted, generate a random seed. |
**Note:** The security of your validator depends on the entropy of your seed. Do not use a secret value for real business purposes unless it is generated with a strong source of randomness. Ripple recommends omitting the `secret` when generating new credentials for the first time.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
{
"result" : {
"status" : "success",
"validation_key" : "FAWN JAVA JADE HEAL VARY HER REEL SHAW GAIL ARCH BEN IRMA",
"validation_public_key" : "n9Mxf6qD4J55XeLSCEpqaePW4GjoCR5U1ZeGZGJUCNe3bQa4yQbG",
"validation_seed" : "ssZkdwURFMBXenJPbrpE14b6noJSu"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"status" : "success",
"validation_key" : "FAWN JAVA JADE HEAL VARY HER REEL SHAW GAIL ARCH BEN IRMA",
"validation_public_key" : "n9Mxf6qD4J55XeLSCEpqaePW4GjoCR5U1ZeGZGJUCNe3bQa4yQbG",
"validation_seed" : "ssZkdwURFMBXenJPbrpE14b6noJSu"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:------------------------|:-------|:------------------------------------------|
| `validation_key` | String | The secret key for these validation credentials, in [RFC-1751](https://tools.ietf.org/html/rfc1751) format. |
| `validation_public_key` | String | The public key for these validation credentials, in the XRP Ledger's [base58][] encoded string format. |
| `validation_seed` | String | The secret key for these validation credentials, in the XRP Ledger's [base58][] encoded string format. |
### Possible Errors
* Any of the [universal error types][].
* `badSeed` - The request provided an invalid seed value. This usually means that the seed value appears to be a valid string of a different format, such as an account address or validation public key.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,206 @@
---
html: wallet_propose.html
parent: key-generation-methods.html
blurb: キーペアとXRP Ledgerアドレスを生成します。
labels:
- セキュリティ
- アカウント
---
# wallet_propose
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/WalletPropose.cpp "Source")
`wallet_propose`メソッドを使用して、キーペアとXRP Ledgerアドレスを生成します。このコマンドは単にキーとアドレス値を生成し、XRP Ledger自体には何ら影響しません。レジャー上で資金供給済みのアドレスになるには、そのアドレスで、[必要準備金](reserves.html)を満たすのに十分なXRPの[Paymentトランザクションを受け取る](accounts.html#アカウントの作成)必要があります。
*`wallet_propose`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。*(このコマンドは、アカウントの機密情報を求めてネットワーク上の伝送情報をスニッフィングする人々から守るためにadminコマンドとされています。adminコマンドは通常、外部ネットワーク上で伝送されることはありません。
[更新: rippled 0.31.0][]
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocketキータイプあり*
```json
{
"command": "wallet_propose",
"seed": "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
"key_type": "secp256k1"
}
```
*WebSocketキータイプなし*
```json
{
"command": "wallet_propose",
"passphrase": "masterpassphrase"
}
```
*JSON-RPCキータイプあり*
```json
{
"method": "wallet_propose",
"params": [
{
"seed": "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
"key_type": "secp256k1"
}
]
}
```
*JSON-RPCキータイプなし*
```json
{
"method": "wallet_propose",
"params": [
{
"passphrase": "snoPBrXtMeMyMHUVTgbuqAfg1SUTb"
}
]
}
```
*コマンドライン*
```sh
#Syntax: wallet_propose [passphrase]
rippled wallet_propose masterpassphrase
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターを含めることができます。
| `Field` | 型 | 説明 |
|:-------------|:-------|:-----------------------------------------------------|
| `key_type` | 文字列 | このキーペアの導出に使用する[署名アルゴリズム](cryptographic-keys.html#署名アルゴリズム)。有効な値は`ed25519``secp256k1`(すべて小文字)です。デフォルトは`secp256k1`です。 |
| `passphrase` | 文字列 | _省略可_ このシード値からキーペアとアドレスを生成します。この値は、[16進数][]、XRP Ledgerの[base58][]フォーマット、[RFC-1751][]、または任意の文字列でフォーマットできます。`seed`または`seed_hex`とともに使用することはできません。 |
| `seed` | 文字列 | _省略可能_ このシード値からXRP Ledgerの[base58][]エンコードフォーマットでキーペアとアドレスを生成します。`passphrase`または`seed_hex`とともに使用することはできません。 |
| `seed_hex` | 文字列 | _省略可能_ このシード値から[16進数][]形式でキーペアとアドレスを生成します。`passphrase`または`seed`とともに使用することはできません。 |
以下のフィールドのうち**1つ**を指定する必要があります。`passphrase``seed`、または`seed_hex`。3つすべてを省略すると、`rippled`によってランダムシードが使用されます。
**注記:** このコマンドのコマンドラインバージョンでは[Ed25519](https://ed25519.cr.yp.to/)キーを生成できません。
#### シードの指定
ほとんどの場合、強力な乱数ソースから生成されたシード値を使用する必要があります。あるアドレスのシード値を知っている人は、[そのアドレスで署名されたトランザクションを送信する](transaction-basics.html#トランザクションの承認)すべての権限を持っています。一般的に、ランダムシードの生成には、このコマンドにパラメーターを指定しないで実行する方法が適しています。
以下の場合には、既知のシードを指定します。
* アドレスに関連するシードのみを知っていて、アドレスを再計算する
* `rippled`の機能をテストする
シードは、以下のどのフォーマットでも指定できます。
* XRP Ledgerの[base58][]フォーマットのシークレットキー文字列。例: `snoPBrXtMeMyMHUVTgbuqAfg1SUTb`
* [RFC-1751][]フォーマット文字列secp256k1キーペアのみ。例: `I IRE BOND BOW TRIO LAID SEAT GOAL HEN IBIS IBIS DARE`
* 128ビットの[16進数][]文字列。例: `DEDCE9CE67B451D852FD4E846FCDE31C`
* シード値として使用する任意の文字列。例: `masterpassphrase`
[RFC-1751]: https://tools.ietf.org/html/rfc1751 ""
[16進数]: https://en.wikipedia.org/wiki/Hexadecimal ""
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"status": "success",
"type": "response",
"result": {
"account_id": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"key_type": "secp256k1",
"master_key": "I IRE BOND BOW TRIO LAID SEAT GOAL HEN IBIS IBIS DARE",
"master_seed": "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
"master_seed_hex": "DEDCE9CE67B451D852FD4E846FCDE31C",
"public_key": "aBQG8RQAzjs1eTKFEAQXr2gS4utcDiEC9wmi7pfUPTi27VCahwgw",
"public_key_hex": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020"
}
}
```
*JSON-RPC*
```json
{
"result": {
"account_id": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"key_type": "secp256k1",
"master_key": "I IRE BOND BOW TRIO LAID SEAT GOAL HEN IBIS IBIS DARE",
"master_seed": "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
"master_seed_hex": "DEDCE9CE67B451D852FD4E846FCDE31C",
"public_key": "aBQG8RQAzjs1eTKFEAQXr2gS4utcDiEC9wmi7pfUPTi27VCahwgw",
"public_key_hex": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"status": "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"account_id" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"key_type" : "secp256k1",
"master_key" : "I IRE BOND BOW TRIO LAID SEAT GOAL HEN IBIS IBIS DARE",
"master_seed" : "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
"master_seed_hex" : "DEDCE9CE67B451D852FD4E846FCDE31C",
"public_key" : "aBQG8RQAzjs1eTKFEAQXr2gS4utcDiEC9wmi7pfUPTi27VCahwgw",
"public_key_hex" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
応答は[標準フォーマット][]に従い、正常に終了した場合、新しい(可能性がある)アカウントについての重要な各種情報を含みます。以下のフィールドを含みます。
| `Field` | 型 | 説明 |
|:------------------|:-------|:------------------------------------------------|
| `key_type` | 文字列 | このキーペアの導出に使用された[署名アルゴリズム](cryptographic-keys.html#署名アルゴリズム)。有効な値は`ed25519``secp256k1`(すべて小文字)です。 |
| `master_seed` | 文字列 | これはキーペアの秘密鍵です。このアカウントに関するその他のあらゆる情報が、マスターシードからXRP Ledgerの[base58][]エンコード文字列フォーマットで引き出されます。通常、このフォーマットのキーを使用してトランザクションに署名します。 |
| `master_seed_hex` | 文字列 | 16進数形式のマスターシード。単純で広く支持されている秘密鍵表示法。トランザクションの署名に使用できます。 |
| `master_key` | 文字列 | **廃止予定** [RFC-1751][]形式のマスターシード。覚えやすく書き留めやすい秘密鍵。トランザクションの署名に使用できます。**注記:** `rippled`の実装では、RFC-1751からデコードした後、RFC-1751にエンコードする前に、キーのバイト順序が逆になります。別のRFC-1751実装を使用して、XRP Ledgerで使用するキーの読み書きを行う場合は、同様にして、`rippled`のRFC-1751エンコーディングとの互換性を保つ必要があります。 |
| `account_id` | 文字列 | XRP Ledgerの[base58][]フォーマットで作成されたアカウントの[アドレス][]。これは公開鍵ではありませんが、公開鍵を2回ハッシュ化したものです。チェックサムも持っているため、タイプミスした場合はほぼ間違いなく無効なアドレスとみなされ、有効だが異なるアドレスとはみなされません。これはXRP LedgerのアカウントのプライマリIDです。支払いを受けるときにこれを人に伝えたり、トランザクションにおいて、自身や、支払先、委託先識別するのに使用します。[マルチ署名のリスト](multi-signing.html)でもこれを使用して、他の署名者を識別します。 |
| `public_key` | 文字列 | XRP Ledgerの[base58][]エンコード文字列フォーマットで作成された、キーペアの公開鍵。`master_seed`から生成されます。 |
| `public_key_hex` | 文字列 | これは16進数で作成されたキーペアの公開鍵です。`master_seed`から生成されます。トランザクションの署名を検証する場合、`rippled`にはこの公開鍵が必要です。そのため、署名されたトランザクションのフォーマットの`SigningPubKey`フィールドには公開鍵が入力されています。 |
| `warning` | 文字列 | (削除される可能性あり)要求にシード値を指定した場合、このフィールドに安全でない可能性があるという警告が表示されます。[新規: rippled 0.32.0][] |
このメソッドを使用してキーペアを生成し、アカウントのレギュラーキーペアとして使用することもできます。アカウントにレギュラーキーペアを割り当てて、それを使用してほとんどのトランザクションに署名し、マスターキーペアをできるだけオフラインにしておくことも可能です。
レギュラーキーペアとして使用するほかに、マルチ署名のリストSignerListのメンバーとして使用することもできます。
マスターキーペアとレギュラーキーペアの詳細は、[暗号鍵](cryptographic-keys.html)を参照してください。
マルチ署名の詳細は、[マルチ署名](multi-signing.html)を参照してください。
### 考えられるエラー
* いずれかの[汎用エラータイプ][]。
* `invalidParams` - 1つ以上のフィールドが不正に指定されています。
* `badSeed` - 要求には、空の文字列やXRP Ledgerアドレスに似た文字列などの許可されないシード値が`passphrase``seed`、または`seed_hex`フィールド内に)指定されています。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,206 @@
---
html: wallet_propose.html
parent: key-generation-methods.html
blurb: Generate keys for a new account.
labels:
- Security
- Accounts
---
# wallet_propose
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/WalletPropose.cpp "Source")
Use the `wallet_propose` method to generate a key pair and XRP Ledger address. This command only generates key and address values, and does not affect the XRP Ledger itself in any way. To become a funded address stored in the ledger, the address must [receive a Payment transaction](accounts.html#creating-accounts) that provides enough XRP to meet the [reserve requirement](reserves.html).
*The `wallet_propose` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users!* (This command is restricted to protect against people sniffing network traffic for account secrets, since admin commands are not usually transmitted over the outside network.)
[Updated in: rippled 0.31.0][]
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket (with key type)*
```json
{
"command": "wallet_propose",
"seed": "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
"key_type": "secp256k1"
}
```
*WebSocket (no key type)*
```json
{
"command": "wallet_propose",
"passphrase": "masterpassphrase"
}
```
*JSON-RPC (with key type)*
```json
{
"method": "wallet_propose",
"params": [
{
"seed": "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
"key_type": "secp256k1"
}
]
}
```
*JSON-RPC (no key type)*
```json
{
"method": "wallet_propose",
"params": [
{
"passphrase": "snoPBrXtMeMyMHUVTgbuqAfg1SUTb"
}
]
}
```
*Commandline*
```sh
#Syntax: wallet_propose [passphrase]
rippled wallet_propose masterpassphrase
```
<!-- MULTICODE_BLOCK_END -->
The request can contain the following parameters:
| `Field` | Type | Description |
|:-------------|:-------|:-----------------------------------------------------|
| `key_type` | String |Which [signing algorithm](cryptographic-keys.html#signing-algorithms) to use to derive this key pair. Valid values are `ed25519` and `secp256k1` (all lower case). The default is `secp256k1`. |
| `passphrase` | String | _(Optional)_ Generate a key pair and address from this seed value. This value can be formatted in [hexadecimal][], the XRP Ledger's [base58][] format, [RFC-1751][], or as an arbitrary string. Cannot be used with `seed` or `seed_hex`. |
| `seed` | String | _(Optional)_ Generate the key pair and address from this seed value in the XRP Ledger's [base58][]-encoded format. Cannot be used with `passphrase` or `seed_hex`. |
| `seed_hex` | String | _(Optional)_ Generate the key pair and address from this seed value in [hexadecimal][] format. Cannot be used with `passphrase` or `seed`. |
You must provide **at most one** of the following fields: `passphrase`, `seed`, or `seed_hex`. If you omit all three, `rippled` uses a random seed.
**Note:** The commandline version of this command cannot generate [Ed25519](https://ed25519.cr.yp.to/) keys.
#### Specifying a Seed
For most cases, you should use a seed value generated from a strong source of randomness. Anyone who knows the seed value for an address has full power to [send transactions signed by that address](transaction-basics.html#authorizing-transactions). Generally, running this command with no parameters is a good way to generate a random seed.
Cases where you would specify a known seed include:
* Re-calculating your address when you only know the seed associated with that address
* Testing `rippled` functionality
If you do specify a seed, you can specify it in any of the following formats:
* As a secret key string in the XRP Ledger's [base58][] format. Example: `snoPBrXtMeMyMHUVTgbuqAfg1SUTb`.
* As an [RFC-1751][] format string (secp256k1 key pairs only). Example: `I IRE BOND BOW TRIO LAID SEAT GOAL HEN IBIS IBIS DARE`.
* As a 128-bit [hexadecimal][] string. Example: `DEDCE9CE67B451D852FD4E846FCDE31C`.
* An arbitrary string to use as a seed value. For example: `masterpassphrase`.
[RFC-1751]: https://tools.ietf.org/html/rfc1751
[hexadecimal]: https://en.wikipedia.org/wiki/Hexadecimal
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"status": "success",
"type": "response",
"result": {
"account_id": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"key_type": "secp256k1",
"master_key": "I IRE BOND BOW TRIO LAID SEAT GOAL HEN IBIS IBIS DARE",
"master_seed": "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
"master_seed_hex": "DEDCE9CE67B451D852FD4E846FCDE31C",
"public_key": "aBQG8RQAzjs1eTKFEAQXr2gS4utcDiEC9wmi7pfUPTi27VCahwgw",
"public_key_hex": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020"
}
}
```
*JSON-RPC*
```json
{
"result": {
"account_id": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"key_type": "secp256k1",
"master_key": "I IRE BOND BOW TRIO LAID SEAT GOAL HEN IBIS IBIS DARE",
"master_seed": "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
"master_seed_hex": "DEDCE9CE67B451D852FD4E846FCDE31C",
"public_key": "aBQG8RQAzjs1eTKFEAQXr2gS4utcDiEC9wmi7pfUPTi27VCahwgw",
"public_key_hex": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"status": "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"account_id" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"key_type" : "secp256k1",
"master_key" : "I IRE BOND BOW TRIO LAID SEAT GOAL HEN IBIS IBIS DARE",
"master_seed" : "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
"master_seed_hex" : "DEDCE9CE67B451D852FD4E846FCDE31C",
"public_key" : "aBQG8RQAzjs1eTKFEAQXr2gS4utcDiEC9wmi7pfUPTi27VCahwgw",
"public_key_hex" : "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing various important information about the new (potential) account, including the following fields:
| `Field` | Type | Description |
|:------------------|:-------|:------------------------------------------------|
| `key_type` | String | Which [signing algorithm](cryptographic-keys.html#signing-algorithms) was used to derive this key pair. Valid values are `ed25519` and `secp256k1` (all lower case). |
| `master_seed` | String | This is the private key of the key pair. The master seed from which all other information about this account is derived, in the XRP Ledger's [base58][] encoded string format. Typically, you use the key in this format to sign transactions. |
| `master_seed_hex` | String | The master seed, in hex format. A simple, widely-supported way to represent the private key. Can be used to sign transactions. |
| `master_key` | String | **DEPRECATED** The master seed, in [RFC-1751][] format. An easier to remember, easier-to-write-down version of the private key. Can be used to sign transactions. **Note:** The `rippled` implementation reverses the byte order of the key after decoding from RFC-1751 and before encoding it to RFC-1751; if you read or write keys for use with the XRP Ledger using a different RFC-1751 implementation, you must do the same to be compatible with `rippled`'s RFC-1751 encoding. |
| `account_id` | String | The [Address][] of the account in the XRP Ledger's [base58][] format. This is not the public key, but a hash-of-a-hash of it. It also has a checksum so a typo almost certainly results in an invalid address rather than a valid, but different address. This is the primary identifier of an account in the XRP Ledger. You tell people this to get paid, and use it in transactions to indicate who you are and who you're paying, trusting, and so forth. [Multi-signing lists](multi-signing.html) also use these to identify other signers. |
| `public_key` | String | The public key of the key pair, in the XRP Ledger's [base58][] encoded string format. Derived from the `master_seed`. |
| `public_key_hex` | String | This is the public key of the key pair, in hexadecimal. Derived from the `master_seed`. To validate the signature on a transaction, `rippled` needs this public key. That's why the format for a signed transaction includes the public key in the `SigningPubKey` field. |
| `warning` | String | (May be omitted) If the request specified a seed value, this field provides a warning that it may be insecure. [New in: rippled 0.32.0][] |
You can also use this method to generate a key pair to use as a regular key pair for an account. You assign a regular key pair to an account to be able to sign most transactions with it, while keeping your master key pair offline whenever possible.
In addition to using it as a regular key pair, you can also use it as a member of a multi-signing list (SignerList).
For more information about master and regular key pairs, see [Cryptographic Keys](cryptographic-keys.html)
For more information about multi-signing and signer lists, see [Multi-Signing](multi-signing.html).
### Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly.
* `badSeed` - The request specified a disallowed seed value (in the `passphrase`, `seed`, or `seed_hex` fields), such as an empty string, or a string resembling a XRP Ledger address.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,85 @@
---
html: can_delete.html
parent: logging-and-data-management-methods.html
blurb: 指定したレジャーバージョン以前のレジャー履歴を削除可能にします。
labels:
- データ保持
---
# can_delete
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/CanDelete.cpp "Source")
`can_delete`メソッドは[指示による削除が有効なオンライン削除](online-deletion.html#指示による削除)を使用する`rippled`サーバーに削除が可能のレジャーバージョンを通知します。指定したレジャーバージョン以前が削除可能になります。指示による削除が有効ではない場合、このメソッドは何も行いません。
_`can_delete`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "can_delete",
"can_delete": 11320417
}
```
*JSON-RPC*
```json
{
"method": "can_delete",
"params": [
{
"can_delete": 11320417
}
]
}
```
*コマンドライン*
```sh
#Syntax: can_delete [<ledger_index>|<ledger_hash>|now|always|never]
rippled can_delete 11320417
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターを指定できます。
| `Field` | 型 | 説明 |
|:-------------|:------------------|:------------------------------------------|
| `can_delete` | 文字列 または整数 | _省略可_ 削除可能な最大レジャーバージョンの[レジャーインデックス][]。特殊ケース`never`を指定すると、オンライン削除が無効になります。特殊ケース`always`を指定すると、指示による削除が無効な場合と同様に、自動オンライン削除が有効になります。特殊ケース`now`を指定すると、設定されている`online_delete`値に一致するかまたはこの値を超える次の検証済みレジャーで、オンライン削除が1回実行されます。省略すると、サーバーは変更を行いませんただし現在の`can_delete`の値で応答します)。 |
### 応答フォーマット
応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:-------------|:--------|:----------------------------------------------------|
| `can_delete` | 整数 | オンライン削除ルーチンにより削除できる最大レジャーインデックス。 |
既存の`can_delete`設定を照会する場合は、パラメーターを指定せずにこのコマンドを実行します。
### 考えられるエラー
- [汎用エラータイプ][]のすべて。
- `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
- `lgrNotFound` 要求の`can_delete`フィールドに指定されているレジャーが存在しないか、存在しているがサーバーにはありません。
- `notEnabled` - オンライン削除または指示による削除のいずれかがサーバーの設定で有効になっていない場合。
- `notReady` - サーバーは現在オンライン削除を実行する準備ができていません。これは通常、サーバーが起動したが、検証済みレジャーをまだ取得していないことを意味します。
## 参照項目
- [オンライン削除](online-deletion.html)
- [指示による削除の設定](configure-advisory-deletion.html)
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,86 @@
---
html: can_delete.html
parent: logging-and-data-management-methods.html
blurb: Allow online deletion of ledgers up to a specific ledger.
labels:
- Data Retention
---
# can_delete
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/CanDelete.cpp "Source")
The `can_delete` method informs the `rippled` server of the latest ledger version which may be deleted when using [online deletion with advisory deletion enabled](online-deletion.html#advisory-deletion). If advisory deletion is not enabled, this method does nothing.
_The `can_delete` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "can_delete",
"can_delete": 11320417
}
```
*JSON-RPC*
```json
{
"method": "can_delete",
"params": [
{
"can_delete": 11320417
}
]
}
```
*Commandline*
```sh
#Syntax: can_delete [<ledger_index>|<ledger_hash>|now|always|never]
rippled can_delete 11320417
```
<!-- MULTICODE_BLOCK_END -->
The request accepts the following parameter:
| `Field` | Type | Description |
|:-------------|:------------------|:------------------------------------------|
| `can_delete` | String or Integer | _(Optional)_ The [Ledger Index][] of the maximum ledger version to allow to be deleted. The special case `never` disables online deletion. The special case `always` enables automatic online deletion as if advisory deletion was disabled. The special case `now` allows online deletion one time at the next validated ledger that meets or exceeds the configured `online_delete` value. If omitted, the server makes no changes (but still replies with the current `can_delete` value). |
### Response Format
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:-------------|:--------|:----------------------------------------------------|
| `can_delete` | Integer | The maximum ledger index that may be removed by the online deletion routine. |
Use this command with no parameter to query the existing `can_delete` setting.
### Possible Errors
- Any of the [universal error types][].
- `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
- `lgrNotFound` - The ledger specified by the `can_delete` field of the request does not exist, or it does exist but the server does not have it.
- `notEnabled` - If either online deletion or advisory deletion are not enabled in the server's configuration.
- `notReady` - The server is not ready to run online deletion at the moment. This usually means the server has recently started up and has not yet acquired a validated ledger.
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
## See Also
- [Online Deletion](online-deletion.html)
- [Configure Advisory Deletion](configure-advisory-deletion.html)
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,145 @@
---
html: crawl_shards.html
parent: logging-and-data-management-methods.html
blurb: ピアが持つ履歴シャードについての情報を要求します。
labels:
- データ保持
---
# crawl_shards
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/CrawlShards.cpp "Source")
使用可能な[履歴レジャーデータのシャード](history-sharding.html)に関するピアサーバーからの情報を要求します。[新規: rippled 1.2.0][]
_`crawl_shards`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "crawl_shards",
"pubkey": true,
"limit": 0
}
```
*JSON-RPC*
```json
{
"method": "crawl_shards",
"params": [
{
"pubkey": true,
"limit": 0
}
]
}
```
<!-- MULTICODE_BLOCK_END -->
**注記:** このメソッドのコマンドライン構文はありません。コマンドラインからアクセスするには[jsonメソッド][]を使用してください。
要求には以下のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:---------|:--------|:--------------------------------------------------------|
| `pubkey` | ブール値 | _省略可_ `true`の場合、応答には、クロールされたサーバーのノード公開鍵(ピアツーピア通信用)が含まれます。デフォルトは`false`です。 |
| `limit` | 数値 | _省略可_ 検索の深さを示すホップ数。デフォルトは0で、ダイレクトピアのみを検索します。`1`を制限値にすると、ピアのピアも検索します。最大値は`3`です。 |
**注意:** `limit`が増加すると、検索される可能性のあるピアの数は、指数関数的に増加します。2または3を制限値にすると、サーバーがAPI要求に応答するのに数秒かかる場合があります。
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"result": {
"complete_shards": "1-2,5,8-9,584,1973,2358",
"peers": [
{
"complete_shards": "1-2,8,47,371,464,554,653,857,1076,1402,1555,1708,1813,1867",
"public_key": "n9LxFZiySnfDSvfh23N94UxsFkCjWyrchTeKHcYE6tJJQL5iejb2"
},
{
"complete_shards": "8-9,584",
"ip": "192.168.1.132",
"public_key": "n9MN5xwYqbrj64rtfZAXQy7Y3sNxXZJeLt7Lj61a9DYEZ4SE2tQQ"
}
]
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"complete_shards": "1-2,5,8-9,584,1973,2358",
"peers": [
{
"complete_shards": "1-2,8,47,371,464,554,653,857,1076,1402,1555,1708,1813,1867",
"public_key": "n9LxFZiySnfDSvfh23N94UxsFkCjWyrchTeKHcYE6tJJQL5iejb2"
},
{
"complete_shards": "8-9,584",
"ip": "192.168.1.132",
"public_key": "n9MN5xwYqbrj64rtfZAXQy7Y3sNxXZJeLt7Lj61a9DYEZ4SE2tQQ"
}
],
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:------------------|:-------|:------------------------------------------------|
| `complete_shards` | 文字列 | _省略可_ ローカルサーバーで利用可能な[履歴シャード](history-sharding.html)の範囲。これは、空の文字列か、または連続していない範囲である場合があります。たとえば、`1-2,5,7-9`は、シャード1、2、5、7、8、9が利用可能であることを示します。このサーバーで履歴シャーディングが有効になっていない場合は省略されます。 |
| `peers` | 配列 | 各ピアが使用可能な履歴シャードを表す**ピアシャードオブジェクト**のリスト(以下を参照)。 |
#### ピアシャードオブジェクト
応答の`peers`配列のメンバーはそれぞれ、ピアツーピアネットワーク内の1つのサーバーを表すオブジェクトです。リストには、少なくとも1つの完全な[履歴シャード](history-sharding.html)が使用可能なピアのみが含まれます。配列の各オブジェクトには以下のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:----------|:-------|:--------------------------------------------------------|
| `complete_shards` | 文字列 | このピアが使用可能な履歴シャードの範囲。連続していない場合があります。たとえば、`1-2,5,7-9`は、シャード1、2、5、7、8、9が利用可能であることを示します。 |
| `ip` | 文字列 | _省略される場合があります_ このオブジェクトが表すピアのIPアドレス。IPv4アドレスまたはIPv6アドレスを指定できます。[プライベートピア](peer-protocol.html#プライベートピア)の場合は省略されます。 |
| `public_key` | 文字列 | _(リクエストで`"pubkey": true`が指定されている場合を除き省略)_ XRP Ledgerの[base58フォーマット](base58-encodings.html)で、このピアでピアツーピア通信に使用される公開鍵。 |
### 考えられるエラー
- いずれかの[汎用エラータイプ][]。
- `invalidParams` - 要求で1つ以上の必須フィールドが省略されていたか、または指定されたフィールドのデータタイプが誤っています。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,146 @@
---
html: crawl_shards.html
parent: logging-and-data-management-methods.html
blurb: Request information about which history shards peers have.
labels:
- Data Retention
---
# crawl_shards
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/CrawlShards.cpp "Source")
Requests information from peer servers about which [shards of historical ledger data](history-sharding.html) they have available. [New in: rippled 1.2.0][]
_The `crawl_shards` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "crawl_shards",
"public_key": true,
"limit": 0
}
```
*JSON-RPC*
```json
{
"method": "crawl_shards",
"params": [
{
"public_key": true,
"limit": 0
}
]
}
```
<!-- MULTICODE_BLOCK_END -->
**Note:** There is no command-line syntax for this method. Use the [json method][] to access this from the command line.
The request includes the following fields:
| `Field` | Type | Description |
|:---------|:--------|:--------------------------------------------------------|
| `public_key` | Boolean | _(Optional)_ If `true`, the response includes the node public keys (for peer-to-peer communications) of servers that were crawled. The default is `false`. |
| `limit` | Number | _(Optional)_ How many hops deep to search. The default is 0, which searches direct peers only. With a limit of `1`, searches peers' peers also. The maximum value is `3`. |
**Caution:** The number of peers potentially searched grows exponentially as `limit` increases. With a limit of 2 or 3, it can take several seconds for the server to respond to the API request.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"result": {
"complete_shards": "1-2,5,8-9,584,1973,2358",
"peers": [
{
"complete_shards": "1-2,8,47,371,464,554,653,857,1076,1402,1555,1708,1813,1867",
"public_key": "n9LxFZiySnfDSvfh23N94UxsFkCjWyrchTeKHcYE6tJJQL5iejb2"
},
{
"complete_shards": "8-9,584",
"ip": "192.168.1.132",
"public_key": "n9MN5xwYqbrj64rtfZAXQy7Y3sNxXZJeLt7Lj61a9DYEZ4SE2tQQ"
}
]
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"complete_shards": "1-2,5,8-9,584,1973,2358",
"peers": [
{
"complete_shards": "1-2,8,47,371,464,554,653,857,1076,1402,1555,1708,1813,1867",
"public_key": "n9LxFZiySnfDSvfh23N94UxsFkCjWyrchTeKHcYE6tJJQL5iejb2"
},
{
"complete_shards": "8-9,584",
"ip": "192.168.1.132",
"public_key": "n9MN5xwYqbrj64rtfZAXQy7Y3sNxXZJeLt7Lj61a9DYEZ4SE2tQQ"
}
],
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:------------------|:-------|:------------------------------------------------|
| `complete_shards` | String | _(May be omitted)_ The range of [history shards](history-sharding.html) that are available on the local server. This may be an empty string, or a disjointed range. For example, `1-2,5,7-9` indicates that shards 1, 2, 5, 7, 8, and 9 are available. Omitted if this server does not have history sharding enabled. |
| `peers` | Array | _(May be omitted)_ List of **Peer Shard Objects** (see below) describing which history shards each peer has available. The response omits this field if no peers within the number of hops specified by `limit` have any shards. |
#### Peer Shard Objects
Each member of the `peers` array of the response is an object that describes one server in the peer-to-peer network. The list only includes peers that have at least one complete [history shard](history-sharding.html) available. Each object in the array has the following fields:
| `Field` | Type | Description |
|:----------|:-------|:--------------------------------------------------------|
| `complete_shards` | String | The range of complete history shards this peer has available. This may be disjointed. For example, `1-2,5,7-9` indicates that shards 1, 2, 5, 7, 8, and 9 are available. |
| `incomplete_shards` | String | _(May be omitted)_ A comma-separated list of history shards this peer has partially downloaded, and percent completion for each. For example, `1:50,2:25` indicates that shard 1 is 50% downloaded and shard 2 is 25% downloaded. [New in: rippled 1.8.1][] |
| `public_key` | String | _(Omitted unless the request specified `"public_key": true`)_ The public key this peer uses for peer-to-peer communications, in the XRP Ledger's [base58 format](base58-encodings.html). |
The `ip` field is no longer provided. [Removed in: rippled 1.8.1][]
### Possible Errors
- Any of the [universal error types][].
- `invalidParams` - One or more required fields were omitted from the request, or a provided field was specified as the wrong data type.
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,126 @@
---
html: download_shard.html
parent: logging-and-data-management-methods.html
blurb: レジャー履歴の特定のシャードをダウンロードします。
labels:
- データ保持
---
# download_shard
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/DownloadShard.cpp "Source")
サーバーに対し、外部ソースから特定の[履歴レジャーデータのシャード](history-sharding.html)をダウンロードするように指示します。`rippled`サーバーで[履歴シャードが保管されるように設定する](configure-history-sharding.html)必要があります。[新規: rippled 1.1.0][]
_`download_shard`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
外部ソースからHTTPSを使用してシャードが[lz4圧縮](https://lz4.github.io/lz4/) [tarアーカイブ](https://en.wikipedia.org/wiki/Tar_(computing))として提供される必要があります。アーカイブには、NuDB形式のシャードディレクトリとデータファイルが含まれている必要があります。
通常、このメソッドを使用してシャードをダウンロードしてインポートすれば、ピアツーピアネットワークからシャードを個別に取得するよりも短い時間で取得できます。また、サーバーから提供される特定範囲のシャードまたはシャードのセットを選択する場合にもこのメソッドを使用できます。
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "download_shard",
"shards": [
{"index": 1, "url": "https://example.com/1.tar.lz4"},
{"index": 2, "url": "https://example.com/2.tar.lz4"},
{"index": 5, "url": "https://example.com/5.tar.lz4"}
]
}
```
*JSON-RPC*
```json
{
"method": "download_shard",
"params": [
{
"shards": [
{"index": 1, "url": "https://example.com/1.tar.lz4"},
{"index": 2, "url": "https://example.com/2.tar.lz4"},
{"index": 5, "url": "https://example.com/5.tar.lz4"}
]
}
]
}
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:-----------|:--------|:------------------------------------------------------|
| `shards` | 配列 | ダウンロードするシャードとダウンロード元を記述したShard Descriptorオブジェクト以下の説明を参照のリスト。 |
`validate`のフィールドは廃止予定であり、今後予告なしに削除される可能性があります。`rippled`は全てのシャードの検証を実行します。[更新: rippled 1.6.0][]
`shards`配列の各**Shard Descriptorオブジェクト**には以下のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:--------|:-------|:----------------------------------------------------------|
| `index` | 数値 | 取得するシャードのインデックス。本番環境のXRP Ledgerでは、最も古いシャードのインデックスは1であり、このシャードにはレジャー3275032768が含まれています。次のシャードのインデックスは2であり、このシャードにはレジャー3276949152が含まれています。 |
| `url` | 文字列 | このシャードをダウンロードできるURL。このURLは`https://``http://`かで始まり`.tar.lz4`大文字小文字の区別なしで終わる必要があります。このダウンロードを提供するWebサーバーは、信頼できる認証局CAによって署名された有効なTLS証明書を使用する必要があります。`rippled`はオペレーティングシステムのCAストアーを使用します。 [更新: rippled 1.7.0][] |
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"result": {
"message": "downloading shards 1-2,5"
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"message": "downloading shards 1-2,5",
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:----------|:-------|:--------------------------------------------------------|
| `message` | 文字列 | この要求に対応して実行されたアクションを説明するメッセージ。 |
**ヒント:** サーバーで使用可能なシャードを確認するには、[crawl_shardsメソッド[]を使用します。または、シャードストアーとして設定されたロケーションのサブフォルダー(`rippled.cfg``[shard_db]``path`パラメーターを調べます。フォルダーには、シャードの番号に対応する名前が付いています。これらのフォルダーの1つに、シャードが未完了であることを示す`control.txt`ファイルが含まれていることがあります。
### 考えられるエラー
- いずれかの[汎用エラータイプ][]。
- `notEnabled` - サーバーでシャードストアーを使用するように設定されていません。
- `tooBusy` - サーバーはすでに、ピアツーピアネットワークから、または以前の`download_shard`要求の結果として、シャードをダウンロード中です。
- `invalidParams` - 要求で1つ以上の必須フィールドが省略されていたか、または指定されたフィールドのデータタイプが誤っています。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,149 @@
---
html: download_shard.html
parent: logging-and-data-management-methods.html
blurb: Download a specific shard of ledger history.
labels:
- Data Retention
---
# download_shard
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/DownloadShard.cpp "Source")
Instructs the server to download a specific [shard of historical ledger data](history-sharding.html) from an external source. Your `rippled` server must be [configured to store history shards](configure-history-sharding.html). [Updated in: rippled 1.6.0][]
_The `download_shard` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
The external source must provide the shard as an [lz4-compressed](https://lz4.github.io/lz4/) [tar archive](https://en.wikipedia.org/wiki/Tar_(computing)) served via HTTPS. The archive must contain the shard directory and data files in NuDB format.
Downloading and importing shards using this method is usually faster than acquiring the shards individually from the peer-to-peer network. You can also use this method to choose a specific range or set of shards to provide from your server.
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "download_shard",
"shards": [
{"index": 1, "url": "https://example.com/1.tar.lz4"},
{"index": 2, "url": "https://example.com/2.tar.lz4"},
{"index": 5, "url": "https://example.com/5.tar.lz4"}
]
}
```
*JSON-RPC*
```json
{
"method": "download_shard",
"params": [
{
"shards": [
{"index": 1, "url": "https://example.com/1.tar.lz4"},
{"index": 2, "url": "https://example.com/2.tar.lz4"},
{"index": 5, "url": "https://example.com/5.tar.lz4"}
]
}
]
}
```
*Commandline*
```sh
# Syntax: download_shard [[<index> <url>]]
rippled download_shard 1 https://example.com/1.tar.lz4 2 https://example.com/2.tar.lz4 5 https://example.com/5.tar.lz4
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following field:
| `Field` | Type | Description |
|:-----------|:--------|:------------------------------------------------------|
| `shards` | Array | List of Shard Descriptor objects (see below) describing shards to download and where to download them from. |
The `validate` field is deprecated and may be removed in a future version. (The server always checks the integrity of shards when it imports them.) [Updated in: rippled 1.6.0][]
Each **Shard Descriptor object** in the `shards` array has the following fields:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `index` | Number | The index of the shard to retrieve. In the production XRP Ledger, the oldest shard has index 1 and contains ledgers 32750-32768. The next shard has index 2 and contains ledgers 32769-49152, and so on. |
| `url` | String | The URL where this shard can be downloaded. The URL must start with `http://` or `https://` and must end with `.tar.lz4` (not case-sensitive). The web server providing this download must use a valid TLS certificate signed by a trusted Certificate Authority (CA). (`rippled` uses the operating system's CA store.) [Updated in: rippled 1.7.0][] |
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"result": {
"message": "downloading shards 1-2,5"
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"message": "downloading shards 1-2,5",
"status": "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result": {
"message": "downloading shards 1-2,5",
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:----------|:-------|:--------------------------------------------------------|
| `message` | String | A message describing the actions taken in response to this request. |
**Tip:** To see which shards your server has available, use the [crawl_shards method][]. Alternatively, you can look at the subfolders in your configured location for the shard store (the `path` parameter of `[shard_db]` in your `rippled.cfg`). The folders are named to match the numbers of the shards; up to one of those folders may contain a `control.txt` file indicating that the shard is incomplete.
### Possible Errors
- Any of the [universal error types][].
- `notEnabled` - The server is not configured with a shard store.
- `tooBusy` - The server is already downloading the shard, either from the peer-to-peer network or as the result of a previous `download_shard` request.
- `invalidParams` - One or more required fields were omitted from the request, or a provided field was specified as the wrong data type.
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,81 @@
---
html: ledger_cleaner.html
parent: logging-and-data-management-methods.html
blurb: レジャークリーナーを制御し、レジャーデータベースの破損を検出して修復できる非同期メンテナンスをする。
labels:
- データ保持
---
# ledger_cleaner
[[ソース]](https://github.com/ripple/rippled/blob/df54b47cd0957a31837493cd69e4d9aade0b5055/src/ripple/rpc/handlers/LedgerCleaner.cpp "Source")
`ledger_cleaner`コマンドは[レジャークリーナー](https://github.com/ripple/rippled/blob/f313caaa73b0ac89e793195dcc2a5001786f916f/src/ripple/app/ledger/README.md#the-ledger-cleaner)を制御します。レジャークリーナーは、`rippled`のレジャーデータベースの破損を検出して修復できる非同期メンテナンスプロセスです。
_`ledger_cleaner`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "ledger_cleaner",
"max_ledger": 13818756,
"min_ledger": 13818000,
"stop": false
}
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:--------------|:--------------------------|:---------------------------------|
| `ledger` | 数値 - [レジャーインデックス][] | _省略可_ 指定されている場合は、指定されたレジャーのみをチェックして訂正します。 |
| `max_ledger` | 数値 - [レジャーインデックス][] | _省略可_ レジャーインデックスがこの番号以下のレジャーをチェックするようにレジャークリーナーを設定します。 |
| `min_ledger` | 数値 - [レジャーインデックス][] | _省略可_ レジャーインデックスがこの番号以上のレジャーをチェックするようにレジャークリーナーを設定します。 |
| `full` | ブール値 | _省略可_ trueの場合は、指定されたレジャーのレジャー状態オブジェクトとトランザクションを修正します。デフォルトではfalseです。`ledger`が指定されている場合は、自動的に`true`に設定されます。 |
| `fix_txns` | ブール値 | _省略可_ trueの場合は、指定されたレジャーのトランザクションを修正します。指定されている場合は`full`をオーバーライドします。 |
| `check_nodes` | ブール値 | _省略可_ trueの場合は、指定されているレジャーのレジャー状態オブジェクトを修正します。指定されている場合は`full`をオーバーライドします。 |
| `stop` | ブール値 | _省略可_ trueの場合は、レジャークリーナーを無効にします。 |
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
200 OK
{
"result" : {
"message" : "Cleaner configured",
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:----------|:-------|:---------------------------------|
| `message` | 文字列 | `Cleaner configured`: 正常終了の場合。 |
### 考えられるエラー
* いずれかの[汎用エラータイプ][]。
* `internal`: いずれかのパラメーターが正しく指定されていない場合。(これはバグです。本来のエラーコードは`invalidParams`です。)
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,81 @@
---
html: ledger_cleaner.html
parent: logging-and-data-management-methods.html
blurb: Configure the ledger cleaner service to check for corrupted data.
labels:
- Data Retention
---
# ledger_cleaner
[[Source]](https://github.com/ripple/rippled/blob/df54b47cd0957a31837493cd69e4d9aade0b5055/src/ripple/rpc/handlers/LedgerCleaner.cpp "Source")
The `ledger_cleaner` command controls the [Ledger Cleaner](https://github.com/ripple/rippled/blob/f313caaa73b0ac89e793195dcc2a5001786f916f/src/ripple/app/ledger/README.md#the-ledger-cleaner), an asynchronous maintenance process that can find and repair corruption in `rippled`'s database of ledgers.
_The `ledger_cleaner` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "ledger_cleaner",
"max_ledger": 13818756,
"min_ledger": 13818000,
"stop": false
}
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:--------------|:--------------------------|:---------------------------------|
| `ledger` | Number - [Ledger Index][] | _(Optional)_ If provided, check and correct the specified ledger only. |
| `max_ledger` | Number - [Ledger Index][] | _(Optional)_ Configure the ledger cleaner to check ledgers with ledger indexes equal or lower than this. |
| `min_ledger` | Number - [Ledger Index][] | _(Optional)_ Configure the ledger cleaner to check ledgers with ledger indexes equal or higher than this. |
| `full` | Boolean | _(Optional)_ If true, fix ledger state objects and transactions in the specified ledger(s). Defaults to false. Automatically set to `true` if `ledger` is provided. |
| `fix_txns` | Boolean | _(Optional)_ If true, correct transaction in the specified ledger(s). Overrides `full` if provided. |
| `check_nodes` | Boolean | _(Optional)_ If true, correct ledger state objects in the specified ledger(s). Overrides `full` if provided. |
| `stop` | Boolean | _(Optional)_ If true, disable the ledger cleaner. |
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
200 OK
{
"result" : {
"message" : "Cleaner configured",
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:----------|:-------|:---------------------------------|
| `message` | String | `Cleaner configured` on success. |
### Possible Errors
* Any of the [universal error types][].
* `internal` if one the parameters is specified incorrectly. (This is a bug; the intended error code is `invalidParams`.)
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,193 @@
---
html: ledger_request.html
parent: logging-and-data-management-methods.html
blurb: サーバーに対し接続しているピアから特定のレジャーバージョンを取得するように指示します。
labels:
- データ保持
---
# ledger_request
[[ソース]](https://github.com/ripple/rippled/blob/e980e69eca9ea843d200773eb1f43abe3848f1a0/src/ripple/rpc/handlers/LedgerRequest.cpp "Source")
`ledger_request`コマンドは、サーバーに対し接続しているピアから特定のレジャーバージョンを取得するように指示します。これは、サーバーが直接接続しているピアの1つにそのレジャーが存在している場合にのみ機能します。場合によっては、レジャーを完全に取得するにはこのコマンドを繰り返し実行する必要があります。
*`ledger_request`要求は、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。*
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 102,
"command": "ledger_request",
"ledger_index": 13800000
}
```
*コマンドライン*
```
rippled ledger_request 13800000
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:---------------|:-------|:---------------------------------------------------|
| `ledger_index` | 数値 | _省略可_[レジャーインデックス][]により指定されたレジャーを取得します。 |
| `ledger_hash` | 文字列 | _省略可_ 識別用[ハッシュ][]により指定されたレジャーを取得します。 |
`ledger_index`または`ledger_hash`のいずれかを指定する必要がありますが、両方は指定しないでください。
### 応答フォーマット
応答は[標準フォーマット][]に従っています。ただし、_`rippled`サーバーに対してレジャーの取得開始を正常に指示できた場合でも_、指定されたレジャーがない場合には失敗を示す応答が要求から返されます。
**注記:** レジャーを取得するには、rippledサーバーのダイレクトピアの履歴にそのレジャーが含まれている必要があります。どのピアにも要求されたレジャーがない場合は、[connectメソッド][]または構成ファイルの`fixed_ips`セクションを使用して、`s2.ripple.com`にあるRippleのすべての履歴が記録されるサーバーを追加すれば、`ledger_request`要求を再度実行できます。
失敗した場合の応答には、レジャーの取得状況が示されます。成功した場合の応答には、[ledgerメソッド][]に類似したフォーマットでレジャーの情報が含まれます。
<!-- MULTICODE_BLOCK_START -->
*コマンドライン(失敗)*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"acquiring" : {
"hash" : "01DDD89B6605E20338B8EEB8EB2B0E0DD2F685A2B164F3790C4D634B5734CC26",
"have_header" : false,
"peers" : 2,
"timeouts" : 0
},
"error" : "lgrNotFound",
"error_code" : 20,
"error_message" : "acquiring ledger containing requested index",
"request" : {
"command" : "ledger_request",
"ledger_index" : 18851277
},
"status" : "error"
}
}
```
*コマンドライン(進行中)*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"hash" : "EB68B5B4F6F06BF59B6D7532BCB98BB98E2F10C2435D895217AA0AA7E910FBD5",
"have_header" : true,
"have_state" : false,
"have_transactions" : false,
"needed_state_hashes" : [
"C46F7B9E795135447AF24BAF999AB8FC1612A997F6EAAF8B784C226FF0BD8E25",
"E48F528E4FC2A1DC492C6264B27B420E2285B2A3ECF3A253DB480DA5BFB7F858",
"B62CD0B2E1277F78BC279FA037F3F747587299B60D23A551C3F63DD137DC0CF8",
"30014C55701FB8426E496A47B297BEC9E8F5BFA47763CC22DBD9024CC81D39DD",
"7EB59A853913898FCEA7B701637F33B1054BD36C32A0B910B612EFB9CDFF6334",
"07ECAD3066D62583883979A2FADAADC8F7D89FA07375843C8A47452639AB2421",
"97A87E5246AF78463485CB27E08D561E22AAF33D5E2F08FE2FACAE0D05CB5478",
"50A0525E238629B32324C9F59B4ECBEFE3C21DC726DB9AB3B6758BD1838DFF68",
"8C541B1ED47C9282E2A28F0B7F3DDFADF06644CAB71B15A3E67D04C5FAFE9BF4",
"2C6CC536C778D8C0F601E35DA7DD9888C288897E4F603E76357CE2F47E8A7A9F",
"309E78DEC67D5725476A59E114850556CC693FB6D92092997ADE97E3EFF473CC",
"8EFF61B6A636AF6B4314CAC0C08F4FED0759E1F782178A822EDE98275E5E4B10",
"9535645E5D249AC0B6126005B79BB981CBA00286E00154D20A3BCF65743EA3CA",
"69F5D6FCB41D1E6CEA5ADD42CBD194086B45E957D497DF7AEE62ADAD485660CE",
"07E93A95DBB0B8A00925DE0DF6D27E41CACC77EF75055A89815006109D82EAD3",
"7FDF25F660235DCAD649676E3E6729DF920A9B0B4B6A3B090A3C64D7BDE2FB20"
],
"needed_transaction_hashes" : [
"BA914854F2F5EDFCBD6E3E0B168E5D4CD0FC92927BEE408C6BD38D4F52505A34",
"AE3A2DB537B01EB33BB3A677242DE52C9AE0A64BD9222EE55E52855276E7EA2A",
"E145F737B255D93769673CBA6DEBA4F6AC7387A309DAACC72EA5B07ECF03C215",
"073A118552AA60E1D3C6BE6F65E4AFA01C582D9C41CCC2887244C19D9BFA7741",
"562DB8580CD3FE19AF5CEA61C2858C10091151B924DBF2AEB7CBB8722E683204",
"437C0D1C2391057079E9539CF028823D29E6437A965284F6E54CEBF1D25C5D56",
"1F069486AF5533883609E5C8DB907E97273D9A782DF26F5E5811F1C42ED63A3D",
"CAA6B7DA68EBA71254C218C81A9EA029A179694BDD0D75A49FB03A7D57BCEE49"
],
"peers" : 6,
"status" : "success",
"timeouts" : 1
}
}
```
*コマンドライン(成功)*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"ledger" : {
"accepted" : true,
"account_hash" : "84EBB27D9510AD5B9A3A328201921B3FD418D4A349E85D3DC69E33C7B506407F",
"close_time" : 486691300,
"close_time_human" : "2015-Jun-04 00:01:40",
"close_time_resolution" : 10,
"closed" : true,
"hash" : "DCF5D723ECEE1EF56D2B0024CD9BDFF2D8E3DC211BD2B9460165922564ACD863",
"ledger_hash" : "DCF5D723ECEE1EF56D2B0024CD9BDFF2D8E3DC211BD2B9460165922564ACD863",
"ledger_index" : "13840000",
"parent_hash" : "8A3F6FBC62C11DE4538D969F9C7966234635FE6CEB1133DDC37220978F8100A9",
"seqNum" : "13840000",
"totalCoins" : "99999022883526403",
"total_coins" : "99999022883526403",
"transaction_hash" : "3D759EF3AF1AE2F78716A8CCB2460C3030F82687E54206E883703372B9E1770C"
},
"ledger_index" : 13840000,
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
3つの応答フォーマットは次のとおりです。
1. `lgrNotFound`エラーが返された場合、応答の`acquiring`フィールドには、ピアツーピアネットワークからのレジャー取得状況を示す[レジャー要求オブジェクト](#レジャー要求オブジェクト)が指定されています。
2. サーバーが現在データを取得中であると応答に示される場合、その結果の本文として、ピアツーピアネットワークからのレジャー取得状況を示す[レジャー要求オブジェクト](#レジャー要求オブジェクト)が表示されます。
3. レジャーが完全に利用可能な場合、応答には[レジャーヘッダー](ledger-header.html)が表示されます。
### レジャー要求オブジェクト
サーバーでレジャーの取得操作が進行中であり、まだ完了していない場合は、`rippled`サーバーはレジャー取得状況を示すレジャー要求オブジェクトを返します。このオブジェクトのフィールドを次に示します。
| `Field` | 型 | 説明 |
|:----------------------------|:-----------------|:----------------------------|
| `hash` | 文字列 | (省略される場合があります)要求されるレジャーの[ハッシュ][](サーバーがこのハッシュを認識している場合)。 |
| `have_header` | ブール値 | 要求されたレジャーのヘッダーセクションがサーバーにあるかどうか。 |
| `have_state` | ブール値 | (省略される場合があります)要求されたレジャーの[アカウント状態セクション](ledgers.html#ツリーの形式)がサーバーにあるかどうか。 |
| `have_transactions` | ブール値 | (省略される場合があります)要求されたレジャーのトランザクションセクションがサーバーにあるかどうか。 |
| `needed_state_hashes` | 文字列の配列 | (省略される場合があります)サーバーが取得する必要がある[状態ツリー](ledgers.html#ツリーの形式)内のオブジェクトのハッシュ最大16個。 |
| `needed_transaction_hashes` | 文字列の配列 | 省略される場合がありますサーバーが取得する必要があるトランザクションツリー内のオブジェクトのハッシュ最大16個。 |
| `peers` | 数値 | このレジャーを見つけるためにサーバーが照会するピアの数。 |
| `timeouts` | 数値 | これまでにこのレジャーの取得操作がタイムアウトした回数。 |
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。このエラーは、指定したレジャーインデックスが現在進行中のレジャーのインデックス以上である場合にも発生します。
* `lgrNotFound` - レジャーがまだ利用可能ではない場合。これは、サーバーがレジャーの取得を開始していますが、要求されたレジャーが接続されたどのピアにもない場合には失敗する可能性があることを意味します。(以前はこのエラーにはコード`ledgerNotFound`が使用されていました。)[更新: rippled 0.30.1][新規: rippled 0.30.1]
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,194 @@
---
html: ledger_request.html
parent: logging-and-data-management-methods.html
blurb: Query peer servers for a specific ledger version.
labels:
- Data Retention
---
# ledger_request
[[Source]](https://github.com/ripple/rippled/blob/e980e69eca9ea843d200773eb1f43abe3848f1a0/src/ripple/rpc/handlers/LedgerRequest.cpp "Source")
The `ledger_request` command tells server to fetch a specific ledger version from its connected peers. This only works if one of the server's immediately-connected peers has that ledger. You may need to run the command several times to completely fetch a ledger.
*The `ledger_request` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users!*
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 102,
"command": "ledger_request",
"ledger_index": 13800000
}
```
*Commandline*
```
rippled ledger_request 13800000
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:---------------|:-------|:---------------------------------------------------|
| `ledger_index` | Number | _(Optional)_ Retrieve the specified ledger by its [Ledger Index][]. |
| `ledger_hash` | String | _(Optional)_ Retrieve the specified ledger by its identifying [Hash][]. |
You must provide either `ledger_index` or `ledger_hash` but not both.
### Response Format
The response follows the [standard format][]. However, the request returns a failure response if it does not have the specified ledger _even if it successfully instructed the `rippled` server to start retrieving the ledger_.
**Note:** To retrieve a ledger, the rippled server must have a direct peer with that ledger in its history. If none of the peers have the requested ledger, you can use the [connect method][] or the `fixed_ips` section of the config file to add Ripple's full-history server at `s2.ripple.com` and then make the `ledger_request` request again.
A failure response indicates the status of fetching the ledger. A successful response contains the information for the ledger in a similar format to the [ledger method][].
<!-- MULTICODE_BLOCK_START -->
*Commandline (failure)*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"acquiring" : {
"hash" : "01DDD89B6605E20338B8EEB8EB2B0E0DD2F685A2B164F3790C4D634B5734CC26",
"have_header" : false,
"peers" : 2,
"timeouts" : 0
},
"error" : "lgrNotFound",
"error_code" : 20,
"error_message" : "acquiring ledger containing requested index",
"request" : {
"command" : "ledger_request",
"ledger_index" : 18851277
},
"status" : "error"
}
}
```
*Commandline (in-progress)*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"hash" : "EB68B5B4F6F06BF59B6D7532BCB98BB98E2F10C2435D895217AA0AA7E910FBD5",
"have_header" : true,
"have_state" : false,
"have_transactions" : false,
"needed_state_hashes" : [
"C46F7B9E795135447AF24BAF999AB8FC1612A997F6EAAF8B784C226FF0BD8E25",
"E48F528E4FC2A1DC492C6264B27B420E2285B2A3ECF3A253DB480DA5BFB7F858",
"B62CD0B2E1277F78BC279FA037F3F747587299B60D23A551C3F63DD137DC0CF8",
"30014C55701FB8426E496A47B297BEC9E8F5BFA47763CC22DBD9024CC81D39DD",
"7EB59A853913898FCEA7B701637F33B1054BD36C32A0B910B612EFB9CDFF6334",
"07ECAD3066D62583883979A2FADAADC8F7D89FA07375843C8A47452639AB2421",
"97A87E5246AF78463485CB27E08D561E22AAF33D5E2F08FE2FACAE0D05CB5478",
"50A0525E238629B32324C9F59B4ECBEFE3C21DC726DB9AB3B6758BD1838DFF68",
"8C541B1ED47C9282E2A28F0B7F3DDFADF06644CAB71B15A3E67D04C5FAFE9BF4",
"2C6CC536C778D8C0F601E35DA7DD9888C288897E4F603E76357CE2F47E8A7A9F",
"309E78DEC67D5725476A59E114850556CC693FB6D92092997ADE97E3EFF473CC",
"8EFF61B6A636AF6B4314CAC0C08F4FED0759E1F782178A822EDE98275E5E4B10",
"9535645E5D249AC0B6126005B79BB981CBA00286E00154D20A3BCF65743EA3CA",
"69F5D6FCB41D1E6CEA5ADD42CBD194086B45E957D497DF7AEE62ADAD485660CE",
"07E93A95DBB0B8A00925DE0DF6D27E41CACC77EF75055A89815006109D82EAD3",
"7FDF25F660235DCAD649676E3E6729DF920A9B0B4B6A3B090A3C64D7BDE2FB20"
],
"needed_transaction_hashes" : [
"BA914854F2F5EDFCBD6E3E0B168E5D4CD0FC92927BEE408C6BD38D4F52505A34",
"AE3A2DB537B01EB33BB3A677242DE52C9AE0A64BD9222EE55E52855276E7EA2A",
"E145F737B255D93769673CBA6DEBA4F6AC7387A309DAACC72EA5B07ECF03C215",
"073A118552AA60E1D3C6BE6F65E4AFA01C582D9C41CCC2887244C19D9BFA7741",
"562DB8580CD3FE19AF5CEA61C2858C10091151B924DBF2AEB7CBB8722E683204",
"437C0D1C2391057079E9539CF028823D29E6437A965284F6E54CEBF1D25C5D56",
"1F069486AF5533883609E5C8DB907E97273D9A782DF26F5E5811F1C42ED63A3D",
"CAA6B7DA68EBA71254C218C81A9EA029A179694BDD0D75A49FB03A7D57BCEE49"
],
"peers" : 6,
"status" : "success",
"timeouts" : 1
}
}
```
*Commandline (success)*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"ledger" : {
"accepted" : true,
"account_hash" : "84EBB27D9510AD5B9A3A328201921B3FD418D4A349E85D3DC69E33C7B506407F",
"close_time" : 486691300,
"close_time_human" : "2015-Jun-04 00:01:40",
"close_time_resolution" : 10,
"closed" : true,
"hash" : "DCF5D723ECEE1EF56D2B0024CD9BDFF2D8E3DC211BD2B9460165922564ACD863",
"ledger_hash" : "DCF5D723ECEE1EF56D2B0024CD9BDFF2D8E3DC211BD2B9460165922564ACD863",
"ledger_index" : "13840000",
"parent_hash" : "8A3F6FBC62C11DE4538D969F9C7966234635FE6CEB1133DDC37220978F8100A9",
"seqNum" : "13840000",
"totalCoins" : "99999022883526403",
"total_coins" : "99999022883526403",
"transaction_hash" : "3D759EF3AF1AE2F78716A8CCB2460C3030F82687E54206E883703372B9E1770C"
},
"ledger_index" : 13840000,
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The three possible response formats are as follows:
1. When returning a `lgrNotFound` error, the response has a field, `acquiring` with a [Ledger Request Object](#ledger-request-object) indicating the progress of fetching the ledger from the peer-to-peer network.
2. When the response shows the server is currently fetching the ledger, the body of the result is a [Ledger Request Object](#ledger-request-object) indicating the progress of fetching the ledger from the peer-to-peer network.
3. When the ledger is fully available, the response is a representation of the [ledger header](ledger-header.html).
### Ledger Request Object
When the server is in the progress of fetching a ledger, but has not yet finished, the `rippled` server returns a ledger request object indicating its progress towards fetching the ledger. This object has the following fields:
| `Field` | Type | Description |
|:----------------------------|:-----------------|:----------------------------|
| `hash` | String | (May be omitted) The [Hash][] of the requested ledger, if the server knows it. |
| `have_header` | Boolean | Whether the server has the header section of the requested ledger. |
| `have_state` | Boolean | (May be omitted) Whether the server has the [account-state section](ledgers.html#tree-format) of the requested ledger. |
| `have_transactions` | Boolean | (May be omitted) Whether the server has the transaction section of the requested ledger. |
| `needed_state_hashes` | Array of Strings | (May be omitted) Up to 16 hashes of objects in the [state tree](ledgers.html#tree-format) that the server still needs to retrieve. |
| `needed_transaction_hashes` | Array of Strings | (May be omitted) Up to 16 hashes of objects in the transaction tree that the server still needs to retrieve. |
| `peers` | Number | How many peers the server is querying to find this ledger. |
| `timeouts` | Number | Number of times fetching this ledger has timed out so far. |
### Possible Errors
- Any of the [universal error types][].
- `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing. This error can also occur if you specify a ledger index equal or higher than the current in-progress ledger.
- `lgrNotFound` - If the ledger is not yet available. This indicates that the server has started fetching the ledger, although it may fail if none of its connected peers have the requested ledger. (Previously, this error used the code `ledgerNotFound` instead.) [Updated in: rippled 0.30.1][]
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,149 @@
---
html: log_level.html
parent: logging-and-data-management-methods.html
blurb: ログ詳細レベルを変更するか、現在のログレベルを返します。
labels:
- データ保持
---
# log_level
[[ソース]](https://github.com/ripple/rippled/blob/155fcdbcd0b4927152892c8c8be01d9cf62bed68/src/ripple/rpc/handlers/LogLevel.cpp "Source")
`log_level`コマンドは`rippled`サーバーのログ詳細レベルを変更するか、各ログメッセージカテゴリー_パーティション_の現在のログレベルを返します。
_`log_level`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "ll1",
"command": "log_level",
"severity": "debug",
"partition": "PathRequest"
}
```
*コマンドライン*
```sh
#Syntax: log_level [[partition] severity]
rippled log_level PathRequest debug
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:------------|:-------|:------------------------------------------------------|
| `severity` | 文字列 | _省略可_ 設定するログの詳細レベル。以下に、有効な値を詳細レベルの低いものから順に示します。`fatal``error``warn``info``debug`、および`trace`。省略すると、すべてのカテゴリーの現在のログ詳細レベルが返されます。 |
| `partition` | 文字列 | _省略可_`severity`が指定されていない場合は無視されます。変更するログカテゴリー。省略されている場合、または`base`の値が指定されている場合は、すべてのカテゴリーのログレベルを設定します。 |
### 応答フォーマット
成功した場合の応答例:
<!-- MULTICODE_BLOCK_START -->
*コマンドライン(ログレベルの設定)*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"status" : "success"
}
}
```
*コマンドライン(ログレベルの確認)*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"levels" : {
"AmendmentTable" : "Error",
"Application" : "Error",
"CancelOffer" : "Error",
"Collector" : "Error",
"CreateOffer" : "Error",
"DeferredCredits" : "Error",
"FeeVote" : "Error",
"InboundLedger" : "Error",
"JobQueue" : "Error",
"Ledger" : "Error",
"LedgerCleaner" : "Error",
"LedgerConsensus" : "Error",
"LedgerEntrySet" : "Error",
"LedgerMaster" : "Error",
"LedgerTiming" : "Error",
"LoadManager" : "Error",
"LoadMonitor" : "Error",
"NetworkOPs" : "Error",
"NodeObject" : "Error",
"OrderBookDB" : "Error",
"Overlay" : "Error",
"PathRequest" : "Debug",
"Payment" : "Error",
"Peer" : "Error",
"PeerFinder" : "Error",
"Protocol" : "Error",
"RPC" : "Error",
"RPCErr" : "Error",
"RPCHandler" : "Error",
"RPCManager" : "Error",
"Resolver" : "Error",
"Resource" : "Error",
"RippleCalc" : "Error",
"SHAMap" : "Error",
"SHAMapStore" : "Error",
"SNTPClient" : "Error",
"STAmount" : "Error",
"SerializedLedger" : "Error",
"Server" : "Error",
"SetAccount" : "Error",
"SetTrust" : "Error",
"TaggedCache" : "Error",
"TransactionAcquire" : "Error",
"TransactionEngine" : "Error",
"UVL" : "Error",
"UniqueNodeList" : "Error",
"Validations" : "Error",
"WALCheckpointer" : "Error",
"WebSocket" : "Trace",
"base" : "Error"
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
応答は[標準フォーマット][]に従っています。応答フォーマットは、要求に`severity`が指定されているかどうかに応じて異なります。指定されていた場合はログレベルが変更され、成功した場合の結果には追加フィールドが含まれません。
それ以外の場合、要求には以下のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:--------|:-------|:----------------------------------------------------------|
| `level` | オブジェクト | 各カテゴリーの現在のログレベル。このカテゴリーリストは、今後のリリースで予告なく変更される場合があります。このコマンドに対する要求で、フィールド名を`partition`の値として使用できます。 |
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,149 @@
---
html: log_level.html
parent: logging-and-data-management-methods.html
blurb: Get or modify log verbosity.
labels:
- Data Retention
---
# log_level
[[Source]](https://github.com/ripple/rippled/blob/155fcdbcd0b4927152892c8c8be01d9cf62bed68/src/ripple/rpc/handlers/LogLevel.cpp "Source")
The `log_level` command changes the `rippled` server's logging verbosity, or returns the current logging level for each category (called a _partition_) of log messages.
_The `log_level` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "ll1",
"command": "log_level",
"severity": "debug",
"partition": "PathRequest"
}
```
*Commandline*
```sh
#Syntax: log_level [[partition] severity]
rippled log_level PathRequest debug
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:------------|:-------|:------------------------------------------------------|
| `severity` | String | _(Optional)_ What level of verbosity to set logging at. Valid values are, in order from least to most verbose: `fatal`, `error`, `warn`, `info`, `debug`, and `trace`. If omitted, return current log verbosity for all categories. |
| `partition` | String | _(Optional)_ Ignored unless `severity` is provided. Which logging category to modify. If omitted, or if provided with the value `base`, set logging level for all categories. |
### Response Format
Examples of successful responses:
<!-- MULTICODE_BLOCK_START -->
*Commandline (set log level)*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"status" : "success"
}
}
```
*Commandline (check log levels)*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"levels" : {
"AmendmentTable" : "Error",
"Application" : "Error",
"CancelOffer" : "Error",
"Collector" : "Error",
"CreateOffer" : "Error",
"DeferredCredits" : "Error",
"FeeVote" : "Error",
"InboundLedger" : "Error",
"JobQueue" : "Error",
"Ledger" : "Error",
"LedgerCleaner" : "Error",
"LedgerConsensus" : "Error",
"LedgerEntrySet" : "Error",
"LedgerMaster" : "Error",
"LedgerTiming" : "Error",
"LoadManager" : "Error",
"LoadMonitor" : "Error",
"NetworkOPs" : "Error",
"NodeObject" : "Error",
"OrderBookDB" : "Error",
"Overlay" : "Error",
"PathRequest" : "Debug",
"Payment" : "Error",
"Peer" : "Error",
"PeerFinder" : "Error",
"Protocol" : "Error",
"RPC" : "Error",
"RPCErr" : "Error",
"RPCHandler" : "Error",
"RPCManager" : "Error",
"Resolver" : "Error",
"Resource" : "Error",
"RippleCalc" : "Error",
"SHAMap" : "Error",
"SHAMapStore" : "Error",
"SNTPClient" : "Error",
"STAmount" : "Error",
"SerializedLedger" : "Error",
"Server" : "Error",
"SetAccount" : "Error",
"SetTrust" : "Error",
"TaggedCache" : "Error",
"TransactionAcquire" : "Error",
"TransactionEngine" : "Error",
"UVL" : "Error",
"UniqueNodeList" : "Error",
"Validations" : "Error",
"WALCheckpointer" : "Error",
"WebSocket" : "Trace",
"base" : "Error"
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][]. The response format depends on whether the request specified a `severity`. If it did, the log level is changed and a successful result contains no additional fields.
Otherwise, the response contains the following field:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `level` | Object | The current log levels of each category. This list of categories is subject to change without notice in future releases. You can use the field names as values to `partition` in requests to this command. |
### Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,118 @@
---
html: logrotate.html
parent: logging-and-data-management-methods.html
blurb: ログファイルを閉じて再度開きます。
labels:
- データ保持
---
# logrotate
[[ソース]](https://github.com/ripple/rippled/blob/743bd6c9175c472814448ea889413be79dfd1c07/src/ripple/rpc/handlers/LogRotate.cpp "Source")
`logrotate`コマンドは、ログファイルを閉じて再度開きます。これは、Linuxファイルシステムでのログローテーションを促進することを目的としています。
通常、Linuxシステムには、[`logrotate`](https://linux.die.net/man/8/logrotate)プログラムがプリインストールされていますが、このコマンドとは異なります。アプリケーション固有のログローテーションスクリプトは、`/etc/logrotate.d`に配置されています。
次のスクリプトは、`/etc/logrotate.d/rippled`として作成できるサンプルです。
```logrotate
/var/log/rippled/*.log {
daily
minsize 200M
rotate 7
nocreate
missingok
notifempty
compress
compresscmd /usr/bin/nice
compressoptions -n19 ionice -c3 gzip
compressext .gz
postrotate
/opt/ripple/bin/rippled --conf /opt/ripple/etc/rippled.cfg logrotate
endscript
}
```
保持するログの量に応じて、`minsize``rotate`などのパラメーターを構成できます。`rippled.cfg`ファイルの`log_level`設定を使用して、サーバーのログの詳細度を設定します。このサンプルスクリプトは標準の`log_level`に基づいており、約2週間分のログを圧縮形式で保存します。
`rippled` 1.3以降、スクリプト`/etc/logrotate.d/rippled`は、DEBおよびRPMパッケージによって自動的にインストールされます。この設定は、必要に応じて変更できます。パッケージのアップグレード時に変更内容が上書きされることはありません。
**注記:** システムのlogrotateスクリプトは、アプリケーションごとに1つしか持てません。同じディレクトリを処理するログローテーションが他にないことを確認してください。
_`logrotate`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "lr1",
"command": "logrotate"
}
```
*コマンドライン*
```sh
#Syntax: logrotate
rippled logrotate
```
<!-- MULTICODE_BLOCK_END -->
要求にはパラメーターが含まれていません。
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
200 OK
{
"result" : {
"message" : "The log file was closed and reopened.",
"status" : "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"message" : "The log file was closed and reopened.",
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:----------|:-------|:--------------------------------------------------------|
| `message` | 文字列 | 正常に完了した場合、次のメッセージが含まれています。`The log file was closed and reopened.` |
### 考えられるエラー
* いずれかの[汎用エラータイプ][]。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,118 @@
---
html: logrotate.html
parent: logging-and-data-management-methods.html
blurb: Reopen the log file.
labels:
- Data Retention
---
# logrotate
[[Source]](https://github.com/ripple/rippled/blob/743bd6c9175c472814448ea889413be79dfd1c07/src/ripple/rpc/handlers/LogRotate.cpp "Source")
The `logrotate` command closes and reopens the log file. This is intended to help with log rotation on Linux file systems.
Most Linux systems come pre-installed with a [`logrotate`](https://linux.die.net/man/8/logrotate) program, which is separate from this command. Application specific log rotation scripts are placed in `/etc/logrotate.d`
The following script is a sample that can be created as `/etc/logrotate.d/rippled`
```logrotate
/var/log/rippled/*.log {
daily
minsize 200M
rotate 7
nocreate
missingok
notifempty
compress
compresscmd /usr/bin/nice
compressoptions -n19 ionice -c3 gzip
compressext .gz
postrotate
/opt/ripple/bin/rippled --conf /opt/ripple/etc/rippled.cfg logrotate
endscript
}
```
You can configure parameters such as `minsize` and `rotate` depending on the amount of logs you keep. Use the `log_level` setting in your `rippled.cfg` file to configure how verbose your server's logs are. This sample script is based on standard `log_level` and stores approximately 2 weeks worth of logs in a compressed format.
The official packages [for CentOS/Red Hat](install-rippled-on-centos-rhel-with-yum.html) and [Ubuntu or Debian](install-rippled-on-ubuntu.html) provide the script `/etc/logrotate.d/rippled` by default. You can make modifications to this as required. Your modifications will not be overwritten on package upgrades. <!-- STYLE_OVERRIDE: will -->
**Note:** You should have only one system log rotation script per application. Please ensure that you do not have any other log rotation that handles the same directory.
_The `logrotate` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "lr1",
"command": "logrotate"
}
```
*Commandline*
```sh
#Syntax: logrotate
rippled logrotate
```
<!-- MULTICODE_BLOCK_END -->
The request includes no parameters.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
200 OK
{
"result" : {
"message" : "The log file was closed and reopened.",
"status" : "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"message" : "The log file was closed and reopened.",
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:----------|:-------|:--------------------------------------------------------|
| `message` | String | On success, contains the message `The log file was closed and reopened.` |
### Possible Errors
* Any of the [universal error types][].
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,122 @@
---
html: node_to_shard.html
parent: logging-and-data-management-methods.html
blurb: Copy data from the ledger store into the shard store.
labels:
- Data Retention
---
# node_to_shard
[[Source]](https://github.com/ripple/rippled/blob/develop/src/ripple/rpc/handlers/NodeToShard.cpp "Source")
The `{{currentpage.name}}` method manages copying data from the ledger store to the [shard store](history-sharding.html). It can start, stop, or check the status of copying the data.
_The `{{currentpage.name}}` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "{{currentpage.name}}",
"action": "start"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}",
"params": [{
"action": "start"
}]
}
```
*Commandline*
```sh
#Syntax: {{currentpage.name}} start|stop|status
rippled {{currentpage.name}} start
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:---------|:-------|:---------------------------------------------------------|
| `action` | String | Either `start`, `stop` or `status` depending on what action to take. |
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"result": {
"message": "Database import initiated..."
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result" : {
"message" : "Database import initiated...",
"status" : "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"message" : "Database import initiated...",
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:----------|:-------|:--------------------------------------------------------|
| `message` | String | A human-readable message indicating the action taken in response to the command. |
### Possible Errors
- Any of the [universal error types][].
- `internal` - If you attempt an invalid operation like checking the status of a copy when one isn't running.
- `notEnabled` - If the server is not configured to store [history shards](history-sharding.html).
- `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,109 @@
---
html: connect.html
parent: peer-management-methods.html
blurb: 特定のピアrippledサーバーに強制的に接続します。
labels:
- コアサーバー
---
# connect
[[ソース]](https://github.com/ripple/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/Connect.cpp "Source")
`connect`コマンドは、`rippled`サーバーを特定のピア`rippled`サーバーに強制的に接続します。
*`connect`要求は、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。*
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "connect",
"ip": "192.170.145.88",
"port": 51235
}
```
*JSON-RPC*
```json
{
"method": "connect",
"params": [
{
"ip": "192.170.145.88",
"port": 51235
}
]
}
```
*コマンドライン*
```sh
#Syntax: connect ip [port]
rippled connect 192.170.145.88 51235
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:--------|:-------|:----------------------------------------------------------|
| `ip` | 文字列 | 接続するサーバーのIPアドレス。 |
| `port` | 数値 | _省略可_ 接続時に使用するポート番号。デフォルトでは**2459**です。 [新規: rippled 1.6.0][] |
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
{
"result" : {
"message" : "connecting",
"status" : "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"message" : "connecting",
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:----------|:-------|:-------------------------------------------------------|
| `message` | 文字列 | コマンドが成功した場合の値は`connecting`。 |
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
* スタンドアロンモードでは接続できません - スタンドアロンモードではネットワーク関連のコマンドが無効にされています。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,110 @@
---
html: connect.html
parent: peer-management-methods.html
blurb: Force the rippled server to connect to a specific peer.
labels:
- Core Server
---
# connect
[[Source]](https://github.com/ripple/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/Connect.cpp "Source")
The `connect` command forces the `rippled` server to connect to a specific peer `rippled` server.
*The `connect` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users!*
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "connect",
"ip": "192.170.145.88",
"port": 51235
}
```
*JSON-RPC*
```json
{
"method": "connect",
"params": [
{
"ip": "192.170.145.88",
"port": 51235
}
]
}
```
*Commandline*
```sh
#Syntax: connect ip [port]
rippled connect 192.170.145.88 51235
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `ip` | String | IP address of the server to connect to |
| `port` | Number | _(Optional)_ Port number to use when connecting. The default is **2459**. [Updated in: rippled 1.6.0][] |
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
{
"result" : {
"message" : "connecting",
"status" : "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"message" : "connecting",
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:----------|:-------|:-------------------------------------------------------|
| `message` | String | The value `connecting`, if the command was successful. |
### Possible Errors
- Any of the [universal error types][].
- `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
- Cannot connect in standalone mode - Network-related commands are disabled in stand-alone mode.
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,143 @@
---
html: peer_reservations_add.html
parent: peer-management-methods.html
blurb: 特定のピアサーバー用の予約済みスロットを追加します。
labels:
- コアサーバー
---
# peer_reservations_add
[[ソース]](https://github.com/ripple/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L36 "Source")
この`{{currentpage.name}}`メソッドは、XRP Ledger[ピアツーピアネットワーク](peer-protocol.html)内の特定のピアサーバーの予約済みスロットを追加または更新します。[新規: rippled 1.4.0][]
_`{{currentpage.name}}`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_add_example_1",
"command": "{{currentpage.name}}",
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99",
"description": "Ripple s1 server 'WOOL'"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}",
"params": [{
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99",
"description": "Ripple s1 server 'WOOL'"
}]
}
```
*コマンドライン*
```sh
#Syntax: {{currentpage.name}} <public_key> [<description>]
rippled {{currentpage.name}} n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99 "Ripple s1 server 'WOOL'"
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:--------------|:-------|:----------------------------------------------------|
| `public_key` | 文字列 | [base58][]での予約を追加するピアリザベーションの[ノード公開鍵][] 。 |
| `description` | 文字列 | _(省略可)_ ピアリザベーションに関するカスタムの説明。64文字を超える部分は、再起動時にサーバーによって切り捨てられます。 |
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_add_example_1",
"result": {
"previous": {
"description": "Maecenas atavis edite regibus, O et praesidium et dulce decus meum, Sunt quos curriculo pulverem Olympicum Collegisse iuvat metaque fervidis Evitata rotis palmaque nobilis Terrarum dominos evehit ad deos; Hunc, si mobilium turba Quiritium Certat tergeminis tollere honoribus; Illum, si proprio condidit horreo, Quidquid de Libycis verritur areis.",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result": {
"previous": {
"description": "Maecenas atavis edite regibus, O et praesidium et dulce decus meum, Sunt quos curriculo pulverem Olympicum Collegisse iuvat metaque fervidis Evitata rotis palmaque nobilis Terrarum dominos evehit ad deos; Hunc, si mobilium turba Quiritium Certat tergeminis tollere honoribus; Illum, si proprio condidit horreo, Quidquid de Libycis verritur areis.",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status": "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result": {
"previous": {
"description": "Maecenas atavis edite regibus, O et praesidium et dulce decus meum, Sunt quos curriculo pulverem Olympicum Collegisse iuvat metaque fervidis Evitata rotis palmaque nobilis Terrarum dominos evehit ad deos; Hunc, si mobilium turba Quiritium Certat tergeminis tollere honoribus; Illum, si proprio condidit horreo, Quidquid de Libycis verritur areis.",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:-----------|:-------|:-------------------------------------------------------|
| `previous` | オブジェクト | _省略される場合があります_ 同じ[ノード公開鍵][]の以前のエントリ(同じノード公開鍵を使用した予約がすでに存在する場合)。以下で説明するように、このオブジェクトは、**ピアリザベーションオブジェクト**というフォーマットになります。 |
同じ[ノード公開鍵][]に以前のエントリがなかった場合、`result`オブジェクトは空です。
#### ピアリザベーションオブジェクト
`previous`フィールドが指定されている場合は、このピアリザベーションの以前のステータスが次のフィールドとともに表示されます。
{% include '_snippets/peer_reservation_object.ja.md' %}
<!--_ -->
### 考えられるエラー
- いずれかの[汎用エラータイプ][]。
- `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
- `publicMalformed` - 要求の`public_key`フィールドが無効です。[base58][]フォーマットの有効なノード公開鍵である必要があります。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,144 @@
---
html: peer_reservations_add.html
parent: peer-management-methods.html
blurb: Add a reserved slot for a specific peer server.
labels:
- Core Server
---
# peer_reservations_add
[[Source]](https://github.com/ripple/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L36 "Source")
The `{{currentpage.name}}` method adds or updates a reserved slot for a specific peer server in the XRP Ledger [peer-to-peer network](peer-protocol.html). [New in: rippled 1.4.0][]
_The `{{currentpage.name}}` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_add_example_1",
"command": "{{currentpage.name}}",
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99",
"description": "Ripple s1 server 'WOOL'"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}",
"params": [{
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99",
"description": "Ripple s1 server 'WOOL'"
}]
}
```
*Commandline*
```sh
#Syntax: {{currentpage.name}} <public_key> [<description>]
rippled {{currentpage.name}} n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99 "Ripple s1 server 'WOOL'"
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:--------------|:-------|:----------------------------------------------------|
| `public_key` | String | The [node public key][] of the peer reservation to add a reservation for, in [base58][]. |
| `description` | String | _(Optional)_ A custom description for the peer reservation. The server truncates descriptions longer than 64 characters when it restarts. |
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_add_example_1",
"result": {
"previous": {
"description": "Maecenas atavis edite regibus, O et praesidium et dulce decus meum, Sunt quos curriculo pulverem Olympicum Collegisse iuvat metaque fervidis Evitata rotis palmaque nobilis Terrarum dominos evehit ad deos; Hunc, si mobilium turba Quiritium Certat tergeminis tollere honoribus; Illum, si proprio condidit horreo, Quidquid de Libycis verritur areis.",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result": {
"previous": {
"description": "Maecenas atavis edite regibus, O et praesidium et dulce decus meum, Sunt quos curriculo pulverem Olympicum Collegisse iuvat metaque fervidis Evitata rotis palmaque nobilis Terrarum dominos evehit ad deos; Hunc, si mobilium turba Quiritium Certat tergeminis tollere honoribus; Illum, si proprio condidit horreo, Quidquid de Libycis verritur areis.",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status": "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result": {
"previous": {
"description": "Maecenas atavis edite regibus, O et praesidium et dulce decus meum, Sunt quos curriculo pulverem Olympicum Collegisse iuvat metaque fervidis Evitata rotis palmaque nobilis Terrarum dominos evehit ad deos; Hunc, si mobilium turba Quiritium Certat tergeminis tollere honoribus; Illum, si proprio condidit horreo, Quidquid de Libycis verritur areis.",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:-----------|:-------|:-------------------------------------------------------|
| `previous` | Object | _(May be omitted)_ The previous entry for the same [node public key][], if there was already a reservation with the same node public key. This object is formatted as a **Peer Reservation Object**, as described below. |
If there was not a previous entry for the same [node public key][], the `result` object is empty.
#### Peer Reservation Object
If the `previous` field is provided, it shows the previous status of this peer reservation, with the following fields:
{% include '_snippets/peer_reservation_object.md' %}
<!--_ -->
### Possible Errors
- 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 valid. It must be a valid node public key in [base58][] format.
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,140 @@
---
html: peer_reservations_del.html
parent: peer-management-methods.html
blurb: 特定のピアサーバー用の予約済みスロットを削除します。
labels:
- コアサーバー
---
# peer_reservations_del
[[ソース]](https://github.com/ripple/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L89 "Source")
`{{currentpage.name}}`メソッドは、特定の[ピアリザベーション][]を削除します(存在する場合)。[新規: rippled 1.4.0][]
_`{{currentpage.name}}`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
**注記:** ピアリザベーションを削除しても、対応するピアが接続されている場合、そのピアは自動的に切断されません。
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_del_example_1",
"command": "{{currentpage.name}}",
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}",
"params": [{
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}]
}
```
*コマンドライン*
```sh
#Syntax: {{currentpage.name}} <public_key>
rippled {{currentpage.name}} n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:------------|:--------------------------|:-----------------------------------|
| `public_key` | 文字列 | 削除する[ピアリザベーション][]の[ノード公開鍵][][base58][]フォーマット) |
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_del_example_1",
"result": {
"previous": {
"description": "Ripple s1 server 'WOOL'",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result" : {
"previous" : {
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status" : "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"previous" : {
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:--------|:-------|:----------------------------------------------------------|
| `previous` | オブジェクト | _省略される場合があります_ 削除する前のピアリザベーションの最後のステータスを伴った、**ピアリザベーションオブジェクト**。このフィールドは、ピアリザベーションが正常に削除された場合、必ず表示されます。 |
**注記:** 指定された予約が存在しなかった場合は、このコマンドによって、成功を示す空の結果オブジェクトが返されます。この場合、`previous`フィールドは省略されます。
#### ピアリザベーションオブジェクト
`previous`フィールドが指定されている場合は、このピアリザベーションの以前のステータスが次のフィールドとともに表示されます。
{% include '_snippets/peer_reservation_object.ja.md' %}
<!--_ -->
### 考えられるエラー
- いずれかの[汎用エラータイプ][]。
- `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
- `publicMalformed` - 要求の`public_key`フィールドが無効です。[base58][]フォーマットの有効なノード公開鍵である必要があります。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,140 @@
---
html: peer_reservations_del.html
parent: peer-management-methods.html
blurb: Remove a reserved slot for a specific peer server.
labels:
- Core Server
---
# peer_reservations_del
[[Source]](https://github.com/ripple/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L89 "Source")
The `{{currentpage.name}}` method removes a specific [peer reservation][], if one exists. [New in: rippled 1.4.0][]
_The `{{currentpage.name}}` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
**Note:** Removing a peer reservation does not automatically disconnect the corresponding peer, if that peer is connected.
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_del_example_1",
"command": "{{currentpage.name}}",
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}",
"params": [{
"public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}]
}
```
*Commandline*
```sh
#Syntax: {{currentpage.name}} <public_key>
rippled {{currentpage.name}} n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameter:
| `Field` | Type | Description |
|:------------|:--------------------------|:-----------------------------------|
| `public_key` | String | The [node public key][] of the [peer reservation][] to remove, in [base58][] format. |
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_del_example_1",
"result": {
"previous": {
"description": "Ripple s1 server 'WOOL'",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result" : {
"previous" : {
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status" : "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"previous" : {
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `previous` | Object | _(May be omitted)_ A **peer reservation object** with the last state of the peer reservation before deleting it. This field is always provided if a peer reservation was successfully deleted. |
**Note:** If the specified reservation did not exist, this command returns success with an empty result object. In this case, the `previous` field is omitted.
#### Peer Reservation Object
If the `previous` field is provided, it shows the previous status of this peer reservation, with the following fields:
{% include '_snippets/peer_reservation_object.md' %}
<!--_ -->
### Possible Errors
- 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 valid. It must be a valid node public key in [base58][] format.
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,141 @@
---
html: peer_reservations_list.html
parent: peer-management-methods.html
blurb: 特定のピアサーバー用の予約済みスロットをリスト表示します。
labels:
- コアサーバー
---
# peer_reservations_list
[[ソース]](https://github.com/ripple/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L116 "Source")
`{{currentpage.name}}`メソッドは、[ピアリザベーション][]を一覧表示します。[新規: rippled 1.4.0][]
_`{{currentpage.name}}`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_list_example_1",
"command": "{{currentpage.name}}"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}"
}
```
*コマンドライン*
```sh
#Syntax: {{currentpage.name}}
rippled {{currentpage.name}}
```
<!-- MULTICODE_BLOCK_END -->
この要求にはパラメーターは含まれません。
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_list_example_1",
"result": {
"reservations": [
{
"description": "Ripple s1 server 'WOOL'",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
{
"node": "n9MZRo92mzYjjsa5XcqnPC7GFYAnENo9VfJzKmpcS9EFZvw5fgwz"
}
]
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result" : {
"reservations" : [
{
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
{
"node" : "n9MZRo92mzYjjsa5XcqnPC7GFYAnENo9VfJzKmpcS9EFZvw5fgwz"
}
],
"status" : "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
2019-Dec-27 21:56:07.253260422 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"reservations" : [
{
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
{
"node" : "n9MZRo92mzYjjsa5XcqnPC7GFYAnENo9VfJzKmpcS9EFZvw5fgwz"
}
],
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:---------------|:------|:----------------------------------------------------|
| `reservations` | 配列 | 既存の[ピアリザベーション][]のリスト。各メンバーはピアリザベーションオブジェクトです。詳細は以下のとおりです。 |
#### ピアリザベーションオブジェクト
`reservations`配列の各メンバーは、1つの[ピアリザベーション][]を表すJSONオブジェクトです。このオブジェクトのフィールドを次に示します。
{% include '_snippets/peer_reservation_object.ja.md' %}
<!--_ -->
### 考えられるエラー
- いずれかの[汎用エラータイプ][]。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,142 @@
---
html: peer_reservations_list.html
parent: peer-management-methods.html
blurb: List reserved slots for specific peer servers.
labels:
- Core Server
---
# peer_reservations_list
[[Source]](https://github.com/ripple/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L116 "Source")
The `{{currentpage.name}}` method lists [peer reservations][]. [New in: rippled 1.4.0][]
_The `{{currentpage.name}}` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_list_example_1",
"command": "{{currentpage.name}}"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}"
}
```
*Commandline*
```sh
#Syntax: {{currentpage.name}}
rippled {{currentpage.name}}
```
<!-- MULTICODE_BLOCK_END -->
This request does not take any parameters.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peer_reservations_list_example_1",
"result": {
"reservations": [
{
"description": "Ripple s1 server 'WOOL'",
"node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
{
"node": "n9MZRo92mzYjjsa5XcqnPC7GFYAnENo9VfJzKmpcS9EFZvw5fgwz"
}
]
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result" : {
"reservations" : [
{
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
{
"node" : "n9MZRo92mzYjjsa5XcqnPC7GFYAnENo9VfJzKmpcS9EFZvw5fgwz"
}
],
"status" : "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
2019-Dec-27 21:56:07.253260422 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"reservations" : [
{
"description" : "Ripple s1 server 'WOOL'",
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
},
{
"node" : "n9MZRo92mzYjjsa5XcqnPC7GFYAnENo9VfJzKmpcS9EFZvw5fgwz"
}
],
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:---------------|:------|:----------------------------------------------------|
| `reservations` | Array | List of existing [peer reservations][]. Each member is a peer reservation object, as described below. |
#### Peer Reservation Object
Each member of the `reservations` array is a JSON object describing one [peer reservation][]. This object has the following fields:
{% include '_snippets/peer_reservation_object.md' %}
<!--_ -->
### Possible Errors
- Any of the [universal error types][].
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,422 @@
---
html: peers.html
parent: peer-management-methods.html
blurb: ピアプロトコルでこのサーバーに現在接続されているその他のすべてのrippledサーバーのリストを返します。
labels:
- コアサーバー
---
# peers
[[ソース]](https://github.com/ripple/rippled/blob/52f298f150fc1530d201d3140c80d3eaf781cb5f/src/ripple/rpc/handlers/Peers.cpp "Source")
`peers`コマンドは、[ピアプロトコル](peer-protocol.html)でこのサーバーに現在接続されているその他のすべての`rippled`サーバーのリスト(各サーバーの接続状況と同期状況を含む)を返します。
*`peers`要求は、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。*
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "peers"
}
```
*コマンドライン*
```
rippled peers
```
<!-- MULTICODE_BLOCK_END -->
この要求には追加パラメーターはありません。
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"status": "success",
"type": "response",
"result": {
"cluster": {},
"peers": [
{
"address": "184.172.237.226:51235",
"complete_ledgers": "14534883 - 18828973",
"latency": 117,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 54,
"public_key": "n9KNYm52mgcUQ7R2RA4kyw9Nk1yc6S35PaiuyqjYsy6UjhCXpw12",
"uptime": 55036,
"version": "rippled-0.30.0-hf1"
},
{
"address": "54.186.248.91:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 91,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 62,
"public_key": "n9MT5EjnV912KGuBUqPs4tpdhzMPGcnDBrTuWkD9sWQHJ1kDcUcz",
"uptime": 83814,
"version": "rippled-0.30.1"
},
{
"address": "54.84.21.230:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 202,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 60,
"public_key": "n9KJb7NMxGySRcjCqh69xEPMUhwJx22qntYYXsnUqYgjsJhNoW7g",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "72.251.233.162:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 36,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 66,
"public_key": "n9M8RSk6hrvXZKFQ6CxPbJsjt73xW1xsnjn7G69VAMbE2j4sBQNQ",
"uptime": 99619,
"version": "rippled-0.30.1"
},
{
"address": "162.217.98.136:51235",
"complete_ledgers": "32570 - 18828973",
"latency": 118,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 69,
"public_key": "n944PcXEoZaiEHnwFD92xA4bxsS7jjYb27WcdDQwkHYyk1MWTEsX",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "72.251.233.163:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 51,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 61,
"public_key": "n94ne2Z5dX8qcJNa8cPtAbtn21gEaCoEduS8TwdGAhi1iLfCUMDm",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "54.186.73.52:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 72,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 60,
"public_key": "n9JySgyBVcQKvyDoeRKg7s2Mm6ZcFHk22vUZb3o1HSosWxcj9xPt",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "72.251.233.165:51235",
"complete_ledgers": "18827949 - 18828973",
"latency": 40,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 63,
"public_key": "n9M77Uc9CSaSFZqt5V7sxPR4kFwbha7hwUFBD5v5kZt2SQjBeoDs",
"uptime": 99625,
"version": "rippled-0.30.1"
},
{
"address": "72.251.232.173:51235",
"complete_ledgers": "32570 - 18828973",
"latency": 40,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 71,
"public_key": "n9JveA1hHDGjZECaYC7KM4JP8NXXzNXAxixbzcLTGnrsFZsA9AD1",
"uptime": 99625,
"version": "rippled-0.31.0-b6"
},
{
"address": "98.167.120.212:51235",
"complete_ledgers": "18828845 - 18828973",
"latency": 99,
"ledger": "50A2577CE6EB8A92847C443BDA45F5C5F0A22B9C6F4B47DBA0C12BDA75001D01",
"load": 60,
"public_key": "n9LDBRoqPYY7RdkNXbX1dqZXVtUKcSqzs2CZPhTH7ymA9X7Xzmpj",
"uptime": 99625,
"version": "rippled-0.30.1-rc4"
}
]
}
}
```
*JSON-RPC*
```json
{
"result" : {
"cluster" : {},
"peers" : [
{
"address" : "184.172.237.226:51235",
"complete_ledgers" : "14535005 - 18828957",
"latency" : 114,
"ledger" : "80FCB89BC5B90D2B9C2CE33786738809796F04FB9CB1E5EEE768DD9A9C399FB0",
"load" : 47,
"public_key" : "n9KNYm52mgcUQ7R2RA4kyw9Nk1yc6S35PaiuyqjYsy6UjhCXpw12",
"uptime" : 54976,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "54.186.248.91:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 68,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 56,
"public_key" : "n9MT5EjnV912KGuBUqPs4tpdhzMPGcnDBrTuWkD9sWQHJ1kDcUcz",
"uptime" : 83754,
"version" : "rippled-0.30.1"
},
{
"address" : "54.84.21.230:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 135,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 54,
"public_key" : "n9KJb7NMxGySRcjCqh69xEPMUhwJx22qntYYXsnUqYgjsJhNoW7g",
"uptime" : 99565,
"version" : "rippled-0.30.1"
},
{
"address" : "72.251.233.162:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 24,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 61,
"public_key" : "n9M8RSk6hrvXZKFQ6CxPbJsjt73xW1xsnjn7G69VAMbE2j4sBQNQ",
"uptime" : 99560,
"version" : "rippled-0.30.1"
},
{
"address" : "162.217.98.136:51235",
"complete_ledgers" : "32570 - 18828958",
"latency" : 88,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 55,
"public_key" : "n944PcXEoZaiEHnwFD92xA4bxsS7jjYb27WcdDQwkHYyk1MWTEsX",
"uptime" : 99566,
"version" : "rippled-0.30.1"
},
{
"address" : "72.251.233.163:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 24,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 56,
"public_key" : "n94ne2Z5dX8qcJNa8cPtAbtn21gEaCoEduS8TwdGAhi1iLfCUMDm",
"uptime" : 99566,
"version" : "rippled-0.30.1"
},
{
"address" : "54.186.73.52:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 51,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 56,
"public_key" : "n9JySgyBVcQKvyDoeRKg7s2Mm6ZcFHk22vUZb3o1HSosWxcj9xPt",
"uptime" : 99566,
"version" : "rippled-0.30.1"
},
{
"address" : "72.251.233.165:51235",
"complete_ledgers" : "18827934 - 18828958",
"latency" : 25,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 56,
"public_key" : "n9M77Uc9CSaSFZqt5V7sxPR4kFwbha7hwUFBD5v5kZt2SQjBeoDs",
"uptime" : 99566,
"version" : "rippled-0.30.1"
},
{
"address" : "72.251.232.173:51235",
"complete_ledgers" : "32570 - 18828958",
"latency" : 24,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 81,
"public_key" : "n9JveA1hHDGjZECaYC7KM4JP8NXXzNXAxixbzcLTGnrsFZsA9AD1",
"uptime" : 99566,
"version" : "rippled-0.31.0-b6"
},
{
"address" : "98.167.120.212:51235",
"complete_ledgers" : "18828830 - 18828957",
"latency" : 137,
"ledger" : "9447480E351221123B1A454356435A66C188D9794B0197A060637E19F074B421",
"load" : 54,
"public_key" : "n9LDBRoqPYY7RdkNXbX1dqZXVtUKcSqzs2CZPhTH7ymA9X7Xzmpj",
"uptime" : 99566,
"version" : "rippled-0.30.1-rc4"
}
],
"status" : "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"cluster" : {},
"peers" : [
{
"address" : "72.251.232.173:51235",
"complete_ledgers" : "32570 - 18851276",
"latency" : 22,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 20,
"public_key" : "n9JveA1hHDGjZECaYC7KM4JP8NXXzNXAxixbzcLTGnrsFZsA9AD1",
"uptime" : 26,
"version" : "rippled-0.31.0-b6"
},
{
"address" : "169.53.155.36:51235",
"complete_ledgers" : "12920801 - 18851275",
"latency" : 127,
"load" : 16,
"public_key" : "n9L42gouyppsmsMXXUdByXnVDUZv1eu6KLZUWUkNHsukzv3pr7po",
"uptime" : 18,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "169.53.155.44:51235",
"complete_ledgers" : "12920779 - 18851276",
"latency" : 20,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 49,
"public_key" : "n94BpoEqEf1PxpAv3Bmyy2WoKHyeMpHPH4tcj6P9NW98zdzEyRhi",
"uptime" : 50,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "192.170.145.77:51235",
"complete_ledgers" : "32570 - 18851277",
"latency" : 145,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 29,
"public_key" : "n9LwcmtjDAJQz4u8DZCMGQ9GXHuMEV4Cf8KpPL9NgqAV2puxdYc2",
"uptime" : 51,
"version" : "rippled-0.30.1"
},
{
"address" : "162.217.98.136:51235",
"complete_ledgers" : "32570 - 18851277",
"latency" : 83,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 30,
"public_key" : "n944PcXEoZaiEHnwFD92xA4bxsS7jjYb27WcdDQwkHYyk1MWTEsX",
"uptime" : 50,
"version" : "rippled-0.30.1"
},
{
"address" : "184.172.237.241:51235",
"complete_ledgers" : "14153089 - 18851277",
"latency" : 104,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 29,
"public_key" : "n9L3LdCTVYUhCKtQtxiHrQ5ocNXVqZFiEJpF5pX9DXahYLrvi5R7",
"uptime" : 51,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "99.110.49.91:51301",
"complete_ledgers" : "32570 - 18851277",
"latency" : 152,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 55,
"public_key" : "n9LGv3xKVqhxq6vcTfmJZhxyhjywsZbvJvpFbZRXzzz5uQ64xTLy",
"uptime" : 51,
"version" : "rippled-0.31.0-b6"
},
{
"address" : "169.53.155.45:51235",
"complete_ledgers" : "12920779 - 18851277",
"latency" : 15,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 30,
"public_key" : "n9MRiHyMk43YpqATWeT8Zyu4HJq1btb5oNKmnHTkLJKQg9LQQq3v",
"uptime" : 51,
"version" : "rippled-0.30.0-hf1"
},
{
"address" : "54.186.248.91:51235",
"complete_ledgers" : "18850253 - 18851277",
"latency" : 63,
"ledger" : "592C723DDBB1C5119F0D8288894060C83C8C2975A061D7C9971427D6798098F5",
"load" : 36,
"public_key" : "n9MT5EjnV912KGuBUqPs4tpdhzMPGcnDBrTuWkD9sWQHJ1kDcUcz",
"uptime" : 51,
"version" : "rippled-0.30.1"
}
],
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドからなるJSONオブジェクトが含まれます。
| `Field` | 型 | 説明 |
|:----------|:-------|:--------------------------------------------------------|
| `cluster` | オブジェクト | [クラスターとして構成されている](clustering.html)場合は、同じクラスター内の他の`rippled`サーバーの概要。[新規: rippled 0.30.1][] |
| `peers` | 配列 | peerオブジェクトからなる配列。 |
`cluster`オブジェクトの各フィールドは、該当する`rippled`サーバーの識別用キーペアの公開鍵です。(これは、[server_infoメソッド][]で当該サーバーから`pubkey_node`として返される値と同じです。)そのフィールドの内容は、以下のフィールドを持つオブジェクトです。
| `Field` | 型 | 説明 |
|:--------|:-------|:----------------------------------------------------------|
| `tag` | 文字列 | 構成ファイルで定義されているこのクラスターメンバーの表示名。 |
| `fee` | 数値 | (省略される場合があります)このクラスターメンバーが[トランザクションコスト](transaction-cost.html)に適用する負荷乗数。 |
| `age` | 数値 | このクラスターメンバーからの最終クラスターレポート以降の経過秒数。 |
`peers`配列の各メンバーは、以下のフィールドを持つpeerオブジェクトです。
| `Field` | 型 | 説明 |
|:-------------------|:--------|:----------------------------------------------|
| `address` | 文字列 | このピアが接続しているIPアドレスとポート。 |
| `cluster` | ブール値 | (省略される場合があります)`true`の場合、現在のサーバーとピアサーバーは同じ`rippled`クラスターに含まれています。 |
| `name` | 文字列 | (省略される場合があります)ピアが同じクラスターに含まれている場合、この名前は構成ファイルで定義されているそのピアサーバーの表示名です。 |
| `complete_ledgers` | 文字列 | ピア`rippled`で利用可能なレジャーバージョンのシーケンス番号を示す範囲式 |
| `inbound` | ブール値 | (省略される場合があります)`true`の場合は、ピアはローカルサーバーに接続しています。 |
| `latency` | 数値 | ピアへのネットワーク遅延(ミリ秒単位) |
| `ledger` | 文字列 | 最後に閉鎖されたピアのレジャーのハッシュ。 |
| `load` | 数値 | ピアサーバーによるローカルサーバーへの負荷の測定値。この数値が大きいほど負荷が高くなります。(負荷の測定単位は正式には定義されていません。) |
| `protocol` | 文字列 | (省略される場合があります)ピアが使用しているプロトコルバージョン(ローカルサーバーのプロトコルバージョンと異なる場合)。 |
| `public_key` | 文字列 | (省略される場合があります)ピアのメッセージの整合性の検証に使用できる公開鍵。これは、検証に使用する公開鍵とは異なりますが、フォーマットは同じです。 |
| `sanity` | 文字列 | (省略される場合があります)このピアが現行サーバーと同じルールとレジャーシーケンスに従っているかどうか。値が`insane`の場合、ピアは並列ネットワークの一部である可能性があります。値が`unknown`の場合、現行サーバーはピアに互換性があるかどうかを把握していません。 <!-- STYLE_OVERRIDE: insane --> |
| `status` | 文字列 | (省略される場合があります)ピアからの最新のステータスメッセージ。`connecting``connected``monitoring``validating``shutting`のいずれかです。 |
| `uptime` | 数値 | `rippled`サーバーがこのピアに継続して接続していた秒数。[新規: rippled 0.30.1][] |
| `version` | 文字列 | (省略される場合があります)ピアサーバーの`rippled`バージョン番号 |
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,424 @@
---
html: peers.html
parent: peer-management-methods.html
blurb: Get information about the peer servers connected.
labels:
- Core Server
---
# peers
[[Source]](https://github.com/ripple/rippled/blob/52f298f150fc1530d201d3140c80d3eaf781cb5f/src/ripple/rpc/handlers/Peers.cpp "Source")
The `peers` command returns a list of all other `rippled` servers currently connected to this one over the [Peer Protocol](peer-protocol.html), including information on their connection and sync status.
*The `peers` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users!*
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "peers"
}
```
*Commandline*
```
rippled peers
```
<!-- MULTICODE_BLOCK_END -->
The request includes no additional parameters.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "peers_example",
"result": {
"cluster": {},
"peers": [
{
"address": "5.189.239.203:51235",
"complete_ledgers": "51813132 - 51815132",
"ledger": "99A1E29C9F235DCCBB087F85F11756BECA606A756C22AB826AB1F319C470C3E3",
"load": 157,
"metrics": {
"avg_bps_recv": "10255",
"avg_bps_sent": "2015",
"total_bytes_recv": "356809",
"total_bytes_sent": "74208"
},
"public_key": "n94ht2A9aBoARRhk1rwypZNVXJDiMN4qzs1Bd5KsQaSnN3WVy8Tw",
"uptime": 2,
"version": "rippled-1.4.0"
},
{
"address": "[::ffff:50.22.123.222]:51235",
"complete_ledgers": "32570 - 51815131",
"ledger": "99A1E29C9F235DCCBB087F85F11756BECA606A756C22AB826AB1F319C470C3E3",
"load": 219,
"metrics": {
"avg_bps_recv": "7223",
"avg_bps_sent": "6742",
"total_bytes_recv": "593148",
"total_bytes_sent": "204540"
},
"public_key": "n9LbkoB9ReSbaA9SGL317fm6CvjLcFG8hGoierLYfwiCDsEXHcP3",
"uptime": 3,
"version": "rippled-1.3.1"
},
{
"address": "51.89.153.154:51235",
"complete_ledgers": "51814130 - 51815130",
"ledger": "808800914218F5622ED5F639BC0EEDF9530E47C6F81CD1EB3866FA1496F62B9C",
"load": 27,
"metrics": {
"avg_bps_recv": "172748",
"avg_bps_sent": "7355",
"total_bytes_recv": "5455031",
"total_bytes_sent": "234276"
},
"public_key": "n944vHEtDhPm4Bd9rPowZMJduR9XrpxKS9AKHFfcJtKRVAdhfFfD",
"uptime": 8,
"version": "rippled-1.4.0"
},
{
"address": "192.151.157.20:51235",
"complete_ledgers": "51813128 - 51815128",
"latency": 8000,
"load": 70,
"metrics": {
"avg_bps_recv": "463258",
"avg_bps_sent": "21954",
"total_bytes_recv": "13910029",
"total_bytes_sent": "678908"
},
"public_key": "n9JbUWaFZDi1UxFexJXf1D9dRpn8UK6pTNwRxBCjEvLEwQa384uP",
"uptime": 19,
"version": "rippled-1.3.1"
},
{
"address": "[::ffff:94.237.45.66]:51235",
"complete_ledgers": "51815004 - 51815131",
"ledger": "99A1E29C9F235DCCBB087F85F11756BECA606A756C22AB826AB1F319C470C3E3",
"load": 202,
"metrics": {
"avg_bps_recv": "18258",
"avg_bps_sent": "1903",
"total_bytes_recv": "1184272",
"total_bytes_sent": "65101"
},
"public_key": "n9Lg83FYh8YDivG9TcgXhq5Y3PwunmRqVfvibd19Ko9uu3DtqLBM",
"uptime": 2,
"version": "rippled-1.3.1"
},
{
"address": "[::ffff:149.56.21.37]:51235",
"complete_ledgers": "51478129 - 51815129",
"ledger": "462FA0B34723C12EBE4DC9974B397D6A21D4F1770DE3CD584D4E33DBC83FC247",
"load": 182,
"metrics": {
"avg_bps_recv": "132648",
"avg_bps_sent": "13935",
"total_bytes_recv": "3983628",
"total_bytes_sent": "433757"
},
"public_key": "n94Dutms7xoSgWjbjYftDJGXvc5jaeYZq3J7o1Jwo35dZAyuzNWT",
"uptime": 14,
"version": "rippled-1.3.1"
},
{
"address": "77.117.40.191:51235",
"complete_ledgers": "51812267 - 51815071",
"latency": 30555,
"ledger": "0562C7A1898196FDC60B8DB1838961BFBA6B9304B1510E6030B32A4FB38400FB",
"load": 3783,
"metrics": {
"avg_bps_recv": "495673",
"avg_bps_sent": "57527",
"total_bytes_recv": "17137378",
"total_bytes_sent": "4140188"
},
"public_key": "n9LELaTdzKwfzhvHZKKrD3ZEJtWABSg4ocAT4dz5Vg5JgAVGwVdd",
"uptime": 73,
"version": "rippled-1.4.0"
},
{
"address": "[::ffff:94.237.49.50]:51235",
"complete_ledgers": "51815002 - 51815130",
"latency": 8000,
"ledger": "C6030B52471F8076F88A90C6FC2B2998794B32023FAC69FF573437D6D1470961",
"load": 1563,
"metrics": {
"avg_bps_recv": "215539",
"avg_bps_sent": "25705",
"total_bytes_recv": "23134383",
"total_bytes_sent": "2738880"
},
"public_key": "n9MLzBWq7WNM2sdpRKY2Tr3EJfxwSwsnDEpxU3auGJHgvq3Bit6S",
"uptime": 112,
"version": "rippled-1.3.1"
}
]
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result" : {
"cluster" : {},
"peers" : [
{
"address" : "50.22.123.222:51235",
"complete_ledgers" : "32570 - 51815097",
"ledger" : "223DB74FE021AB1A4AA9E1CC588E0DBCC3FC7C080B93C01C30C246D89F951EA2",
"load" : 7,
"metrics" : {
"avg_bps_recv" : "1152",
"avg_bps_sent" : "332",
"total_bytes_recv" : "96601",
"total_bytes_sent" : "45322"
},
"public_key" : "n9LbkoB9ReSbaA9SGL317fm6CvjLcFG8hGoierLYfwiCDsEXHcP3",
"uptime" : 1,
"version" : "rippled-1.3.1"
},
{
"address" : "212.83.147.67:51235",
"complete_ledgers" : "51815014 - 51815040",
"ledger" : "223DB74FE021AB1A4AA9E1CC588E0DBCC3FC7C080B93C01C30C246D89F951EA2",
"load" : 1,
"metrics" : {
"avg_bps_recv" : "0",
"avg_bps_sent" : "1490",
"total_bytes_recv" : "18348",
"total_bytes_sent" : "46013"
},
"public_key" : "n94s5V53w1g4HdEdHdUU1FVrqHTVDbcb7bt44ib9JcM3c281LoDr",
"sanity" : "unknown",
"uptime" : 2,
"version" : "rippled-1.3.1"
},
{
"address" : "158.69.24.50:51235",
"complete_ledgers" : "51478098 - 51815098",
"ledger" : "223DB74FE021AB1A4AA9E1CC588E0DBCC3FC7C080B93C01C30C246D89F951EA2",
"load" : 55,
"metrics" : {
"avg_bps_recv" : "88080",
"avg_bps_sent" : "2703",
"total_bytes_recv" : "2786780",
"total_bytes_sent" : "89368"
},
"public_key" : "n9KfEhmmdxmjJdpbpRHGJ9ezoNzdyUepA11cT71jmq1fMDsZAcSh",
"uptime" : 3,
"version" : "rippled-1.3.1"
},
{
"address" : "[::ffff:174.64.99.193]:51235",
"complete_ledgers" : "51813091 - 51815091",
"latency" : 16000,
"ledger" : "CF72319DC762355C92BDD29E4CE066CEB03FF2A077A511D586B9FD7B74F55D94",
"load" : 325,
"metrics" : {
"avg_bps_recv" : "19012",
"avg_bps_sent" : "52053",
"total_bytes_recv" : "586809",
"total_bytes_sent" : "1678192"
},
"public_key" : "n9MH4Xu8FYPPoUFs679NQp7F6epFznM7x6bF4sAJWQvKkPBUHgd3",
"uptime" : 26,
"version" : "rippled-1.4.0-b8"
},
{
"address" : "[::ffff:94.237.45.66]:51235",
"complete_ledgers" : "51814966 - 51815093",
"latency" : 8773,
"ledger" : "61CF015A709122917B001367EE81E5E0D56E485A0BCAB53785A1CB830E0F9589",
"load" : 3522,
"metrics" : {
"avg_bps_recv" : "368875",
"avg_bps_sent" : "59308",
"total_bytes_recv" : "11558753",
"total_bytes_sent" : "2257872"
},
"public_key" : "n9Lg83FYh8YDivG9TcgXhq5Y3PwunmRqVfvibd19Ko9uu3DtqLBM",
"uptime" : 37,
"version" : "rippled-1.3.1"
}
],
"status" : "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"cluster" : {},
"peers" : [
{
"address" : "50.22.123.222:51235",
"complete_ledgers" : "32570 - 51815097",
"ledger" : "223DB74FE021AB1A4AA9E1CC588E0DBCC3FC7C080B93C01C30C246D89F951EA2",
"load" : 7,
"metrics" : {
"avg_bps_recv" : "1152",
"avg_bps_sent" : "332",
"total_bytes_recv" : "96601",
"total_bytes_sent" : "45322"
},
"public_key" : "n9LbkoB9ReSbaA9SGL317fm6CvjLcFG8hGoierLYfwiCDsEXHcP3",
"uptime" : 1,
"version" : "rippled-1.3.1"
},
{
"address" : "212.83.147.67:51235",
"complete_ledgers" : "51815014 - 51815040",
"ledger" : "223DB74FE021AB1A4AA9E1CC588E0DBCC3FC7C080B93C01C30C246D89F951EA2",
"load" : 1,
"metrics" : {
"avg_bps_recv" : "0",
"avg_bps_sent" : "1490",
"total_bytes_recv" : "18348",
"total_bytes_sent" : "46013"
},
"public_key" : "n94s5V53w1g4HdEdHdUU1FVrqHTVDbcb7bt44ib9JcM3c281LoDr",
"sanity" : "unknown",
"uptime" : 2,
"version" : "rippled-1.3.1"
},
{
"address" : "158.69.24.50:51235",
"complete_ledgers" : "51478098 - 51815098",
"ledger" : "223DB74FE021AB1A4AA9E1CC588E0DBCC3FC7C080B93C01C30C246D89F951EA2",
"load" : 55,
"metrics" : {
"avg_bps_recv" : "88080",
"avg_bps_sent" : "2703",
"total_bytes_recv" : "2786780",
"total_bytes_sent" : "89368"
},
"public_key" : "n9KfEhmmdxmjJdpbpRHGJ9ezoNzdyUepA11cT71jmq1fMDsZAcSh",
"uptime" : 3,
"version" : "rippled-1.3.1"
},
{
"address" : "[::ffff:174.64.99.193]:51235",
"complete_ledgers" : "51813091 - 51815091",
"latency" : 16000,
"ledger" : "CF72319DC762355C92BDD29E4CE066CEB03FF2A077A511D586B9FD7B74F55D94",
"load" : 325,
"metrics" : {
"avg_bps_recv" : "19012",
"avg_bps_sent" : "52053",
"total_bytes_recv" : "586809",
"total_bytes_sent" : "1678192"
},
"public_key" : "n9MH4Xu8FYPPoUFs679NQp7F6epFznM7x6bF4sAJWQvKkPBUHgd3",
"uptime" : 26,
"version" : "rippled-1.4.0-b8"
},
{
"address" : "[::ffff:94.237.45.66]:51235",
"complete_ledgers" : "51814966 - 51815093",
"latency" : 8773,
"ledger" : "61CF015A709122917B001367EE81E5E0D56E485A0BCAB53785A1CB830E0F9589",
"load" : 3522,
"metrics" : {
"avg_bps_recv" : "368875",
"avg_bps_sent" : "59308",
"total_bytes_recv" : "11558753",
"total_bytes_sent" : "2257872"
},
"public_key" : "n9Lg83FYh8YDivG9TcgXhq5Y3PwunmRqVfvibd19Ko9uu3DtqLBM",
"uptime" : 37,
"version" : "rippled-1.3.1"
}
],
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing a JSON object with the following fields:
| `Field` | Type | Description |
|:----------|:-------|:--------------------------------------------------------|
| `cluster` | Object | Summary of other `rippled` servers in the same cluster, if [configured as a cluster](clustering.html). [New in: rippled 0.30.1][] |
| `peers` | Array | Array of peer objects. |
Each field of the `cluster` object is the public key of that `rippled` server's identifying key pair. (This is the same value that that server returns as `pubkey_node` in the [server_info method][].) The contents of that field are an object with the following fields:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `tag` | String | The display name for this cluster member as defined in the config file. |
| `fee` | Number | _(May be omitted)_ The load multiplier this cluster member is applying to the [transaction cost](transaction-cost.html) |
| `age` | Number | The number of seconds since the last cluster report from this cluster member. |
Each member of the `peers` array is a peer object with the following fields:
| `Field` | Type | Description |
|:-------------------|:--------|:----------------------------------------------|
| `address` | String | The IP address and port where this peer is connected |
| `cluster` | Boolean | _(May be omitted)_ If `true`, the current server and the peer server are part of the same `rippled` cluster. |
| `name` | String | _(May be omitted)_ If the peer is part of the same cluster, this is the display name for that server as defined in the config file. |
| `complete_ledgers` | String | Range expression indicating the [ledger indexes][ledger index] of the ledger versions the peer `rippled` server has available |
| `inbound` | Boolean | _(May be omitted)_ If `true`, the peer is connecting to the local server. |
| `latency` | Number | The network latency to the peer (in milliseconds) |
| `ledger` | String | The identifying [hash][Hash] of the peer's most recently closed ledger |
| `load` | Number | A measure of the amount of load the peer server is putting on the local server. Larger numbers indicate more load. (The units by which load is measured are not formally defined.) |
| `protocol` | String | _(May be omitted)_ The protocol version that the peer is using, if not the same as the local server. |
| `metrics` | Object | Details on the amount of data sent to and received from this peer. See the description of the `metrics` object below for details. [New in: rippled 1.4.0][] |
| `public_key` | String | _(May be omitted)_ A public key that can be used to verify the integrity of the peer's messages. This is not the same key that is used for validations, but it follows the same format. |
| `sanity` | String | _(May be omitted)_ Whether this peer is following the same rules and ledger history as the current server. A value of `insane` probably indicates that the peer is part of a [parallel network](parallel-networks.html). The value `unknown` indicates that the current server is unsure whether the peer is compatible. <!-- STYLE_OVERRIDE: insane --> |
| `status` | String | _(May be omitted)_ The most recent status message from the peer. Could be `connecting`, `connected`, `monitoring`, `validating`, or `shutting`. |
| `uptime` | Number | The number of seconds that your `rippled` server has been continuously connected to this peer. [New in: rippled 0.30.1][] |
| `version` | string | _(May be omitted)_ The `rippled` version number of the peer server |
The `metrics` object contains the following fields:
| `Field` | Type | Description |
|:-------------------|:--------|:----------------------------------------------|
| `avg_bps_recv` | String | The average bytes per second of data received from this peer. |
| `avg_bps_sent` | String | The average bytes per second of data sent to this peer. |
| `total_bytes_recv` | String | The total number of bytes of data received from this peer. |
| `total_bytes_sent` | String | The total number of bytes of data sent to this peer. |
**Note:** All of the fields in the `metrics` object are 64-bit unsigned integers serialized to string format so that they do not lose precision in JSON encoding/decoding.
### Possible Errors
- Any of the [universal error types][].
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,71 @@
---
html: ledger_accept.html
parent: server-control-methods.html
blurb: スタンドアロンモードでサーバーが現在処理中のレジャーを強制的に終了し、次のレジャー番号に進むようにします。
labels:
- コアサーバー
---
# ledger_accept
[[ソース]](https://github.com/ripple/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/LedgerAccept.cpp "Source")
`ledger_accept`メソッドは、サーバーが現在処理中のレジャーを強制的に終了し、次のレジャー番号に進むようにします。このメソッドはテスト専用であり、`rippled`サーバーがスタンドアロンモードで実行されている場合にのみ使用できます。
*`ledger_accept`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。*
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "Accept my ledger!",
"command": "ledger_accept"
}
```
*コマンドライン*
```sh
#Syntax: ledger_accept
rippled ledger_accept
```
<!-- MULTICODE_BLOCK_END -->
この要求はパラメーターを受け入れません。
### 応答フォーマット
処理が成功した応答の例:
```js
{
"id": "Accept my ledger!",
"status": "success",
"type": "response",
"result": {
"ledger_current_index": 6643240
}
}
```
応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:-----------------------|:-----------------|:---------------------------------|
| `ledger_current_index` | 符号なし整数 | 新規に作成される「現行」レジャーインデックス |
**注記:** レジャーを閉鎖すると、`rippled`がそのレジャーのトランザクションの正規順序を決定してリプレイします。これにより、以前に現行レジャーに暫定的に適用されていたトランザクションの結果が変化することがあります。
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
* `notStandAlone` - `rippled`サーバーが現在スタンドアロンモードで実行されていない場合。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,71 @@
---
html: ledger_accept.html
parent: server-control-methods.html
blurb: Close and advance the ledger in stand-alone mode.
labels:
- Core Server
---
# ledger_accept
[[Source]](https://github.com/ripple/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/LedgerAccept.cpp "Source")
The `ledger_accept` method forces the server to close the current-working ledger and move to the next ledger number. This method is intended for testing purposes only, and is only available when the `rippled` server is running stand-alone mode.
*The `ledger_accept` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users!*
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "Accept my ledger!",
"command": "ledger_accept"
}
```
*Commandline*
```sh
#Syntax: ledger_accept
rippled ledger_accept
```
<!-- MULTICODE_BLOCK_END -->
The request accepts no parameters.
### Response Format
An example of a successful response:
```js
{
"id": "Accept my ledger!",
"status": "success",
"type": "response",
"result": {
"ledger_current_index": 6643240
}
}
```
The response follows the [standard format][], with a successful result containing the following field:
| `Field` | Type | Description |
|:-----------------------|:-----------------|:---------------------------------|
| `ledger_current_index` | Unsigned Integer - [Ledger Index][] | Ledger index of the newly created 'current' ledger |
**Note:** When you close a ledger, `rippled` determines the canonical order of transactions in that ledger and replays them. This can change the outcome of transactions that were provisionally applied to the current ledger.
### Possible Errors
* Any of the [universal error types][].
* `notStandAlone` - If the `rippled` server is not currently running in stand-alone mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,96 @@
---
html: stop.html
parent: server-control-methods.html
blurb: サーバーのグレースフルシャットダウンを行います。
labels:
- コアサーバー
---
# stop
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Stop.cpp "Source")
サーバーのグレースフルシャットダウンを行います。
_`stop`要求は、権限のないユーザーは実行できない*[管理メソッド](admin-api-methods.html)です。_
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 0,
"command": "stop"
}
```
*JSON-RPC*
```json
{
"method": "stop",
"params": [
{}
]
}
```
*コマンドライン*
```
rippled stop
```
<!-- MULTICODE_BLOCK_END -->
要求にはパラメーターが含まれていません。
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
{
"result" : {
"message" : "ripple server stopping",
"status" : "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"message" : "ripple server stopping",
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:----------|:-------|:-------------------------------------|
| `message` | 文字列 | `ripple server stopping` : 正常終了の場合。 |
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,97 @@
---
html: stop.html
parent: server-control-methods.html
blurb: Shut down the rippled server.
labels:
- Core Server
---
# stop
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Stop.cpp "Source")
Gracefully shuts down the server.
*The `stop` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users!*
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 0,
"command": "stop"
}
```
*JSON-RPC*
```json
{
"method": "stop",
"params": [
{}
]
}
```
*Commandline*
```sh
#Syntax: stop
rippled stop
```
<!-- MULTICODE_BLOCK_END -->
The request includes no parameters.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
{
"result" : {
"message" : "ripple server stopping",
"status" : "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"message" : "ripple server stopping",
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:----------|:-------|:-------------------------------------|
| `message` | String | `ripple server stopping` on success. |
### Possible Errors
* Any of the [universal error types][].
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,101 @@
---
html: validation_seed.html
parent: server-control-methods.html
blurb: 無効。rippledが検証の署名に使用するシークレット値を一時的に設定します。
status: removed
labels:
- コアサーバー
---
# validation_seed
[[ソース]](https://github.com/ripple/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/ValidationSeed.cpp "Source")
`validation_seed`コマンドは、rippledが検証の署名に使用するシークレット値を一時的に設定します。サーバーを再起動すると、この値は構成ファイルに基づいてリセットされます。[rippled 0.29.1 以降では無効](https://github.com/ripple/rippled/releases/tag/0.29.1-rc1 "BADGE_RED")
*`validation_seed`要求は、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。*
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "set_seed_1",
"command": "validation_seed",
"secret": "BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE"
}
```
*コマンドライン*
```sh
#Syntax: validation_seed [secret]
rippled validation_seed 'BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE'
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:---------|:-------|:---------------------------------------------------------|
| `secret` | 文字列 | _省略可_ 指定されている場合は、この値はキーペアの検証のためのシークレット値として使用されます。有効なフォーマットには、XRP Ledgerの[base58][]フォーマット、[RFC-1751](https://tools.ietf.org/html/rfc1751)、またはパスフレーズがあります。省略されている場合は、ネットワークへの検証の提案が無効になります。 |
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
200 OK
{
"result" : {
"status" : "success",
"validation_key" : "BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE",
"validation_public_key" : "n9Jx6RS6zSgqsgnuWJifNA9EqgjTKAywqYNReK5NRd1yLBbfC3ng",
"validation_seed" : "snjJkyBGogTem5dFGbcRaThKq2Rt3"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"status" : "success",
"validation_key" : "BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE",
"validation_public_key" : "n9Jx6RS6zSgqsgnuWJifNA9EqgjTKAywqYNReK5NRd1yLBbfC3ng",
"validation_seed" : "snjJkyBGogTem5dFGbcRaThKq2Rt3"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:------------------------|:-------|:------------------------------------------|
| `validation_key` | 文字列 | (提案が無効な場合には省略可)これらの検証クレデンシャルのシークレットキー([RFC-1751](https://tools.ietf.org/html/rfc1751)フォーマット)。 |
| `validation_public_key` | 文字列 | 提案が無効な場合には省略可これらの検証クレデンシャルの公開鍵XRP Ledgerの[base58][]エンコード文字列フォーマット) |
| `validation_seed` | 文字列 | 提案が無効な場合には省略可これらの検証クレデンシャルのシークレットキーXRP Ledgerの[base58][]エンコード文字列フォーマット) |
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
* `badSeed` - 要求に無効なシークレット値が指定されていました。この場合は通常、シークレット値が異なるフォーマットの有効文字列(アカウントアドレス、検証の公開鍵など)である可能性があります。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,101 @@
---
html: validation_seed.html
parent: server-control-methods.html
blurb: (Obsolete) Temporarily set key to be used for validating.
status: removed
labels:
- Core Server
---
# validation_seed
[[Source]](https://github.com/ripple/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/ValidationSeed.cpp "Source")
The `validation_seed` command temporarily sets the secret value that rippled uses to sign validations. This value resets based on the config file when you restart the server. [Disabled since: rippled 0.29.1](https://github.com/ripple/rippled/releases/tag/0.29.1-rc1 "BADGE_RED")
*The `validation_seed` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users!*
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "set_seed_1",
"command": "validation_seed",
"secret": "BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE"
}
```
*Commandline*
```sh
#Syntax: validation_seed [secret]
rippled validation_seed 'BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE'
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:---------|:-------|:---------------------------------------------------------|
| `secret` | String | _(Optional)_ If present, use this value as the secret value for the validating key pair. Valid formats include the XRP Ledger's [base58][] format, [RFC-1751](https://tools.ietf.org/html/rfc1751), or as a passphrase. If omitted, disables proposing validations to the network. |
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
200 OK
{
"result" : {
"status" : "success",
"validation_key" : "BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE",
"validation_public_key" : "n9Jx6RS6zSgqsgnuWJifNA9EqgjTKAywqYNReK5NRd1yLBbfC3ng",
"validation_seed" : "snjJkyBGogTem5dFGbcRaThKq2Rt3"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"status" : "success",
"validation_key" : "BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE",
"validation_public_key" : "n9Jx6RS6zSgqsgnuWJifNA9EqgjTKAywqYNReK5NRd1yLBbfC3ng",
"validation_seed" : "snjJkyBGogTem5dFGbcRaThKq2Rt3"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:------------------------|:-------|:------------------------------------------|
| `validation_key` | String | (Omitted if proposing disabled) The secret key for these validation credentials, in [RFC-1751](https://tools.ietf.org/html/rfc1751) format. |
| `validation_public_key` | String | (Omitted if proposing disabled) The public key for these validation credentials, in the XRP Ledger's [base58][] encoded string format. |
| `validation_seed` | String | (Omitted if proposing disabled) The secret key for these validation credentials, in the XRP Ledger's [base58][] encoded string format. |
### Possible Errors
* Any of the [universal error types][].
* `badSeed` - The request provided an invalid secret value. This usually means that the secret value appears to be a valid string of a different format, such as an account address or validation public key.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,230 @@
---
html: sign.html # watch for clashes w/ this filename
parent: signing-methods.html
blurb: トランザクションの署名済みバイナリー表現を返します。
labels:
- トランザクション送信
---
# sign
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/SignHandler.cpp "ソース")
`sign`メソッドは[JSONフォーマットのトランザクション](transaction-formats.html)と[シード値](cryptographic-keys.html)を受け取り、トランザクションの署名済みバイナリー表現を返します。[マルチ署名済みトランザクション](multi-signing.html)に署名を付与する場合は、代わりに[sign_forメソッド][]を使用します。
{% include '_snippets/public-signing-note.md' %}
<!--_ -->
**注意:** 独自の`rippled`サーバーを運用している場合を除き、このコマンドを使用するのではなく、[クライアントライブラリ](client-libraries.html)を実行してください。詳細については[安全な署名の設定](set-up-secure-signing.html)を参照してください。
## 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "sign",
"tx_json" : {
"TransactionType" : "Payment",
"Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Destination" : "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"Amount" : {
"currency" : "USD",
"value" : "1",
"issuer" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
}
},
"secret" : "s████████████████████████████",
"offline": false,
"fee_mult_max": 1000
}
```
*JSON-RPC*
```json
{
"method": "sign",
"params": [
{
"offline": false,
"secret": "s████████████████████████████",
"tx_json": {
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Amount": {
"currency": "USD",
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"value": "1"
},
"Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"TransactionType": "Payment"
},
"fee_mult_max": 1000
}
]
}
```
*コマンドライン*
```sh
#Syntax: sign secret tx_json [offline]
rippled sign s████████████████████████████ '{"TransactionType": "Payment", "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", "Amount": { "currency": "USD", "value": "1", "issuer" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn" }, "Sequence": 360, "Fee": "10000"}' offline
```
<!-- MULTICODE_BLOCK_END -->
トランザクションに署名するには、[トランザクションを承認](transaction-basics.html#トランザクションの承認)できるシークレットキーを提供する必要があります。通常、サーバーが秘密鍵を取得するシード値を提供します。これを行うには、以下の方法があります。
* `secret`フィールドにシードを指定し、`key_type`フィールドを省略します。この値は、XRP Ledgerの[base58][]シード、RFC-1751、16進値のフォーマットで記述するか、文字列パスフレーズとして記述しますsecp256k1キーのみ
* `key_type`値と、`seed``seed_hex`、または`passphrase`のいずれか1つを提供します。`secret`フィールドは省略します。(コマンドライン構文ではサポートされません)。
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:---------------|:--------|:--------------------------------------------------|
| `tx_json` | オブジェクト | JSONフォーマットの[トランザクション定義](transaction-formats.html) |
| `secret` | 文字列 | _省略可_ トランザクションを提供するアカウントの秘密シード。トランザクションへの署名に使用されます。信頼できないサーバーに対して、またはセキュリティが確保されていないネットワーク接続を通じて機密情報を送信しないでください。`key_type``seed``seed_hex``passphrase`と同時に使用することはできません。 |
| `seed` | 文字列 | _省略可_ トランザクションを提供するアカウントの秘密シード。トランザクションへの署名に使用されます。XRP Ledgerの[base58][]フォーマットにする必要があります。指定する場合は、`key_type`も指定する必要があります。`secret``seed_hex``passphrase`と同時に使用することはできません。 |
| `seed_hex` | 文字列 | _省略可_ トランザクションを提供するアカウントの秘密シード。トランザクションへの署名に使用されます。16進フォーマットにする必要があります。指定する場合は、`key_type`も指定する必要があります。`secret``seed``passphrase`と同時に使用することはできません。 |
| `passphrase` | 文字列 | _省略可_ トランザクションを提供するアカウントの秘密シード。文字列パスフレーズとして、トランザクションへの署名に使用されます。指定する場合は、`key_type`も指定する必要があります。`secret``seed``seed_hex`と同時に使用することはできません。 |
| `key_type` | 文字列 | _省略可_ 指定された暗号化キーペアの[署名アルゴリズム](cryptographic-keys.html#署名アルゴリズム)。有効な種類は、`secp256k1`または`ed25519`です。デフォルトは`secp256k1`です。`secret`と同時に使用することはできません。 |
| `offline` | ブール値 | _省略可_ `true`の場合は、トランザクションの生成時に、トランザクションの詳細を[自動入力](#自動入力可能なフィールド)しないでください。デフォルトは`false`です。 |
| `build_path` | ブール値 | _省略可_ Payment型のトランザクションに対して指定した場合、署名前に`Paths`フィールドが自動で入力されます。**注意:** サーバーは、このフィールドの値ではなく、このフィールドが存在するかどうかを調べます。この動作は変更される可能性があります。 |
| `fee_mult_max` | 整数 | _省略可_[自動的に提供される`Fee`フィールド](transaction-common-fields.html#自動入力可能なフィールド)の上限値を設定します。現在の[トランザクションコストの負荷の乗数](transaction-cost.html#ローカル負荷コスト)が(`fee_mult_max` ÷ `fee_div_max`)よりも大きい場合、署名は`rpcHIGH_FEE`エラーで失敗します。トランザクションの`Fee`フィールド([トランザクションコスト](transaction-cost.html))を指定した場合は無視されます。デフォルトは`10`です。 |
| `fee_div_max` | 整数 | _省略可_ 現在の[トランザクションコストの負荷の乗数](transaction-cost.html#ローカル負荷コスト)が(`fee_mult_max` ÷ `fee_div_max`)よりも大きい場合、署名は`rpcHIGH_FEE`エラーで失敗します。トランザクションの`Fee`フィールド([トランザクションコスト](transaction-cost.html))を指定した場合は無視されます。デフォルトは`1`です。[新規: rippled 0.30.1][] |
### 自動入力可能なフィールド
`tx_json`[トランザクションオブジェクト](transaction-formats.html))の特定のフィールドを省略すると、サーバーは自動的に入力しようとします。要求の`offline``true`と指定しない限り、サーバーは署名前に以下のフィールドを提供します。
* `Sequence` - サーバーは、送信者のアカウント情報にある次のシーケンス番号を自動的に使用します。
* **注意:** アカウントの次のシーケンス番号は、このトランザクションが適用されるまで増分されません。トランザクションの送信および個々のトランザクションへの応答を待たずに複数のトランザクションに署名する場合は、最初のトランザクション以降の各トランザクションについて、正しいシーケンス番号を手動で提供する必要があります。
* `Fee` - `Fee`パラメーターを省略した場合、サーバーは適切なトランザクションコストを自動的に入力しようとします。本番環境のXRP Ledgerでは、適切な`fee_mult_max`値を提供しない限り、この処理は`rpcHIGH_FEE`エラーで失敗します。
* `fee_mult_max`パラメーターと`fee_div_max`パラメーターは、[リファレンストランザクションコスト](transaction-cost.html#referenceトランザクションコスト)に適用される負荷スケーリング乗数によって、自動的に提供されるトランザクションコストの上限値を設定します。デフォルト設定では、自動的に提供される値が10×の乗数より大きい場合、エラーが返されます。ただし、本番環境のXRP Ledgerでは、[1000×の負荷乗数を使用することが一般的](transaction-cost.html#現在のトランザクションコスト)です。
* コマンドライン構文では、`fee_mult_max`および`fee_div_max`はサポートされません。本番環境のXRP Ledgerの場合は、`Fee`値を提供する必要があります。
* **注意:** 悪意のあるサーバーは、`fee_mult_max``fee_div_max`の値を無視して、きわめて大きなトランザクションコストを指定するおそれがあります。
* `Paths` - Payment型のトランザクションの場合XRP間の移動を除く、Pathsフィールドは、[ripple_path_findメソッド][]を使用した場合と同様に自動的に入力できます。`build_path`を指定した場合のみ入力されます。
## 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"status": "success",
"type": "response",
"result": {
"tx_blob": "1200002280000000240000016861D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA9684000000000002710732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB7446304402200E5C2DD81FDF0BE9AB2A8D797885ED49E804DBF28E806604D878756410CA98B102203349581946B0DDA06B36B35DBC20EDA27552C1F167BCF5C6ECFF49C6A46F858081144B4E9C06F24296074F7BC48F92A97916C6DC5EA983143E9D4A2B8AA0780F682D136F7A56D6724EF53754",
"tx_json": {
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Amount": {
"currency": "USD",
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"value": "1"
},
"Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"Fee": "10000",
"Flags": 2147483648,
"Sequence": 360,
"SigningPubKey": "03AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB",
"TransactionType": "Payment",
"TxnSignature": "304402200E5C2DD81FDF0BE9AB2A8D797885ED49E804DBF28E806604D878756410CA98B102203349581946B0DDA06B36B35DBC20EDA27552C1F167BCF5C6ECFF49C6A46F8580",
"hash": "4D5D90890F8D49519E4151938601EF3D0B30B16CD6A519D9C99102C9FA77F7E0"
}
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"status": "success",
"tx_blob": "1200002280000000240000016861D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA9684000000000002710732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB7446304402200E5C2DD81FDF0BE9AB2A8D797885ED49E804DBF28E806604D878756410CA98B102203349581946B0DDA06B36B35DBC20EDA27552C1F167BCF5C6ECFF49C6A46F858081144B4E9C06F24296074F7BC48F92A97916C6DC5EA983143E9D4A2B8AA0780F682D136F7A56D6724EF53754",
"tx_json": {
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Amount": {
"currency": "USD",
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"value": "1"
},
"Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"Fee": "10000",
"Flags": 2147483648,
"Sequence": 360,
"SigningPubKey": "03AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB",
"TransactionType": "Payment",
"TxnSignature": "304402200E5C2DD81FDF0BE9AB2A8D797885ED49E804DBF28E806604D878756410CA98B102203349581946B0DDA06B36B35DBC20EDA27552C1F167BCF5C6ECFF49C6A46F8580",
"hash": "4D5D90890F8D49519E4151938601EF3D0B30B16CD6A519D9C99102C9FA77F7E0"
}
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"status" : "success",
"tx_blob" : "1200002280000000240000016861D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA9684000000000002710732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB7447304502210094D24C795CFFA8E46FE338AF63421DA5CE5E171ED56F8E4CE70FFABA15D3CFA2022063994C52BF0393C8157EBFFCDE6A7E7EDC7B16A462CA53214F64CC8FCBB5E54A81144B4E9C06F24296074F7BC48F92A97916C6DC5EA983143E9D4A2B8AA0780F682D136F7A56D6724EF53754",
"tx_json" : {
"Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Amount" : {
"currency" : "USD",
"issuer" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"value" : "1"
},
"Destination" : "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"Fee" : "10000",
"Flags" : 2147483648,
"Sequence" : 360,
"SigningPubKey" : "03AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB",
"TransactionType" : "Payment",
"TxnSignature" : "304502210094D24C795CFFA8E46FE338AF63421DA5CE5E171ED56F8E4CE70FFABA15D3CFA2022063994C52BF0393C8157EBFFCDE6A7E7EDC7B16A462CA53214F64CC8FCBB5E54A",
"hash" : "DE80DA6FF9F93FE4CE87C99441F403E0290E35867FF48382204CB89975BF343E"
}
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:----------|:-------|:--------------------------------------------------------|
| `tx_blob` | 文字列 | 正しく作成された署名済みトランザクションの16進バイナリー表現 |
| `tx_json` | オブジェクト | 自動的に入力されたフィールドを含む、署名済み[トランザクション全体](transaction-formats.html)のJSON仕様 |
**注意:** このコマンドの結果としてエラーメッセージが表示された場合は、要求で指定されたシークレット値がメッセージの中に含まれている可能性があります。これらのエラーが他者から見えない状態であることを確認してください。
* このエラーは、複数の人物が参照できるログファイルに書き込まないでください。
* デバッグを目的として、誰でも参照できる場所にこのエラーを貼り付けないでください。
* このエラーメッセージは、誤ってWebサイトに表示しないようにしてください。
## 考えられるエラー
* いずれかの[汎用エラータイプ][]。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
* `highFee` - トランザクションコストに適用される現在の負荷乗数が、自動的に提供されるトランザクションコストの上限を超えています。要求で指定する`fee_mult_max`を大きくするか1000以上`tx_json``Fee`フィールドに値を手動で指定します。
* `tooBusy` - トランザクションにパスが含まれていませんが、サーバーがビジーであるため、パス検出処理をすぐに実行できません。管理者として接続している場合は発生しません。
* `noPath` - トランザクションにパスが含まれておらず、サーバーは、このペイメントの発生経路となるパスを検出できませんでした。
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,232 @@
---
html: sign.html # watch for clashes w/ this filename
parent: signing-methods.html
blurb: Cryptographically sign a transaction.
labels:
- Transaction Sending
---
# sign
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/SignHandler.cpp "Source")
The `sign` method takes a [transaction in JSON format](transaction-formats.html) and a [seed value](cryptographic-keys.html), and returns a signed binary representation of the transaction. To contribute one signature to a [multi-signed transaction](multi-signing.html), use the [sign_for method][] instead.
{% include '_snippets/public-signing-note.md' %}
<!--_ -->
**Caution:** Unless you run the `rippled` server yourself, you should do local signing using a [client library](client-libraries.html) instead of using this command. For more information, see [Set Up Secure Signing](set-up-secure-signing.html).
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "sign",
"tx_json" : {
"TransactionType" : "Payment",
"Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Destination" : "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"Amount" : {
"currency" : "USD",
"value" : "1",
"issuer" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"
}
},
"secret" : "s████████████████████████████",
"offline": false,
"fee_mult_max": 1000
}
```
*JSON-RPC*
```json
{
"method": "sign",
"params": [
{
"offline": false,
"secret": "s████████████████████████████",
"tx_json": {
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Amount": {
"currency": "USD",
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"value": "1"
},
"Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"TransactionType": "Payment"
},
"fee_mult_max": 1000
}
]
}
```
*Commandline*
```sh
#Syntax: sign secret tx_json [offline]
rippled sign s████████████████████████████ '{"TransactionType": "Payment", "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", "Amount": { "currency": "USD", "value": "1", "issuer" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn" }, "Sequence": 360, "Fee": "10000"}' offline
```
<!-- MULTICODE_BLOCK_END -->
To sign a transaction, you must provide a secret key that can [authorize the transaction](transaction-basics.html#authorizing-transactions). Typically you provide a seed value that the server derives the secret key from. You can do this in a few ways:
* Provide the seed in the `secret` field and omit the `key_type` field. This value can be formatted as an XRP Ledger [base58][] seed, RFC-1751, hexadecimal, or as a string passphrase. (secp256k1 keys only)
* Provide a `key_type` value and exactly one of `seed`, `seed_hex`, or `passphrase`. Omit the `secret` field. (Not supported by the commandline syntax.)
The request includes the following parameters:
| `Field` | Type | Description |
|:---------------|:--------|:--------------------------------------------------|
| `tx_json` | Object | [Transaction definition](transaction-formats.html) in JSON format |
| `secret` | String | _(Optional)_ The secret seed of the account supplying the transaction, used to sign it. Do not send your secret to untrusted servers or through unsecured network connections. Cannot be used with `key_type`, `seed`, `seed_hex`, or `passphrase`. |
| `seed` | String | _(Optional)_ The secret seed of the account supplying the transaction, used to sign it. 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`. |
| `seed_hex` | String | _(Optional)_ The secret seed of the account supplying the transaction, used to sign it. Must be in hexadecimal format. If provided, you must also specify the `key_type`. Cannot be used with `secret`, `seed`, or `passphrase`. |
| `passphrase` | String | _(Optional)_ The secret seed of the account supplying the transaction, used to sign it, as a string passphrase. If provided, you must also specify the `key_type`. Cannot be used with `secret`, `seed`, or `seed_hex`. |
| `key_type` | String | _(Optional)_ The [signing algorithm](cryptographic-keys.html#signing-algorithms) of the cryptographic key pair provided. Valid types are `secp256k1` or `ed25519`. Defaults to `secp256k1`. Cannot be used with `secret`. |
| `offline` | Boolean | _(Optional)_ If `true`, when constructing the transaction, do not try to [automatically fill](#auto-fillable-fields) any transaction details. The default is `false`. |
| `build_path` | Boolean | _(Optional)_ If this field is provided, the server [auto-fills](transaction-common-fields.html#auto-fillable-fields) the `Paths` field of a [Payment transaction][] before signing. You must omit this field if the transaction is a [direct XRP payment](direct-xrp-payments.html) or if it is not a Payment-type transaction. **Caution:** The server looks for the presence or absence of this field, not its value. This behavior may change. ([Issue #3272](https://github.com/ripple/rippled/issues/3272)) |
| `fee_mult_max` | Integer | _(Optional)_ Signing fails with the error `rpcHIGH_FEE` if the [auto-filled `Fee` value](transaction-common-fields.html#auto-fillable-fields) would be greater than the [reference transaction cost](transaction-cost.html#special-transaction-costs) × `fee_mult_max` ÷ `fee_div_max`. This field has no effect if you explicitly specify the `Fee` field of the transaction. The default is `10`. |
| `fee_div_max` | Integer | _(Optional)_ Signing fails with the error `rpcHIGH_FEE` if the [auto-filled `Fee` value](transaction-common-fields.html#auto-fillable-fields) would be greater than the [reference transaction cost](transaction-cost.html#special-transaction-costs) × `fee_mult_max` ÷ `fee_div_max`. This field has no effect if you explicitly specify the `Fee` field of the transaction. The default is `1`. [New in: rippled 0.30.1][] |
### Auto-Fillable Fields
The server automatically tries to fill in certain fields in `tx_json` (the [Transaction object](transaction-formats.html)) automatically if you omit them. The server provides the following fields before signing, unless the request specified `offline` as `true`:
* `Sequence` - The server automatically uses the next Sequence number from the sender's account information.
* **Caution:** The next sequence number for the account is not incremented until this transaction is applied. If you sign multiple transactions without submitting and waiting for the response to each one, you must manually provide the correct sequence numbers for each transaction after the first.
* `Fee` - If you omit the `Fee` parameter, the server tries to fill in an appropriate transaction cost automatically. On the production XRP Ledger, this fails with `rpcHIGH_FEE` unless you provide an appropriate `fee_mult_max` value.
* The `fee_mult_max` and `fee_div_max` parameters limit how high the automatically-provided transaction cost can be, in terms of the load-scaling multiplier that gets applied to the [reference transaction cost](transaction-cost.html#reference-transaction-cost). The default settings return an error if the automatically-provided value would use greater than a 10× multiplier. However, the production XRP Ledger [typically has a 1000× load multiplier](transaction-cost.html#current-transaction-cost).
* The commandline syntax does not support `fee_mult_max` and `fee_div_max`. For the production XRP Ledger, you must provide a `Fee` value.
* **Caution:** A malicious server can specify an excessively high transaction cost, ignoring the values of `fee_mult_max` and `fee_div_max`.
* `Paths` - For Payment-type transactions (excluding XRP-to-XRP transfers), the Paths field can be automatically filled, as if you used the [ripple_path_find method][]. Only filled if `build_path` is provided.
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"status": "success",
"type": "response",
"result": {
"tx_blob": "1200002280000000240000016861D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA9684000000000002710732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB7446304402200E5C2DD81FDF0BE9AB2A8D797885ED49E804DBF28E806604D878756410CA98B102203349581946B0DDA06B36B35DBC20EDA27552C1F167BCF5C6ECFF49C6A46F858081144B4E9C06F24296074F7BC48F92A97916C6DC5EA983143E9D4A2B8AA0780F682D136F7A56D6724EF53754",
"tx_json": {
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Amount": {
"currency": "USD",
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"value": "1"
},
"Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"Fee": "10000",
"Flags": 2147483648,
"Sequence": 360,
"SigningPubKey": "03AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB",
"TransactionType": "Payment",
"TxnSignature": "304402200E5C2DD81FDF0BE9AB2A8D797885ED49E804DBF28E806604D878756410CA98B102203349581946B0DDA06B36B35DBC20EDA27552C1F167BCF5C6ECFF49C6A46F8580",
"hash": "4D5D90890F8D49519E4151938601EF3D0B30B16CD6A519D9C99102C9FA77F7E0"
}
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"status": "success",
"tx_blob": "1200002280000000240000016861D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA9684000000000002710732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB7446304402200E5C2DD81FDF0BE9AB2A8D797885ED49E804DBF28E806604D878756410CA98B102203349581946B0DDA06B36B35DBC20EDA27552C1F167BCF5C6ECFF49C6A46F858081144B4E9C06F24296074F7BC48F92A97916C6DC5EA983143E9D4A2B8AA0780F682D136F7A56D6724EF53754",
"tx_json": {
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Amount": {
"currency": "USD",
"issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"value": "1"
},
"Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"Fee": "10000",
"Flags": 2147483648,
"Sequence": 360,
"SigningPubKey": "03AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB",
"TransactionType": "Payment",
"TxnSignature": "304402200E5C2DD81FDF0BE9AB2A8D797885ED49E804DBF28E806604D878756410CA98B102203349581946B0DDA06B36B35DBC20EDA27552C1F167BCF5C6ECFF49C6A46F8580",
"hash": "4D5D90890F8D49519E4151938601EF3D0B30B16CD6A519D9C99102C9FA77F7E0"
}
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"status" : "success",
"tx_blob" : "1200002280000000240000016861D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA9684000000000002710732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB7447304502210094D24C795CFFA8E46FE338AF63421DA5CE5E171ED56F8E4CE70FFABA15D3CFA2022063994C52BF0393C8157EBFFCDE6A7E7EDC7B16A462CA53214F64CC8FCBB5E54A81144B4E9C06F24296074F7BC48F92A97916C6DC5EA983143E9D4A2B8AA0780F682D136F7A56D6724EF53754",
"tx_json" : {
"Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Amount" : {
"currency" : "USD",
"issuer" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"value" : "1"
},
"Destination" : "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"Fee" : "10000",
"Flags" : 2147483648,
"Sequence" : 360,
"SigningPubKey" : "03AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB",
"TransactionType" : "Payment",
"TxnSignature" : "304502210094D24C795CFFA8E46FE338AF63421DA5CE5E171ED56F8E4CE70FFABA15D3CFA2022063994C52BF0393C8157EBFFCDE6A7E7EDC7B16A462CA53214F64CC8FCBB5E54A",
"hash" : "DE80DA6FF9F93FE4CE87C99441F403E0290E35867FF48382204CB89975BF343E"
}
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:----------|:-------|:--------------------------------------------------------|
| `tx_blob` | String | Binary representation of the fully-qualified, signed transaction, as hex |
| `tx_json` | Object | JSON specification of the [complete transaction](transaction-formats.html) as signed, including any fields that were automatically filled in |
**Caution:** If this command results in an error messages, the message can contain a secret value provided in the request. Make sure that these errors are not visible to others.
* Do not write this error to a log file that can be seen by multiple people.
* Do not paste this error to a public place for debugging.
* Do not display the error message on a website, even by accident.
## Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `highFee` - The current load-based multiplier to the transaction cost exceeds the limit for an automatically-provided transaction cost. Either specify a higher `fee_mult_max` (at least 1000) in the request or manually provide a value in the `Fee` field of the `tx_json`.
* `tooBusy` - The transaction did not include paths, but the server is too busy to do pathfinding right now. Does not occur if you are connected as an admin.
* `noPath` - The transaction did not include paths, and the server was unable to find a path by which this payment can occur.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,246 @@
---
html: sign_for.html
parent: signing-methods.html
blurb: マルチ署名済みトランザクションの署名を1つ提供します。
labels:
- トランザクション送信
---
# sign_for
[[ソース]](https://github.com/ripple/rippled/blob/release/src/ripple/rpc/handlers/SignFor.cpp "Source")
`sign_for`コマンドは、[マルチ署名済みトランザクション](multi-signing.html)の署名を1つ提供します。
{% include '_snippets/public-signing-note.md' %}
<!--_ -->
このコマンドを使用するには、[MultiSign Amendment][]が有効になっている必要があります。[新規: rippled 0.31.0][]
## 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id":"sign_for_example",
"command":"sign_for",
"account":"rLFd1FzHMScFhLsXeaxStzv3UC97QHGAbM",
"seed":"s████████████████████████████",
"key_type":"ed25519",
"tx_json":{
"TransactionType":"TrustSet",
"Account":"rEuLyBCvcw4CFmzv8RepSiAoNgF8tTGJQC",
"Flags":262144,
"LimitAmount":{
"currency":"USD",
"issuer":"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"value":"100"
},
"Sequence":2,
"SigningPubKey":"",
"Fee":"30000"
}
}
```
*JSON-RPC*
```json
{
"method":"sign_for",
"params":[{
"account":"rLFd1FzHMScFhLsXeaxStzv3UC97QHGAbM",
"seed":"s████████████████████████████",
"key_type":"ed25519",
"tx_json":{
"TransactionType":"TrustSet",
"Account":"rEuLyBCvcw4CFmzv8RepSiAoNgF8tTGJQC",
"Flags":262144,
"LimitAmount":{
"currency":"USD",
"issuer":"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"value":"100"
},
"Sequence":2,
"SigningPubKey":"",
"Fee":"30000"
}
}]
}
```
*コマンドライン*
```sh
#Syntax: rippled sign_for <signer_address> <signer_secret> [offline]
rippled sign_for rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW s████████████████████████████ '{
"TransactionType":"TrustSet",
"Account":"rEuLyBCvcw4CFmzv8RepSiAoNgF8tTGJQC",
"Flags":262144,
"LimitAmount":{
"currency":"USD",
"issuer":"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"value":"100"
},
"Sequence":2,
"SigningPubKey":"",
"Fee":"30000"
}'
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:-------------|:---------------------|:---------------------------------------|
| `account` | 文字列 - [アドレス][] | 署名を提供するアドレス。 |
| `tx_json` | オブジェクト | 署名する[トランザクション](transaction-formats.html)。[signメソッド][]を使用する場合とは異なり、トランザクションのすべてのフィールド(`Fee``Sequence`を含む)を指定する必要があります。トランザクションに、空の文字列を値として指定した`SigningPubKey`フィールドを含める必要があります。このオブジェクトには、以前に収集した署名を持つ`Signers`配列を必要に応じて含めることができます。 |
| `secret` | 文字列 | _省略可_ トランザクションを提供するアカウントのシークレットキー。トランザクションへの署名に使用されます。信頼できないサーバーに対して、またはセキュリティが確保されていないネットワーク接続を通じて機密情報を送信しないでください。`key_type``seed``seed_hex``passphrase`と同時に使用することはできません。 |
| `seed` | 文字列 | _省略可_ トランザクションを提供するアカウントのシークレットキー。トランザクションへの署名に使用されます。XRP Ledgerの[base58][]フォーマットにする必要があります。指定する場合は、`key_type`も指定する必要があります。`secret``seed_hex``passphrase`と同時に使用することはできません。 |
| `seed_hex` | 文字列 | _省略可_ トランザクションを提供するアカウントのシークレットキー。トランザクションへの署名に使用されます。16進フォーマットにする必要があります。指定する場合は、`key_type`も指定する必要があります。`secret``seed``passphrase`と同時に使用することはできません。 |
| `passphrase` | 文字列 | _省略可_ トランザクションを提供するアカウントのシークレットキー。文字列パスフレーズとして、トランザクションへの署名に使用されます。指定する場合は、`key_type`も指定する必要があります。`secret``seed``seed_hex`と同時に使用することはできません。 |
| `key_type` | 文字列 | _省略可_ この要求で提供する暗号鍵の種類。有効な種類は、`secp256k1`または`ed25519`です。デフォルトでは`secp256k1`です。`secret`と同時に使用することはできません。**注意:** Ed25519のサポートは実験的な機能です。 |
シークレットキーを指定した**1つのフィールドのみ**を指定する必要があります。次のいずれかになります。
* `secret`値を指定し、`key_type`フィールドを省略します。この値は、XRP Ledgerの[base58][]シード、RFC-1751、16進値のフォーマットで記述するか、文字列パスフレーズとして記述しますsecp256k1キーのみ
* `key_type`値と、`seed``seed_hex`、または`passphrase`のいずれか1つを提供します。`secret`フィールドは省略します。(コマンドライン構文ではサポートされません。)
## 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id":"sign_for_example",
"status":"success",
"type":"response",
"result":{
"tx_blob":"1200142200040000240000000263D5038D7EA4C680000000000000000000000000005553440000000000B5F762798A53D543A014CAF8B297CFF8F2F937E868400000000000753073008114A3780F5CB5A44D366520FC44055E8ED44D9A2270F3E0107321EDDF4ECB8F34A168143B928D48EFE625501FB8552403BBBD3FC038A5788951D7707440C3DCA3FEDE6D785398EEAB10A46B44047FF1B0863FC4313051FB292C991D1E3A9878FABB301128FE4F86F3D8BE4706D53FA97F5536DBD31AF14CD83A5ACDEB068114D96CB910955AB40A0E987EEE82BB3CEDD4441AAAE1F1",
"tx_json":{
"Account":"rEuLyBCvcw4CFmzv8RepSiAoNgF8tTGJQC",
"Fee":"30000",
"Flags":262144,
"LimitAmount":{
"currency":"USD",
"issuer":"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"value":"100"
},
"Sequence":2,
"Signers":[
{
"Signer":{
"Account":"rLFd1FzHMScFhLsXeaxStzv3UC97QHGAbM",
"SigningPubKey":"EDDF4ECB8F34A168143B928D48EFE625501FB8552403BBBD3FC038A5788951D770",
"TxnSignature":"C3DCA3FEDE6D785398EEAB10A46B44047FF1B0863FC4313051FB292C991D1E3A9878FABB301128FE4F86F3D8BE4706D53FA97F5536DBD31AF14CD83A5ACDEB06"
}
}
],
"SigningPubKey":"",
"TransactionType":"TrustSet",
"hash":"5216A13A3E3CF662352F0B430C7D82B7450415B6883DD428B5EC1DF1DE45DD8C"
}
}
}
```
*JSON-RPC*
```
200 OK
{
"result" :{
"status" :"success",
"tx_blob" :"1200142200040000240000000263D5038D7EA4C680000000000000000000000000005553440000000000B5F762798A53D543A014CAF8B297CFF8F2F937E868400000000000753073008114A3780F5CB5A44D366520FC44055E8ED44D9A2270F3E010732102B3EC4E5DD96029A647CFA20DA07FE1F85296505552CCAC114087E66B46BD77DF744730450221009C195DBBF7967E223D8626CA19CF02073667F2B22E206727BFE848FF42BEAC8A022048C323B0BED19A988BDBEFA974B6DE8AA9DCAE250AA82BBD1221787032A864E58114204288D2E47F8EF6C99BCC457966320D12409711E1F1",
"tx_json" :{
"Account" :"rEuLyBCvcw4CFmzv8RepSiAoNgF8tTGJQC",
"Fee" :"30000",
"Flags" :262144,
"LimitAmount" :{
"currency" :"USD",
"issuer" :"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"value" :"100"
},
"Sequence" :2,
"Signers" :[
{
"Signer" :{
"Account" :"rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW",
"SigningPubKey" :"02B3EC4E5DD96029A647CFA20DA07FE1F85296505552CCAC114087E66B46BD77DF",
"TxnSignature" :"30450221009C195DBBF7967E223D8626CA19CF02073667F2B22E206727BFE848FF42BEAC8A022048C323B0BED19A988BDBEFA974B6DE8AA9DCAE250AA82BBD1221787032A864E5"
}
}
],
"SigningPubKey" :"",
"TransactionType" :"TrustSet",
"hash" :"A94A6417D1A7AAB059822B894E13D322ED3712F7212CE9257801F96DE6C3F6AE"
}
}
}
```
*コマンドライン*
```json
Loading:"/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" :{
"status" :"success",
"tx_blob" :"1200142200040000240000000263D5038D7EA4C680000000000000000000000000005553440000000000B5F762798A53D543A014CAF8B297CFF8F2F937E868400000000000753073008114A3780F5CB5A44D366520FC44055E8ED44D9A2270F3E010732102B3EC4E5DD96029A647CFA20DA07FE1F85296505552CCAC114087E66B46BD77DF744730450221009C195DBBF7967E223D8626CA19CF02073667F2B22E206727BFE848FF42BEAC8A022048C323B0BED19A988BDBEFA974B6DE8AA9DCAE250AA82BBD1221787032A864E58114204288D2E47F8EF6C99BCC457966320D12409711E1F1",
"tx_json" :{
"Account" :"rEuLyBCvcw4CFmzv8RepSiAoNgF8tTGJQC",
"Fee" :"30000",
"Flags" :262144,
"LimitAmount" :{
"currency" :"USD",
"issuer" :"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"value" :"100"
},
"Sequence" :2,
"Signers" :[
{
"Signer" :{
"Account" :"rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW",
"SigningPubKey" :"02B3EC4E5DD96029A647CFA20DA07FE1F85296505552CCAC114087E66B46BD77DF",
"TxnSignature" :"30450221009C195DBBF7967E223D8626CA19CF02073667F2B22E206727BFE848FF42BEAC8A022048C323B0BED19A988BDBEFA974B6DE8AA9DCAE250AA82BBD1221787032A864E5"
}
}
],
"SigningPubKey" :"",
"TransactionType" :"TrustSet",
"hash" :"A94A6417D1A7AAB059822B894E13D322ED3712F7212CE9257801F96DE6C3F6AE"
}
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:----------|:-------|:--------------------------------------------------------|
| `tx_blob` | 文字列 | 新規に追加した署名を含む署名済みトランザクションの16進数表記。トランザクションに十分な数の署名がある場合には、[`submit`メソッドを使用してこの文字列を送信](submit.html#送信専用モード)できます。 |
| `tx_json` | オブジェクト | 新規に追加された署名を含む`Signers`配列を持つ[トランザクションの指定](transaction-formats.html)JSONフォーマット 。トランザクションに十分な数の署名がある場合には、[submit_multisignedメソッド][]を使用してこのオブジェクトを送信できます。 |
## 考えられるエラー
* [汎用エラータイプ][]のすべて。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
* `srcActNotFound` - トランザクションの`Account`が、レジャーの資金供給のあるアドレスではない場合。
* `srcActMalformed` - 要求の署名アドレス(`account`フィールド)の形式が無効である場合。
* `badSeed` - 指定されたシード値のフォーマットが正しくありません。
* `badSecret` - 指定されたシークレット値のフォーマットが正しくありません。
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,247 @@
---
html: sign_for.html
parent: signing-methods.html
blurb: Contribute to a multi-signature.
labels:
- Transaction Sending
---
# sign_for
[[Source]](https://github.com/ripple/rippled/blob/release/src/ripple/rpc/handlers/SignFor.cpp "Source")
The `sign_for` command provides one signature for a [multi-signed transaction](multi-signing.html).
{% include '_snippets/public-signing-note.md' %}
<!--_ -->
This command requires the [MultiSign amendment][] to be enabled. [New in: rippled 0.31.0][]
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "sign_for_example",
"command": "sign_for",
"account": "rLFd1FzHMScFhLsXeaxStzv3UC97QHGAbM",
"seed": "s████████████████████████████",
"key_type": "ed25519",
"tx_json": {
"TransactionType": "TrustSet",
"Account": "rEuLyBCvcw4CFmzv8RepSiAoNgF8tTGJQC",
"Flags": 262144,
"LimitAmount": {
"currency": "USD",
"issuer": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"value": "100"
},
"Sequence": 2,
"SigningPubKey": "",
"Fee": "30000"
}
}
```
*JSON-RPC*
```json
{
"method": "sign_for",
"params": [{
"account": "rLFd1FzHMScFhLsXeaxStzv3UC97QHGAbM",
"seed": "s████████████████████████████",
"key_type": "ed25519",
"tx_json": {
"TransactionType": "TrustSet",
"Account": "rEuLyBCvcw4CFmzv8RepSiAoNgF8tTGJQC",
"Flags": 262144,
"LimitAmount": {
"currency": "USD",
"issuer": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"value": "100"
},
"Sequence": 2,
"SigningPubKey": "",
"Fee": "30000"
}
}]
}
```
*Commandline*
```sh
#Syntax: rippled sign_for <signer_address> <signer_secret> [offline]
rippled sign_for rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW s████████████████████████████ '{
"TransactionType": "TrustSet",
"Account": "rEuLyBCvcw4CFmzv8RepSiAoNgF8tTGJQC",
"Flags": 262144,
"LimitAmount": {
"currency": "USD",
"issuer": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"value": "100"
},
"Sequence": 2,
"SigningPubKey": "",
"Fee": "30000"
}'
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:-------------|:---------------------|:---------------------------------------|
| `account` | String - [Address][] | The address which is providing the signature. |
| `tx_json` | Object | The [Transaction](transaction-formats.html) to sign. Unlike using the [sign method][], all fields of the transaction must be provided, including `Fee` and `Sequence`. The transaction must include the field `SigningPubKey` with an empty string as the value. The object may optionally contain a `Signers` array with previously-collected signatures. |
| `secret` | String | _(Optional)_ Secret key of the account supplying the transaction, used to sign it. Do not send your secret to untrusted servers or through unsecured network connections. Cannot be used with `key_type`, `seed`, `seed_hex`, or `passphrase`. |
| `seed` | String | _(Optional)_ Secret key of the account supplying the transaction, used to sign it. 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`. |
| `seed_hex` | String | _(Optional)_ Secret key of the account supplying the transaction, used to sign it. Must be in hexadecimal format. If provided, you must also specify the `key_type`. Cannot be used with `secret`, `seed`, or `passphrase`. |
| `passphrase` | String | _(Optional)_ Secret key of the account supplying the transaction, used to sign it, as a string passphrase. If provided, you must also specify the `key_type`. Cannot be used with `secret`, `seed`, or `seed_hex`. |
| `key_type` | String | _(Optional)_ Type of cryptographic key provided in this request. Valid types are `secp256k1` or `ed25519`. Defaults to `secp256k1`. Cannot be used with `secret`. **Caution:** Ed25519 support is experimental. |
You must provide **exactly 1 field** with the secret key, which can be either of the following:
* Provide a `secret` value and omit the `key_type` field. This value can be formatted as an XRP Ledger [base58][] seed, RFC-1751, hexadecimal, or as a string passphrase. (secp256k1 keys only)
* Provide a `key_type` value and exactly one of `seed`, `seed_hex`, or `passphrase`. Omit the `secret` field. (Not supported by the commandline syntax.)
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "sign_for_example",
"status": "success",
"type": "response",
"result": {
"tx_blob": "1200142200040000240000000263D5038D7EA4C680000000000000000000000000005553440000000000B5F762798A53D543A014CAF8B297CFF8F2F937E868400000000000753073008114A3780F5CB5A44D366520FC44055E8ED44D9A2270F3E0107321EDDF4ECB8F34A168143B928D48EFE625501FB8552403BBBD3FC038A5788951D7707440C3DCA3FEDE6D785398EEAB10A46B44047FF1B0863FC4313051FB292C991D1E3A9878FABB301128FE4F86F3D8BE4706D53FA97F5536DBD31AF14CD83A5ACDEB068114D96CB910955AB40A0E987EEE82BB3CEDD4441AAAE1F1",
"tx_json": {
"Account": "rEuLyBCvcw4CFmzv8RepSiAoNgF8tTGJQC",
"Fee": "30000",
"Flags": 262144,
"LimitAmount": {
"currency": "USD",
"issuer": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"value": "100"
},
"Sequence": 2,
"Signers": [
{
"Signer": {
"Account": "rLFd1FzHMScFhLsXeaxStzv3UC97QHGAbM",
"SigningPubKey": "EDDF4ECB8F34A168143B928D48EFE625501FB8552403BBBD3FC038A5788951D770",
"TxnSignature": "C3DCA3FEDE6D785398EEAB10A46B44047FF1B0863FC4313051FB292C991D1E3A9878FABB301128FE4F86F3D8BE4706D53FA97F5536DBD31AF14CD83A5ACDEB06"
}
}
],
"SigningPubKey": "",
"TransactionType": "TrustSet",
"hash": "5216A13A3E3CF662352F0B430C7D82B7450415B6883DD428B5EC1DF1DE45DD8C"
}
}
}
```
*JSON-RPC*
```json
200 OK
{
"result" : {
"status" : "success",
"tx_blob" : "1200142200040000240000000263D5038D7EA4C680000000000000000000000000005553440000000000B5F762798A53D543A014CAF8B297CFF8F2F937E868400000000000753073008114A3780F5CB5A44D366520FC44055E8ED44D9A2270F3E010732102B3EC4E5DD96029A647CFA20DA07FE1F85296505552CCAC114087E66B46BD77DF744730450221009C195DBBF7967E223D8626CA19CF02073667F2B22E206727BFE848FF42BEAC8A022048C323B0BED19A988BDBEFA974B6DE8AA9DCAE250AA82BBD1221787032A864E58114204288D2E47F8EF6C99BCC457966320D12409711E1F1",
"tx_json" : {
"Account" : "rEuLyBCvcw4CFmzv8RepSiAoNgF8tTGJQC",
"Fee" : "30000",
"Flags" : 262144,
"LimitAmount" : {
"currency" : "USD",
"issuer" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"value" : "100"
},
"Sequence" : 2,
"Signers" : [
{
"Signer" : {
"Account" : "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW",
"SigningPubKey" : "02B3EC4E5DD96029A647CFA20DA07FE1F85296505552CCAC114087E66B46BD77DF",
"TxnSignature" : "30450221009C195DBBF7967E223D8626CA19CF02073667F2B22E206727BFE848FF42BEAC8A022048C323B0BED19A988BDBEFA974B6DE8AA9DCAE250AA82BBD1221787032A864E5"
}
}
],
"SigningPubKey" : "",
"TransactionType" : "TrustSet",
"hash" : "A94A6417D1A7AAB059822B894E13D322ED3712F7212CE9257801F96DE6C3F6AE"
}
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"status" : "success",
"tx_blob" : "1200142200040000240000000263D5038D7EA4C680000000000000000000000000005553440000000000B5F762798A53D543A014CAF8B297CFF8F2F937E868400000000000753073008114A3780F5CB5A44D366520FC44055E8ED44D9A2270F3E010732102B3EC4E5DD96029A647CFA20DA07FE1F85296505552CCAC114087E66B46BD77DF744730450221009C195DBBF7967E223D8626CA19CF02073667F2B22E206727BFE848FF42BEAC8A022048C323B0BED19A988BDBEFA974B6DE8AA9DCAE250AA82BBD1221787032A864E58114204288D2E47F8EF6C99BCC457966320D12409711E1F1",
"tx_json" : {
"Account" : "rEuLyBCvcw4CFmzv8RepSiAoNgF8tTGJQC",
"Fee" : "30000",
"Flags" : 262144,
"LimitAmount" : {
"currency" : "USD",
"issuer" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"value" : "100"
},
"Sequence" : 2,
"Signers" : [
{
"Signer" : {
"Account" : "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW",
"SigningPubKey" : "02B3EC4E5DD96029A647CFA20DA07FE1F85296505552CCAC114087E66B46BD77DF",
"TxnSignature" : "30450221009C195DBBF7967E223D8626CA19CF02073667F2B22E206727BFE848FF42BEAC8A022048C323B0BED19A988BDBEFA974B6DE8AA9DCAE250AA82BBD1221787032A864E5"
}
}
],
"SigningPubKey" : "",
"TransactionType" : "TrustSet",
"hash" : "A94A6417D1A7AAB059822B894E13D322ED3712F7212CE9257801F96DE6C3F6AE"
}
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:----------|:-------|:--------------------------------------------------------|
| `tx_blob` | String | Hexadecimal representation of the signed transaction, including the newly-added signature. If it has enough signatures, you can [submit this string using the `submit` method](submit.html#submit-only-mode). |
| `tx_json` | Object | The [transaction specification](transaction-formats.html) in JSON format, with the newly-added signature in the `Signers` array. If it has enough signatures, you can submit this object using the [submit_multisigned method][]. |
## Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `srcActNotFound` - If the `Account` from the transaction is not a funded address in the ledger.
* `srcActMalformed` - If the signing address (`account` field) from the request is not validly formed.
* `badSeed` - The seed value supplied was invalidly-formatted.
* `badSecret` - The secret value supplied was invalidly-formatted.
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,242 @@
---
html: consensus_info.html
parent: status-and-debugging-methods.html
blurb: デバッグのためのコンセンサスプロセスに関する情報を返します。
labels:
- ブロックチェーン
- コアサーバー
---
# consensus_info
[[ソース]](https://github.com/ripple/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/ConsensusInfo.cpp "Source")
`consensus_info`メソッドは、デバッグのための[コンセンサスプロセス](consensus.html)に関する情報を返します。
_`consensus_info`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 99,
"command": "consensus_info"
}
```
*JSON-RPC*
```json
{
"method": "consensus_info",
"params": [
{}
]
}
```
*コマンドライン*
```sh
#Syntax: consensus_info
rippled consensus_info
```
<!-- MULTICODE_BLOCK_END -->
この要求にはパラメーターはありません。
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
{
"result" : {
"info" : {
"acquired" : {
"4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306" : "acquired"
},
"close_granularity" : 10,
"close_percent" : 50,
"close_resolution" : 10,
"close_times" : {
"486082972" : 1,
"486082973" : 4
},
"current_ms" : 1003,
"have_time_consensus" : false,
"ledger_seq" : 13701086,
"our_position" : {
"close_time" : 486082973,
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"peer_positions" : {
"0A2EAF919033A036D363D4E5610A66209DDBE8EE" : {
"close_time" : 486082972,
"peer_id" : "n9KiYM9CgngLvtRCQHZwgC2gjpdaZcCcbt3VboxiNFcKuwFVujzS",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"1567A8C953A86F8428C7B01641D79BBF2FD508F3" : {
"close_time" : 486082973,
"peer_id" : "n9LdgEtkmGB9E2h3K4Vp7iGUaKuq23Zr32ehxiU8FWY7xoxbWTSA",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"202397A81F20B44CF44EA99AF761295E5A8397D2" : {
"close_time" : 486082973,
"peer_id" : "n9MD5h24qrQqiyBC8aeqqCWvpiBiYQ3jxSr91uiDvmrkyHRdYLUj",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"5C29005CF4FB479FC49EEFB4A5B075C86DD963CC" : {
"close_time" : 486082973,
"peer_id" : "n9L81uNCaPgtUJfaHh89gmdvXKAmSt5Gdsw2g1iPWaPkAHW5Nm4C",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"EFC49EB648E557CC50A72D715249B80E071F7705" : {
"close_time" : 486082973,
"peer_id" : "n949f75evCHwgyP4fPVgaHqNHxUVN15PsJEZ3B3HnXPcPjcZAoy7",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
}
},
"previous_mseconds" : 2005,
"previous_proposers" : 5,
"proposers" : 5,
"proposing" : false,
"state" : "consensus",
"synched" : true,
"validating" : false
},
"status" : "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"info" : {
"acquired" : {
"4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306" : "acquired"
},
"close_granularity" : 10,
"close_percent" : 50,
"close_resolution" : 10,
"close_times" : {
"486082972" : 1,
"486082973" : 4
},
"current_ms" : 1003,
"have_time_consensus" : false,
"ledger_seq" : 13701086,
"our_position" : {
"close_time" : 486082973,
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"peer_positions" : {
"0A2EAF919033A036D363D4E5610A66209DDBE8EE" : {
"close_time" : 486082972,
"peer_id" : "n9KiYM9CgngLvtRCQHZwgC2gjpdaZcCcbt3VboxiNFcKuwFVujzS",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"1567A8C953A86F8428C7B01641D79BBF2FD508F3" : {
"close_time" : 486082973,
"peer_id" : "n9LdgEtkmGB9E2h3K4Vp7iGUaKuq23Zr32ehxiU8FWY7xoxbWTSA",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"202397A81F20B44CF44EA99AF761295E5A8397D2" : {
"close_time" : 486082973,
"peer_id" : "n9MD5h24qrQqiyBC8aeqqCWvpiBiYQ3jxSr91uiDvmrkyHRdYLUj",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"5C29005CF4FB479FC49EEFB4A5B075C86DD963CC" : {
"close_time" : 486082973,
"peer_id" : "n9L81uNCaPgtUJfaHh89gmdvXKAmSt5Gdsw2g1iPWaPkAHW5Nm4C",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"EFC49EB648E557CC50A72D715249B80E071F7705" : {
"close_time" : 486082973,
"peer_id" : "n949f75evCHwgyP4fPVgaHqNHxUVN15PsJEZ3B3HnXPcPjcZAoy7",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
}
},
"previous_mseconds" : 2005,
"previous_proposers" : 5,
"proposers" : 5,
"proposing" : false,
"state" : "consensus",
"synched" : true,
"validating" : false
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:--------|:-------|:----------------------------------------------------------|
| `info` | オブジェクト | コンセンサスのデバッグで役立つ可能性のある情報。この出力は、予告なく変更される可能性があります。 |
`info`オブジェクトに含まれる可能性のあるフィールドについて以下に簡単に説明します。
| `Field` | 型 | 説明 |
|:-----------------|:--------|:------------------------------------------------|
| `ledger_seq` | 数値 | 現在コンセンサスプロセスにあるレジャーのシーケンス番号。 |
| `our_position` | オブジェクト | コンセンサスプロセスにあるレジャーについてサーバーが予期する内容。 |
| `peer_positions` | オブジェクト | コンセンサスプロセスにあるピアと各ピアが提案するレジャーバージョンのマップ。 |
| `proposers` | 数値 | このコンセンサスプロセスに参加している信頼できるバリデータの数。信頼できるバリデータは、このサーバー構成に応じて異なります。 |
| `synched` | ブール値 | このサーバー自体が、自分がネットワークと同期中であるとみなしているかどうか。 |
| `state` | 文字列 | 現在進行中のコンセンサスプロセスの部分: `open``consensus``finished`、または`accepted`。 |
`info`の唯一のフィールドが`"consensus": "none"`である最小限の結果となることもありますが、これは正常です。これは、サーバーがコンセンサスラウンドの合間にあることを示します。
`consensus_info`コマンドを短い間隔で連続して数回実行すると、このコマンドの結果が大きく変化することがあります。
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,243 @@
---
html: consensus_info.html
parent: status-and-debugging-methods.html
blurb: Get information about the state of consensus as it happens.
labels:
- Blockchain
- Core Server
---
# consensus_info
[[Source]](https://github.com/ripple/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/ConsensusInfo.cpp "Source")
The `consensus_info` command provides information about the [consensus process](consensus.html) for debugging purposes.
_The `consensus_info` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 99,
"command": "consensus_info"
}
```
*JSON-RPC*
```json
{
"method": "consensus_info",
"params": [
{}
]
}
```
*Commandline*
```sh
#Syntax: consensus_info
rippled consensus_info
```
<!-- MULTICODE_BLOCK_END -->
The request has no parameters.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
{
"result" : {
"info" : {
"acquired" : {
"4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306" : "acquired"
},
"close_granularity" : 10,
"close_percent" : 50,
"close_resolution" : 10,
"close_times" : {
"486082972" : 1,
"486082973" : 4
},
"current_ms" : 1003,
"have_time_consensus" : false,
"ledger_seq" : 13701086,
"our_position" : {
"close_time" : 486082973,
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"peer_positions" : {
"0A2EAF919033A036D363D4E5610A66209DDBE8EE" : {
"close_time" : 486082972,
"peer_id" : "n9KiYM9CgngLvtRCQHZwgC2gjpdaZcCcbt3VboxiNFcKuwFVujzS",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"1567A8C953A86F8428C7B01641D79BBF2FD508F3" : {
"close_time" : 486082973,
"peer_id" : "n9LdgEtkmGB9E2h3K4Vp7iGUaKuq23Zr32ehxiU8FWY7xoxbWTSA",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"202397A81F20B44CF44EA99AF761295E5A8397D2" : {
"close_time" : 486082973,
"peer_id" : "n9MD5h24qrQqiyBC8aeqqCWvpiBiYQ3jxSr91uiDvmrkyHRdYLUj",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"5C29005CF4FB479FC49EEFB4A5B075C86DD963CC" : {
"close_time" : 486082973,
"peer_id" : "n9L81uNCaPgtUJfaHh89gmdvXKAmSt5Gdsw2g1iPWaPkAHW5Nm4C",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"EFC49EB648E557CC50A72D715249B80E071F7705" : {
"close_time" : 486082973,
"peer_id" : "n949f75evCHwgyP4fPVgaHqNHxUVN15PsJEZ3B3HnXPcPjcZAoy7",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
}
},
"previous_mseconds" : 2005,
"previous_proposers" : 5,
"proposers" : 5,
"proposing" : false,
"state" : "consensus",
"synched" : true,
"validating" : false
},
"status" : "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"info" : {
"acquired" : {
"4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306" : "acquired"
},
"close_granularity" : 10,
"close_percent" : 50,
"close_resolution" : 10,
"close_times" : {
"486082972" : 1,
"486082973" : 4
},
"current_ms" : 1003,
"have_time_consensus" : false,
"ledger_seq" : 13701086,
"our_position" : {
"close_time" : 486082973,
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"peer_positions" : {
"0A2EAF919033A036D363D4E5610A66209DDBE8EE" : {
"close_time" : 486082972,
"peer_id" : "n9KiYM9CgngLvtRCQHZwgC2gjpdaZcCcbt3VboxiNFcKuwFVujzS",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"1567A8C953A86F8428C7B01641D79BBF2FD508F3" : {
"close_time" : 486082973,
"peer_id" : "n9LdgEtkmGB9E2h3K4Vp7iGUaKuq23Zr32ehxiU8FWY7xoxbWTSA",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"202397A81F20B44CF44EA99AF761295E5A8397D2" : {
"close_time" : 486082973,
"peer_id" : "n9MD5h24qrQqiyBC8aeqqCWvpiBiYQ3jxSr91uiDvmrkyHRdYLUj",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"5C29005CF4FB479FC49EEFB4A5B075C86DD963CC" : {
"close_time" : 486082973,
"peer_id" : "n9L81uNCaPgtUJfaHh89gmdvXKAmSt5Gdsw2g1iPWaPkAHW5Nm4C",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
},
"EFC49EB648E557CC50A72D715249B80E071F7705" : {
"close_time" : 486082973,
"peer_id" : "n949f75evCHwgyP4fPVgaHqNHxUVN15PsJEZ3B3HnXPcPjcZAoy7",
"previous_ledger" : "0BB01379B51234BAAF501A71C7AB147F595460B689BB9E8252A0B87B5A483623",
"propose_seq" : 0,
"transaction_hash" : "4BC2CE596CBD1321775320E2067F9C06D3862826212C16EF42ABB6A2B0414306"
}
},
"previous_mseconds" : 2005,
"previous_proposers" : 5,
"proposers" : 5,
"proposing" : false,
"state" : "consensus",
"synched" : true,
"validating" : false
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `info` | Object | Information that may be useful for debugging consensus. This output is subject to change without notice. |
The following is an incomplete summary of fields that may be contained in the `info` object:
| `Field` | Type | Description |
|:-----------------|:--------|:------------------------------------------------|
| `ledger_seq` | Number | The [ledger index][Ledger Index] of the [ledger](ledgers.html) currently in the consensus process |
| `our_position` | Object | This server's expectation for the ledger in the consensus process. |
| `peer_positions` | Object | Map of peers and their proposed versions of the ledger in the consensus process. |
| `proposers` | Number | The number of trusted validators participating in this consensus process. Which validators are trusted depends on this server's configuration. |
| `synched` | Boolean | Whether this server considers itself in sync with the network. |
| `state` | String | What part of the consensus process is currently in progress: `open`, `consensus`, `finished`, or `accepted`. |
It is also normal to get a minimal result where the only field in `info` is `"consensus": "none"`. This indicates that the server is in between consensus rounds.
The results of the `consensus_info` command can vary dramatically if you run it several times, even in short succession.
### Possible Errors
- Any of the [universal error types][].
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,203 @@
---
html: feature.html
parent: status-and-debugging-methods.html
blurb: Amendmentに関してこのサーバーが認識している情報を返します。
labels:
- ブロックチェーン
- コアサーバー
---
# feature
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Feature1.cpp "Source")
`feature`コマンドは、[Amendment](amendments.html)に関してこのサーバーが認識している情報Amendmentが有効であるかどうか、サーバーが[Amendmentプロセス](amendments.html#amendmentプロセス)でこれらのAmendmentに賛成票を投じたかどうかなどを返します。[新規: rippled 0.31.0][]
`feature`コマンドを使用して、Amendmentへの賛成票または反対票を投じるようにサーバーを一時的に設定できます。この変更は、サーバーの再起動後までは持続しません。Amendment投票で持続する変更を行うには`rippled.cfg`ファイルを使用します。詳細は、[Amendment投票の設定](amendments.html#amendment投票の設定)を参照してください。
_`feature`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket - すべてリスト*
```json
{
"id": "list_all_features",
"command": "feature"
}
```
*WebSocket - 拒否*
```json
{
"id": "reject_multi_sign",
"command": "feature",
"feature": "4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373",
"vetoed": true
}
```
*JSON-RPC*
```json
{
"method": "feature",
"params": [
{
"feature": "4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373",
"vetoed": false
}
]
}
```
*コマンドライン*
```sh
#Syntax: feature [<feature_id> [accept|reject]]
rippled feature 4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373 accept
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:----------|:--------|:-------------------------------------------------------|
| `feature` | 文字列 | _省略可_ Amendmentの一意のID16進数またはAmendmentの短い名前。指定されている場合は、応答が1つのAmendmentに限定されます。それ以外の場合は応答にすべてのAmendmentのリストが表示されます。 |
| `vetoed` | ブール値 | (省略可、`feature`が指定されていない場合は無視されますtrueの場合、サーバーに対し`feature`で指定されたAmendmentに反対票を投じるように指示します。falseの場合、サーバーに対しAmendmentに賛成票を投じるように指示します。 |
**注記:** サーバーが新しいAmendmentの適用方法を現在認識していない場合でも、`feature`フィールドにAmendment IDを指定すれば、新しいAmendmentに賛成票を投じるようにサーバーを設定できます。たとえば、Amendmentを _確かに_ サポートする新しい`rippled`バージョンに間もなくアップグレードする予定がある場合などにこのように設定できます。
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket - すべてリスト*
```json
{
"id": "list_all_features",
"status": "success",
"type": "response",
"result": {
"features": {
"42426C4D4F1009EE67080A9B7965B44656D7714D104A72F9B4369F97ABF044EE": {
"enabled": false,
"name": "FeeEscalation",
"supported": true,
"vetoed": false
},
"4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373": {
"enabled": false,
"name": "MultiSign",
"supported": true,
"vetoed": false
},
"6781F8368C4771B83E8B821D88F580202BCB4228075297B19E4FDC5233F1EFDC": {
"enabled": false,
"name": "TrustSetAuth",
"supported": true,
"vetoed": false
},
"C1B8D934087225F509BEB5A8EC24447854713EE447D277F69545ABFA0E0FD490": {
"enabled": false,
"name": "Tickets",
"supported": true,
"vetoed": false
},
"DA1BD556B42D85EA9C84066D028D355B52416734D3283F85E216EA5DA6DB7E13": {
"enabled": false,
"name": "SusPay",
"supported": true,
"vetoed": false
}
}
}
}
```
*WebSocket - 拒否*
```json
{
"id": "reject_multi_sign",
"status": "success",
"type": "response",
"result": {
"features": {
"4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373": {
"enabled": false,
"name": "MultiSign",
"supported": true,
"vetoed": true
}
}
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373": {
"enabled": false,
"name": "MultiSign",
"supported": true,
"vetoed": false
},
"status": "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result": {
"4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373": {
"enabled": false,
"name": "MultiSign",
"supported": true,
"vetoed": false
},
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に**Amendmentのマップ**がJSONプロジェクトとして含まれています。オブジェクトのキーはAmendment IDです。各キーの値は、そのIDのAmendmentのステータスを記述した _Amendmentオブジェクト_ です。要求に`feature`が指定されいる場合、要求による変更の適用後には、要求されたAmendmentオブジェクトだけがマップに含まれます。各Amendmentオブジェクトのフィールドを次に示します。
| `Field` | 型 | 説明 |
|:------------|:--------|:-----------------------------------------------------|
| `enabled` | ブール値 | 最新レジャーでこのAmendmentが現在有効であるかどうか。 |
| `name` | 文字列 | 省略される場合がありますこのAmendmentの人間が読める形式の名前判明している場合。 |
| `supported` | ブール値 | サーバーがこのAmendmentの適用方法を認識しているかどうか。このフィールドが`false`サーバーがこのAmendmentの適用方法を認識していないに設定されており、`enabled``true`このAmendmentが最新レジャーで有効であるに設定されている場合、このAmendmentによりサーバーが[Amendment blocked](amendments.html#amendment-blocked)になる可能性があります。 |
| `vetoed` | ブール値 | サーバーがこのAmendmentに反対票を投じるように指示されているかどうか。 |
**注意:** Amendmentの`name`は、Amendmentの内容を厳密に示すものではありません。サーバー間でこの名前が一意であることや整合性があることは保証されません。
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
* `badFeature` - 指定されている`feature`のフォーマットが正しくないか、サーバーがその名前のAmendmentを認識していません。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,204 @@
---
html: feature.html
parent: status-and-debugging-methods.html
blurb: Get information about protocol amendments.
labels:
- Blockchain
- Core Server
---
# feature
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Feature1.cpp "Source")
The `feature` command returns information about [amendments](amendments.html) this server knows about, including whether they are enabled and whether the server is voting in favor of those amendments in the [amendment process](amendments.html#amendment-process). [New in: rippled 0.31.0][]
You can use the `feature` command to configure the server to vote against or in favor of an amendment. This change persists even if you restart the server. [Updated in: rippled 1.7.0][]
_The `feature` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket - list all*
```json
{
"id": "list_all_features",
"command": "feature"
}
```
*WebSocket - reject*
```json
{
"id": "reject_multi_sign",
"command": "feature",
"feature": "4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373",
"vetoed": true
}
```
*JSON-RPC*
```json
{
"method": "feature",
"params": [
{
"feature": "4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373",
"vetoed": false
}
]
}
```
*Commandline*
```sh
#Syntax: feature [<feature_id> [accept|reject]]
rippled feature 4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373 accept
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:----------|:--------|:-------------------------------------------------------|
| `feature` | String | _(Optional)_ The unique ID of an amendment, as hexadecimal; or the short name of the amendment. If provided, limits the response to one amendment. Otherwise, the response lists all amendments. |
| `vetoed` | Boolean | (Optional; ignored unless `feature` also specified) If true, instructs the server to vote against the amendment specified by `feature`. If false, instructs the server to vote in favor of the amendment. On the commandline, use 'accept' or 'reject rather than 'true' or 'false'. |
**Note:** You can configure your server to vote in favor of a new amendment, even if the server does not currently know how to apply that amendment, by specifying the amendment ID in the `feature` field. For example, you might want to do this if you plan to upgrade soon to a new `rippled` version that _does_ support the amendment.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket - list all*
```json
{
"id": "list_all_features",
"status": "success",
"type": "response",
"result": {
"features": {
"42426C4D4F1009EE67080A9B7965B44656D7714D104A72F9B4369F97ABF044EE": {
"enabled": false,
"name": "FeeEscalation",
"supported": true,
"vetoed": false
},
"4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373": {
"enabled": false,
"name": "MultiSign",
"supported": true,
"vetoed": false
},
"6781F8368C4771B83E8B821D88F580202BCB4228075297B19E4FDC5233F1EFDC": {
"enabled": false,
"name": "TrustSetAuth",
"supported": true,
"vetoed": false
},
"C1B8D934087225F509BEB5A8EC24447854713EE447D277F69545ABFA0E0FD490": {
"enabled": false,
"name": "Tickets",
"supported": true,
"vetoed": false
},
"DA1BD556B42D85EA9C84066D028D355B52416734D3283F85E216EA5DA6DB7E13": {
"enabled": false,
"name": "SusPay",
"supported": true,
"vetoed": false
}
}
}
}
```
*WebSocket - reject*
```json
{
"id": "reject_multi_sign",
"status": "success",
"type": "response",
"result": {
"features": {
"4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373": {
"enabled": false,
"name": "MultiSign",
"supported": true,
"vetoed": true
}
}
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373": {
"enabled": false,
"name": "MultiSign",
"supported": true,
"vetoed": false
},
"status": "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result": {
"4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373": {
"enabled": false,
"name": "MultiSign",
"supported": true,
"vetoed": false
},
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing **a map of amendments** as a JSON object. The keys of the object are amendment IDs. The values for each key are _amendment objects_ that describe the status of the amendment with that ID. If the request specified a `feature`, the map contains only the requested amendment object, after applying any changes from the request. Each amendment object has the following fields:
| `Field` | Type | Description |
|:------------|:--------|:-----------------------------------------------------|
| `enabled` | Boolean | Whether this amendment is currently enabled in the latest ledger. |
| `name` | String | (May be omitted) The human-readable name for this amendment, if known. |
| `supported` | Boolean | Whether the server knows how to apply this amendment. If this field is set to `false` (the server does not know how to apply this amendment) and `enabled` is set to `true` (this amendment is enabled in the latest ledger), this amendment may cause your server to be [amendment blocked](amendments.html#amendment-blocked). |
| `vetoed` | Boolean | Whether the server has been instructed to vote against this amendment. |
**Caution:** The `name` for an amendment does not strictly indicate what that amendment does. The name is not guaranteed to be unique or consistent across servers.
### Possible Errors
- Any of the [universal error types][].
- `badFeature` - The `feature` specified was invalidly formatted, or the server does not know an amendment with that name.
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,169 @@
---
html: fetch_info.html
parent: status-and-debugging-methods.html
blurb: このサーバーが現在ネットワークからフェッチしているオブジェクトに関する情報を返します。
labels:
- コアサーバー
---
# fetch_info
[[ソース]](https://github.com/ripple/rippled/blob/315a8b6b602798a4cff4d8e1911936011e12abdb/src/ripple/rpc/handlers/FetchInfo.cpp "Source")
`fetch_info`コマンドは、このサーバーが現在ネットワークからフェッチしているオブジェクトに関する情報と、その情報を所有しているピアの数を返します。これは現在の取得操作をリセットする場合にも使用できます。
_`fetch_info`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 91,
"command": "fetch_info",
"clear": false
}
```
*JSON-RPC*
```json
{
"method": "fetch_info",
"params": [
{
"clear": false
}
]
}
```
*コマンドライン*
```sh
#Syntax: fetch_info [clear]
rippled fetch_info
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:--------|:--------|:---------------------------------------------------------|
| `clear` | ブール値 | `true`の場合、現在のフェッチ操作がリセットされます。それ以外の場合、進行中のフェッチ操作のステータスのみが取得されます。 |
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
{
"result" : {
"info" : {
"348928" : {
"hash" : "C26D432B06F84861BCACD7942EDC3FE0B2E1DEB966A9E516A0FD275A375C2010",
"have_header" : true,
"have_state" : false,
"have_transactions" : true,
"needed_state_hashes" : [
"BF8DC6B1E10D1D3565BF0649075D22EBFD34F751AFCC0E53E81D74786BC88922",
"34E37A71CB51A12C73A435250E6A6349F7884C7EEBA6B88FA31F0244E967E88F",
"BFB7D3008A7D61FD6A0538D1C2E70CFB94CE8DC66606319C372F278A48629765",
"41C0C61D701FB1EA586F0EF1FC7A91FEC476D979589DA60507F05C13F7C21975",
"6DDE8840A2C3C7FF05E5FFEE4D06408694C16A8357338FE0C4581DC3D8A00BBA",
"6C69D833B582C849917806FA009518832BB50E900E43716FD7CC1966428DD0CF",
"1EDC020CFC4AF19B625C52E20B66D6AE672821CCC461E8A9C457A3B2955657F7",
"FC0616A66A2B0589CA513F3341D4EA51E782C4601E5072308478E3CC19264640",
"19FC607B5DE1B64681A676EC1ED5507B9555B0E098CD9D898320297DE1A64033",
"5E128D3FC990074E35687387A14AA12D9FD287E5AB57CB9B2FD83DE635DF5CA9",
"DE72820F3981770F2AA8770BC233B80661F1A452819D8529008875FF8DED87A9",
"3ACB84BEE2C45556351FF60FD787D235C9CF5623FB8A35B01446B773598E7CC0",
"0DD3A8DF69874148057F1F2BF305442FF2E89A76A08B4CC8C051E2ED69B874F3",
"4AE9A9C4F12A5BD0355037DA40A0B145420A2168A9FEDE43E643BD13062F8ECE",
"08CBF8CFFEC207F5AC4E4F24BC447011FD8C79D25B344281FBFB4732D7058ED4",
"779B2577C5C4BAED6657421448EA506BBF50F86BE363E0924127C4EA17A58BBE"
],
"peers" : 2,
"timeouts" : 0
}
},
"status" : "success"
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"info" : {
"348928" : {
"hash" : "C26D432B06F84861BCACD7942EDC3FE0B2E1DEB966A9E516A0FD275A375C2010",
"have_header" : true,
"have_state" : false,
"have_transactions" : true,
"needed_state_hashes" : [
"BF8DC6B1E10D1D3565BF0649075D22EBFD34F751AFCC0E53E81D74786BC88922",
"34E37A71CB51A12C73A435250E6A6349F7884C7EEBA6B88FA31F0244E967E88F",
"BFB7D3008A7D61FD6A0538D1C2E70CFB94CE8DC66606319C372F278A48629765",
"41C0C61D701FB1EA586F0EF1FC7A91FEC476D979589DA60507F05C13F7C21975",
"6DDE8840A2C3C7FF05E5FFEE4D06408694C16A8357338FE0C4581DC3D8A00BBA",
"6C69D833B582C849917806FA009518832BB50E900E43716FD7CC1966428DD0CF",
"1EDC020CFC4AF19B625C52E20B66D6AE672821CCC461E8A9C457A3B2955657F7",
"FC0616A66A2B0589CA513F3341D4EA51E782C4601E5072308478E3CC19264640",
"19FC607B5DE1B64681A676EC1ED5507B9555B0E098CD9D898320297DE1A64033",
"5E128D3FC990074E35687387A14AA12D9FD287E5AB57CB9B2FD83DE635DF5CA9",
"DE72820F3981770F2AA8770BC233B80661F1A452819D8529008875FF8DED87A9",
"3ACB84BEE2C45556351FF60FD787D235C9CF5623FB8A35B01446B773598E7CC0",
"0DD3A8DF69874148057F1F2BF305442FF2E89A76A08B4CC8C051E2ED69B874F3",
"4AE9A9C4F12A5BD0355037DA40A0B145420A2168A9FEDE43E643BD13062F8ECE",
"08CBF8CFFEC207F5AC4E4F24BC447011FD8C79D25B344281FBFB4732D7058ED4",
"779B2577C5C4BAED6657421448EA506BBF50F86BE363E0924127C4EA17A58BBE"
],
"peers" : 2,
"timeouts" : 0
}
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:--------|:-------|:----------------------------------------------------------|
| `info` | オブジェクト | フェッチ対象のオブジェクトと、そのフェッチ対象オブジェクトのステータスのマップ。フェッチ対象のレジャーはその[レジャーインデックス]によって識別されます。フェッチ対象のレジャーとその他のオブジェクトがハッシュによって識別されることもあります。 |
進行中のフェッチ操作を記述するフィールドは、予告なく変更される可能性があります。以下のフィールドが含まれている可能性があります。
| `Field` | 型 | 説明 |
|:----------------------|:------------------------|:---------------------------|
| `hash` | 文字列 | フェッチ対象アイテムのハッシュ。 |
| `have_header` | ブール値 | レジャーの場合、このサーバーがすでにレジャーのヘッダーセクションを取得しているかどうか。 |
| `have_transactions` | ブール値 | レジャーの場合、このサーバーがすでにレジャーのトランザクションセクションを取得しているかどうか。 |
| `needed_state_hashes` | (ハッシュ)文字列の配列 | まだ必要とされる、このアイテムの状態オブジェクトのハッシュ値。必要なハッシュの数が16を超えている場合、応答には最初の16個のハッシュのみが含まれます。 |
| `peers` | 数値 | このアイテムが利用可能であるピアの数。 |
| `timeouts` | 数値 | このアイテムをフェッチしようとしてタイムアウトになった2.5秒)回数。 |
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,170 @@
---
html: fetch_info.html
parent: status-and-debugging-methods.html
blurb: Get information about the server's sync with the network.
labels:
- Core Server
---
# fetch_info
[[Source]](https://github.com/ripple/rippled/blob/315a8b6b602798a4cff4d8e1911936011e12abdb/src/ripple/rpc/handlers/FetchInfo.cpp "Source")
The `fetch_info` command returns information about objects that this server is currently fetching from the network, and how many peers have that information. It can also be used to reset current fetches.
_The `fetch_info` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 91,
"command": "fetch_info",
"clear": false
}
```
*JSON-RPC*
```json
{
"method": "fetch_info",
"params": [
{
"clear": false
}
]
}
```
*Commandline*
```sh
#Syntax: fetch_info [clear]
rippled fetch_info
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:--------|:--------|:---------------------------------------------------------|
| `clear` | Boolean | If `true`, reset current fetches. Otherwise, only get status of fetches in progress. |
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
{
"result" : {
"info" : {
"348928" : {
"hash" : "C26D432B06F84861BCACD7942EDC3FE0B2E1DEB966A9E516A0FD275A375C2010",
"have_header" : true,
"have_state" : false,
"have_transactions" : true,
"needed_state_hashes" : [
"BF8DC6B1E10D1D3565BF0649075D22EBFD34F751AFCC0E53E81D74786BC88922",
"34E37A71CB51A12C73A435250E6A6349F7884C7EEBA6B88FA31F0244E967E88F",
"BFB7D3008A7D61FD6A0538D1C2E70CFB94CE8DC66606319C372F278A48629765",
"41C0C61D701FB1EA586F0EF1FC7A91FEC476D979589DA60507F05C13F7C21975",
"6DDE8840A2C3C7FF05E5FFEE4D06408694C16A8357338FE0C4581DC3D8A00BBA",
"6C69D833B582C849917806FA009518832BB50E900E43716FD7CC1966428DD0CF",
"1EDC020CFC4AF19B625C52E20B66D6AE672821CCC461E8A9C457A3B2955657F7",
"FC0616A66A2B0589CA513F3341D4EA51E782C4601E5072308478E3CC19264640",
"19FC607B5DE1B64681A676EC1ED5507B9555B0E098CD9D898320297DE1A64033",
"5E128D3FC990074E35687387A14AA12D9FD287E5AB57CB9B2FD83DE635DF5CA9",
"DE72820F3981770F2AA8770BC233B80661F1A452819D8529008875FF8DED87A9",
"3ACB84BEE2C45556351FF60FD787D235C9CF5623FB8A35B01446B773598E7CC0",
"0DD3A8DF69874148057F1F2BF305442FF2E89A76A08B4CC8C051E2ED69B874F3",
"4AE9A9C4F12A5BD0355037DA40A0B145420A2168A9FEDE43E643BD13062F8ECE",
"08CBF8CFFEC207F5AC4E4F24BC447011FD8C79D25B344281FBFB4732D7058ED4",
"779B2577C5C4BAED6657421448EA506BBF50F86BE363E0924127C4EA17A58BBE"
],
"peers" : 2,
"timeouts" : 0
}
},
"status" : "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"info" : {
"348928" : {
"hash" : "C26D432B06F84861BCACD7942EDC3FE0B2E1DEB966A9E516A0FD275A375C2010",
"have_header" : true,
"have_state" : false,
"have_transactions" : true,
"needed_state_hashes" : [
"BF8DC6B1E10D1D3565BF0649075D22EBFD34F751AFCC0E53E81D74786BC88922",
"34E37A71CB51A12C73A435250E6A6349F7884C7EEBA6B88FA31F0244E967E88F",
"BFB7D3008A7D61FD6A0538D1C2E70CFB94CE8DC66606319C372F278A48629765",
"41C0C61D701FB1EA586F0EF1FC7A91FEC476D979589DA60507F05C13F7C21975",
"6DDE8840A2C3C7FF05E5FFEE4D06408694C16A8357338FE0C4581DC3D8A00BBA",
"6C69D833B582C849917806FA009518832BB50E900E43716FD7CC1966428DD0CF",
"1EDC020CFC4AF19B625C52E20B66D6AE672821CCC461E8A9C457A3B2955657F7",
"FC0616A66A2B0589CA513F3341D4EA51E782C4601E5072308478E3CC19264640",
"19FC607B5DE1B64681A676EC1ED5507B9555B0E098CD9D898320297DE1A64033",
"5E128D3FC990074E35687387A14AA12D9FD287E5AB57CB9B2FD83DE635DF5CA9",
"DE72820F3981770F2AA8770BC233B80661F1A452819D8529008875FF8DED87A9",
"3ACB84BEE2C45556351FF60FD787D235C9CF5623FB8A35B01446B773598E7CC0",
"0DD3A8DF69874148057F1F2BF305442FF2E89A76A08B4CC8C051E2ED69B874F3",
"4AE9A9C4F12A5BD0355037DA40A0B145420A2168A9FEDE43E643BD13062F8ECE",
"08CBF8CFFEC207F5AC4E4F24BC447011FD8C79D25B344281FBFB4732D7058ED4",
"779B2577C5C4BAED6657421448EA506BBF50F86BE363E0924127C4EA17A58BBE"
],
"peers" : 2,
"timeouts" : 0
}
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `info` | Object | Map of objects being fetched and the status of that object being fetched. A ledger being fetched may be identified by its [ledger index][]; ledgers and other objects being fetched may also be identified by their hashes. |
The fields describing a fetch in progress are subject to change without notice. The following fields may be included:
| `Field` | Type | Description |
|:----------------------|:------------------------|:---------------------------|
| `hash` | String | The hash of the item being fetched. |
| `have_header` | Boolean | For a ledger, whether this server has already obtained the ledger's header section. |
| `have_transactions` | Boolean | For a ledger, whether this server has already obtained the transaction section of that ledger. |
| `needed_state_hashes` | Array of (Hash) Strings | The hash values of state objects still needed from this item. If more than 16 are needed, the response contains only the first 16. |
| `peers` | Number | The number of peers who have this item available. |
| `timeouts` | Number | The number of times that fetching this item has resulted in a timeout (2.5 seconds). |
### Possible Errors
- Any of the [universal error types][].
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,161 @@
---
html: get_counts.html
parent: status-and-debugging-methods.html
blurb: サーバーの健全性に関するさまざまな統計情報を提供します。
labels:
- コアサーバー
---
# get_counts
[[ソース]](https://github.com/ripple/rippled/blob/c7118a183a660648aa88a3546a6b2c5bce858440/src/ripple/rpc/handlers/GetCounts.cpp "Source")
`get_counts`コマンドは、サーバーの健全性に関するさまざまな統計情報を提供します。そのほとんどは、現在メモリーに格納されている各種オブジェクトの数です。
_`get_counts`メソッドは、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。_
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 90,
"command": "get_counts",
"min_count": 100
}
```
*JSON-RPC*
```json
{
"method": "get_counts",
"params": [
{
"min_count": 100
}
]
}
```
*コマンドライン*
```sh
#Syntax: get_counts [min_count]
rippled get_counts 100
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:------------|:--------------------------|:-----------------------------------|
| `min_count` | 数値(符号なし整数) | この値以上の値を含むフィールドのみを返します。 |
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
{
"result" : {
"AL_hit_rate" : 48.36725616455078,
"HashRouterEntry" : 3048,
"Ledger" : 46,
"NodeObject" : 10417,
"SLE_hit_rate" : 64.62035369873047,
"STArray" : 1299,
"STLedgerEntry" : 646,
"STObject" : 6987,
"STTx" : 4104,
"STValidation" : 610,
"Transaction" : 4069,
"dbKBLedger" : 10733,
"dbKBTotal" : 39069,
"dbKBTransaction" : 26982,
"fullbelow_size" : 0,
"historical_perminute" : 0,
"ledger_hit_rate" : 71.0565185546875,
"node_hit_rate" : 3.808214902877808,
"node_read_bytes" : 393611911,
"node_reads_hit" : 1283098,
"node_reads_total" : 679410,
"node_writes" : 1744285,
"node_written_bytes" : 794368909,
"status" : "success",
"treenode_cache_size" : 6650,
"treenode_track_size" : 598631,
"uptime" : "3 hours, 50 minutes, 27 seconds",
"write_load" : 0
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"AL_hit_rate" : 48.36725616455078,
"HashRouterEntry" : 3048,
"Ledger" : 46,
"NodeObject" : 10417,
"SLE_hit_rate" : 64.62035369873047,
"STArray" : 1299,
"STLedgerEntry" : 646,
"STObject" : 6987,
"STTx" : 4104,
"STValidation" : 610,
"Transaction" : 4069,
"dbKBLedger" : 10733,
"dbKBTotal" : 39069,
"dbKBTransaction" : 26982,
"fullbelow_size" : 0,
"historical_perminute" : 0,
"ledger_hit_rate" : 71.0565185546875,
"node_hit_rate" : 3.808214902877808,
"node_read_bytes" : 393611911,
"node_reads_hit" : 1283098,
"node_reads_total" : 679410,
"node_writes" : 1744285,
"node_written_bytes" : 794368909,
"status" : "success",
"treenode_cache_size" : 6650,
"treenode_track_size" : 598631,
"uptime" : "3 hours, 50 minutes, 27 seconds",
"write_load" : 0
}
}
```
<!-- MULTICODE_BLOCK_END -->
応答は[標準フォーマット][]に従っています。結果に含まれるフィールドのリストは、予告なく変更される可能性がありますが、(特に)以下のいずれかが含まれます。
| `Field` | 型 | 説明 |
|:--------------|:-------|:----------------------------------------------------|
| `Transaction` | 数値 | メモリー内の`Transaction`オブジェクトの数 |
| `Ledger` | 数値 | メモリー内のレジャーの数 |
| `uptime` | 文字列 | このサーバーの連続稼働時間。 |
その他のほとんどのエントリーでは、値はメモリー内に現在保持されている当該タイプのオブジェクトの数を示します。
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,161 @@
---
html: get_counts.html
parent: status-and-debugging-methods.html
blurb: Get statistics about the server's internals and memory usage.
labels:
- Core Server
---
# get_counts
[[Source]](https://github.com/ripple/rippled/blob/c7118a183a660648aa88a3546a6b2c5bce858440/src/ripple/rpc/handlers/GetCounts.cpp "Source")
The `get_counts` command provides various stats about the health of the server, mostly the number of objects of different types that it currently holds in memory.
_The `get_counts` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 90,
"command": "get_counts",
"min_count": 100
}
```
*JSON-RPC*
```json
{
"method": "get_counts",
"params": [
{
"min_count": 100
}
]
}
```
*Commandline*
```sh
#Syntax: get_counts [min_count]
rippled get_counts 100
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:------------|:--------------------------|:-----------------------------------|
| `min_count` | Number (Unsigned Integer) | Only return fields with a value at least this high. |
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*JSON-RPC*
```json
{
"result" : {
"AL_hit_rate" : 48.36725616455078,
"HashRouterEntry" : 3048,
"Ledger" : 46,
"NodeObject" : 10417,
"SLE_hit_rate" : 64.62035369873047,
"STArray" : 1299,
"STLedgerEntry" : 646,
"STObject" : 6987,
"STTx" : 4104,
"STValidation" : 610,
"Transaction" : 4069,
"dbKBLedger" : 10733,
"dbKBTotal" : 39069,
"dbKBTransaction" : 26982,
"fullbelow_size" : 0,
"historical_perminute" : 0,
"ledger_hit_rate" : 71.0565185546875,
"node_hit_rate" : 3.808214902877808,
"node_read_bytes" : 393611911,
"node_reads_hit" : 1283098,
"node_reads_total" : 679410,
"node_writes" : 1744285,
"node_written_bytes" : 794368909,
"status" : "success",
"treenode_cache_size" : 6650,
"treenode_track_size" : 598631,
"uptime" : "3 hours, 50 minutes, 27 seconds",
"write_load" : 0
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"AL_hit_rate" : 48.36725616455078,
"HashRouterEntry" : 3048,
"Ledger" : 46,
"NodeObject" : 10417,
"SLE_hit_rate" : 64.62035369873047,
"STArray" : 1299,
"STLedgerEntry" : 646,
"STObject" : 6987,
"STTx" : 4104,
"STValidation" : 610,
"Transaction" : 4069,
"dbKBLedger" : 10733,
"dbKBTotal" : 39069,
"dbKBTransaction" : 26982,
"fullbelow_size" : 0,
"historical_perminute" : 0,
"ledger_hit_rate" : 71.0565185546875,
"node_hit_rate" : 3.808214902877808,
"node_read_bytes" : 393611911,
"node_reads_hit" : 1283098,
"node_reads_total" : 679410,
"node_writes" : 1744285,
"node_written_bytes" : 794368909,
"status" : "success",
"treenode_cache_size" : 6650,
"treenode_track_size" : 598631,
"uptime" : "3 hours, 50 minutes, 27 seconds",
"write_load" : 0
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][]. The list of fields contained in the result is subject to change without notice, but it may contain any of the following (among others):
| `Field` | Type | Description |
|:--------------|:-------|:----------------------------------------------------|
| `Transaction` | Number | The number of `Transaction` objects in memory |
| `Ledger` | Number | The number of ledgers in memory |
| `uptime` | String | The amount of time this server has been running uninterrupted. |
For most other entries, the value indicates the number of objects of that type currently in memory.
### Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,244 @@
---
html: print.html
parent: status-and-debugging-methods.html
blurb: さまざまな内部サブシステムの現在の状況を返します。
labels:
- コアサーバー
---
# print
[[ソース]](https://github.com/ripple/rippled/blob/315a8b6b602798a4cff4d8e1911936011e12abdb/src/ripple/rpc/handlers/Print.cpp "Source")
`print`コマンドは、さまざまな内部サブシステム(ピア、レジャークリーナー、リソースマネージャーなど)の現在の状況を返します。
*`print`要求は、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。*
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "print_req_1",
"command": "print"
}
```
*コマンドライン*
```
rippled print
```
<!-- MULTICODE_BLOCK_END -->
要求にはパラメーターが含まれていません。
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"app" : {
"ledgercleaner" : {
"status" : "idle"
},
"peers" : {
"peerfinder" : {
"bootcache" : {
"entries" : 109
},
"config" : {
"auto_connect" : "true",
"features" : "",
"max_peers" : 21,
"out_peers" : 10,
"port" : 51235,
"want_incoming" : "true"
},
"counts" : {
"accept" : 0,
"close" : 0,
"cluster" : "0",
"connect" : 0,
"fixed" : "0",
"in" : "0/11",
"out" : "10/10",
"total" : "10"
},
"fixed" : 0,
"livecache" : {
"entries" : [
{
"address" : "23.239.3.247:51235",
"expires" : "30000000000 nanoseconds",
"hops" : 2
},
{
"address" : "192.170.145.88:51235",
"expires" : "30000000000 nanoseconds",
"hops" : 1
},
{
"address" : "198.204.238.130:51235",
"expires" : "26000024558 nanoseconds",
"hops" : 1
},
{
"address" : "203.127.12.115:51235",
"expires" : "26000024558 nanoseconds",
"hops" : 2
},
{
"address" : "212.83.147.67:51235",
"expires" : "26000024558 nanoseconds",
"hops" : 2
}
],
"hist" : "0, 10, 74, 10, 0, 0, 0, 0",
"size" : "94"
},
"peers" : [
{
"local_address" : "10.1.10.78:48923",
"remote_address" : "52.24.43.83:51235",
"state" : "active"
},
{
"local_address" : "10.1.10.78:50004",
"remote_address" : "52.26.205.197:51235",
"state" : "active"
},
{
"local_address" : "10.1.10.78:37019",
"remote_address" : "168.1.60.132:51235",
"state" : "active"
},
{
"local_address" : "10.1.10.78:38775",
"remote_address" : "192.170.145.88:51235",
"state" : "active"
},
{
"local_address" : "10.1.10.78:34793",
"remote_address" : "198.204.238.130:51235",
"state" : "active"
}
]
}
},
"resource" : {
"admin" : [
{
"balance" : 0,
"count" : 1,
"name" : "\"127.0.0.1\""
}
],
"inactive" : [],
"inbound" : [],
"outbound" : [
{
"balance" : 23,
"count" : 1,
"name" : "93.190.138.234:51235"
},
{
"balance" : 35,
"count" : 1,
"name" : "198.204.238.130:51235"
},
{
"balance" : 31,
"count" : 1,
"name" : "52.26.205.197:51235"
},
{
"balance" : 32,
"count" : 1,
"name" : "54.186.73.52:51235"
},
{
"balance" : 15,
"count" : 1,
"name" : "72.251.233.164:51235"
}
]
},
"server" : {
"active" : "2",
"hist" : "16",
"history" : [
{
"bytes_in" : "214",
"bytes_out" : "11688",
"elapsed" : "0 seconds",
"id" : "16",
"requests" : 1,
"when" : "2015-Jun-16 16:33:50"
},
{
"bytes_in" : "214",
"bytes_out" : "11431",
"elapsed" : "0 seconds",
"id" : "15",
"requests" : 1,
"when" : "2015-Jun-16 16:11:59"
},
{
"bytes_in" : "227",
"bytes_out" : "337",
"elapsed" : "0 seconds",
"id" : "3",
"requests" : 1,
"when" : "2015-Jun-16 14:57:23"
},
{
"bytes_in" : "214",
"bytes_out" : "2917",
"elapsed" : "0 seconds",
"id" : "2",
"requests" : 1,
"when" : "2015-Jun-16 12:39:29"
},
{
"bytes_in" : "220",
"bytes_out" : "1426",
"elapsed" : "0 seconds",
"id" : "1",
"requests" : 1,
"when" : "2015-Jun-16 12:39:13"
}
]
},
"validators" : {}
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
応答は[標準フォーマット][]に従っています。結果に含まれる追加フィールドは、`rippled`サーバーの内部状態に応じて異なります。このコマンドの実行結果は、予告なく変更されることがあります。
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,244 @@
---
html: print.html
parent: status-and-debugging-methods.html
blurb: Get information about internal subsystems.
labels:
- Core Server
---
# print
[[Source]](https://github.com/ripple/rippled/blob/315a8b6b602798a4cff4d8e1911936011e12abdb/src/ripple/rpc/handlers/Print.cpp "Source")
The `print` command returns the current status of various internal subsystems, including peers, the ledger cleaner, and the resource manager.
*The `print` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users!*
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "print_req_1",
"command": "print"
}
```
*Commandline*
```
rippled print
```
<!-- MULTICODE_BLOCK_END -->
The request includes no parameters.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"app" : {
"ledgercleaner" : {
"status" : "idle"
},
"peers" : {
"peerfinder" : {
"bootcache" : {
"entries" : 109
},
"config" : {
"auto_connect" : "true",
"features" : "",
"max_peers" : 21,
"out_peers" : 10,
"port" : 51235,
"want_incoming" : "true"
},
"counts" : {
"accept" : 0,
"close" : 0,
"cluster" : "0",
"connect" : 0,
"fixed" : "0",
"in" : "0/11",
"out" : "10/10",
"total" : "10"
},
"fixed" : 0,
"livecache" : {
"entries" : [
{
"address" : "23.239.3.247:51235",
"expires" : "30000000000 nanoseconds",
"hops" : 2
},
{
"address" : "192.170.145.88:51235",
"expires" : "30000000000 nanoseconds",
"hops" : 1
},
{
"address" : "198.204.238.130:51235",
"expires" : "26000024558 nanoseconds",
"hops" : 1
},
{
"address" : "203.127.12.115:51235",
"expires" : "26000024558 nanoseconds",
"hops" : 2
},
{
"address" : "212.83.147.67:51235",
"expires" : "26000024558 nanoseconds",
"hops" : 2
}
],
"hist" : "0, 10, 74, 10, 0, 0, 0, 0",
"size" : "94"
},
"peers" : [
{
"local_address" : "10.1.10.78:48923",
"remote_address" : "52.24.43.83:51235",
"state" : "active"
},
{
"local_address" : "10.1.10.78:50004",
"remote_address" : "52.26.205.197:51235",
"state" : "active"
},
{
"local_address" : "10.1.10.78:37019",
"remote_address" : "168.1.60.132:51235",
"state" : "active"
},
{
"local_address" : "10.1.10.78:38775",
"remote_address" : "192.170.145.88:51235",
"state" : "active"
},
{
"local_address" : "10.1.10.78:34793",
"remote_address" : "198.204.238.130:51235",
"state" : "active"
}
]
}
},
"resource" : {
"admin" : [
{
"balance" : 0,
"count" : 1,
"name" : "\"127.0.0.1\""
}
],
"inactive" : [],
"inbound" : [],
"outbound" : [
{
"balance" : 23,
"count" : 1,
"name" : "93.190.138.234:51235"
},
{
"balance" : 35,
"count" : 1,
"name" : "198.204.238.130:51235"
},
{
"balance" : 31,
"count" : 1,
"name" : "52.26.205.197:51235"
},
{
"balance" : 32,
"count" : 1,
"name" : "54.186.73.52:51235"
},
{
"balance" : 15,
"count" : 1,
"name" : "72.251.233.164:51235"
}
]
},
"server" : {
"active" : "2",
"hist" : "16",
"history" : [
{
"bytes_in" : "214",
"bytes_out" : "11688",
"elapsed" : "0 seconds",
"id" : "16",
"requests" : 1,
"when" : "2015-Jun-16 16:33:50"
},
{
"bytes_in" : "214",
"bytes_out" : "11431",
"elapsed" : "0 seconds",
"id" : "15",
"requests" : 1,
"when" : "2015-Jun-16 16:11:59"
},
{
"bytes_in" : "227",
"bytes_out" : "337",
"elapsed" : "0 seconds",
"id" : "3",
"requests" : 1,
"when" : "2015-Jun-16 14:57:23"
},
{
"bytes_in" : "214",
"bytes_out" : "2917",
"elapsed" : "0 seconds",
"id" : "2",
"requests" : 1,
"when" : "2015-Jun-16 12:39:29"
},
{
"bytes_in" : "220",
"bytes_out" : "1426",
"elapsed" : "0 seconds",
"id" : "1",
"requests" : 1,
"when" : "2015-Jun-16 12:39:13"
}
]
},
"validators" : {}
},
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][]. Additional fields in the result depend on the internal state of the `rippled` server. The results of this command are subject to change without notice.
### Possible Errors
* Any of the [universal error types][].
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,131 @@
---
html: validator_info.html
parent: status-and-debugging-methods.html
blurb: Get the server's validation settings, if configured as a validator.
labels:
- コアサーバー
- ブロックチェーン
---
# validator_info
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/ValidatorInfo.cpp "Source")
The `{{currentpage.name}}` method returns the current validator settings of the server, if it is configured as a validator.
_The `{{currentpage.name}}` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "{{currentpage.name}}"
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}"
}
```
*Commandline*
```sh
#Syntax: {{currentpage.name}}
rippled {{currentpage.name}}
```
<!-- MULTICODE_BLOCK_END -->
The request does not accept any parameters.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"result": {
"domain": "mduo13.com",
"ephemeral_key": "n9KnrcCmL5psyKtk2KWP6jy14Hj4EXuZDg7XMdQJ9cSDoFSp53hu",
"manifest": "JAAAAAFxIe002KClGBUlRA7h5J2Y5B7Xdlxn1Z5OxY7ZC2UmqUIikHMhAkVIeB7McBf4NFsBceQQlScTVUWMdpYzwmvs115SUGDKdkcwRQIhAJnKfYWnPsBsATIIRfgkAAK+HE4zp8G8AmOPrHmLZpZAAiANiNECVQTKktoD7BEoEmS8jaFBNMgRdcG0dttPurCAGXcKbWR1bzEzLmNvbXASQPjO6wxOfhtWsJ6oMWBg8Rs5STAGvQV2ArI5MG3KbpFrNSMxbx630Ars9d9j1ORsUS5v1biZRShZfg9180JuZAo=",
"master_key": "nHBk5DPexBjinXV8qHn7SEKzoxh2W92FxSbNTPgGtQYBzEF4msn9",
"seq": 1
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"domain": "mduo13.com",
"ephemeral_key": "n9KnrcCmL5psyKtk2KWP6jy14Hj4EXuZDg7XMdQJ9cSDoFSp53hu",
"manifest": "JAAAAAFxIe002KClGBUlRA7h5J2Y5B7Xdlxn1Z5OxY7ZC2UmqUIikHMhAkVIeB7McBf4NFsBceQQlScTVUWMdpYzwmvs115SUGDKdkcwRQIhAJnKfYWnPsBsATIIRfgkAAK+HE4zp8G8AmOPrHmLZpZAAiANiNECVQTKktoD7BEoEmS8jaFBNMgRdcG0dttPurCAGXcKbWR1bzEzLmNvbXASQPjO6wxOfhtWsJ6oMWBg8Rs5STAGvQV2ArI5MG3KbpFrNSMxbx630Ars9d9j1ORsUS5v1biZRShZfg9180JuZAo=",
"master_key": "nHBk5DPexBjinXV8qHn7SEKzoxh2W92FxSbNTPgGtQYBzEF4msn9",
"seq": 1,
"status": "success"
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result" : {
"domain" : "mduo13.com",
"ephemeral_key" : "n9KnrcCmL5psyKtk2KWP6jy14Hj4EXuZDg7XMdQJ9cSDoFSp53hu",
"manifest" : "JAAAAAFxIe002KClGBUlRA7h5J2Y5B7Xdlxn1Z5OxY7ZC2UmqUIikHMhAkVIeB7McBf4NFsBceQQlScTVUWMdpYzwmvs115SUGDKdkcwRQIhAJnKfYWnPsBsATIIRfgkAAK+HE4zp8G8AmOPrHmLZpZAAiANiNECVQTKktoD7BEoEmS8jaFBNMgRdcG0dttPurCAGXcKbWR1bzEzLmNvbXASQPjO6wxOfhtWsJ6oMWBg8Rs5STAGvQV2ArI5MG3KbpFrNSMxbx630Ars9d9j1ORsUS5v1biZRShZfg9180JuZAo=",
"master_key" : "nHBk5DPexBjinXV8qHn7SEKzoxh2W92FxSbNTPgGtQYBzEF4msn9",
"seq" : 1,
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `domain` | String | _(May be omitted)_ The domain name associated with this validator, if one has been configured.
| `ephemeral_key` | String | _(May be omitted)_ The public key of the ephemeral key pair this server uses to sign validation messages, in [base58][]. This key changes if the validator's configured token changes. |
| `manifest` | String | _(May be omitted)_ The public "manifest" corresponding to this validator's configured token, [serialized to binary](serialization.html) and then encoded in base64. This field does not contain any private information. |
| `master_key` | String | The public key of this validator's master key pair, in [base58][]. This key uniquely identifies the validator and remains the same if the validator rotates ephemeral keys. If the server is configured using a `[validation_seed]` instead of a `[validator_token]`, this is the only field in the response. |
| `seq` | Number | _(May be omitted)_ A sequence number for this validator's configured validation token and settings. This number increases whenever the validator operator updates the validator's token to rotate ephemeral keys or change settings. |
For more information on validator tokens and key rotation, see the [validator-keys-tool Guide](https://github.com/ripple/validator-keys-tool/blob/master/doc/validator-keys-tool-guide.md).
### Possible Errors
- Any of the [universal error types][].
- `invalidParams` - The server returns this error with `"error_message" : "not a validator"` if the server is not [configured as a validator](run-rippled-as-a-validator.html).
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,144 @@
---
html: validator_list_sites.html
parent: status-and-debugging-methods.html
blurb: バリデータリストを処理するサイトのステータス情報を返します。
labels:
- ブロックチェーン
- コアサーバー
---
# validator_list_sites
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/ValidatorListSites.cpp "Source")
`validator_list_sites`コマンドは、バリデータリストを処理するサイトのステータス情報を返します。[新規: rippled 0.80.1][]
*`validator_list_sites`要求は、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。*
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 1,
"command": "validator_list_sites"
}
```
*JSON-RPC*
```json
{
"method": "validator_list_sites",
"params": [
{}
]
}
```
*コマンドライン*
```sh
#Syntax: validator_list_sites
rippled validator_list_sites
```
<!-- MULTICODE_BLOCK_END -->
要求にはパラメーターが含まれていません。
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id":5,
"status":"success",
"type":"response",
"result": {
"validator_sites": [
{
"last_refresh_status": "accepted",
"last_refresh_time": "2017-Oct-13 21:26:37",
"refresh_interval_min": 5,
"uri": "http://127.0.0.1:51447/validators"
}
]
}
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"status": "success",
"validator_sites": [
{
"last_refresh_status": "accepted",
"last_refresh_time": "2017-Oct-13 21:26:37",
"refresh_interval_min": 5,
"uri": "http://127.0.0.1:51447/validators"
}
]
}
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result": {
"status": "success",
"validator_sites": [
{
"last_refresh_status": "accepted",
"last_refresh_time": "2017-Oct-13 21:26:37",
"refresh_interval_min": 5,
"uri": "http://127.0.0.1:51447/validators"
}
]
}
}
```
<!-- MULTICODE_BLOCK_END -->
応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:------------------|:------|----------------------------------|
| `validator_sites` | 配列 | バリデータサイトオブジェクトからなる配列。 |
`validator_sites`フィールドの配列の各メンバーは、次のフィールドを有するオブジェクトです。
| `Field` | 型 | 説明 |
|:-----------------------|:-----------------|:--------------------------------|
| `last_refresh_status` | 文字列 | 存在する場合は、サイトの最終更新の[`ListDisposition`](https://github.com/ripple/rippled/blob/master/src/ripple/app/misc/ValidatorList.h)です。存在しない場合は、サイトに対するクエリーがまだ成功していません。 |
| `last_refresh_time` | 文字列 | サイトの最終照会時刻を人間が読み取れる形式で表示します。存在しない場合は、サイトに対するクエリーがまだ成功していません。 |
| `refresh_interval_min` | 符号なし整数 | 更新試行間隔の分数。 |
| `uri` | 文字列 | サイトのURI。 |
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,158 @@
---
html: validator_list_sites.html
parent: status-and-debugging-methods.html
blurb: Get information about sites that publish validator lists.
labels:
- Core Server
- Blockchain
---
# validator_list_sites
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/ValidatorListSites.cpp "Source")
The `validator_list_sites` command returns status information of sites serving validator lists. [New in: rippled 0.80.1][]
*The `validator_list_sites` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users!*
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 1,
"command": "validator_list_sites"
}
```
*JSON-RPC*
```json
{
"method": "validator_list_sites",
"params": [
{}
]
}
```
*Commandline*
```sh
#Syntax: validator_list_sites
rippled validator_list_sites
```
<!-- MULTICODE_BLOCK_END -->
The request includes no parameters.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id":5,
"status":"success",
"type":"response",
"result": {
"validator_sites": [
{
"last_refresh_status": "accepted",
"last_refresh_time": "2017-Oct-13 21:26:37",
"refresh_interval_min": 5,
"uri": "http://127.0.0.1:51447/validators"
}
]
}
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"status": "success",
"validator_sites": [
{
"last_refresh_status": "accepted",
"last_refresh_time": "2017-Oct-13 21:26:37",
"refresh_interval_min": 5,
"uri": "http://127.0.0.1:51447/validators"
}
]
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result": {
"status": "success",
"validator_sites": [
{
"last_refresh_status": "accepted",
"last_refresh_time": "2017-Oct-13 21:26:37",
"refresh_interval_min": 5,
"uri": "http://127.0.0.1:51447/validators"
}
]
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following field:
| `Field` | Type | Description |
|:------------------|:------|----------------------------------|
| `validator_sites` | Array | Array of validator site objects. |
Each member of the `validator_sites` field array is an object with the following fields:
| `Field` | Type | Description |
|:-----------------------|:-----------------|:--------------------------------|
| `last_refresh_status` | String | If present, shows the status of the most recent refresh of the site. If missing, the site has not yet been successfully queried. See **Site Status Values** below for possible states and their meanings. |
| `last_refresh_time` | String | Human readable time when the site was last queried. If missing, the site has not yet been successfully queried. |
| `refresh_interval_min` | Unsigned Integer | The number of minutes between refresh attempts. |
| `uri` | String | The URI of the site. |
#### Site Status Values
The `last_refresh_status` field can have the following values:
| Value | Meaning |
|:----------------------|:-----------------------------------------------------|
| `accepted` | The site provided a valid list, which your server is now using. |
| `same_sequence` | The site provided a list with the same sequence number as your existing list, so your server continued using its existing list. |
| `unsupported_version` | The site provided a list, but your server does not support the list format version number in the list. You might need to [update `rippled`](install-rippled.html) to a newer software version. |
| `untrusted` | The site provided a list from the site that is signed by a cryptographic key pair your server is not configured to trust. You may want to check for typos in your `validators.txt` file and check to see if the list publisher changed their cryptographic keys. |
| `stale` | The site provided a list with a lower sequence number than the list your server is already using. |
| `invalid` | The site provided a list or signature that was not validly formed. |
### Possible Errors
- Any of the [universal error types][].
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,192 @@
---
html: validators.html
parent: status-and-debugging-methods.html
blurb: サーバーが使用する公開済みの信頼できるバリデータの最新リストに関する情報を返します。
labels:
- ブロックチェーン
- コアサーバー
---
# validators
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Validators.cpp "Source")
`validators`コマンドは、サーバーが使用する公開済みの信頼できるバリデータの最新リストに関する情報を、人間が読み取れる形式で返します。[新規: rippled 0.80.1][]
*`validators`要求は、権限のないユーザーは実行できない[管理メソッド](admin-api-methods.html)です。*
### 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 1,
"command": "validators"
}
```
*JSON-RPC*
```json
{
"method": "validators",
"params": [
{}
]
}
```
*コマンドライン*
```sh
#Syntax: validators
rippled validators
```
<!-- MULTICODE_BLOCK_END -->
要求にはパラメーターが含まれていません。
### 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id":5,
"status":"success",
"type":"response",
"result":{
"local_static_keys": [],
"publisher_lists":[
{
"available":true,
"expiration":"2017-Oct-13 14:56:00",
"list":[
"nHBtBkHGfL4NpB54H1AwBaaSJkSJLUSPvnUNAcuNpuffYB51VjH6",
"nHBe4vqSAzjpPRLKwSFzRFtmvzXaf5wPPmuVrQCAoJoS1zskgDA4"
],
"pubkey_publisher":"ED58ED4AA543B524F16771F6E1367BAA220D99DCF22CD8CF7A11309E9EAB1B647B",
"seq":1,
"version":1
}
],
"signing_keys":{},
"status":"success",
"trusted_validator_keys":[
"nHBe4vqSAzjpPRLKwSFzRFtmvzXaf5wPPmuVrQCAoJoS1zskgDA4",
"nHBtBkHGfL4NpB54H1AwBaaSJkSJLUSPvnUNAcuNpuffYB51VjH6"
],
"validation_quorum":2,
"validator_list_expires":"2017-Oct-13 14:56:00"
}
}
```
*JSON-RPC*
```json
200 OK
{
"result":{
"local_static_keys": [],
"publisher_lists":[
{
"available":true,
"expiration":"2017-Oct-13 14:56:00",
"list":[
"nHBtBkHGfL4NpB54H1AwBaaSJkSJLUSPvnUNAcuNpuffYB51VjH6",
"nHBe4vqSAzjpPRLKwSFzRFtmvzXaf5wPPmuVrQCAoJoS1zskgDA4"
],
"pubkey_publisher":"ED58ED4AA543B524F16771F6E1367BAA220D99DCF22CD8CF7A11309E9EAB1B647B",
"seq":1,
"version":1
}
],
"signing_keys":{},
"status":"success",
"trusted_validator_keys":[
"nHBe4vqSAzjpPRLKwSFzRFtmvzXaf5wPPmuVrQCAoJoS1zskgDA4",
"nHBtBkHGfL4NpB54H1AwBaaSJkSJLUSPvnUNAcuNpuffYB51VjH6"
],
"validation_quorum":2,
"validator_list_expires":"2017-Oct-13 14:56:00"
},
"status":"success"
}
```
*コマンドライン*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result":{
"local_static_keys": [],
"publisher_lists":[
{
"available":true,
"expiration":"2017-Oct-13 14:56:00",
"list":[
"nHBtBkHGfL4NpB54H1AwBaaSJkSJLUSPvnUNAcuNpuffYB51VjH6",
"nHBe4vqSAzjpPRLKwSFzRFtmvzXaf5wPPmuVrQCAoJoS1zskgDA4"
],
"pubkey_publisher":"ED58ED4AA543B524F16771F6E1367BAA220D99DCF22CD8CF7A11309E9EAB1B647B",
"seq":1,
"version":1
}
],
"signing_keys":{},
"status":"success",
"trusted_validator_keys":[
"nHBe4vqSAzjpPRLKwSFzRFtmvzXaf5wPPmuVrQCAoJoS1zskgDA4",
"nHBtBkHGfL4NpB54H1AwBaaSJkSJLUSPvnUNAcuNpuffYB51VjH6"
],
"validation_quorum":2,
"validator_list_expires":"2017-Oct-13 14:56:00"
},
"status":"success"
}
```
<!-- MULTICODE_BLOCK_END -->
応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:-------------------------|:-------|:-----------------------------------------|
| `listed_static_keys` | 配列 | 信頼リストに常に追加可能なバリデータの公開鍵の配列。 |
| `publisher_lists` | 配列 | パブリッシャーリストオブジェクトの配列。 |
| `signing_keys` | オブジェクト | バリデータマニフェストを使用している登録済みバリデータのマスター公開鍵から、現在の署名キーへのマッピング。 |
| `trusted_validator_keys` | 配列 | 現在信頼されているバリデータの公開鍵の配列。 |
| `validation_quorum` | 数値 | 1つのレジャーバージョンの検証に最低限必要となる信頼できる検証の数。状況によっては、サーバーがさらに検証を要求する場合があります。 |
| `validator_list_expires` | 文字列 | 人間が読み取れる形式での現在のバリデータリストの有効期限、文字列`unknown`(サーバーが公開済みバリデータリストを読み込む必要がある場合)、または文字列`never`(サーバーが静的なバリデータリストを使用している場合)のいずれか。 |
`publisher_lists`配列の各メンバーは、以下のフィールドを有するオブジェクトです。
| `Field` | 型 | 説明 |
|:-------------------|:-----------------|:-------------------------------------|
| `available` | ブール値 | `false`の場合、`list`内のバリデータキーはこのパブリッシャーによりサポートされていない可能性があります。 |
| `expiration` | 文字列 | この公開済みリストの有効期限を人間が読み取れる形式で示します。 |
| `list` | 配列 | 公開済みバリデータキーからなる配列。 |
| `pubkey_publisher` | 文字列 | リストパブリッシャーのEd25519またはECDSA公開鍵16進数。 |
| `seq` | 符号なし整数 | 公開済みリストのシーケンス番号。 |
| `version` | 符号なし整数 | リストフォーマットのバージョン。 |
### 考えられるエラー
* [汎用エラータイプ][]のすべて。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,508 @@
---
html: validators.html
parent: status-and-debugging-methods.html
blurb: Get information about the current validators.
labels:
- Core Server
- Blockchain
---
# validators
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Validators.cpp "Source")
The `validators` command returns human readable information about the current list of published and [trusted validators](intro-to-consensus.html#trust-based-validation) used by the server. [New in: rippled 0.80.1][]
*The `validators` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users!*
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "validators_example",
"command": "validators"
}
```
*JSON-RPC*
```json
{
"method": "validators",
"params": [
{}
]
}
```
*Commandline*
```sh
#Syntax: validators
rippled validators
```
<!-- MULTICODE_BLOCK_END -->
The request includes no parameters.
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "validators_example",
"result": {
"local_static_keys": [],
"publisher_lists": [
{
"available": true,
"expiration": "2022-Jun-01 00:00:00.000000000 UTC",
"list": [
"nHBdXSF6YHAHSZUk7rvox6jwbvvyqBnsWGcewBtq8x1XuH6KXKXr",
"nHBgiH2aih5JoaL3wbiiqSQfhrC21vJjxXoCoD2fuqcNbriXsfLm",
"nHB8QMKGt9VB4Vg71VszjBVQnDW3v3QudM4DwFaJfy96bj4Pv9fA",
"nHBidG3pZK11zQD6kpNDoAhDxH6WLGui6ZxSbUx7LSqLHsgzMPec",
"nHBtDzdRDykxiuv7uSMPTcGexNm879RUUz5GW4h1qgjbtyvWZ1LE",
"nHUryiyDqEtyWVtFG24AAhaYjMf9FRLietbGzviF3piJsMm9qyDR",
"nHUpJSKQTZdB1TDkbCREMuf8vEqFkk84BcvZDhsQsDufFDQVajam",
"nHUpcmNsxAw47yt2ADDoNoQrzLyTJPgnyq16u6Qx2kRPA17oUNHz",
"nHUnhRJK3csknycNK5SXRFi8jvDp3sKoWvS9wKWLq1ATBBGgPBjp",
"nHU95JxeaHJoSdpE7R49Mxp4611Yk5yL9SGEc12UDJLr4oEUN4NT",
"nHUUrjuEMtvzzTsiW2xKinUt7Jd83QFqYgfy3Feb7Hq1EJyoxoSz",
"nHUED59jjpQ5QbNhesXMhqii9gA8UfbBmv3i5StgyxG98qjsT4yn",
"nHULqGBkJtWeNFjhTzYeAsHA3qKKS7HoBh8CV3BAGTGMZuepEhWC",
"nHUT6Xa588zawXVdP2xyYXc87LQFm8uV38CxsVzq2RoQJP8LXpJF",
"nHUVPzAmAmQ2QSc4oE1iLfsGi17qN2ado8PhxvgEkou76FLxAz7C",
"nHUXeusfwk61c4xJPneb9Lgy7Ga6DVaVLEyB29ftUdt9k2KxD6Hw",
"nHUY14bKLLm72ukzo2t6AVnQiu4bCd1jkimwWyJk3txvLeGhvro5",
"nHU2Y1mLGDvTbc2dpvpkQ16qdeTKv2aJwGJHFySSB9U3jkTmj4CA",
"nHU2k8Po4dgygiQUG8wAADMk9RqkrActeKwsaC9MdtJ9KBvcpVji",
"nHUbgDd63HiuP68VRWazKwZRzS61N37K3NbfQaZLhSQ24LGGmjtn",
"nHUcNC5ni7XjVYfCMe38Rm3KQaq27jw7wJpcUYdo4miWwpNePRTw",
"nHUcQnmEbCNq4uhntFudzfrZV8P5WLoBrR5h3R9jAd621Aaz1pSy",
"nHUdjQgg33FRu88GQDtzLWRw95xKnBurUZcqPpe3qC9XVeBNrHeJ",
"nHUd8g4DWm6HgjGTjKKSfYiRyf8qCvEN1PXR7YDJ5QTFyAnZHkbW",
"nHUon2tpyJEHHYGmxqeGu37cvPYHzrMtUNQFVdCgGNvEkjmCpTqK",
"nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p",
"nHUFCyRCrUjvtZmKiLeF8ReopzKuUoKeDeXo3wEUBVSaawzcSBpW",
"nHUq9tJvSyoXQKhRytuWeydpPjvTz3M9GfUpEqfsg9xsewM7KkkK",
"nHUtmbn4ALrdU6U8pmd8AMt4qKTdZTbYJ3u1LHyAzXga3Zuopv5Y",
"nHUvcCcmoH1FJMMC6NtF9KKA4LpCWhjsxk2reCQidsp5AHQ7QY9H",
"nHUvzia57LRXr9zqnYpyFUFeKvis2tqn4DkXBVGSppt5M4nNq43C",
"nHDwHQGjKTz6R6pFigSSrNBrhNYyUGFPHA75HiTccTCQzuu9d7Za",
"nHDB2PAPYqF86j9j3c6w1F1ZqwvQfiWcFShZ9Pokg9q4ohNDSkAz",
"nHDH7bQJpVfDhVSqdui3Z8GPvKEBQpo6AKHcnXe21zoD4nABA6xj"
],
"pubkey_publisher": "ED2677ABFFD1B33AC6FBC3062B71F1E8397C1505E1C42C64D11AD1B28FF73F4734",
"seq": 70,
"uri": "https://vl.ripple.com",
"version": 1
}
],
"signing_keys": {
"nHB8QMKGt9VB4Vg71VszjBVQnDW3v3QudM4DwFaJfy96bj4Pv9fA": "n9KeTQ3UyMtaJJD78vT7QiGRMv1GcWHEnhNbwKfdbW2HfRqtvUUt",
"nHBdXSF6YHAHSZUk7rvox6jwbvvyqBnsWGcewBtq8x1XuH6KXKXr": "n9MfeCuZK2ra5eJtFDtuCTnvxfsi85k4J3GXJ1TvRVr2o4EQeHMF",
"nHBgiH2aih5JoaL3wbiiqSQfhrC21vJjxXoCoD2fuqcNbriXsfLm": "n9KhsMP6jKFQPpjJ9VwqyZSwrL4shdX9YknRwmsAVL1RNVrx4jLm",
"nHBidG3pZK11zQD6kpNDoAhDxH6WLGui6ZxSbUx7LSqLHsgzMPec": "n9KaxgJv69FucW5kkiaMhCqS6sAR1wUVxpZaZmLGVXxAcAse9YhR",
"nHBk5DPexBjinXV8qHn7SEKzoxh2W92FxSbNTPgGtQYBzEF4msn9": "n9KnrcCmL5psyKtk2KWP6jy14Hj4EXuZDg7XMdQJ9cSDoFSp53hu",
"nHBtDzdRDykxiuv7uSMPTcGexNm879RUUz5GW4h1qgjbtyvWZ1LE": "n9LCf7NtwcyXVc5fYB6UVByRoQZqJDhrMUoKnr3GQB6mFqpcmMzg",
"nHDB2PAPYqF86j9j3c6w1F1ZqwvQfiWcFShZ9Pokg9q4ohNDSkAz": "n9Jk38y9XCznqiLq53UjREJQbZWnz4Pvmph55GP5ofUPg3RG8eVr",
"nHDH7bQJpVfDhVSqdui3Z8GPvKEBQpo6AKHcnXe21zoD4nABA6xj": "n9MSTcx1fmfyKpaDTtpXucugcqM7yxpaggmwRxcyA3Nr4pE1pN3x",
"nHDwHQGjKTz6R6pFigSSrNBrhNYyUGFPHA75HiTccTCQzuu9d7Za": "n9Kb81J9kqGgYkrNDRSPT3UCgz8Bei1CPHGMt85yxz9mUSvuzV5k",
"nHU2Y1mLGDvTbc2dpvpkQ16qdeTKv2aJwGJHFySSB9U3jkTmj4CA": "n9K2FpCqZftM1xXXaWXFPVbEimLX6MEjrmQywfSutkdK1PRvqDb2",
"nHU2k8Po4dgygiQUG8wAADMk9RqkrActeKwsaC9MdtJ9KBvcpVji": "n9MhLZsK7Av6ny2gV5SAGLDsnFXE9p85aYR8diD8xvuvuucqad85",
"nHU95JxeaHJoSdpE7R49Mxp4611Yk5yL9SGEc12UDJLr4oEUN4NT": "n9JtY9MqUcwKWenHp8WoRobFRmB2mmBEJd1ruJmhKGKAwtFQkQjb",
"nHUED59jjpQ5QbNhesXMhqii9gA8UfbBmv3i5StgyxG98qjsT4yn": "n9Km4Xz53K9kcTaVn3mYAHsXqNuAo7A2HazSr34SFufvNwBxYGLn",
"nHUFCyRCrUjvtZmKiLeF8ReopzKuUoKeDeXo3wEUBVSaawzcSBpW": "n9Lqr4YZxk7WYRDTBZjjmoAraikLCjAgAswaPaZ6LaGW6Q4Y2eoo",
"nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p": "n9LMfcjE6dMyshCqiftLFXpB9K3Mnd2r5bG7K8osmrkFpHUoR3c1",
"nHULqGBkJtWeNFjhTzYeAsHA3qKKS7HoBh8CV3BAGTGMZuepEhWC": "n9MZ7EVGKypqdyNguP31xSqhFqDBF4V5FESLMmLiGrBJ3khP2AzQ",
"nHUT6Xa588zawXVdP2xyYXc87LQFm8uV38CxsVzq2RoQJP8LXpJF": "n9Lq9bekeVhCsW8dwqzfvKsqUiu9Qxvwk9YmF2hxkBJjNrGNL5Fw",
"nHUUrjuEMtvzzTsiW2xKinUt7Jd83QFqYgfy3Feb7Hq1EJyoxoSz": "n9LLqqH1cVFPjEnQYFQ6DooxuhHPQxwXgMjDGrpJ6pb1WGDoi76Q",
"nHUVPzAmAmQ2QSc4oE1iLfsGi17qN2ado8PhxvgEkou76FLxAz7C": "n9J1GJHtua77TBEzir3FvsgWX68xBFeC8os3s5TkCg97E1cwxKfH",
"nHUXeusfwk61c4xJPneb9Lgy7Ga6DVaVLEyB29ftUdt9k2KxD6Hw": "n9McDrz9tPujrQK3vMXJXzuEJv1B8UG3opfZEsFA8t6QxdZh1H6m",
"nHUY14bKLLm72ukzo2t6AVnQiu4bCd1jkimwWyJk3txvLeGhvro5": "n9M2UqXLK25h9YEQTskmCXbWPGhQmB1pFVqeXia38UwLaL838VbG",
"nHUbgDd63HiuP68VRWazKwZRzS61N37K3NbfQaZLhSQ24LGGmjtn": "n9LkAv98aaGupypuLMH5ogjJ3rTEX178s9EnmRvmySL9k3cVuxTu",
"nHUcNC5ni7XjVYfCMe38Rm3KQaq27jw7wJpcUYdo4miWwpNePRTw": "n9L3GcKLGWoz79RPfYq9GjEVyh57vpe1wM45i2tdczJ9u15ajAFB",
"nHUcQnmEbCNq4uhntFudzfrZV8P5WLoBrR5h3R9jAd621Aaz1pSy": "n9KVcHedX11X6vCFNaZSGT2pUdbnd8PUpNGYP6BPutvYxQQy8DKo",
"nHUd8g4DWm6HgjGTjKKSfYiRyf8qCvEN1PXR7YDJ5QTFyAnZHkbW": "n9KSXAVPy6ac8aX88fRsJN6eSrJ2gEfGrfskUVJJ7XkopGsKNg9X",
"nHUdjQgg33FRu88GQDtzLWRw95xKnBurUZcqPpe3qC9XVeBNrHeJ": "n94RkpbJYRYQrWUmL8PAVQ1XTVKtfyKkLm8C6SWzWPcKEbuNb6EV",
"nHUnhRJK3csknycNK5SXRFi8jvDp3sKoWvS9wKWLq1ATBBGgPBjp": "n9LbDLg9F7ExZCeMw1QZqsd1Ejs9uYpwd8bPUStF5hBJdd6B5aWj",
"nHUon2tpyJEHHYGmxqeGu37cvPYHzrMtUNQFVdCgGNvEkjmCpTqK": "n9JebyUXwBa5GoYJQ6AbupoMKyE2zaiR3FTfDTMkxpMMv1KPmQEn",
"nHUpJSKQTZdB1TDkbCREMuf8vEqFkk84BcvZDhsQsDufFDQVajam": "n9LFSE8fQ6Ljnc97ToHVtv1sYZ3GpzrXKpT94eFDk8jtdbfoBe7N",
"nHUpcmNsxAw47yt2ADDoNoQrzLyTJPgnyq16u6Qx2kRPA17oUNHz": "n9Ls4GcrofTvLvymKh1wCqxw1aLzXUumyBBD9fAtbkk9WtdQ4TUH",
"nHUq9tJvSyoXQKhRytuWeydpPjvTz3M9GfUpEqfsg9xsewM7KkkK": "n943ozDG74swHRmAjzY6A4KVFBhEirF4Sh1ACqvDePE3CZTgkMqn",
"nHUryiyDqEtyWVtFG24AAhaYjMf9FRLietbGzviF3piJsMm9qyDR": "n9KAE7DUEB62ZQ3yWzygKWWqsj7ZqchW5rXg63puZA46k7WzGfQu",
"nHUtmbn4ALrdU6U8pmd8AMt4qKTdZTbYJ3u1LHyAzXga3Zuopv5Y": "n9JkSnNqXxEct1t78dwVZDjq7PsznXtukxjyGvGJr4TdwVSbd7DJ",
"nHUvcCcmoH1FJMMC6NtF9KKA4LpCWhjsxk2reCQidsp5AHQ7QY9H": "n9KQ2DVL7QhgovChk81W8idxm7wDsYzXutDMQzwUBKuxb9WTWBVG",
"nHUvzia57LRXr9zqnYpyFUFeKvis2tqn4DkXBVGSppt5M4nNq43C": "n9KY4JZY11ndNbg55dThnoQdU9dii5q3egzoESVXw4Z7hu3maCba"
},
"trusted_validator_keys": [
"nHUFCyRCrUjvtZmKiLeF8ReopzKuUoKeDeXo3wEUBVSaawzcSBpW",
"nHUd8g4DWm6HgjGTjKKSfYiRyf8qCvEN1PXR7YDJ5QTFyAnZHkbW",
"nHUUrjuEMtvzzTsiW2xKinUt7Jd83QFqYgfy3Feb7Hq1EJyoxoSz",
"nHUcQnmEbCNq4uhntFudzfrZV8P5WLoBrR5h3R9jAd621Aaz1pSy",
"nHBtDzdRDykxiuv7uSMPTcGexNm879RUUz5GW4h1qgjbtyvWZ1LE",
"nHDH7bQJpVfDhVSqdui3Z8GPvKEBQpo6AKHcnXe21zoD4nABA6xj",
"nHBidG3pZK11zQD6kpNDoAhDxH6WLGui6ZxSbUx7LSqLHsgzMPec",
"nHUon2tpyJEHHYGmxqeGu37cvPYHzrMtUNQFVdCgGNvEkjmCpTqK",
"nHUtmbn4ALrdU6U8pmd8AMt4qKTdZTbYJ3u1LHyAzXga3Zuopv5Y",
"nHUryiyDqEtyWVtFG24AAhaYjMf9FRLietbGzviF3piJsMm9qyDR",
"nHDwHQGjKTz6R6pFigSSrNBrhNYyUGFPHA75HiTccTCQzuu9d7Za",
"nHUED59jjpQ5QbNhesXMhqii9gA8UfbBmv3i5StgyxG98qjsT4yn",
"nHU2k8Po4dgygiQUG8wAADMk9RqkrActeKwsaC9MdtJ9KBvcpVji",
"nHUq9tJvSyoXQKhRytuWeydpPjvTz3M9GfUpEqfsg9xsewM7KkkK",
"nHUbgDd63HiuP68VRWazKwZRzS61N37K3NbfQaZLhSQ24LGGmjtn",
"nHUT6Xa588zawXVdP2xyYXc87LQFm8uV38CxsVzq2RoQJP8LXpJF",
"nHUpcmNsxAw47yt2ADDoNoQrzLyTJPgnyq16u6Qx2kRPA17oUNHz",
"nHUvcCcmoH1FJMMC6NtF9KKA4LpCWhjsxk2reCQidsp5AHQ7QY9H",
"nHUvzia57LRXr9zqnYpyFUFeKvis2tqn4DkXBVGSppt5M4nNq43C",
"nHDB2PAPYqF86j9j3c6w1F1ZqwvQfiWcFShZ9Pokg9q4ohNDSkAz",
"nHBk5DPexBjinXV8qHn7SEKzoxh2W92FxSbNTPgGtQYBzEF4msn9",
"nHBgiH2aih5JoaL3wbiiqSQfhrC21vJjxXoCoD2fuqcNbriXsfLm",
"nHU95JxeaHJoSdpE7R49Mxp4611Yk5yL9SGEc12UDJLr4oEUN4NT",
"nHBdXSF6YHAHSZUk7rvox6jwbvvyqBnsWGcewBtq8x1XuH6KXKXr",
"nHUVPzAmAmQ2QSc4oE1iLfsGi17qN2ado8PhxvgEkou76FLxAz7C",
"nHB8QMKGt9VB4Vg71VszjBVQnDW3v3QudM4DwFaJfy96bj4Pv9fA",
"nHUcNC5ni7XjVYfCMe38Rm3KQaq27jw7wJpcUYdo4miWwpNePRTw",
"nHULqGBkJtWeNFjhTzYeAsHA3qKKS7HoBh8CV3BAGTGMZuepEhWC",
"nHUXeusfwk61c4xJPneb9Lgy7Ga6DVaVLEyB29ftUdt9k2KxD6Hw",
"nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p",
"nHUnhRJK3csknycNK5SXRFi8jvDp3sKoWvS9wKWLq1ATBBGgPBjp",
"nHUY14bKLLm72ukzo2t6AVnQiu4bCd1jkimwWyJk3txvLeGhvro5",
"nHUdjQgg33FRu88GQDtzLWRw95xKnBurUZcqPpe3qC9XVeBNrHeJ",
"nHUpJSKQTZdB1TDkbCREMuf8vEqFkk84BcvZDhsQsDufFDQVajam",
"nHU2Y1mLGDvTbc2dpvpkQ16qdeTKv2aJwGJHFySSB9U3jkTmj4CA"
],
"validation_quorum": 28,
"validator_list": {
"count": 1,
"expiration": "2022-Jun-01 00:00:00.000000000 UTC",
"status": "active"
}
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"local_static_keys": [],
"publisher_lists": [
{
"available": true,
"expiration": "2022-Jun-01 00:00:00.000000000 UTC",
"list": [
"nHBdXSF6YHAHSZUk7rvox6jwbvvyqBnsWGcewBtq8x1XuH6KXKXr",
"nHBgiH2aih5JoaL3wbiiqSQfhrC21vJjxXoCoD2fuqcNbriXsfLm",
"nHB8QMKGt9VB4Vg71VszjBVQnDW3v3QudM4DwFaJfy96bj4Pv9fA",
"nHBidG3pZK11zQD6kpNDoAhDxH6WLGui6ZxSbUx7LSqLHsgzMPec",
"nHBtDzdRDykxiuv7uSMPTcGexNm879RUUz5GW4h1qgjbtyvWZ1LE",
"nHUryiyDqEtyWVtFG24AAhaYjMf9FRLietbGzviF3piJsMm9qyDR",
"nHUpJSKQTZdB1TDkbCREMuf8vEqFkk84BcvZDhsQsDufFDQVajam",
"nHUpcmNsxAw47yt2ADDoNoQrzLyTJPgnyq16u6Qx2kRPA17oUNHz",
"nHUnhRJK3csknycNK5SXRFi8jvDp3sKoWvS9wKWLq1ATBBGgPBjp",
"nHU95JxeaHJoSdpE7R49Mxp4611Yk5yL9SGEc12UDJLr4oEUN4NT",
"nHUUrjuEMtvzzTsiW2xKinUt7Jd83QFqYgfy3Feb7Hq1EJyoxoSz",
"nHUED59jjpQ5QbNhesXMhqii9gA8UfbBmv3i5StgyxG98qjsT4yn",
"nHULqGBkJtWeNFjhTzYeAsHA3qKKS7HoBh8CV3BAGTGMZuepEhWC",
"nHUT6Xa588zawXVdP2xyYXc87LQFm8uV38CxsVzq2RoQJP8LXpJF",
"nHUVPzAmAmQ2QSc4oE1iLfsGi17qN2ado8PhxvgEkou76FLxAz7C",
"nHUXeusfwk61c4xJPneb9Lgy7Ga6DVaVLEyB29ftUdt9k2KxD6Hw",
"nHUY14bKLLm72ukzo2t6AVnQiu4bCd1jkimwWyJk3txvLeGhvro5",
"nHU2Y1mLGDvTbc2dpvpkQ16qdeTKv2aJwGJHFySSB9U3jkTmj4CA",
"nHU2k8Po4dgygiQUG8wAADMk9RqkrActeKwsaC9MdtJ9KBvcpVji",
"nHUbgDd63HiuP68VRWazKwZRzS61N37K3NbfQaZLhSQ24LGGmjtn",
"nHUcNC5ni7XjVYfCMe38Rm3KQaq27jw7wJpcUYdo4miWwpNePRTw",
"nHUcQnmEbCNq4uhntFudzfrZV8P5WLoBrR5h3R9jAd621Aaz1pSy",
"nHUdjQgg33FRu88GQDtzLWRw95xKnBurUZcqPpe3qC9XVeBNrHeJ",
"nHUd8g4DWm6HgjGTjKKSfYiRyf8qCvEN1PXR7YDJ5QTFyAnZHkbW",
"nHUon2tpyJEHHYGmxqeGu37cvPYHzrMtUNQFVdCgGNvEkjmCpTqK",
"nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p",
"nHUFCyRCrUjvtZmKiLeF8ReopzKuUoKeDeXo3wEUBVSaawzcSBpW",
"nHUq9tJvSyoXQKhRytuWeydpPjvTz3M9GfUpEqfsg9xsewM7KkkK",
"nHUtmbn4ALrdU6U8pmd8AMt4qKTdZTbYJ3u1LHyAzXga3Zuopv5Y",
"nHUvcCcmoH1FJMMC6NtF9KKA4LpCWhjsxk2reCQidsp5AHQ7QY9H",
"nHUvzia57LRXr9zqnYpyFUFeKvis2tqn4DkXBVGSppt5M4nNq43C",
"nHDwHQGjKTz6R6pFigSSrNBrhNYyUGFPHA75HiTccTCQzuu9d7Za",
"nHDB2PAPYqF86j9j3c6w1F1ZqwvQfiWcFShZ9Pokg9q4ohNDSkAz",
"nHDH7bQJpVfDhVSqdui3Z8GPvKEBQpo6AKHcnXe21zoD4nABA6xj"
],
"pubkey_publisher": "ED2677ABFFD1B33AC6FBC3062B71F1E8397C1505E1C42C64D11AD1B28FF73F4734",
"seq": 70,
"uri": "https://vl.ripple.com",
"version": 1
}
],
"signing_keys": {
"nHB8QMKGt9VB4Vg71VszjBVQnDW3v3QudM4DwFaJfy96bj4Pv9fA": "n9KeTQ3UyMtaJJD78vT7QiGRMv1GcWHEnhNbwKfdbW2HfRqtvUUt",
"nHBdXSF6YHAHSZUk7rvox6jwbvvyqBnsWGcewBtq8x1XuH6KXKXr": "n9MfeCuZK2ra5eJtFDtuCTnvxfsi85k4J3GXJ1TvRVr2o4EQeHMF",
"nHBgiH2aih5JoaL3wbiiqSQfhrC21vJjxXoCoD2fuqcNbriXsfLm": "n9KhsMP6jKFQPpjJ9VwqyZSwrL4shdX9YknRwmsAVL1RNVrx4jLm",
"nHBidG3pZK11zQD6kpNDoAhDxH6WLGui6ZxSbUx7LSqLHsgzMPec": "n9KaxgJv69FucW5kkiaMhCqS6sAR1wUVxpZaZmLGVXxAcAse9YhR",
"nHBk5DPexBjinXV8qHn7SEKzoxh2W92FxSbNTPgGtQYBzEF4msn9": "n9KnrcCmL5psyKtk2KWP6jy14Hj4EXuZDg7XMdQJ9cSDoFSp53hu",
"nHBtDzdRDykxiuv7uSMPTcGexNm879RUUz5GW4h1qgjbtyvWZ1LE": "n9LCf7NtwcyXVc5fYB6UVByRoQZqJDhrMUoKnr3GQB6mFqpcmMzg",
"nHDB2PAPYqF86j9j3c6w1F1ZqwvQfiWcFShZ9Pokg9q4ohNDSkAz": "n9Jk38y9XCznqiLq53UjREJQbZWnz4Pvmph55GP5ofUPg3RG8eVr",
"nHDH7bQJpVfDhVSqdui3Z8GPvKEBQpo6AKHcnXe21zoD4nABA6xj": "n9MSTcx1fmfyKpaDTtpXucugcqM7yxpaggmwRxcyA3Nr4pE1pN3x",
"nHDwHQGjKTz6R6pFigSSrNBrhNYyUGFPHA75HiTccTCQzuu9d7Za": "n9Kb81J9kqGgYkrNDRSPT3UCgz8Bei1CPHGMt85yxz9mUSvuzV5k",
"nHU2Y1mLGDvTbc2dpvpkQ16qdeTKv2aJwGJHFySSB9U3jkTmj4CA": "n9K2FpCqZftM1xXXaWXFPVbEimLX6MEjrmQywfSutkdK1PRvqDb2",
"nHU2k8Po4dgygiQUG8wAADMk9RqkrActeKwsaC9MdtJ9KBvcpVji": "n9MhLZsK7Av6ny2gV5SAGLDsnFXE9p85aYR8diD8xvuvuucqad85",
"nHU95JxeaHJoSdpE7R49Mxp4611Yk5yL9SGEc12UDJLr4oEUN4NT": "n9JtY9MqUcwKWenHp8WoRobFRmB2mmBEJd1ruJmhKGKAwtFQkQjb",
"nHUED59jjpQ5QbNhesXMhqii9gA8UfbBmv3i5StgyxG98qjsT4yn": "n9Km4Xz53K9kcTaVn3mYAHsXqNuAo7A2HazSr34SFufvNwBxYGLn",
"nHUFCyRCrUjvtZmKiLeF8ReopzKuUoKeDeXo3wEUBVSaawzcSBpW": "n9Lqr4YZxk7WYRDTBZjjmoAraikLCjAgAswaPaZ6LaGW6Q4Y2eoo",
"nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p": "n9LMfcjE6dMyshCqiftLFXpB9K3Mnd2r5bG7K8osmrkFpHUoR3c1",
"nHULqGBkJtWeNFjhTzYeAsHA3qKKS7HoBh8CV3BAGTGMZuepEhWC": "n9MZ7EVGKypqdyNguP31xSqhFqDBF4V5FESLMmLiGrBJ3khP2AzQ",
"nHUT6Xa588zawXVdP2xyYXc87LQFm8uV38CxsVzq2RoQJP8LXpJF": "n9Lq9bekeVhCsW8dwqzfvKsqUiu9Qxvwk9YmF2hxkBJjNrGNL5Fw",
"nHUUrjuEMtvzzTsiW2xKinUt7Jd83QFqYgfy3Feb7Hq1EJyoxoSz": "n9LLqqH1cVFPjEnQYFQ6DooxuhHPQxwXgMjDGrpJ6pb1WGDoi76Q",
"nHUVPzAmAmQ2QSc4oE1iLfsGi17qN2ado8PhxvgEkou76FLxAz7C": "n9J1GJHtua77TBEzir3FvsgWX68xBFeC8os3s5TkCg97E1cwxKfH",
"nHUXeusfwk61c4xJPneb9Lgy7Ga6DVaVLEyB29ftUdt9k2KxD6Hw": "n9McDrz9tPujrQK3vMXJXzuEJv1B8UG3opfZEsFA8t6QxdZh1H6m",
"nHUY14bKLLm72ukzo2t6AVnQiu4bCd1jkimwWyJk3txvLeGhvro5": "n9M2UqXLK25h9YEQTskmCXbWPGhQmB1pFVqeXia38UwLaL838VbG",
"nHUbgDd63HiuP68VRWazKwZRzS61N37K3NbfQaZLhSQ24LGGmjtn": "n9LkAv98aaGupypuLMH5ogjJ3rTEX178s9EnmRvmySL9k3cVuxTu",
"nHUcNC5ni7XjVYfCMe38Rm3KQaq27jw7wJpcUYdo4miWwpNePRTw": "n9L3GcKLGWoz79RPfYq9GjEVyh57vpe1wM45i2tdczJ9u15ajAFB",
"nHUcQnmEbCNq4uhntFudzfrZV8P5WLoBrR5h3R9jAd621Aaz1pSy": "n9KVcHedX11X6vCFNaZSGT2pUdbnd8PUpNGYP6BPutvYxQQy8DKo",
"nHUd8g4DWm6HgjGTjKKSfYiRyf8qCvEN1PXR7YDJ5QTFyAnZHkbW": "n9KSXAVPy6ac8aX88fRsJN6eSrJ2gEfGrfskUVJJ7XkopGsKNg9X",
"nHUdjQgg33FRu88GQDtzLWRw95xKnBurUZcqPpe3qC9XVeBNrHeJ": "n94RkpbJYRYQrWUmL8PAVQ1XTVKtfyKkLm8C6SWzWPcKEbuNb6EV",
"nHUnhRJK3csknycNK5SXRFi8jvDp3sKoWvS9wKWLq1ATBBGgPBjp": "n9LbDLg9F7ExZCeMw1QZqsd1Ejs9uYpwd8bPUStF5hBJdd6B5aWj",
"nHUon2tpyJEHHYGmxqeGu37cvPYHzrMtUNQFVdCgGNvEkjmCpTqK": "n9JebyUXwBa5GoYJQ6AbupoMKyE2zaiR3FTfDTMkxpMMv1KPmQEn",
"nHUpJSKQTZdB1TDkbCREMuf8vEqFkk84BcvZDhsQsDufFDQVajam": "n9LFSE8fQ6Ljnc97ToHVtv1sYZ3GpzrXKpT94eFDk8jtdbfoBe7N",
"nHUpcmNsxAw47yt2ADDoNoQrzLyTJPgnyq16u6Qx2kRPA17oUNHz": "n9Ls4GcrofTvLvymKh1wCqxw1aLzXUumyBBD9fAtbkk9WtdQ4TUH",
"nHUq9tJvSyoXQKhRytuWeydpPjvTz3M9GfUpEqfsg9xsewM7KkkK": "n943ozDG74swHRmAjzY6A4KVFBhEirF4Sh1ACqvDePE3CZTgkMqn",
"nHUryiyDqEtyWVtFG24AAhaYjMf9FRLietbGzviF3piJsMm9qyDR": "n9KAE7DUEB62ZQ3yWzygKWWqsj7ZqchW5rXg63puZA46k7WzGfQu",
"nHUtmbn4ALrdU6U8pmd8AMt4qKTdZTbYJ3u1LHyAzXga3Zuopv5Y": "n9JkSnNqXxEct1t78dwVZDjq7PsznXtukxjyGvGJr4TdwVSbd7DJ",
"nHUvcCcmoH1FJMMC6NtF9KKA4LpCWhjsxk2reCQidsp5AHQ7QY9H": "n9KQ2DVL7QhgovChk81W8idxm7wDsYzXutDMQzwUBKuxb9WTWBVG",
"nHUvzia57LRXr9zqnYpyFUFeKvis2tqn4DkXBVGSppt5M4nNq43C": "n9KY4JZY11ndNbg55dThnoQdU9dii5q3egzoESVXw4Z7hu3maCba"
},
"status": "success",
"trusted_validator_keys": [
"nHUFCyRCrUjvtZmKiLeF8ReopzKuUoKeDeXo3wEUBVSaawzcSBpW",
"nHUd8g4DWm6HgjGTjKKSfYiRyf8qCvEN1PXR7YDJ5QTFyAnZHkbW",
"nHUUrjuEMtvzzTsiW2xKinUt7Jd83QFqYgfy3Feb7Hq1EJyoxoSz",
"nHUcQnmEbCNq4uhntFudzfrZV8P5WLoBrR5h3R9jAd621Aaz1pSy",
"nHBtDzdRDykxiuv7uSMPTcGexNm879RUUz5GW4h1qgjbtyvWZ1LE",
"nHDH7bQJpVfDhVSqdui3Z8GPvKEBQpo6AKHcnXe21zoD4nABA6xj",
"nHBidG3pZK11zQD6kpNDoAhDxH6WLGui6ZxSbUx7LSqLHsgzMPec",
"nHUon2tpyJEHHYGmxqeGu37cvPYHzrMtUNQFVdCgGNvEkjmCpTqK",
"nHUtmbn4ALrdU6U8pmd8AMt4qKTdZTbYJ3u1LHyAzXga3Zuopv5Y",
"nHUryiyDqEtyWVtFG24AAhaYjMf9FRLietbGzviF3piJsMm9qyDR",
"nHDwHQGjKTz6R6pFigSSrNBrhNYyUGFPHA75HiTccTCQzuu9d7Za",
"nHUED59jjpQ5QbNhesXMhqii9gA8UfbBmv3i5StgyxG98qjsT4yn",
"nHU2k8Po4dgygiQUG8wAADMk9RqkrActeKwsaC9MdtJ9KBvcpVji",
"nHUq9tJvSyoXQKhRytuWeydpPjvTz3M9GfUpEqfsg9xsewM7KkkK",
"nHUbgDd63HiuP68VRWazKwZRzS61N37K3NbfQaZLhSQ24LGGmjtn",
"nHUT6Xa588zawXVdP2xyYXc87LQFm8uV38CxsVzq2RoQJP8LXpJF",
"nHUpcmNsxAw47yt2ADDoNoQrzLyTJPgnyq16u6Qx2kRPA17oUNHz",
"nHUvcCcmoH1FJMMC6NtF9KKA4LpCWhjsxk2reCQidsp5AHQ7QY9H",
"nHUvzia57LRXr9zqnYpyFUFeKvis2tqn4DkXBVGSppt5M4nNq43C",
"nHDB2PAPYqF86j9j3c6w1F1ZqwvQfiWcFShZ9Pokg9q4ohNDSkAz",
"nHBk5DPexBjinXV8qHn7SEKzoxh2W92FxSbNTPgGtQYBzEF4msn9",
"nHBgiH2aih5JoaL3wbiiqSQfhrC21vJjxXoCoD2fuqcNbriXsfLm",
"nHU95JxeaHJoSdpE7R49Mxp4611Yk5yL9SGEc12UDJLr4oEUN4NT",
"nHBdXSF6YHAHSZUk7rvox6jwbvvyqBnsWGcewBtq8x1XuH6KXKXr",
"nHUVPzAmAmQ2QSc4oE1iLfsGi17qN2ado8PhxvgEkou76FLxAz7C",
"nHB8QMKGt9VB4Vg71VszjBVQnDW3v3QudM4DwFaJfy96bj4Pv9fA",
"nHUcNC5ni7XjVYfCMe38Rm3KQaq27jw7wJpcUYdo4miWwpNePRTw",
"nHULqGBkJtWeNFjhTzYeAsHA3qKKS7HoBh8CV3BAGTGMZuepEhWC",
"nHUXeusfwk61c4xJPneb9Lgy7Ga6DVaVLEyB29ftUdt9k2KxD6Hw",
"nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p",
"nHUnhRJK3csknycNK5SXRFi8jvDp3sKoWvS9wKWLq1ATBBGgPBjp",
"nHUY14bKLLm72ukzo2t6AVnQiu4bCd1jkimwWyJk3txvLeGhvro5",
"nHUdjQgg33FRu88GQDtzLWRw95xKnBurUZcqPpe3qC9XVeBNrHeJ",
"nHUpJSKQTZdB1TDkbCREMuf8vEqFkk84BcvZDhsQsDufFDQVajam",
"nHU2Y1mLGDvTbc2dpvpkQ16qdeTKv2aJwGJHFySSB9U3jkTmj4CA"
],
"validation_quorum": 28,
"validator_list": {
"count": 1,
"expiration": "2022-Jun-01 00:00:00.000000000 UTC",
"status": "active"
}
}
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
"result": {
"local_static_keys": [],
"publisher_lists": [
{
"available": true,
"expiration": "2022-Jun-01 00:00:00.000000000 UTC",
"list": [
"nHBdXSF6YHAHSZUk7rvox6jwbvvyqBnsWGcewBtq8x1XuH6KXKXr",
"nHBgiH2aih5JoaL3wbiiqSQfhrC21vJjxXoCoD2fuqcNbriXsfLm",
"nHB8QMKGt9VB4Vg71VszjBVQnDW3v3QudM4DwFaJfy96bj4Pv9fA",
"nHBidG3pZK11zQD6kpNDoAhDxH6WLGui6ZxSbUx7LSqLHsgzMPec",
"nHBtDzdRDykxiuv7uSMPTcGexNm879RUUz5GW4h1qgjbtyvWZ1LE",
"nHUryiyDqEtyWVtFG24AAhaYjMf9FRLietbGzviF3piJsMm9qyDR",
"nHUpJSKQTZdB1TDkbCREMuf8vEqFkk84BcvZDhsQsDufFDQVajam",
"nHUpcmNsxAw47yt2ADDoNoQrzLyTJPgnyq16u6Qx2kRPA17oUNHz",
"nHUnhRJK3csknycNK5SXRFi8jvDp3sKoWvS9wKWLq1ATBBGgPBjp",
"nHU95JxeaHJoSdpE7R49Mxp4611Yk5yL9SGEc12UDJLr4oEUN4NT",
"nHUUrjuEMtvzzTsiW2xKinUt7Jd83QFqYgfy3Feb7Hq1EJyoxoSz",
"nHUED59jjpQ5QbNhesXMhqii9gA8UfbBmv3i5StgyxG98qjsT4yn",
"nHULqGBkJtWeNFjhTzYeAsHA3qKKS7HoBh8CV3BAGTGMZuepEhWC",
"nHUT6Xa588zawXVdP2xyYXc87LQFm8uV38CxsVzq2RoQJP8LXpJF",
"nHUVPzAmAmQ2QSc4oE1iLfsGi17qN2ado8PhxvgEkou76FLxAz7C",
"nHUXeusfwk61c4xJPneb9Lgy7Ga6DVaVLEyB29ftUdt9k2KxD6Hw",
"nHUY14bKLLm72ukzo2t6AVnQiu4bCd1jkimwWyJk3txvLeGhvro5",
"nHU2Y1mLGDvTbc2dpvpkQ16qdeTKv2aJwGJHFySSB9U3jkTmj4CA",
"nHU2k8Po4dgygiQUG8wAADMk9RqkrActeKwsaC9MdtJ9KBvcpVji",
"nHUbgDd63HiuP68VRWazKwZRzS61N37K3NbfQaZLhSQ24LGGmjtn",
"nHUcNC5ni7XjVYfCMe38Rm3KQaq27jw7wJpcUYdo4miWwpNePRTw",
"nHUcQnmEbCNq4uhntFudzfrZV8P5WLoBrR5h3R9jAd621Aaz1pSy",
"nHUdjQgg33FRu88GQDtzLWRw95xKnBurUZcqPpe3qC9XVeBNrHeJ",
"nHUd8g4DWm6HgjGTjKKSfYiRyf8qCvEN1PXR7YDJ5QTFyAnZHkbW",
"nHUon2tpyJEHHYGmxqeGu37cvPYHzrMtUNQFVdCgGNvEkjmCpTqK",
"nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p",
"nHUFCyRCrUjvtZmKiLeF8ReopzKuUoKeDeXo3wEUBVSaawzcSBpW",
"nHUq9tJvSyoXQKhRytuWeydpPjvTz3M9GfUpEqfsg9xsewM7KkkK",
"nHUtmbn4ALrdU6U8pmd8AMt4qKTdZTbYJ3u1LHyAzXga3Zuopv5Y",
"nHUvcCcmoH1FJMMC6NtF9KKA4LpCWhjsxk2reCQidsp5AHQ7QY9H",
"nHUvzia57LRXr9zqnYpyFUFeKvis2tqn4DkXBVGSppt5M4nNq43C",
"nHDwHQGjKTz6R6pFigSSrNBrhNYyUGFPHA75HiTccTCQzuu9d7Za",
"nHDB2PAPYqF86j9j3c6w1F1ZqwvQfiWcFShZ9Pokg9q4ohNDSkAz",
"nHDH7bQJpVfDhVSqdui3Z8GPvKEBQpo6AKHcnXe21zoD4nABA6xj"
],
"pubkey_publisher": "ED2677ABFFD1B33AC6FBC3062B71F1E8397C1505E1C42C64D11AD1B28FF73F4734",
"seq": 70,
"uri": "https://vl.ripple.com",
"version": 1
}
],
"signing_keys": {
"nHB8QMKGt9VB4Vg71VszjBVQnDW3v3QudM4DwFaJfy96bj4Pv9fA": "n9KeTQ3UyMtaJJD78vT7QiGRMv1GcWHEnhNbwKfdbW2HfRqtvUUt",
"nHBdXSF6YHAHSZUk7rvox6jwbvvyqBnsWGcewBtq8x1XuH6KXKXr": "n9MfeCuZK2ra5eJtFDtuCTnvxfsi85k4J3GXJ1TvRVr2o4EQeHMF",
"nHBgiH2aih5JoaL3wbiiqSQfhrC21vJjxXoCoD2fuqcNbriXsfLm": "n9KhsMP6jKFQPpjJ9VwqyZSwrL4shdX9YknRwmsAVL1RNVrx4jLm",
"nHBidG3pZK11zQD6kpNDoAhDxH6WLGui6ZxSbUx7LSqLHsgzMPec": "n9KaxgJv69FucW5kkiaMhCqS6sAR1wUVxpZaZmLGVXxAcAse9YhR",
"nHBk5DPexBjinXV8qHn7SEKzoxh2W92FxSbNTPgGtQYBzEF4msn9": "n9KnrcCmL5psyKtk2KWP6jy14Hj4EXuZDg7XMdQJ9cSDoFSp53hu",
"nHBtDzdRDykxiuv7uSMPTcGexNm879RUUz5GW4h1qgjbtyvWZ1LE": "n9LCf7NtwcyXVc5fYB6UVByRoQZqJDhrMUoKnr3GQB6mFqpcmMzg",
"nHDB2PAPYqF86j9j3c6w1F1ZqwvQfiWcFShZ9Pokg9q4ohNDSkAz": "n9Jk38y9XCznqiLq53UjREJQbZWnz4Pvmph55GP5ofUPg3RG8eVr",
"nHDH7bQJpVfDhVSqdui3Z8GPvKEBQpo6AKHcnXe21zoD4nABA6xj": "n9MSTcx1fmfyKpaDTtpXucugcqM7yxpaggmwRxcyA3Nr4pE1pN3x",
"nHDwHQGjKTz6R6pFigSSrNBrhNYyUGFPHA75HiTccTCQzuu9d7Za": "n9Kb81J9kqGgYkrNDRSPT3UCgz8Bei1CPHGMt85yxz9mUSvuzV5k",
"nHU2Y1mLGDvTbc2dpvpkQ16qdeTKv2aJwGJHFySSB9U3jkTmj4CA": "n9K2FpCqZftM1xXXaWXFPVbEimLX6MEjrmQywfSutkdK1PRvqDb2",
"nHU2k8Po4dgygiQUG8wAADMk9RqkrActeKwsaC9MdtJ9KBvcpVji": "n9MhLZsK7Av6ny2gV5SAGLDsnFXE9p85aYR8diD8xvuvuucqad85",
"nHU95JxeaHJoSdpE7R49Mxp4611Yk5yL9SGEc12UDJLr4oEUN4NT": "n9JtY9MqUcwKWenHp8WoRobFRmB2mmBEJd1ruJmhKGKAwtFQkQjb",
"nHUED59jjpQ5QbNhesXMhqii9gA8UfbBmv3i5StgyxG98qjsT4yn": "n9Km4Xz53K9kcTaVn3mYAHsXqNuAo7A2HazSr34SFufvNwBxYGLn",
"nHUFCyRCrUjvtZmKiLeF8ReopzKuUoKeDeXo3wEUBVSaawzcSBpW": "n9Lqr4YZxk7WYRDTBZjjmoAraikLCjAgAswaPaZ6LaGW6Q4Y2eoo",
"nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p": "n9LMfcjE6dMyshCqiftLFXpB9K3Mnd2r5bG7K8osmrkFpHUoR3c1",
"nHULqGBkJtWeNFjhTzYeAsHA3qKKS7HoBh8CV3BAGTGMZuepEhWC": "n9MZ7EVGKypqdyNguP31xSqhFqDBF4V5FESLMmLiGrBJ3khP2AzQ",
"nHUT6Xa588zawXVdP2xyYXc87LQFm8uV38CxsVzq2RoQJP8LXpJF": "n9Lq9bekeVhCsW8dwqzfvKsqUiu9Qxvwk9YmF2hxkBJjNrGNL5Fw",
"nHUUrjuEMtvzzTsiW2xKinUt7Jd83QFqYgfy3Feb7Hq1EJyoxoSz": "n9LLqqH1cVFPjEnQYFQ6DooxuhHPQxwXgMjDGrpJ6pb1WGDoi76Q",
"nHUVPzAmAmQ2QSc4oE1iLfsGi17qN2ado8PhxvgEkou76FLxAz7C": "n9J1GJHtua77TBEzir3FvsgWX68xBFeC8os3s5TkCg97E1cwxKfH",
"nHUXeusfwk61c4xJPneb9Lgy7Ga6DVaVLEyB29ftUdt9k2KxD6Hw": "n9McDrz9tPujrQK3vMXJXzuEJv1B8UG3opfZEsFA8t6QxdZh1H6m",
"nHUY14bKLLm72ukzo2t6AVnQiu4bCd1jkimwWyJk3txvLeGhvro5": "n9M2UqXLK25h9YEQTskmCXbWPGhQmB1pFVqeXia38UwLaL838VbG",
"nHUbgDd63HiuP68VRWazKwZRzS61N37K3NbfQaZLhSQ24LGGmjtn": "n9LkAv98aaGupypuLMH5ogjJ3rTEX178s9EnmRvmySL9k3cVuxTu",
"nHUcNC5ni7XjVYfCMe38Rm3KQaq27jw7wJpcUYdo4miWwpNePRTw": "n9L3GcKLGWoz79RPfYq9GjEVyh57vpe1wM45i2tdczJ9u15ajAFB",
"nHUcQnmEbCNq4uhntFudzfrZV8P5WLoBrR5h3R9jAd621Aaz1pSy": "n9KVcHedX11X6vCFNaZSGT2pUdbnd8PUpNGYP6BPutvYxQQy8DKo",
"nHUd8g4DWm6HgjGTjKKSfYiRyf8qCvEN1PXR7YDJ5QTFyAnZHkbW": "n9KSXAVPy6ac8aX88fRsJN6eSrJ2gEfGrfskUVJJ7XkopGsKNg9X",
"nHUdjQgg33FRu88GQDtzLWRw95xKnBurUZcqPpe3qC9XVeBNrHeJ": "n94RkpbJYRYQrWUmL8PAVQ1XTVKtfyKkLm8C6SWzWPcKEbuNb6EV",
"nHUnhRJK3csknycNK5SXRFi8jvDp3sKoWvS9wKWLq1ATBBGgPBjp": "n9LbDLg9F7ExZCeMw1QZqsd1Ejs9uYpwd8bPUStF5hBJdd6B5aWj",
"nHUon2tpyJEHHYGmxqeGu37cvPYHzrMtUNQFVdCgGNvEkjmCpTqK": "n9JebyUXwBa5GoYJQ6AbupoMKyE2zaiR3FTfDTMkxpMMv1KPmQEn",
"nHUpJSKQTZdB1TDkbCREMuf8vEqFkk84BcvZDhsQsDufFDQVajam": "n9LFSE8fQ6Ljnc97ToHVtv1sYZ3GpzrXKpT94eFDk8jtdbfoBe7N",
"nHUpcmNsxAw47yt2ADDoNoQrzLyTJPgnyq16u6Qx2kRPA17oUNHz": "n9Ls4GcrofTvLvymKh1wCqxw1aLzXUumyBBD9fAtbkk9WtdQ4TUH",
"nHUq9tJvSyoXQKhRytuWeydpPjvTz3M9GfUpEqfsg9xsewM7KkkK": "n943ozDG74swHRmAjzY6A4KVFBhEirF4Sh1ACqvDePE3CZTgkMqn",
"nHUryiyDqEtyWVtFG24AAhaYjMf9FRLietbGzviF3piJsMm9qyDR": "n9KAE7DUEB62ZQ3yWzygKWWqsj7ZqchW5rXg63puZA46k7WzGfQu",
"nHUtmbn4ALrdU6U8pmd8AMt4qKTdZTbYJ3u1LHyAzXga3Zuopv5Y": "n9JkSnNqXxEct1t78dwVZDjq7PsznXtukxjyGvGJr4TdwVSbd7DJ",
"nHUvcCcmoH1FJMMC6NtF9KKA4LpCWhjsxk2reCQidsp5AHQ7QY9H": "n9KQ2DVL7QhgovChk81W8idxm7wDsYzXutDMQzwUBKuxb9WTWBVG",
"nHUvzia57LRXr9zqnYpyFUFeKvis2tqn4DkXBVGSppt5M4nNq43C": "n9KY4JZY11ndNbg55dThnoQdU9dii5q3egzoESVXw4Z7hu3maCba"
},
"status": "success",
"trusted_validator_keys": [
"nHUFCyRCrUjvtZmKiLeF8ReopzKuUoKeDeXo3wEUBVSaawzcSBpW",
"nHUd8g4DWm6HgjGTjKKSfYiRyf8qCvEN1PXR7YDJ5QTFyAnZHkbW",
"nHUUrjuEMtvzzTsiW2xKinUt7Jd83QFqYgfy3Feb7Hq1EJyoxoSz",
"nHUcQnmEbCNq4uhntFudzfrZV8P5WLoBrR5h3R9jAd621Aaz1pSy",
"nHBtDzdRDykxiuv7uSMPTcGexNm879RUUz5GW4h1qgjbtyvWZ1LE",
"nHDH7bQJpVfDhVSqdui3Z8GPvKEBQpo6AKHcnXe21zoD4nABA6xj",
"nHBidG3pZK11zQD6kpNDoAhDxH6WLGui6ZxSbUx7LSqLHsgzMPec",
"nHUon2tpyJEHHYGmxqeGu37cvPYHzrMtUNQFVdCgGNvEkjmCpTqK",
"nHUtmbn4ALrdU6U8pmd8AMt4qKTdZTbYJ3u1LHyAzXga3Zuopv5Y",
"nHUryiyDqEtyWVtFG24AAhaYjMf9FRLietbGzviF3piJsMm9qyDR",
"nHDwHQGjKTz6R6pFigSSrNBrhNYyUGFPHA75HiTccTCQzuu9d7Za",
"nHUED59jjpQ5QbNhesXMhqii9gA8UfbBmv3i5StgyxG98qjsT4yn",
"nHU2k8Po4dgygiQUG8wAADMk9RqkrActeKwsaC9MdtJ9KBvcpVji",
"nHUq9tJvSyoXQKhRytuWeydpPjvTz3M9GfUpEqfsg9xsewM7KkkK",
"nHUbgDd63HiuP68VRWazKwZRzS61N37K3NbfQaZLhSQ24LGGmjtn",
"nHUT6Xa588zawXVdP2xyYXc87LQFm8uV38CxsVzq2RoQJP8LXpJF",
"nHUpcmNsxAw47yt2ADDoNoQrzLyTJPgnyq16u6Qx2kRPA17oUNHz",
"nHUvcCcmoH1FJMMC6NtF9KKA4LpCWhjsxk2reCQidsp5AHQ7QY9H",
"nHUvzia57LRXr9zqnYpyFUFeKvis2tqn4DkXBVGSppt5M4nNq43C",
"nHDB2PAPYqF86j9j3c6w1F1ZqwvQfiWcFShZ9Pokg9q4ohNDSkAz",
"nHBk5DPexBjinXV8qHn7SEKzoxh2W92FxSbNTPgGtQYBzEF4msn9",
"nHBgiH2aih5JoaL3wbiiqSQfhrC21vJjxXoCoD2fuqcNbriXsfLm",
"nHU95JxeaHJoSdpE7R49Mxp4611Yk5yL9SGEc12UDJLr4oEUN4NT",
"nHBdXSF6YHAHSZUk7rvox6jwbvvyqBnsWGcewBtq8x1XuH6KXKXr",
"nHUVPzAmAmQ2QSc4oE1iLfsGi17qN2ado8PhxvgEkou76FLxAz7C",
"nHB8QMKGt9VB4Vg71VszjBVQnDW3v3QudM4DwFaJfy96bj4Pv9fA",
"nHUcNC5ni7XjVYfCMe38Rm3KQaq27jw7wJpcUYdo4miWwpNePRTw",
"nHULqGBkJtWeNFjhTzYeAsHA3qKKS7HoBh8CV3BAGTGMZuepEhWC",
"nHUXeusfwk61c4xJPneb9Lgy7Ga6DVaVLEyB29ftUdt9k2KxD6Hw",
"nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p",
"nHUnhRJK3csknycNK5SXRFi8jvDp3sKoWvS9wKWLq1ATBBGgPBjp",
"nHUY14bKLLm72ukzo2t6AVnQiu4bCd1jkimwWyJk3txvLeGhvro5",
"nHUdjQgg33FRu88GQDtzLWRw95xKnBurUZcqPpe3qC9XVeBNrHeJ",
"nHUpJSKQTZdB1TDkbCREMuf8vEqFkk84BcvZDhsQsDufFDQVajam",
"nHU2Y1mLGDvTbc2dpvpkQ16qdeTKv2aJwGJHFySSB9U3jkTmj4CA"
],
"validation_quorum": 28,
"validator_list": {
"count": 1,
"expiration": "2022-Jun-01 00:00:00.000000000 UTC",
"status": "active"
}
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:-------------------------|:-------|:-----------------------------------------|
| `local_static_keys` | Array | Array of public keys for validators explicitly trusted in the config file. |
| `publisher_lists` | Array | Array of **Publisher List** objects. (See below for details.) |
| `signing_keys` | Object | Mapping from master public key to current ephemeral public key for all currently-trusted validators. Excludes validators that don't use an ephemeral signing key. |
| `trusted_validator_keys` | Array | Array of master public keys of all currently trusted validators. |
| `validation_quorum` | Number | Minimum number of trusted validations required to validate a ledger version. Some circumstances may cause the server to require more validations. |
| `validator_list_expires` | String | The human readable time when the current validator list will expire. There are two special cases: the string `unknown` if the server has not yet loaded a published validator list, or the string `never` if the server uses a static validator list. |
Each member of the `publisher_lists` array is a **Publisher List** object with the following fields:
| `Field` | Type | Description |
|:-------------------|:-----------------|:-------------------------------------|
| `available` | Boolean | If `false`, the validator keys in `list` may no longer be supported by this publisher. |
| `expiration` | String | The human readable time when this published list is scheduled to expire. |
| `list` | Array | Array of published validator keys in the list. |
| `pubkey_publisher` | String | Ed25519 or ECDSA public key of the list publisher, as hexadecimal. |
| `seq` | Unsigned Integer | The sequence number of this published list. |
| `version` | Unsigned Integer | The version of the list format. |
### Possible Errors
- Any of the [universal error types][].
- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,108 @@
---
html: TODO_PAGE_NAME.html
parent: TODO_CATEGORY_FILENAME.html
blurb: TODO BLURB
labels:
# TODO At least one label
---
# TODO_method_name
[[Source]](TODO_URL "Source")
The `{{currentpage.name}}` method TODO_description.
_The `{{currentpage.name}}` method is an [admin method](admin-api-methods.html) that cannot be run by unprivileged users._
### Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
TODO
}
```
*JSON-RPC*
```json
{
"method": "{{currentpage.name}}",
"params": [{
TODO
}]
}
```
*Commandline*
```sh
#Syntax: {{currentpage.name}} TODO
rippled {{currentpage.name}}
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:------------|:--------------------------|:-----------------------------------|
TODO_request_params
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
TODO
}
```
*JSON-RPC*
```json
{
TODO
}
```
*Commandline*
```json
Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005
{
TODO
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
TODO_response_params
### Possible Errors
- Any of the [universal error types][].
- TODO_errors
- `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,11 @@
---
html: api-conventions.html
parent: http-websocket-apis.html
blurb: rippled APIのデータ型とフォーマットについて説明します。
template: pagetype-category.html.jinja
---
# APIの規則
このセクションでは、JSON-RPCおよびWebSocketインターフェイスを含む`rippled` APIのデータ型とフォーマットについて説明します。
これらのデータ型の一部は、[Data API](data-api.html)を含む、より高度なAPIにも使用されます。

View File

@@ -0,0 +1,11 @@
---
html: api-conventions.html
parent: http-websocket-apis.html
blurb: Common conventions used across the XRP Ledger's HTTP APIs.
template: pagetype-category.html.jinja
---
# API Conventions
This section describes data types and formats of the HTTP APIs (JSON-RPC and WebSocket) as implemented in [the `rippled` server](xrpl-servers.html).
For information on the XRP Ledger protocol that applies to all APIs, see [Protocol Reference](protocol-reference.html).

View File

@@ -0,0 +1,117 @@
---
html: error-formatting.html
parent: api-conventions.html
blurb: WebSocket、JSON-RPC、コマンドラインインターフェイスのエラーフォーマットと汎用エラーコードです。
---
# エラーのフォーマット
エラーが発生する可能性のある状況をすべて挙げることは不可能です。トランスポートレイヤーで発生する場合(ネットワーク接続が失われる場合など)には、使用しているクライアントとトランスポートに応じてその結果は異なります。ただし、`rippled`サーバーが要求を正常に受信した場合、サーバーは標準のエラー形式での応答を試みます。
**注意:** 要求の結果がエラーになった場合、応答の一部として要求全体がコピーされます。このため、エラーのデバッグに取り組むことができます。ただし、これには要求で渡した機密情報がすべて含まれます。エラーメッセージを共有するときには、アカウントの重要な機密情報を他のユーザーに誤って公開することがないように、十分に注意してください。
エラーの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 3,
"status": "error",
"type": "response",
"error": "ledgerIndexMalformed",
"request": {
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"command": "account_info",
"id": 3,
"ledger_index": "-",
"strict": true
}
}
```
*JSON-RPC*
```
HTTP Status: 200 OK
{
"result": {
"error": "ledgerIndexMalformed",
"request": {
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"command": "account_info",
"ledger_index": "-",
"strict": true
},
"status": "error"
}
}
```
*コマンドライン*
```
{
"result": {
"error": "ledgerIndexMalformed",
"request": {
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"command": "account_info",
"ledger_index": "-",
"strict": true
},
"status": "error"
}
}
```
<!-- MULTICODE_BLOCK_END -->
## WebSocketフォーマット
| `Field` | 型 | 説明 |
|:----------|:---------|:------------------------------------------------------|
| `id` | (場合により異なる) | この応答の要求元となったWeb Socket要求に指定されていたID |
| `status` | 文字列 | `"error"`: 要求が原因でエラーが発生した場合 |
| `type` | 文字列 | 通常は`"response"`。これは、コマンドに対し正常に応答したことを示します。 |
| `error` | 文字列 | 発生したエラータイプの一意のコード。 |
| `request` | オブジェクト | このエラーが発生した要求のコピーJSONフォーマット。**注意:** 要求にアカウントの機密情報が含まれている場合、ここにコピーされます。 |
## JSON-RPCフォーマット
一部のJSON-RPC要求は、HTTPレイヤーでエラーコードで応答します。この場合、応答は応答本文にプレーンテキストで記述されます。たとえば`method`パラメーターでコマンドを指定し忘れた場合、応答は次のようになります。
```
HTTP Status: 400 Bad Request
Null method
```
HTTPステータスコード200 OKが返されるその他のエラーの場合、応答はJSONフォーマットで、以下のフィールドが使用されます。
| `Field` | 型 | 説明 |
|:-----------------|:-------|:-------------------------------------------------|
| `result` | オブジェクト | クエリーに対する応答が含まれているオブジェクト |
| `result.error` | 文字列 | 発生したエラータイプの一意のコード。 |
| `result.status` | 文字列 | `"error"`: 要求が原因でエラーが発生した場合 |
| `result.request` | オブジェクト | このエラーが発生した要求のコピーJSONフォーマット。**注意:** 要求にアカウントの機密情報が含まれている場合、ここにコピーされます。**注記:** 発行される要求にかかわらず、要求はWebSocketフォーマットに再設定されます。 |
## 汎用エラー
すべてのメソッドは、以下のいずれかの値の`error`コードを返す可能性があります。
* `unknownCmd` - 要求に、`rippled`サーバーが認識する[コマンド](http-websocket-apis.html)が含まれていません。
* `jsonInvalid` -WebSocketのみ要求は適切なJSONオブジェクトではありません。
* この場合JSON-RPCは、代わりに400 Bad Request HTTPエラーを返します。
* `missingCommand` -WebSocketのみ要求に`command`フィールドが指定されていませんでした。
* この場合JSON-RPCは、代わりに400 Bad Request HTTPエラーを返します。
* `tooBusy` - サーバーの負荷が高すぎるため、現在このコマンドを実行できません。管理者として接続している場合は、通常このエラーが返されることはありません。
* `noNetwork` - サーバーとXRP Ledgerピアツーピアネットワークのその他の部分との接続で問題が発生していますサーバーがスタンドアロンモードで実行されていません
* `noCurrent` - 高い負荷、ネットワークの問題、バリデータ障害、誤った構成、またはその他の問題が原因で、サーバーが現行のレジャーを認識できません。
* `noClosed` - サーバーに決済済みレジャーがありません。通常、このエラーは起動が完了していないことが原因で発生します。
* `wsTextRequired` -WebSocketのみ要求の[opcode](https://tools.ietf.org/html/rfc6455#section-5.2)がテキストではありません。
* `amendmentBlocked` - サーバーの状態が[Amendment blocked](amendments.html#amendment-blocked)であるため、XRP Ledgerネットワークとの同期を維持するために最新バージョンに更新する必要があります。

View File

@@ -0,0 +1,129 @@
---
html: error-formatting.html
parent: api-conventions.html
blurb: Error formats and common error codes for WebSocket, JSON-RPC, and Commandline interfaces.
labels:
- Development
---
# Error Formatting
It is impossible to list all the possible ways an error can occur. Some may occur in the transport layer (for example, loss of network connectivity), in which case the results vary depending on what client and transport you are using. However, if the `rippled` server successfully receives your request, it tries to respond in a standardized error format.
**Caution:** When your request results in an error, the entire request is copied back as part of the response, so that you can try to debug the error. However, this also includes any secrets that were passed as part of the request. When sharing error messages, be very careful not to accidentally expose important account secrets to others.
Some example errors:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 3,
"status": "error",
"type": "response",
"error": "ledgerIndexMalformed",
"request": {
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"command": "account_info",
"id": 3,
"ledger_index": "-",
"strict": true
}
}
```
*JSON-RPC*
```json
HTTP Status: 200 OK
{
"result": {
"error": "ledgerIndexMalformed",
"request": {
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"command": "account_info",
"ledger_index": "-",
"strict": true
},
"status": "error"
}
}
```
*Commandline*
```json
{
"result": {
"error": "ledgerIndexMalformed",
"request": {
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"command": "account_info",
"ledger_index": "-",
"strict": true
},
"status": "error"
}
}
```
<!-- MULTICODE_BLOCK_END -->
## WebSocket Format
| `Field` | Type | Description |
|:----------|:---------|:------------------------------------------------------|
| `id` | (Varies) | ID provided in the Web Socket request that prompted this response |
| `status` | String | `"error"` if the request caused an error |
| `type` | String | Typically `"response"`, which indicates a successful response to a command. |
| `error` | String | A unique code for the type of error that occurred |
| `request` | Object | A copy of the request that prompted this error, in JSON format. **Caution:** If the request contained any secrets, they are copied here! |
| `api_version` | Number | _(May be omitted)_ The `api_version` specified in the request, if any. |
## JSON-RPC Format
Some JSON-RPC request respond with an error code on the HTTP layer. In these cases, the response is a plain-text explanation in the response body. For example, if you forgot to specify the command in the `method` parameter, the response is like this:
```
HTTP Status: 400 Bad Request
Null method
```
For other errors that returned with HTTP status code 200 OK, the responses are formatted in JSON, with the following fields:
| `Field` | Type | Description |
|:-----------------|:-------|:-------------------------------------------------|
| `result` | Object | Object containing the response to the query |
| `result.error` | String | A unique code for the type of error that occurred |
| `result.status` | String | `"error"` if the request caused an error |
| `result.request` | Object | A copy of the request that prompted this error, in JSON format. **Caution:** If the request contained any account secrets, they are copied here! **Note:** The request is re-formatted in WebSocket format, regardless of the request made. |
## Universal Errors
All methods can potentially return any of the following values for the `error` code:
- `amendmentBlocked` - The server is [amendment blocked](amendments.html#amendment-blocked) and needs to be updated to the latest version to stay synced with the XRP Ledger network.
- `failedToForward` - ([Reporting Mode][] servers only) The server tried to forward this request to a P2P Mode server, but the connection failed.
- `invalid_API_version` - The server does not support the [API version number](request-formatting.html#api-versioning) from the request.
- `jsonInvalid` - (WebSocket only) The request is not a proper JSON object.
- JSON-RPC returns a 400 Bad Request HTTP error in this case instead.
- `missingCommand` - (WebSocket only) The request did not specify a `command` field.
- JSON-RPC returns a 400 Bad Request HTTP error in this case instead.
- `noClosed` - The server does not have a closed ledger, typically because it has not finished starting up.
- `noCurrent` - The server does not know what the current ledger is, due to high load, network problems, validator failures, incorrect configuration, or some other problem.
- `noNetwork` - The server is having trouble connecting to the rest of the XRP Ledger peer-to-peer network (and is not running in stand-alone mode).
- `tooBusy` - The server is under too much load to do this command right now. Generally not returned if you are connected as an admin.
- `unknownCmd` - The request does not contain a [command](http-websocket-apis.html) that the `rippled` server recognizes.
- `wsTextRequired` - (WebSocket only) The request's [opcode](https://tools.ietf.org/html/rfc6455#section-5.2) is not text. <!-- SPELLING_IGNORE: opcode -->
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,10 @@
---
html: markers-and-pagination.html
parent: api-conventions.html
blurb: 大きなクエリを複数の応答にページネーションする際の慣例です。
---
# マーカーとページネーション
一部のメソッドから返されるデータは、1つの応答に実質的に収まらないことがあります。結果全体が収まらない場合、応答には`marker`フィールドが含まれます。このフィールドを使用することで、複数回の呼出しを通じてデータのページをさらに取得できます。各要求で直前の応答の`marker`値を渡して、終わったところから再開します。応答に`marker`が含まれていなければ、データセットの終わりに達しています。
`marker`フィールドのフォーマットは意図的に未定義になっています。各サーバーで`marker`をそれぞれに合わせて定義できるので、このフィールドの形式は文字列、ネストオブジェクトなどさまざまです。異なるサーバー、または同じサーバーの異なるメソッドでは、異なる`marker`定義を使用できます。各`marker`は一時的であり、10分以上経過すると予期されているとおりに機能しなくなることがあります。

View File

@@ -0,0 +1,10 @@
---
html: markers-and-pagination.html
parent: api-conventions.html
blurb: Convention for paginating large queries into multiple responses.
---
# Markers and Pagination
Some methods return more data than can efficiently fit into one response. When there are more results than contained, the response includes a `marker` field. You can use this to retrieve more pages of data across multiple calls. In each request, pass the `marker` value from the previous response to resume from the point where you left off. If the `marker` is omitted from a response, then you have reached the end of the data set.
The format of the `marker` field is intentionally undefined. Each server can define a `marker` field as desired, so it may take the form of a string, a nested object, or another type. Different servers, and different methods provided by the same server, can have different `marker` definitions. Each `marker` is ephemeral, and may not work as expected after 10 minutes.

View File

@@ -0,0 +1,69 @@
---
html: rate-limiting.html
parent: api-conventions.html
blurb: Information on how public APIs limit clients from making too many requests.
labels:
- Core Server
---
# Rate Limiting
The `rippled` server limits the rate at which API clients can make requests on public APIs. Rate limiting is based on the IP address of the client, so clients behind [network address translation](https://en.wikipedia.org/wiki/Network_address_translation) share a limit based on their public IP address.
**Tip:** Rate limiting does not apply when the client is connected [as an admin](get-started-using-http-websocket-apis.html#admin-access).
When a client is approaching the rate limit, the server adds the field `"warning": "load"` at the top level of an [API response](response-formatting.html). This warning is not added to every response, but the server may send several such warnings before it disconnects a client.
If a client goes past the rate limit, the server disconnects that client and does not serve further requests from the client's API address for a while. The WebSocket and JSON-RPC APIs use different disconnect messages.
## WebSocket API Disconnect Message
For the WebSocket API, the server closes the connection and provides a close message and code. The way you access these messages depends on your WebSocket client implementation. For example, using the [Node.js ws library](https://github.com/websockets/ws), the following code prints the close reason when disconnected:
```js
const WebSocket = require('ws')
const ws = new WebSocket('ws://localhost:6007/')
ws.on('close', (code,reason) => {
console.log("Disconnected. \ncode: ", code, "\nreason: ", reason)
})
// If rate limited, prints:
// Disconnected.
// code: 1008
// reason: threshold exceeded
```
If the connection is closed because of rate limiting, the close code is `1008` and the close message is the string `threshold exceeded`.
## JSON-RPC Rate Limited Error
For a JSON-RPC API request, the server responds with the HTTP status code **503 Service Unavailable** when the client is over the rate limit. This response has a text (not JSON) body stating that the server is overloaded:
```text
503 Service Unavailable
Server is overloaded
```
## Rate Per Request
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/resource/Fees.h "Source")
The server calculates a client's usage rate based on the number of requests made over time, and weighs different types of requests based on approximately how much work the server must do to serve them. Follow-up messages from the server for the [subscribe method][] and [path_find method][] also count towards a client's usage rate.
The usage rate drops off exponentially over time, so a client that does not make requests automatically has its access restored after a period of seconds to minutes.
## See Also
- **Concepts:**
- [The `rippled` Server](xrpl-servers.html)
- [Software Ecosystem](software-ecosystem.html)
- **Tutorials:**
- [Getting Started with XRP Ledger APIs](get-started-using-http-websocket-apis.html)
- [Troubleshooting rippled](troubleshoot-the-rippled-server.html)
- **References:**
- [rippled API Reference](http-websocket-apis.html)
- [Error Formatting](error-formatting.html)
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,75 @@
---
html: request-formatting.html
parent: api-conventions.html
blurb: WebSocket、JSON-RPC、コマンドラインインターフェイスの標準の要求フォーマットと例です。
---
# 要求フォーマット
## WebSocketフォーマット
`rippled`サーバーへのWebSocketを開いた後、以下の属性を使用して、コマンドを[JSON](https://en.wikipedia.org/wiki/JSON)オブジェクトとして送信できます。
* コマンド名を最上位の`"command"`フィールドに指定します。
* このコマンドのすべての関連パラメーターも最上位に指定します。
* オプションで、任意の値を指定した`"id"`フィールドを指定します。この要求への応答では、同一の`"id"`フィールドを使用します。そうすることで、応答が順不同で到達した場合も、どの要求によってどの応答を得られたのかがわかります。
応答はJSONオブジェクトとして返されます。
## JSON-RPCフォーマット
JSON-RPC要求を実行するには、`rippled`サーバーがJSON-RPC接続をリッスンしているポートおよびIPで、HTTP **POST**要求をルートパス(`/`に送信します。HTTP/1.0またはHTTP/1.1を使用できます。HTTPSを使用する場合は、TLS v1.2を使用してください。セキュリティ上の理由から、`rippled`ではSSL v3以前を _サポートしていません_
常に`Content-Type`ヘッダー(値`application/json`)を指定してください。
複数の要求を実行する予定の場合は、要求間で接続を閉じてから開く操作を行わずに済むように、[Keep-Alives](http://tools.ietf.org/html/rfc7230#section-6.3)を使用してください。
以下の属性を指定した要求本文を[JSON](https://en.wikipedia.org/wiki/JSON)オブジェクトとして送信します。
* コマンドを最上位の`"method"` フィールドに指定します。
* 最上位の`"params"`フィールドを指定します。このフィールドの内容は、コマンドのすべてのパラメーターが指定された1つの入れ子JSONオブジェクトのみを保持している**1要素配列**です。
応答もJSONオブジェクトです。
## コマンドライン形式
コマンドラインでは、通常の(ダッシュが先頭に付いた)コマンドラインオプションの後にコマンドを指定し、その後に一連の限定的なパラメーターをスペースで区切って指定します。スペースやその他の特殊文字が含まれている可能性のあるパラメーター値は、一重引用符で囲みます。
### 要求の例
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 2,
"command": "account_info",
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"strict": true,
"ledger_index": "validated"
}
```
*JSON-RPC*
```
POST http://s1.ripple.com:51234/
{
"method": "account_info",
"params": [
{
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"strict": true,
"ledger_index": "validated"
}
]
}
```
*コマンドライン*
```
rippled account_info r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 validated true
```
<!-- MULTICODE_BLOCK_END -->

View File

@@ -0,0 +1,138 @@
---
html: request-formatting.html
parent: api-conventions.html
blurb: Standard request format, with examples, for the WebSocket, JSON-RPC, and Commandline interfaces.
---
# Request Formatting
## Example Request
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "account_info",
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"strict": true,
"ledger_index": "validated",
"api_version": 1
}
```
*JSON-RPC*
```json
POST http://s1.ripple.com:51234/
Content-Type: application/json
{
"method": "account_info",
"params": [
{
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"strict": true,
"ledger_index": "validated",
"api_version": 1
}
]
}
```
*Commandline*
```sh
rippled account_info r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 validated strict
```
<!-- MULTICODE_BLOCK_END -->
## WebSocket Format
After you open a WebSocket to the `rippled` server, you can send commands as a [JSON](https://en.wikipedia.org/wiki/JSON) object with the following fields:
| Field | Type | Description |
|:--------------------|:----------|:-------------------------------------------|
| `command` | String | The name of the [API method](public-api-methods.html). |
| `id` | (Various) | _(Optional)_ A unique value to identify this request. The response to this request uses the same `id` field. This way, even if responses arrive out of order, you know which request prompted which response. |
| `api_version` | Number | _(Optional)_ The API version to use. If omitted, use version 1. For details, see [API Versioning](#api-versioning). [New in: rippled 1.5.0][] |
| (Method Parameters) | (Various) | Provide any parameters to the method at the top level. |
See [Response Formatting](response-formatting.html) for the response from the server.
## JSON-RPC Format
To make a JSON-RPC request, send an HTTP **POST** request to the root path (`/`) on the port and IP where the `rippled` server is listening for JSON-RPC connections. You can use HTTP/1.0 or HTTP/1.1. If you use HTTPS, you should use TLS version 1.2. For security reasons, `rippled` _does not support_ SSL version 3 or earlier.
Always include a `Content-Type` header with the value `application/json`.
If you plan on making multiple requests, use [Keep-Alives](http://tools.ietf.org/html/rfc7230#section-6.3) so that you do not have to close and re-open the connection in between requests. <!-- SPELLING_IGNORE: alives -->
Send request body as a [JSON](https://en.wikipedia.org/wiki/JSON) object with the following fields:
| Field | Type | Description |
|:--------------------|:----------|:-------------------------------------------|
| `method` | String | The name of the [API method](public-api-methods.html). |
| `params` | Array | _(Optional)_ A **one-item array** containing a nested JSON object with the parameters to this method. You may omit this field if the method does not require any parameters. |
The object inside the `params` array can contain the following fields:
| Field | Type | Description |
|:--------------------|:----------|:-------------------------------------------|
| `api_version` | Number | _(Optional)_ The API version to use. If omitted, use version 1. For details, see [API Versioning](#api-versioning). [New in: rippled 1.5.0][] |
| (Method Parameters) | (Various) | Provide any parameters to the method here. |
See [Response Formatting](response-formatting.html) for the response from the server.
## Commandline Format
Put the API method name after any normal (dash-prefaced) commandline options, followed by a limited set of parameters, separated by spaces. For any parameter values that might contain spaces or other unusual characters, use single-quotes to encapsulate them. Not all methods have commandline API syntax. For more information, see [Commandline Usage](https://xrpl.org/commandline-usage.html#client-mode-options).
The commandline calls JSON-RPC, so its responses always match the JSON-RPC [response format](response-formatting.html).
The commandline always uses the latest [API version](#api-versioning).
**Caution:** The commandline interface is intended for administrative purposes only and is _not a supported API_. New versions of `rippled` may introduce breaking changes to the commandline API without warning!
## API Versioning
The `rippled` server uses a single integer to identify the API version to use. The first API version is `1`; currently, this is the only version of the `rippled` API. (There is no API version 0.) [New in: rippled 1.5.0][]
Future versions of `rippled` that introduce breaking changes will introduce a new API version number, such as `2`. The server will support a range of API versions, which it reports in the `version` API method. <!-- TODO: add a link when `version` method is documented. --> <!-- Uncomment when multiple API versions exist: Separate API requests can use different API versions even on the same persistent connection. For example, if you connect WebSocket to a server that supports API versions 1 and 2, you can make a server_info request using API version 2 and then make another server_info request using API version 1 from the same connection. -->
### Breaking Changes
The following types of changes are **breaking changes**:
- Removing or renaming a field of a request or response.
- Changing the type of a field of a request or response.
- Changing the meaning of a field of a request or a response.
- Changing the order of positional parameters, or adding a new field before other positional parameters.
- Removing or renaming an API method.
- Changing the behavior of an API function visible to existing clients.
- The following types of breaking changes only apply to the gRPC API:
- Changing a `proto` field number.
- Removing or renaming an enum or enum value.
- Adding or removing fields from a `oneof`.
- Splitting or merging a `oneof`.
- Changing whether a message field is `optional`, `repeated`, or `required`.
- Changing the stream value of a request or response.
- Deleting or renaming a package or service.
Any time a full release introduces a breaking change, it introduces a new API version number. Pre-release, beta, and development versions may introduce breaking changes to the same API version number.
### Non-Breaking Changes
The following types of changes are **non-breaking changes** and may occur without a change of API version number:
- Adding a new field to a request or response, not including positional parameters.
- Adding a new API method.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,93 @@
---
html: response-formatting.html
parent: api-conventions.html
blurb: WebSocket、JSON-RPC、コマンドラインインターフェイスの応答のフォーマットとその応答に含まれるフィールド。
---
# 応答フォーマット
`rippled` APIからの応答のフォーマットは、メソッドが呼び出されたインターフェイスWebSocket、JSON-RPC、コマンドラインに応じて多少異なります。コマンドラインインターフェイスがJSON-RPCを呼び出すため、コマンドラインインターフェイスとJSON-RPCインターフェイスは同じフォーマットを使用します。
成功した場合の応答に含まれるフィールドは、以下の通りです。
| `Field` | 型 | 説明 |
|:----------------|:---------|:------------------------------------------------|
| `id` | (場合により異なる) | WebSocketのみこの応答の要求元となった要求で指定されているID。 |
| `status` | 文字列 | WebSocketのみ値が`success`である場合、要求がサーバーによって正常に受信され、理解されたことを示します。 |
| `result.status` | 文字列 | JSON-RPCおよびコマンドライン値が`success`である場合、要求がサーバーによって正常に受信され、理解されたことを示します。 |
| `type` | 文字列 | WebSocketのみ値が`response`の場合、コマンドに対する正常な応答であることを示します。[非同期の通知](subscribe.html)では、`ledgerClosed``transaction`など異なる値が使用されます。 |
| `result` | オブジェクト | クエリーの結果。内容はコマンドによって異なります。 |
## 成功した場合の応答の例
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 2,
"status": "success",
"type": "response",
"result": {
"account_data": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Balance": "27389517749",
"Flags": 0,
"LedgerEntryType": "AccountRoot",
"OwnerCount": 18,
"PreviousTxnID": "B6B410172C0B65575D89E464AF5B99937CC568822929ABF87DA75CBD11911932",
"PreviousTxnLgrSeq": 6592159,
"Sequence": 1400,
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05"
},
"ledger_index": 6760970
}
}
```
*JSON-RPC*
```
HTTP Status: 200 OK
{
"result": {
"account_data": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Balance": "27389517749",
"Flags": 0,
"LedgerEntryType": "AccountRoot",
"OwnerCount": 18,
"PreviousTxnID": "B6B410172C0B65575D89E464AF5B99937CC568822929ABF87DA75CBD11911932",
"PreviousTxnLgrSeq": 6592159,
"Sequence": 1400,
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05"
},
"ledger_index": 6761012,
"status": "success"
}
}
```
*コマンドライン*
```
{
"result": {
"account_data": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Balance": "27389517749",
"Flags": 0,
"LedgerEntryType": "AccountRoot",
"OwnerCount": 18,
"PreviousTxnID": "B6B410172C0B65575D89E464AF5B99937CC568822929ABF87DA75CBD11911932",
"PreviousTxnLgrSeq": 6592159,
"Sequence": 1400,
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05"
},
"ledger_index": 6761012,
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->

View File

@@ -0,0 +1,201 @@
---
html: response-formatting.html
parent: api-conventions.html
blurb: Standard response format, with examples, for the WebSocket, JSON-RPC, and Commandline interfaces.
---
# Response Formatting
Responses are formatted slightly differently based on whether the method is called with the WebSocket, JSON-RPC, or Commandline interfaces. The Commandline and JSON-RPC interfaces use the same format because the Commandline interface calls JSON-RPC.
The fields of a successful response include:
| `Field` | Type | Description |
|:----------------|:---------|:------------------------------------------------|
| `id` | (Varies) | (WebSocket only) ID provided in the request that prompted this response |
| `status` | String | (WebSocket only) The value `success` indicates the request was successfully received and understood by the server. Some [client libraries](client-libraries.html) omit this field on success. |
| `result.status` | String | (JSON-RPC and Commandline) The value `success` indicates the request was successfully received and understood by the server. Some [client libraries](client-libraries.html) omit this field on success. |
| `type` | String | (WebSocket only) The value `response` indicates a direct response to an API request. [Asynchronous notifications](subscribe.html) use a different value such as `ledgerClosed` or `transaction`. |
| `result` | Object | The result of the query; contents vary depending on the command. |
| `warning` | String | _(May be omitted)_ If this field is provided, the value is the string `load`. This means the client is approaching the [rate limiting](rate-limiting.html) threshold where the server will disconnect this client. <!-- STYLE_OVERRIDE: will --> |
| `warnings` | Array | _(May be omitted)_ If this field is provided, it contains one or more **Warnings Objects** with important warnings. For details, see [API Warnings](#api-warnings). [New in: rippled 1.5.0][] |
| `forwarded` | Boolean | _(May be omitted)_ If `true`, this request and response have been forwarded from a [Reporting Mode][] server to a P2P Mode server (and back) because the request requires data that is not available in Reporting Mode. The default is `false`. |
## Example Successful Response
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"status": "success",
"type": "response",
"result": {
"account_data": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Balance": "27389517749",
"Flags": 0,
"LedgerEntryType": "AccountRoot",
"OwnerCount": 18,
"PreviousTxnID": "B6B410172C0B65575D89E464AF5B99937CC568822929ABF87DA75CBD11911932",
"PreviousTxnLgrSeq": 6592159,
"Sequence": 1400,
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05"
},
"ledger_index": 6760970
}
}
```
*JSON-RPC*
```json
HTTP Status: 200 OK
{
"result": {
"account_data": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Balance": "27389517749",
"Flags": 0,
"LedgerEntryType": "AccountRoot",
"OwnerCount": 18,
"PreviousTxnID": "B6B410172C0B65575D89E464AF5B99937CC568822929ABF87DA75CBD11911932",
"PreviousTxnLgrSeq": 6592159,
"Sequence": 1400,
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05"
},
"ledger_index": 6761012,
"status": "success"
}
}
```
*Commandline*
```json
{
"result": {
"account_data": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Balance": "27389517749",
"Flags": 0,
"LedgerEntryType": "AccountRoot",
"OwnerCount": 18,
"PreviousTxnID": "B6B410172C0B65575D89E464AF5B99937CC568822929ABF87DA75CBD11911932",
"PreviousTxnLgrSeq": 6592159,
"Sequence": 1400,
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05"
},
"ledger_index": 6761012,
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
## API Warnings
When the response contains a `warnings` array, each member of the array represents a separate warning from the server. Each such **Warning Object** contains the following fields:
| `Field` | Type | Description |
|:----------|:-------|:--------------------------------------------------------|
| `id` | Number | A unique numeric code for this warning message. |
| `message` | String | A human-readable string describing the cause of this message. Do not write software that relies the contents of this message; use the `id` (and `details`, if applicable) to identify the warning instead. |
| `details` | Object | _(May be omitted)_ Additional information about this warning. The contents vary depending on the type of warning. |
The following reference describes all possible warnings.
### 1001. Unsupported amendments have reached majority
Example warning:
```json
"warnings" : [
{
"details" : {
"expected_date" : 864030,
"expected_date_UTC" : "2000-Jan-11 00:00:30.0000000 UTC"
},
"id" : 1001,
"message" : "One or more unsupported amendments have reached majority. Upgrade to the latest version before they are activated to avoid being amendment blocked."
}
]
```
This warning indicates that the one or more [amendments](amendments.html) to the XRP Ledger protocol are scheduled to become enabled, but the current server does not have an implementation for those amendments. If those amendments become enabled, the current server will become [amendment blocked](amendments.html#amendment-blocked), so you should [upgrade to the latest `rippled` version](install-rippled.html) as soon as possible. <!-- STYLE_OVERRIDE: will -->
The server only sends this warning if the client is [connected as an admin](get-started-using-http-websocket-apis.html#admin-access).
This warning includes a `details` field with the following fields:
| Field | Value | Description |
|:--------------------|:-------|:----------------------------------------------|
| `expected_date` | Number | The time that the first unsupported amendment is expected to become enabled, in [seconds since the Ripple Epoch][]. |
| `expected_date_UTC` | String | The timestamp, in UTC, when the first unsupported amendment is expected to become enabled. |
Due to the variation in ledger close times, these times are approximate. It is also possible that the amendment fails to maintain support from >80% of validators until the specified time, and does not become enabled at the expected time. The server will not become amendment blocked so long as the unsupported amendments do not become enabled.
### 1002. This server is amendment blocked
Example warning:
```json
"warnings" : [
{
"id" : 1002,
"message" : "This server is amendment blocked, and must be updated to be able to stay in sync with the network."
}
]
```
This warning indicates that the server is [amendment blocked](amendments.html#amendment-blocked) and can no longer remain synced with the XRP Ledger.
The server administrator must [upgrade `rippled`](install-rippled.html) to a version that supports the activated amendments.
### 1003. This is a reporting server
[New in: rippled 1.7.0][]
Example warning:
```json
"warnings" : [
{
"id" : 1003,
"message" : "This is a reporting server. The default behavior of a reporting server is to only return validated data. If you are looking for not yet validated data, include \"ledger_index : current\" in your request, which will cause this server to forward the request to a p2p node. If the forward is successful the response will include \"forwarded\" : \"true\""
}
]
```
This warning indicates that the server answering the request is running [Reporting Mode][]. Certain API methods are not available or behave differently because Reporting Mode does not connect to the peer-to-peer network and does not track ledger data that has not yet been validated.
It is generally safe to ignore this warning.
**Caution:** If you request ledger data without explicitly [specifying a ledger version][Specifying Ledgers], Reporting Mode uses the latest validated ledger by default instead of the current in-progress ledger.
## See Also
- [Request Formatting](request-formatting.html)
- [Error Formatting](error-formatting.html) for unsuccessful API responses.
- **Concepts:**
- [The `rippled` Server](xrpl-servers.html)
- [Introduction to Consensus](intro-to-consensus.html)
- [Amendments](amendments.html)
- [Known Amendments](known-amendments.html)
- **Tutorials:**
- [Get Started with XRP Ledger APIs](get-started-using-http-websocket-apis.html)
- [Install and Update `rippled`](install-rippled.html)
- **References:**
- [feature method][]
- [server_info method][]
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,27 @@
---
html: rippled-server-states.html
parent: api-conventions.html
blurb: 一部のAPIメソッドで報告される状態情報の定義です。
labels:
- コアサーバー
---
# rippledサーバーの状態
`rippled`サーバーの設定、稼働時間、その他の要素により、サーバーがグローバルなXRP Ledgerピアツーピアネットワークに参加する度合いは異なります。これは、[server_infoメソッド][]と[server_stateメソッド][]への応答内の`server_state`フィールドに示されます。応答は昇順のやり取りに従い、後の値は前の値より優先されます。これらの応答の定義を以下に示します(優先順位の高い順)。
| `Value` | 説明 |
|:---------------|:------------------------------------------------------------|
| `disconnected` | サーバーはXRP Ledgerピアツーピアネットワークにまったく接続されていません。オフラインモードで稼働しているか、何らかの理由でネットワークにアクセスできない可能性があります。 |
| `connected` | サーバーはネットワークに接続されていると考えられます。 |
| `syncing` | サーバーは現在、レジャーバージョンの状態に追いついていません。(通常、サーバーが始動後に最新状態になるまで数分かかります。) |
| `tracking` | サーバーはネットワークに接続しています。 |
| `full` | サーバーはネットワークに完全に組み込まれ、検証にも参加できますが、参加していません(検証者として設定されていないことが原因と考えられます)。 |
| `validating` | サーバーは現在、レジャーの検証に参加しています。 |
| `proposing` | サーバーはレジャーの検証に参加しており、現在、自身のバージョンを提案中です。 |
**注記:** `full``validating``proposing`の区別は、グローバルネットワークの他者との同期の状況に基づいていますが、通常サーバーの上記の状態は一般的なオペレーションの中で変動します。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,27 @@
---
html: rippled-server-states.html
parent: api-conventions.html
blurb: Definitions of state information reported in some API methods.
labels:
- Core Server
---
# rippled Server States
Depending on how the `rippled` server is configured, how long it has been running, and other factors, a server may be participating in the global XRP Ledger peer-to-peer network to different degrees. This is represented as the `server_state` field in the responses to the [server_info method][] and [server_state method][]. The possible responses follow a range of ascending interaction, with each later value superseding the previous one. Their definitions are as follows (in order of increasing priority):
| `Value` | Description |
|:---------------|:------------------------------------------------------------|
| `disconnected` | The server is not connected to the XRP Ledger peer-to-peer network whatsoever. It may be running in offline mode, or it may not be able to access the network for whatever reason. |
| `connected` | The server believes it is connected to the network. |
| `syncing` | The server is currently behind on ledger versions. (It is normal for a server to spend a few minutes catching up after you start it.) |
| `tracking` | The server is in agreement with the network |
| `full` | The server is fully caught-up with the network and could participate in validation, but is not doing so (possibly because it has not been configured as a validator). |
| `validating` | The server is currently participating in validation of the ledger |
| `proposing` | The server is participating in validation of the ledger and currently proposing its own version. |
**Note:** The distinction between `full`, `validating`, and `proposing` is based on synchronization with the rest of the global network, and it is normal for a server to fluctuate between these states as a course of general operation.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,306 @@
---
html: clio-server-info.html
parent: clio-methods.html
blurb: Retrieve status of the Clio server in human-readable format.
labels:
- Core Server
---
# server_info
[[Source]](https://github.com/XRPLF/clio/blob/master/src/rpc/handlers/ServerInfo.cpp "Source")
The `server_info` command asks the Clio server for a human-readable version of various information about the Clio server being queried.
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 1,
"command": "server_info"
}
```
*JSON-RPC*
```json
{
"method": "server_info",
"params": [
{}
]
}
```
*Commandline*
```sh
#Syntax: server_info
rippled server_info
```
<!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#server_info)
The request does not take any parameters.
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 1,
"result": {
"info": {
"build_version": "1.7.2",
"complete_ledgers": "64572720-65887227",
"hostid": "LARD",
"io_latency_ms": 1,
"jq_trans_overflow": "0",
"last_close": {
"converge_time_s": 3.004,
"proposers": 41
},
"load_factor": 512.578125,
"load_factor_server": 1,
"peer_disconnects": "365016",
"peer_disconnects_resources": "336",
"peers": 211,
"pubkey_node": "n9MozjnGB3tpULewtTsVtuudg5JqYFyV3QFdAtVLzJaxHcBaxuXD",
"server_state": "full",
"server_state_duration_us": "3589068181859",
"state_accounting": {
"connected": {
"duration_us": "301410595",
"transitions": 2
},
"disconnected": {
"duration_us": "1207534",
"transitions": 2
},
"full": {
"duration_us": "3589270527034",
"transitions": 2
},
"syncing": {
"duration_us": "6182323",
"transitions": 2
},
"tracking": {
"duration_us": "43",
"transitions": 2
}
},
"time": "2021-Aug-24 20:46:22.194299 UTC",
"uptime": 3589579,
"validated_ledger": {
"age": 3,
"base_fee_xrp": 0.00001,
"hash": "F00F0E590242702B895BE378B6A6D365C094A047CFC8B11DD323D16F81CC67A5",
"reserve_base_xrp": 20,
"reserve_inc_xrp": 5,
"seq": 65887227
},
"validation_quorum": 33
}
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"info": {
"build_version": "1.7.2",
"complete_ledgers": "64735538-65886965",
"hostid": "TOLL",
"io_latency_ms": 1,
"jq_trans_overflow": "3",
"last_close": {
"converge_time_s": 3,
"proposers": 41
},
"load_factor": 1,
"peer_disconnects": "467400",
"peer_disconnects_resources": "16316",
"peers": 85,
"pubkey_node": "n9Mdk7abYaVvded5zic9oDEY3NULv9RmeJ9Z5hgjXX1ycZqAGhTn",
"server_state": "full",
"server_state_duration_us": "627203282776",
"state_accounting": {
"connected": {
"duration_us": "600242389",
"transitions": 40
},
"disconnected": {
"duration_us": "112927",
"transitions": 1
},
"full": {
"duration_us": "3591757226163",
"transitions": 46
},
"syncing": {
"duration_us": "5304456",
"transitions": 7
},
"tracking": {
"duration_us": "13989631",
"transitions": 46
}
},
"time": "2021-Aug-24 20:29:53.291350 UTC",
"uptime": 3592376,
"validated_ledger": {
"age": 2,
"base_fee_xrp": 0.00001,
"hash": "B79D223A27F4EC214C9BA85665B12EE76C1EE2CB887BBCBAFB6484355C43FEFA",
"reserve_base_xrp": 20,
"reserve_inc_xrp": 5,
"seq": 65886965
},
"validation_quorum": 33
},
"status": "success"
}
}
```
*Commandline*
```json
Loading: "/etc/opt/ripple/rippled.cfg"
2020-Mar-24 01:28:22.288484766 UTC HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result": {
"info": {
"build_version": "1.7.2",
"complete_ledgers": "64735538-65886965",
"hostid": "TOLL",
"io_latency_ms": 1,
"jq_trans_overflow": "3",
"last_close": {
"converge_time_s": 3,
"proposers": 41
},
"load_factor": 1,
"peer_disconnects": "467400",
"peer_disconnects_resources": "16316",
"peers": 85,
"pubkey_node": "n9Mdk7abYaVvded5zic9oDEY3NULv9RmeJ9Z5hgjXX1ycZqAGhTn",
"server_state": "full",
"server_state_duration_us": "627203282776",
"state_accounting": {
"connected": {
"duration_us": "600242389",
"transitions": 40
},
"disconnected": {
"duration_us": "112927",
"transitions": 1
},
"full": {
"duration_us": "3591757226163",
"transitions": 46
},
"syncing": {
"duration_us": "5304456",
"transitions": 7
},
"tracking": {
"duration_us": "13989631",
"transitions": 46
}
},
"time": "2021-Aug-24 20:29:53.291350 UTC",
"uptime": 3592376,
"validated_ledger": {
"age": 2,
"base_fee_xrp": 0.00001,
"hash": "B79D223A27F4EC214C9BA85665B12EE76C1EE2CB887BBCBAFB6484355C43FEFA",
"reserve_base_xrp": 20,
"reserve_inc_xrp": 5,
"seq": 65886965
},
"validation_quorum": 33
},
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing an `info` object as its only field.
The `info` object may have some arrangement of the following fields:
| `Field` | Type | Description |
|:------------------------------------|:----------------|:---------------------|
| `amendment_blocked` | Boolean | _(May be omitted)_ If `true`, this server is [amendment blocked](amendments.html#amendment-blocked). If the server is not amendment blocked, the response omits this field. [New in: rippled 0.80.0][] |
| `build_version` | String | The version number of the running `rippled` version. |
| `closed_ledger` | Object | _(May be omitted)_ Information on the most recently closed ledger that has not been validated by consensus. If the most recently validated ledger is available, the response omits this field and includes `validated_ledger` instead. The member fields are the same as the `validated_ledger` field. |
| `complete_ledgers` | String | Range expression indicating the sequence numbers of the ledger versions the local `rippled` has in its database. This may be a disjoint sequence such as `24900901-24900984,24901116-24901158`. If the server does not have any complete ledgers (for example, it recently started syncing with the network), this is the string `empty`. |
| `hostid` | String | On an admin request, returns the hostname of the server running the `rippled` instance; otherwise, returns a single [RFC-1751][] word based on the [node public key](peer-protocol.html#node-key-pair). |
| `io_latency_ms` | Number | Amount of time spent waiting for I/O operations, in milliseconds. If this number is not very, very low, then the `rippled` server is probably having serious load issues. |
| `jq_trans_overflow` | String - Number | The number of times (since starting up) that this server has had over 250 transactions waiting to be processed at once. A large number here may mean that your server is unable to handle the transaction load of the XRP Ledger network. For detailed recommendations of future-proof server specifications, see [Capacity Planning](capacity-planning.html). [New in: rippled 0.90.0][] |
| `last_close` | Object | Information about the last time the server closed a ledger, including the amount of time it took to reach a consensus and the number of trusted validators participating. |
| `last_close.converge_time_s` | Number | The amount of time it took to reach a consensus on the most recently validated ledger version, in seconds. |
| `last_close.proposers` | Number | How many trusted validators the server considered (including itself, if configured as a validator) in the consensus process for the most recently validated ledger version. |
| `load` | Object | _(Admin only)_ Detailed information about the current load state of the server. |
| `load.job_types` | Array | _(Admin only)_ Information about the rate of different types of jobs the server is doing and how much time it spends on each. |
| `load.threads` | Number | _(Admin only)_ The number of threads in the server's main job pool. |
| `load_factor` | Number | The load-scaled open ledger transaction cost the server is currently enforcing, as a multiplier on the base transaction cost. For example, at `1000` load factor and a reference transaction cost of 10 drops of XRP, the load-scaled transaction cost is 10,000 drops (0.01 XRP). The load factor is determined by the highest of the [individual server's load factor](transaction-cost.html#local-load-cost), the cluster's load factor, the [open ledger cost](transaction-cost.html#open-ledger-cost) and the overall network's load factor. [Updated in: rippled 0.33.0][] |
| `load_factor_local` | Number | _(May be omitted)_ Current multiplier to the [transaction cost][] based on load to this server. |
| `load_factor_net` | Number | _(May be omitted)_ Current multiplier to the [transaction cost][] being used by the rest of the network (estimated from other servers' reported load values). |
| `load_factor_cluster` | Number | _(May be omitted)_ Current multiplier to the [transaction cost][] based on load to servers in [this cluster](clustering.html). |
| `load_factor_fee_escalation` | Number | _(May be omitted)_ The current multiplier to the [transaction cost][] that a transaction must pay to get into the open ledger. [New in: rippled 0.32.0][] |
| `load_factor_fee_queue` | Number | _(May be omitted)_ The current multiplier to the [transaction cost][] that a transaction must pay to get into the queue, if the queue is full. [New in: rippled 0.32.0][] |
| `load_factor_server` | Number | _(May be omitted)_ The load factor the server is enforcing, not including the [open ledger cost](transaction-cost.html#open-ledger-cost). [New in: rippled 0.33.0][] |
| `peers` | Number | How many other `rippled` servers this one is currently connected to. |
| `pubkey_node` | String | Public key used to verify this server for peer-to-peer communications. This [_node key pair_](peer-protocol.html#node-key-pair) is automatically generated by the server the first time it starts up. (If deleted, the server can create a new pair of keys.) You can set a persistent value in the config file using the `[node_seed]` config option, which is useful for [clustering](clustering.html). |
| `pubkey_validator` | String | _(Admin only)_ Public key used by this node to sign ledger validations. This _validation key pair_ is derived from the `[validator_token]` or `[validation_seed]` config field. |
| `server_state` | String | A string indicating to what extent the server is participating in the network. See [Possible Server States](rippled-server-states.html) for more details. |
| `server_state_duration_us` | Number | The number of consecutive microseconds the server has been in the current state. [New in: rippled 1.2.0][] |
| `state_accounting` | Object | A map of various [server states](rippled-server-states.html) with information about the time the server spends in each. This can be useful for tracking the long-term health of your server's connectivity to the network. [New in: rippled 0.30.1][] |
| `state_accounting.*.duration_us` | String | The number of microseconds the server has spent in this state. (This is updated whenever the server transitions into another state.) [New in: rippled 0.30.1][] |
| `state_accounting.*.transitions` | Number | The number of times the server has changed into this state. [New in: rippled 0.30.1][] |
| `time` | String | The current time in UTC, according to the server's clock. [Updated in: rippled 1.5.0][] |
| `uptime` | Number | Number of consecutive seconds that the server has been operational. [New in: rippled 0.30.1][] |
| `validated_ledger` | Object | _(May be omitted)_ Information about the most recent fully-validated ledger. If the most recent validated ledger is not available, the response omits this field and includes `closed_ledger` instead. |
| `validated_ledger.age` | Number | The time since the ledger was closed, in seconds. |
| `validated_ledger.base_fee_xrp` | Number | Base fee, in XRP. This may be represented in scientific notation such as `1e-05` for 0.00001. |
| `validated_ledger.hash` | String | Unique hash for the ledger, as hexadecimal. |
| `validated_ledger.reserve_base_xrp` | Number | Minimum amount of XRP (not drops) necessary for every account to keep in reserve |
| `validated_ledger.reserve_inc_xrp` | Number | Amount of XRP (not drops) added to the account reserve for each object an account owns in the ledger. |
| `validated_ledger.seq` | Number | The [ledger index][] of the latest validated ledger. |
| `validation_quorum` | Number | Minimum number of trusted validations required to validate a ledger version. Some circumstances may cause the server to require more validations. |
| `validator_list_expires` | String | _(Admin only)_ Either the human readable time, in UTC, when the current validator list will expire, the string `unknown` if the server has yet to load a published validator list or the string `never` if the server uses a static validator list. [Updated in: rippled 1.5.0][] |
**Note:** If the `closed_ledger` field is present and has a small `seq` value (less than 8 digits), that indicates `rippled` does not currently have a copy of the validated ledger from the peer-to-peer network. This could mean your server is still syncing. Typically, it takes about 5 minutes to sync with the network, depending on your connection speed and hardware specs.
## Possible Errors
* Any of the [universal error types][].
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,187 @@
---
html: commandline-usage.html
parent: http-websocket-apis.html
blurb: rippledサーバーのコマンドライン使用オプションです。
curated_anchors:
- name: 使用できるモード
anchor: "#使用できるモード"
- name: デーモンモードのオプション
anchor: "#デーモンモードのオプション"
- name: スタンドアロンモードのオプション
anchor: "#スタンドアロンモードのオプション"
- name: クライアントモードのオプション
anchor: "#クライアントモードのオプション"
- name: 単体テスト
anchor: "#単体テスト"
labels:
- コアサーバー
---
# rippledコマンドライン使用リファレンス
`rippled`実行可能ファイルは、通常はXRP Ledgerを処理するデーモンとして実行されますが、他のモードでも実行できます。このページでは、コマンドラインから実行する場合に`rippled`に渡すことができるすべてのオプションを説明します。
## 使用できるモード
- **デーモンモード** - デフォルトです。XRP Ledgerに接続して、トランザクションを処理し、レジャーデータベースを構築します。
- **スタンドアロンモード** - `-a`または`--standalone`オプションを使用します。他のサーバーには接続できない以外は、デーモンモードと同様です。このモードは、トランザクション処理やその他の機能のテストに使用できます。
- **クライアントモード** - APIメソッドの名前を指定して、別の`rippled`サーバーにJSON-RPCクライアントとして接続し、その後終了します。実行可能ファイルがすでに別のプロセスで実行中である場合に、このモードを使用してサーバーのステータスとレジャーデータを確認できます。
- **その他の使用法** - 以下の各コマンドを実行すると、`rippled`実行可能ファイルが何らかの情報を出力し、その後終了します。
- **ヘルプ** - 使用法の説明を出力するには、`-h`または`--help`を使用します。
- **単体テスト** - 単体テストを実行し、結果の概要を出力するには、`-u`または`--unittest`を使用します。rippledが正しくコンパイルされていることを確認する場合に便利です。
- **バージョンステートメント** - `rippled`のバージョン番号を出力し、その後終了するには、`--version`を使用します。
## 汎用オプション
ほとんどのモードに適用されるオプションは、以下の通りです。
| オプション | 説明 |
|:----------------|:-----------------------------------------------------------|
| `--conf {FILE}` | デフォルトのロケーションで構成ファイルを検索する代わりに、構成ファイルとして`{FILE}`を使用します。指定されていない場合、`rippled`は最初にローカル作業ディレクトリで`rippled.cfg`ファイルがあるかどうかを調べます。Linuxでは、このファイルが見つからない場合`rippled`は次に`$XDG_CONFIG_HOME/ripple/ripple.cfg`を確認します。(一般的に`$XDG_CONFIG_HOME`の場所は`$HOME/.config`です。) |
### 詳細レベルのオプション
次の汎用オプションは、標準出力とログファイルに書き込まれる情報の量を制御します。
| オプション | 短縮形 | 説明 |
|:------------|:--------------|:-----------------------------------------------|
| `--debug` | | **廃止予定** トレースレベルのデバッグを有効にします(`--verbose`のエイリアス)。代わりに[log_levelメソッド][]を使用してください。 |
| `--silent` | | 起動中にログを標準出力と標準エラー出力に書き込みません。冗長なログを削減するために`rippled`をsystemdユニットとして開始する場合に推奨されます。 |
| `--verbose` | `-v` | **廃止予定** トレースレベルデバッグを有効にします。代わりに[log_levelメソッド][]を使用してください。 |
## デーモンモードのオプション
```bash
rippled [OPTIONS]
```
デーモンモードは、`rippled`のデフォルトの運用モードです。[汎用オプション](#汎用オプション)の他に、以下のいずれかのオプションを指定できます。
| オプション | 説明 |
|:--------------------|:-------------------------------------------------------|
| `--fg` | デーモンをフォアグラウンドでシングルプロセスとして実行します。このオプションを指定しない場合、`rippled`は1番目のプロセスがモニターとして実行されている間に、デーモンの2番目のプロセスをフォークします。 |
| `--import` | 完全に起動する前に、別の`rippled`サーバーのレジャーストアーからレジャーデータをインポートしてください。構成ファイルに有効な`[import_db]`スタンザが指定されている必要があります。 |
| `--net` | **廃止予定** デバッグのためのオプションです。ネットワークからレジャーを取得できるようになるまで、ローカルレジャーを作成しません。 |
| `--nodetoshard` | 完全に起動する前に、すべての完全な[履歴シャード](history-sharding.html)をレジャーストアーからシャードストアーにコピーしてくださいシャードストアーに設定されている最大ディスク容量まで。CPUとI/Oを大量に使用します。注意: このコマンドは、データを(移動するのではなく)コピーするため、シャードストアーとレジャーストアーの両方にデータを保存するのに十分なディスク容量が必要です。 <!--{# Task for writing a tutorial to use this: DOC-1639 #}--> |
| `--quorum {QUORUM}` | これは[テストネットワーク](parallel-networks.html)のブートストラップ用のオプションです。検証のための最小定数をオーバーライドするには、`{QUORUM}`の信頼できるバリデータの同意を必要とします。デフォルトでは、検証のための定数は、信頼できるバリデータの実際の数に基づき、安全な数に自動的に設定されます。一部のバリデータがオンラインではない場合、このオプションにより、標準定数よりも少ない数のバリデータで続行できるようになります。**警告:** 定数を手動で設定すると、設定した値が小さすぎるためにサーバーがネットワークの他の部分から分岐することを防ぐことができない可能性があります。このオプションは、コンセンサスを十分に理解し、標準以外の設定を使用する必要がある場合にのみ使用してください。 |
次のフィールドは廃止されました: `--validateShards`。 [削除: rippled 1.7.0][]
## スタンドアロンモードのオプション
```bash
rippled --standalone [OPTIONS]
rippled -a [OPTIONS]
```
スタンドアロンモードで実行します。このモードでは、`rippled`はネットワークに接続しないか、またはコンセンサスを実行しません。(それ以外の場合、`rippled`はデーモンモードで実行されます。)
### 初期レジャーオプション
以下のオプションにより、起動時に最初に読み込むレジャーが判断されます。これらはのオプションは、履歴レジャーのリプレイまたはテストネットワークのブートストラップのためのものです。
| オプション | 説明 |
|:----------------------|:-----------------------------------------------------|
| `--ledger {LEDGER}` | `{LEDGER}`(レジャーハッシュまたはレジャーインデックス)により初期レジャーと識別されているレジャーバージョンを読み込みます。指定されたレジャーバージョンは、サーバーのレジャーストアーに格納される必要があります。 |
| `--ledgerfile {FILE}` | 指定された`{FILE}`からレジャーバージョンを読み込みますこのファイルには完全なレジャーがJSONフォーマットで格納されている必要があります。このようなファイルの例については、付属の[`ledger-file.json`]({{target.github_forkurl}}/blob/{{target.github_branch}}/content/_api-examples/rippled-cli/ledger-file.json)を参照してください。 |
| `--load` | **廃止予定** デバッグのためのオプションです。ディスク上のレジャーストアーから初期レジャーを読み込むだけです。 |
| `--replay` | デバッグのためのオプションです。`--ledger`と組み合わせて使用し、レジャーの閉鎖をリプレイします。サーバーのレジャーストアーには、当該レジャーとその直前のバージョンのレジャーがすでに格納されている必要があります。サーバーでは、前のレジャーをベースとして使用して、指定されたレジャーのすべてのトランザクションが処理されます。その結果、指定されたレジャーが再作成されます。デバッガーを使用して、特定のトランザクションの処理ロジックを分析するためのブレークポイントを追加できます。 |
| `--start` | デバッグのためのオプションです。既知のすべてのAmendment反対票を投じるようにサーバーに設定されているAmendmentを除くが適用されている新しいジェネシスレジャーを使用して開始します。したがってこれらのAmendmentの機能は、2週間の[Amendmentプロセス](amendments.html)期間ではなく、2番目のレジャーの開始時から使用可能になります。 |
| `--valid` | **廃止予定** デバッグのためのオプションです。ネットワークとの完全同期の前であっても、初期レジャーを有効なネットワークレジャーと見なします。 |
## クライアントモードのオプション
```bash
rippled [OPTIONS] -- {COMMAND} {COMMAND_PARAMETERS}
```
クライアントモードでは、`rippled`実行可能ファイルが別の`rippled`サービスのクライアントとして動作します。(サービスは別のプロセスでローカルに実行されている同じ実行可能ファイルである場合や、別のサーバー上の`rippled`サーバーである場合があります。)
クライアントモードで実行するには、いずれかの[`rippled` API](http-websocket-apis.html)メソッドの[コマンドライン構文](request-formatting.html#コマンドライン形式)を指定します。
クライアントモードは、個別のコマンド構文の他に、[汎用オプション](#汎用オプション)と以下のオプションに対応します。
| オプション | 説明 |
|:------------------------|:---------------------------------------------------|
| `--rpc` | サーバーをクライアントモードで実行することを明示的に指定します。必須ではありません。 |
| `--rpc_ip {IP_ADDRESS}` | 指定されたIPアドレスの`rippled`サーバーに接続します。オプションでポート番号も指定します。 |
| `--rpc_port {PORT}` | **廃止予定** 指定されたポートで`rippled`サーバーに接続します。代わりに、`--rpc_ip`を使用してIPアドレスとともにポートを指定します。 |
**ヒント:** 一部の引数では、マイナスの値を指定できます。APIコマンドの引数がオプションとして解釈されないようにするには、コマンド名の前に`--`引数を渡します。
使用例(使用可能な最も古いレジャーバージョンから最新のレジャーバージョンまでのアカウントトランザクション履歴を取得):
```bash
rippled -- account_tx r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 -1 -1
```
## 単体テスト
```bash
rippled --unittest [OPTIONS]
rippled -u [OPTIONS]
```
単体テストでは、`rippled`ソースコードに組み込まれているテストを実行し、実行可能ファイルが予期されているとおりに動作することを確認します。単体テストの実行が完了すると、結果の概要が表示され、終了します。単体テストでは、組み込みのデータ型やトランザクション処理ルーチンなどの機能がカバーされます。
単体テストから失敗が報告される場合、一般的に次のいずれかの状況が発生しています。
- `rippled`のコンパイル時に問題が発生し、意図したとおりに機能していない
- `rippled`のソースコードにバグがある
- 単体テストにバグがあるか、単体テストが新しい動作に対応して更新されていない
単体テストの実行時には、[汎用オプション](#汎用オプション)と以下のいずれかのオプションを指定できます。
| オプション | 短縮形 | 説明 |
|:-----------------------------------|:--------------|:------------------------|
| `--unittest-ipv6` | | 単体テストの実行時に[IPv6](https://en.wikipedia.org/wiki/IPv6)を使用してローカルサーバーに接続します。このオプションが指定されていない場合、単体テストではIPv4が代わりに使用されます。[新規: rippled 1.1.0][] |
| `--unittest-jobs {NUMBER_OF_JOBS}` | | 指定された数のプロセスを使用して単体テストを実行します。これにより、マルチコアシステムの単体テストをより短時間で終了できます。`{NUMBER_OF_JOBS}`には、使用するプロセスの数を示すプラスの整数値を指定します。 |
| `--unittest-log` | | `--quiet`が指定されている場合でも、単体テストにてログへの書き込みができるようにします。(それ以外の影響はありません。) |
| `--quiet` | `-q` | 単体テストの実行時に出力される診断メッセージの数が減少します。 |
### 特定の単体テスト
```bash
rippled --unittest={TEST_OR_PACKAGE_NAME}
```
デフォルトでは、`rippled`は「手動」に分類されている単体テスト以外のすべての単体テストを実行します。テストの名前を指定してテストを個別に実行するか、またはパッケージ名を指定してテストのサブセットを実行することができます。
テストはパッケージの階層にまとめられます。パッケージは`.`文字で区切られ、テストケース名で終わります。
#### 単体テストの出力
```bash
rippled --unittest=print
```
`print`は、使用可能なテストとそのパッケージのリストを出力する特殊な単体テストです。
#### 手動単体テスト
完了に時間を要する一部の単体テストは、「手動」に分類されています。このようなテストについては、`print`単体テストの出力に`|M|`と表示されます。すべての単体テストまたは単体テストのパッケージを実行するときには、手動テストはデフォルトで実行されません。手動テストを個別に実行するには、テスト名を指定します。例:
```bash
$ ./rippled --unittest=ripple.tx.OversizeMeta
ripple.tx.OversizeMeta
Longest suite times:
60.9s ripple.tx.OversizeMeta
60.9s, 1 suite, 1 case, 9016 tests total, 0 failures
```
#### 単体テストの引数の指定
特定の手動単体テストでは引数を指定できます。以下のオプションを使用して引数を指定します。
| オプション | 説明 |
|:------------------------|:---------------------------------------------------|
| `--unittest-arg {ARG}` | 実行される単体テストに引数`{ARG}`を指定します。引数を受け入れる単体テストはそれぞれ、固有の引数形式を定義しています。 |
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,186 @@
---
html: commandline-usage.html
parent: http-websocket-apis.html
blurb: Commandline usage options for the rippled server.
curated_anchors:
- name: Available Modes
anchor: "#available-modes"
- name: Daemon Mode Options
anchor: "#daemon-mode-options"
- name: Stand-Alone Mode Options
anchor: "#stand-alone-mode-options"
- name: Client Mode Options
anchor: "#client-mode-options"
- name: Unit Tests
anchor: "#unit-tests"
labels:
- Core Server
---
# rippled Commandline Usage Reference
The `rippled` executable usually runs as a daemon that powers the XRP Ledger, although it can also run in other modes. This page describes all the options you can pass to `rippled` when running it from the command line.
## Available Modes
- **Daemon Mode** - The default. Connect to the XRP Ledger to process transactions and build a ledger database.
- **Stand-Alone Mode** - Use the `-a` or `--standalone` option. Like daemon mode, except it does not connect to other servers. You can use this mode to test transaction processing or other features.
- **Client Mode** - Specify an API method name to connect to another `rippled` server as a JSON-RPC client, then exit. You can use this to look up server status and ledger data if the executable is already running in another process.
- **Other Usage** - Each of the following commands causes the `rippled` executable to print some information, then exit:
- **Help** - Use `-h` or `--help` to print a usage statement.
- **Unit Tests** - Use `-u` or `--unittest` to run unit tests and print a summary of results. This can be helpful to confirm that you have compiled `rippled` successfully.
- **Version statement** - Use `--version` to have `rippled` print its version number, then exit.
## Generic Options
These options apply to most modes:
| Option | Description |
|:----------------|:-----------------------------------------------------------|
| `--conf {FILE}` | Use `{FILE}` as the config file instead of looking for config files in the default locations. If not specified, `rippled` first checks the local working directory for a `rippled.cfg` file. On Linux, if that file is not found, `rippled` next checks for `$XDG_CONFIG_HOME/ripple/ripple.cfg`. (Typically, `$XDG_CONFIG_HOME` maps to `$HOME/.config`.) |
### Verbosity Options
The following generic options affect the amount of information written to standard output and log files:
| Option | Short Version | Description |
|:------------|:--------------|:-----------------------------------------------|
| `--debug` | | **DEPRECATED** Enables trace-level debugging (alias for `--verbose`). Use the [log_level method][] instead. |
| `--silent` | | Don't write logs to standard out and standard error during startup. Recommended when starting `rippled` as a systemd unit to reduce redundant logging. |
| `--verbose` | `-v` | **DEPRECATED** Enables trace-level debugging. Use the [log_level method][] instead. |
## Daemon Mode Options
```bash
rippled [OPTIONS]
```
Daemon mode is the default mode of operation for `rippled`. In addition to the [Generic Options](#generic-options), you can provide any of the following:
| Option | Description |
|:--------------------|:-------------------------------------------------------|
| `--fg` | Run the daemon as a single process in the foreground. Otherwise, `rippled` forks a second process for the daemon while the first process runs as a monitor. |
| `--import` | Before fully starting, import ledger data from another `rippled` server's ledger store. Requires a valid `[import_db]` stanza in the config file. |
| `--net` | **DEPRECATED** Intended for debugging: do not build a local ledger until one can be obtained from the network. |
| `--nodetoshard` | Before fully starting, copy any complete [history shards](history-sharding.html) from the ledger store into the shard store, up to the shard store's configured maximum disk space. Uses large amounts of CPU and I/O. Caution: this command copies data (instead of moving it), so you must have enough disk space to store the data in both the shard store and the ledger store. <!--{# Task for writing a tutorial to use this: DOC-1639 #}--> |
| `--quorum {QUORUM}` | This option is intended for starting [test networks](parallel-networks.html). Override the minimum quorum for validation by requiring an agreement of `{QUORUM}` trusted validators. By default, the quorum for validation is automatically set to a safe number of trusted validators based on how many there are. If some validators are not online, this option can allow progress with a lower than normal quorum. **Warning:** If you set the quorum manually, it may be too low to prevent your server from diverging from the rest of the network. Only use this option if you have a deep understanding of consensus and have a need to use a non-standard configuration. |
The following option has been removed: `--validateShards`. [Removed in: rippled 1.7.0][]
## Stand-Alone Mode Options
```bash
rippled --standalone [OPTIONS]
rippled -a [OPTIONS]
```
Run in [stand-alone mode](rippled-server-modes.html). In this mode, `rippled` does not connect to the network or perform consensus. (Otherwise, `rippled` runs in daemon mode.)
### Initial Ledger Options
The following options determine which ledger to load first when starting up. These options are intended for replaying historical ledgers or starting test networks.
| Option | Description |
|:----------------------|:-----------------------------------------------------|
| `--ledger {LEDGER}` | Load the ledger version identified by `{LEDGER}` (either a ledger hash or a ledger index) as the initial ledger. The specified ledger version must be in the server's ledger store. |
| `--ledgerfile {FILE}` | Load the ledger version from the specified `{FILE}`, which must contain a complete ledger in JSON format. For an example of such a file, see the provided [`ledger-file.json`]({{target.github_forkurl}}/blob/{{target.github_branch}}/content/_api-examples/rippled-cli/ledger-file.json). |
| `--load` | **DEPRECATED** Intended for debugging. Only load the initial ledger from the ledger store on disk. |
| `--replay` | Intended for debugging. Use with `--ledger` to replay a ledger close. Your server must have the ledger in question and its direct ancestor already in the ledger store. Using the previous ledger as a base, the server processes all the transactions in the specified ledger, resulting in a re-creation of the specified ledger. With a debugger, you can add breakpoints to analyze specific transaction processing logic. |
| `--start` | Intended for debugging. Start with a new genesis ledger that has all known amendments (except those the server is configured to vote against) enabled. The functionality of those amendments is therefore available starting from the second ledger, rather than going through the full two-week [Amendment Process](amendments.html). |
| `--valid` | **DEPRECATED** Intended for debugging. Consider the initial ledger a valid network ledger even before fully syncing with the network. |
## Client Mode Options
```bash
rippled [OPTIONS] -- {COMMAND} {COMMAND_PARAMETERS}
```
In client mode, the `rippled` executable acts as a client to another `rippled` service. (The service may be the same executable running in a separate process locally, or it could be a `rippled` server on another server.)
To run in client mode, provide the [commandline syntax](request-formatting.html#commandline-format) for one of the [`rippled` API](http-websocket-apis.html) methods.
In addition to the individual command syntax, client mode accepts the [Generic Options](#generic-options) and the following options:
| Option | Description |
|:------------------------|:---------------------------------------------------|
| `--rpc` | Explicitly specify that the server should run in client mode. Not required. |
| `--rpc_ip {IP_ADDRESS}` | Connect to the `rippled` server at the specified IP Address, optionally including a port number. |
| `--rpc_port {PORT}` | **DEPRECATED** Connect to the `rippled` server on the specified port. Specify the port alongside the IP address using `--rpc_ip` instead. |
**Tip:** Some arguments accept negative numbers as values. To ensure that arguments to API commands are not interpreted as options instead, pass the `--` argument before the command name.
Example usage (get account transaction history from the earliest available to latest available ledger versions):
```bash
rippled -- account_tx r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 -1 -1
```
## Unit Tests
```bash
rippled --unittest [OPTIONS]
rippled -u [OPTIONS]
```
Unit testing runs tests built into the `rippled` source code to confirm that the executable performs as expected. After running unit tests, the process displays a summary of results and exits. Unit tests cover functionality such as built-in data types and transaction processing routines.
If unit testing reports a failure, that generally indicates one of the following:
- A problem occurred when compiling `rippled` and it is not functioning as intended
- The source code for `rippled` contains a bug
- A unit test has a bug or has not been updated to account for new behavior
While running unit tests, you can specify the [Generic Options](#generic-options) in addition to any of the following options:
| Option | Short Version | Description |
|:-----------------------------------|:--------------|:------------------------|
| `--unittest-ipv6` | | Use [IPv6](https://en.wikipedia.org/wiki/IPv6) to connect to the local server when running unit tests. If not provided, unit tests use IPv4 instead. [New in: rippled 1.1.0][] |
| `--unittest-jobs {NUMBER_OF_JOBS}` | | Use the specified number of processes to run unit tests. This can finish running tests faster on multi-core systems. The `{NUMBER_OF_JOBS}` should be a positive integer indicating the number of processes to use. |
| `--unittest-log` | | Allow unit tests to write to logs even if `--quiet` is specified. (No effect otherwise.) |
| `--quiet` | `-q` | Print fewer diagnostic messages when running unit tests. |
### Specific Unit Tests
```bash
rippled --unittest={TEST_OR_PACKAGE_NAME}
```
By default, `rippled` runs all unit tests except ones that are classified as "manual". You can run an individual test by specifying its name, or run a subset of tests by specifying a package name.
Tests are grouped into a hierarchy of packages separated by `.` characters and ending in the test case name.
#### Printing Unit Tests
```bash
rippled --unittest=print
```
The `print` unit test is a special case that prints a list of available tests with their packages.
#### Manual Unit Tests
Certain unit tests are classified as "manual" because they take a long time to complete. These tests are marked with `|M|` in the output of the `print` unit test. Manual tests do not run by default when you run all unit tests or a package of unit tests. You can run manual tests individually by specifying the name of the test. For example:
```bash
$ ./rippled --unittest=ripple.tx.OversizeMeta
ripple.tx.OversizeMeta
Longest suite times:
60.9s ripple.tx.OversizeMeta
60.9s, 1 suite, 1 case, 9016 tests total, 0 failures
```
#### Providing Arguments to Unit Tests
Certain manual unit tests accept an argument. You can provide the argument with the following option:
| Option | Description |
|:------------------------|:---------------------------------------------------|
| `--unittest-arg {ARG}` | Provide the argument `{ARG}` to the unit test(s) currently being run. Each unit test that accepts arguments defines its own argument format. |
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,116 @@
---
html: health-check.html
parent: peer-port-methods.html
blurb: Special API method for reporting server health.
labels:
- Core Server
---
# Health Check
[[Source]](https://github.com/ripple/rippled/blob/de0c52738785de8bf837f9124da65c7905e7bb5a/src/ripple/overlay/impl/OverlayImpl.cpp#L1084-L1168 "Source")
The Health Check is a special [peer port method](peer-port-methods.html) for reporting on the health of an individual `rippled` server. This method is intended for use in automated monitoring to recognize outages and prompt automated or manual interventions such as restarting the server. [New in: rippled 1.6.0][]
This method checks several metrics to see if they are in ranges generally considered healthy. If all metrics are in normal ranges, this method reports that the server is healthy. If any metric is outside normal ranges, this method reports that the server is unhealthy and reports the metric(s) that are unhealthy. Since some metrics may rapidly fluctuate into and out of unhealthy ranges, you should not raise alerts unless the health check fails multiple times in a row.
**Note:** Since the health check is a [peer port method](peer-port-methods.html), it is not available when testing the server in [stand-alone mode][].
## Request Format
To request the Health Check information, make the following HTTP request:
- **Protocol:** https
- **HTTP Method:** GET
- **Host:** (any `rippled` server, by hostname or IP address)
- **Port:** (the port number where the `rippled` server uses the Peer Protocol, typically 51235)
- **Path:** `/health`
- **Security:** Most `rippled` servers use a self-signed certificate to respond to the request. By default, most tools (including web browsers) flag or block such responses for being untrusted. You must ignore the certificate checking (for example, if using cURL, add the `--insecure` flag) to display a response from those servers.
<!-- TODO: link a tutorial for how to run rippled with a non-self-signed TLS cert -->
## Example Response
<!-- MULTICODE_BLOCK_START -->
*Healthy*
```json
HTTP/1.1 200 OK
Server: rippled-1.6.0-b8
Content-Type: application/json
Connection: close
Transfer-Encoding: chunked
{
"info": {}
}
```
*Warning*
```json
HTTP/1.1 503 Service Unavailable
Server: rippled-1.6.0
Content-Type: application/json
Connection: close
Transfer-Encoding: chunked
{
"info": {
"server_state": "connected",
"validated_ledger": -1
}
}
```
*Critical*
```json
HTTP/1.1 500 Internal Server Error
Server: rippled-1.6.0
Content-Type: application/json
Connection: close
Transfer-Encoding: chunked
{
"info": {
"peers": 0,
"server_state": "disconnected",
"validated_ledger":-1
}
}
```
<!-- MULTICODE_BLOCK_END -->
## Response Format
The response's HTTP status code indicates the health of the server:
| Status Code | Health Status | Description |
|:------------------------------|:--------------|:-----------------------------|
| **200 OK** | Healthy | All health metrics are within acceptable ranges. |
| **503 Service Unavailable** | Warning | One or more metric is in the warning range. Manual intervention may or may not be necessary. |
| **500 Internal Server Error** | Critical | One or more metric is in the critical range. There is a serious problem that probably needs manual intervention to fix. |
The response body is a JSON object with a single `info` object at the top level. The `info` object contains values for each metric that is in a warning or critical range. The response omits metrics that are in a healthy range, so a fully healthy server has an empty object.
The `info` object may contain the following fields:
| `Field` | Value | Description |
|:--------------------|:--------|:---------------------------------------------|
| `amendment_blocked` | Boolean | _(May be omitted)_ If `true`, the server is [amendment blocked](amendments.html#amendment-blocked) and must be upgraded to remain synced with the network; this state is critical. If the server is not amendment blocked, this field is omitted. |
| `load_factor` | Number | _(May be omitted)_ A measure of the overall load the server is under. This reflects I/O, CPU, and memory limitations. This is a warning if the load factor is over 100, or critical if the load factor is 1000 or higher. |
| `peers` | Number | _(May be omitted)_ The number of [peer servers](peer-protocol.html) this server is connected to. This is a warning if connected to 7 or fewer peers, and critical if connected to zero peers. |
| `server_state` | String | _(May be omitted)_ The current [server state](rippled-server-states.html). This is a warning if the server is in the `tracking`, `syncing`, or `connected` states. This is critical if the server is in the `disconnected` state. |
| `validated_ledger` | Number | _(May be omitted)_ The number of seconds since the last time a ledger was validated by [consensus](intro-to-consensus.html). If there is no validated ledger available ([as during the initial sync period when starting the server](server-doesnt-sync.html#normal-syncing-behavior)), this is the value `-1` and is considered a warning. This metric is also a warning if the last validated ledger was at least 7 seconds ago, or critical if the last validated ledger was at least 20 seconds ago. |
## See Also
For guidance interpreting the results of the health check, see [Health Check Interventions](health-check-interventions.html).
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,93 @@
---
html: peer-crawler.html
parent: peer-port-methods.html
blurb: Special API method for sharing network topology and status metrics.
labels:
- Core Server
- Blockchain
---
# Peer Crawler
The Peer Crawler is a special [peer port method](peer-port-methods.html) for reporting on the health and topology of the peer-to-peer network. This API method is available by default on a non-privileged basis through the [Peer Protocol](peer-protocol.html) port, which is also used for `rippled` servers' peer-to-peer communications about consensus, ledger history, and other necessary information.
The information reported by the peer crawler is effectively public, and can be used to report on the overall XRP Ledger network, its health, and topology.
## Request Format
To request the Peer Crawler information, make the following HTTP request:
- **Protocol:** https
- **HTTP Method:** GET
- **Host:** (any `rippled` server, by hostname or IP address)
- **Port:** (the port number where the `rippled` server uses the Peer Protocol, typically 51235)
- **Path:** `/crawl`
- **Security:** Most `rippled` servers use a self-signed certificate to respond to the request. By default, most tools (including web browsers) flag or block such responses for being untrusted. You must ignore the certificate checking (for example, if using cURL, add the `--insecure` flag) to display a response from those servers.
## Response Format
The response has the status code **200 OK** and a JSON object in the message body.
The JSON object has the following fields:
| `Field` | Value | Description |
|:-----------------|:-------|:-------------------------------------------------|
| `counts` | Object | _(May be omitted)_ Stats about this server's health, similar to the response from the [get_counts method][]. The default configuration does not report this field. Information reported includes: how large the ledger and transaction databases are, the cache hit rate for the in-application caches, and how many objects of various types are cached in memory. Types of objects that may be stored in memory include ledgers (`Ledger`), transactions (`STTx`), validation messages (`STValidation`), and more. |
| `overlay` | Object | _(May be omitted)_ Information about the peer servers currently connected to this one, similar to the response from the [peers method][]. Contains one field, `active`, which is an array of objects (see below). |
| `server` | Object | _(May be omitted)_ Information about this server. Contains public fields from the [server_state method][], including what `rippled` version you are running (`build_version`), which [ledger versions](ledger-history.html) your server has available (`complete_ledgers`), and the amount of load your server is experiencing. [Updated in: rippled 1.2.1][] |
| `unl` | Object | _(May be omitted)_ Information about the validators and validator list sites this server is configured to trust, similar to the response from the [validators method][] and [validator_list_sites method][]. [Updated in: rippled 1.2.1][] |
| `version` | Number | Indicates the version of this peer crawler response format. The current peer crawler version number is `2`. [Updated in: rippled 1.2.1][] |
Each member of the `overlay.active` array is an object with the following fields:
| `Field` | Value | Description |
|:-------------|:-------------------------|:-----------------------------------|
| `complete_ledgers` | String | The range of [ledger versions](ledger-history.html) this peer has available. |
| `complete_shards` | String | _(May be omitted)_ The range of [ledger history shards](history-sharding.html) this peer has available. |
| `ip` | String (IPv4 Address) | _(May be omitted)_ The IP address of this connected peer. Omitted if the peer is configured as a validator or a [private peer](peer-protocol.html#private-peers). [Updated in: rippled 1.2.1][] |
| `port` | String (Number) | _(May be omitted)_ The port number on the peer server that serves RTXP. Typically `51235`. Omitted if the peer is configured as a validator or a [private peer](peer-protocol.html#private-peers). [Updated in: rippled 1.2.1][] |
| `public_key` | String (Base-64 Encoded) | The public key of the ECDSA key pair used by this peer to sign RTXP messages. (This is the same data as the `pubkey_node` reported by the peer server's [server_info method][].) |
| `type` | String | The value `in` or `out`, indicating whether the TCP connection to the peer is incoming or outgoing. |
| `uptime` | Number | The number of seconds the server has been connected to this peer. |
| `version` | String | The `rippled` version number the peer reports to be using. |
#### Example
Request:
<!-- MULTICODE_BLOCK_START -->
*HTTP*
```
GET https://localhost:51235/crawl
```
*cURL*
```
curl --insecure https://localhost:51235/crawl
```
<!-- MULTICODE_BLOCK_END -->
Response:
```json
200 OK
{% include '_api-examples/peer-crawler/crawl.json' %}
```
## See Also
- [Peer Protocol](peer-protocol.html)
- [Configure the Peer Crawler](configure-the-peer-crawler.html)
- [Validator History Service](https://github.com/ripple/validator-history-service) is an example of a service that uses the peer crawler for ingesting, aggregating, storing, and disbursing validation related data.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,130 @@
---
html: validator-list.html
parent: peer-port-methods.html
blurb: Special API method for sharing recommended validator lists.
labels:
- Core Server
- Blockchain
---
# Validator List Method
The validator list method is a special API endpoint that fetches a current, trusted validator list a `rippled` server is using. This often represents the exact list of validators a server trusts. [New in: rippled 1.5.0][]
Like the [Peer Crawler](peer-crawler.html), the validator list method is available by default on a non-privileged basis through the [Peer Protocol](peer-protocol.html) port, which is also used for `rippled` servers' peer-to-peer communications.
## Request Format
To request the Validator List information, make the following HTTP
request:
- **Protocol:** https
- **HTTP Method:** GET
- **Host:** (any `rippled` server, by hostname or IP address)
- **Port:** (the port number where the `rippled` server uses the Peer Protocol, typically 51235)
- **Path:** `/vl/{public_key}`
The `{public_key}` is the list publisher's public key, in hexadecimal. This key identifies the publisher and is also used to verify that the contents of the list are authentic and complete.
- **Security:** Most `rippled` servers use a self-signed TLS certificate to respond to the request. By default, most tools (including web browsers) flag or block such responses for being untrusted. You must ignore the certificate checking (for example, if using cURL, add the `--insecure` flag) to display a response from those servers.
The validator list contents are signed with a separate cryptographic key, so you can verify their integrity regardless of the TLS certificate used.
## Response Format
The response has the status code **200 OK** and a JSON object in the message body. The response body is very similar to the format used for validator list sites such as <https://vl.ripple.com/>.
The JSON object has the following fields:
| `Field` | Value | Description |
|:-----------------|:-------|:-------------------------------------------------|
| `manifest` | String | The list publisher's [manifest data](#manifest-data), in either base64 or hexadecimal. |
| `blob` | String | Base64-encoded JSON data representing the validator list. |
| `signature` | String | The signature of the `blob` data, in hexadecimal. |
| `version` | Number | The version of the validator list protocol this object uses. The current version is **1**. A higher version number indicates backwards-incompatible changes with a previous version of the validator list protocol. |
| `public_key` | String | The public key used to verify this validator list data, in hexadecimal. This is a 32-byte Ed25519 public key prefixed with the byte `0xED`. [New in: rippled 1.7.0][] |
### Manifest Data
[[Source]](https://github.com/ripple/rippled/blob/97712107b71a8e2089d2e3fcef9ebf5362951110/src/ripple/app/misc/impl/Manifest.cpp#L43-L66 "Source")
A "manifest" contains information uniquely identifying a person or organization involved in the consensus process, either a **validator** or a **list publisher**. A validator's manifest contains the _public_ information from that [validator's token](run-rippled-as-a-validator.html#3-enable-validation-on-your-rippled-server). A list publisher's manifest provides information about the list publisher. Both are typically encoded to binary in the XRP Ledger's standard [binary serialization format](serialization.html). (There is no standard JSON representation of a manifest.)
One of the main purposes of manifests relates to rotating validator keys. When a validator changes its ephemeral key pair, the validator publishes a new manifest to share its new ephemeral public key, using the validator's master key pair to sign the manifest to prove its authenticity. A validator uses its ephemeral key pair to sign validations as part of the [consensus process](consensus.html) and uses its master key pair only to sign new manifests. (The manifest is incorporated into a validator token, alongside private data, that [the validator administrator adds to the `rippled.cfg` config file](run-rippled-as-a-validator.html#3-enable-validation-on-your-rippled-server).)
The data encoded in a manifest is as follows:
| Field | Internal Type | Description |
|:--------------------|:--------------|:-----------------------------------------|
| `sfPublicKey` | Blob | The master public key that uniquely identifies this person or organization. This can be a 33-byte secp256k1 public key, or a 32-byte Ed25519 public key prefixed with the byte `0xED`. |
| `sfMasterSignature` | Blob | A signature of this manifest data from the master key pair. This proves the authenticity of the manifest. |
| `sfSequence` | UInt32 | A sequence number for this manifest. A higher number indicates a newer manifest that invalidates all older manifests from the same master public key. |
| `sfVersion` | UInt16 | A version number indicating the manifest format used. A higher number indicates a newer manifest format, including breaking changes compared to the previous manifest format. |
| `sfDomain` | Blob | _(Optional)_ A domain name owned by this person or organization, ASCII-encoded. |
| `sfSigningPubKey` | Blob | _(Optional)_ The ephemeral public key of the key pair that this person or organization is currently using. This must be a 33-byte secp256k1 public key. |
| `sfSignature` | Blob | _(Optional)_ A signature of this manifest data from the ephemeral key pair. |
The `sfMasterSignature` and `sfSignature` signatures are created from signing the [serialized](serialization.html) binary data of the manifest, excluding the signature fields (`sfMasterSignature` and `sfSignature`) themselves.
### Blob Data
If you decode the `blob` from base64, the result is a JSON object with the following fields:
| `Field` | Value | Description |
|:-------------|:-------|:-----------------------------------------------------|
| `sequence` | Number | Unique sequence number for this list. A larger sequence number indicates a newer list; only the newest list is valid at a time. |
| `expiration` | Number | The time this list expires, in [seconds since the Ripple Epoch][]. |
| `validators` | Array | A list of recommended validators. |
Each member of the `validators` array has the following fields:
| `Field` | Value | Description |
|:------------------------|:-------|:------------------------------------------|
| `validation_public_key` | String | The master public key that uniquely identifies this validator. |
| `manifest` | String | This validator's [manifest data](#manifest-data), in either base64 or hexadecimal. |
#### Example Decoded Blob
```json
{% include '_api-examples/vl/vl-blob.json' %}
```
## Example
Request:
<!-- MULTICODE_BLOCK_START -->
*HTTP*
```
GET https://localhost:51235/vl
```
*cURL*
```
curl --insecure https://localhost:51235/vl/ED2677ABFFD1B33AC6FBC3062B71F1E8397C1505E1C42C64D11AD1B28FF73F4734
```
<!-- MULTICODE_BLOCK_END -->
Response:
```json
200 OK
{% include '_api-examples/vl/vl.json' %}
```
## See Also
- [Peer Protocol](peer-protocol.html)
- [Consensus](consensus.html)
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,198 @@
---
html: account_channels.html
parent: account-methods.html
blurb: アカウントのPayment Channelに関する情報を返します。
labels:
- Payment Channel
---
# account_channels
[[ソース]](https://github.com/ripple/rippled/blob/release/src/ripple/rpc/handlers/AccountChannels.cpp "Source")
_[PayChan Amendment][]が有効になっている必要があります。[新規: rippled 0.33.0][]_
`account_channels`メソッドは、アカウントのPayment Channelに関する情報を返します。指定されたアカウントがChannelの送金元であり、送金先ではないChannelのみが含まれます。Channelの「送金元」と「所有者」は同一です。取得された情報はすべて、特定バージョンのレジャーに関連付けられています。
## 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 1,
"command": "account_channels",
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"ledger_index": "validated"
}
```
*JSON-RPC*
```json
{
"method": "account_channels",
"params": [{
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"ledger_index": "validated"
}]
}
```
*コマンドライン*
```bash
#Syntax: account_channels <account> [<destination_account>] [<ledger>]
rippled account_channels rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn ra5nK24KXen9AHvsdFTKHSANinZseWnPcX validated
```
<!-- MULTICODE_BLOCK_END -->
[試してみる>](websocket-api-tool.html#account_channels)
要求には以下のパラメーターが含まれます。
| フィールド | 型 | 説明 |
|:----------------------|:-------------------------------------------|:--------|
| `account` | 文字列 | アカウントの一意のID。通常はアカウントの[アドレス][]です。要求は、このアカウントがChannelの所有者/送金元であるChannelを返します。 |
| `destination_account` | 文字列 | _省略可_ アカウントの一意のID。通常はアカウントの[アドレス][]です。指定されている場合、フィルタリングによりこのアカウントを送金先とするPayment Channelに絞り込まれます。 |
| `ledger_hash` | 文字列 | _省略可_ 使用するレジャーバージョンの20バイトの16進文字列。[レジャーの指定][]を参照してください) |
| `ledger_index` | 文字列または符号なし整数 | _省略可_ 使用する[レジャーインデックス][]、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください) |
| `limit` | 整数 | _省略可_ 取得するトランザクション数を制限します。サーバーはこの値に従う必要はありません。10以上400以下の範囲で値を指定する必要があります。デフォルトでは200です。 |
| `marker` | [マーカー][] | _省略可_ 以前にページネーションされた応答の値。その応答を停止した箇所からデータの取得を再開します。 |
## 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 1,
"result": {
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"channels": [
{
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"amount": "1000",
"balance": "0",
"channel_id": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"public_key": "aBR7mdD75Ycs8DRhMgQ4EMUEmBArF8SEh1hfjrT2V9DQTLNbJVqw",
"public_key_hex": "03CFD18E689434F032A4E84C63E2A3A6472D684EAF4FD52CA67742F3E24BAE81B2",
"settle_delay": 60
}
],
"ledger_hash": "1EDBBA3C793863366DF5B31C2174B6B5E6DF6DB89A7212B86838489148E2A581",
"ledger_index": 71766314,
"validated": true
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"channels": [
{
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"amount": "1000",
"balance": "0",
"channel_id": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"public_key": "aBR7mdD75Ycs8DRhMgQ4EMUEmBArF8SEh1hfjrT2V9DQTLNbJVqw",
"public_key_hex": "03CFD18E689434F032A4E84C63E2A3A6472D684EAF4FD52CA67742F3E24BAE81B2",
"settle_delay": 60
}
],
"ledger_hash": "27F530E5C93ED5C13994812787C1ED073C822BAEC7597964608F2C049C2ACD2D",
"ledger_index": 71766343,
"status": "success",
"validated": true
}
}
```
*コマンドライン*
```json
200 OK
{
"result": {
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"channels": [
{
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"amount": "1000",
"balance": "0",
"channel_id": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"public_key": "aBR7mdD75Ycs8DRhMgQ4EMUEmBArF8SEh1hfjrT2V9DQTLNbJVqw",
"public_key_hex": "03CFD18E689434F032A4E84C63E2A3A6472D684EAF4FD52CA67742F3E24BAE81B2",
"settle_delay": 60
}
],
"ledger_hash": "27F530E5C93ED5C13994812787C1ED073C822BAEC7597964608F2C049C2ACD2D",
"ledger_index": 71766343,
"status": "success",
"validated": true
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
| フィールド | 型 | 説明 |
|:-----------|:-------------------------------------------|:-------------------|
| `account` | 文字列 | Payment Channelの送金元/所有者のアドレス。これは要求の`account`フィールドに対応しています。 |
| `channels` | channelオブジェクトの配列 | この`account`が所有するPayment Channel。 |
| `ledger_hash` | 文字列 | この応答の生成に使用されたレジャーバージョンの識別用[ハッシュ][]。[新規: rippled 0.90.0][] |
| `ledger_index` | 数値 | この応答の生成に使用されたレジャーバージョンの[レジャーインデックス][]。[新規: rippled 0.90.0][] |
| `validated` | ブール値 | _省略される場合があります_`true`の場合、この応答の情報は検証済みレジャーバージョンから取り込まれます。trueでない場合、情報は変更されることがあります。[新規: rippled 0.90.0][] |
| `limit` | 数値 | _省略される場合があります_ この要求から実際に返されるchannelオブジェクトの数の制限。 |
| `marker` | [マーカー][] | _省略される場合があります_ ページネーションのサーバー定義の値。この値を次のコールに渡して、このコールで終わった箇所から結果の取得を再開します。この後に追加のページがない場合は省略されます。 |
各Channelオブジェクトのフィールドは次のとおりです。
| フィールド | 型 | 説明 |
|-------|------|-------------|
| `account` | 文字列 | Channelの所有者[アドレス][]として)。 |
| `amount` | 文字列 | このChannelに割り当てられる[XRP、drop単位][]の合計額。 |
| `balance` | 文字列 | 使用されているレジャーバージョンにおいて、このChannelから支払われた[XRP、drop単位][]の合計額。Channelに残っているXRPの額を計算するには、`balance``amount`から差し引きます。) |
| `channel_id` | 文字列 | このChannelの一意のID64文字の16進数文字列。レジャーの状態データの[channelオブジェクトのID](paychannel.html#paychannel-idのフォーマット)でもあります。 |
| `destination_account` | 文字列 | Channelの送金先アカウント[アドレス][]として。このアカウントだけが、Channelがオープンしている間にXRPを受領できます。 |
| `public_key` | 文字列 | _省略される場合があります_ XRP Ledgerの[base58][]フォーマットのPayment Channelの公開鍵。このChannelに対する署名付きクレームは、一致するキーペアを使用して清算する必要があります。 |
| `public_key_hex` | 文字列 | _省略される場合があります_ Payment Channel作成時にChannelの公開鍵を指定している場合はその公開鍵16進数フォーマット。このChannelに対する署名付きクレームは、一致するキーペアを使用して清算する必要があります。 |
| `settle_delay` | 符号なし整数 | Payment Channelの所有者がChannel閉鎖を依頼した後に、そのChannelが開いている必要がある秒数。 |
| `expiration` | 符号なし整数 | _省略される場合があります_ このChannelに設定された有効期限[Rippleエポック以降の経過秒数][]。この有効期限の日付は変更可能です。これが最新の検証済みレジャーの閉鎖時刻よりも前の場合、Channelは有効期限切れです。 |
| `cancel_after` | 符号なし整数 | _省略される場合があります_ このChannelの変更不可能な有効期限がChannel作成時に指定されている場合はその有効期限[Rippleエポック以降の経過秒数][]。これが最新の検証済みレジャーの閉鎖時刻よりも前の場合、Channelは有効期限切れです。 |
| `source_tag` | 符号なし整数 | _省略される場合があります_ このPayment Channelを通じた支払いの[送金元タグ](become-an-xrp-ledger-gateway.html#source-and-destination-tags)として使用される32ビット符号なし整数Channel作成時に指定されている場合。送金元アカウントでのPayment Channelの送金人またはその他の目的を示します。通常、このChannelからの支払いを差し戻す場合、返金の`DestinationTag`にこの値を指定する必要があります。 |
| `destination_tag` | 符号なし整数 | _省略される場合があります_ このChannelを通じた支払いの[送金先タグ](become-an-xrp-ledger-gateway.html#source-and-destination-tags)として使用される32ビット符号なし整数Channel作成時に指定されている場合。送金先アカウントでのPayment Channelの受取人またはその他の目的を示します。 |
## 考えられるエラー
* [汎用エラータイプ][]のすべて。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
* `actNotFound` - 要求の`account`フィールドに指定されているアドレスが、レジャーのアカウントに対応していません。
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,197 @@
---
html: account_channels.html
parent: account-methods.html
blurb: Get a list of payment channels where the account is the source of the channel.
labels:
- Payment Channels
---
# account_channels
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountChannels.cpp "Source")
_(Added by the [PayChan amendment][]. [New in: rippled 0.33.0][])_
The `account_channels` method returns information about an account's Payment Channels. This includes only channels where the specified account is the channel's source, not the destination. (A channel's "source" and "owner" are the same.) All information retrieved is relative to a particular version of the ledger.
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 1,
"command": "account_channels",
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"ledger_index": "validated"
}
```
*JSON-RPC*
```json
{
"method": "account_channels",
"params": [{
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"ledger_index": "validated"
}]
}
```
*Commandline*
```bash
#Syntax: account_channels <account> [<destination_account>] [<ledger>]
rippled account_channels rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn ra5nK24KXen9AHvsdFTKHSANinZseWnPcX validated
```
[Try it! >](websocket-api-tool.html#account_channels)
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| Field | Type | Description |
|:----------------------|:---------------------------|:------------------------|
| `account` | String | The unique identifier of an account, typically the account's [Address][]. The request returns channels where this account is the channel's owner/source. |
| `destination_account` | String | _(Optional)_ The unique identifier of an account, typically the account's [Address][]. If provided, filter results to payment channels whose destination is this account. |
| `ledger_hash` | String | _(Optional)_ A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) |
| `ledger_index` | String or Unsigned Integer | _(Optional)_ The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
| `limit` | Integer | _(Optional)_ Limit the number of transactions to retrieve. Cannot be less than 10 or more than 400. The default is 200. |
| `marker` | [Marker][] | _(Optional)_ Value from a previous paginated response. Resume retrieving data where that response left off. [Updated in: rippled 1.5.0][] |
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 1,
"result": {
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"channels": [
{
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"amount": "1000",
"balance": "0",
"channel_id": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"public_key": "aBR7mdD75Ycs8DRhMgQ4EMUEmBArF8SEh1hfjrT2V9DQTLNbJVqw",
"public_key_hex": "03CFD18E689434F032A4E84C63E2A3A6472D684EAF4FD52CA67742F3E24BAE81B2",
"settle_delay": 60
}
],
"ledger_hash": "1EDBBA3C793863366DF5B31C2174B6B5E6DF6DB89A7212B86838489148E2A581",
"ledger_index": 71766314,
"validated": true
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"channels": [
{
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"amount": "1000",
"balance": "0",
"channel_id": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"public_key": "aBR7mdD75Ycs8DRhMgQ4EMUEmBArF8SEh1hfjrT2V9DQTLNbJVqw",
"public_key_hex": "03CFD18E689434F032A4E84C63E2A3A6472D684EAF4FD52CA67742F3E24BAE81B2",
"settle_delay": 60
}
],
"ledger_hash": "27F530E5C93ED5C13994812787C1ED073C822BAEC7597964608F2C049C2ACD2D",
"ledger_index": 71766343,
"status": "success",
"validated": true
}
}
```
*Commandline*
```json
200 OK
{
"result": {
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"channels": [
{
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"amount": "1000",
"balance": "0",
"channel_id": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"public_key": "aBR7mdD75Ycs8DRhMgQ4EMUEmBArF8SEh1hfjrT2V9DQTLNbJVqw",
"public_key_hex": "03CFD18E689434F032A4E84C63E2A3A6472D684EAF4FD52CA67742F3E24BAE81B2",
"settle_delay": 60
}
],
"ledger_hash": "27F530E5C93ED5C13994812787C1ED073C822BAEC7597964608F2C049C2ACD2D",
"ledger_index": 71766343,
"status": "success",
"validated": true
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| Field | Type | Description |
|:---------------|:-------------------------|:---------------------------------|
| `account` | String | The address of the source/owner of the payment channels. This corresponds to the `account` field of the request. |
| `channels` | Array of Channel Objects | Payment channels owned by this `account`. [Updated in: rippled 1.5.0][] |
| `ledger_hash` | String | _(May be omitted)_ The identifying [Hash][] of the ledger version used to generate this response. [New in: rippled 0.90.0][] |
| `ledger_index` | Number | The [Ledger Index][] of the ledger version used to generate this response. [New in: rippled 0.90.0][] |
| `validated` | Boolean | _(May be omitted)_ If `true`, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change. [New in: rippled 0.90.0][] |
| `limit` | Number | _(May be omitted)_ The limit to how many channel objects were actually returned by this request. |
| `marker` | [Marker][] | _(May be omitted)_ Server-defined value for pagination. Pass this to the next call to resume getting results where this call left off. Omitted when there are no additional pages after this one. |
Each Channel Object has the following fields:
| Field | Type | Description |
|:----------------------|:-----------------|:----------------------------------|
| `account` | String | The owner of the channel, as an [Address][]. |
| `amount` | String | The total amount of [XRP, in drops][] allocated to this channel. |
| `balance` | String | The total amount of [XRP, in drops][], paid out from this channel, as of the ledger version used. (You can calculate the amount of XRP left in the channel by subtracting `balance` from `amount`.) |
| `channel_id` | String | A unique ID for this channel, as a 64-character hexadecimal string. This is also the [ID of the channel object](paychannel.html#paychannel-id-format) in the ledger's state data. |
| `destination_account` | String | The destination account of the channel, as an [Address][]. Only this account can receive the XRP in the channel while it is open. |
| `settle_delay` | Unsigned Integer | The number of seconds the payment channel must stay open after the owner of the channel requests to close it. |
| `public_key` | String | _(May be omitted)_ The public key for the payment channel in the XRP Ledger's [base58][] format. Signed claims against this channel must be redeemed with the matching key pair. |
| `public_key_hex` | String | _(May be omitted)_ The public key for the payment channel in hexadecimal format, if one was specified at channel creation. Signed claims against this channel must be redeemed with the matching key pair. |
| `expiration` | Unsigned Integer | _(May be omitted)_ Time, in [seconds since the Ripple Epoch][], when this channel is set to expire. This expiration date is mutable. If this is before the close time of the most recent validated ledger, the channel is expired. |
| `cancel_after` | Unsigned Integer | _(May be omitted)_ Time, in [seconds since the Ripple Epoch][], of this channel's immutable expiration, if one was specified at channel creation. If this is before the close time of the most recent validated ledger, the channel is expired. |
| `source_tag` | Unsigned Integer | _(May be omitted)_ A 32-bit unsigned integer to use as a [source tag](become-an-xrp-ledger-gateway.html#source-and-destination-tags) for payments through this payment channel, if one was specified at channel creation. This indicates the payment channel's originator or other purpose at the source account. Conventionally, if you bounce payments from this channel, you should specify this value in the `DestinationTag` of the return payment. |
| `destination_tag` | Unsigned Integer | _(May be omitted)_ A 32-bit unsigned integer to use as a [destination tag](become-an-xrp-ledger-gateway.html#source-and-destination-tags) for payments through this channel, if one was specified at channel creation. This indicates the payment channel's beneficiary or other purpose at the destination account. |
## Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `actNotFound` - The address specified in the `account` field of the request does not correspond to an account in the ledger.
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,158 @@
---
html: account_currencies.html
parent: account-methods.html
blurb: アカウントが送金または受領できる通貨のリストを返します。
labels:
- トークン
---
# account_currencies
[[ソース]](https://github.com/ripple/rippled/blob/df966a9ac6dd986585ecccb206aff24452e41a30/src/ripple/rpc/handlers/AccountCurrencies.cpp "Source")
`account_currencies`コマンドは、アカウントのトラストラインに基づいてそのアカウントが送金または受領できる通貨のリストを返します。(このリストは完全に確認されたリストではありませんが、ユーザーインターフェイスへの入力に使用できます。)
## 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"command": "account_currencies",
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"strict": true,
"ledger_index": "validated"
}
```
*JSON-RPC*
```
{
"method": "account_currencies",
"params": [
{
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"account_index": 0,
"ledger_index": "validated",
"strict": true
}
]
}
```
<!-- MULTICODE_BLOCK_END -->
[試してみる>](websocket-api-tool.html#account_currencies)
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:---------------|:---------------------------|:-------------------------------|
| `account` | 文字列 | アカウントの一意のIDであり、通常はアカウントの[アドレス][]です。 |
| `strict` | ブール値 | _省略可_ trueの場合は、アカウントパラメーターにアドレスまたは公開鍵だけを受け入れます。デフォルトではfalseです。 |
| `ledger_hash` | 文字列 | _省略可_ 使用するレジャーバージョンの20バイトの16進文字列。[レジャーの指定][]を参照してください) |
| `ledger_index` | 文字列または符号なし整数 | _省略可_ 使用する[レジャーインデックス][]、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください) |
以下のフィールドは廃止予定であるため、指定しないでください。`account_index`.
## 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"result": {
"ledger_index": 11775844,
"receive_currencies": [
"BTC",
"CNY",
"DYM",
"EUR",
"JOE",
"MXN",
"USD",
"015841551A748AD2C1F76FF6ECB0CCCD00000000"
],
"send_currencies": [
"ASP",
"BTC",
"CHF",
"CNY",
"DYM",
"EUR",
"JOE",
"JPY",
"MXN",
"USD"
],
"validated": true
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```
200 OK
{
"result": {
"ledger_index": 11775823,
"receive_currencies": [
"BTC",
"CNY",
"DYM",
"EUR",
"JOE",
"MXN",
"USD",
"015841551A748AD2C1F76FF6ECB0CCCD00000000"
],
"send_currencies": [
"ASP",
"BTC",
"CHF",
"CNY",
"DYM",
"EUR",
"JOE",
"JPY",
"MXN",
"USD"
],
"status": "success",
"validated": true
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:---------------------|:---------------------------|:-------------------------|
| `ledger_hash` | 文字列 - [ハッシュ][] | 省略される場合がありますこのデータの取得に使用するレジャーバージョンの識別用ハッシュ16進数。 |
| `ledger_index` | 整数 - [レジャーインデックス][] | このデータの取得に使用するレジャーバージョンのシーケンス番号。 |
| `receive_currencies` | 文字列の配列 | このアカウントが受領できる通貨の[通貨コード][]の配列。 |
| `send_currencies` | 文字列の配列 | このアカウントが送金できる通貨の[通貨コード][]の配列。 |
| `validated` | ブール値 | `true`の場合、このデータは検証済みレジャーから取得されます。 |
**注記:** アカウントが送金または受領できる通貨は、アカウントのトラストラインのチェックに基づいて定義されます。アカウントに通貨のトラストラインがあり、残高を増額できる余裕がある場合、その通貨を受領できます。トラストラインの残高を減らせる場合、アカウントはその通貨を送金できます。このメソッドでは、トラストラインが[凍結](freezes.html)または承認されているかどうかは確認 _されません_
## 考えられるエラー
* [汎用エラータイプ][]のすべて。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
* `actNotFound` - 要求の`account`フィールドに指定されているアドレスが、レジャーのアカウントに対応していません。
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,180 @@
---
html: account_currencies.html
parent: account-methods.html
blurb: Get a list of currencies an account can send or receive.
labels:
- Tokens
---
# account_currencies
[[Source]](https://github.com/ripple/rippled/blob/df966a9ac6dd986585ecccb206aff24452e41a30/src/ripple/rpc/handlers/AccountCurrencies.cpp "Source")
The `account_currencies` command retrieves a list of currencies that an account can send or receive, based on its trust lines. (This is not a thoroughly confirmed list, but it can be used to populate user interfaces.)
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "account_currencies",
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"strict": true,
"ledger_index": "validated"
}
```
*JSON-RPC*
```json
{
"method": "account_currencies",
"params": [
{
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"account_index": 0,
"ledger_index": "validated",
"strict": true
}
]
}
```
*Commandline*
```sh
#Syntax: account_currencies account [ledger_index|ledger_hash] [strict]
rippled account_currencies rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn validated strict
```
<!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#account_currencies)
The request includes the following parameters:
| `Field` | Type | Description |
|:---------------|:---------------------------|:-------------------------------|
| `account` | String | A unique identifier for the account, most commonly the account's [Address][]. |
| `ledger_hash` | String | _(Optional)_ A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) |
| `ledger_index` | String or Unsigned Integer | _(Optional)_ The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
| `strict` | Boolean | _(Optional)_ If `true`, then the `account` field only accepts a public key or XRP Ledger address. Otherwise, `account` can be a secret or passphrase (not recommended). The default is `false`. |
The following field is deprecated and should not be provided: `account_index`.
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"result": {
"ledger_index": 11775844,
"receive_currencies": [
"BTC",
"CNY",
"DYM",
"EUR",
"JOE",
"MXN",
"USD",
"015841551A748AD2C1F76FF6ECB0CCCD00000000"
],
"send_currencies": [
"ASP",
"BTC",
"CHF",
"CNY",
"DYM",
"EUR",
"JOE",
"JPY",
"MXN",
"USD"
],
"validated": true
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"ledger_index": 11775823,
"receive_currencies": [
"BTC",
"CNY",
"DYM",
"EUR",
"JOE",
"MXN",
"USD",
"015841551A748AD2C1F76FF6ECB0CCCD00000000"
],
"send_currencies": [
"ASP",
"BTC",
"CHF",
"CNY",
"DYM",
"EUR",
"JOE",
"JPY",
"MXN",
"USD"
],
"status": "success",
"validated": true
}
}
```
*Commandline*
```json
{
"result" : {
"ledger_hash" : "F43A801ED4562FA744A35755B86BE898D91C5643BF499924EA3C69491B8C28D1",
"ledger_index" : 56843649,
"receive_currencies" : [ "USD" ],
"send_currencies" : [ "NGN", "TRC" ],
"status" : "success",
"validated" : true
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:---------------------|:---------------------------|:-------------------------|
| `ledger_hash` | String - [Hash][] | (May be omitted) The identifying hash of the ledger version used to retrieve this data, as hex. |
| `ledger_index` | Integer - [Ledger Index][] | The ledger index of the ledger version used to retrieve this data. |
| `receive_currencies` | Array of Strings | Array of [Currency Code][]s for currencies that this account can receive. |
| `send_currencies` | Array of Strings | Array of [Currency Code][]s for currencies that this account can send. |
| `validated` | Boolean | If `true`, this data comes from a validated ledger. |
**Note:** The currencies that an account can send or receive are defined based on a check of its trust lines. If an account has a trust line for a currency and enough room to increase its balance, it can receive that currency. If the trust line's balance can go down, the account can send that currency. This method _doesn't_ check whether the trust line is [frozen](freezes.html) or authorized.
## Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `actNotFound` - The address specified in the `account` field of the request does not correspond to an account in the ledger.
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,220 @@
---
html: account_info.html
parent: account-methods.html
blurb: アカウントとそのアクティビティおよびXRP残高についての情報を取得します。
labels:
- アカウント
- XRP
---
# account_info
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountInfo.cpp "Source")
`account_info`コマンドは、アカウントとそのアクティビティおよびXRP残高についての情報を取得します。取得されたすべての情報は、特定バージョンのレジャーに関連付けられています。
## 要求フォーマット
account_info要求の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 2,
"command": "account_info",
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"strict": true,
"ledger_index": "current",
"queue": true
}
```
*JSON-RPC*
```
{
"method": "account_info",
"params": [
{
"account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
"strict": true,
"ledger_index": "current",
"queue": true
}
]
}
```
*コマンドライン*
```
#Syntax: account_info account [ledger_index|ledger_hash] [strict]
rippled account_info r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 true
```
<!-- MULTICODE_BLOCK_END -->
[試してみる>](websocket-api-tool.html#account_info)
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:---------------|:---------------------------|:-------------------------------|
| `account` | 文字列 | アカウントの一意のIDであり、最もよく使用されるのはアカウントの[アドレス][]です。 |
| `strict` | ブール値 | 省略可能、デフォルトはFalseTrueに設定すると、`account`フィールドに指定できる項目は公開鍵またはXRP Ledgerアドレスのみになります。 |
| `ledger_hash` | 文字列 | _省略可能_ 使用するレジャーバージョンの20バイトの16進文字列。[レジャーの指定][]を参照してください。) |
| `ledger_index` | 文字列または符号なし整数 | _省略可能_ 使用するレジャーのシーケンス番号、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください。) |
| `queue` | ブール値 | _省略可能_ `true`にして[FeeEscalation Amendment][]を有効にすると、このアカウントに関連するキューに入れられたトランザクションについてのステータスも返されます。これを使用できるのは、現在開いているレジャーのデータを問い合わせる場合のみです。[新規: rippled 0.33.0][] |
| `signer_lists` | ブール値 | _省略可能_`true`にして[MultiSign Amendment][]を有効にすると、このアカウントに関連するすべての[SignerListオブジェクト](signerlist.html)も返されます。[新規: rippled 0.31.0][] |
次のフィールドは廃止予定のため、指定しないでください。`ident``ledger`
## 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 5,
"status": "success",
"type": "response",
"result": {
"account_data": {
"Account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
"Balance": "999999999960",
"Flags": 8388608,
"LedgerEntryType": "AccountRoot",
"OwnerCount": 0,
"PreviousTxnID": "4294BEBE5B569A18C0A2702387C9B1E7146DC3A5850C1E87204951C6FDAA4C42",
"PreviousTxnLgrSeq": 3,
"Sequence": 6,
"index": "92FA6A9FC8EA6018D5D16532D7795C91BFB0831355BDFDA177E86C8BF997985F"
},
"ledger_current_index": 4,
"queue_data": {
"auth_change_queued": true,
"highest_sequence": 10,
"lowest_sequence": 6,
"max_spend_drops_total": "500",
"transactions": [
{
"auth_change": false,
"fee": "100",
"fee_level": "2560",
"max_spend_drops": "100",
"seq": 6
},
...(trimmed for length) ...
{
"LastLedgerSequence": 10,
"auth_change": true,
"fee": "100",
"fee_level": "2560",
"max_spend_drops": "100",
"seq": 10
}
],
"txn_count": 5
},
"validated": false
}
}
```
*JSON-RPC*
```
{
"result": {
"account_data": {
"Account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
"Balance": "999999999960",
"Flags": 8388608,
"LedgerEntryType": "AccountRoot",
"OwnerCount": 0,
"PreviousTxnID": "4294BEBE5B569A18C0A2702387C9B1E7146DC3A5850C1E87204951C6FDAA4C42",
"PreviousTxnLgrSeq": 3,
"Sequence": 6,
"index": "92FA6A9FC8EA6018D5D16532D7795C91BFB0831355BDFDA177E86C8BF997985F"
},
"ledger_current_index": 4,
"queue_data": {
"auth_change_queued": true,
"highest_sequence": 10,
"lowest_sequence": 6,
"max_spend_drops_total": "500",
"transactions": [
{
"auth_change": false,
"fee": "100",
"fee_level": "2560",
"max_spend_drops": "100",
"seq": 6
},
...(trimmed for length) ...
{
"LastLedgerSequence": 10,
"auth_change": true,
"fee": "100",
"fee_level": "2560",
"max_spend_drops": "100",
"seq": 10
}
],
"txn_count": 5
},
"status": "success",
"validated": false
}
}
```
<!-- MULTICODE_BLOCK_END -->
応答は[標準フォーマット][]に従い、要求されたアカウントとそのデータ、アカウントの適用先レジャーが結果として表示されます。以下のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:-----------------------|:--------|:------------------------------------------|
| `account_data` | オブジェクト | このアカウントの情報を含む[AccountRootレジャーオブジェクト](accountroot.html)がレジャーに保管されているとおりに表示されます。 |
| `signer_lists` | 配列 | (要求に`signer_lists`が指定されていて、少なくとも1つのSignerListがアカウントに関連する場合を除いて省略されます。[マルチ署名](multi-signing.html)用にアカウントに関連付けられた[SignerListレジャーオブジェクト](signerlist.html)の配列。アカウントが所有できるSignerListは最大1つであるため、この配列のメンバーは存在するとすれば、1メンバーのみです。[新規: rippled 0.31.0][] |
| `ledger_current_index` | 整数 | `ledger_index`が代わりに指定されている場合は省略されます。)この情報を取得したときに使用されていた最新のレジャーのシーケンス番号。この情報には、これより新しいレジャーの変更は一切含まれません。 |
| `ledger_index` | 整数 | `ledger_current_index`が代わりに指定されている場合は省略されます。)この情報を取得したときに使用されていたレジャーのシーケンス番号。この情報には、これより新しいレジャーの変更は一切含まれません。 |
| `queue_data` | オブジェクト | `queue``true`と指定され、現在開いているレジャーを問い合わせている場合を除いて省略されます。)このアカウントによって送信された[キューに入れられたトランザクション](transaction-cost.html#キューに入れられたトランザクション)についての情報。この情報にはローカル`rippled`サーバーの状態が示されますが、コンセンサスネットワーク内の他のサーバーとは異なる場合があります。示される値はキューイングメカニズムによって「大まかに」計算されるため、一部のフィールドは省略される場合があります。 |
| `validated` | ブール値 | このデータが検証済みのレジャーバージョンのものである場合はTrueです。省略されているかFalseが設定されている場合、このデータは最終のものではありません。[新規: rippled 0.26.0][] |
`queue_data`パラメーターが存在する場合、以下のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:------------------------|:--------|:-----------------------------------------|
| `txn_count` | 整数 | このアドレスからキューに入れられたトランザクションの数。 |
| `auth_change_queued` | ブール値 | (省略される場合があります)キュー内のトランザクションがこのアドレスの[トランザクションの承認方法](transaction-basics.html#トランザクションの承認)を変更するかどうかを示します。`true`の場合、トランザクションが実行されているかキューから除外されるまで、このアドレスはトランザクションをこれ以上キューに入れることができません。 |
| `lowest_sequence` | 整数 | (省略される場合があります)このアドレスによってキューに入れられたトランザクションのうち最も低い[シーケンス番号][]。 |
| `highest_sequence` | 整数 | (省略される場合があります)このアドレスによってキューに入れられたトランザクションのうち最も高い[シーケンス番号][]。 |
| `max_spend_drops_total` | 文字列 | 省略される場合がありますキュー内のすべてのトランザクションが利用可能なXRPを最大限消費する場合に、このアドレスから差し引くことができる[XRPのdrop数][]を示す整数の金額。 |
| `transactions` | 配列 | (省略される場合があります)このアドレスからキューに入れられた各トランザクションについての情報。 |
`transactions`配列内の各オブジェクト(存在する場合)には、以下のフィールドのいずれかまたはすべてが含まれます。
| `Field` | 型 | 説明 |
|:------------------|:--------|:-----------------------------------------------|
| `auth_change` | ブール値 | このトランザクションがこのアドレスの[トランザクション承認の方法](transaction-basics.html#トランザクションの承認)を変更するかどうかを示します。 |
| `fee` | 文字列 | このトランザクションの[トランザクションコスト](transaction-cost.html)[XRPのdrop数][])。 |
| `fee_level` | 文字列 | このタイプのトランザクションの最少コストと比較した、このトランザクションのトランザクションコスト([手数料レベル][])。 |
| `max_spend_drops` | 文字列 | このトランザクションで送信または消却できる[XRPのdrop数][]の最高額。 |
| `seq` | 整数 | このトランザクションの[シーケンス番号][]。 |
## 考えられるエラー
* いずれかの[汎用エラータイプ][]。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。例えば、要求で`queue``true`と指定したが、現在開いているレジャーではない`ledger_index`を指定した場合です。
* `actNotFound` - 要求の`account`フィールドに指定したアドレスが、レジャー内のアカウントに対応していません。
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
[手数料レベル]: transaction-cost.html#手数料レベル
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,245 @@
---
html: account_info.html
parent: account-methods.html
blurb: Get basic data about an account.
labels:
- Accounts
- XRP
---
# account_info
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountInfo.cpp "Source")
The `account_info` command retrieves information about an account, its activity, and its XRP balance. All information retrieved is relative to a particular version of the ledger.
## Request Format
An example of an account_info request:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "account_info",
"account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
"strict": true,
"ledger_index": "current",
"queue": true
}
```
*JSON-RPC*
```json
{
"method": "account_info",
"params": [
{
"account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
"strict": true,
"ledger_index": "current",
"queue": true
}
]
}
```
*Commandline*
```sh
#Syntax: account_info account [ledger_index|ledger_hash] [strict]
rippled account_info rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn validated strict
```
<!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#account_info)
The request contains the following parameters:
| `Field` | Type | Description |
|:---------------|:---------------------------|:-------------------------------|
| `account` | String | A unique identifier for the account, most commonly the account's [Address][]. |
| `ledger_hash` | String | _(Optional)_ A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) |
| `ledger_index` | String or Unsigned Integer | _(Optional)_ The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
| `queue` | Boolean | _(Optional)_ If `true`, and the [FeeEscalation amendment][] is enabled, also returns stats about queued transactions associated with this account. Can only be used when querying for the data from the current open ledger. [New in: rippled 0.33.0][] Not available from servers in [Reporting Mode][]. |
| `signer_lists` | Boolean | _(Optional)_ If `true`, and the [MultiSign amendment][] is enabled, also returns any [SignerList objects](signerlist.html) associated with this account. [New in: rippled 0.31.0][] |
| `strict` | Boolean | _(Optional)_ If `true`, then the `account` field only accepts a public key or XRP Ledger address. Otherwise, `account` can be a secret or passphrase (not recommended). The default is `false`. |
The following fields are deprecated and should not be provided: `ident`, `ledger`.
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 5,
"status": "success",
"type": "response",
"result": {
"account_data": {
"Account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
"Balance": "999999999960",
"Flags": 8388608,
"LedgerEntryType": "AccountRoot",
"OwnerCount": 0,
"PreviousTxnID": "4294BEBE5B569A18C0A2702387C9B1E7146DC3A5850C1E87204951C6FDAA4C42",
"PreviousTxnLgrSeq": 3,
"Sequence": 6,
"index": "92FA6A9FC8EA6018D5D16532D7795C91BFB0831355BDFDA177E86C8BF997985F"
},
"ledger_current_index": 4,
"queue_data": {
"auth_change_queued": true,
"highest_sequence": 10,
"lowest_sequence": 6,
"max_spend_drops_total": "500",
"transactions": [
{
"auth_change": false,
"fee": "100",
"fee_level": "2560",
"max_spend_drops": "100",
"seq": 6
},
... (trimmed for length) ...
{
"LastLedgerSequence": 10,
"auth_change": true,
"fee": "100",
"fee_level": "2560",
"max_spend_drops": "100",
"seq": 10
}
],
"txn_count": 5
},
"validated": false
}
}
```
*JSON-RPC*
```json
{
"result": {
"account_data": {
"Account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
"Balance": "999999999960",
"Flags": 8388608,
"LedgerEntryType": "AccountRoot",
"OwnerCount": 0,
"PreviousTxnID": "4294BEBE5B569A18C0A2702387C9B1E7146DC3A5850C1E87204951C6FDAA4C42",
"PreviousTxnLgrSeq": 3,
"Sequence": 6,
"index": "92FA6A9FC8EA6018D5D16532D7795C91BFB0831355BDFDA177E86C8BF997985F"
},
"ledger_current_index": 4,
"queue_data": {
"auth_change_queued": true,
"highest_sequence": 10,
"lowest_sequence": 6,
"max_spend_drops_total": "500",
"transactions": [
{
"auth_change": false,
"fee": "100",
"fee_level": "2560",
"max_spend_drops": "100",
"seq": 6
},
... (trimmed for length) ...
{
"LastLedgerSequence": 10,
"auth_change": true,
"fee": "100",
"fee_level": "2560",
"max_spend_drops": "100",
"seq": 10
}
],
"txn_count": 5
},
"status": "success",
"validated": false
}
}
```
*Commandline*
```json
{
"result" : {
"account_data" : {
"Account" : "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
"Balance" : "9986",
"Flags" : 1114112,
"LedgerEntryType" : "AccountRoot",
"OwnerCount" : 0,
"PreviousTxnID" : "0705FE3F52057924C288296EF0EBF668E0C1A3646FBA8FAF9B73DCC0A797B4B2",
"PreviousTxnLgrSeq" : 51948740,
"RegularKey" : "rhLkGGNZdjSpnHJw4XAFw1Jy7PD8TqxoET",
"Sequence" : 192220,
"index" : "92FA6A9FC8EA6018D5D16532D7795C91BFB0831355BDFDA177E86C8BF997985F"
},
"ledger_hash" : "8169428EDF7F046F817CE44F5F1DF23AD9FAEFFA2CBA7645C3254D66AA79B46E",
"ledger_index" : 56843712,
"status" : "success",
"validated" : true
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with the result containing the requested account, its data, and a ledger to which it applies, as the following fields:
| `Field` | Type | Description |
|:-----------------------|:--------|:------------------------------------------|
| `account_data` | Object | The [AccountRoot ledger object](accountroot.html) with this account's information, as stored in the ledger. |
| `signer_lists` | Array | _(Omitted unless the request specified `signer_lists` and at least one SignerList is associated with the account.)_ Array of [SignerList ledger objects](signerlist.html) associated with this account for [Multi-Signing](multi-signing.html). Since an account can own at most one SignerList, this array must have exactly one member if it is present. [New in: rippled 0.31.0][] |
| `ledger_current_index` | Integer | _(Omitted if `ledger_index` is provided instead)_ The [ledger index][] of the current in-progress ledger, which was used when retrieving this information. |
| `ledger_index` | Integer | _(Omitted if `ledger_current_index` is provided instead)_ The [ledger index][] of the ledger version used when retrieving this information. The information does not contain any changes from ledger versions newer than this one. |
| `queue_data` | Object | _(Omitted unless `queue` specified as `true` and querying the current open ledger.)_ Information about [queued transactions](transaction-cost.html#queued-transactions) sent by this account. This information describes the state of the local `rippled` server, which may be different from other servers in the [peer-to-peer XRP Ledger network](consensus-network.html). Some fields may be omitted because the values are calculated "lazily" by the queuing mechanism. |
| `validated` | Boolean | True if this data is from a validated ledger version; if omitted or set to false, this data is not final. [New in: rippled 0.26.0][] |
The `queue_data` parameter, if present, contains the following fields:
| `Field` | Type | Description |
|:------------------------|:--------|:-----------------------------------------|
| `txn_count` | Integer | Number of queued transactions from this address. |
| `auth_change_queued` | Boolean | (May be omitted) Whether a transaction in the queue changes this address's [ways of authorizing transactions](transaction-basics.html#authorizing-transactions). If `true`, this address can queue no further transactions until that transaction has been executed or dropped from the queue. |
| `lowest_sequence` | Integer | (May be omitted) The lowest [Sequence Number][] among transactions queued by this address. |
| `highest_sequence` | Integer | (May be omitted) The highest [Sequence Number][] among transactions queued by this address. |
| `max_spend_drops_total` | String | (May be omitted) Integer amount of [drops of XRP][] that could be debited from this address if every transaction in the queue consumes the maximum amount of XRP possible. |
| `transactions` | Array | (May be omitted) Information about each queued transaction from this address. |
Each object in the `transactions` array, if present, may contain any or all of the following fields:
| `Field` | Type | Description |
|:------------------|:--------|:-----------------------------------------------|
| `auth_change` | Boolean | Whether this transaction changes this address's [ways of authorizing transactions](transaction-basics.html#authorizing-transactions). |
| `fee` | String | The [Transaction Cost](transaction-cost.html) of this transaction, in [drops of XRP][]. |
| `fee_level` | String | The transaction cost of this transaction, relative to the minimum cost for this type of transaction, in [fee levels][]. |
| `max_spend_drops` | String | The maximum amount of [XRP, in drops][], this transaction could send or destroy. |
| `seq` | Integer | The [Sequence Number][] of this transaction. |
## Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing. For example, the request specified `queue` as `true` but specified a `ledger_index` that is not the current open ledger.
* `actNotFound` - The address specified in the `account` field of the request does not correspond to an account in the ledger.
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
[fee levels]: transaction-cost.html#fee-levels
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,195 @@
---
html: account_lines.html
parent: account-methods.html
blurb: アカウントのトラストラインに関する情報を返します。
labels:
- トークン
---
# account_lines
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountLines.cpp "Source")
`account_lines`メソッドは、アカウントのトラストラインに関する情報XRP以外のあらゆる通貨の残高と資産などを返します。取得された情報はすべて、特定バージョンのレジャーに関連付けられています。
## 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 1,
"command": "account_lines",
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59"
}
```
*JSON-RPC*
```
{
"method": "account_lines",
"params": [
{
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59"
}
]
}
```
<!-- MULTICODE_BLOCK_END -->
[試してみる >](websocket-api-tool.html#account_lines)
要求には以下のパラメーターを指定できます。
| `Field` | 型 | 説明 |
|:---------------|:-------------------------------------------|:---------------|
| `account` | 文字列 | アカウントの一意のIDであり、通常はアカウントの[アドレス][]です。 |
| `ledger_hash` | 文字列 | _省略可_ 使用するレジャーバージョンの20バイトの16進文字列。[レジャーの指定][]を参照してください) |
| `ledger_index` | 文字列または符号なし整数 | _省略可_ 使用するレジャーの[レジャーインデックス][]、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください) |
| `peer` | 文字列 | _省略可_ 2番目のアカウントの[アドレス][]。指定されている場合は、2つのアカウントを結ぶトラストラインだけが出力されます。 |
| `limit` | 整数 | 省略可、デフォルト値は可変取得するトラストラインの数を制限します。サーバーはこの値を受け入れる必要はありません。10以上400以下の範囲で値を指定する必要があります。[新規: rippled 0.26.4][] |
| `marker` | [マーカー][] | _省略可_ 以前にページネーションされた応答の値。その応答を停止した箇所からデータの取得を再開します。[新規: rippled 0.26.4][] |
以下のパラメーターは廃止予定であり、今後予告なしに削除される可能性があります。`ledger`および`peer_index`
## 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 1,
"status": "success",
"type": "response",
"result": {
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"lines": [
{
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"balance": "0",
"currency": "ASP",
"limit": "0",
"limit_peer": "10",
"quality_in": 0,
"quality_out": 0
},
{
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"balance": "0",
"currency": "XAU",
"limit": "0",
"limit_peer": "0",
"no_ripple": true,
"no_ripple_peer": true,
"quality_in": 0,
"quality_out": 0
},
{
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"balance": "3.497605752725159",
"currency": "USD",
"limit": "5",
"limit_peer": "0",
"no_ripple": true,
"quality_in": 0,
"quality_out": 0
}
]
}
}
```
*JSON-RPC*
```
200 OK
{
"result": {
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"lines": [
{
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"balance": "0",
"currency": "ASP",
"limit": "0",
"limit_peer": "10",
"quality_in": 0,
"quality_out": 0
},
{
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"balance": "0",
"currency": "XAU",
"limit": "0",
"limit_peer": "0",
"no_ripple": true,
"no_ripple_peer": true,
"quality_in": 0,
"quality_out": 0
},
{
"account": "rs9M85karFkCRjvc6KMWn8Coigm9cbcgcx",
"balance": "0",
"currency": "015841551A748AD2C1F76FF6ECB0CCCD00000000",
"limit": "10.01037626125837",
"limit_peer": "0",
"no_ripple": true,
"quality_in": 0,
"quality_out": 0
}
],
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合には、アカウントのアドレスとトラストラインオブジェクトの配列が含まれています。具体的には、結果オブジェクトには以下のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:-----------------------|:---------------------------|:-----------------------|
| `account` | 文字列 | この要求に対応するアカウントの一意の[アドレス][]。トラストラインのための「パースペクティブアカウント」です。 |
| `lines` | 配列 | トラストラインオブジェクトからなる配列。以下で説明します。トラストラインの数が多い場合は、一度に`limit`の数までのトラストラインが返されます。 |
| `ledger_current_index` | 整数 - [レジャーインデックス][] | _`ledger_hash`または`ledger_index`が指定されている場合は省略_ この情報の取得時に使用した、現行のオープンレジャーのレジャーインデックス。[新規: rippled 0.26.4-sp1][] |
| `ledger_index` | 整数 - [レジャーインデックス][] | _`ledger_current_index`が代わりに指定されている場合は省略_ このデータの取得時に使用されたレジャーバージョンのレジャーインデックス。[新規: rippled 0.26.4-sp1][] |
| `ledger_hash` | 文字列 - [ハッシュ][] | _省略される場合があります_ このデータの取得時に使用されたレジャーバージョンの識別用ハッシュ。[新規: rippled 0.26.4-sp1][] |
| `marker` | [マーカー][] | 応答がページネーションされていることを示す、サーバーが定義した値。この値を次のコールに渡して、このコールで終わった箇所から再開します。この後に追加のページがない場合は省略されます。[新規: rippled 0.26.4][] |
各トラストラインオブジェクトには以下のフィールドの組み合わせが含まれています。
| `Field` | 型 | 説明 |
|:-----------------|:-----------------|:---------------------------------------|
| `account` | 文字列 | このトラストラインの相手側の一意の[アドレス][]。 |
| `balance` | 文字列 | 現在このラインに対して保留されている残高(数値)の表示。残高がプラスの場合はパースペクティブアカウントがその額を保有しており、マイナスの場合はパースペクティブアカウントがその額を借用しています。 |
| `currency` | 文字列 | このトラストラインが保有できる通貨を示す[通貨コード][]。 |
| `limit` | 文字列 | このアカウントがピアアカウントからの借用を希望する特定の通貨の上限額。 |
| `limit_peer` | 文字列 | 相手側アカウントがパースペクティブアカウントからの借用を希望する特定の通貨の上限額。 |
| `quality_in` | 符号なし整数 | このアカウントが、このトラストラインの入金時残高を評価する際のレートこの数値対10億単位の比率たとえば5億の場合は0.5:1の比率を表します。特殊なケースとして、0は1:1の比率として扱われます。 |
| `quality_out` | 符号なし整数 | このアカウントが、このトラストラインの出金時残高を評価する際のレートこの数値対10億単位の比率たとえば5億の場合は0.5:1の比率を表します。特殊なケースとして、0は1:1の比率として扱われます。 |
| `no_ripple` | ブール値 | (省略される場合があります)このアカウントでこのラインに対し[NoRippleフラグ](rippling.html)が有効な場合は、`true`。省略されている場合は、`false`と同じです。 |
| `no_ripple_peer` | ブール値 | (省略される場合があります)ピアアカウントでこのラインに対し[NoRippleフラグ](rippling.html)が有効な場合は`true`。省略されている場合は、`false`と同じです。 |
| `authorized` | ブール値 | (省略される場合があります)このアカウントが[このトラストラインを承認した](authorized-trust-lines.html)場合は、`true`。省略されている場合は、`false`と同じです。 |
| `peer_authorized` | ブール値 | (省略される場合があります)ピアアカウントが[このトラストラインを承認した](authorized-trust-lines.html)場合は`true`。省略されている場合は、`false`と同じです。 |
| `freeze` | ブール値 | (省略される場合があります)このアカウントがこのトラストラインを[凍結](freezes.html)した場合は`true`。省略されている場合は、`false`と同じです。 |
| `freeze_peer` | ブール値 | (省略される場合があります)ピアアカウントがこのトラストラインを[凍結](freezes.html)した場合は、`true`。省略されている場合は、`false`と同じです。 |
## 考えられるエラー
* いずれかの[汎用エラータイプ][]。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
* `actNotFound` - 要求の`account`フィールドに指定されている[アドレス][]が、レジャーのアカウントに対応していません。
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
* `actMalformed` - 指定されている`marker`フィールドが受け入れられない場合。
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,449 @@
---
html: account_lines.html
parent: account-methods.html
blurb: Get info about an account's trust lines.
labels:
- Tokens
---
# account_lines
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountLines.cpp "Source")
The `account_lines` method returns information about an account's trust lines, including balances in all non-XRP currencies and assets. All information retrieved is relative to a particular version of the ledger.
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 1,
"command": "account_lines",
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59"
}
```
*JSON-RPC*
```json
{
"method": "account_lines",
"params": [
{
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59"
}
]
}
```
*Commandline*
```sh
#Syntax: account_lines <account> [<peer>] [<ledger_index>|<ledger_hash>]
rippled account_lines r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59
```
<!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#account_lines)
The request accepts the following parameters:
| `Field` | Type | Description |
|:---------------|:-------------------------------------------|:---------------|
| `account` | String | A unique identifier for the account, most commonly the account's [Address][]. |
| `ledger_hash` | String | _(Optional)_ A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) |
| `ledger_index` | String or Unsigned Integer | _(Optional)_ The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
| `peer` | String | _(Optional)_ The [Address][] of a second account. If provided, show only lines of trust connecting the two accounts. |
| `limit` | Integer | (Optional, default varies) Limit the number of trust lines to retrieve. The server is not required to honor this value. Must be within the inclusive range 10 to 400. [New in: rippled 0.26.4][] |
| `marker` | [Marker][] | _(Optional)_ Value from a previous paginated response. Resume retrieving data where that response left off. [New in: rippled 0.26.4][] |
The following parameters are deprecated and may be removed without further notice: `ledger` and `peer_index`.
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 1,
"status": "success",
"type": "response",
"result": {
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"lines": [
{
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"balance": "0",
"currency": "ASP",
"limit": "0",
"limit_peer": "10",
"quality_in": 0,
"quality_out": 0
},
{
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"balance": "0",
"currency": "XAU",
"limit": "0",
"limit_peer": "0",
"no_ripple": true,
"no_ripple_peer": true,
"quality_in": 0,
"quality_out": 0
},
{
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"balance": "3.497605752725159",
"currency": "USD",
"limit": "5",
"limit_peer": "0",
"no_ripple": true,
"quality_in": 0,
"quality_out": 0
}
]
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"lines": [
{
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"balance": "0",
"currency": "ASP",
"limit": "0",
"limit_peer": "10",
"quality_in": 0,
"quality_out": 0
},
{
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"balance": "0",
"currency": "XAU",
"limit": "0",
"limit_peer": "0",
"no_ripple": true,
"no_ripple_peer": true,
"quality_in": 0,
"quality_out": 0
},
{
"account": "rs9M85karFkCRjvc6KMWn8Coigm9cbcgcx",
"balance": "0",
"currency": "015841551A748AD2C1F76FF6ECB0CCCD00000000",
"limit": "10.01037626125837",
"limit_peer": "0",
"no_ripple": true,
"quality_in": 0,
"quality_out": 0
}
],
"status": "success"
}
}
```
*Commandline*
```json
{
"result" : {
"account" : "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"ledger_current_index" : 56867265,
"lines" : [
{
"account" : "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"balance" : "0",
"currency" : "ASP",
"limit" : "0",
"limit_peer" : "10",
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"balance" : "0",
"currency" : "XAU",
"limit" : "0",
"limit_peer" : "0",
"no_ripple" : true,
"no_ripple_peer" : true,
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"balance" : "5",
"currency" : "USD",
"limit" : "5",
"limit_peer" : "0",
"no_ripple" : true,
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rHpXfibHgSb64n8kK9QWDpdbfqSpYbM9a4",
"balance" : "481.992867407479",
"currency" : "MXN",
"limit" : "1000",
"limit_peer" : "0",
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
"balance" : "0.793598266778297",
"currency" : "EUR",
"limit" : "1",
"limit_peer" : "0",
"no_ripple" : true,
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK",
"balance" : "0",
"currency" : "CNY",
"limit" : "3",
"limit_peer" : "0",
"no_ripple" : true,
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rGwUWgN5BEg3QGNY3RX2HfYowjUTZdid3E",
"balance" : "1.336889190631542",
"currency" : "DYM",
"limit" : "3",
"limit_peer" : "0",
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"balance" : "0.3488146605801446",
"currency" : "CHF",
"limit" : "0",
"limit_peer" : "0",
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"balance" : "0",
"currency" : "BTC",
"limit" : "3",
"limit_peer" : "0",
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"balance" : "11.68225001668339",
"currency" : "USD",
"limit" : "5000",
"limit_peer" : "0",
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rpgKWEmNqSDAGFhy5WDnsyPqfQxbWxKeVd",
"balance" : "-0.00111",
"currency" : "BTC",
"limit" : "0",
"limit_peer" : "10",
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rBJ3YjwXi2MGbg7GVLuTXUWQ8DjL7tDXh4",
"balance" : "-0.0008744482690504699",
"currency" : "BTC",
"limit" : "0",
"limit_peer" : "10",
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
"balance" : "0",
"currency" : "USD",
"limit" : "1",
"limit_peer" : "0",
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "razqQKzJRdB4UxFPWf5NEpEG3WMkmwgcXA",
"balance" : "9.07619790068559",
"currency" : "CNY",
"limit" : "100",
"limit_peer" : "0",
"no_ripple" : true,
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"balance" : "7.292695098901099",
"currency" : "JPY",
"limit" : "0",
"limit_peer" : "0",
"no_ripple" : true,
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"balance" : "0",
"currency" : "AUX",
"limit" : "0",
"limit_peer" : "0",
"no_ripple" : true,
"no_ripple_peer" : true,
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "r9vbV3EHvXWjSkeQ6CAcYVPGeq7TuiXY2X",
"balance" : "0.0004557360418801623",
"currency" : "USD",
"limit" : "1",
"limit_peer" : "0",
"no_ripple" : true,
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"balance" : "12.41688780720394",
"currency" : "EUR",
"limit" : "100",
"limit_peer" : "0",
"no_ripple" : true,
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rfF3PNkwkq1DygW2wum2HK3RGfgkJjdPVD",
"balance" : "35",
"currency" : "USD",
"limit" : "500",
"limit_peer" : "0",
"no_ripple" : true,
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rwUVoVMSURqNyvocPCcvLu3ygJzZyw8qwp",
"balance" : "-5",
"currency" : "JOE",
"limit" : "0",
"limit_peer" : "50",
"no_ripple_peer" : true,
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rE6R3DWF9fBD7CyiQciePF9SqK58Ubp8o2",
"balance" : "0",
"currency" : "USD",
"limit" : "0",
"limit_peer" : "100",
"no_ripple_peer" : true,
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rE6R3DWF9fBD7CyiQciePF9SqK58Ubp8o2",
"balance" : "0",
"currency" : "JOE",
"limit" : "0",
"limit_peer" : "100",
"no_ripple_peer" : true,
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rs9M85karFkCRjvc6KMWn8Coigm9cbcgcx",
"balance" : "0",
"currency" : "015841551A748AD2C1F76FF6ECB0CCCD00000000",
"limit" : "10.01037626125837",
"limit_peer" : "0",
"no_ripple" : true,
"quality_in" : 0,
"quality_out" : 0
},
{
"account" : "rEhDDUUNxpXgEHVJtC2cjXAgyx5VCFxdMF",
"balance" : "0",
"currency" : "USD",
"limit" : "0",
"limit_peer" : "1",
"quality_in" : 0,
"quality_out" : 0
}
],
"status" : "success",
"validated" : false
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the address of the account and an array of trust line objects. Specifically, the result object contains the following fields:
| `Field` | Type | Description |
|:-----------------------|:---------------------------|:-----------------------|
| `account` | String | Unique [Address][] of the account this request corresponds to. This is the "perspective account" for purpose of the trust lines. |
| `lines` | Array | Array of trust line objects, as described below. If the number of trust lines is large, only returns up to the `limit` at a time. |
| `ledger_current_index` | Integer - [Ledger Index][] | _(Omitted if `ledger_hash` or `ledger_index` provided)_ The ledger index of the current open ledger, which was used when retrieving this information. [New in: rippled 0.26.4-sp1][] |
| `ledger_index` | Integer - [Ledger Index][] | _(Omitted if `ledger_current_index` provided instead)_ The ledger index of the ledger version that was used when retrieving this data. [New in: rippled 0.26.4-sp1][] |
| `ledger_hash` | String - [Hash][] | _(May be omitted)_ The identifying hash the ledger version that was used when retrieving this data. [New in: rippled 0.26.4-sp1][] |
| `marker` | [Marker][] | Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. Omitted when there are no additional pages after this one. [New in: rippled 0.26.4][] |
Each trust line object has some combination of the following fields:
| `Field` | Type | Description |
|:-----------------|:-----------------|:---------------------------------------|
| `account` | String | The unique [Address][] of the counterparty to this trust line. |
| `balance` | String | Representation of the numeric balance currently held against this line. A positive balance means that the perspective account holds value; a negative balance means that the perspective account owes value. |
| `currency` | String | A [Currency Code][] identifying what currency this trust line can hold. |
| `limit` | String | The maximum amount of the given currency that this account is willing to owe the peer account |
| `limit_peer` | String | The maximum amount of currency that the counterparty account is willing to owe the perspective account |
| `quality_in` | Unsigned Integer | Rate at which the account values incoming balances on this trust line, as a ratio of this value per 1 billion units. (For example, a value of 500 million represents a 0.5:1 ratio.) As a special case, 0 is treated as a 1:1 ratio. |
| `quality_out` | Unsigned Integer | Rate at which the account values outgoing balances on this trust line, as a ratio of this value per 1 billion units. (For example, a value of 500 million represents a 0.5:1 ratio.) As a special case, 0 is treated as a 1:1 ratio. |
| `no_ripple` | Boolean | _(May be omitted)_ If `true`, this account has enabled the [No Ripple flag](rippling.html) for this trust line. If present and `false`, this account has disabled the No Ripple flag, but, because the account also has the Default Ripple flag disabled, that is not considered [the default state](ripplestate.html#contributing-to-the-owner-reserve). If omitted, the account has the No Ripple flag disabled for this trust line and Default Ripple enabled. [Updated in: rippled 1.7.0][] |
| `no_ripple_peer` | Boolean | _(May be omitted)_ If `true`, the peer account has enabled the [No Ripple flag](rippling.html) for this trust line. If present and `false`, this account has disabled the No Ripple flag, but, because the account also has the Default Ripple flag disabled, that is not considered [the default state](ripplestate.html#contributing-to-the-owner-reserve). If omitted, the account has the No Ripple flag disabled for this trust line and Default Ripple enabled. [Updated in: rippled 1.7.0][] |
| `authorized` | Boolean | _(May be omitted)_ If `true`, this account has [authorized this trust line](authorized-trust-lines.html). The default is `false`. |
| `peer_authorized`| Boolean | _(May be omitted)_ If `true`, the peer account has [authorized this trust line](authorized-trust-lines.html). The default is `false`. |
| `freeze` | Boolean | _(May be omitted)_ If `true`, this account has [frozen](freezes.html) this trust line. The default is `false`. |
| `freeze_peer` | Boolean | _(May be omitted)_ If `true`, the peer account has [frozen](freezes.html) this trust line. The default is `false`. |
## Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `actNotFound` - The [Address][] specified in the `account` field of the request does not correspond to an account in the ledger.
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
* `actMalformed` - If the `marker` field provided is not acceptable.
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,165 @@
---
html: account_nfts.html
parent: account-methods.html
blurb: Get a list of all NFTs for an account.
labels:
- Non-fungible Tokens, NFTs
status: not_enabled
---
# account_nfts
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountObjects.cpp "Source")
The `account_nfts` method returns a list of `NFToken` objects for the specified account.
{% include '_snippets/nfts-disclaimer.md' %}
## Request Format
An example of the request format:
{% include '_snippets/no-cli-syntax.md' %}
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"command": "account_nfts",
"account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx",
"ledger_index": "validated"
}
```
*JSON-RPC*
```json
{
"method": "account_nfts",
"params": [{
"account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx",
"ledger_index": "validated"
}]
}
```
<!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html?server=wss%3A%2F%2Fxls20-sandbox.rippletest.net%3A51233%2F#account_nfts)
The request includes the following parameters:
| Field | Type | Description |
|:---------------|:-----------------|:-----------------------------------------|
| `account` | String | The unique identifier of an account, typically the account's [Address][]. The request returns a list of NFTs owned by this account. |
| `ledger_hash` | String | _(Optional)_ A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) |
| `ledger_index` | String or Number | _(Optional)_ The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
| `limit` | Integer | _(Optional)_ Limit the number of [token pages][NFTokenPage object] to retrieve. Each page can contain up to 32 NFTs. The `limit` value cannot be lower than 20 or more than 400. The default is 100. |
| `marker` | [Marker][] | _(Optional)_ Value from a previous paginated response. Resume retrieving data where that response left off. |
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"result": {
"account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx",
"account_nfts": [
{
"Flags": 1,
"Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm",
"NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE0875B974D9F00000004",
"NFTokenTaxon": 0,
"URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469",
"nft_serial": 4
},
{
"Flags": 1,
"Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm",
"NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE087727D1EA000000005",
"NFTokenTaxon": 0,
"URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469",
"nft_serial": 5
}
],
"ledger_hash": "7971093E67341E325251268A5B7CD665EF450B126F67DF8384D964DF834961E8",
"ledger_index": 2380540,
"validated": true
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
{
"result": {
"account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx",
"account_nfts": [
{
"Flags": 1,
"Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm",
"NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE0875B974D9F00000004",
"NFTokenTaxon": 0,
"URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469",
"nft_serial": 4
},
{
"Flags": 1,
"Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm",
"NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE087727D1EA000000005",
"NFTokenTaxon": 0,
"URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469",
"nft_serial": 5
}
],
"ledger_hash": "46497E9FF17A993324F1A0A693DC068B467184023C7FD162812265EAAFEB97CB",
"ledger_index": 2380559,
"status": "success",
"validated": true
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:---------------|:-----------------|:-----------------------------------------|
| `account` | String | The account that owns the list of NFTs |
| `account_nfts` | Array | A list of NFTs owned by the account, formatted as **NFT Objects** (see below). |
| `ledger_hash` | String | (May be omitted) The identifying hash of the ledger that was used to generate this response. |
| `ledger_index` | Number - [Ledger Index][] | _(May be omitted)_ The ledger index of the ledger that was used to generate this response. |
| `ledger_current_index` | Number - [Ledger Index][] | _(May be omitted)_ The ledger index of the current in-progress ledger version, which was used to generate this response. |
| `validated` | Boolean | If included and set to `true`, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change. |
### NFT Objects
Each object in the `account_nfts` array represents one [NFToken][] and has the following fields:
| `Field` | Type | Description |
|:---------------|:---------------------|:-------------------------------------|
| `Flags` | Number | A bit-map of boolean flags enabled for this NFToken. See [NFToken Flags](nftoken.html#nftoken-flags) for possible values. |
| `Issuer` | String - [Address][] | The account that issued this NFToken. |
| `NFTokenID` | String | The unique identifier of this NFToken, in hexadecimal. |
| `NFTokenTaxon` | Number | The unscrambled version of this token's [taxon](nftoken.html#taxon). Several tokens with the same taxon might represent instances of a limited series. |
| `URI` | String | The URI data associated with this NFToken, in hexadecimal. |
| `nft_serial` | Number | The token sequence number of this NFToken, which is unique for its issuer. |
## Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `actNotFound` - The [Address][] specified in the `account` field of the request does not correspond to an account in the ledger.
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,630 @@
---
html: account_objects.html
parent: account-methods.html
blurb: アカウントが所有するすべてのオブジェクトを返します。
labels:
- アカウント
- データ保持
---
# account_objects
[[ソース]](https://github.com/ripple/rippled/blob/399c43cae6e90a428e9ce6a988123972b0f03c99/src/ripple/rpc/handlers/AccountObjects.cpp "Source")
`account_objects`コマンドは、アカウントが所有するすべてのオブジェクトの生[レジャーフォーマット][]を返します。アカウントのトラストラインと残高の概要については、[account_linesメソッド][]を参照してください。
アカウントの`account_objects`応答に含まれる可能性のあるオブジェクトのタイプには以下のものがあります。
- 現在処理中、資金化されていない、または有効期限切れで削除されていないオーダーの[Offerオブジェクト](offer.html)。(詳細は、[オファーのライフサイクル](offers.html#オファーのライフサイクル)を参照してください。)
- このアカウント側がデフォルト状態にないトラストラインの[RippleStateオブジェクト](ripplestate.html)。
- アカウントの[SignerList](signerlist.html)(アカウントで[マルチ署名](multi-signing.html)が有効な場合)。
- 実行されていないかまたは取り消されていない保留中の支払いの[Escrowオブジェクト](escrow.html)。
- オープンPayment Channelの[PayChannelオブジェクト](paychannel.html)。
- 保留中のCheckの[Checkオブジェクト](check.html)。
- Deposit Preauthorizationの[DepositPreauthオブジェクト](depositpreauth-object.html)。[新規: rippled 1.1.0][]
## 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 1,
"command": "account_objects",
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"ledger_index": "validated",
"type": "state",
"limit": 10
}
```
*JSON-RPC*
```
{
"method": "account_objects",
"params": [
{
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"ledger_index": "validated",
"limit": 10,
"type": "state"
}
]
}
```
*コマンドライン*
```
#Syntax: account_objects <account> [<ledger>]
rippled account_objects r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 validated
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:---------------|:-------------------------------------------|:---------------|
| `account` | 文字列 | アカウントの一意のIDであり、最も一般的にはアカウントのアドレスが使用されます。 |
| `type` | 文字列 | _省略可_ 指定されている場合、結果をフィルタリングしてこのタイプのレジャーオブジェクトのみが含まれるようにします。有効なタイプは`check``deposit_preauth``escrow``offer``payment_channel``signer_list`、および`state`(トラストライン)です。 <!-- Author's note: Omitted types from this list that can't be owned by an account, and ticket until Tickets are enabled: https://github.com/ripple/rippled/blob/1dbc5a57e6b0e90a9da0d6e56f2f5a99e6ac1d8c/src/ripple/rpc/impl/RPCHelpers.cpp#L676-L686 --> |
| `ledger_hash` | 文字列 | _省略可_ 使用するレジャーバージョンの20バイトの16進文字列。[レジャーの指定][]を参照してください) |
| `ledger_index` | 文字列または符号なし整数 | _省略可_ 使用するレジャーの[レジャーインデックス][]、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください) |
| `limit` | 符号なし整数 | _省略可_ 結果に含めることができるオブジェクトの最大数。非管理者接続では10以上400以下の範囲で値を指定する必要があります。デフォルトでは200です。 |
| `marker` | [マーカー][] | _省略可_ 以前にページネーションされた応答の値。その応答を停止した箇所からデータの取得を再開します。 |
## 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```
{
"id": 8,
"status": "success",
"type": "response",
"result": {
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"account_objects": [
{
"Balance": {
"currency": "ASP",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 65536,
"HighLimit": {
"currency": "ASP",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "ASP",
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"value": "10"
},
"LowNode": "0000000000000000",
"PreviousTxnID": "BF7555B0F018E3C5E2A3FF9437A1A5092F32903BE246202F988181B9CED0D862",
"PreviousTxnLgrSeq": 1438879,
"index": "2243B0B630EA6F7330B654EFA53E27A7609D9484E535AB11B7F946DF3D247CE9"
},
{
"Balance": {
"currency": "XAU",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 3342336,
"HighLimit": {
"currency": "XAU",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "XAU",
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"value": "0"
},
"LowNode": "0000000000000000",
"PreviousTxnID": "79B26D7D34B950AC2C2F91A299A6888FABB376DD76CFF79D56E805BF439F6942",
"PreviousTxnLgrSeq": 5982530,
"index": "9ED4406351B7A511A012A9B5E7FE4059FA2F7650621379C0013492C315E25B97"
},
{
"Balance": {
"currency": "USD",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 1114112,
"HighLimit": {
"currency": "USD",
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "USD",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "5"
},
"LowNode": "0000000000000000",
"PreviousTxnID": "6FE8C824364FB1195BCFEDCB368DFEE3980F7F78D3BF4DC4174BB4C86CF8C5CE",
"PreviousTxnLgrSeq": 10555014,
"index": "2DECFAC23B77D5AEA6116C15F5C6D4669EBAEE9E7EE050A40FE2B1E47B6A9419"
},
{
"Balance": {
"currency": "MXN",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "481.992867407479"
},
"Flags": 65536,
"HighLimit": {
"currency": "MXN",
"issuer": "rHpXfibHgSb64n8kK9QWDpdbfqSpYbM9a4",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "MXN",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "1000"
},
"LowNode": "0000000000000000",
"PreviousTxnID": "A467BACE5F183CDE1F075F72435FE86BAD8626ED1048EDEFF7562A4CC76FD1C5",
"PreviousTxnLgrSeq": 3316170,
"index": "EC8B9B6B364AF6CB6393A423FDD2DDBA96375EC772E6B50A3581E53BFBDFDD9A"
},
{
"Balance": {
"currency": "EUR",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0.793598266778297"
},
"Flags": 1114112,
"HighLimit": {
"currency": "EUR",
"issuer": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "EUR",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "1"
},
"LowNode": "0000000000000000",
"PreviousTxnID": "E9345D44433EA368CFE1E00D84809C8E695C87FED18859248E13662D46A0EC46",
"PreviousTxnLgrSeq": 5447146,
"index": "4513749B30F4AF8DA11F077C448128D6486BF12854B760E4E5808714588AA915"
},
{
"Balance": {
"currency": "CNY",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 2228224,
"HighLimit": {
"currency": "CNY",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "3"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "CNY",
"issuer": "rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK",
"value": "0"
},
"LowNode": "0000000000000008",
"PreviousTxnID": "2FDDC81F4394695B01A47913BEC4281AC9A283CC8F903C14ADEA970F60E57FCF",
"PreviousTxnLgrSeq": 5949673,
"index": "578C327DA8944BDE2E10C9BA36AFA2F43E06C8D1E8819FB225D266CBBCFDE5CE"
},
{
"Balance": {
"currency": "DYM",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "1.336889190631542"
},
"Flags": 65536,
"HighLimit": {
"currency": "DYM",
"issuer": "rGwUWgN5BEg3QGNY3RX2HfYowjUTZdid3E",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "DYM",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "3"
},
"LowNode": "0000000000000000",
"PreviousTxnID": "6DA2BD02DFB83FA4DAFC2651860B60071156171E9C021D9E0372A61A477FFBB1",
"PreviousTxnLgrSeq": 8818732,
"index": "5A2A5FF12E71AEE57564E624117BBA68DEF78CD564EF6259F92A011693E027C7"
},
{
"Balance": {
"currency": "CHF",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "-0.3488146605801446"
},
"Flags": 131072,
"HighLimit": {
"currency": "CHF",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "CHF",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"value": "0"
},
"LowNode": "000000000000008C",
"PreviousTxnID": "722394372525A13D1EAAB005642F50F05A93CF63F7F472E0F91CDD6D38EB5869",
"PreviousTxnLgrSeq": 2687590,
"index": "F2DBAD20072527F6AD02CE7F5A450DBC72BE2ABB91741A8A3ADD30D5AD7A99FB"
},
{
"Balance": {
"currency": "BTC",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 131072,
"HighLimit": {
"currency": "BTC",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "3"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "BTC",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"value": "0"
},
"LowNode": "0000000000000043",
"PreviousTxnID": "03EDF724397D2DEE70E49D512AECD619E9EA536BE6CFD48ED167AE2596055C9A",
"PreviousTxnLgrSeq": 8317037,
"index": "767C12AF647CDF5FEB9019B37018748A79C50EDAF87E8D4C7F39F78AA7CA9765"
},
{
"Balance": {
"currency": "USD",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "-16.00534471983042"
},
"Flags": 131072,
"HighLimit": {
"currency": "USD",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "5000"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"value": "0"
},
"LowNode": "000000000000004A",
"PreviousTxnID": "CFFF5CFE623C9543308C6529782B6A6532207D819795AAFE85555DB8BF390FE7",
"PreviousTxnLgrSeq": 14365854,
"index": "826CF5BFD28F3934B518D0BDF3231259CBD3FD0946E3C3CA0C97D2C75D2D1A09"
}
],
"ledger_hash": "053DF17D2289D1C4971C22F235BC1FCA7D4B3AE966F842E5819D0749E0B8ECD3",
"ledger_index": 14378733,
"limit": 10,
"marker": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93,94A9F05FEF9A153229E2E997E64919FD75AAE2028C8153E8EBDB4440BD3ECBB5",
"validated": true
}
}
```
*JSON-RPC*
```
200 OK
{
"result": {
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"account_objects": [
{
"Balance": {
"currency": "ASP",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 65536,
"HighLimit": {
"currency": "ASP",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "ASP",
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"value": "10"
},
"LowNode": "0000000000000000",
"PreviousTxnID": "BF7555B0F018E3C5E2A3FF9437A1A5092F32903BE246202F988181B9CED0D862",
"PreviousTxnLgrSeq": 1438879,
"index": "2243B0B630EA6F7330B654EFA53E27A7609D9484E535AB11B7F946DF3D247CE9"
},
{
"Balance": {
"currency": "XAU",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 3342336,
"HighLimit": {
"currency": "XAU",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "XAU",
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"value": "0"
},
"LowNode": "0000000000000000",
"PreviousTxnID": "79B26D7D34B950AC2C2F91A299A6888FABB376DD76CFF79D56E805BF439F6942",
"PreviousTxnLgrSeq": 5982530,
"index": "9ED4406351B7A511A012A9B5E7FE4059FA2F7650621379C0013492C315E25B97"
},
{
"Balance": {
"currency": "USD",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 1114112,
"HighLimit": {
"currency": "USD",
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "USD",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "5"
},
"LowNode": "0000000000000000",
"PreviousTxnID": "6FE8C824364FB1195BCFEDCB368DFEE3980F7F78D3BF4DC4174BB4C86CF8C5CE",
"PreviousTxnLgrSeq": 10555014,
"index": "2DECFAC23B77D5AEA6116C15F5C6D4669EBAEE9E7EE050A40FE2B1E47B6A9419"
},
{
"Balance": {
"currency": "MXN",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "481.992867407479"
},
"Flags": 65536,
"HighLimit": {
"currency": "MXN",
"issuer": "rHpXfibHgSb64n8kK9QWDpdbfqSpYbM9a4",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "MXN",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "1000"
},
"LowNode": "0000000000000000",
"PreviousTxnID": "A467BACE5F183CDE1F075F72435FE86BAD8626ED1048EDEFF7562A4CC76FD1C5",
"PreviousTxnLgrSeq": 3316170,
"index": "EC8B9B6B364AF6CB6393A423FDD2DDBA96375EC772E6B50A3581E53BFBDFDD9A"
},
{
"Balance": {
"currency": "EUR",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0.793598266778297"
},
"Flags": 1114112,
"HighLimit": {
"currency": "EUR",
"issuer": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "EUR",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "1"
},
"LowNode": "0000000000000000",
"PreviousTxnID": "E9345D44433EA368CFE1E00D84809C8E695C87FED18859248E13662D46A0EC46",
"PreviousTxnLgrSeq": 5447146,
"index": "4513749B30F4AF8DA11F077C448128D6486BF12854B760E4E5808714588AA915"
},
{
"Balance": {
"currency": "CNY",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 2228224,
"HighLimit": {
"currency": "CNY",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "3"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "CNY",
"issuer": "rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK",
"value": "0"
},
"LowNode": "0000000000000008",
"PreviousTxnID": "2FDDC81F4394695B01A47913BEC4281AC9A283CC8F903C14ADEA970F60E57FCF",
"PreviousTxnLgrSeq": 5949673,
"index": "578C327DA8944BDE2E10C9BA36AFA2F43E06C8D1E8819FB225D266CBBCFDE5CE"
},
{
"Balance": {
"currency": "DYM",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "1.336889190631542"
},
"Flags": 65536,
"HighLimit": {
"currency": "DYM",
"issuer": "rGwUWgN5BEg3QGNY3RX2HfYowjUTZdid3E",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "DYM",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "3"
},
"LowNode": "0000000000000000",
"PreviousTxnID": "6DA2BD02DFB83FA4DAFC2651860B60071156171E9C021D9E0372A61A477FFBB1",
"PreviousTxnLgrSeq": 8818732,
"index": "5A2A5FF12E71AEE57564E624117BBA68DEF78CD564EF6259F92A011693E027C7"
},
{
"Balance": {
"currency": "CHF",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "-0.3488146605801446"
},
"Flags": 131072,
"HighLimit": {
"currency": "CHF",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "CHF",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"value": "0"
},
"LowNode": "000000000000008C",
"PreviousTxnID": "722394372525A13D1EAAB005642F50F05A93CF63F7F472E0F91CDD6D38EB5869",
"PreviousTxnLgrSeq": 2687590,
"index": "F2DBAD20072527F6AD02CE7F5A450DBC72BE2ABB91741A8A3ADD30D5AD7A99FB"
},
{
"Balance": {
"currency": "BTC",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 131072,
"HighLimit": {
"currency": "BTC",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "3"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "BTC",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"value": "0"
},
"LowNode": "0000000000000043",
"PreviousTxnID": "03EDF724397D2DEE70E49D512AECD619E9EA536BE6CFD48ED167AE2596055C9A",
"PreviousTxnLgrSeq": 8317037,
"index": "767C12AF647CDF5FEB9019B37018748A79C50EDAF87E8D4C7F39F78AA7CA9765"
},
{
"Balance": {
"currency": "USD",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "-16.00534471983042"
},
"Flags": 131072,
"HighLimit": {
"currency": "USD",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "5000"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"value": "0"
},
"LowNode": "000000000000004A",
"PreviousTxnID": "CFFF5CFE623C9543308C6529782B6A6532207D819795AAFE85555DB8BF390FE7",
"PreviousTxnLgrSeq": 14365854,
"index": "826CF5BFD28F3934B518D0BDF3231259CBD3FD0946E3C3CA0C97D2C75D2D1A09"
}
],
"ledger_hash": "4C99E5F63C0D0B1C2283B4F5DCE2239F80CE92E8B1A6AED1E110C198FC96E659",
"ledger_index": 14380380,
"limit": 10,
"marker": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93,94A9F05FEF9A153229E2E997E64919FD75AAE2028C8153E8EBDB4440BD3ECBB5",
"status": "success",
"validated": true
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:-----------------------|:--------------------------|:------------------------|
| `account` | 文字列 | この要求に対応するアカウントの一意の[アドレス][]。 |
| `account_objects` | 配列 | このアカウントが所有するオブジェクトの配列。各オブジェクトは、生[レジャーフォーマット][]です。 |
| `ledger_hash` | 文字列 | (省略される場合があります)この応答の生成に使用されたレジャーの識別用ハッシュ。 |
| `ledger_index` | 数値 - [レジャーインデックス][] | _省略される場合があります_ この応答の生成に使用されたレジャーバージョンのレジャーインデックス。 |
| `ledger_current_index` | 数値 - [レジャーインデックス][] | _省略される場合があります_ この応答の生成に使用された現在処理中のレジャーバージョンのレジャーインデックス。 |
| `limit` | 数値 | _省略される場合があります_ この要求で使用されていた制限(制限の使用がある場合)。 |
| `marker` | [マーカー][] | 応答がページネーションされていることを示す、サーバーが定義した値。この値を次のコールに渡して、このコールで終わった箇所から再開します。この後に追加のページがない場合は省略されます。 |
| `validated` | ブール値 | このフィールドが含まれていて`true`に設定されている場合、この応答内の情報は検証済みのレジャーバージョンから取得されています。そうでない場合、情報は変更されることがあります。 |
## 考えられるエラー
* いずれかの[汎用エラータイプ][]。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
* `actNotFound` - 要求の`account`フィールドに指定されている[アドレス][]が、レジャーのアカウントに対応していません。
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,196 @@
---
html: account_offers.html
parent: account-methods.html
blurb: 特定のアカウントから出されたオファーのリストを取得します。
labels:
- 分散型取引所
---
# account_offers
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountOffers.cpp "Source")
`account_offers`メソッドは、特定の[アカウント](accounts.html)から出された[オファー](offers.html)のうち、特定の[レジャーバージョン](ledgers.html)で未処理であったオファーのリストを取得します。
## 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "account_offers",
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM"
}
```
*JSON-RPC*
```json
{
"method": "account_offers",
"params": [
{
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM"
}
]
}
```
*コマンドライン*
```sh
#Syntax: account_offers account [ledger_index]
rippled account_offers r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 current
```
<!-- MULTICODE_BLOCK_END -->
[試してみる >](websocket-api-tool.html#account_offers)
要求には以下のパラメーターを指定できます。
| `Field` | 型 | 説明 |
|:---------------|:----------------------------|:------------------------------|
| `account` | 文字列 | アカウントの一意のIDであり、通常はアカウントの[アドレス][]です。 |
| `ledger` | 符号なし整数または文字列 | _**廃止予定**、省略可_ 使用するレジャーバージョンの一意のIDレジャーインデックス、ハッシュ、「validated」などのショートカットなど。 |
| `ledger_hash` | 文字列 - [ハッシュ][] | _省略可_ 使用するレジャーバージョンを識別する20バイトの16進文字列。 |
| `ledger_index` | 数値 - [レジャーインデックス][] | (省略可、デフォルトでは`current`)使用するレジャーの[レジャーインデックス][]、またはレジャーを動的に選択するための「current」、「closed」、「validated」のいずれか。[レジャーの指定][]を参照してください) |
| `limit` | 整数 | 省略可、デフォルト値は可変取得するトランザクションの数を制限します。サーバーはこの値を受け入れる必要はありません。10以上400以下の範囲で値を指定する必要があります。[新規: rippled 0.26.4][] |
| `marker` | [マーカー][] | _省略可_ 以前にページネーションされた応答の値。その応答を停止した箇所からデータの取得を再開します。[新規: rippled 0.26.4][] |
以下のパラメーターは廃止予定であり、今後予告なしに削除される可能性があります。`ledger`
## 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 9,
"status": "success",
"type": "response",
"result": {
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM",
"ledger_current_index": 18539550,
"offers": [
{
"flags": 0,
"quality": "0.00000000574666765650638",
"seq": 6577664,
"taker_gets": "33687728098",
"taker_pays": {
"currency": "EUR",
"issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq",
"value": "193.5921774819578"
}
},
{
"flags": 0,
"quality": "7989247009094510e-27",
"seq": 6572128,
"taker_gets": "2361918758",
"taker_pays": {
"currency": "XAU",
"issuer": "rrh7rf1gV2pXAoqA8oYbpHd8TKv5ZQeo67",
"value": "0.01886995237307572"
}
},
... trimmed for length ...
],
"validated": false
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM",
"ledger_current_index": 18539596,
"offers": [{
"flags": 0,
"quality": "0.000000007599140009999998",
"seq": 6578020,
"taker_gets": "29740867287",
"taker_pays": {
"currency": "USD",
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"value": "226.0050145327418"
}
}, {
"flags": 0,
"quality": "7989247009094510e-27",
"seq": 6572128,
"taker_gets": "2361918758",
"taker_pays": {
"currency": "XAU",
"issuer": "rrh7rf1gV2pXAoqA8oYbpHd8TKv5ZQeo67",
"value": "0.01886995237307572"
}
}, {
"flags": 0,
"quality": "0.00000004059594001318974",
"seq": 6576905,
"taker_gets": "3892952574",
"taker_pays": {
"currency": "CNY",
"issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y",
"value": "158.0380691682966"
}
},
...
],
"status": "success",
"validated": false
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:-----------------------|:--------------------------|:------------------------|
| `account` | 文字列 | オファーを出したアカウントを識別する一意の[アドレス][] |
| `offers` | 配列 | オブジェクトの配列。各オブジェクトは、このアカウントが出したオファーの中で、レジャーバージョンが要求された時点で未処理のオファーを表します。オファーの数が多い場合は、一度に`limit`の数までのオファーが返されます。 |
| `ledger_current_index` | 数値 - [レジャーインデックス][] | _`ledger_hash`または`ledger_index`が指定されている場合は省略可_ このデータの取得時に使用した、現在処理中のレジャーバージョンのレジャーインデックス。[新規: rippled 0.26.4-sp1][] |
| `ledger_index` | 数値 - [レジャーインデックス][] | _`ledger_current_index`が代わりに指定されている場合は省略可_ 要求に従って、このデータの取得時に使用されたレジャーバージョンのレジャーインデックス。[新規: rippled 0.26.4-sp1][] |
| `ledger_hash` | 文字列 - [ハッシュ][] | _省略される場合があります_ このデータの取得時に使用されたレジャーバージョンの識別用ハッシュ。[新規: rippled 0.26.4-sp1][] |
| `marker` | [マーカー][] | _省略される場合があります_ 応答がページネーションされていることを示す、サーバーが定義した値。この値を次のコールに渡して、このコールで終わった箇所から再開します。この後に情報ページがない場合は省略されます。[新規: rippled 0.26.4][] |
各Offerオブジェクトのフィールドを次に示します。
| `Field` | 型 | 説明 |
|:-------------|:-----------------|:-------------------------------------------|
| `flags` | 符号なし整数 | このオファーエントリに対してビットフラグとして設定されているオプション。 |
| `seq` | 符号なし整数 | このエントリを作成したトランザクションのシーケンス番号。(トランザクションの[シーケンス番号](basic-data-types.html#アカウントシーケンス)はアカウントに関連付けられています。) |
| `taker_gets` | 文字列またはオブジェクト | オファーを受け入れるアカウントが受領する額。XRPまたは通貨指定オブジェクトの額を表す文字列として示されます。[通貨額の指定][通貨額]を参照してください。) |
| `taker_pays` | 文字列またはオブジェクト | オファーを受け入れるアカウントが提供する額。XRPまたは通貨指定オブジェクトの額を表す文字列として示されます。[通貨額の指定][通貨額]を参照してください。) |
| `quality` | 文字列 | オファーの為替レート。元の`taker_pays`を元の`taker_gets`で割った比率です。オファーの実行時には、最も好ましい(最も低い)クオリティのオファーが最初に消費されます。同じクオリティのオファーは古いものから新しいものの順で実行されます。[新規: rippled 0.29.0][] |
| `expiration` | 符号なし整数 | (省略される場合があります)この時刻の経過後は、資金化されなかったオファーとみなされます([Rippleエポック以降の経過秒数][])。関連項目: [オファーの有効期限](offers.html#オファーの有効期限)。[新規: rippled 0.30.1][] |
## 考えられるエラー
* いずれかの[汎用エラータイプ][]。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
* `actNotFound` - 要求の`account`フィールドに指定されている[アドレス][]が、レジャーのアカウントに対応していません。
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
* `actMalformed` - 指定されている`marker`フィールドが受け入れられない場合。
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,223 @@
---
html: account_offers.html
parent: account-methods.html
blurb: Get info about an account's currency exchange offers.
labels:
- Decentralized Exchange
---
# account_offers
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountOffers.cpp "Source")
The `account_offers` method retrieves a list of [offers](offers.html) made by a given [account](accounts.html) that are outstanding as of a particular [ledger version](ledgers.html).
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 9,
"command": "account_offers",
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM"
}
```
*JSON-RPC*
```json
{
"method": "account_offers",
"params": [
{
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM"
}
]
}
```
*Commandline*
```sh
#Syntax: account_offers account [ledger_index] [strict]
rippled account_offers rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM current strict
```
<!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#account_offers)
A request can include the following parameters:
| `Field` | Type | Description |
|:---------------|:----------------------------|:------------------------------|
| `account` | String | A unique identifier for the account, most commonly the account's [Address][]. |
| `ledger` | Unsigned Integer, or String | _(**Deprecated**, Optional)_ A unique identifier for the ledger version to use, such as a ledger index, a hash, or a shortcut such as "validated". |
| `ledger_hash` | String - [Hash][] | _(Optional)_ A 20-byte hex string identifying the ledger version to use. |
| `ledger_index` | Number - [Ledger Index][] | (Optional, defaults to `current`) The [ledger index][] of the ledger to use, or "current", "closed", or "validated" to select a ledger dynamically. (See [Specifying Ledgers][]) |
| `limit` | Integer | (Optional, default varies) Limit the number of transactions to retrieve. The server is not required to honor this value. Must be within the inclusive range 10 to 400. [New in: rippled 0.26.4][] |
| `marker` | [Marker][] | _(Optional)_ Value from a previous paginated response. Resume retrieving data where that response left off. [New in: rippled 0.26.4][] |
| `strict` | Boolean | _(Optional)_ If `true`, then the `account` field only accepts a public key or XRP Ledger address. Otherwise, `account` can be a secret or passphrase (not recommended). The default is `false`. |
The following parameter is deprecated and may be removed without further notice: `ledger`.
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 9,
"status": "success",
"type": "response",
"result": {
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM",
"ledger_current_index": 18539550,
"offers": [
{
"flags": 0,
"quality": "0.00000000574666765650638",
"seq": 6577664,
"taker_gets": "33687728098",
"taker_pays": {
"currency": "EUR",
"issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq",
"value": "193.5921774819578"
}
},
{
"flags": 0,
"quality": "7989247009094510e-27",
"seq": 6572128,
"taker_gets": "2361918758",
"taker_pays": {
"currency": "XAU",
"issuer": "rrh7rf1gV2pXAoqA8oYbpHd8TKv5ZQeo67",
"value": "0.01886995237307572"
}
},
... trimmed for length ...
],
"validated": false
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM",
"ledger_current_index": 18539596,
"offers": [{
"flags": 0,
"quality": "0.000000007599140009999998",
"seq": 6578020,
"taker_gets": "29740867287",
"taker_pays": {
"currency": "USD",
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"value": "226.0050145327418"
}
}, {
"flags": 0,
"quality": "7989247009094510e-27",
"seq": 6572128,
"taker_gets": "2361918758",
"taker_pays": {
"currency": "XAU",
"issuer": "rrh7rf1gV2pXAoqA8oYbpHd8TKv5ZQeo67",
"value": "0.01886995237307572"
}
}, {
"flags": 0,
"quality": "0.00000004059594001318974",
"seq": 6576905,
"taker_gets": "3892952574",
"taker_pays": {
"currency": "CNY",
"issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y",
"value": "158.0380691682966"
}
},
...
],
"status": "success",
"validated": false
}
}
```
*Commandline*
```json
{
"result" : {
"account" : "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM",
"ledger_current_index" : 57110969,
"offers" : [
{
"flags" : 0,
"quality" : "1499850014.892974",
"seq" : 7916201,
"taker_gets" : {
"currency" : "BCH",
"issuer" : "rcyS4CeCZVYvTiKcxj6Sx32ibKwcDHLds",
"value" : "0.5268598580881351"
},
"taker_pays" : "790210766"
}
],
"status" : "success",
"validated" : false
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:-----------------------|:--------------------------|:------------------------|
| `account` | String | Unique [Address][] identifying the account that made the offers |
| `offers` | Array | Array of objects, where each object represents an offer made by this account that is outstanding as of the requested ledger version. If the number of offers is large, only returns up to `limit` at a time. |
| `ledger_current_index` | Number - [Ledger Index][] | _(Omitted if `ledger_hash` or `ledger_index` provided)_ The ledger index of the current in-progress ledger version, which was used when retrieving this data. [New in: rippled 0.26.4-sp1][] |
| `ledger_index` | Number - [Ledger Index][] | _(Omitted if `ledger_current_index` provided instead)_ The ledger index of the ledger version that was used when retrieving this data, as requested. [New in: rippled 0.26.4-sp1][] |
| `ledger_hash` | String - [Hash][] | _(May be omitted)_ The identifying hash of the ledger version that was used when retrieving this data. [New in: rippled 0.26.4-sp1][] |
| `marker` | [Marker][] | _(May be omitted)_ Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. Omitted when there are no pages of information after this one. [New in: rippled 0.26.4][] |
Each offer object contains the following fields:
| `Field` | Type | Description |
|:-------------|:-----------------|:-------------------------------------------|
| `flags` | Unsigned integer | Options set for this offer entry as bit-flags. |
| `seq` | Unsigned integer | Sequence number of the transaction that created this entry. (Transaction [sequence numbers](basic-data-types.html#account-sequence) are relative to accounts.) |
| `taker_gets` | String or Object | The amount the account accepting the offer receives, as a String representing an amount in XRP, or a currency specification object. (See [Specifying Currency Amounts][Currency Amount]) |
| `taker_pays` | String or Object | The amount the account accepting the offer provides, as a String representing an amount in XRP, or a currency specification object. (See [Specifying Currency Amounts][Currency Amount]) |
| `quality` | String | The exchange rate of the offer, as the ratio of the original `taker_pays` divided by the original `taker_gets`. When executing offers, the offer with the most favorable (lowest) quality is consumed first; offers with the same quality are executed from oldest to newest. [New in: rippled 0.29.0][] |
| `expiration` | Unsigned integer | (May be omitted) A time after which this offer is considered unfunded, as the number of [seconds since the Ripple Epoch][]. See also: [Offer Expiration](offers.html#offer-expiration). [New in: rippled 0.30.1][] |
## Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `actNotFound` - The [Address][] specified in the `account` field of the request does not correspond to an account in the ledger.
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
* `actMalformed` - The `marker` field provided is incorrect.
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,601 @@
---
html: account_tx.html
parent: account-methods.html
blurb: 指定したアカウントに関連するトランザクションのリストを取得します。
labels:
- Accounts
- Payments
---
# account_tx
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountTx.cpp "Source")
`account_tx`メソッドは、指定したアカウントに関連するトランザクションのリストを取得します。
## 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "account_tx",
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"ledger_index_min": -1,
"ledger_index_max": -1,
"binary": false,
"limit": 2,
"forward": false
}
```
*JSON-RPC*
```json
{
"method": "account_tx",
"params": [
{
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"binary": false,
"forward": false,
"ledger_index_max": -1,
"ledger_index_min": -1,
"limit": 2
}
]
}
```
*コマンドライン*
```sh
#Syntax account_tx account ledger_index_min ledger_index_max [offset] [limit] [binary] [count] [forward]
rippled -- account_tx r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 -1 -1 2 5 1 0 1
```
<!-- MULTICODE_BLOCK_END -->
[試してみる >](websocket-api-tool.html#account_tx)
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:-------------------|:-------------------------------------------|:-----------|
| `account` | 文字列 | アカウントの一意のIDであり、最も一般的にはアカウントのアドレスが使用されます。 |
| `ledger_index_min` | 整数 | _省略可能_ 含めるトランザクションのレジャーのうち最古のものを指定するのに使用します。`-1`の値は、使用可能な検証済みレジャーのうち最古のバージョンを使用するよう、サーバーに指示します。 |
| `ledger_index_max` | 整数 | _省略可能_ 含めるトランザクションのレジャーのうち最新のものを指定するのに使用します。`-1`の値は、使用可能な検証済みレジャーのうち最新のバージョンを使用するよう、サーバーに指示します。 |
| `ledger_hash` | 文字列 | _省略可能_ 単一のレジャーからのみトランザクションを検索するのに使用します。([レジャーの指定][]を参照してください) |
| `ledger_index` | 文字列または符号なし整数 | _省略可能_ 単一のレジャーからのみトランザクションを検索するのに使用します。([レジャーの指定][]を参照してください) |
| `binary` | ブール値 | _省略可能_ デフォルトは`false`です。`true`に設定すると、JSONの代わりに16進文字列でトランザクションが返されます。 |
| `forward` | ブール値 | _省略可能_ デフォルトは`false`です。`true`に設定すると、最も古いレジャーを先頭としてインデックスが付けられた値が返されます。そうしない場合、最新のレジャーを先頭として結果にインデックスが付けられます。(結果を示した各ページの中身は順序よく整理されていない場合がありますが、ページ全体としては順序付けされています。) |
| `limit` | 整数 | _省略可能_ デフォルトは変化します。取得するトランザクションの数を制限します。サーバーはこの値を受け入れる必要はありません。 |
| `marker` | [マーカー][] | 以前にページネーションされた応答の値。その応答を停止した箇所からデータの取得を再開します。サーバーが使用できるレジャーの範囲に変更があっても、この値は変わりません。 |
次の各フィールドは省略可能とされていますが、要求内で**1つ以上は使用する必要があります**: `ledger_index``ledger_hash``ledger_index_min`、または`ledger_index_max`
次のフィールドは廃止されました: `offset``count``descending``ledger_max``ledger_min`。 [削除: rippled 1.7.0][]
### 照会されたデータの繰り返し
他のページネーションメソッドと同様に、`marker`フィールドを使用すると複数ページのデータが返されます。
複数の要求の合間に、`"ledger_index_min": -1``"ledger_index_max": -1`が変更されて、以前とは異なるレジャーバージョンを参照する場合があります。`marker`フィールドを使用すると、要求からのレジャー範囲に変更がある場合でも、マーカーが示すポイントが要求で指定されたレジャーの範囲外でない限り、安全にページネーションできます。
## 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"status": "success",
"type": "response",
"result": {
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"ledger_index_max": 6542489,
"ledger_index_min": 32570,
"limit": 2,
"transactions": [
{
"meta": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Balance": "9999999980",
"Flags": 0,
"OwnerCount": 2,
"Sequence": 3
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05",
"PreviousFields": {
"Balance": "9999999990",
"OwnerCount": 1,
"Sequence": 2
},
"PreviousTxnID": "389720F6FD8A144F171708F9ECB334D704CBCFEFBCDA152D931AC34FB5F9E32B",
"PreviousTxnLgrSeq": 95405
}
},
{
"CreatedNode": {
"LedgerEntryType": "RippleState",
"LedgerIndex": "718C6D58DD3BBAAAEBFE48B8FBE3C32C9F6F2EBC395233BA95D0057078EE07DB",
"NewFields": {
"Balance": {
"currency": "USD",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 131072,
"HighLimit": {
"currency": "USD",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "100"
},
"LowLimit": {
"currency": "USD",
"issuer": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
"value": "0"
}
}
}
},
{
"ModifiedNode": {
"FinalFields": {
"Flags": 0,
"Owner": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
"RootIndex": "77F65EFF930ED7E93C6CC839C421E394D6B1B6A47CEA8A140D63EC9C712F46F5"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "77F65EFF930ED7E93C6CC839C421E394D6B1B6A47CEA8A140D63EC9C712F46F5"
}
},
{
"ModifiedNode": {
"FinalFields": {
"Account": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
"Balance": "78991384535796",
"Flags": 0,
"OwnerCount": 3,
"Sequence": 188
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "B33FDD5CF3445E1A7F2BE9B06336BEBD73A5E3EE885D3EF93F7E3E2992E46F1A",
"PreviousTxnID": "E9E1988A0F061679E5D14DE77DB0163CE0BBDC00F29E396FFD1DA0366E7D8904",
"PreviousTxnLgrSeq": 195455
}
},
{
"ModifiedNode": {
"FinalFields": {
"ExchangeRate": "4E11C37937E08000",
"Flags": 0,
"RootIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93",
"TakerGetsCurrency": "0000000000000000000000000000000000000000",
"TakerGetsIssuer": "0000000000000000000000000000000000000000",
"TakerPaysCurrency": "0000000000000000000000004254430000000000",
"TakerPaysIssuer": "5E7B112523F68D2F5E879DB4EAC51C6698A69304"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93"
}
}
],
"TransactionIndex": 0,
"TransactionResult": "tesSUCCESS"
},
"tx": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": "10",
"Flags": 0,
"LimitAmount": {
"currency": "USD",
"issuer": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
"value": "100"
},
"Sequence": 2,
"SigningPubKey": "02BC8C02199949B15C005B997E7C8594574E9B02BA2D0628902E0532989976CF9D",
"TransactionType": "TrustSet",
"TxnSignature": "304402200EF81EC32E0DFA9BE376B20AFCA11765ED9FEA04CA8B77C7178DAA699F7F5AFF02202DA484DBD66521AC317D84F7717EC4614E2F5DB743E313E8B48440499CC0DBA4",
"date": 413620090,
"hash": "002AA492496A1543DBD3680BF8CF21B6D6A078CE4A01D2C1A4B63778033792CE",
"inLedger": 195480,
"ledger_index": 195480
},
"validated": true
},
{
"meta": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Balance": "9999999970",
"Flags": 0,
"OwnerCount": 3,
"Sequence": 4
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05",
"PreviousFields": {
"Balance": "9999999980",
"OwnerCount": 2,
"Sequence": 3
},
"PreviousTxnID": "002AA492496A1543DBD3680BF8CF21B6D6A078CE4A01D2C1A4B63778033792CE",
"PreviousTxnLgrSeq": 195480
}
},
{
"ModifiedNode": {
"FinalFields": {
"Flags": 0,
"Owner": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH",
"RootIndex": "A39F044D860C5B5846AA7E0FAAD44DC8897F0A62B2F628AA073B21B3EC146010"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "A39F044D860C5B5846AA7E0FAAD44DC8897F0A62B2F628AA073B21B3EC146010"
}
},
{
"ModifiedNode": {
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "E0D7BDE68B468FF0B8D948FD865576517DA987569833A05374ADB9A72E870A06",
"PreviousTxnID": "0222B59280D165D40C464EA75AAD08A4D152C46A38C0625DEECF6EE87FC5B9E1",
"PreviousTxnLgrSeq": 343555
}
},
{
"CreatedNode": {
"LedgerEntryType": "RippleState",
"LedgerIndex": "EA4BF03B4700123CDFFB6EB09DC1D6E28D5CEB7F680FB00FC24BC1C3BB2DB959",
"NewFields": {
"Balance": {
"currency": "USD",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 131072,
"HighLimit": {
"currency": "USD",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "100"
},
"LowLimit": {
"currency": "USD",
"issuer": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH",
"value": "0"
}
}
}
},
{
"ModifiedNode": {
"FinalFields": {
"ExchangeRate": "4E11C37937E08000",
"Flags": 0,
"RootIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93",
"TakerGetsCurrency": "0000000000000000000000000000000000000000",
"TakerGetsIssuer": "0000000000000000000000000000000000000000",
"TakerPaysCurrency": "0000000000000000000000004254430000000000",
"TakerPaysIssuer": "5E7B112523F68D2F5E879DB4EAC51C6698A69304"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93"
}
}
],
"TransactionIndex": 0,
"TransactionResult": "tesSUCCESS"
},
"tx": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": "10",
"Flags": 0,
"LimitAmount": {
"currency": "USD",
"issuer": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH",
"value": "100"
},
"Sequence": 3,
"SigningPubKey": "02BC8C02199949B15C005B997E7C8594574E9B02BA2D0628902E0532989976CF9D",
"TransactionType": "TrustSet",
"TxnSignature": "3044022058A89552068D1A274EE72BA71363E33E54E6608BC28A84DEC6EE530FC2B5C979022029F4D1EA1237A1F717C5F5EC526E6CFB6DF54C30BADD25EDDE7D2FDBC8F17E34",
"date": 416347560,
"hash": "53354D84BAE8FDFC3F4DA879D984D24B929E7FEB9100D2AD9EFCD2E126BCCDC8",
"inLedger": 343570,
"ledger_index": 343570
},
"validated": true
}
],
"validated": true
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"ledger_index_max": 8696227,
"ledger_index_min": 32570,
"limit": 2,
"status": "success",
"transactions": [
{
"meta": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Balance": "9999999980",
"Flags": 0,
"OwnerCount": 2,
"Sequence": 3
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05",
"PreviousFields": {
"Balance": "9999999990",
"OwnerCount": 1,
"Sequence": 2
},
"PreviousTxnID": "389720F6FD8A144F171708F9ECB334D704CBCFEFBCDA152D931AC34FB5F9E32B",
"PreviousTxnLgrSeq": 95405
}
},
{
"CreatedNode": {
"LedgerEntryType": "RippleState",
"LedgerIndex": "718C6D58DD3BBAAAEBFE48B8FBE3C32C9F6F2EBC395233BA95D0057078EE07DB",
"NewFields": {
"Balance": {
"currency": "USD",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 131072,
"HighLimit": {
"currency": "USD",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "100"
},
"LowLimit": {
"currency": "USD",
"issuer": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
"value": "0"
}
}
}
},
{
"ModifiedNode": {
"FinalFields": {
"Flags": 0,
"Owner": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
"RootIndex": "77F65EFF930ED7E93C6CC839C421E394D6B1B6A47CEA8A140D63EC9C712F46F5"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "77F65EFF930ED7E93C6CC839C421E394D6B1B6A47CEA8A140D63EC9C712F46F5"
}
},
{
"ModifiedNode": {
"FinalFields": {
"Account": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
"Balance": "78991384535796",
"Flags": 0,
"OwnerCount": 3,
"Sequence": 188
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "B33FDD5CF3445E1A7F2BE9B06336BEBD73A5E3EE885D3EF93F7E3E2992E46F1A",
"PreviousTxnID": "E9E1988A0F061679E5D14DE77DB0163CE0BBDC00F29E396FFD1DA0366E7D8904",
"PreviousTxnLgrSeq": 195455
}
},
{
"ModifiedNode": {
"FinalFields": {
"ExchangeRate": "4E11C37937E08000",
"Flags": 0,
"RootIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93",
"TakerGetsCurrency": "0000000000000000000000000000000000000000",
"TakerGetsIssuer": "0000000000000000000000000000000000000000",
"TakerPaysCurrency": "0000000000000000000000004254430000000000",
"TakerPaysIssuer": "5E7B112523F68D2F5E879DB4EAC51C6698A69304"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93"
}
}
],
"TransactionIndex": 0,
"TransactionResult": "tesSUCCESS"
},
"tx": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": "10",
"Flags": 0,
"LimitAmount": {
"currency": "USD",
"issuer": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
"value": "100"
},
"Sequence": 2,
"SigningPubKey": "02BC8C02199949B15C005B997E7C8594574E9B02BA2D0628902E0532989976CF9D",
"TransactionType": "TrustSet",
"TxnSignature": "304402200EF81EC32E0DFA9BE376B20AFCA11765ED9FEA04CA8B77C7178DAA699F7F5AFF02202DA484DBD66521AC317D84F7717EC4614E2F5DB743E313E8B48440499CC0DBA4",
"date": 413620090,
"hash": "002AA492496A1543DBD3680BF8CF21B6D6A078CE4A01D2C1A4B63778033792CE",
"inLedger": 195480,
"ledger_index": 195480
},
"validated": true
},
{
"meta": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Balance": "9999999970",
"Flags": 0,
"OwnerCount": 3,
"Sequence": 4
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05",
"PreviousFields": {
"Balance": "9999999980",
"OwnerCount": 2,
"Sequence": 3
},
"PreviousTxnID": "002AA492496A1543DBD3680BF8CF21B6D6A078CE4A01D2C1A4B63778033792CE",
"PreviousTxnLgrSeq": 195480
}
},
{
"ModifiedNode": {
"FinalFields": {
"Flags": 0,
"Owner": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH",
"RootIndex": "A39F044D860C5B5846AA7E0FAAD44DC8897F0A62B2F628AA073B21B3EC146010"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "A39F044D860C5B5846AA7E0FAAD44DC8897F0A62B2F628AA073B21B3EC146010"
}
},
{
"ModifiedNode": {
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "E0D7BDE68B468FF0B8D948FD865576517DA987569833A05374ADB9A72E870A06",
"PreviousTxnID": "0222B59280D165D40C464EA75AAD08A4D152C46A38C0625DEECF6EE87FC5B9E1",
"PreviousTxnLgrSeq": 343555
}
},
{
"CreatedNode": {
"LedgerEntryType": "RippleState",
"LedgerIndex": "EA4BF03B4700123CDFFB6EB09DC1D6E28D5CEB7F680FB00FC24BC1C3BB2DB959",
"NewFields": {
"Balance": {
"currency": "USD",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 131072,
"HighLimit": {
"currency": "USD",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "100"
},
"LowLimit": {
"currency": "USD",
"issuer": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH",
"value": "0"
}
}
}
},
{
"ModifiedNode": {
"FinalFields": {
"ExchangeRate": "4E11C37937E08000",
"Flags": 0,
"RootIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93",
"TakerGetsCurrency": "0000000000000000000000000000000000000000",
"TakerGetsIssuer": "0000000000000000000000000000000000000000",
"TakerPaysCurrency": "0000000000000000000000004254430000000000",
"TakerPaysIssuer": "5E7B112523F68D2F5E879DB4EAC51C6698A69304"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93"
}
}
],
"TransactionIndex": 0,
"TransactionResult": "tesSUCCESS"
},
"tx": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": "10",
"Flags": 0,
"LimitAmount": {
"currency": "USD",
"issuer": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH",
"value": "100"
},
"Sequence": 3,
"SigningPubKey": "02BC8C02199949B15C005B997E7C8594574E9B02BA2D0628902E0532989976CF9D",
"TransactionType": "TrustSet",
"TxnSignature": "3044022058A89552068D1A274EE72BA71363E33E54E6608BC28A84DEC6EE530FC2B5C979022029F4D1EA1237A1F717C5F5EC526E6CFB6DF54C30BADD25EDDE7D2FDBC8F17E34",
"date": 416347560,
"hash": "53354D84BAE8FDFC3F4DA879D984D24B929E7FEB9100D2AD9EFCD2E126BCCDC8",
"inLedger": 343570,
"ledger_index": 343570
},
"validated": true
}
],
"validated": true
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:-------------------|:---------------------------|:---------------------------|
| `account` | 文字列 | 関連するアカウントを識別する一意の[アドレス][]。 |
| `ledger_index_min` | 整数 - [レジャーインデックス][] | トランザクションで実際に検索された最古のレジャーのレジャーインデックス。 |
| `ledger_index_max` | 整数 - [レジャーインデックス][] | トランザクションで実際に検索された最新のレジャーのレジャーインデックス。 |
| `limit` | 整数 | 要求で使用される`limit`値。(サーバーによって強制される実際の制限値とは異なる場合があります。) |
| `marker` | [マーカー][] | 応答がページネーションされていることを示す、サーバーが定義した値。この値を次のコールに渡して、このコールで終わった箇所から再開します。 |
| `transactions` | 配列 | 以降で説明する、要求の基準を満たすトランザクションの配列。 |
| `validated` | ブール値 | このフィールドが含まれていて`true`に設定されている場合、この応答内の情報は検証済みのレジャーバージョンから取得されています。そうでない場合、情報は変更されることがあります。 |
**注記:** サーバーから返される`ledger_index_min`および`ledger_index_max`の値が要求で指定したものとは異なる場合があります。例えば、サーバーに手元の指定したバージョンがない場合など。
各トランザクションのオブジェクトには以下のフィールドが含まれます。含まれるフィールドは、JSONまたは16進文字列`"binary":true`)フォーマットのどちらで要求されたかによって異なります。
| `Field` | 型 | 説明 |
|:---------------|:---------------------------------|:-------------------------|
| `ledger_index` | 整数 | このトランザクションを含むレジャーバージョンの[レジャーインデックス][]。 |
| `meta` | オブジェクトJSONまたは文字列バイナリ | `binary`がTrueの場合、これは16進文字列のトランザクションメタデータです。そうでない場合、トランザクションメタデータはJSONフォーマットになります。 |
| `tx` | オブジェクト | JSONモードのみトランザクションを定義するJSONオブジェクト。 |
| `tx_blob` | 文字列 | (バイナリモードのみ)トランザクションを表す一意のハッシュ化された文字列。 |
| `validated` | ブール値 | トランザクションが検証済みのレジャーに含まれるかどうか。検証済みのレジャーに含まれていないトランザクションはすべて、変更される場合があります。 |
## 考えられるエラー
* いずれかの[汎用エラータイプ][]。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
* `actMalformed` - 要求の`account`フィールドに指定した[アドレス][]が、正しいフォーマットではありません。
* `lgrIdxMalformed` - `ledger_index_min`または`ledger_index_max`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
* `lgrIdxsInvalid` - 要求で`ledger_index_min`の前にある`ledger_index_max`を指定したか、[ネットワークと同期](troubleshoot-the-rippled-server.html)されていないためにサーバーに検証済みレジャーの範囲が存在しません。
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,465 @@
---
html: account_tx.html
parent: account-methods.html
blurb: Get info about an account's transactions.
labels:
- Payments
- Accounts
---
# account_tx
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountTx.cpp "Source")
The `account_tx` method retrieves a list of transactions that involved the specified account.
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "account_tx",
"account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
"ledger_index_min": -1,
"ledger_index_max": -1,
"binary": false,
"limit": 2,
"forward": false
}
```
*JSON-RPC*
```json
{
"method": "account_tx",
"params": [
{
"account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
"binary": false,
"forward": false,
"ledger_index_max": -1,
"ledger_index_min": -1,
"limit": 2
}
]
}
```
*Commandline*
```sh
# Syntax: account_tx account [ledger_index_min [ledger_index_max]] [limit] [offset] [binary] [count] [descending]
# For binary/count/descending, use the parameter name for true and omit for false.
rippled -- account_tx rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w -1 -1 2 0 binary descending
```
<!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#account_tx)
The request includes the following parameters:
| `Field` | Type | Description |
|:-------------------|:-------------------------------------------|:-----------|
| `account` | String | A unique identifier for the account, most commonly the account's address. |
| `ledger_index_min` | Integer | _(Optional)_ Use to specify the earliest ledger to include transactions from. A value of `-1` instructs the server to use the earliest validated ledger version available. |
| `ledger_index_max` | Integer | _(Optional)_ Use to specify the most recent ledger to include transactions from. A value of `-1` instructs the server to use the most recent validated ledger version available. |
| `ledger_hash` | String | _(Optional)_ Use to look for transactions from a single ledger only. (See [Specifying Ledgers][].) |
| `ledger_index` | String or Unsigned Integer | _(Optional)_ Use to look for transactions from a single ledger only. (See [Specifying Ledgers][].) |
| `binary` | Boolean | _(Optional)_ Defaults to `false`. If set to `true`, returns transactions as hex strings instead of JSON. |
| `forward` | Boolean | _(Optional)_ Defaults to `false`. If set to `true`, returns values indexed with the oldest ledger first. Otherwise, the results are indexed with the newest ledger first. (Each page of results may not be internally ordered, but the pages are overall ordered.) |
| `limit` | Integer | _(Optional)_ Default varies. Limit the number of transactions to retrieve. The server is not required to honor this value. |
| `marker` | [Marker][] | Value from a previous paginated response. Resume retrieving data where that response left off. This value is stable even if there is a change in the server's range of available ledgers. |
**You must use at least one of the following fields** in your request: `ledger_index`, `ledger_hash`, `ledger_index_min`, or `ledger_index_max`.
The following legacy fields are no longer supported: `offset`, `count`, `ledger_min`, `ledger_max`. [Removed in: rippled 1.7.0][]
### Iterating over queried data
As with other paginated methods, you can use the `marker` field to return multiple pages of data.
In the time between requests, `"ledger_index_min": -1` and `"ledger_index_max": -1` may change to refer to different ledger versions than they did before. The `marker` field can safely paginate even if there are changes in the ledger range from the request, so long as the marker does not indicate a point outside the range of ledgers specified in the request.
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"result": {
"account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
"ledger_index_max": 57111999,
"ledger_index_min": 55886305,
"limit": 2,
"marker": {
"ledger": 57111981,
"seq": 16
},
"transactions": [
{
"meta": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
"Balance": "3732969177079",
"Flags": 131072,
"OwnerCount": 0,
"Sequence": 702817
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574",
"PreviousFields": {
"Balance": "3713891690008"
},
"PreviousTxnID": "D58864C16344ADCC15995C7986CFC607CB693E88F84D2E019F0A35FB29749202",
"PreviousTxnLgrSeq": 57111994
}
},
{
"ModifiedNode": {
"FinalFields": {
"Account": "rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg",
"Balance": "40010160",
"Flags": 131072,
"OwnerCount": 0,
"Sequence": 466334
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "CC20FEBEA6D2AF969EC46F2BD92684D9FBABC3F238E841B5E056FE4EBF4379A9",
"PreviousFields": {
"Balance": "19117497271",
"Sequence": 466333
},
"PreviousTxnID": "F6B8274D3D419A95A59681E5F55578084C395FF9051924360CA3EA745F5581E8",
"PreviousTxnLgrSeq": 57111993
}
}
],
"TransactionIndex": 25,
"TransactionResult": "tesSUCCESS",
"delivered_amount": "19077487071"
},
"tx": {
"Account": "rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg",
"Amount": "19077487071",
"Destination": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
"DestinationTag": 1,
"Fee": "40",
"Flags": 2147483648,
"LastLedgerSequence": 57112020,
"Sequence": 466333,
"SigningPubKey": "0381575032E254BF4D699C3D8D6EFDB63B3A71F97475C6F6885BC7DAEEE55D9A01",
"TransactionType": "Payment",
"TxnSignature": "3045022100CFC5FD057C7C685C690637AD1E639E2642BBC00EFD8E06E3F6C72FA924BC99D40220317D0708E814F69F874D641B6732E37A53B1220B493B2B8390D9EF51E8062515",
"date": 649200260,
"hash": "46BF0B576677B0DEA2D94591424A57A2DE8E3D89383631E16F40D09A513C656C",
"inLedger": 57111998,
"ledger_index": 57111998
},
"validated": true
},
{
"meta": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
"Balance": "3713891690008",
"Flags": 131072,
"OwnerCount": 0,
"Sequence": 702817
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574",
"PreviousFields": {
"Balance": "3714441690048",
"Sequence": 702816
},
"PreviousTxnID": "FDD5007913B39027BAF10B31144DBC1F7DC147528DF31FF048A06DC5D3108BD6",
"PreviousTxnLgrSeq": 57111981
}
},
{
"ModifiedNode": {
"FinalFields": {
"Account": "r9dU6Z7P2i7MrDi1VUZ7uyq6J77eg86YtB",
"Balance": "2629998983",
"Flags": 0,
"OwnerCount": 0,
"Sequence": 10
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "27B96FE681B33825CC95DA197358B30D3A1721F2125F2D76022D46B2418ABA0A",
"PreviousFields": {
"Balance": "2079998983"
},
"PreviousTxnID": "44A47AC04C0C7237C32BE9A532B578D07641705D3A59DB9B3C5B6225001E39B7",
"PreviousTxnLgrSeq": 56613857
}
}
],
"TransactionIndex": 16,
"TransactionResult": "tesSUCCESS",
"delivered_amount": "550000000"
},
"tx": {
"Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
"Amount": "550000000",
"Destination": "r9dU6Z7P2i7MrDi1VUZ7uyq6J77eg86YtB",
"Fee": "40",
"Flags": 2147483648,
"LastLedgerSequence": 57112016,
"Sequence": 702816,
"SigningPubKey": "020A46D8D02AC780C59853ACA309EAA92E7D8E02DD72A0B6AC315A7D18A6C3276A",
"TransactionType": "Payment",
"TxnSignature": "3045022100D589029EF63F9E528F6100C7A36D26AFFF84085EC9AC16DA8E30E11F390D4E87022011466E0FE4A90B89142EE47E535545EEA4A2D65E0BD234DFB447721218B59C9B",
"date": 649200241,
"hash": "D58864C16344ADCC15995C7986CFC607CB693E88F84D2E019F0A35FB29749202",
"inLedger": 57111994,
"ledger_index": 57111994
},
"validated": true
}
],
"validated": true
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
"ledger_index_max": 57112019,
"ledger_index_min": 56248229,
"limit": 2,
"marker": {
"ledger": 57112007,
"seq": 13
},
"status": "success",
"transactions": [
{
"meta": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
"Balance": "3732290013101",
"Flags": 131072,
"OwnerCount": 0,
"Sequence": 702820
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574",
"PreviousFields": {
"Balance": "3732745656171",
"Sequence": 702819
},
"PreviousTxnID": "7C031FD5B710E3C048EEF31254089BEEC505900BCC9A842257A0319453333998",
"PreviousTxnLgrSeq": 57112010
}
},
{
"ModifiedNode": {
"FinalFields": {
"Account": "raLPjTYeGezfdb6crXZzcC8RkLBEwbBHJ5",
"Balance": "4231510602153",
"Flags": 0,
"OwnerCount": 0,
"Sequence": 96486
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "39DC5D448DECEFC3CD20818788E3DA891CA943935E8D7B12FCB5B5871FCB1638",
"PreviousFields": {
"Balance": "4231054959123"
},
"PreviousTxnID": "33D2014C832610293730028CA37857AC183BFCE3E42B9979C491FB8B82B3E9DC",
"PreviousTxnLgrSeq": 57112004
}
}
],
"TransactionIndex": 12,
"TransactionResult": "tesSUCCESS",
"delivered_amount": "455643030"
},
"tx": {
"Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
"Amount": "455643030",
"Destination": "raLPjTYeGezfdb6crXZzcC8RkLBEwbBHJ5",
"DestinationTag": 18240312,
"Fee": "40",
"Flags": 2147483648,
"LastLedgerSequence": 57112037,
"Sequence": 702819,
"SigningPubKey": "020A46D8D02AC780C59853ACA309EAA92E7D8E02DD72A0B6AC315A7D18A6C3276A",
"TransactionType": "Payment",
"TxnSignature": "30450221008602B2E390C0C7B65182C6DBC86292052C1961B2BEFB79C2C8431722C0ADB911022024B74DCF910A4C8C95572CF662EB7F5FF67E1AC4D7B9B7BFE2A8EE851EC16576",
"date": 649200322,
"hash": "08EF5BDA2825D7A28099219621CDBECCDECB828FEA202DEB6C7ACD5222D36C2C",
"inLedger": 57112015,
"ledger_index": 57112015
},
"validated": true
},
{
"meta": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
"Balance": "3732745656171",
"Flags": 131072,
"OwnerCount": 0,
"Sequence": 702819
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574",
"PreviousFields": {
"Balance": "3732246155784"
},
"PreviousTxnID": "CCBCCB528F602007C937C496F0828C118E073DF180084CCD3646EC1E414844E4",
"PreviousTxnLgrSeq": 57112007
}
},
{
"ModifiedNode": {
"FinalFields": {
"Account": "rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg",
"Balance": "236476361",
"Flags": 131072,
"OwnerCount": 0,
"Sequence": 466335
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "CC20FEBEA6D2AF969EC46F2BD92684D9FBABC3F238E841B5E056FE4EBF4379A9",
"PreviousFields": {
"Balance": "735976788",
"Sequence": 466334
},
"PreviousTxnID": "C528B32DD588EFAE2FE833E8AA92E6AE2DF2C8DB3DB8C6C4F334AD37B253D72A",
"PreviousTxnLgrSeq": 57112010
}
}
],
"TransactionIndex": 33,
"TransactionResult": "tesSUCCESS",
"delivered_amount": "499500387"
},
"tx": {
"Account": "rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg",
"Amount": "499500387",
"Destination": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
"DestinationTag": 1,
"Fee": "40",
"Flags": 2147483648,
"LastLedgerSequence": 57112032,
"Sequence": 466334,
"SigningPubKey": "0381575032E254BF4D699C3D8D6EFDB63B3A71F97475C6F6885BC7DAEEE55D9A01",
"TransactionType": "Payment",
"TxnSignature": "3045022100C7EA1701FE48C75508EEBADBC9864CD3FFEDCEB48AB99AEA960BFA360AE163ED0220453C9577502924C9E1A9A450D4B950A44016813BC70E1F16A65A402528D730B7",
"date": 649200302,
"hash": "7C031FD5B710E3C048EEF31254089BEEC505900BCC9A842257A0319453333998",
"inLedger": 57112010,
"ledger_index": 57112010
},
"validated": true
}
],
"validated": true
}
}
```
*Commandline*
```json
{
"result" : {
"account" : "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
"ledger_index_max" : 57112094,
"ledger_index_min" : 57105464,
"limit" : 2,
"marker" : {
"ledger" : 57112074,
"seq" : 9
},
"status" : "success",
"transactions" : [
{
"ledger_index" : 57112090,
"meta" : "201C0000002EF8E51100612503677617551E0297F38EF4FED7004E074D246B4EA3E550D9AE0F61BE40E08D3432091D52CE56140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574E624000AB96E624000037771BFD270E1E7220002000024000AB96F2D0000000062400003776C784A418114D2E44C9FAF7BE9C536219800A6E698E4C7D2C911E1E1E311006156F7D315E0E992B1F1AC66B309C9D68961AA327FE770101B74D4C975F8C5DEC96AE8240367761A624000000005478807811403C95DC0C7CE402E8044A5F13304108013CE9963E1E1F1031000",
"tx_blob" : "120000228000000024000AB96E201B036776306140000000054788076840000000000000287321020A46D8D02AC780C59853ACA309EAA92E7D8E02DD72A0B6AC315A7D18A6C3276A74463044022054811EEF61ACCFA1B5FC6BB05D2FA49CF5174062740370328382E6EA557C0E6A0220480584D487638C333A87CA37100354BD36209E355E8DB9FE79791A56E24C1F268114D2E44C9FAF7BE9C536219800A6E698E4C7D2C911831403C95DC0C7CE402E8044A5F13304108013CE9963",
"validated" : true
},
{
"ledger_index" : 57112087,
"meta" : "201C00000026F8E5110061250367760A556B80EE9A9AD3FC40F471F29DCB80C678375137CE36220718902EF1EDCD375E7156140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574E66240000376DEB77118E1E7220002000024000AB96E2D00000000624000037771BFD2708114D2E44C9FAF7BE9C536219800A6E698E4C7D2C911E1E1E511006125036776155591DA498D40AFD90670555F3D719883B48D224B4E4E906C634DEFA21163E8197756CC20FEBEA6D2AF969EC46F2BD92684D9FBABC3F238E841B5E056FE4EBF4379A9E62400071DA26240000001C0D849F8E1E722000200002400071DA32D0000000062400000012DCFE87881146914CB622B8E41E150DE431F48DA244A69809366E1E1F1031000",
"tx_blob" : "12000022800000002400071DA22E00000001201B0367762D61400000009308615868400000000000002873210381575032E254BF4D699C3D8D6EFDB63B3A71F97475C6F6885BC7DAEEE55D9A0174473045022100E592BCCFD85CCE0B39075EFC66D6BCA594EBB451F12AD5AD9EE533A267F1381B02203635AB46AC110848FC44E797BD19D77A19E10A0F463AA5540B1C62E5D48C81F081146914CB622B8E41E150DE431F48DA244A698093668314D2E44C9FAF7BE9C536219800A6E698E4C7D2C911",
"validated" : true
}
],
"validated" : true
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:-------------------|:---------------------------|:---------------------------|
| `account` | String | Unique [Address][] identifying the related account |
| `ledger_index_min` | Integer - [Ledger Index][] | The ledger index of the earliest ledger actually searched for transactions. |
| `ledger_index_max` | Integer - [Ledger Index][] | The ledger index of the most recent ledger actually searched for transactions. |
| `limit` | Integer | The `limit` value used in the request. (This may differ from the actual limit value enforced by the server.) |
| `marker` | [Marker][] | Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. |
| `transactions` | Array | Array of transactions matching the request's criteria, as explained below. |
| `validated` | Boolean | If included and set to `true`, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change. |
**Note:** The server may respond with different values of `ledger_index_min` and `ledger_index_max` than you provided in the request, for example if it did not have the versions you specified on hand.
Each transaction object includes the following fields, depending on whether it was requested in JSON or hex string (`"binary":true`) format.
| `Field` | Type | Description |
|:---------------|:---------------------------------|:-------------------------|
| `ledger_index` | Integer | The [ledger index][] of the ledger version that included this transaction. |
| `meta` | Object (JSON) or String (Binary) | If `binary` is True, then this is a hex string of the transaction metadata. Otherwise, the transaction metadata is included in JSON format. |
| `tx` | Object | (JSON mode only) JSON object defining the transaction |
| `tx_blob` | String | (Binary mode only) Unique hashed String representing the transaction. |
| `validated` | Boolean | Whether or not the transaction is included in a validated ledger. Any transaction not yet in a validated ledger is subject to change. |
## Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `actMalformed` - The [Address][] specified in the `account` field of the request is not formatted properly.
* `lgrIdxMalformed` - The ledger specified by the `ledger_index_min` or `ledger_index_max` does not exist, or if it does exist but the server does not have it.
* `lgrIdxsInvalid` - Either the request specifies a `ledger_index_max` that is before the `ledger_index_min`, or the server does not have a validated ledger range because it is [not synced with the network](server-doesnt-sync.html).
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,230 @@
---
html: gateway_balances.html
parent: account-methods.html
blurb: 特定のアカウントから発行された残高の合計を計算します。
labels:
- トークン
- アカウント
---
# gateway_balances
[[ソース]](https://github.com/ripple/rippled/blob/9111ad1a9dc37d49d085aa317712625e635197c0/src/ripple/rpc/handlers/GatewayBalances.cpp "Source")
`gateway_balances`コマンドは、特定のアカウントから発行された残高の合計を計算します。オプションで、[運用アドレス](issuing-and-operational-addresses.html)が保有する額を除外できます。[新規: rippled 0.28.2][]
## 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "example_gateway_balances_1",
"command": "gateway_balances",
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"strict": true,
"hotwallet": ["rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ","ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt"],
"ledger_index": "validated"
}
```
*JSON-RPC*
```json
{
"method": "gateway_balances",
"params": [
{
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"hotwallet": [
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ",
"ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt"
],
"ledger_index": "validated",
"strict": true
}
]
}
```
<!-- MULTICODE_BLOCK_END -->
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:---------------|:---------------------------|:-------------------------------|
| `account` | 文字列 | チェックする[アドレス][]。[発行アドレス](issuing-and-operational-addresses.html)である必要があります。 |
| `strict` | ブール値 | _省略可_ trueの場合は、アカウントパラメーターにアドレスまたは公開鍵だけを受け入れます。デフォルトではfalseです。 |
| `hotwallet` | 文字列または配列 | _省略可_ 発行済み残高から除外する[運用アドレス](issuing-and-operational-addresses.html)、またはそのようなアドレスの配列。 |
| `ledger_hash` | 文字列 | _省略可_ 使用するレジャーバージョンの20バイトの16進文字列。[レジャーの指定][]を参照してください) |
| `ledger_index` | 文字列または符号なし整数 | _省略可_ 使用するレジャーバージョンの[レジャーインデックス][]、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください) |
## 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 3,
"status": "success",
"type": "response",
"result": {
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"assets": {
"r9F6wk8HkXrgYWoJ7fsv4VrUBVoqDVtzkH": [
{
"currency": "BTC",
"value": "5444166510000000e-26"
}
],
"rPFLkxQk6xUGdGYEykqe7PR25Gr7mLHDc8": [
{
"currency": "EUR",
"value": "4000000000000000e-27"
}
],
"rPU6VbckqCLW4kb51CWqZdxvYyQrQVsnSj": [
{
"currency": "BTC",
"value": "1029900000000000e-26"
}
],
"rpR95n1iFkTqpoy1e878f4Z1pVHVtWKMNQ": [
{
"currency": "BTC",
"value": "4000000000000000e-30"
}
],
"rwmUaXsWtXU4Z843xSYwgt1is97bgY8yj6": [
{
"currency": "BTC",
"value": "8700000000000000e-30"
}
]
},
"balances": {
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ": [
{
"currency": "EUR",
"value": "29826.1965999999"
}
],
"ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt": [
{
"currency": "USD",
"value": "13857.70416"
}
]
},
"ledger_hash": "61DDBF304AF6E8101576BF161D447CA8E4F0170DDFBEAFFD993DC9383D443388",
"ledger_index": 14483195,
"obligations": {
"BTC": "5908.324927635318",
"EUR": "992471.7419793958",
"GBP": "4991.38706013193",
"USD": "1997134.20229482"
},
"validated": true
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"assets": {
"r9F6wk8HkXrgYWoJ7fsv4VrUBVoqDVtzkH": [
{
"currency": "BTC",
"value": "5444166510000000e-26"
}
],
"rPFLkxQk6xUGdGYEykqe7PR25Gr7mLHDc8": [
{
"currency": "EUR",
"value": "4000000000000000e-27"
}
],
"rPU6VbckqCLW4kb51CWqZdxvYyQrQVsnSj": [
{
"currency": "BTC",
"value": "1029900000000000e-26"
}
],
"rpR95n1iFkTqpoy1e878f4Z1pVHVtWKMNQ": [
{
"currency": "BTC",
"value": "4000000000000000e-30"
}
],
"rwmUaXsWtXU4Z843xSYwgt1is97bgY8yj6": [
{
"currency": "BTC",
"value": "8700000000000000e-30"
}
]
},
"balances": {
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ": [
{
"currency": "EUR",
"value": "29826.1965999999"
}
],
"ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt": [
{
"currency": "USD",
"value": "13857.70416"
}
]
},
"ledger_hash": "980FECF48CA4BFDEC896692C31A50D484BDFE865EC101B00259C413AA3DBD672",
"ledger_index": 14483212,
"obligations": {
"BTC": "5908.324927635318",
"EUR": "992471.7419793958",
"GBP": "4991.38706013193",
"USD": "1997134.20229482"
},
"status": "success",
"validated": true
}
}
```
<!-- MULTICODE_BLOCK_END -->
**注記:** このメソッドのコマンドライン構文はありません。コマンドラインからアクセスするには[jsonメソッド][]を使用してください。
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:-----------------------|:--------------------------|:------------------------|
| `account` | 文字列 - [アドレス][] | 残高を発行したアカウントのアドレス。 |
| `obligations` | オブジェクト | (空の場合は省略)除外されていないアドレスに発行された額の合計。発行された価値の合計に対する通貨のマップとして示されます。 |
| `balances` | オブジェク | _空の場合は省略_ 要求から`hotwallet`アドレスに発行された額。キーはアドレスであり、値はアドレスが保有する通貨額の配列です。 |
| `assets` | オブジェクト | _空の場合は省略_ 他から発行された保有額の合計。推奨される構成では、[発行アドレス](issuing-and-operational-addresses.html)の保有額はありません。 |
| `ledger_hash` | 文字列 - [ハッシュ][] | _省略される場合があります_ この応答の生成に使用されたレジャーバージョンの識別用ハッシュ。 |
| `ledger_index` | 数値 - [レジャーインデックス][] | _省略される場合があります_ この応答の生成に使用されたレジャーバージョンのレジャーインデックス。 | |
| `ledger_current_index` | 数値 - [レジャーインデックス][] | _`ledger_current_index`が指定されている場合は省略_ この情報の取得時に使用した、現在処理中のレジャーバージョンの[レジャーインデックス][]。 |
## 考えられるエラー
* いずれかの[汎用エラータイプ][]。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
* `invalidHotWallet` - `hotwallet`フィールドに指定されている1つ以上のアドレスが、要求に指定されているアカウントが発行した通貨を保有しているアカウントの[アドレス][]ではありません。
* `actNotFound` - 要求の`account`フィールドに指定されている[アドレス][]が、レジャーのアカウントに対応していません。
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,302 @@
---
html: gateway_balances.html
parent: account-methods.html
blurb: Calculate total amounts issued by an account.
labels:
- Tokens
- Accounts
---
# gateway_balances
[[Source]](https://github.com/ripple/rippled/blob/9111ad1a9dc37d49d085aa317712625e635197c0/src/ripple/rpc/handlers/GatewayBalances.cpp "Source")
The `gateway_balances` command calculates the total balances issued by a given account, optionally excluding amounts held by [operational addresses](issuing-and-operational-addresses.html). [New in: rippled 0.28.2][]
## Request Format
An example of the request format:
{% include '_snippets/no-cli-syntax.md' %}
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": "example_gateway_balances_1",
"command": "gateway_balances",
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"strict": true,
"hotwallet": ["rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ","ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt"],
"ledger_index": "validated"
}
```
*JSON-RPC*
```json
{
"method": "gateway_balances",
"params": [
{
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"hotwallet": [
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ",
"ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt"
],
"ledger_index": "validated",
"strict": true
}
]
}
```
*Commandline*
```sh
rippled json gateway_balances ' {"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q", "hotwallet": ["rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ", "ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt"],"ledger_index": "validated","strict": true} '
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:---------------|:---------------------------|:-------------------------------|
| `account` | String | The [Address][] to check. This should be the [issuing address](issuing-and-operational-addresses.html) |
| `strict` | Boolean | _(Optional)_ If true, only accept an address or public key for the account parameter. Defaults to false. |
| `hotwallet` | String or Array | _(Optional)_ An [operational address](issuing-and-operational-addresses.html) to exclude from the balances issued, or an array of such addresses. |
| `ledger_hash` | String | _(Optional)_ A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) |
| `ledger_index` | String or Unsigned Integer | _(Optional)_ The [ledger index][] of the ledger version to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 3,
"status": "success",
"type": "response",
"result": {
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"assets": {
"r9F6wk8HkXrgYWoJ7fsv4VrUBVoqDVtzkH": [
{
"currency": "BTC",
"value": "5444166510000000e-26"
}
],
"rPFLkxQk6xUGdGYEykqe7PR25Gr7mLHDc8": [
{
"currency": "EUR",
"value": "4000000000000000e-27"
}
],
"rPU6VbckqCLW4kb51CWqZdxvYyQrQVsnSj": [
{
"currency": "BTC",
"value": "1029900000000000e-26"
}
],
"rpR95n1iFkTqpoy1e878f4Z1pVHVtWKMNQ": [
{
"currency": "BTC",
"value": "4000000000000000e-30"
}
],
"rwmUaXsWtXU4Z843xSYwgt1is97bgY8yj6": [
{
"currency": "BTC",
"value": "8700000000000000e-30"
}
]
},
"balances": {
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ": [
{
"currency": "EUR",
"value": "29826.1965999999"
}
],
"ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt": [
{
"currency": "USD",
"value": "13857.70416"
}
]
},
"ledger_hash": "61DDBF304AF6E8101576BF161D447CA8E4F0170DDFBEAFFD993DC9383D443388",
"ledger_index": 14483195,
"obligations": {
"BTC": "5908.324927635318",
"EUR": "992471.7419793958",
"GBP": "4991.38706013193",
"USD": "1997134.20229482"
},
"validated": true
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"assets": {
"r9F6wk8HkXrgYWoJ7fsv4VrUBVoqDVtzkH": [
{
"currency": "BTC",
"value": "5444166510000000e-26"
}
],
"rPFLkxQk6xUGdGYEykqe7PR25Gr7mLHDc8": [
{
"currency": "EUR",
"value": "4000000000000000e-27"
}
],
"rPU6VbckqCLW4kb51CWqZdxvYyQrQVsnSj": [
{
"currency": "BTC",
"value": "1029900000000000e-26"
}
],
"rpR95n1iFkTqpoy1e878f4Z1pVHVtWKMNQ": [
{
"currency": "BTC",
"value": "4000000000000000e-30"
}
],
"rwmUaXsWtXU4Z843xSYwgt1is97bgY8yj6": [
{
"currency": "BTC",
"value": "8700000000000000e-30"
}
]
},
"balances": {
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ": [
{
"currency": "EUR",
"value": "29826.1965999999"
}
],
"ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt": [
{
"currency": "USD",
"value": "13857.70416"
}
]
},
"ledger_hash": "980FECF48CA4BFDEC896692C31A50D484BDFE865EC101B00259C413AA3DBD672",
"ledger_index": 14483212,
"obligations": {
"BTC": "5908.324927635318",
"EUR": "992471.7419793958",
"GBP": "4991.38706013193",
"USD": "1997134.20229482"
},
"status": "success",
"validated": true
}
}
```
*Commandline*
```json
{
"result" : {
"account" : "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"assets" : {
"r9F6wk8HkXrgYWoJ7fsv4VrUBVoqDVtzkH" : [
{
"currency" : "BTC",
"value" : "5444166510000000e-26"
}
],
"rPU6VbckqCLW4kb51CWqZdxvYyQrQVsnSj" : [
{
"currency" : "BTC",
"value" : "1029900000000000e-26"
}
],
"rpR95n1iFkTqpoy1e878f4Z1pVHVtWKMNQ" : [
{
"currency" : "BTC",
"value" : "4000000000000000e-30"
}
],
"rwmUaXsWtXU4Z843xSYwgt1is97bgY8yj6" : [
{
"currency" : "BTC",
"value" : "8700000000000000e-30"
}
]
},
"balances" : {
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ" : [
{
"currency" : "EUR",
"value" : "144816.1965999999"
}
],
"ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt" : [
{
"currency" : "USD",
"value" : "6677.38614"
}
]
},
"frozen_balances" : {
"r4keXr5myiU4iTLh68ZqZ2CgsJ8dM9FSW6" : [
{
"currency" : "BTC",
"value" : "0.091207822800868"
}
]
},
"ledger_hash" : "6C789EAF25A931565E5936042EED037F287F3348B61A70777649552E0385B0E4",
"ledger_index" : 57111383,
"obligations" : {
"BTC" : "1762.700511879441",
"EUR" : "813792.4267005104",
"GBP" : "4974.337212333351",
"USD" : "6739710.218284974"
},
"status" : "success",
"validated" : true
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:-----------------------|:--------------------------|:------------------------|
| `account` | String - [Address][] | The address of the account that issued the balances. |
| `obligations` | Object | (Omitted if empty) Total amounts issued to addresses not excluded, as a map of currencies to the total value issued. |
| `balances` | Object | _(Omitted if empty)_ Amounts issued to the `hotwallet` addresses from the request. The keys are addresses and the values are arrays of currency amounts they hold. |
| `assets` | Object | _(Omitted if empty)_ Total amounts held that are issued by others. In the recommended configuration, the [issuing address](issuing-and-operational-addresses.html) should have none. |
| `ledger_hash` | String - [Hash][] | _(May be omitted)_ The identifying hash of the ledger version that was used to generate this response. |
| `ledger_index` | Number - [Ledger Index][] | _(May be omitted)_ The ledger index of the ledger version that was used to generate this response. |
| `ledger_current_index` | Number - [Ledger Index][] | _(Omitted if `ledger_current_index` is provided)_ The [ledger index][] of the current in-progress ledger version, which was used to retrieve this information. |
## Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `invalidHotWallet` - One or more of the addresses specified in the `hotwallet` field is not the [Address][] of an account holding currency issued by the account from the request.
* `actNotFound` - The [Address][] specified in the `account` field of the request does not correspond to an account in the ledger.
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,192 @@
---
html: noripple_check.html
parent: account-methods.html
blurb: アカウントのDefaultRippleフィールドとそのトラストラインのNoRippleフラグの状態を、推奨される設定と比較して迅速にチェックします。
labels:
- トークン
---
# noripple_check
[[ソース]](https://github.com/ripple/rippled/blob/9111ad1a9dc37d49d085aa317712625e635197c0/src/ripple/rpc/handlers/NoRippleCheck.cpp "Source")
`noripple_check`コマンドを使用すると、[アカウントのDefaultRippleフィールドとそのトラストラインのNoRippleフラグ](rippling.html)の状態を、推奨される設定と比較して迅速にチェックできます。
## 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 0,
"command": "noripple_check",
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"role": "gateway",
"ledger_index": "current",
"limit": 2,
"transactions": true
}
```
*JSON-RPC*
```json
{
"method": "noripple_check",
"params": [
{
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"ledger_index": "current",
"limit": 2,
"role": "gateway",
"transactions": true
}
]
}
```
<!-- MULTICODE_BLOCK_END -->
**注記:** このメソッドのコマンドライン構文はありません。コマンドラインからアクセスするには[jsonメソッド][]を使用してください。
要求には以下のパラメーターが含まれます。
| `Field` | 型 | 説明 |
|:---------------|:---------------------------|:-------------------------------|
| `account` | 文字列 | アカウントの一意のIDであり、通常はアカウントのアドレスです。 |
| `role` | 文字列 | アドレスが`gateway``user`のいずれを指しているか。推奨事項はアカウントの役割に応じて異なります。イシュアーのDefaultRippleを有効にし、すべてのトラストラインでNoRippleを無効にする必要があります。ユーザーのDefaultRippleを無効にし、すべてのトラストラインでNoRippleを有効にする必要があります。 |
| `transactions` | ブール値 | _省略可_ `true`の場合、提案される[トランザクション](transaction-formats.html)JSONオブジェクトの配列を指定します。問題を修正するために、これらのトランザクションに署名して送信することができます。デフォルトではfalseです。 |
| `limit` | 符号なし整数 | _省略可_ 結果に含めることができるトラストライン問題の最大数。デフォルトでは300です。 |
| `ledger_hash` | 文字列 | _省略可_ 使用するレジャーバージョンの20バイトの16進数文字列。[レジャーの指定][]を参照してください。) |
| `ledger_index` | 文字列または符号なし整数 | _省略可_ 使用するレジャーのシーケンス番号、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください。) |
## 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 0,
"status": "success",
"type": "response",
"result": {
"ledger_current_index": 14342939,
"problems": [
"You should immediately set your default ripple flag",
"You should clear the no ripple flag on your XAU line to r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"You should clear the no ripple flag on your USD line to rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"
],
"transactions": [
{
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": 10000,
"Sequence": 1406,
"SetFlag": 8,
"TransactionType": "AccountSet"
},
{
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": 10000,
"Flags": 262144,
"LimitAmount": {
"currency": "XAU",
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"value": "0"
},
"Sequence": 1407,
"TransactionType": "TrustSet"
},
{
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": 10000,
"Flags": 262144,
"LimitAmount": {
"currency": "USD",
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"value": "5"
},
"Sequence": 1408,
"TransactionType": "TrustSet"
}
],
"validated": false
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"ledger_current_index": 14380381,
"problems": [
"You should immediately set your default ripple flag",
"You should clear the no ripple flag on your XAU line to r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"You should clear the no ripple flag on your USD line to rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"
],
"status": "success",
"transactions": [
{
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": 10000,
"Sequence": 1406,
"SetFlag": 8,
"TransactionType": "AccountSet"
},
{
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": 10000,
"Flags": 262144,
"LimitAmount": {
"currency": "XAU",
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"value": "0"
},
"Sequence": 1407,
"TransactionType": "TrustSet"
},
{
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": 10000,
"Flags": 262144,
"LimitAmount": {
"currency": "USD",
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"value": "5"
},
"Sequence": 1408,
"TransactionType": "TrustSet"
}
],
"validated": false
}
}
```
<!-- MULTICODE_BLOCK_END -->
応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:-----------------------|:-------|:-------------------------------------------|
| `ledger_current_index` | 数値 | これらの結果の計算に使用するレジャーのシーケンス番号。 |
| `problems` | 配列 | 人間が読み取ることができる形式の問題の記述が含まれている文字列の配列。アカウントのDefaultRipple設定が推奨に従っていない場合は、最大1つのエントリーが含まれます。加えて、NoRipple設定が推奨に従っていないトラストラインのエントリー最大で`limit`に指定されている数)も含まれます。 |
| `transactions` | 配列 | (省略される場合があります)要求で`transactions``true`に指定されている場合、これはJSONオブジェクトの配列です。各JSONオブジェクトは、JSON形式の[トランザクション](transaction-formats.html)で、記述されている問題の1つを修正します。この配列の長さは`problems`配列と同じであり、各エントリーは、その配列の同じインデックスで記述されている問題の修正を目的としています。 |
## 考えられるエラー
* [汎用エラータイプ][]のすべて。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
* `actNotFound` - 要求の`account`フィールドに指定されている[アドレス][]が、レジャーのアカウントに対応していません。
* `lgrNotFound` - `ledger_hash`または`ledger_index`に指定されているレジャーが存在しないか、存在しているがサーバーにはありません。
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,195 @@
---
html: noripple_check.html
parent: account-methods.html
blurb: Get recommended changes to an account's Default Ripple and No Ripple settings.
labels:
- Tokens
---
# noripple_check
[[Source]](https://github.com/ripple/rippled/blob/9111ad1a9dc37d49d085aa317712625e635197c0/src/ripple/rpc/handlers/NoRippleCheck.cpp "Source")
The `noripple_check` command provides a quick way to check the status of [the Default Ripple field for an account and the No Ripple flag of its trust lines](rippling.html), compared with the recommended settings.
## Request Format
An example of the request format:
{% include '_snippets/no-cli-syntax.md' %}
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 0,
"command": "noripple_check",
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"role": "gateway",
"ledger_index": "current",
"limit": 2,
"transactions": true
}
```
*JSON-RPC*
```json
{
"method": "noripple_check",
"params": [
{
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"ledger_index": "current",
"limit": 2,
"role": "gateway",
"transactions": true
}
]
}
```
<!-- MULTICODE_BLOCK_END -->
The request includes the following parameters:
| `Field` | Type | Description |
|:---------------|:---------------------------|:-------------------------------|
| `account` | String | A unique identifier for the account, most commonly the account's address. |
| `role` | String | Whether the address refers to a `gateway` or `user`. Recommendations depend on the role of the account. Issuers must have Default Ripple enabled and must disable No Ripple on all trust lines. Users should have Default Ripple disabled, and should enable No Ripple on all trust lines. |
| `transactions` | Boolean | _(Optional)_ If `true`, include an array of suggested [transactions](transaction-formats.html), as JSON objects, that you can sign and submit to fix the problems. Defaults to false. |
| `limit` | Unsigned Integer | _(Optional)_ The maximum number of trust line problems to include in the results. Defaults to 300. |
| `ledger_hash` | String | _(Optional)_ A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) |
| `ledger_index` | String or Unsigned Integer | _(Optional)_ The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 0,
"status": "success",
"type": "response",
"result": {
"ledger_current_index": 14342939,
"problems": [
"You should immediately set your default ripple flag",
"You should clear the no ripple flag on your XAU line to r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"You should clear the no ripple flag on your USD line to rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"
],
"transactions": [
{
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": 10000,
"Sequence": 1406,
"SetFlag": 8,
"TransactionType": "AccountSet"
},
{
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": 10000,
"Flags": 262144,
"LimitAmount": {
"currency": "XAU",
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"value": "0"
},
"Sequence": 1407,
"TransactionType": "TrustSet"
},
{
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": 10000,
"Flags": 262144,
"LimitAmount": {
"currency": "USD",
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"value": "5"
},
"Sequence": 1408,
"TransactionType": "TrustSet"
}
],
"validated": false
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"ledger_current_index": 14380381,
"problems": [
"You should immediately set your default ripple flag",
"You should clear the no ripple flag on your XAU line to r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"You should clear the no ripple flag on your USD line to rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"
],
"status": "success",
"transactions": [
{
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": 10000,
"Sequence": 1406,
"SetFlag": 8,
"TransactionType": "AccountSet"
},
{
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": 10000,
"Flags": 262144,
"LimitAmount": {
"currency": "XAU",
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
"value": "0"
},
"Sequence": 1407,
"TransactionType": "TrustSet"
},
{
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Fee": 10000,
"Flags": 262144,
"LimitAmount": {
"currency": "USD",
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"value": "5"
},
"Sequence": 1408,
"TransactionType": "TrustSet"
}
],
"validated": false
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:-----------------------|:-------|:-------------------------------------------|
| `ledger_current_index` | Number | The [ledger index][] of the ledger used to calculate these results. |
| `problems` | Array | Array of strings with human-readable descriptions of the problems. This includes up to one entry if the account's Default Ripple setting is not as recommended, plus up to `limit` entries for trust lines whose No Ripple setting is not as recommended. |
| `transactions` | Array | (May be omitted) If the request specified `transactions` as `true`, this is an array of JSON objects, each of which is the JSON form of a [transaction](transaction-formats.html) that should fix one of the described problems. The length of this array is the same as the `problems` array, and each entry is intended to fix the problem described at the same index into that array. |
## Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `actNotFound` - The [Address][] specified in the `account` field of the request does not correspond to an account in the ledger.
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,212 @@
---
html: ledger.html # Watch carefully for clashes w/ this filename
parent: ledger-methods.html
blurb: 公開レジャーに関する情報を取得します。
label:
- ブロックチェーン
---
# ledger
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/LedgerHandler.cpp "Source")
公開レジャーに関する情報を取得します。
## 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id":14,
"command":"ledger",
"ledger_index":"validated",
"full": false,
"accounts": false,
"transactions": false,
"expand": false,
"owner_funds": false
}
```
*JSON-RPC*
```json
{
"method":"ledger",
"params":[
{
"ledger_index":"validated",
"accounts": false,
"full": false,
"transactions": false,
"expand": false,
"owner_funds": false
}
]
}
```
*コマンドライン*
```sh
#Syntax: ledger ledger_index|ledger_hash [full|tx]
# "full" is equivalent to "full": true
# "tx" is equivalent to "transactions": true
rippled ledger current
```
<!-- MULTICODE_BLOCK_END -->
[試してみる >](websocket-api-tool.html#ledger)
要求には以下のパラメーターを含めることができます。
| `Field` | 型 | 説明 |
|:---------------|:---------------------------|:-------------------------------|
| `ledger_hash` | 文字列 | _省略可_ 使用するレジャーバージョンの20バイトの16進文字列。[レジャーの指定][]を参照してください) |
| `ledger_index` | 文字列または符号なし整数 | _省略可_ 使用するレジャーのシーケンス番号、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください) |
| `full` | ブール値 | _省略可_ **管理者が必要。** `true`の場合、レジャー全体に関するすべての情報が返されます。レジャーバージョンを指定しない場合は無視されます。デフォルトでは`false`です。(これは`transactions``accounts`、および`expand`を有効にする操作と同等です。) **注意:** 数百メガバイトのオーダーについて、非常に大量のデータが返されます。 |
| `accounts` | ブール値 | _省略可_ **管理者が必要。** `true`の場合、レジャーのアカウントに関する情報が返されます。レジャーバージョンを指定しない場合は無視されます。デフォルトでは`false`です。**注意:** 非常に大量のデータが返されます。 |
| `transactions` | ブール値 | _省略可_ `true`の場合、指定されたレジャーバージョンのトランザクションに関する情報が返されます。デフォルトでは`false`です。レジャーバージョンを指定しない場合は無視されます。 |
| `expand` | ブール値 | _省略可_ ハッシュのみではなく、トランザクション/アカウントの完全な情報がJSONフォーマットで提供されます。デフォルトでは`false`です。トランザクション、アカウント、またはその両方を要求しない場合は無視されます。 |
| `owner_funds` | ブール値 | _省略可_ `true`の場合、応答のOfferCreateトランザクションのメタデータに`owner_funds`フィールドが含まれます。デフォルトでは`false`です。トランザクションが含まれておらず、`expand`がtrueではない場合には無視されます。 |
| `binary` | ブール値 | _省略可_ `true`で、かつ`transactions``expand`が両方とも`true`の場合、JSONフォーマットではなくバイナリフォーマット16進文字列でトランザクション情報が返されます。[新規: rippled 0.28.0][] |
| `queue` | ブール値 | _省略可_ `true`で、かつコマンドが`current`レジャーを要求している場合、[キューに入れらているトランザクション](transaction-cost.html#キューに入れられたトランザクション)の配列が結果に含まれます。
`ledger`フィールドは廃止予定であり、今後予告なしに削除される可能性があります。
## 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id":4,
"status":"success",
"type":"response",
"result":{
"ledger":{
"accepted": true,
"account_hash":"FD2709F6C07284C3EE85EDE32AC452D9013A89D9B9E781D67D9784457E86A9BB",
"close_flags":0,
"close_time":508541181,
"close_time_human":"2016-Feb-11 21:26:21",
"close_time_resolution":10,
"closed": true,
"hash":"F1433E9D15F33E746B8820DEEE4879F48181704364E459332561DF8E52E4EB7E",
"ledger_hash":"F1433E9D15F33E746B8820DEEE4879F48181704364E459332561DF8E52E4EB7E",
"ledger_index":"18851530",
"parent_close_time":508541180,
"parent_hash":"8300B70AA5A865961DED7DAC5B88047028762D5946ECA887D09D32DE442E2305",
"seqNum":"18851530",
"totalCoins":"99998102799411646",
"total_coins":"99998102799411646",
"transaction_hash":"E0DB0471A1D198611E1C050ADA4AE74EEB38CEC26E0550663E0FCB1364212A3B"
},
"ledger_hash":"F1433E9D15F33E746B8820DEEE4879F48181704364E459332561DF8E52E4EB7E",
"ledger_index":18851530,
"validated": true
}
}
```
*JSON-RPC*
```json
200 OK
{
"result":{
"ledger":{
"accepted": true,
"account_hash":"B089E7CD4F5167249951611AAEC863D4BF84FF098500E9CB50561F1A89EED825",
"close_flags":0,
"close_time":508541222,
"close_time_human":"2016-Feb-11 21:27:02",
"close_time_resolution":10,
"closed": true,
"hash":"85E6D422F1A3AE0BEA315C4F09CD0B45022312A4BBF0D308246E901536B61157",
"ledger_hash":"85E6D422F1A3AE0BEA315C4F09CD0B45022312A4BBF0D308246E901536B61157",
"ledger_index":"18851543",
"parent_close_time":508541221,
"parent_hash":"C382DB117F2D5AAECFBFB43EA509F8E56D6E1D1297CE00C0D02A3EE695ABB78F",
"seqNum":"18851543",
"totalCoins":"99998102795090646",
"total_coins":"99998102795090646",
"transaction_hash":"BEC71A3CAD11BFC4E4013CD109F220E0850E9A3808B15FAA6DAE4D898970EFAF"
},
"ledger_hash":"85E6D422F1A3AE0BEA315C4F09CD0B45022312A4BBF0D308246E901536B61157",
"ledger_index":18851543,
"status":"success",
"validated": true
}
}
```
<!-- MULTICODE_BLOCK_END -->
応答は[標準フォーマット][]に従っており、正常に完了した場合は結果にレジャーに関する情報を表す次のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:-------------------------------|:--------|:----------------------------------|
| `ledger` | オブジェクト | このレジャーの完全なヘッダーデータ。 |
| `ledger.account_hash` | 文字列 | このレジャーのすべてのアカウント状態情報のハッシュ16進数 |
| `ledger.accountState` | 配列 | (要求されていない場合は省略)このレジャーのすべての[アカウント状態情報](ledger-data-formats.html)。 |
| `ledger.close_flags` | 整数 | このレジャーの閉鎖に関連するフラグのビットマップ。現在、レジャーでは1つのフラグだけが`close_flags`として定義されています(**sLCF_NoConsensusTime**値1。このフラグが有効な場合、レジャーの正確な閉鎖時刻についてバリデータの間で意見が対立しましたが、作成しているレジャーは同一のものであるため、バリデータは閉鎖時刻について「合意をしないことに合意する」とした上でコンセンサスを宣言しました。この場合、コンセンサスレジャーの`close_time`の値は直前のバージョンの閉鎖時刻の1秒後です。この場合、正式な閉鎖時刻がありませんが、実際の閉鎖時刻はおそらく指定されている`close_time`の36秒後です。 |
| `ledger.close_time` | 整数 | レジャーが閉鎖された時刻([Rippleエポック以降の経過秒数][] |
| `ledger.close_time_human` | 文字列 | 人間が読めるフォーマットでのこのレジャーが閉鎖された時刻 |
| `ledger.close_time_resolution` | 整数 | レジャー閉鎖時刻はこの秒数の範囲内で丸めらます。 |
| `ledger.closed` | ブール値 | このレジャーが閉鎖されているかどうか。 |
| `ledger.ledger_hash` | 文字列 | レジャー全体の一意の識別用ハッシュ。 |
| `ledger.ledger_index` | 文字列 | このレジャーの[レジャーインデックス][]。整数を引用符で囲んだ形式で示されます。 |
| `ledger.parent_close_time` | 整数 | 前のレジャーが閉鎖された時刻。 |
| `ledger.parent_hash` | 文字列 | このレジャーの直前のレジャーの一意の識別用ハッシュ。 |
| `ledger.total_coins` | 文字列 | ネットワークのXRPの合計drop数。整数を引用符で囲んだ形式で示されます。トランザクションコストによりXRPが消却されると、この値は減少します。 |
| `ledger.transaction_hash` | 文字列 | このレジャーに記録されているトランザクション情報のハッシュ16進数 |
| `ledger.transactions` | 配列 | (要求されていない場合は省略)このレジャーバージョンで適用されたトランザクション。デフォルトでは、メンバーはトランザクションの識別用[ハッシュ][]文字列です。要求で`expand`がtrueとして指定されている場合は、メンバーはJSONフォーマットまたはバイナリフォーマットでのトランザクションの完全な表現です。フォーマットは、要求で`binary`がtrueとして指定されていたかどうかに応じて決まります。 |
| `ledger_hash` | 文字列 | レジャー全体の一意の識別用ハッシュ。 |
| `ledger_index` | 数値 | このレジャーの[レジャーインデックス][]。 |
| `queue_data` | 配列 | `queue`パラメーターで要求されている場合を除いて省略)キューに入れられたトランザクションをキューと同じ順序で記述するオブジェクトの配列。要求で`expand`がtrueに指定されている場合は、メンバーにはJSONフォーマットまたはバイナリフォーマットでのトランザクションの完全な表現が含まれています。フォーマットは、要求で`binary`がtrueとして指定されていたかどうかによって決まります。[FeeEscalation Amendment][]が必要です。[新規: rippled 0.70.0][] |
以下のフィールドは廃止予定であり、今後予告なしに削除される可能性があります。`accepted``hash`(代わりに`ledger_hash`を使用)、`seqNum`(代わりに`ledger_index`を使用)、`totalCoins`(代わりに`total_coins`を使用)。
`queue_data`配列の各メンバーは、キュー内の1つのトランザクションを表します。このオブジェクトの一部フィールドは、まだ計算されていないために省略されることがあります。このオブジェクトのフィールドを次に示します。
| フィールド | 値 | 説明 |
|:--------------------|:-----------------|:------------------------------------|
| `account` | 文字列 | このキューに入れられたトランザクションの送信者の[アドレス][]。 |
| `tx` | 文字列またはオブジェクト | デフォルトでは、これはトランザクションの[識別用ハッシュ](basic-data-types.html#ハッシュ)を含む文字列です。トランザクションがバイナリフォーマットで展開されている場合、これは`tx_blob`が唯一のフィールドであるオブジェクトであり、バイナリー形式のトランザクションが10進文字列として含まれています。トランザクションがJSONフォーマットで展開されている場合、これは`hash`フィールドにトランザクションの識別用ハッシュが指定されている[トランザクションオブジェクト](transaction-formats.html)を含むオブジェクトです。 |
| `retries_remaining` | 数値 | このトランザクションの再試行可能回数。この回数を超えるとトランザクションが除外されます。 |
| `preflight_result` | 文字列 | 初期トランザクションチェックの一時的な結果。これは常に`tesSUCCESS`です。 |
| `last_result` | 文字列 | _省略される場合があります_[再試行可能な (`ter`) の結果](ter-codes.html)を取得した後でこのトランザクションがキューに残っている場合、これは取得した正確な`ter`結果コードです。 |
| `auth_change` | ブール値 | _省略される場合があります_ このトランザクションがこのアドレスの[トランザクション承認方法](transaction-basics.html#トランザクションの承認)を変更するかどうかを示します。 |
| `fee` | 文字列 | _省略される場合があります_ このトランザクションの[トランザクションコスト](transaction-cost.html)[XRPのdrop数][])。 |
| `fee_level` | 文字列 | _省略される場合があります_ このタイプのトランザクションの最少コストと比較した、このトランザクションのトランザクションコスト([手数料レベル][])。 |
| `max_spend_drops` | 文字列 | _省略される場合があります_ このトランザクションで送信または消却できる[XRP、drop単位][]の最高額。 |
要求に`"owner_funds": true`が指定されておりトランザクションが展開されている場合、応答には、各[OfferCreateトランザクション][]の`metaData`オブジェクトの`owner_funds`フィールドが含まれています。このフィールドの目的は、新しい検証済みレジャーごとに[オファーの資金化ステータス](offers.html#オファーのライフサイクル)を容易に追跡できるようにすることです。このフィールドの定義は、[オーダーブックサブスクリプションストリーム](subscribe.html#オーダーブックストリーム)でのこのフィールドのバージョンとはわずかに異なります。
| `Field` | 値 | 説明 |
|:--------------|:-------|:----------------------------------------------------|
| `owner_funds` | 文字列 | このレジャーのすべてのトランザクションの実行後に、このOfferCreateトランザクションを送信する`Account`が保有する`TakerGets`通貨の額。この通貨額が[凍結](freezes.html)されているかどうかはチェックされません。 |
## 考えられるエラー
* [汎用エラータイプ][]のすべて。
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
* `noPermission` - `full`または`accounts`をtrueとして指定したが、管理者としてサーバーに接続していない場合通常、管理者はローカルポートで接続する必要があります
<!-- TODO: we should add this fee levels link to rippled-api-links.md. server_state.md is also including this as a one-off.-->
[手数料レベル]: transaction-cost.html#手数料レベル
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,245 @@
---
html: ledger.html # Watch carefully for clashes w/ this filename
parent: ledger-methods.html
blurb: Get info about a ledger version.
labels:
- Blockchain
---
# ledger
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/LedgerHandler.cpp "Source")
Retrieve information about the public [ledger](ledgers.html).
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 14,
"command": "ledger",
"ledger_index": "validated",
"full": false,
"accounts": false,
"transactions": false,
"expand": false,
"owner_funds": false
}
```
*JSON-RPC*
```json
{
"method": "ledger",
"params": [
{
"ledger_index": "validated",
"accounts": false,
"full": false,
"transactions": false,
"expand": false,
"owner_funds": false
}
]
}
```
*Commandline*
```
#Syntax: ledger ledger_index|ledger_hash [full|tx]
# "full" is equivalent to "full": true
# "tx" is equivalent to "transactions": true
rippled ledger validated
```
<!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#ledger)
The request can contain the following parameters:
| `Field` | Type | Description |
|:---------------|:---------------------------|:-------------------------------|
| `ledger_hash` | String | _(Optional)_ A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]). |
| `ledger_index` | String or Unsigned Integer | _(Optional)_ The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
| `full` | Boolean | _(Optional)_ **Admin required** If `true`, return full information on the entire ledger. Ignored if you did not specify a ledger version. Defaults to `false`. (Equivalent to enabling `transactions`, `accounts`, and `expand`.) **Caution:** This is a very large amount of data -- on the order of several hundred megabytes! |
| `accounts` | Boolean | _(Optional)_ **Admin required.** If `true`, return information on accounts in the ledger. Ignored if you did not specify a ledger version. Defaults to `false`. **Caution:** This returns a very large amount of data! |
| `transactions` | Boolean | _(Optional)_ If `true`, return information on transactions in the specified ledger version. Defaults to `false`. Ignored if you did not specify a ledger version. |
| `expand` | Boolean | _(Optional)_ Provide full JSON-formatted information for transaction/account information instead of only hashes. Defaults to `false`. Ignored unless you request transactions, accounts, or both. |
| `owner_funds` | Boolean | _(Optional)_ If `true`, include `owner_funds` field in the metadata of OfferCreate transactions in the response. Defaults to `false`. Ignored unless transactions are included and `expand` is true. |
| `binary` | Boolean | _(Optional)_ If `true`, and `transactions` and `expand` are both also `true`, return transaction information in binary format (hexadecimal string) instead of JSON format. [New in: rippled 0.28.0][] |
| `queue` | Boolean | _(Optional)_ If `true`, and the command is requesting the `current` ledger, includes an array of [queued transactions](transaction-cost.html#queued-transactions) in the results.
The `ledger` field is deprecated and may be removed without further notice.
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 14,
"result": {
"ledger": {
"accepted": true,
"account_hash": "53BD4650A024E27DEB52DBB6A52EDB26528B987EC61C895C48D1EB44CEDD9AD3",
"close_flags": 0,
"close_time": 638329241,
"close_time_human": "2020-Mar-24 01:40:41.000000000 UTC",
"close_time_resolution": 10,
"closed": true,
"hash": "1723099E269C77C4BDE86C83FA6415D71CF20AA5CB4A94E5C388ED97123FB55B",
"ledger_hash": "1723099E269C77C4BDE86C83FA6415D71CF20AA5CB4A94E5C388ED97123FB55B",
"ledger_index": "54300932",
"parent_close_time": 638329240,
"parent_hash": "DF68B3BCABD31097634BABF0BDC87932D43D26E458BFEEFD36ADF2B3D94998C0",
"seqNum": "54300932",
"totalCoins": "99991024049648900",
"total_coins": "99991024049648900",
"transaction_hash": "50B3A8FE2C5620E43AA57564209AEDFEA3E868CFA2F6E4AB4B9E55A7A62AAF7B"
},
"ledger_hash": "1723099E269C77C4BDE86C83FA6415D71CF20AA5CB4A94E5C388ED97123FB55B",
"ledger_index": 54300932,
"validated": true
},
"status": "success",
"type": "response"
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"ledger": {
"accepted": true,
"account_hash": "B258A8BB4743FB74CBBD6E9F67E4A56C4432EA09E5805E4CC2DA26F2DBE8F3D1",
"close_flags": 0,
"close_time": 638329271,
"close_time_human": "2020-Mar-24 01:41:11.000000000 UTC",
"close_time_resolution": 10,
"closed": true,
"hash": "3652D7FD0576BC452C0D2E9B747BDD733075971D1A9A1D98125055DEF428721A",
"ledger_hash": "3652D7FD0576BC452C0D2E9B747BDD733075971D1A9A1D98125055DEF428721A",
"ledger_index": "54300940",
"parent_close_time": 638329270,
"parent_hash": "AE996778246BC81F85D5AF051241DAA577C23BCA04C034A7074F93700194520D",
"seqNum": "54300940",
"totalCoins": "99991024049618156",
"total_coins": "99991024049618156",
"transaction_hash": "FC6FFCB71B2527DDD630EE5409D38913B4D4C026AA6C3B14A3E9D4ED45CFE30D"
},
"ledger_hash": "3652D7FD0576BC452C0D2E9B747BDD733075971D1A9A1D98125055DEF428721A",
"ledger_index": 54300940,
"status": "success",
"validated": true
}
}
```
*Commandline*
```json
Loading: "/etc/opt/ripple/rippled.cfg"
2020-Mar-24 01:42:42.622264591 UTC HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"ledger" : {
"accepted" : true,
"account_hash" : "6B3101BE8F1431C5AC5B43D9731F1F3A747D24B3BEF89B687F0F3039E10EB65A",
"close_flags" : 0,
"close_time" : 638329360,
"close_time_human" : "2020-Mar-24 01:42:40.000000000 UTC",
"close_time_resolution" : 10,
"closed" : true,
"hash" : "C88A0EEC0E785A4C3E99F2A8B8EE0D7BDF3DE6C786C39B1B01547F6DAE5A4B7F",
"ledger_hash" : "C88A0EEC0E785A4C3E99F2A8B8EE0D7BDF3DE6C786C39B1B01547F6DAE5A4B7F",
"ledger_index" : "54300962",
"parent_close_time" : 638329352,
"parent_hash" : "96D2D70DC540BA4614A00C77FCFDED20E7D58AF3238E36655C38C407A56982A3",
"seqNum" : "54300962",
"totalCoins" : "99991024049218063",
"total_coins" : "99991024049218063",
"transaction_hash" : "47AC79011652D2A56AE04D3DD618C60A6669E3F94308C803554E890D2BD94481"
},
"ledger_hash" : "C88A0EEC0E785A4C3E99F2A8B8EE0D7BDF3DE6C786C39B1B01547F6DAE5A4B7F",
"ledger_index" : 54300962,
"status" : "success",
"validated" : true
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing information about the ledger, including the following fields:
| `Field` | Type | Description |
|:-------------------------------|:--------|:----------------------------------|
| `ledger` | Object | The complete header data of this ledger. |
| `ledger.account_hash` | String | Hash of all account state information in this ledger, as hex |
| `ledger.accountState` | Array | (Omitted unless requested) All the [account-state information](ledger-data-formats.html) in this ledger. |
| `ledger.close_flags` | Integer | A bit-map of flags relating to the closing of this ledger. Currently, the ledger has only one flag defined for `close_flags`: **`sLCF_NoConsensusTime`** (value 1). If this flag is enabled, it means that validators were in conflict regarding the correct close time for the ledger, but build otherwise the same ledger, so they declared consensus while "agreeing to disagree" on the close time. In this case, the consensus ledger contains a `close_time` that is 1 second after that of the previous ledger. (In this case, there is no official close time, but the actual real-world close time is probably 3-6 seconds later than the specified `close_time`.) |
| `ledger.close_time` | Integer | The time this ledger was closed, in [seconds since the Ripple Epoch][] |
| `ledger.close_time_human` | String | The time this ledger was closed, in human-readable format. Always uses the UTC time zone. [Updated in: rippled 1.5.0][] |
| `ledger.close_time_resolution` | Integer | Ledger close times are rounded to within this many seconds. |
| `ledger.closed` | Boolean | Whether or not this ledger has been closed |
| `ledger.ledger_hash` | String | Unique identifying hash of the entire ledger. |
| `ledger.ledger_index` | String | The [Ledger Index][] of this ledger, as a quoted integer |
| `ledger.parent_close_time` | Integer | The time at which the previous ledger was closed. |
| `ledger.parent_hash` | String | Unique identifying hash of the ledger that came immediately before this one. |
| `ledger.total_coins` | String | Total number of XRP drops in the network, as a quoted integer. (This decreases as transaction costs destroy XRP.) |
| `ledger.transaction_hash` | String | Hash of the transaction information included in this ledger, as hex |
| `ledger.transactions` | Array | (Omitted unless requested) Transactions applied in this ledger version. By default, members are the transactions' identifying [Hash][] strings. If the request specified `expand` as true, members are full representations of the transactions instead, in either JSON or binary depending on whether the request specified `binary` as true. |
| `ledger_hash` | String | Unique identifying hash of the entire ledger. |
| `ledger_index` | Number | The [Ledger Index][] of this ledger. |
| `validated` | Boolean | _(May be omitted)_ If `true`, this is a validated ledger version. If omitted or set to `false`, this ledger's data is not final. |
| `queue_data` | Array | _(Omitted unless requested with the `queue` parameter)_ Array of objects describing queued transactions, in the same order as the queue. If the request specified `expand` as true, members contain full representations of the transactions, in either JSON or binary depending on whether the request specified `binary` as true. Added by the [FeeEscalation amendment][]. [New in: rippled 0.70.0][] |
The following fields are deprecated and may be removed without further notice: `accepted`, `hash` (use `ledger_hash` instead), `seqNum` (use `ledger_index` instead), `totalCoins` (use `total_coins` instead).
Each member of the `queue_data` array represents one transaction in the queue. Some fields of this object may be omitted because they have not yet been calculated. The fields of this object are as follows:
| Field | Value | Description |
|:--------------------|:-----------------|:------------------------------------|
| `account` | String | The [Address][] of the sender for this queued transaction. |
| `tx` | String or Object | By default, this is a String containing the [identifying hash](basic-data-types.html#hashes) of the transaction. If transactions are expanded in binary format, this is an object whose only field is `tx_blob`, containing the binary form of the transaction as a decimal string. If transactions are expanded in JSON format, this is an object containing the [transaction object](transaction-formats.html) including the transaction's identifying hash in the `hash` field. |
| `retries_remaining` | Number | How many times this transaction can be retried before being dropped. |
| `preflight_result` | String | The tentative result from preliminary transaction checking. This is always `tesSUCCESS`. |
| `last_result` | String | _(May be omitted)_ If this transaction was left in the queue after getting a [retriable (`ter`) result](ter-codes.html), this is the exact `ter` result code it got. |
| `auth_change` | Boolean | _(May be omitted)_ Whether this transaction changes this address's [ways of authorizing transactions](transaction-basics.html#authorizing-transactions). |
| `fee` | String | _(May be omitted)_ The [Transaction Cost](transaction-cost.html) of this transaction, in [drops of XRP][]. |
| `fee_level` | String | _(May be omitted)_ The transaction cost of this transaction, relative to the minimum cost for this type of transaction, in [fee levels][]. |
| `max_spend_drops` | String | _(May be omitted)_ The maximum amount of [XRP, in drops][], this transaction could potentially send or destroy. |
If the request specified `"owner_funds": true` and expanded transactions, the response has a field `owner_funds` in the `metaData` object of each [OfferCreate transaction][]. The purpose of this field is to make it easier to track the [funding status of offers](offers.html#lifecycle-of-an-offer) with each new validated ledger. This field is defined slightly differently than the version of this field in [Order Book subscription streams](subscribe.html#order-book-streams):
| `Field` | Value | Description |
|:--------------|:-------|:----------------------------------------------------|
| `owner_funds` | String | Numeric amount of the `TakerGets` currency that the `Account` sending this OfferCreate transaction has after the execution of all transactions in this ledger. This does not check whether the currency amount is [frozen](freezes.html). |
## Possible Errors
* Any of the [universal error types][].
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
* `noPermission` - If you specified `full` or `accounts` as true, but are not connected to the server as an admin (usually, admin requires connecting on a local port).
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}

View File

@@ -0,0 +1,99 @@
---
html: ledger_closed.html
parent: ledger-methods.html
blurb: 最新の閉鎖済みレジャーの一意のIDを返します。
label:
- ブロックチェーン
---
# ledger_closed
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/LedgerClosed.cpp "Source")
`ledger_closed`メソッドは、最新の決済済みレジャーの一意のIDを返します。このレジャーは必ずしも検証済みで変更不可能ではありません。
## 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "ledger_closed"
}
```
*JSON-RPC*
```json
{
"method": "ledger_closed",
"params": [
{}
]
}
```
*コマンドライン*
```
#Syntax: ledger_closed
rippled ledger_closed
```
<!-- MULTICODE_BLOCK_END -->
[試してみる >](websocket-api-tool.html#ledger_closed)
このメソッドはパラメーターを受け入れません。
## 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 1,
"status": "success",
"type": "response",
"result": {
"ledger_hash": "17ACB57A0F73B5160713E81FE72B2AC9F6064541004E272BD09F257D57C30C02",
"ledger_index": 6643099
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"ledger_hash": "8B5A0C5F6B198254A6E411AF55C29EE40AA86251D2E78DD0BB17647047FA9C24",
"ledger_index": 8696231,
"status": "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
| `Field` | 型 | 説明 |
|:---------------|:-----------------|:-----------------------------------------|
| `ledger_hash` | 文字列 | このレジャーバージョンの一意の[ハッシュ][]16進数。 |
| `ledger_index` | 符号なし整数 | このレジャーバージョンの[レジャーインデックス][]。 |
## 考えられるエラー
* いずれかの[汎用エラータイプ][]。
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,111 @@
---
html: ledger_closed.html
parent: ledger-methods.html
blurb: Get the latest closed ledger version.
labels:
- Blockchain
---
# ledger_closed
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/LedgerClosed.cpp "Source")
The `ledger_closed` method returns the unique identifiers of the most recently closed ledger. (This ledger is not necessarily validated and immutable yet.)
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 2,
"command": "ledger_closed"
}
```
*JSON-RPC*
```json
{
"method": "ledger_closed",
"params": [
{}
]
}
```
*Commandline*
```sh
#Syntax: ledger_closed
rippled ledger_closed
```
<!-- MULTICODE_BLOCK_END -->
[Try it! >](websocket-api-tool.html#ledger_closed)
This method accepts no parameters.
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id": 1,
"status": "success",
"type": "response",
"result": {
"ledger_hash": "17ACB57A0F73B5160713E81FE72B2AC9F6064541004E272BD09F257D57C30C02",
"ledger_index": 6643099
}
}
```
*JSON-RPC*
```json
200 OK
{
"result": {
"ledger_hash": "8B5A0C5F6B198254A6E411AF55C29EE40AA86251D2E78DD0BB17647047FA9C24",
"ledger_index": 8696231,
"status": "success"
}
}
```
*Commandline*
```json
{
"result" : {
"ledger_hash" : "6F5D3B97F1CAA8440AFCED3CA10FB9DC6472F64DEBC2EFAE7CAE7FC0123F32DA",
"ledger_index" : 56843991,
"status" : "success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
The response follows the [standard format][], with a successful result containing the following fields:
| `Field` | Type | Description |
|:---------------|:-----------------|:-----------------------------------------|
| `ledger_hash` | String | The unique [Hash][] of this ledger version, in hexadecimal. |
| `ledger_index` | Unsigned Integer | The [ledger index][] of this ledger version. |
## Possible Errors
* Any of the [universal error types][].
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

View File

@@ -0,0 +1,100 @@
---
html: ledger_current.html
parent: ledger-methods.html
blurb: 現在進行中のレジャーの一意のIDを返します。
label:
- ブロックチェーン
---
# ledger_current
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/LedgerCurrent.cpp "Source")
`ledger_current`メソッドは、現在進行中のレジャーの一意のIDを返します。このコマンドで返されるレジャーは確定されたものではないため、このコマンドは主にテストに有用です。
## 要求フォーマット
要求フォーマットの例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id":2,
"command":"ledger_current"
}
```
*JSON-RPC*
```json
{
"method":"ledger_current",
"params":[
{}
]
}
```
*コマンドライン*
```sh
#Syntax: ledger_current
rippled ledger_current
```
<!-- MULTICODE_BLOCK_END -->
[試してみる >](websocket-api-tool.html#ledger_current)
この要求にはパラメーターは含まれていません。
## 応答フォーマット
処理が成功した応答の例:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"id":2,
"status":"success",
"type":"response",
"result":{
"ledger_current_index":6643240
}
}
```
*JSON-RPC*
```json
200 OK
{
"result":{
"ledger_current_index":8696233,
"status":"success"
}
}
```
<!-- MULTICODE_BLOCK_END -->
応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
| `Field` | 型 | 説明 |
|:-----------------------|:-----------------|:-------------------------------|
| `ledger_current_index` | 符号なし整数 | このレジャーのシーケンス番号 |
現行レジャーのハッシュは、レジャーの内容とともに常に変化するため、`ledger_hash`フィールドはありません。
## 考えられるエラー
* [汎用エラータイプ][]のすべて。
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}

Some files were not shown because too many files have changed in this diff Show More