mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-21 20:25:51 +00:00
Rename API method categories
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
---
|
||||
html: json.html
|
||||
parent: utility-methods.html
|
||||
blurb: コマンドのパラメーターをJSON値として受け入れ、他のコマンドを実行します。
|
||||
labels:
|
||||
- コアサーバー
|
||||
---
|
||||
# json
|
||||
|
||||
`json`メソッドは、プロキシとして他のコマンドを実行し、コマンドのパラメーターをJSON値として受け入れます。これは*コマンドラインクライアント専用*であり、パラメーターを指定するコマンドライン構文が不十分であるかまたは望ましくない場合に使用されるものです。
|
||||
|
||||
## 要求フォーマット
|
||||
要求フォーマットの例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*コマンドライン*
|
||||
|
||||
```sh
|
||||
# Syntax: json method json_stanza
|
||||
rippled -q json ledger_closed '{}'
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
## 応答フォーマット
|
||||
|
||||
処理が成功した応答の例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"result" :{
|
||||
"ledger_hash" :"8047C3ECF1FA66326C1E57694F6814A1C32867C04D3D68A851367EE2F89BBEF3",
|
||||
"ledger_index" :390308,
|
||||
"status" :"success"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
応答は[標準フォーマット][]に従っており、実行されたコマンドのタイプに対して適切なフィールドが含まれています。
|
||||
|
||||
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
html: json.html
|
||||
parent: utility-methods.html
|
||||
blurb: Pass JSON through the commandline.
|
||||
labels:
|
||||
- Core Server
|
||||
---
|
||||
# json
|
||||
|
||||
The `json` method is a proxy to running other commands, and accepts the parameters for the command as a JSON value. It is *exclusive to the Commandline client*, and intended for cases where the commandline syntax for specifying parameters is inadequate or undesirable.
|
||||
|
||||
## Request Format
|
||||
An example of the request format:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*Commandline*
|
||||
|
||||
```sh
|
||||
# Syntax: json method json_stanza
|
||||
rippled -q json ledger_closed '{}'
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
## Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"result" : {
|
||||
"ledger_hash" : "8047C3ECF1FA66326C1E57694F6814A1C32867C04D3D68A851367EE2F89BBEF3",
|
||||
"ledger_index" : 390308,
|
||||
"status" : "success"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format][], with whichever fields are appropriate to the type of command made.
|
||||
|
||||
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
@@ -0,0 +1,91 @@
|
||||
---
|
||||
html: ping.html
|
||||
parent: utility-methods.html
|
||||
blurb: 確認応答を返します。これにより、接続のステータスと遅延をテストできます。
|
||||
labels:
|
||||
- コアサーバー
|
||||
---
|
||||
# ping
|
||||
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Ping.cpp "Source")
|
||||
|
||||
`ping`コマンドは確認応答を返します。これにより、クライアントは接続のステータスと遅延をテストできます。
|
||||
|
||||
## 要求フォーマット
|
||||
要求フォーマットの例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id":1,
|
||||
"command":"ping"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method":"ping",
|
||||
"params":[
|
||||
{}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*コマンドライン*
|
||||
|
||||
```sh
|
||||
#Syntax: ping
|
||||
rippled ping
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[試してみる >](websocket-api-tool.html#ping)
|
||||
|
||||
要求にはパラメーターが含まれていません。
|
||||
|
||||
## 応答フォーマット
|
||||
|
||||
処理が成功した応答の例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id":1,
|
||||
"result":{},
|
||||
"status":"success",
|
||||
"type":"response"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
||||
{
|
||||
"result":{
|
||||
"status":"success"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果にフィールドが含まれません。クライアントは要求から応答までのラウンドトリップ時間を遅延として測定できます。
|
||||
|
||||
## 考えられるエラー
|
||||
|
||||
* [汎用エラータイプ][]のすべて。
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
{% include '_snippets/tx-type-links.md' %}
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
@@ -0,0 +1,91 @@
|
||||
---
|
||||
html: ping.html
|
||||
parent: utility-methods.html
|
||||
blurb: Confirm connectivity with the server.
|
||||
labels:
|
||||
- Core Server
|
||||
---
|
||||
# ping
|
||||
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Ping.cpp "Source")
|
||||
|
||||
The `ping` command returns an acknowledgement, so that clients can test the connection status and latency.
|
||||
|
||||
## Request Format
|
||||
An example of the request format:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"command": "ping"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "ping",
|
||||
"params": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```sh
|
||||
#Syntax: ping
|
||||
rippled ping
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[Try it! >](websocket-api-tool.html#ping)
|
||||
|
||||
The request includes no parameters.
|
||||
|
||||
## Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"result": {},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
||||
{
|
||||
"result": {
|
||||
"status": "success"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format][], with a successful result containing no fields. The client can measure the round-trip time from request to response as latency.
|
||||
|
||||
## 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' %}
|
||||
@@ -0,0 +1,97 @@
|
||||
---
|
||||
html: random.html
|
||||
parent: utility-methods.html
|
||||
blurb: クライアントが乱数生成のエントロピー生成源として使用する乱数を提供します。
|
||||
labels:
|
||||
- コアサーバー
|
||||
---
|
||||
# random
|
||||
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Random.cpp "Source")
|
||||
|
||||
`random`コマンドは、クライアントが乱数生成のエントロピー生成源として使用する乱数を提供します。
|
||||
|
||||
## 要求フォーマット
|
||||
要求フォーマットの例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id":1,
|
||||
"command":"random"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method":"random",
|
||||
"params":[
|
||||
{}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*コマンドライン*
|
||||
|
||||
```sh
|
||||
#Syntax: random
|
||||
rippled random
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
要求にはパラメーターが含まれていません。
|
||||
|
||||
## 応答フォーマット
|
||||
|
||||
処理が成功した応答の例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id":1,
|
||||
"result":{
|
||||
"random":"8ED765AEBBD6767603C2C9375B2679AEC76E6A8133EF59F04F9FC1AAA70E41AF"
|
||||
},
|
||||
"status":"success",
|
||||
"type":"response"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
||||
{
|
||||
"result":{
|
||||
"random":"4E57146AA47BC6E88FDFE8BAA235B900126C916B6CC521550996F590487B837A",
|
||||
"status":"success"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:---------|:-------|:--------------------------|
|
||||
| `random` | 文字列 | ランダムな256ビット16進値。 |
|
||||
|
||||
## 考えられるエラー
|
||||
|
||||
* [汎用エラータイプ][]のすべて。
|
||||
* `internal` - 乱数生成機能に関連している可能性がある内部エラーが発生しました。
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
{% include '_snippets/tx-type-links.md' %}
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
@@ -0,0 +1,108 @@
|
||||
---
|
||||
html: random.html
|
||||
parent: utility-methods.html
|
||||
blurb: Generate a random number.
|
||||
labels:
|
||||
- Core Server
|
||||
---
|
||||
# random
|
||||
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Random.cpp "Source")
|
||||
|
||||
The `random` command provides a random number to be used as a source of entropy for random number generation by clients.
|
||||
|
||||
## Request Format
|
||||
An example of the request format:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"command": "random"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "random",
|
||||
"params": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```sh
|
||||
#Syntax: random
|
||||
rippled random
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The request includes no parameters.
|
||||
|
||||
## Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"result": {
|
||||
"random": "8ED765AEBBD6767603C2C9375B2679AEC76E6A8133EF59F04F9FC1AAA70E41AF"
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
||||
{
|
||||
"result": {
|
||||
"random": "4E57146AA47BC6E88FDFE8BAA235B900126C916B6CC521550996F590487B837A",
|
||||
"status": "success"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```json
|
||||
{
|
||||
"result" : {
|
||||
"random" : "DB7C23C7F224CD410912E68A997BE0FD0FA7175A4C74B829BE5A80ED0DBAA0C5",
|
||||
"status" : "success"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following field:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------|:-------|:--------------------------|
|
||||
| `random` | String | Random 256-bit hex value. |
|
||||
|
||||
## Possible Errors
|
||||
|
||||
* Any of the [universal error types][].
|
||||
* `internal` - Some internal error occurred, possibly relating to the random number generator.
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
{% include '_snippets/tx-type-links.md' %}
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
Reference in New Issue
Block a user