mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 03:35:51 +00:00
Compare commits
12 Commits
fix_src_li
...
issue-mpto
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eec9c977fa | ||
|
|
003927517f | ||
|
|
9c8c231900 | ||
|
|
01ed3055ec | ||
|
|
eb174b8700 | ||
|
|
9e96d40799 | ||
|
|
d6b55ab177 | ||
|
|
d8b216bdd7 | ||
|
|
1e095599fd | ||
|
|
904761dc51 | ||
|
|
b2f345edd5 | ||
|
|
9e40756dd1 |
@@ -1,6 +1,6 @@
|
||||
// @ts-check
|
||||
|
||||
import { getInnerText } from '@redocly/realm/dist/shared/markdoc.js';
|
||||
import { getInnerText } from '@redocly/realm/dist/server/plugins/markdown/markdoc/helpers/get-inner-text.js';
|
||||
|
||||
import { dirname, relative, join as joinPath } from 'path';
|
||||
import markdoc from '@markdoc/markdoc';
|
||||
@@ -47,6 +47,7 @@ export function blogPosts() {
|
||||
actions.createSharedData('blog-posts', { blogPosts: sortedPosts });
|
||||
actions.addRouteSharedData('/blog/', 'blog-posts', 'blog-posts');
|
||||
actions.addRouteSharedData('/ja/blog/', 'blog-posts', 'blog-posts');
|
||||
actions.addRouteSharedData('/es-es/blog/', 'blog-posts', 'blog-posts');
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// @ts-check
|
||||
|
||||
import { getInnerText } from '@redocly/realm/dist/shared/markdoc.js';
|
||||
import { getInnerText } from '@redocly/realm/dist/server/plugins/markdown/markdoc/helpers/get-inner-text.js';
|
||||
|
||||
import { dirname, relative, join as joinPath } from 'path';
|
||||
|
||||
@@ -44,6 +44,7 @@ export function codeSamples() {
|
||||
});
|
||||
actions.addRouteSharedData('/resources/code-samples/', 'code-samples', 'code-samples');
|
||||
actions.addRouteSharedData('/ja/resources/code-samples/', 'code-samples', 'code-samples');
|
||||
actions.addRouteSharedData('/es-es/resources/code-samples/', 'code-samples', 'code-samples');
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
62
_code-samples/get-started/py/README.md
Normal file
62
_code-samples/get-started/py/README.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# Get Started Using Python Library
|
||||
|
||||
Connects to the XRP Ledger and gets account information using Python.
|
||||
|
||||
To download the source code, see [Get Started Using Python Library](http://xrpl.org/docs/tutorials/python/build-apps/get-started).
|
||||
|
||||
## Run the Code
|
||||
|
||||
Quick setup and usage:
|
||||
|
||||
```sh
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
python ./get-acct-info.py
|
||||
```
|
||||
|
||||
You should see output similar to the following:
|
||||
|
||||
```sh
|
||||
Creating a new wallet and funding it with Testnet XRP...
|
||||
Attempting to fund address ravbHNootpSNQkxyEFCWevSkHsFGDHfyop
|
||||
Faucet fund successful.
|
||||
Wallet: ravbHNootpSNQkxyEFCWevSkHsFGDHfyop
|
||||
Account Testnet Explorer URL:
|
||||
https://testnet.xrpl.org/accounts/ravbHNootpSNQkxyEFCWevSkHsFGDHfyop
|
||||
|
||||
Getting account info...
|
||||
Response Status: ResponseStatus.SUCCESS
|
||||
{
|
||||
"account_data": {
|
||||
"Account": "ravbHNootpSNQkxyEFCWevSkHsFGDHfyop",
|
||||
"Balance": "100000000",
|
||||
"Flags": 0,
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"OwnerCount": 0,
|
||||
"PreviousTxnID": "3DACF2438AD39F294C4EFF6132D5D88BCB65D2F2261C7650F40AC1F6A54C83EA",
|
||||
"PreviousTxnLgrSeq": 12039759,
|
||||
"Sequence": 12039759,
|
||||
"index": "148E6F4B8E4C14018D679A2526200C292BDBC5AB77611BC3AE0CB97CD2FB84E5"
|
||||
},
|
||||
"account_flags": {
|
||||
"allowTrustLineClawback": false,
|
||||
"defaultRipple": false,
|
||||
"depositAuth": false,
|
||||
"disableMasterKey": false,
|
||||
"disallowIncomingCheck": false,
|
||||
"disallowIncomingNFTokenOffer": false,
|
||||
"disallowIncomingPayChan": false,
|
||||
"disallowIncomingTrustline": false,
|
||||
"disallowIncomingXRP": false,
|
||||
"globalFreeze": false,
|
||||
"noFreeze": false,
|
||||
"passwordSpent": false,
|
||||
"requireAuthorization": false,
|
||||
"requireDestinationTag": false
|
||||
},
|
||||
"ledger_hash": "CA624D717C4FCDD03BAD8C193F374A77A14F7D2566354A4E9617A8DAD896DE71",
|
||||
"ledger_index": 12039759,
|
||||
"validated": true
|
||||
}
|
||||
```
|
||||
@@ -1,34 +1,39 @@
|
||||
# @chunk {"steps": ["connect-tag"]}
|
||||
# Define the network client
|
||||
from xrpl.clients import JsonRpcClient
|
||||
from xrpl.wallet import generate_faucet_wallet
|
||||
from xrpl.core import addresscodec
|
||||
from xrpl.models.requests.account_info import AccountInfo
|
||||
import json
|
||||
|
||||
JSON_RPC_URL = "https://s.altnet.rippletest.net:51234/"
|
||||
client = JsonRpcClient(JSON_RPC_URL)
|
||||
# @chunk-end
|
||||
|
||||
|
||||
# Create a wallet using the testnet faucet:
|
||||
# @chunk {"steps": ["get-account-create-wallet-tag"]}
|
||||
# Create a wallet using the Testnet faucet:
|
||||
# https://xrpl.org/xrp-testnet-faucet.html
|
||||
from xrpl.wallet import generate_faucet_wallet
|
||||
print("\nCreating a new wallet and funding it with Testnet XRP...")
|
||||
test_wallet = generate_faucet_wallet(client, debug=True)
|
||||
|
||||
# Create an account str from the wallet
|
||||
test_account = test_wallet.address
|
||||
|
||||
# Derive an x-address from the classic address:
|
||||
# https://xrpaddress.info/
|
||||
from xrpl.core import addresscodec
|
||||
test_xaddress = addresscodec.classic_address_to_xaddress(test_account, tag=12345, is_test_network=True)
|
||||
print("\nClassic address:\n\n", test_account)
|
||||
print("X-address:\n\n", test_xaddress)
|
||||
test_account = test_wallet.classic_address
|
||||
print(f"Wallet: {test_account}")
|
||||
print(f"Account Testnet Explorer URL: ")
|
||||
print(f" https://testnet.xrpl.org/accounts/{test_account}")
|
||||
# @chunk-end
|
||||
|
||||
|
||||
# @chunk {"steps": ["query-xrpl-tag"]}
|
||||
# Look up info about your account
|
||||
from xrpl.models.requests.account_info import AccountInfo
|
||||
print("\nGetting account info...")
|
||||
acct_info = AccountInfo(
|
||||
account=test_account,
|
||||
ledger_index="validated",
|
||||
strict=True,
|
||||
)
|
||||
|
||||
response = client.request(acct_info)
|
||||
result = response.result
|
||||
print("response.status: ", response.status)
|
||||
import json
|
||||
print("Response Status: ", response.status)
|
||||
print(json.dumps(response.result, indent=4, sort_keys=True))
|
||||
# @chunk-end
|
||||
|
||||
1
_code-samples/get-started/py/requirements.txt
Normal file
1
_code-samples/get-started/py/requirements.txt
Normal file
@@ -0,0 +1 @@
|
||||
xrpl-py==4.3.0
|
||||
@@ -1,35 +1,40 @@
|
||||
import { stringToHex, hexToString } from '@xrplf/isomorphic/dist/utils/index.js'
|
||||
import { MPTokenIssuanceCreateFlags, Client } from 'xrpl'
|
||||
import {
|
||||
MPTokenIssuanceCreateFlags,
|
||||
Client,
|
||||
encodeMPTokenMetadata,
|
||||
decodeMPTokenMetadata
|
||||
} from 'xrpl'
|
||||
|
||||
// Connect to network and get a wallet
|
||||
const client = new Client('wss://s.devnet.rippletest.net:51233')
|
||||
await client.connect()
|
||||
|
||||
console.log('Funding new wallet from faucet...')
|
||||
const { wallet } = await client.fundWallet()
|
||||
console.log('=== Funding new wallet from faucet...===')
|
||||
const { wallet: issuer } = await client.fundWallet()
|
||||
console.log(`Issuer address: ${issuer.address}`)
|
||||
|
||||
// Define metadata as JSON
|
||||
const mpt_metadata = {
|
||||
t: 'TBILL',
|
||||
n: 'T-Bill Yield Token',
|
||||
d: 'A yield-bearing stablecoin backed by short-term U.S. Treasuries and money market instruments.',
|
||||
i: 'https://example.org/tbill-icon.png',
|
||||
ac: 'rwa',
|
||||
as: 'treasury',
|
||||
in: 'Example Yield Co.',
|
||||
us: [
|
||||
ticker: 'TBILL',
|
||||
name: 'T-Bill Yield Token',
|
||||
desc: 'A yield-bearing stablecoin backed by short-term U.S. Treasuries and money market instruments.',
|
||||
icon: 'https://example.org/tbill-icon.png',
|
||||
asset_class: 'rwa',
|
||||
asset_subclass: 'treasury',
|
||||
issuer_name: 'Example Yield Co.',
|
||||
uris: [
|
||||
{
|
||||
u: 'https://exampleyield.co/tbill',
|
||||
c: 'website',
|
||||
t: 'Product Page'
|
||||
uri: 'https://exampleyield.co/tbill',
|
||||
category: 'website',
|
||||
title: 'Product Page'
|
||||
},
|
||||
{
|
||||
u: 'https://exampleyield.co/docs',
|
||||
c: 'docs',
|
||||
t: 'Yield Token Docs'
|
||||
uri: 'https://exampleyield.co/docs',
|
||||
category: 'docs',
|
||||
title: 'Yield Token Docs'
|
||||
}
|
||||
],
|
||||
ai: {
|
||||
additional_info: {
|
||||
interest_rate: '5.00%',
|
||||
interest_type: 'variable',
|
||||
yield_source: 'U.S. Treasury Bills',
|
||||
@@ -38,8 +43,13 @@ const mpt_metadata = {
|
||||
}
|
||||
}
|
||||
|
||||
// Convert JSON to a string (without excess whitespace), then string to hex
|
||||
const mpt_metadata_hex = stringToHex(JSON.stringify(mpt_metadata))
|
||||
// Encode the metadata.
|
||||
// The encodeMPTokenMetadata function converts the JSON metadata object into
|
||||
// a compact, hex-encoded string, following the XLS-89 standard.
|
||||
// https://xls.xrpl.org/xls/XLS-0089-multi-purpose-token-metadata-schema.html
|
||||
console.log('\n=== Encoding metadata...===')
|
||||
const mpt_metadata_hex = encodeMPTokenMetadata(mpt_metadata)
|
||||
console.log("Encoded mpt_metadata_hex:", mpt_metadata_hex)
|
||||
|
||||
// Define the transaction, including other MPT parameters
|
||||
const mpt_issuance_create = {
|
||||
@@ -54,32 +64,40 @@ const mpt_issuance_create = {
|
||||
}
|
||||
|
||||
// Prepare, sign, and submit the transaction
|
||||
console.log('Sending MPTokenIssuanceCreate transaction...')
|
||||
const submit_response = await client.submitAndWait(mpt_issuance_create, { wallet, autofill: true })
|
||||
console.log('\n=== Sending MPTokenIssuanceCreate transaction...===')
|
||||
const submit_response = await client.submitAndWait(mpt_issuance_create,
|
||||
{ wallet, autofill: true }
|
||||
)
|
||||
|
||||
// Check transaction results and disconnect
|
||||
console.log(JSON.stringify(submit_response, null, 2))
|
||||
// Check transaction results
|
||||
console.log('\n=== Checking MPTokenIssuanceCreate results...===')
|
||||
// console.log(JSON.stringify(submit_response, null, 2))
|
||||
if (submit_response.result.meta.TransactionResult !== 'tesSUCCESS') {
|
||||
const result_code = response.result.meta.TransactionResult
|
||||
const result_code = submit_response.result.meta.TransactionResult
|
||||
console.warn(`Transaction failed with result code ${result_code}.`)
|
||||
await client.disconnect()
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const issuance_id = submit_response.result.meta.mpt_issuance_id
|
||||
console.log(`MPToken created successfully with issuance ID ${issuance_id}.`)
|
||||
console.log(`- MPToken created successfully with issuance ID: ${issuance_id}`)
|
||||
// View the MPT issuance on the XRPL Explorer
|
||||
console.log(`\n- Explorer URL: https://devnet.xrpl.org/mpt/${issuance_id}`)
|
||||
|
||||
// Look up MPT Issuance entry in the validated ledger
|
||||
console.log('Confirming MPT Issuance metadata in the validated ledger.')
|
||||
console.log('\n=== Confirming MPT Issuance metadata in the validated ledger... ===')
|
||||
const ledger_entry_response = await client.request({
|
||||
"command": "ledger_entry",
|
||||
"mpt_issuance": issuance_id,
|
||||
"ledger_index": "validated"
|
||||
})
|
||||
|
||||
// Decode the metadata
|
||||
// Decode the metadata.
|
||||
// The decodeMPTokenMetadata function takes a hex-encoded string representing MPT metadata,
|
||||
// decodes it to a JSON object, and expands any compact field names to their full forms.
|
||||
const metadata_blob = ledger_entry_response.result.node.MPTokenMetadata
|
||||
const decoded_metadata = JSON.parse(hexToString(metadata_blob))
|
||||
console.log('Decoded metadata:', decoded_metadata)
|
||||
|
||||
const decoded_metadata = decodeMPTokenMetadata(metadata_blob)
|
||||
console.log('Decoded MPT metadata: ', decoded_metadata)
|
||||
|
||||
// Disconnect from the client
|
||||
client.disconnect()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"xrpl": "^4.4.0"
|
||||
"xrpl": "^4.4.3"
|
||||
},
|
||||
"type": "module"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
xrpl-py==4.3.0
|
||||
xrpl-py==4.4.3
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
---
|
||||
html: validation_create.html
|
||||
parent: key-generation-methods.html
|
||||
seo:
|
||||
description: Generate keys for a rippled server to identify itself to the network.
|
||||
labels:
|
||||
- Security
|
||||
- Core Server
|
||||
- Security
|
||||
- Core Server
|
||||
---
|
||||
# validation_create
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/ValidationCreate.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/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](../../../../concepts/networks-and-servers/peer-protocol.md#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.
|
||||
|
||||
@@ -14,7 +16,7 @@ _The `validation_create` method is an [admin method](../index.md) that cannot be
|
||||
|
||||
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](../../../../concepts/networks-and-servers/peer-protocol.md#node-key-pair)).
|
||||
|
||||
{% admonition type="success" name="Tip" %}For configuring a robust validator, you should use the `validator-keys` tool (included in the `rippled` package build) to generate validator tokens (which can be rotated) with an offline master key. For more information, see [Validator Setup](../../../../infrastructure/configuration/server-modes/run-rippled-as-a-validator.md#3-enable-validation-on-your-rippled-server).{% /admonition %}
|
||||
{% admonition type="success" name="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](../../../../infrastructure/configuration/server-modes/run-rippled-as-a-validator.md#3-enable-validation-on-your-rippled-server).{% /admonition %}
|
||||
|
||||
|
||||
### Request Format
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
---
|
||||
html: wallet_propose.html
|
||||
parent: key-generation-methods.html
|
||||
seo:
|
||||
description: Generate keys for a new account.
|
||||
labels:
|
||||
- Security
|
||||
- Accounts
|
||||
- Security
|
||||
- Accounts
|
||||
---
|
||||
# wallet_propose
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/WalletPropose.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/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 account in the ledger, the address must [receive a Payment transaction](../../../../concepts/accounts/index.md#creating-accounts) that provides enough XRP to meet the [reserve requirement](../../../../concepts/accounts/reserves.md).
|
||||
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](../../../../concepts/accounts/index.md#creating-accounts) that provides enough XRP to meet the [reserve requirement](../../../../concepts/accounts/reserves.md).
|
||||
|
||||
*The `wallet_propose` method is an [admin method](../index.md) 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.)
|
||||
|
||||
{% badge href="https://github.com/XRPLF/rippled/releases/tag/0.31.0" %}Updated in: rippled 0.31.0{% /badge %}
|
||||
|
||||
### Request Format
|
||||
|
||||
An example of the request format:
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: can_delete.html
|
||||
parent: logging-and-data-management-methods.html
|
||||
seo:
|
||||
description: Allow online deletion of ledgers up to a specific ledger.
|
||||
labels:
|
||||
- Data Retention
|
||||
- Data Retention
|
||||
---
|
||||
# can_delete
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/CanDelete.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/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](../../../../infrastructure/configuration/data-retention/online-deletion.md#advisory-deletion). If advisory deletion is not enabled, this method does nothing.
|
||||
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
---
|
||||
html: ledger_cleaner.html
|
||||
parent: logging-and-data-management-methods.html
|
||||
seo:
|
||||
description: Configure the ledger cleaner service to check for corrupted data.
|
||||
labels:
|
||||
- Data Retention
|
||||
- Data Retention
|
||||
---
|
||||
# ledger_cleaner
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/LedgerCleanerHandler.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/df54b47cd0957a31837493cd69e4d9aade0b5055/src/ripple/rpc/handlers/LedgerCleaner.cpp "Source")
|
||||
|
||||
The `ledger_cleaner` command controls the [Ledger Cleaner](https://github.com/XRPLF/rippled/tree/master/src/xrpld/app/ledger#the-ledger-cleaner), an asynchronous maintenance process that can find and repair corruption in `rippled`'s database of ledgers.
|
||||
The `ledger_cleaner` command controls the [Ledger Cleaner](https://github.com/XRPLF/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](../index.md) that cannot be run by unprivileged users._
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: ledger_request.html
|
||||
parent: logging-and-data-management-methods.html
|
||||
seo:
|
||||
description: Query peer servers for a specific ledger version.
|
||||
labels:
|
||||
- Data Retention
|
||||
- Data Retention
|
||||
---
|
||||
# ledger_request
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/LedgerRequest.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/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.
|
||||
|
||||
@@ -59,7 +61,7 @@ Loading: "/etc/rippled.cfg"
|
||||
Connecting to 127.0.0.1:5005
|
||||
|
||||
{
|
||||
"result" : {
|
||||
"result" : {
|
||||
"acquiring" : {
|
||||
"hash" : "01DDD89B6605E20338B8EEB8EB2B0E0DD2F685A2B164F3790C4D634B5734CC26",
|
||||
"have_header" : false,
|
||||
@@ -74,7 +76,7 @@ Connecting to 127.0.0.1:5005
|
||||
"ledger_index" : 18851277
|
||||
},
|
||||
"status" : "error"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
@@ -85,43 +87,43 @@ 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
|
||||
}
|
||||
"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
|
||||
}
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
@@ -132,26 +134,26 @@ 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"
|
||||
}
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: log_level.html
|
||||
parent: logging-and-data-management-methods.html
|
||||
seo:
|
||||
description: Get or modify log verbosity.
|
||||
description: Get or modify log verbosity.
|
||||
labels:
|
||||
- Data Retention
|
||||
- Data Retention
|
||||
---
|
||||
# log_level
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/LogLevel.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/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.
|
||||
|
||||
@@ -19,10 +21,10 @@ An example of the request format:
|
||||
{% tab label="WebSocket" %}
|
||||
```json
|
||||
{
|
||||
"id": "ll1",
|
||||
"command": "log_level",
|
||||
"severity": "debug",
|
||||
"partition": "PathRequest"
|
||||
"id": "ll1",
|
||||
"command": "log_level",
|
||||
"severity": "debug",
|
||||
"partition": "PathRequest"
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: logrotate.html
|
||||
parent: logging-and-data-management-methods.html
|
||||
seo:
|
||||
description: Reopen the log file.
|
||||
description: Reopen the log file.
|
||||
labels:
|
||||
- Data Retention
|
||||
- Data Retention
|
||||
---
|
||||
# logrotate
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/LogRotate.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/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.
|
||||
|
||||
@@ -47,8 +49,8 @@ An example of the request format:
|
||||
{% tab label="WebSocket" %}
|
||||
```json
|
||||
{
|
||||
"id": "lr1",
|
||||
"command": "logrotate"
|
||||
"id": "lr1",
|
||||
"command": "logrotate"
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
---
|
||||
html: connect.html
|
||||
parent: peer-management-methods.html
|
||||
seo:
|
||||
description: Force the rippled server to connect to a specific peer.
|
||||
labels:
|
||||
- Core Server
|
||||
- Core Server
|
||||
---
|
||||
# connect
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/Connect.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/Connect.cpp "Source")
|
||||
|
||||
The `connect` command forces the `rippled` server to connect to a specific peer server.
|
||||
The `connect` command forces the `rippled` server to connect to a specific peer `rippled` server.
|
||||
|
||||
*The `connect` method is an [admin method](../index.md) that cannot be run by unprivileged users!*
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: peer_reservations_add.html
|
||||
parent: peer-management-methods.html
|
||||
seo:
|
||||
description: Add a reserved slot for a specific peer server.
|
||||
labels:
|
||||
- Core Server
|
||||
- Core Server
|
||||
---
|
||||
# peer_reservations_add
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/Reservations.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L36 "Source")
|
||||
|
||||
The {% code-page-name /%} method adds or updates a reserved slot for a specific peer server in the XRP Ledger [peer-to-peer network](../../../../concepts/networks-and-servers/peer-protocol.md).
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: peer_reservations_del.html
|
||||
parent: peer-management-methods.html
|
||||
seo:
|
||||
description: Remove a reserved slot for a specific peer server.
|
||||
labels:
|
||||
- Core Server
|
||||
- Core Server
|
||||
---
|
||||
# peer_reservations_del
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/Reservations.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L89 "Source")
|
||||
|
||||
The {% code-page-name /%} method removes a specific [peer reservation][], if one exists.
|
||||
|
||||
@@ -81,13 +83,13 @@ An example of a successful response:
|
||||
{% tab label="JSON-RPC" %}
|
||||
```json
|
||||
{
|
||||
"result" : {
|
||||
"previous" : {
|
||||
"description" : "Ripple s1 server 'WOOL'",
|
||||
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
|
||||
},
|
||||
"status" : "success"
|
||||
}
|
||||
"result" : {
|
||||
"previous" : {
|
||||
"description" : "Ripple s1 server 'WOOL'",
|
||||
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
|
||||
},
|
||||
"status" : "success"
|
||||
}
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
@@ -98,13 +100,13 @@ Loading: "/etc/rippled.cfg"
|
||||
Connecting to 127.0.0.1:5005
|
||||
|
||||
{
|
||||
"result" : {
|
||||
"previous" : {
|
||||
"description" : "Ripple s1 server 'WOOL'",
|
||||
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
|
||||
},
|
||||
"status" : "success"
|
||||
}
|
||||
"result" : {
|
||||
"previous" : {
|
||||
"description" : "Ripple s1 server 'WOOL'",
|
||||
"node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
|
||||
},
|
||||
"status" : "success"
|
||||
}
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: peer_reservations_list.html
|
||||
parent: peer-management-methods.html
|
||||
seo:
|
||||
description: List reserved slots for specific peer servers.
|
||||
labels:
|
||||
- Core Server
|
||||
- Core Server
|
||||
---
|
||||
# peer_reservations_list
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/Reservations.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/4a1148eb2849513dd1e7ae080288fd47ab57a376/src/ripple/rpc/handlers/Reservations.cpp#L116 "Source")
|
||||
|
||||
The {% code-page-name /%} method lists [peer reservations][].
|
||||
|
||||
@@ -30,7 +32,7 @@ An example of the request format:
|
||||
{% tab label="JSON-RPC" %}
|
||||
```json
|
||||
{
|
||||
"method": "{% $frontmatter.seo.title %}"
|
||||
"method": "{% $frontmatter.seo.title %}"
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: peers.html
|
||||
parent: peer-management-methods.html
|
||||
seo:
|
||||
description: Get information about the peer servers connected.
|
||||
labels:
|
||||
- Core Server
|
||||
- Core Server
|
||||
---
|
||||
# peers
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/Peers.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/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](../../../../concepts/networks-and-servers/peer-protocol.md), including information on their connection and sync status.
|
||||
|
||||
@@ -181,90 +183,90 @@ An example of a successful response:
|
||||
{% tab label="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"
|
||||
}
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
@@ -276,90 +278,90 @@ 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"
|
||||
}
|
||||
"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"
|
||||
}
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: ledger_accept.html
|
||||
parent: server-control-methods.html
|
||||
seo:
|
||||
description: Close and advance the ledger in stand-alone mode.
|
||||
labels:
|
||||
- Core Server
|
||||
- Core Server
|
||||
---
|
||||
# ledger_accept
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/LedgerAccept.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/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.
|
||||
|
||||
@@ -20,8 +22,8 @@ An example of the request format:
|
||||
{% tab label="WebSocket" %}
|
||||
```json
|
||||
{
|
||||
"id": "Accept my ledger!",
|
||||
"command": "ledger_accept"
|
||||
"id": "Accept my ledger!",
|
||||
"command": "ledger_accept"
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: stop.html
|
||||
parent: server-control-methods.html
|
||||
seo:
|
||||
description: Shut down the rippled server.
|
||||
labels:
|
||||
- Core Server
|
||||
- Core Server
|
||||
---
|
||||
# stop
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/Stop.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/Stop.cpp "Source")
|
||||
|
||||
Gracefully shuts down the server.
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: sign.html # watch for clashes w/ this filename
|
||||
parent: signing-methods.html
|
||||
seo:
|
||||
description: Cryptographically sign a transaction.
|
||||
labels:
|
||||
- Transaction Sending
|
||||
- Transaction Sending
|
||||
---
|
||||
# sign
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/SignHandler.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/SignHandler.cpp "Source")
|
||||
|
||||
The `sign` method takes a [transaction in JSON format](../../../protocol/transactions/index.md) and a [seed value](../../../../concepts/accounts/cryptographic-keys.md), and returns a signed binary representation of the transaction. To contribute one signature to a [multi-signed transaction](../../../../concepts/accounts/multi-signing.md), use the [sign_for method][] instead.
|
||||
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
---
|
||||
html: sign_for.html
|
||||
parent: signing-methods.html
|
||||
seo:
|
||||
description: Contribute to a multi-signature.
|
||||
labels:
|
||||
- Transaction Sending
|
||||
- Transaction Sending
|
||||
---
|
||||
# sign_for
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/SignFor.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/release/src/ripple/rpc/handlers/SignFor.cpp "Source")
|
||||
|
||||
The `sign_for` command provides one signature for a [multi-signed transaction](../../../../concepts/accounts/multi-signing.md).
|
||||
|
||||
{% partial file="/docs/_snippets/public-signing-note.md" /%}
|
||||
|
||||
|
||||
This command requires the [MultiSign amendment][] to be enabled.
|
||||
|
||||
## Request Format
|
||||
An example of the request format:
|
||||
|
||||
@@ -152,33 +157,33 @@ An example of a successful response:
|
||||
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"
|
||||
}
|
||||
}
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
@@ -189,33 +194,33 @@ 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"
|
||||
}
|
||||
}
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
---
|
||||
html: consensus_info.html
|
||||
parent: status-and-debugging-methods.html
|
||||
seo:
|
||||
description: Get information about the state of consensus as it happens.
|
||||
description: Get information about the state of consensus as it happens.
|
||||
labels:
|
||||
- Blockchain
|
||||
- Core Server
|
||||
- Blockchain
|
||||
- Core Server
|
||||
---
|
||||
# consensus_info
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/ConsensusInfo.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/ConsensusInfo.cpp "Source")
|
||||
|
||||
The `consensus_info` command provides information about the [consensus process](../../../../concepts/consensus-protocol/index.md) for debugging purposes.
|
||||
|
||||
@@ -57,74 +59,74 @@ An example of a successful response:
|
||||
{% tab label="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"
|
||||
}
|
||||
"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"
|
||||
}
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
@@ -135,74 +137,74 @@ 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"
|
||||
}
|
||||
"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"
|
||||
}
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
---
|
||||
html: feature.html
|
||||
parent: status-and-debugging-methods.html
|
||||
seo:
|
||||
description: Get information about protocol amendments.
|
||||
labels:
|
||||
- Blockchain
|
||||
- Core Server
|
||||
- Blockchain
|
||||
- Core Server
|
||||
---
|
||||
# feature
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/Feature1.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/Feature1.cpp "Source")
|
||||
|
||||
The `feature` command returns information about [amendments](../../../../concepts/networks-and-servers/amendments.md) this server knows about, including whether they are enabled and whether the server is voting in favor of those amendments in the [amendment process](../../../../concepts/networks-and-servers/amendments.md#amendment-process).
|
||||
|
||||
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.
|
||||
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. {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.7.0" %}Updated in: rippled 1.7.0{% /badge %}
|
||||
|
||||
_The `feature` method documented on this page is an [admin method](../index.md). For the non-admin version, see the [`feature` public API method](../../public-api-methods/server-info-methods/feature.md)._
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: fetch_info.html
|
||||
parent: status-and-debugging-methods.html
|
||||
seo:
|
||||
description: Get information about the server's sync with the network.
|
||||
labels:
|
||||
- Core Server
|
||||
- Core Server
|
||||
---
|
||||
# fetch_info
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/FetchInfo.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/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.
|
||||
|
||||
@@ -63,37 +65,37 @@ An example of a successful response:
|
||||
{% tab label="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"
|
||||
}
|
||||
"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"
|
||||
}
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
@@ -104,37 +106,37 @@ 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"
|
||||
}
|
||||
"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"
|
||||
}
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: get_counts.html
|
||||
parent: status-and-debugging-methods.html
|
||||
seo:
|
||||
description: Get statistics about the server's internals and memory usage.
|
||||
labels:
|
||||
- Core Server
|
||||
- Core Server
|
||||
---
|
||||
# get_counts
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/GetCounts.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/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.
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: print.html
|
||||
parent: status-and-debugging-methods.html
|
||||
seo:
|
||||
description: Get information about internal subsystems.
|
||||
labels:
|
||||
- Core Server
|
||||
- Core Server
|
||||
---
|
||||
# print
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/Print.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/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.
|
||||
|
||||
@@ -47,183 +49,183 @@ 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"
|
||||
}
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
---
|
||||
html: validator_info.html
|
||||
parent: status-and-debugging-methods.html
|
||||
seo:
|
||||
description: Get the server's validation settings, if configured as a validator.
|
||||
labels:
|
||||
- Core Server
|
||||
- Blockchain
|
||||
- コアサーバ
|
||||
- ブロックチェーン
|
||||
---
|
||||
# validator_info
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/ValidatorInfo.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/ValidatorInfo.cpp "Source")
|
||||
|
||||
The {% code-page-name /%} method returns the current validator settings of the server, if it is configured as a validator.
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
---
|
||||
html: validator_list_sites.html
|
||||
parent: status-and-debugging-methods.html
|
||||
seo:
|
||||
description: Get information about sites that publish validator lists.
|
||||
labels:
|
||||
- Core Server
|
||||
- Blockchain
|
||||
- Core Server
|
||||
- Blockchain
|
||||
---
|
||||
# validator_list_sites
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/ValidatorListSites.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/ValidatorListSites.cpp "Source")
|
||||
|
||||
The `validator_list_sites` command returns status information of sites serving validator lists.
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
---
|
||||
html: validators.html
|
||||
parent: status-and-debugging-methods.html
|
||||
seo:
|
||||
description: Get information about the current validators.
|
||||
labels:
|
||||
- Core Server
|
||||
- Blockchain
|
||||
- Core Server
|
||||
- Blockchain
|
||||
---
|
||||
# validators
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/Validators.cpp "Source")
|
||||
[[Source]](https://github.com/XRPLF/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](../../../../concepts/consensus-protocol/index.md#trust-based-validation) used by the server.
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
html: health-check.html
|
||||
parent: peer-port-methods.html
|
||||
seo:
|
||||
description: Special API method for reporting server health.
|
||||
labels:
|
||||
- Core Server
|
||||
- Core Server
|
||||
---
|
||||
# Health Check
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/70d5c624e8cf732a362335642b2f5125ce4b43c1/src/xrpld/overlay/detail/OverlayImpl.cpp#L943-L1038 "Source")
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/de0c52738785de8bf837f9124da65c7905e7bb5a/src/ripple/overlay/impl/OverlayImpl.cpp#L1084-L1168 "Source")
|
||||
|
||||
The Health Check is a special [peer port method](index.md) 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. {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.6.0" %}New in: rippled 1.6.0{% /badge %}
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
---
|
||||
html: validator-list.html
|
||||
parent: peer-port-methods.html
|
||||
seo:
|
||||
description: Special API method for sharing recommended validator lists.
|
||||
labels:
|
||||
- Core Server
|
||||
- Blockchain
|
||||
- Core Server
|
||||
- Blockchain
|
||||
---
|
||||
# Validator List Method
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/70d5c624e8cf732a362335642b2f5125ce4b43c1/src/xrpld/overlay/detail/OverlayImpl.cpp#L875-L940 "Source")
|
||||
|
||||
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.
|
||||
|
||||
@@ -44,7 +45,7 @@ The JSON object has the following fields:
|
||||
| `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`. |
|
||||
|
||||
### Manifest Data
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/8d1b3b39940eca2735a0e9279bdd92b0748fd84c/src/xrpld/app/misc/detail/Manifest.cpp#L54-L82 "Source")
|
||||
[[Source]](https://github.com/XRPLF/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](../../../infrastructure/configuration/server-modes/run-rippled-as-a-validator.md#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](../../protocol/binary-format.md). (There is no standard JSON representation of a manifest.)
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ This example assumes that the issuer of the token is the signer of the transacti
|
||||
"AssetScale": 4,
|
||||
"TransferFee": 0,
|
||||
"MaximumAmount": "50000000",
|
||||
"Flags": 83659,
|
||||
"MPTokenMetadata": "7B2274223A225442494C4C222C226E223A22542D42696C6C205969656C6420546F6B656E222C2264223A2241207969656C642D62656172696E6720737461626C65636F696E206261636B65642062792073686F72742D7465726D20552E532E205472656173757269657320616E64206D6F6E6579206D61726B657420696E737472756D656E74732E222C2269223A226578616D706C652E6F72672F7462696C6C2D69636F6E2E706E67222C226163223A22727761222C226173223A227472656173757279222C22696E223A224578616D706C65205969656C6420436F2E222C227573223A5B7B2275223A226578616D706C657969656C642E636F2F7462696C6C222C2263223A2277656273697465222C2274223A2250726F647563742050616765227D2C7B2275223A226578616D706C657969656C642E636F2F646F6373222C2263223A22646F6373222C2274223A225969656C6420546F6B656E20446F6373227D5D2C226169223A7B22696E7465726573745F72617465223A22352E303025222C22696E7465726573745F74797065223A227661726961626C65222C227969656C645F736F75726365223A22552E532E2054726561737572792042696C6C73222C226D617475726974795F64617465223A22323034352D30362D3330222C226375736970223A22393132373936525830227D7D",
|
||||
"Fee": "12",
|
||||
"Flags": 122,
|
||||
|
||||
149
docs/tutorials/how-tos/use-tokens/issue-a-multi-purpose-token.md
Normal file
149
docs/tutorials/how-tos/use-tokens/issue-a-multi-purpose-token.md
Normal file
@@ -0,0 +1,149 @@
|
||||
---
|
||||
seo:
|
||||
description: Issue a Multi-Purpose Token (MPT) with arbitrary metadata on the XRP Ledger.
|
||||
metadata:
|
||||
indexPage: true
|
||||
labels:
|
||||
- Multi-Purpose Token
|
||||
- MPT
|
||||
- Token Issuance
|
||||
---
|
||||
# Issue a Multi-Purpose Token (MPT)
|
||||
|
||||
A [Multi-Purpose Token (MPT)](../../../concepts/tokens/fungible-tokens/multi-purpose-tokens.md) lets you to quickly access powerful, built-in tokenization features on the XRP Ledger with minimal code.
|
||||
|
||||
This tutorial shows you how to issue an MPT with on-chain metadata such as the token's ticker, name, or description, encoded according to the MPT [metadata schema](../../../concepts/tokens/fungible-tokens/multi-purpose-tokens.md#metadata-schema) defined in [XLS-89](https://xls.xrpl.org/xls/XLS-0089-multi-purpose-token-metadata-schema.html).
|
||||
|
||||
## Goals
|
||||
|
||||
By the end of this tutorial, you will be able to:
|
||||
|
||||
- Issue a new MPT using the `MPTokenIssuanceCreate` transaction.
|
||||
- Encode or decode token metadata following MPT standards best practices.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To complete this tutorial, you should:
|
||||
|
||||
- Have a basic understanding of the XRP Ledger and token issuance.
|
||||
- Have an XRP Ledger client library set up in your development environment. This page provides examples for the following:
|
||||
- **JavaScript** with the [xrpl.js library](https://github.com/XRPLF/xrpl.js). See [Get Started Using JavaScript](../../javascript/build-apps/get-started.md) for setup steps.
|
||||
|
||||
## Source Code
|
||||
|
||||
You can find the complete source code for this tutorial's example in the [code samples section of this website's repository](https://github.com/XRPLF/xrpl-dev-portal/tree/master/_code-samples/issue-mpt-with-metadata).
|
||||
|
||||
## Steps
|
||||
|
||||
### 1. Install dependencies
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Javascript" %}
|
||||
From the code sample folder, use npm to install dependencies:
|
||||
|
||||
```bash
|
||||
npm install xrpl
|
||||
```
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
### 2. Set up client and fund issuer wallet
|
||||
|
||||
Import the client library, instantiate a client to connect to the XRPL, and fund a new wallet to act as the token issuer.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Javascript" %}
|
||||
{% code-snippet file="/_code-samples/issue-mpt-with-metadata/js/issue-mpt-with-metadata.js" language="js" before="// Define metadata as JSON" /%}
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
### 3. Define and encode MPT metadata
|
||||
|
||||
Define your token's metadata as a JSON object:
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Javascript" %}
|
||||
{% code-snippet file="/_code-samples/issue-mpt-with-metadata/js/issue-mpt-with-metadata.js" language="js" from="// Define metadata as JSON" before="// Encode the metadata" /%}
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
The metadata schema supports both long field names (e.g., `ticker`, `name`, `desc`) and compact short keys (e.g., `t`, `n`, `d`). To save space on the ledger, it’s recommended to use short key names. The MPT metadata field has a 1024-byte limit, so using compact keys allows you to include more information.
|
||||
|
||||
The SDK libraries provide utility functions to encode or decode the metadata for you, so you don't have to. If long field names are provided in the metadata JSON, the _encoding_ utility function automatically shortens them to their compact key equivalents before encoding. Similarly, when decoding, the _decoding_ utility function converts the shorthands back to the respective long names.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Javascript" %}
|
||||
Use the `encodeMPTokenMetadata()` function to encode metadata with `xrpl.js`.
|
||||
{% code-snippet file="/_code-samples/issue-mpt-with-metadata/js/issue-mpt-with-metadata.js" language="js" from="// Encode the metadata" before="// Define the transaction" /%}
|
||||
{% /tab %}
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
{% admonition type="warning" name="Warning" %}
|
||||
While the encoding utility formats the JSON for you correctly and replaces the full key names with shorthands, it does **not** validate the metadata content or size.
|
||||
{% /admonition %}
|
||||
|
||||
### 4. Prepare the MPTokenIssuanceCreate transaction
|
||||
|
||||
Create the transaction object, specifying the issuer, asset scale, maximum amount, transfer/trade flags, and the encoded metadata.
|
||||
|
||||
| Field | Value |
|
||||
|:------------------|:---------------------------------------------------------------------|
|
||||
| `TransactionType` | The type of transaction, in this case `MPTokenIssuanceCreate`. |
|
||||
| `Account` | The wallet address of the account that is issuing the MPT. |
|
||||
| `AssetScale` | The number of decimal places for the token. |
|
||||
| `MaximumAmount` | The maximum supply of the token to be issued. |
|
||||
| `TransferFee` | The transfer fee (if any) to charge for token transfers. |
|
||||
| `Flags` | Flags to control transfer/trade permissions. |
|
||||
| `MPTokenMetadata` | The hex-encoded metadata for the token. |
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Javascript" %}
|
||||
{% code-snippet file="/_code-samples/issue-mpt-with-metadata/js/issue-mpt-with-metadata.js" language="js" from="// Define the transaction" before="// Prepare, sign, and submit the transaction" /%}
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
### 5. Submit the transaction
|
||||
|
||||
Sign and submit the transaction, then wait for validation.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Javascript" %}
|
||||
{% code-snippet file="/_code-samples/issue-mpt-with-metadata/js/issue-mpt-with-metadata.js" language="js" from="// Prepare, sign, and submit the transaction" before="// Check transaction results" /%}
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
### 6. Check transaction result
|
||||
|
||||
Verify that the transaction succeeded and retrieve the MPT issuance ID.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Javascript" %}
|
||||
{% code-snippet file="/_code-samples/issue-mpt-with-metadata/js/issue-mpt-with-metadata.js" language="js" from="// Check transaction results" before="// Look up MPT Issuance entry" /%}
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
{% admonition type="info" name="Note" %}
|
||||
A `tesSUCCESS` result indicates that the MPT issuance transaction was processed successfully and the token was created.
|
||||
{% /admonition %}
|
||||
|
||||
### 7. Confirm MPT issuance and decode metadata
|
||||
|
||||
Look up the MPT issuance entry in the validated ledger and decode the metadata to verify it matches your original input.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="Javascript" %}
|
||||
{% code-snippet file="/_code-samples/issue-mpt-with-metadata/js/issue-mpt-with-metadata.js" language="js" from="// Look up MPT Issuance entry" /%}
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
The _decoding_ utility function converts the metadata shorthand key names back to the respective long names.
|
||||
|
||||
## See Also
|
||||
|
||||
- **Concepts**:
|
||||
- [Multi-Purpose Tokens (MPT)](../../../concepts/tokens/fungible-tokens/multi-purpose-tokens.md)
|
||||
- **References**:
|
||||
- [MPTokenIssuanceCreate Transaction](../../../references/protocol/transactions/types/mptokenissuancecreate.md)
|
||||
|
||||
{% raw-partial file="/docs/_snippets/common-links.md" /%}
|
||||
@@ -240,7 +240,7 @@ Save the taker pays and taker gets fields; use these values to get the total amo
|
||||
}
|
||||
```
|
||||
|
||||
Implement [AMM formulas](https://github.com/XRPLF/rippled/blob/master/src/xrpld/app/misc/detail/AMMHelpers.cpp) to estimate values for:
|
||||
Use [AMM helper functions](https://github.com/XRPLF/rippled/blob/2d1854f354ff8bb2b5671fd51252c5acd837c433/src/ripple/app/misc/impl/AMMHelpers.cpp) to estimate values for:
|
||||
|
||||
- Cost to swap token without an auction slot.
|
||||
- Cost to swap token with an auction slot.
|
||||
@@ -534,7 +534,7 @@ Report the results.
|
||||
|
||||
## Code Walkthrough (ripplex13b-amm-formulas.js)
|
||||
|
||||
You can open `ripplex13b-amm-formulas.js` from the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/_code-samples/quickstart/js/) to view the source code. This code implements several core [AMM formulas](https://github.com/XRPLF/rippled/blob/master/src/xrpld/app/misc/detail/AMMHelpers.cpp) defined by the protocol.
|
||||
You can open `ripplex13b-amm-formulas.js` from the [Quickstart Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/_code-samples/quickstart/js/) to view the source code. This tutorial uses three of the available [AMM helper functions](https://github.com/XRPLF/rippled/blob/2d1854f354ff8bb2b5671fd51252c5acd837c433/src/ripple/app/misc/impl/AMMHelpers.cpp).
|
||||
|
||||
|
||||
### swapOut()
|
||||
|
||||
@@ -1,63 +1,97 @@
|
||||
---
|
||||
seo:
|
||||
description: Build a Python app that interacts with the XRP Ledger.
|
||||
top_nav_name: Python
|
||||
top_nav_grouping: Get Started
|
||||
labels:
|
||||
- Development
|
||||
---
|
||||
|
||||
{% code-walkthrough
|
||||
filesets=[
|
||||
{
|
||||
"files": ["/_code-samples/get-started/py/get-acct-info.py"],
|
||||
"downloadAssociatedFiles": ["/_code-samples/get-started/py/requirements.txt","/_code-samples/get-started/py/get-acct-info.py", "/_code-samples/get-started/py/README.md"]
|
||||
}
|
||||
]
|
||||
%}
|
||||
|
||||
# Get Started Using Python Library
|
||||
|
||||
This tutorial walks you through the basics of building an XRP Ledger-connected application using [`xrpl-py`](https://github.com/XRPLF/xrpl-py), a pure [Python](https://www.python.org) library built to interact with the XRP Ledger using native Python models and methods.
|
||||
This tutorial walks you through the basics of building an XRP Ledger-connected application using the [`xrpl-py`](https://github.com/XRPLF/xrpl-py) client library, a pure [Python](https://www.python.org) library built to interact with the XRP Ledger using native Python models and methods.
|
||||
|
||||
This tutorial is intended for beginners and should take no longer than 30 minutes to complete.
|
||||
|
||||
## Learning Goals
|
||||
## Goals
|
||||
|
||||
In this tutorial, you'll learn:
|
||||
|
||||
* The basic building blocks of XRP Ledger-based applications.
|
||||
* How to connect to the XRP Ledger using `xrpl-py`.
|
||||
* How to get an account on the [Testnet](/resources/dev-tools/xrp-faucets) using `xrpl-py`.
|
||||
* How to use the `xrpl-py` library to look up information about an account on the XRP Ledger.
|
||||
* How to put these steps together to create a Python app.
|
||||
- The basic building blocks of XRP Ledger-based applications.
|
||||
- How to connect to the XRP Ledger using `xrpl-py`.
|
||||
- How to get an account on the [Testnet](/resources/dev-tools/xrp-faucets) using `xrpl-py`.
|
||||
- How to use the `xrpl-py` library to look up information about an account on the XRP Ledger.
|
||||
- How to put these steps together to create a Python app.
|
||||
|
||||
## Requirements
|
||||
## Prerequisites
|
||||
|
||||
The `xrpl-py` library supports [Python 3.7](https://www.python.org/downloads/) and later.
|
||||
To complete this tutorial, you should meet the following guidelines:
|
||||
|
||||
- Have a basic understanding of Python.
|
||||
- Have installed [Python 3.7](https://www.python.org/downloads/) or later.
|
||||
|
||||
## Installation
|
||||
## Source Code
|
||||
|
||||
The [`xrpl-py` library](https://github.com/XRPLF/xrpl-py) is available on [PyPI](https://pypi.org/project/xrpl-py/). Install with `pip`: <!-- SPELLING_IGNORE: pypi -->
|
||||
Click **Download** on the top right of the code preview panel to download the source code.
|
||||
|
||||
## Steps
|
||||
|
||||
```py
|
||||
pip3 install xrpl-py
|
||||
Follow the steps to create a simple application with `xrpl-py`.
|
||||
|
||||
{% step id="import-tag" %}
|
||||
### 1. Install Dependencies
|
||||
|
||||
Start a new project by creating an empty folder, then move into that folder and set up a Python virtual environment with the necessary dependencies:
|
||||
|
||||
```sh
|
||||
# Create and activate a virtual environment
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
|
||||
# Install the xrpl-py library
|
||||
pip install xrpl-py
|
||||
```
|
||||
|
||||
## Start Building
|
||||
Alternatively, if you're using the downloaded source code, you can install all dependencies from the `requirements.txt` file:
|
||||
|
||||
When you're working with the XRP Ledger, there are a few things you'll need to manage, whether you're adding XRP to your [account](../../../concepts/accounts/index.md), integrating with the [decentralized exchange](../../../concepts/tokens/decentralized-exchange/index.md), or [issuing tokens](../../../concepts/tokens/index.md). This tutorial walks you through basic patterns common to getting started with all of these use cases and provides sample code for implementing them.
|
||||
```sh
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
{% /step %}
|
||||
|
||||
Here are the basic steps you'll need to cover for almost any XRP Ledger project:
|
||||
### 2. Connect to the XRP Ledger
|
||||
|
||||
1. [Connect to the XRP Ledger.](#1-connect-to-the-xrp-ledger)
|
||||
1. [Get an account.](#2-get-account)
|
||||
1. [Query the XRP Ledger.](#3-query-the-xrp-ledger)
|
||||
{% step id="connect-tag" %}
|
||||
#### Connect to the XRP Ledger Testnet
|
||||
|
||||
To make queries and submit transactions, you need to connect to the XRP Ledger. To do this with `xrpl-py`, use the [`xrp.clients` module](https://xrpl-py.readthedocs.io/en/latest/source/xrpl.clients.html).
|
||||
|
||||
### 1. Connect to the XRP Ledger
|
||||
{% admonition type="info" name="Note" %}
|
||||
The standard approach with `xrpl-py` is to use the JSON-RPC client. While a WebSocket client is available, it requires you to use `async`/`await` throughout your code. For most use cases, stick with JSON-RPC to avoid the complexity of asynchronous programming.
|
||||
{% /admonition %}
|
||||
|
||||
To make queries and submit transactions, you need to connect to the XRP Ledger. To do this with `xrpl-py`, use the [`xrp.clients` module](https://xrpl-py.readthedocs.io/en/latest/source/xrpl.clients.html):
|
||||
The sample code shows you how to connect to the Testnet, which is one of the available [parallel networks](../../../concepts/networks-and-servers/parallel-networks.md).
|
||||
{% /step %}
|
||||
|
||||
{% code-snippet file="/_code-samples/get-started/py/get-acct-info.py" from="# Define the network client" before="# Create a wallet using the testnet faucet:" language="py" /%}
|
||||
|
||||
#### Connect to the production XRP Ledger
|
||||
{% step id="connect-mainnet-tag"%}
|
||||
#### Connect to the XRP Ledger Mainnet
|
||||
|
||||
The sample code in the previous section shows you how to connect to the Testnet, which is a [parallel network](../../../concepts/networks-and-servers/parallel-networks.md) for testing where the money has no real value. When you're ready to integrate with the production XRP Ledger, you'll need to connect to the Mainnet. You can do that in two ways:
|
||||
|
||||
* By [installing the core server](../../../infrastructure/installation/index.md) (`rippled`) and running a node yourself. The core server connects to the Mainnet by default, but you can [change the configuration to use Testnet or Devnet](../../../infrastructure/configuration/connect-your-rippled-to-the-xrp-test-net.md). [There are good reasons to run your own core server](../../../concepts/networks-and-servers/index.md#reasons-to-run-your-own-server). If you run your own server, you can connect to it like so:
|
||||
- By [installing the core server](../../../infrastructure/installation/index.md) (`rippled`) and running a node yourself. The core server connects to the Mainnet by default, but you can [change the configuration to use Testnet or Devnet](../../../infrastructure/configuration/connect-your-rippled-to-the-xrp-test-net.md). [There are good reasons to run your own core server](../../../concepts/networks-and-servers/index.md#reasons-to-run-your-own-server). If you run your own server, you can connect to it like so:
|
||||
|
||||
```
|
||||
```python
|
||||
from xrpl.clients import JsonRpcClient
|
||||
JSON_RPC_URL = "http://localhost:5005/"
|
||||
client = JsonRpcClient(JSON_RPC_URL)
|
||||
@@ -65,146 +99,115 @@ The sample code in the previous section shows you how to connect to the Testnet,
|
||||
|
||||
See the example [core server config file](https://github.com/XRPLF/rippled/blob/c0a0b79d2d483b318ce1d82e526bd53df83a4a2c/cfg/rippled-example.cfg#L1562) for more information about default values.
|
||||
|
||||
* By using one of the available [public servers][]:
|
||||
- By using one of the available [public servers][]:
|
||||
|
||||
```
|
||||
```python
|
||||
from xrpl.clients import JsonRpcClient
|
||||
JSON_RPC_URL = "https://s2.ripple.com:51234/"
|
||||
client = JsonRpcClient(JSON_RPC_URL)
|
||||
```
|
||||
{% /step %}
|
||||
|
||||
|
||||
### 2. Get account
|
||||
{% step id="get-account-create-wallet-tag" %}
|
||||
### 3. Get account
|
||||
|
||||
To store value and execute transactions on the XRP Ledger, you need an account: a [set of keys](../../../concepts/accounts/cryptographic-keys.md#key-components) and an [address](../../../concepts/accounts/addresses.md) that's been [funded with enough XRP](../../../concepts/accounts/index.md#creating-accounts) to meet the [account reserve](../../../concepts/accounts/reserves.md). The address is the identifier of your account and you use the [private key](../../../concepts/accounts/cryptographic-keys.md#private-key) to sign transactions that you submit to the XRP Ledger.
|
||||
|
||||
{% admonition type="success" name="Tip" %}
|
||||
For testing and development purposes, you can use the [XRP Faucets](/resources/dev-tools/xrp-faucets) to generate keys and fund the account on the Testnet or Devnet. For production purposes, you should take care to store your keys and set up a [secure signing method](../../../concepts/transactions/secure-signing.md). Another difference in production is that XRP has real worth, so you can't get it for free from a faucet.
|
||||
{% /admonition %}
|
||||
|
||||
To create and fund an account on the Testnet, `xrpl-py` provides the [`generate_faucet_wallet`](https://xrpl-py.readthedocs.io/en/latest/source/xrpl.wallet.html#xrpl.wallet.generate_faucet_wallet) method:
|
||||
To create and fund an account on the Testnet, `xrpl-py` provides the [`generate_faucet_wallet`](https://xrpl-py.readthedocs.io/en/latest/source/xrpl.wallet.html#xrpl.wallet.generate_faucet_wallet) method. This method returns a [`Wallet` instance](https://xrpl-py.readthedocs.io/en/latest/source/xrpl.wallet.html#xrpl.wallet.Wallet).
|
||||
{% /step %}
|
||||
|
||||
{% code-snippet file="/_code-samples/get-started/py/get-acct-info.py" from="# Create a wallet using the testnet faucet:" before="# Create an account str from the wallet" language="py" /%}
|
||||
|
||||
|
||||
This method returns a [`Wallet` instance](https://xrpl-py.readthedocs.io/en/latest/source/xrpl.wallet.html#xrpl.wallet.Wallet):
|
||||
|
||||
|
||||
```py
|
||||
print(test_wallet)
|
||||
|
||||
# print output
|
||||
|
||||
public_key:: 022FA613294CD13FFEA759D0185007DBE763331910509EF8F1635B4F84FA08AEE3
|
||||
private_key:: -HIDDEN-
|
||||
classic_address: raaFKKmgf6CRZttTVABeTcsqzRQ51bNR6Q
|
||||
```
|
||||
|
||||
#### Using the account
|
||||
|
||||
In this tutorial we only query details about the generated account from the XRP Ledger, but you can use the values in the `Wallet` instance to prepare, sign, and submit transactions with `xrpl-py`.
|
||||
|
||||
##### Prepare
|
||||
|
||||
To prepare the transaction:
|
||||
|
||||
{% code-snippet file="/_code-samples/get-started/py/prepare-payment.py" from="# Prepare payment" before="# print prepared payment" language="py" /%}
|
||||
|
||||
|
||||
|
||||
##### Sign and submit
|
||||
|
||||
To sign and submit the transaction:
|
||||
|
||||
{% code-snippet file="/_code-samples/get-started/py/prepare-payment.py" from="# Sign and submit the transaction" before="# Print tx response" language="py" /%}
|
||||
|
||||
|
||||
##### Derive an X-address
|
||||
|
||||
You can use `xrpl-py`'s [`xrpl.core.addresscodec`](https://xrpl-py.readthedocs.io/en/latest/source/xrpl.core.addresscodec.html) module to derive an [X-address](https://xrpaddress.info/) from the `Wallet.address` field:
|
||||
|
||||
{% code-snippet file="/_code-samples/get-started/py/get-acct-info.py" from="# Derive an x-address from the classic address:" before="# Look up info about your account" language="py" /%}
|
||||
|
||||
The X-address format [packs the address and destination tag](https://github.com/XRPLF/XRPL-Standards/issues/6) into a more user-friendly value.
|
||||
|
||||
|
||||
### 3. Query the XRP Ledger
|
||||
{% step id="query-xrpl-tag" %}
|
||||
### 4. Query the XRP Ledger
|
||||
|
||||
You can query the XRP Ledger to get information about [a specific account](../../../references/http-websocket-apis/public-api-methods/account-methods/index.md), [a specific transaction](../../../references/http-websocket-apis/public-api-methods/transaction-methods/tx.md), the state of a [current or a historical ledger](../../../references/http-websocket-apis/public-api-methods/ledger-methods/index.md), and [the XRP Ledger's decentralized exchange](../../../references/http-websocket-apis/public-api-methods/path-and-order-book-methods/index.md). You need to make these queries, among other reasons, to look up account info to follow best practices for [reliable transaction submission](../../../concepts/transactions/reliable-transaction-submission.md).
|
||||
|
||||
Here, we use `xrpl-py`'s [`xrpl.account`](https://xrpl-py.readthedocs.io/en/latest/source/xrpl.account.html) module to look up information about the [account we got](#2-get-account) in the previous step.
|
||||
Use the [account_info method][] to look up information about the account you got in the previous step. Use a request model like `AccountInfo` to validate the request format and catch errors sooner.
|
||||
{% /step %}
|
||||
|
||||
{% step id="run-app-tag" %}
|
||||
### 5. Run the Application
|
||||
|
||||
{% code-snippet file="/_code-samples/get-started/py/get-acct-info.py" from="# Look up info about your account" language="py" /%}
|
||||
|
||||
|
||||
|
||||
### 4. Putting it all together
|
||||
|
||||
Using these building blocks, we can create a Python app that:
|
||||
|
||||
1. Gets an account on the Testnet.
|
||||
2. Connects to the XRP Ledger.
|
||||
3. Looks up and prints information about the account you created.
|
||||
|
||||
|
||||
{% code-snippet file="/_code-samples/get-started/py/get-acct-info.py" language="python" /%}
|
||||
|
||||
To run the app, you can copy and paste the code into an editor or IDE and run it from there. Or you could download the file from the [XRP Ledger Dev Portal repo](https://github.com/XRPLF/xrpl-dev-portal/tree/master/_code-samples/get-started/py) and run it locally:
|
||||
|
||||
Finally, in your terminal, run the application like so:
|
||||
|
||||
```sh
|
||||
git clone git@github.com:XRPLF/xrpl-dev-portal.git
|
||||
cd xrpl-dev-portal/_code-samples/get-started/py/get-acct-info.py
|
||||
python3 get-acct-info.py
|
||||
python get-acct-info.py
|
||||
```
|
||||
|
||||
You should see output similar to this example:
|
||||
|
||||
```sh
|
||||
Classic address:
|
||||
Creating a new wallet and funding it with Testnet XRP...
|
||||
Attempting to fund address ravbHNootpSNQkxyEFCWevSkHsFGDHfyop
|
||||
Faucet fund successful.
|
||||
Wallet: ravbHNootpSNQkxyEFCWevSkHsFGDHfyop
|
||||
Account Testnet Explorer URL:
|
||||
https://testnet.xrpl.org/accounts/ravbHNootpSNQkxyEFCWevSkHsFGDHfyop
|
||||
|
||||
rnQLnSEA1YFMABnCMrkMWFKxnqW6sQ8EWk
|
||||
X-address:
|
||||
|
||||
T7dRN2ktZGYSTyEPWa9SyDevrwS5yDca4m7xfXTGM3bqff8
|
||||
response.status: ResponseStatus.SUCCESS
|
||||
Getting account info...
|
||||
Response Status: ResponseStatus.SUCCESS
|
||||
{
|
||||
"account_data": {
|
||||
"Account": "rnQLnSEA1YFMABnCMrkMWFKxnqW6sQ8EWk",
|
||||
"Balance": "1000000000",
|
||||
"Account": "ravbHNootpSNQkxyEFCWevSkHsFGDHfyop",
|
||||
"Balance": "100000000",
|
||||
"Flags": 0,
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"OwnerCount": 0,
|
||||
"PreviousTxnID": "5A5203AFF41503539D11ADC41BE4185761C5B78B7ED382E6D001ADE83A59B8DC",
|
||||
"PreviousTxnLgrSeq": 16126889,
|
||||
"Sequence": 16126889,
|
||||
"index": "CAD0F7EF3AB91DA7A952E09D4AF62C943FC1EEE41BE926D632DDB34CAA2E0E8F"
|
||||
"PreviousTxnID": "3DACF2438AD39F294C4EFF6132D5D88BCB65D2F2261C7650F40AC1F6A54C83EA",
|
||||
"PreviousTxnLgrSeq": 12039759,
|
||||
"Sequence": 12039759,
|
||||
"index": "148E6F4B8E4C14018D679A2526200C292BDBC5AB77611BC3AE0CB97CD2FB84E5"
|
||||
},
|
||||
"ledger_current_index": 16126890,
|
||||
"queue_data": {
|
||||
"txn_count": 0
|
||||
"account_flags": {
|
||||
"allowTrustLineClawback": false,
|
||||
"defaultRipple": false,
|
||||
"depositAuth": false,
|
||||
"disableMasterKey": false,
|
||||
"disallowIncomingCheck": false,
|
||||
"disallowIncomingNFTokenOffer": false,
|
||||
"disallowIncomingPayChan": false,
|
||||
"disallowIncomingTrustline": false,
|
||||
"disallowIncomingXRP": false,
|
||||
"globalFreeze": false,
|
||||
"noFreeze": false,
|
||||
"passwordSpent": false,
|
||||
"requireAuthorization": false,
|
||||
"requireDestinationTag": false
|
||||
},
|
||||
"validated": false
|
||||
"ledger_hash": "CA624D717C4FCDD03BAD8C193F374A77A14F7D2566354A4E9617A8DAD896DE71",
|
||||
"ledger_index": 12039759,
|
||||
"validated": true
|
||||
}
|
||||
```
|
||||
|
||||
#### Interpreting the response
|
||||
|
||||
The response fields that you want to inspect in most cases are:
|
||||
|
||||
* `account_data.Sequence` — This is the sequence number of the next valid transaction for the account. You need to specify the sequence number when you prepare transactions. With `xrpl-py`, you can use the [`get_next_valid_seq_number`](https://xrpl-py.readthedocs.io/en/latest/source/xrpl.account.html#xrpl.account.get_next_valid_seq_number) to get this automatically from the XRP Ledger. See an example of this usage in the project [README](https://github.com/XRPLF/xrpl-py#serialize-and-sign-transactions).
|
||||
- `account_data.Balance` — This is the account's balance of [XRP, in drops][]. You can use this to confirm that you have enough XRP to send (if you're making a payment) and to meet the [current transaction cost](../../../concepts/transactions/transaction-cost.md#current-transaction-cost) for a given transaction.
|
||||
|
||||
* `account_data.Balance` — This is the account's balance of [XRP, in drops][]. You can use this to confirm that you have enough XRP to send (if you're making a payment) and to meet the [current transaction cost](../../../concepts/transactions/transaction-cost.md#current-transaction-cost) for a given transaction.
|
||||
|
||||
* `validated` — Indicates whether the returned data is from a [validated ledger](../../../concepts/ledgers/open-closed-validated-ledgers.md). When inspecting transactions, it's important to confirm that [the results are final](../../../concepts/transactions/finality-of-results/index.md) before further processing the transaction. If `validated` is `true` then you know for sure the results won't change. For more information about best practices for transaction processing, see [Reliable Transaction Submission](../../../concepts/transactions/reliable-transaction-submission.md).
|
||||
- `validated` — Indicates whether the returned data is from a [validated ledger](../../../concepts/ledgers/open-closed-validated-ledgers.md). When inspecting transactions, it's important to confirm that [the results are final](../../../concepts/transactions/finality-of-results/index.md) before further processing the transaction. If `validated` is `true` then you know for sure the results won't change. For more information about best practices for transaction processing, see [Reliable Transaction Submission](../../../concepts/transactions/reliable-transaction-submission.md).
|
||||
|
||||
For a detailed description of every response field, see [account_info](../../../references/http-websocket-apis/public-api-methods/account-methods/account_info.md#response-format).
|
||||
{% /step %}
|
||||
|
||||
## See Also
|
||||
|
||||
## Keep on building
|
||||
|
||||
Now that you know how to use `xrpl-py` to connect to the XRP Ledger, get an account, and look up information about it, you can also use `xrpl-py` to:
|
||||
|
||||
* [Send XRP](../../how-tos/send-xrp.md).
|
||||
* [Set up secure signing](../../../concepts/transactions/secure-signing.md) for your account.
|
||||
- **Concepts:**
|
||||
- [XRP Ledger Overview](/about/)
|
||||
- [Client Libraries](../../../references/client-libraries.md)
|
||||
- **Tutorials:**
|
||||
- [Send XRP](../../how-tos/send-xrp.md)
|
||||
- [Issue a Fungible Token](../../how-tos/use-tokens/issue-a-fungible-token.md)
|
||||
- [Set up Secure Signing](../../../concepts/transactions/secure-signing.md)
|
||||
- **References:**
|
||||
- [`xrpl-py` Reference](https://xrpl-py.readthedocs.io/en/latest/)
|
||||
- [Public API Methods](../../../references/http-websocket-apis/public-api-methods/index.md)
|
||||
- [API Conventions](../../../references/http-websocket-apis/api-conventions/index.md)
|
||||
- [base58 Encodings](../../../references/protocol/data-types/base58-encodings.md)
|
||||
- [Transaction Formats](../../../references/protocol/transactions/index.md)
|
||||
|
||||
{% raw-partial file="/docs/_snippets/common-links.md" /%}
|
||||
|
||||
{% /code-walkthrough %}
|
||||
|
||||
2468
package-lock.json
generated
2468
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@
|
||||
"@codemirror/state": "6.5.2",
|
||||
"@codemirror/view": "^6.22.2",
|
||||
"@lezer/highlight": "^1.2.0",
|
||||
"@redocly/realm": "0.122.3",
|
||||
"@redocly/realm": "0.126.0",
|
||||
"@uiw/codemirror-themes": "4.21.21",
|
||||
"@uiw/react-codemirror": "^4.21.21",
|
||||
"@xrplf/isomorphic": "^1.0.0-beta.1",
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
---
|
||||
html: create-custom-transactors.html
|
||||
parent: contribute-code.html
|
||||
seo:
|
||||
description: Create custom transactors to interact with the XRP Ledger.
|
||||
labels:
|
||||
- Development
|
||||
- Blockchain
|
||||
- Development
|
||||
- Blockchain
|
||||
---
|
||||
# Create Custom Transactors
|
||||
|
||||
@@ -76,8 +78,8 @@ The `preflight` function checks for errors in the transaction itself before acce
|
||||
{% admonition type="info" name="Note" %}The `~` symbol returns an optional type.{% /admonition %}
|
||||
|
||||
- You can view ledger and transaction schemas here:
|
||||
- [`ledger_entries.macro`](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/detail/ledger_entries.macro)
|
||||
- [`transactions.macro`](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/detail/transactions.macro)
|
||||
- [`LedgerFormats.cpp`](https://github.com/XRPLF/rippled/blob/master/src/ripple/protocol/impl/LedgerFormats.cpp)
|
||||
- [`TxFormats.cpp`](https://github.com/XRPLF/rippled/blob/master/src/ripple/protocol/impl/TxFormats.cpp)
|
||||
|
||||
- `rippled` summarizes transaction results with result codes. See: [Transaction Results](../../docs/references/protocol/transactions/transaction-results/index.md)
|
||||
|
||||
@@ -342,7 +344,7 @@ EscrowFinish::calculateBaseFee(ReadView const& view, STTx const& tx)
|
||||
|
||||
### `makeTxConsequences`
|
||||
|
||||
`rippled` uses a [`TxConsequences`](https://github.com/XRPLF/rippled/blob/70d5c624e8cf732a362335642b2f5125ce4b43c1/src/xrpld/app/tx/applySteps.h#L58) class to describe the outcome to an account when applying a transaction. It tracks the fee, maximum possible XRP spent, and how many sequence numbers are consumed by the transaction. There are three types of consequences:
|
||||
`rippled` uses a [`TxConsequences`](https://github.com/XRPLF/rippled/blob/master/src/ripple/app/tx/applySteps.h#L41-L44) class to describe the outcome to an account when applying a transaction. It tracks the fee, maximum possible XRP spent, and how many sequence numbers are consumed by the transaction. There are three types of consequences:
|
||||
|
||||
- **Normal:** The transactor doesn't affect transaction signing and _only_ consumes an XRP fee. Transactions that spend XRP beyond the fee aren't considered normal.
|
||||
- **Blocker:** The transactor affects transaction signing, preventing valid transactions from queueing behind it.
|
||||
|
||||
Reference in New Issue
Block a user