bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 28쪽 중 23쪽
is can be helpful to confirm that you have compiled
xrpld
successfully.
Version statement
- Use
--version
to have
xrpld
print its version number, Git commit hash, and Git build branch.
Definitions
- Use
--definitions
to print the XRP Ledger protocol definitions (the same data returned by the
server_definitions method
) as JSON, then exit. This lets you obtain updated definitions early in development.
Generic Options
These options apply to most modes:
Option
Description
--conf {FILE}
Use
{FILE}
as the config file instead of looking for config files in the default locations. If not specified,
xrpld
first checks the local working directory for an
xrpld.cfg
file. On Linux, if that file is not found,
xrpld
next checks for
$XDG_CONFIG_HOME/xrpld/xrpld.cfg
. (Typically,
$XDG_CONFIG_HOME
maps to
$HOME/.config
.)
Verbosity Options
The following generic options affect the amount of information written to standard output and log files:
Option
Short Version
Description
--debug
DEPRECATED
Enables trace-level debugging (alias for
--verbose
). Use the
log_level method
instead.
--silent
Don't write logs to standard out and standard error during startup. Recommended when starting
xrpld
as a systemd unit to reduce redundant logging.
--verbose
-v
DEPRECATED
Enables trace-level debugging. Use the
log_level method
instead.
Daemon Mode Options
xrpld
[OPTIONS]
Daemon mode is the default mode of operation for
xrpld
. In addition to the
Generic Options
, you can provide any of the following:
Option
Description
--fg
Run the daemon as a single process in the foreground. Otherwise,
xrpld
forks a second process for the daemon while the first process runs as a monitor.
--import
Before fully starting, import ledger data from another
xrpld
server's ledger store. Requires a valid
[import_db]
stanza in the config file.
--newnodeid
Generate a random node identity for the server.
--nodeid {VALUE}
Specify a node identity.
{VALUE}
can also be a parameter associated with the container or hardware running the server, such as
$HOSTNAME
.
--quorum {QUORUM}
This option is intended for starting
test networks
. Override the minimum quorum for validation by requiring an agreement of
{QUORUM}
trusted validators. By default, the quorum for validation is automatically set to a safe number of trusted validators based on how many there are. If some validators are not online, this option can allow progress with a lower than normal quorum.
Warning
If you set the quorum manually, it may be too low to prevent your server from diverging from the rest of the network. Only use this option if you have a deep understanding of consensus and have a need to use a non-standard configuration.
The following options have been removed:
--validateShards
and
--nodetoshard
.
Stand-Alone Mode Options
xrpld
--standalone
[OPTIONS]
xrpld
-a
[OPTIONS]
Run in
stand-alone mode
. In this mode,
xrpld
does not connect to the network or perform consensus. (Otherwise,
xrpld
runs in daemon mode.)
Initial Ledger Options
The following options determine which ledger to load first when starting up. These options are intended for debugging and for starting networks. These options work with both stand-alone mode and network mode. By default, the server loads its initial ledger using a combination of saved local data and data downloaded from the peer-to-peer network based on what ledger has been most recently validated by the network.
Option
Description
--ledger {LEDGER}
Load the ledger version identified by
{LEDGER}
(either a ledger hash or a ledger index) as the initial ledger. The specified ledger version must be in the server's ledger store.
--ledgerfile {FILE}
Load the ledger version from the specified
{FILE}
, which must contain a complete ledger in JSON format. For an example of such a file, see the provided
ledger-file.json
.
--load
Use only the ledger store on disk when loading the initial ledger.
--net
Use only data from the network when loading the initial ledger.
--replay
Use with
--ledger
to replay a specific ledger. Your server must have the ledger in question and its direct ancestor already in the ledger store. Using the previous ledger as a base, the server processes all the transactions in the specified ledger, resulting in a re-creation of the specified ledger. With a debugger, you can add breakpoints to analyze specific transaction processing logic.
--start
Start with a new genesis ledger that has known amendments enabled, based on their default votes. This makes the functionality of those amendments available right away, instead of needing to wait two weeks for the
Amendment Process
. See also:
Start a New Genesis Ledger in Stand-Alone Mode
.
--valid
Consider the initial ledger a valid network ledger even before fully syncing with the network. This can be used for starting networks or rolling back an entire network to a known previous state, as long as 80% of that network's validators load the same ledger at around the same time.
Client Mode Options
xrpld
[OPTIONS] -- {
COMMAND}
{COMMAND_PARAMETERS}
In client mode, the
xrpld
executable acts as a client to another
xrpld
service. (The service may be the same executable running in a separate process locally, or it could be an
xrpld
server on another server.)
To run in client mode, provide the
commandline syntax
for one of the
xrpld
API
methods.
Besides the individual commands, client mode accepts the
Generic Options
and the following options:
Option
Description
--rpc
Explicitly specify that the server should run in client mode. Not required.
--rpc_ip {IP_ADDRESS}
Connect to the
xrpld
server at the specified IP Address, optionally including a port number.
--rpc_port {PORT}
DEPRECATED
Connect to the
xrpld
server on the specified port. Specify the port alongside the IP address using
--rpc_ip
instead.
Tip
Some arguments accept negative numbers as values. To ensure that arguments to API commands are not interpreted as options instead, pass the
--
argument before the command name.
Example usage (get account transaction history from the earliest available to latest available ledger versions):
xrpld
--
account_tx
r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59
-1
-1
Unit Tests
xrpld
--unittest
[OPTIONS]
xrpld
-u
[OPTIONS]
Unit testing runs tests built into the
xrpld
source code to confirm that the executable performs as expected. After running unit tests, the process displays a summary of results and exits. Unit tests cover functionality such as built-in data types and transaction processing routines.
If unit testing reports a failure, that generally indicates one of the following:
A problem occurred when compiling
xrpld
and it is not functioning as intended
The source code for
xrpld
contains a bug
A unit test has a bug or has not been updated to account for new behavior
While running unit tests, you can specify the
Generic Options
and any of the following options:
Option
Short Version
Description
--unittest-ipv6
Use
IPv6
to connect to the local server when running unit tests. If not provided, unit tests use IPv4 instead.
--unittest-jobs {NUMBER_OF_JOBS}
Use the specified number of processes to run unit tests. This can finish running tests faster on multi-core systems. The
{NUMBER_OF_JOBS}
should be a positive integer indicating the number of processes to use.
--unittest-log
Allow unit tests to write to logs even if
--quiet
is specified. (No effect otherwise.)
--quiet
-q
Print fewer diagnostic messages when running unit tests.
Specific Unit Tests
xrpld
--unittest=
{
TEST_OR_PACKAGE_NAME}
By default,
xrpld
runs all unit tests except ones that are classified as "manual". You can run an individual test by specifying its name, or run a subset of tests by specifying a package name.
Tests are grouped into a hierarchy of packages separated by
.
characters and ending in the test case name.
Printing Unit Tests
xrpld
--unittest=print
The
print
unit test is a special case that prints a list of available tests with their packages.
Manual Unit Tests
Certain unit tests are classified as "manual" because they take a long time to complete. These tests are marked with
|M|
in the output of the
print
unit test. Manual tests do not run by default when you run all unit tests or a package of unit tests. You can run manual tests individually by specifying the name of the test. For example:
$
./xrpld
--unittest=ripple.tx.OversizeMeta
ripple.tx.OversizeMeta
Longest
suite
times:
60.9s
ripple.tx.OversizeMeta
60.9s,
1
suite,
1
case,
9016
tests
total,
0
failures
Providing Arguments to Unit Tests
Certain manual unit tests accept an argument. You can provide the argument with the following option:
Option
Description
--unittest-arg {ARG}
Provide the argument
{ARG}
to the unit test(s) currently being run. Each unit test that accepts arguments defines its own argument format.
## /docs/references/http-websocket-apis/admin-api-methods
Admin API Methods
Copy
Administer an
xrpld
server using these admin API methods. Admin methods are meant only for trusted personnel in charge of keeping the server operational. Admin methods include commands for managing, monitoring, and debugging the server.
Admin commands are available only if you connect to
xrpld
on a host and port that the
xrpld.cfg
file identifies as admin. By default, the commandline client uses an admin connection. For more information on connecting to
xrpld
, see
Getting Started with the
xrpld
API
.
Key Generation Methods
Use these methods to generate and manage keys.
validation_create
- Generate formatted for
xrpld
node key pair. (Validators should use
tokens
instead of keys generated by this method.)
wallet_propose
- Generate keys for a new account.
Logging and Data Management Methods
Use these methods to manage log levels and other data, such as ledgers.
can_delete
- Allow online deletion of ledgers up to a specific ledger.
ledger_cleaner
- Configure the ledger cleaner service to check for corrupted data.
ledger_request
- Query a peer server for a specific ledger version.
log_level
- Get or modify log verbosity.
logrotate
- Reopen the log file.
Server Control Methods
Use these methods to manage the
xrpld
server.
ledger_accept
- Close and advance the ledger in stand-alone mode.
stop
- Shut down the
xrpld
server.
Signing Methods
Use these methods to sign transactions.
sign
- Cryptographically sign a transaction.
sign_for
- Contribute to a multi-signature.
channel_authorize
- Sign a claim for money from a payment channel.
By default, these methods are
admin-only
. They can be used as public methods if the server admin has
enabled public signing
.
Peer Management Methods
Use these methods to manage the server's connections in the peer-to-peer XRP Ledger network.
connect
- Force the
xrpld
server to connect to a specific peer.
peer_reservations_add
- Add or update a reserved slot for a specific peer.
peer_reservations_del
- Remove a reserved slot for a specific peer.
peer_reservations_list
- List reserved slots for specific peers.
peers
- Get information about the peer servers connected.
Status and Debugging Methods
Use these methods to check the status of the network and server.
consensus_info
- Get information about the state of consensus as it happens.
feature
- Get information about protocol amendments.
fetch_info
- Get information about the server's sync with the network.
get_counts
- Get statistics about the server's internals and memory usage.
manifest
- Get the latest public key information about a known validator.
print
- Get information about internal subsystems.
validator_info
- Get information about the server's validator settings, if configured as a validator.
validator_list_sites
- Get information about sites that publish validator lists.
validators
- Get information about the current validators.
Deprecated Methods
The following admin commands are deprecated and either have been removed, or may be removed without further notice:
ledger_header
- Use the
ledger method
instead.
unl_add
,
unl_delete
,
unl_list
,
unl_load
,
unl_network
,
unl_reset
,
unl_score
- Use the
validators.txt
config file for UNL management instead.
wallet_seed
- Use the
wallet_propose method
instead.
validation_seed
- Use the config file and
validator-keys-tool
for managing your seed instead.
## /resources/dev-tools/xrp-faucets
XRP Faucets
These
parallel XRP Ledger test networks
provide platforms for testing changes to the XRP Ledger and software built on it, without using real funds.
These funds are intended for
testing
only. Test networks' ledger history and balances are reset as necessary. Devnets may be reset without warning.
All balances and XRP on these networks are separate from Mainnet. As a precaution, do not use the same credentials on Mainnet.
Choose network:
Testnet
:
Mainnet-like network for testing applications.
Devnet
:
Preview of upcoming amendments.
Xahau-Testnet
:
Hooks (L1 smart contracts) enabled Xahau testnet.
Lending-Devnet
:
Preview of XLS-66d Lending Protocol.
WASM Devnet
:
Preview of XLS-100d Smart Escrows and other WASM-based programmability.
Request amount
XRP
Fund wallet:
Generate keys
Refill wallet:
Get Test XRP
Waiting for faucet...
Waiting for sequence number...
## /resources/dev-tools/tx-sender
Transaction Sender
This tool sends transactions to the
XRP Testnet
address of your choice so you can test how you monitor and respond to incoming transactions.
## /resources/dev-tools/websocket-api-tool
WebSocket Tool
account_channels
Returns information about an account's payment channels.
Read more
Request
Send request
Mainnet s1 (Not Connected)
Connection Settings
×
s1.ripple.com (Mainnet Public Cluster)
xrplcluster.com (Mainnet Full History Cluster)
s2.ripple.com (Mainnet Full History Cluster)
s.altnet.rippletest.net (Testnet Public Cluster)
s.devnet.rippletest.net (Devnet Public Cluster)
localhost:6006 (Local
rippled
Server on port 6006)
(Requires that you
run
rippled
on this machine with default WebSocket settings)
clio.altnet.rippletest.net (Testnet Public Cluster with Clio)
clio.devnet.rippletest.net (Devnet Public Cluster with Clio)
Close
Permalink
×
Close
cURL Syntax
×
Close
Responses
Keep last:
## /docs/use-cases/payments/peer-to-peer-payments-uc
Peer-to-Peer Payments
Copy
The XRP Ledger provides an efficient and borderless solution to handling payments. Unlike traditional payment methods, you don't need a financial institution to hold your assets and transfer value. If you have access to the internet, you can make direct payments on the XRP Ledger as easily as handing someone cash. Whether between friends, or a buyer and merchant, the XRP Ledger enables you to handle direct (peer-to-peer) payments quickly and with low network fees.
Wallets
Before jumping into using the XRP Ledger to handle direct payments, you should settle on a crypto wallet to use. Crypto wallets make it easier to interact with the ledger and manage your funds; there are many to choose from, depending on your needs, and you can even create your own. See:
Crypto Wallets
.
Account Creation
Before creating an account, you must decide which XRP Ledger network to use. There are multiple networks for different use cases, but native XRP transactions only happen on
Mainnet
. See:
Parallel Networks
Most publicly available wallets offer the ability to create an account for you and can generate a public and private key. If they don't, you can create an account yourself, so long as it's mathematically valid. See:
Creating Accounts
.
Fund Your Account
An account isn't active on the XRP Ledger until it's been funded and meets the minimum reserve requirement. See:
Reserves
.
If the wallet you're using doesn't offer the option to purchase XRP, you'll need to find a third party exchange to do so and send it to your account. Alternatively, someone you know can also send XRP to your account. See:
Payment
.
After funding your account, you should verify on the XRP Ledger itself that your account exists and is funded. You can do this with the:
XRPL Explorer
.
account_info
command
.
Handling Payments
Direct XRP Payments
XRP payments are the simplest way to pay someone on the XRP Ledger. You can use checks or escrows, but these require multiple transactions to complete. A direct XRP payment requires only one transaction, making this option great for day-to-day activity. If you're a merchant handling large volumes of transactions, this may be the right choice for you due to it being quick, simple, and having the lowest fees. See:
Direct XRP Payments
.
To make a direct XRP payment work, you only need to know the address of the receiver.
Cross-Currency Payments
The XRP Ledger enables you to make cross-currency payments of XRP and tokens. Cross-currency payments within the XRP Ledger are fully atomic, meaning the payment fully executes or no part of the payment executes at all.
Cross-currency payments deliver a fixed amount to their destination, but the sender can have a variable fee cost, depending on the paths taken to make the transaction work on the network. See:
Cross-currency Payments
.
This is a great payment option if you or the receiver prefer a specific token instead of the native XRP currency.
## /docs/use-cases/payments/smart-contracts-uc
Smart Contracts
Copy
A smart contract is a blockchain-based program that handles the conditions and executes the fulfillment of an agreement between two parties. Broken into its simplest components, a smart contract
does
something if
something else
happens.
The benefit of encoding a smart contract into a blockchain is that it enables contracts to be securely carried out without traditional third parties like financial or legal institutions. Instead, the contract is supervised by the distributed, decentralized network of computers that run the blockchain.
This enables you to transact with anybody without having to trust they'll uphold their end of a deal: the conditions of the smart contract force them to comply.
Conditionally Held Escrow
Smart contracts on the XRP Ledger work through conditionally held escrows.
Create the Escrow
A conditionally held escrow is similar to a normal escrow: you set aside funds with an escrow to guarantee funds are available to a recipient. The difference is that a conditionally held escrow on the ledger has a
Condition
attached to it, which serves as a lock on the funds. The ledger won't release those funds until an
EscrowFinish
transaction is submitted with the corresponding
Fulfillment
field.
The
Condition
and
Fulfillment
fields can be viewed as a lock and key on an escrow.
See:
EscrowCreate
.
Establish the Oracle
An oracle is a neutral third-party agent that can verify real-world events to either fulfill or invalidate a smart contract. Oracles are vital to making conditional escrows work by generating the condition and fulfillment, and keeping the fulfillment secret until the terms of the contract are met.
In the context of smart contracts, an oracle will most likely be software that can read real-world data. The oracle would be programmed with the terms of the contract between parties and generate the condition and fulfillment hex values.
The oracle gives the condition hex value to the escrow creator, enabling them to set up the escrow initially.
After the oracle's programming detects the conditions are met, it gives the fulfillment hex value to the escrow recipient. It does nothing else after this point, such as finishing the escrow. The recipient of the escrow would most likely finish the escrow.
See:
Send a conditional escrow
.
Examples
Smart contracts have a wide range of uses, but some uses include:
Handling payments on large-value items you would otherwise need lawyers for, such as mortgages.
Supply-chain management to ensure funds are delivered upon receipt of goods.
Automating certain kinds of insurance claims that can be verified 프로젝트로 돌아가기