mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-12-05 08:48:11 +00:00
rippled - sign_for command
This commit is contained in:
@@ -7321,10 +7321,258 @@ rippled sign sssssssssssssssssssssssssssss '{"TransactionType": "Payment", "Acco
|
||||
<li><code>noPath</code> - The transaction did not include paths, and the server was unable to find a path by which this payment can occur.</li>
|
||||
</ul>
|
||||
<h2 id="sign-for">sign_for</h2>
|
||||
<p>The <code>sign_for</code> command provides one signature for a multi-signed transaction. takes an address and related secret, and a transaction in JSON form. (TODO: finish this section.) It generates a signature for that transaction, using the secret key and address specified. By using this, you can provide signatures that contribute to a multi-signed transaction. (The signatures should come from the members of your SignerList.)</p>
|
||||
<p><a href="https://github.com/ripple/rippled/blob/release/src/ripple/rpc/handlers/SignFor.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>sign_for</code> command provides one signature for a <a href="reference-transaction-format.html#multi-signing">multi-signed transaction</a>.</p>
|
||||
<h4 id="request-format-24">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
<pre><code>{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p><em>JSON-RPC</em></p>
|
||||
<pre><code>POST http://localhost:5005/
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}]
|
||||
}
|
||||
</code></pre>
|
||||
<p><em>Commandline</em></p>
|
||||
<pre><code>#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"
|
||||
}'
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>The request includes the following parameters:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>account</td>
|
||||
<td>String - <a href="#addresses">Address</a></td>
|
||||
<td>The address which is providing the signature.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tx_json</td>
|
||||
<td>Object</td>
|
||||
<td>The <a href="reference-transaction-format.html">Transaction</a> to sign. Unlike using the <a href="#sign"><code>sign</code> command</a>, all fields of the transaction must be provided, including <code>Fee</code> and <code>Sequence</code>. The transaction must include the field <code>SigningPubKey</code> with an empty string as the value. The object may optionally contain a <code>Signers</code> array with previously-collected signatures.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>secret</td>
|
||||
<td>String</td>
|
||||
<td>(Optional) The secret key to sign with. (Cannot be used with <code>key_type</code>.)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>passphrase</td>
|
||||
<td>String</td>
|
||||
<td>(Optional) A passphrase to use as the secret key to sign with.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>seed</td>
|
||||
<td>String</td>
|
||||
<td>(Optional) A base-58-encoded secret key to sign with.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>seed_hex</td>
|
||||
<td>String</td>
|
||||
<td>(Optional) A hexadecimal secret key to sign with.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>key_type</td>
|
||||
<td>String</td>
|
||||
<td>(Optional) The type of key to use for signing. This can be <code>secp256k1</code> or <code>ed25519</code>. (Ed25519 support is experimental.)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>You must provide exactly 1 field with the secret key. You can use any of the following fields: <code>secret</code>, <code>passphrase</code>, <code>seed</code>, or <code>seed_hex</code>.</p>
|
||||
<h4 id="response-format-24">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
<pre><code>{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p><em>JSON-RPC</em></p>
|
||||
<pre><code>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"
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p><em>Commandline</em></p>
|
||||
<pre><code>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"
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>The response follows the <a href="#response-formatting">standard format</a>, with a successful result containing the following fields:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>tx_blob</td>
|
||||
<td>String</td>
|
||||
<td>Hexadecimal representation of the signed transaction, including the newly-added signature. If it has enough signatures, you can <a href="#submit-only-mode">submit this string using the <code>submit</code> command</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tx_json</td>
|
||||
<td>Object</td>
|
||||
<td>The <a href="reference-transaction-format.html">transaction specification</a> in JSON format, with the newly-added signature in the <code>Signers</code> array. If it has enough signatures, you can submit this object using the <a href="#submit-multisigned"><code>submit_multisigned</code> command</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-24">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
<li><code>invalidParams</code> - One or more fields are specified incorrectly, or one or more required fields are missing.</li>
|
||||
<li><code>srcActNotFound</code> - If the <code>Account</code> from the transaction is not a funded address in the ledger.</li>
|
||||
<li><code>srcActMalformed</code> - If the signing address (<code>account</code> field) from the request is not validly formed.</li>
|
||||
<li><code>badSeed</code> - The seed value supplied was invalidly-formatted.</li>
|
||||
<li><code>badSecret</code> - The secret value supplied was invalidly-formatted.</li>
|
||||
</ul>
|
||||
<h2 id="submit">submit</h2>
|
||||
<p><a href="https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Submit.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>submit</code> method sends a <a href="reference-transaction-format.html">transaction</a> to the network to be confirmed and included in future ledgers.</p>
|
||||
<p>The <code>submit</code> method applies a <a href="reference-transaction-format.html">transaction</a> and sends it to the network to be confirmed and included in future ledgers.</p>
|
||||
<p>This command has two modes:</p>
|
||||
<ul>
|
||||
<li>Submit-only mode takes a signed, serialized transaction as a binary blob, and submits it to the network as-is. Since signed transaction objects are immutable, no portion of the transaction can be modified or automatically filled in after submission.</li>
|
||||
@@ -7354,7 +7602,7 @@ rippled sign sssssssssssssssssssssssssssss '{"TransactionType": "Payment", "Acco
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="request-format-24">Request Format</h4>
|
||||
<h4 id="request-format-25">Request Format</h4>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
<pre><code>{
|
||||
@@ -7428,7 +7676,7 @@ submit 1200002280000000240000000361D4838D7EA4C6800000000000000000000000000055534
|
||||
</tbody>
|
||||
</table>
|
||||
<p>See the <a href="#sign">sign command</a> for detailed information on how the server automatically fills in certain fields.</p>
|
||||
<h4 id="request-format-25">Request Format</h4>
|
||||
<h4 id="request-format-26">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -7474,7 +7722,7 @@ submit sssssssssssssssssssssssssssss '{"TransactionType":"Payment", "Account":"r
|
||||
</code></pre>
|
||||
</div>
|
||||
<p><a class="button" href="ripple-api-tool.html#submit">Try it! ></a></p>
|
||||
<h4 id="response-format-24">Response Format</h4>
|
||||
<h4 id="response-format-25">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -7578,7 +7826,7 @@ submit sssssssssssssssssssssssssssss '{"TransactionType":"Payment", "Account":"r
|
||||
<li>Do not paste an error including your secret to a public place for debugging</li>
|
||||
<li>Do not display an error message including your secret on a website, even by accident</li>
|
||||
</ul>
|
||||
<h4 id="possible-errors-24">Possible Errors</h4>
|
||||
<h4 id="possible-errors-25">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
<li><code>invalidTransaction</code> - The transaction is malformed or otherwise invalid.</li>
|
||||
@@ -7591,11 +7839,75 @@ submit sssssssssssssssssssssssssssss '{"TransactionType":"Payment", "Account":"r
|
||||
<li><code>internalJson</code> - An internal error occurred when serializing the transaction to JSON. This could be caused by many aspects of the transaction, including a bad signature or some fields being malformed.</li>
|
||||
</ul>
|
||||
<h2 id="submit-multisigned">submit_multisigned</h2>
|
||||
<p>The <code>submit_multisigned</code> command takes a transaction specification with multiple signatures and applies that transaction. (TODO: finish this section.)</p>
|
||||
<p><a href="https://github.com/ripple/rippled/blob/release/src/ripple/rpc/handlers/SubmitMultiSigned.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>submit_multisigned</code> command applies a <a href="reference-transaction-format.html#multi-signing">multi-signed</a> transaction and sends it to the network to be included in future ledgers. (TODO: finish this)</p>
|
||||
<h4 id="request-format-27">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
|
||||
*WebSocket*
|
||||
|
||||
|
||||
wzxhzdk:126
|
||||
|
||||
|
||||
*Second tab*
|
||||
|
||||
|
||||
wzxhzdk:127
|
||||
|
||||
|
||||
</div>
|
||||
<p>The request includes the following parameters:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<h4 id="response-format-26">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
|
||||
*WebSocket*
|
||||
|
||||
|
||||
wzxhzdk:128
|
||||
|
||||
|
||||
*Second tab*
|
||||
|
||||
|
||||
wzxhzdk:129
|
||||
|
||||
|
||||
</div>
|
||||
<p>The response follows the <a href="#response-formatting">standard format</a>, with a successful result containing the following fields:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-26">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
<li><code>invalidParams</code> - One or more fields are specified incorrectly, or one or more required fields are missing.</li>
|
||||
<li><code>actNotFound</code> - The address specified in the <code>account</code> field of the request does not correspond to an account in the ledger.</li>
|
||||
<li><code>lgrNotFound</code> - The ledger specified by the <code>ledger_hash</code> or <code>ledger_index</code> does not exist, or it does exist but the server does not have it.</li>
|
||||
</ul>
|
||||
<h2 id="book-offers">book_offers</h2>
|
||||
<p><a href="https://github.com/ripple/rippled/blob/develop/src/ripple/rpc/handlers/BookOffers.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>book_offers</code> method retrieves a list of offers, also known as the <a href="http://www.investopedia.com/terms/o/order-book.asp">order book</a>, between two currencies. If the results are very large, a partial result is returned with a marker so that subsequent requests can resume from where the previous one left off.</p>
|
||||
<h4 id="request-format-26">Request Format</h4>
|
||||
<h4 id="request-format-28">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -7680,7 +7992,7 @@ rippled book_offers 'USD/rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' 'EUR/rvYAfWj5gh67oV6
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Normally, offers that are not funded are omitted; however, offers made by the specified <code>taker</code> account are always displayed. This allows you to look up your own unfunded offers in order to cancel them with an OfferCancel transaction.</p>
|
||||
<h4 id="response-format-25">Response Format</h4>
|
||||
<h4 id="response-format-27">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -7812,7 +8124,7 @@ rippled book_offers 'USD/rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' 'EUR/rvYAfWj5gh67oV6
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-25">Possible Errors</h4>
|
||||
<h4 id="possible-errors-27">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
<li><code>invalidParams</code> - One or more fields are specified incorrectly, or one or more required fields are missing.</li>
|
||||
@@ -7829,7 +8141,7 @@ rippled book_offers 'USD/rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' 'EUR/rvYAfWj5gh67oV6
|
||||
<h2 id="subscribe">subscribe</h2>
|
||||
<p><a href="https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Subscribe.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>subscribe</code> method requests periodic notifications from the server when certain events happen.</p>
|
||||
<h4 id="request-format-27">Request Format</h4>
|
||||
<h4 id="request-format-29">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>Subscribe to accounts</em></p>
|
||||
@@ -7960,7 +8272,7 @@ rippled book_offers 'USD/rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' 'EUR/rvYAfWj5gh67oV6
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="response-format-26">Response Format</h4>
|
||||
<h4 id="response-format-28">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -7980,7 +8292,7 @@ rippled book_offers 'USD/rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' 'EUR/rvYAfWj5gh67oV6
|
||||
<li><em>Stream: ledger</em> - Information about the ledgers on hand and current fee schedule, such as <code>fee_base</code> (current base fee for transactions in XRP), <code>fee_ref</code> (current base fee for transactions in fee units), <code>ledger_hash</code> (hash of the latest validated ledger), <code>reserve_base</code> (minimum reserve for accounts), and more.</li>
|
||||
<li><code>books</code> - No fields returned by default. If <code>"snapshot": true</code> is set in the request, returns <code>offers</code> (an array of offer definition objects defining the order book)</li>
|
||||
</ul>
|
||||
<h4 id="possible-errors-26">Possible Errors</h4>
|
||||
<h4 id="possible-errors-28">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
<li><code>invalidParams</code> - One or more fields are specified incorrectly, or one or more required fields are missing.</li>
|
||||
@@ -8525,7 +8837,7 @@ rippled book_offers 'USD/rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' 'EUR/rvYAfWj5gh67oV6
|
||||
<h2 id="unsubscribe">unsubscribe</h2>
|
||||
<p><a href="https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Unsubscribe.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>unsubscribe</code> command tells the server to stop sending messages for a particular subscription or set of subscriptions.</p>
|
||||
<h4 id="request-format-28">Request Format</h4>
|
||||
<h4 id="request-format-30">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -8611,7 +8923,7 @@ rippled book_offers 'USD/rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' 'EUR/rvYAfWj5gh67oV6
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="response-format-27">Response Format</h4>
|
||||
<h4 id="response-format-29">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -8624,7 +8936,7 @@ rippled book_offers 'USD/rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' 'EUR/rvYAfWj5gh67oV6
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>The response follows the <a href="#response-formatting">standard format</a>, with a successful result containing no fields.</p>
|
||||
<h4 id="possible-errors-27">Possible Errors</h4>
|
||||
<h4 id="possible-errors-29">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
<li><code>invalidParams</code> - One or more fields are specified incorrectly, or one or more required fields are missing.</li>
|
||||
@@ -8642,7 +8954,7 @@ rippled book_offers 'USD/rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' 'EUR/rvYAfWj5gh67oV6
|
||||
<h2 id="server-info">server_info</h2>
|
||||
<p><a href="https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/ServerInfo.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>server_info</code> command asks the server for a human-readable version of various information about the <code>rippled</code> server being queried.</p>
|
||||
<h4 id="request-format-29">Request Format</h4>
|
||||
<h4 id="request-format-31">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -8666,7 +8978,7 @@ rippled server_info
|
||||
</div>
|
||||
<p><a class="button" href="ripple-api-tool.html#server_info">Try it! ></a></p>
|
||||
<p>The request does not takes any parameters.</p>
|
||||
<h4 id="response-format-28">Response Format</h4>
|
||||
<h4 id="response-format-30">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -8995,14 +9307,14 @@ rippled server_info
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-28">Possible Errors</h4>
|
||||
<h4 id="possible-errors-30">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
</ul>
|
||||
<h2 id="server-state">server_state</h2>
|
||||
<p><a href="https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/ServerState.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>server_state</code> command asks the server for various machine-readable information about the <code>rippled</code> server's current state. The results are very similar to <a href="#server-info"><code>server_info</code></a>, but generally the units are chosen to be easier to process instead of easier to read. (For example, XRP values are given in integer drops instead of scientific notation or decimal values, and time is given in milliseconds instead of seconds.)</p>
|
||||
<h4 id="request-format-30">Request Format</h4>
|
||||
<h4 id="request-format-32">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -9026,7 +9338,7 @@ rippled server_state
|
||||
</div>
|
||||
<p><a class="button" href="ripple-api-tool.html#server_state">Try it! ></a></p>
|
||||
<p>The request does not takes any parameters.</p>
|
||||
<h4 id="response-format-29">Response Format</h4>
|
||||
<h4 id="response-format-31">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -9350,7 +9662,7 @@ rippled server_state
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-29">Possible Errors</h4>
|
||||
<h4 id="possible-errors-31">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
</ul>
|
||||
@@ -9358,7 +9670,7 @@ rippled server_state
|
||||
<p><a href="https://github.com/ripple/rippled/blob/develop/src/ripple/rpc/handlers/CanDelete.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>With <code>online_delete</code> and <code>advisory_delete</code> configuration options enabled, the <code>can_delete</code> method informs the rippled server of the latest ledger which may be deleted.</p>
|
||||
<p><em>The <code>can_delete</code> method is an <a href="#connecting-to-rippled">admin command</a> that cannot be run by unpriviledged users.</em></p>
|
||||
<h4 id="request-format-31">Request Format</h4>
|
||||
<h4 id="request-format-33">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -9420,7 +9732,7 @@ a successful result containing the following fields:</p>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Use this command with no parameter to query the existing <code>can_delete</code> setting.</p>
|
||||
<h4 id="possible-errors-30">Possible Errors</h4>
|
||||
<h4 id="possible-errors-32">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
<li><code>notEnabled</code> - Not enabled in configuration.</li>
|
||||
@@ -9432,7 +9744,7 @@ a successful result containing the following fields:</p>
|
||||
<p><a href="https://github.com/ripple/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/ConsensusInfo.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>consensus_info</code> command provides information about the consensus process for debugging purposes.</p>
|
||||
<p><em>The <code>consensus_info</code> method is an <a href="#connecting-to-rippled">admin command</a> that cannot be run by unpriviledged users.</em></p>
|
||||
<h4 id="request-format-32">Request Format</h4>
|
||||
<h4 id="request-format-34">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -9455,7 +9767,7 @@ rippled consensus_info
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>The request has no parameters.</p>
|
||||
<h4 id="response-format-30">Response Format</h4>
|
||||
<h4 id="response-format-32">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>JSON-RPC</em></p>
|
||||
@@ -9667,7 +9979,7 @@ Connecting to 127.0.0.1:5005
|
||||
</table>
|
||||
<p>It is also normal to get a minimal result where the only field in <code>info</code> is <code>"consensus": "none"</code>. This indicates that the server is in between consensus rounds.</p>
|
||||
<p>The results of the <code>consensus_info</code> command can vary dramatically if you run it several times, even in short succession.</p>
|
||||
<h4 id="possible-errors-31">Possible Errors</h4>
|
||||
<h4 id="possible-errors-33">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
</ul>
|
||||
@@ -9675,7 +9987,7 @@ Connecting to 127.0.0.1:5005
|
||||
<p><a href="https://github.com/ripple/rippled/blob/315a8b6b602798a4cff4d8e1911936011e12abdb/src/ripple/rpc/handlers/FetchInfo.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>fetch_info</code> 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.</p>
|
||||
<p><em>The <code>fetch_info</code> method is an <a href="#connecting-to-rippled">admin command</a> that cannot be run by unpriviledged users.</em></p>
|
||||
<h4 id="request-format-33">Request Format</h4>
|
||||
<h4 id="request-format-35">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -9717,7 +10029,7 @@ rippled fetch_info
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="response-format-31">Response Format</h4>
|
||||
<h4 id="response-format-33">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>JSON-RPC</em></p>
|
||||
@@ -9853,7 +10165,7 @@ Connecting to 127.0.0.1:5005
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-32">Possible Errors</h4>
|
||||
<h4 id="possible-errors-34">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
</ul>
|
||||
@@ -9861,7 +10173,7 @@ Connecting to 127.0.0.1:5005
|
||||
<p><a href="https://github.com/ripple/rippled/blob/c7118a183a660648aa88a3546a6b2c5bce858440/src/ripple/rpc/handlers/GetCounts.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>get_counts</code> command provides various stats about the health of the server, mostly the number of objects of different types that it currently holds in memory.</p>
|
||||
<p><em>The <code>get_counts</code> method is an <a href="#connecting-to-rippled">admin command</a> that cannot be run by unpriviledged users.</em></p>
|
||||
<h4 id="request-format-34">Request Format</h4>
|
||||
<h4 id="request-format-36">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -9903,7 +10215,7 @@ rippled get_counts 100
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="response-format-32">Response Format</h4>
|
||||
<h4 id="response-format-34">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>JSON-RPC</em></p>
|
||||
@@ -10006,7 +10318,7 @@ Connecting to 127.0.0.1:5005
|
||||
</tbody>
|
||||
</table>
|
||||
<p>For most other entries, the value indicates the number of objects of that type currently in memory.</p>
|
||||
<h4 id="possible-errors-33">Possible Errors</h4>
|
||||
<h4 id="possible-errors-35">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
<li><code>invalidParams</code> - One or more fields are specified incorrectly, or one or more required fields are missing.</li>
|
||||
@@ -10015,7 +10327,7 @@ Connecting to 127.0.0.1:5005
|
||||
<p><a href="https://github.com/ripple/rippled/blob/df54b47cd0957a31837493cd69e4d9aade0b5055/src/ripple/rpc/handlers/LedgerCleaner.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>ledger_cleaner</code> command controls the <a href="https://github.com/ripple/rippled/blob/f313caaa73b0ac89e793195dcc2a5001786f916f/src/ripple/app/ledger/README.md#the-ledger-cleaner">Ledger Cleaner</a>, an asynchronous maintenance process that can find and repair corruption in rippled's database of ledgers.</p>
|
||||
<p><em>The <code>ledger_cleaner</code> method is an <a href="#connecting-to-rippled">admin command</a> that cannot be run by unpriviledged users.</em></p>
|
||||
<h4 id="request-format-35">Request Format</h4>
|
||||
<h4 id="request-format-37">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -10074,7 +10386,7 @@ Connecting to 127.0.0.1:5005
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="response-format-33">Response Format</h4>
|
||||
<h4 id="response-format-35">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>JSON-RPC</em></p>
|
||||
@@ -10105,7 +10417,7 @@ Connecting to 127.0.0.1:5005
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-34">Possible Errors</h4>
|
||||
<h4 id="possible-errors-36">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
<li><code>internal</code> if one the parameters was specified in a way that the server couldn't interpret. (This is a bug, and it should return <code>invalidParams</code> instead.)</li>
|
||||
@@ -10114,7 +10426,7 @@ Connecting to 127.0.0.1:5005
|
||||
<p><a href="https://github.com/ripple/rippled/blob/155fcdbcd0b4927152892c8c8be01d9cf62bed68/src/ripple/rpc/handlers/LogLevel.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>log_level</code> command changes the <code>rippled</code> server's logging verbosity, or returns the current logging level for each category (called a <em>partition</em>) of log messages.</p>
|
||||
<p><em>The <code>log_level</code> method is an <a href="#connecting-to-rippled">admin command</a> that cannot be run by unpriviledged users.</em></p>
|
||||
<h4 id="request-format-36">Request Format</h4>
|
||||
<h4 id="request-format-38">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -10152,7 +10464,7 @@ rippled log_level PathRequest debug
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="response-format-34">Response Format</h4>
|
||||
<h4 id="response-format-36">Response Format</h4>
|
||||
<p>Examples of successful responses:</p>
|
||||
<div class="multicode">
|
||||
<p><em>Commandline (set log level)</em></p>
|
||||
@@ -10244,7 +10556,7 @@ Connecting to 127.0.0.1:5005
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-35">Possible Errors</h4>
|
||||
<h4 id="possible-errors-37">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
<li><code>invalidParams</code> - One or more fields are specified incorrectly, or one or more required fields are missing.</li>
|
||||
@@ -10253,7 +10565,7 @@ Connecting to 127.0.0.1:5005
|
||||
<p><a href="https://github.com/ripple/rippled/blob/743bd6c9175c472814448ea889413be79dfd1c07/src/ripple/rpc/handlers/LogRotate.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>logrotate</code> command closes and reopens the log file. This is intended to facilitate log rotation on Linux file systems.</p>
|
||||
<p><em>The <code>logrotate</code> method is an <a href="#connecting-to-rippled">admin command</a> that cannot be run by unpriviledged users.</em></p>
|
||||
<h4 id="request-format-37">Request Format</h4>
|
||||
<h4 id="request-format-39">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -10267,7 +10579,7 @@ Connecting to 127.0.0.1:5005
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>The request includes no parameters.</p>
|
||||
<h4 id="response-format-35">Response Format</h4>
|
||||
<h4 id="response-format-37">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>JSON-RPC</em></p>
|
||||
@@ -10309,7 +10621,7 @@ Connecting to 127.0.0.1:5005
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-36">Possible Errors</h4>
|
||||
<h4 id="possible-errors-38">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
</ul>
|
||||
@@ -10317,7 +10629,7 @@ Connecting to 127.0.0.1:5005
|
||||
<p><a href="https://github.com/ripple/rippled/blob/315a8b6b602798a4cff4d8e1911936011e12abdb/src/ripple/rpc/handlers/ValidationCreate.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>Use the <code>validation_create</code> command to generate the keys for a rippled <a href="tutorial-rippled-setup.html#validator-setup">validating node</a>. Similar to the <a href="#wallet-propose">wallet_propose</a> command, this command makes no real changes, but only generates a set of keys in the proper format.</p>
|
||||
<p><em>The <code>validation_create</code> method is an <a href="#connecting-to-rippled">admin command</a> that cannot be run by unpriviledged users.</em></p>
|
||||
<h4 id="request-format-38">Request Format</h4>
|
||||
<h4 id="request-format-40">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -10360,7 +10672,7 @@ rippled validation_create "BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIR
|
||||
</tbody>
|
||||
</table>
|
||||
<p><strong>Note:</strong> The security of your validator depends on the entropy of your seed. Do not use a secret value that is not sufficiently randomized for real business purposes. We recommend omitting the <code>secret</code> when generating new credentials for the first time.</p>
|
||||
<h4 id="response-format-36">Response Format</h4>
|
||||
<h4 id="response-format-38">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>JSON-RPC</em></p>
|
||||
@@ -10413,7 +10725,7 @@ Connecting to 127.0.0.1:5005
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-37">Possible Errors</h4>
|
||||
<h4 id="possible-errors-39">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
<li><code>badSeed</code> - 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.</li>
|
||||
@@ -10422,7 +10734,7 @@ Connecting to 127.0.0.1:5005
|
||||
<p><a href="https://github.com/ripple/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/ValidationSeed.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>validation_seed</code> 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.</p>
|
||||
<p><em>The <code>validation_seed</code> request is an <a href="#connecting-to-rippled">admin command</a> that cannot be run by unpriviledged users!</em></p>
|
||||
<h4 id="request-format-39">Request Format</h4>
|
||||
<h4 id="request-format-41">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -10454,7 +10766,7 @@ rippled validation_seed 'BAWL MAN JADE MOON DOVE GEM SON NOW HAD ADEN GLOW TIRE'
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="response-format-37">Response Format</h4>
|
||||
<h4 id="response-format-39">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>JSON-RPC</em></p>
|
||||
@@ -10508,7 +10820,7 @@ Connecting to 127.0.0.1:5005
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-38">Possible Errors</h4>
|
||||
<h4 id="possible-errors-40">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
<li><code>badSeed</code> - 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.</li>
|
||||
@@ -10517,7 +10829,7 @@ Connecting to 127.0.0.1:5005
|
||||
<p><a href="https://github.com/ripple/rippled/blob/52f298f150fc1530d201d3140c80d3eaf781cb5f/src/ripple/rpc/handlers/Peers.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>peers</code> command returns a list of all other <code>rippled</code> servers currently connected to this one, including information on their connection and sync status.</p>
|
||||
<p><em>The <code>peers</code> request is an <a href="#connecting-to-rippled">admin command</a> that cannot be run by unpriviledged users!</em></p>
|
||||
<h4 id="request-format-40">Request Format</h4>
|
||||
<h4 id="request-format-42">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -10531,7 +10843,7 @@ Connecting to 127.0.0.1:5005
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>The request includes no additional parameters.</p>
|
||||
<h4 id="response-format-38">Response Format</h4>
|
||||
<h4 id="response-format-40">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -10991,7 +11303,7 @@ Connecting to 127.0.0.1:5005
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-39">Possible Errors</h4>
|
||||
<h4 id="possible-errors-41">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
</ul>
|
||||
@@ -10999,7 +11311,7 @@ Connecting to 127.0.0.1:5005
|
||||
<p><a href="https://github.com/ripple/rippled/blob/315a8b6b602798a4cff4d8e1911936011e12abdb/src/ripple/rpc/handlers/Print.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>print</code> command returns the current status of various internal subsystems, including peers, the ledger cleaner, and the resource manager.</p>
|
||||
<p><em>The <code>print</code> request is an <a href="#connecting-to-rippled">admin command</a> that cannot be run by unpriviledged users!</em></p>
|
||||
<h4 id="request-format-41">Request Format</h4>
|
||||
<h4 id="request-format-43">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -11013,7 +11325,7 @@ Connecting to 127.0.0.1:5005
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>The request includes no parameters.</p>
|
||||
<h4 id="response-format-39">Response Format</h4>
|
||||
<h4 id="response-format-41">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>Commandline</em></p>
|
||||
@@ -11202,7 +11514,7 @@ Connecting to 127.0.0.1:5005
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>The response follows the <a href="#response-formatting">standard format</a>. Additional fields in the result depend on the internal state of the <code>rippled</code> server. The results of this command are subject to change without notice.</p>
|
||||
<h4 id="possible-errors-40">Possible Errors</h4>
|
||||
<h4 id="possible-errors-42">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
</ul>
|
||||
@@ -11211,7 +11523,7 @@ Connecting to 127.0.0.1:5005
|
||||
<h2 id="ping">ping</h2>
|
||||
<p><a href="https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Ping.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>ping</code> command returns an acknowledgement, so that clients can test the connection status and latency.</p>
|
||||
<h4 id="request-format-42">Request Format</h4>
|
||||
<h4 id="request-format-44">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -11235,7 +11547,7 @@ rippled ping
|
||||
</div>
|
||||
<p><a class="button" href="ripple-api-tool.html#ping">Try it! ></a></p>
|
||||
<p>The request includes no parameters.</p>
|
||||
<h4 id="response-format-40">Response Format</h4>
|
||||
<h4 id="response-format-42">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -11256,14 +11568,14 @@ rippled ping
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>The response follows the <a href="#response-formatting">standard format</a>, with a successful result containing no fields. The client can measure the round-trip time from request to response as latency.</p>
|
||||
<h4 id="possible-errors-41">Possible Errors</h4>
|
||||
<h4 id="possible-errors-43">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
</ul>
|
||||
<h2 id="random">random</h2>
|
||||
<p><a href="https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/Random.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>random</code> command provides a random number to be used as a source of entropy for random number generation by clients.</p>
|
||||
<h4 id="request-format-43">Request Format</h4>
|
||||
<h4 id="request-format-45">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -11286,7 +11598,7 @@ rippled random
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>The request includes no parameters.</p>
|
||||
<h4 id="response-format-41">Response Format</h4>
|
||||
<h4 id="response-format-43">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -11326,14 +11638,14 @@ rippled random
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-42">Possible Errors</h4>
|
||||
<h4 id="possible-errors-44">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
<li><code>internal</code> - Some internal error occurred, possibly relating to the random number generator.</li>
|
||||
</ul>
|
||||
<h2 id="json">json</h2>
|
||||
<p>The <code>json</code> method is a proxy to running other commands, and accepts the parameters for the command as a JSON value. It is <em>exclusive to the Commandline client</em>, and intended for cases where the commandline syntax for specifying parameters is inadequate or undesirable.</p>
|
||||
<h4 id="request-format-44">Request Format</h4>
|
||||
<h4 id="request-format-46">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>Commandline</em></p>
|
||||
@@ -11341,7 +11653,7 @@ rippled random
|
||||
rippled -q json ledger_closed '{}'
|
||||
</code></pre>
|
||||
</div>
|
||||
<h4 id="response-format-42">Response Format</h4>
|
||||
<h4 id="response-format-44">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -11359,7 +11671,7 @@ rippled -q json ledger_closed '{}'
|
||||
<p><a href="https://github.com/ripple/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/Connect.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>The <code>connect</code> command forces the rippled server to connect to a specific peer rippled server.</p>
|
||||
<p><em>The <code>connect</code> request is an <a href="#connecting-to-rippled">admin command</a> that cannot be run by unpriviledged users!</em></p>
|
||||
<h4 id="request-format-45">Request Format</h4>
|
||||
<h4 id="request-format-47">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -11407,7 +11719,7 @@ rippled connect 192.170.145.88 51235
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="response-format-43">Response Format</h4>
|
||||
<h4 id="response-format-45">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>JSON-RPC</em></p>
|
||||
@@ -11447,7 +11759,7 @@ Connecting to 127.0.0.1:5005
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-43">Possible Errors</h4>
|
||||
<h4 id="possible-errors-45">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
<li><code>invalidParams</code> - One or more fields are specified incorrectly, or one or more required fields are missing.</li>
|
||||
@@ -11457,7 +11769,7 @@ Connecting to 127.0.0.1:5005
|
||||
<p><a href="https://github.com/ripple/rippled/blob/develop/src/ripple/rpc/handlers/Stop.cpp" title="Source">[Source]<br/></a></p>
|
||||
<p>Gracefully shuts down the server.</p>
|
||||
<p><em>The <code>stop</code> request is an <a href="#connecting-to-rippled">admin command</a> that cannot be run by unpriviledged users!</em></p>
|
||||
<h4 id="request-format-46">Request Format</h4>
|
||||
<h4 id="request-format-48">Request Format</h4>
|
||||
<p>An example of the request format:</p>
|
||||
<div class="multicode">
|
||||
<p><em>WebSocket</em></p>
|
||||
@@ -11479,7 +11791,7 @@ Connecting to 127.0.0.1:5005
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>The request includes no parameters.</p>
|
||||
<h4 id="response-format-44">Response Format</h4>
|
||||
<h4 id="response-format-46">Response Format</h4>
|
||||
<p>An example of a successful response:</p>
|
||||
<div class="multicode">
|
||||
<p><em>JSON-RPC</em></p>
|
||||
@@ -11518,7 +11830,7 @@ Connecting to 127.0.0.1:5005
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h4 id="possible-errors-44">Possible Errors</h4>
|
||||
<h4 id="possible-errors-46">Possible Errors</h4>
|
||||
<ul>
|
||||
<li>Any of the <a href="#universal-errors">universal error types</a>.</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user