bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 28쪽 중 22쪽
in human-readable format.
server_state
- Retrieve status of the server in machine-readable format.
server_definitions
- Retrieve a list of types and fields used for the XRPL's canonical binary format.
manifest
- Retrieve the latest ephemeral public key information about a known validator.
Clio Methods
Use these methods to retrieve information using Clio server APIs.
server_info
- Retrieve status of the Clio server.
ledger
- Get info about a ledger version using Clio server's
ledger
API.
nft_info
- Retrieve information about the specified NFT using Clio server's
nft_info
API.
nft_history
- Retrieve the history of ownership and transfers for the specified NFT.
nfts_by_issuer
- Returns a list of NFTokens that are issued by the specified account.
Utility Methods
Use these methods to perform convenient tasks, such as ping and random number generation.
json
- Use as a proxy to running other commands. Accepts the parameters for the command as a JSON value.
Commandline only.
ping
- Confirm connectivity with the server.
random
- Generate a random number.
Vault Methods
Use these methods to retrieve vault information.
vault_info
- Get information about a specific vault.
Deprecated Methods
The following methods are deprecated and either have been removed, or may be removed without further notice:
owner_info
- Use
account_objects
instead.
tx_history
- Use either the
account_tx method
, or the
ledger method
with the
transactions
field set to
true
.
## /docs/references/protocol/transactions/transaction-results
Transaction Results
Copy
[Source]
The
xrpld
server summarizes transaction results with result codes, which appear in fields such as
engine_result
and
meta.TransactionResult
. These codes are grouped into several categories of with different prefixes:
Category
Prefix
Description
Claimed cost only
tec
The transaction did not achieve its intended purpose, but the
transaction cost
was destroyed. This result is only final in a validated ledger.
Failure
tef
The transaction cannot be applied to the server's current (in-progress) ledger or any later one. It may have already been applied, or the condition of the ledger makes it impossible to apply in the future.
Local error
tel
The
xrpld
server had an error due to local conditions, such as high load. You may get a different response if you resubmit to a different server or at a different time.
Malformed transaction
tem
The transaction was not valid, due to improper syntax, conflicting options, a bad signature, or something else.
Retry
ter
The transaction could not be applied, but it could apply successfully in a future ledger.
Success
tes
(Not an error) The transaction succeeded. This result only final in a validated ledger.
The
xrpld
server automatically retries failed transactions. It is important not to assume that a transaction has completely failed based on a tentative failure result. A transaction may later succeed unless its success or failure is
final
.
Warning
Transactions' provisional result codes may differ than their final result. Transactions that provisionally succeeded may eventually fail and transactions that provisionally failed may eventually succeed. Transactions that provisionally failed may also eventually fail with a different code. See
finality of results
for how to know when a transaction's result is final.
The distinction between a local error (
tel
) and a malformed transaction (
tem
) is a matter of protocol-level rules. For example, the protocol sets no limit on the maximum number of paths that can be included in a transaction. However, a server may define a finite limit of paths it can process. If two different servers are configured differently, then one of them may return a
tel
error for a transaction with many paths, while the other server could successfully process the transaction. If enough servers are able to process the transaction that it survives consensus, then it can still be included in a validated ledger.
By contrast, a
tem
error implies that no server anywhere can apply the transaction, regardless of settings. Either the transaction breaks the rules of the protocol, it is unacceptably ambiguous, or it is completely nonsensical. The only way a malformed transaction could become valid is through changes in the protocol; for example, if a new feature is adopted, then transactions using that feature could be considered malformed by servers that are running older software which predates that feature.
Immediate Response
The response from the
submit method
contains a provisional result from the
xrpld
server indicating what happened during local processing of the transaction.
The response from
submit
contains the following fields:
Field
Value
Description
engine_result
String
A code indicating the outcome of the transaction, such as
tecPATH_DRY
.
engine_result_code
Signed Integer
A number that corresponds to the
engine_result
. The exact values are subject to change without notice.
engine_result_message
String
A human-readable message explaining what happened. This message is intended for developers to diagnose problems, and is subject to change without notice.
If nothing went wrong when submitting and applying the transaction locally, the response looks like this:
"engine_result"
:
"tesSUCCESS"
,
"engine_result_code"
:
0
,
"engine_result_message"
:
"The transaction was applied. Only final in a validated ledger."
Note
A successful result at this stage does not indicate that the transaction has completely succeeded; only that it was successfully applied to the provisional version of the ledger kept by the local server. Failed results at this stage are also provisional and may change. See
Finality of Results
for details.
## /docs/references/protocol/transactions/metadata
Transaction Metadata
Copy
Transaction metadata is a section of data that gets added to a transaction after it is processed. Any transaction that gets included in a ledger has metadata, regardless of whether it is successful. The transaction metadata describes the outcome of the transaction in detail.
Warning
The changes described in transaction metadata are only final if the transaction is in a validated ledger version.
Some fields that may appear in transaction metadata include:
Field
Value
Description
AffectedNodes
Array
List of
ledger entries
that were created, deleted, or modified by this transaction, and specific changes to each.
DeliveredAmount
Currency Amount
(May be omitted)
For a
partial payment
, this field records the amount of currency actually delivered to the destination. To avoid errors when reading transactions, instead use the
delivered_amount
field, which is provided for all Payment transactions, partial or not.
TransactionIndex
Unsigned Integer
The transaction's position within the ledger that included it. This is zero-indexed. (For example, the value
2
means it was the 3rd transaction in that ledger.)
TransactionResult
String
A
result code
indicating whether the transaction succeeded or how it failed.
delivered_amount
Currency Amount
(Omitted for non-Payment transactions)
The amount of currency actually received by the
Destination
account. Use this field to determine how much was delivered, regardless of whether the transaction is a
partial payment
. See
this description
for details.
Example Metadata
The following JSON object shows the metadata for an order,
trading XRP for USD
:
"meta"
: {
"AffectedNodes"
: [
{
"ModifiedNode"
: {
"FinalFields"
: {
"Account"
:
"rBTwLga3i2gz3doX6Gva3MgEV8ZCD8jjah"
,
"Balance"
:
"27724423128"
,
"Flags"
:
0
,
"OwnerCount"
:
14
,
"Sequence"
:
129693478
},
"LedgerEntryType"
:
"AccountRoot"
,
"LedgerIndex"
:
"1ED8DDFD80F275CB1CE7F18BB9D906655DE8029805D8B95FB9020B30425821EB"
,
"PreviousFields"
: {
"Balance"
:
"27719423228"
,
"Sequence"
:
129693477
},
"PreviousTxnID"
:
"3110F983CDC090750B45C9BFB74B8CE629CA80F57C35612402B2760153822BA5"
,
"PreviousTxnLgrSeq"
:
86724072
}
},
{
"DeletedNode"
: {
"FinalFields"
: {
"Account"
:
"rPx6Rbh8fStXeP3LwECBisownN2ZyMyzYS"
,
"BookDirectory"
:
"DFA3B6DDAB58C7E8E5D944E736DA4B7046C30E4F460FD9DE4E1566CBCC208000"
,
"BookNode"
:
"0"
,
"Flags"
:
0
,
"OwnerNode"
:
"0"
,
"PreviousTxnID"
:
"DCB061EC44BBF73BBC20CE0432E9D8D7C4B8B28ABA8AE5A5BA687476E7A796EF"
,
"PreviousTxnLgrSeq"
:
86724050
,
"Sequence"
:
86586865
,
"TakerGets"
:
"0"
,
"TakerPays"
: {
"currency"
:
"USD"
,
"issuer"
:
"rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
,
"value"
:
"0"
}
},
"LedgerEntryType"
:
"Offer"
,
"LedgerIndex"
:
"348AF66EBD872FBF2BD23085D3FB4A200E15509451475027C4A5EE8D8B77C623"
,
"PreviousFields"
: {
"TakerGets"
:
"5000000"
,
"TakerPays"
: {
"currency"
:
"USD"
,
"issuer"
:
"rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
,
"value"
:
"3.012"
}
}
}
},
{
"ModifiedNode"
: {
"FinalFields"
: {
"Flags"
:
0
,
"Owner"
:
"rPx6Rbh8fStXeP3LwECBisownN2ZyMyzYS"
,
"RootIndex"
:
"4A68E363398C8DA470CF85237CA4A044476CD38BA7D5C9B8E8F19417A13B01C1"
},
"LedgerEntryType"
:
"DirectoryNode"
,
"LedgerIndex"
:
"4A68E363398C8DA470CF85237CA4A044476CD38BA7D5C9B8E8F19417A13B01C1"
}
},
{
"ModifiedNode"
: {
"FinalFields"
: {
"Balance"
: {
"currency"
:
"USD"
,
"issuer"
:
"rrrrrrrrrrrrrrrrrrrrBZbvji"
,
"value"
:
"-3.0120000001701"
},
"Flags"
:
2228224
,
"HighLimit"
: {
"currency"
:
"USD"
,
"issuer"
:
"rPx6Rbh8fStXeP3LwECBisownN2ZyMyzYS"
,
"value"
:
"0"
},
"HighNode"
:
"0"
,
"LowLimit"
: {
"currency"
:
"USD"
,
"issuer"
:
"rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
,
"value"
:
"0"
},
"LowNode"
:
"bd5"
},
"LedgerEntryType"
:
"RippleState"
,
"LedgerIndex"
:
"7345788A2C9121EB8168D2755950887CED3887CCDBC882015BC070A61C2AD1DA"
,
"PreviousFields"
: {
"Balance"
: {
"currency"
:
"USD"
,
"issuer"
:
"rrrrrrrrrrrrrrrrrrrrBZbvji"
,
"value"
:
"-0.0000000001701"
}
},
"PreviousTxnID"
:
"B4726FC087FAB3DB3578A34095B96F9055075A86A16CE741B406D91202685998"
,
"PreviousTxnLgrSeq"
:
86722015
}
},
{
"ModifiedNode"
: {
"FinalFields"
: {
"Balance"
: {
"currency"
:
"USD"
,
"issuer"
:
"rrrrrrrrrrrrrrrrrrrrBZbvji"
,
"value"
:
"-52157.74818800332"
},
"Flags"
:
2228224
,
"HighLimit"
: {
"currency"
:
"USD"
,
"issuer"
:
"rBTwLga3i2gz3doX6Gva3MgEV8ZCD8jjah"
,
"value"
:
"1000000000"
},
"HighNode"
:
"0"
,
"LowLimit"
: {
"currency"
:
"USD"
,
"issuer"
:
"rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
,
"value"
:
"0"
},
"LowNode"
:
"b29"
},
"LedgerEntryType"
:
"RippleState"
,
"LedgerIndex"
:
"8250CE37F6495903C1F7D16E072E8823ECE06FA73F011A0F8D79D5626BF581BB"
,
"PreviousFields"
: {
"Balance"
: {
"currency"
:
"USD"
,
"issuer"
:
"rrrrrrrrrrrrrrrrrrrrBZbvji"
,
"value"
:
"-52160.76470600332"
}
},
"PreviousTxnID"
:
"B4726FC087FAB3DB3578A34095B96F9055075A86A16CE741B406D91202685998"
,
"PreviousTxnLgrSeq"
:
86722015
}
},
{
"ModifiedNode"
: {
"FinalFields"
: {
"Account"
:
"rPx6Rbh8fStXeP3LwECBisownN2ZyMyzYS"
,
"Balance"
:
"52479871"
,
"Flags"
:
0
,
"OwnerCount"
:
2
,
"Sequence"
:
86586866
},
"LedgerEntryType"
:
"AccountRoot"
,
"LedgerIndex"
:
"9D398F1DEA77448C78196D6B01289A13D32DFCB4F9023A2A06338F893FA85521"
,
"PreviousFields"
: {
"Balance"
:
"57479871"
,
"OwnerCount"
:
3
},
"PreviousTxnID"
:
"DCB061EC44BBF73BBC20CE0432E9D8D7C4B8B28ABA8AE5A5BA687476E7A796EF"
,
"PreviousTxnLgrSeq"
:
86724050
}
},
{
"DeletedNode"
: {
"FinalFields"
: {
"ExchangeRate"
:
"4e1566cbcc208000"
,
"Flags"
:
0
,
"RootIndex"
:
"DFA3B6DDAB58C7E8E5D944E736DA4B7046C30E4F460FD9DE4E1566CBCC208000"
,
"TakerGetsCurrency"
:
"0000000000000000000000000000000000000000"
,
"TakerGetsIssuer"
:
"0000000000000000000000000000000000000000"
,
"TakerPaysCurrency"
:
"0000000000000000000000005553440000000000"
,
"TakerPaysIssuer"
:
"0A20B3C85F482532A9578DBB3950B85CA06594D1"
},
"LedgerEntryType"
:
"DirectoryNode"
,
"LedgerIndex"
:
"DFA3B6DDAB58C7E8E5D944E736DA4B7046C30E4F460FD9DE4E1566CBCC208000"
}
}
],
"TransactionIndex"
:
5
,
"TransactionResult"
:
"tesSUCCESS"
}
AffectedNodes
The
AffectedNodes
array contains a complete list of the
ledger entries
that this transaction modified in some way. Each item in this array is an object with one top-level field indicating what happened:
CreatedNode
indicates that the transaction created a new ledger entry.
DeletedNode
indicates that the transaction removed a ledger entry
ModifiedNode
indicates that the transaction modified an existing ledger entry.
The value of each of these fields is a JSON object describing the changes made to the ledger entry.
CreatedNode Fields
A
CreatedNode
object contains the following fields:
Field
Value
Description
LedgerEntryType
String
The
type of ledger entry
that was created.
LedgerIndex
String -
Hash
The
ID of this ledger entry
in the ledger's
state tree
.
Note:
This is
not the same
as a
ledger index
, even though the field name is very similar.
NewFields
Object
The content fields of the newly created ledger entry. Which fields are present depends on what type of ledger entry was created.
DeletedNode Fields
A
DeletedNode
object contains the following fields:
Field
Value
Description
LedgerEntryType
String
The
type of ledger entry
that was deleted.
LedgerIndex
String -
Hash
The
ID of this ledger entry
in the ledger's
state tree
.
Note:
This is
not the same
as a
ledger index
, even though the field name is very similar.
FinalFields
Object
The content fields of the ledger entry immediately before it was deleted. Which fields are present depends on what type of ledger entry was created.
PreviousFields
Object
(May be omitted)
Selected fields of the ledger entry before it was deleted. Which fields are present depends on what type of ledger entry was created.
ModifiedNode Fields
A
ModifiedNode
object contains the following fields:
Field
Value
Description
LedgerEntryType
String
The
type of ledger entry
that was modified.
LedgerIndex
String -
Hash
The
ID of this ledger entry
in the ledger's
state tree
.
Note:
This is
not the same
as a
ledger index
, even though the field name is very similar.
FinalFields
Object
The content fields of the ledger entry after applying any changes from this transaction. Which fields are present depends on what type of ledger entry was created. This omits the
PreviousTxnID
and
PreviousTxnLgrSeq
fields, even though most types of ledger entries have them.
PreviousFields
Object
The previous values for all fields of the object that were changed as a result of this transaction. If the transaction
only added
fields to the object, this field is an empty object.
PreviousTxnID
String -
Hash
(May be omitted)
The
identifying hash
of the previous transaction to modify this ledger entry. Omitted for ledger entry types that do not have a
PreviousTxnID
field.
PreviousTxnLgrSeq
Number -
Ledger Index
(May be omitted)
The
Ledger Index
of the ledger version containing the previous transaction to modify this ledger entry. Omitted for ledger entry types that do not have a
PreviousTxnLgrSeq
field.
Note
If the modified ledger entry has
PreviousTxnID
and
PreviousTxnLgrSeq
fields, the transaction always updates them with the transaction's own identifying hash and the index of the ledger version that included the transaction, but these fields' new value is not listed in the
FinalFields
of the
ModifiedNode
object, and their previous values are listed at the top level of the
ModifiedNode
object rather than in the nested
PreviousFields
object.
NFT Fields
Transactions (
tx
and
account_tx
) involving NFTs can contain the following fields in the metadata. These values are added by the Clio server at request time and are not stored in the hashed binary metadata:
Field
Value
Description
nftoken_id
String
Shows the
NFTokenID
for the
NFToken
that changed on the ledger as a result of the transaction. Only present if the transaction is
NFTokenMint
or
NFTokenAcceptOffer
. See
NFTokenID
.
nftoken_ids
Array
Shows all the
NFTokenIDs
for the
NFTokens
that changed on the ledger as a result of the transaction. Only present if the transaction is
NFTokenCancelOffer
.
offer_id
String
Shows the
OfferID
of a new
NFTokenOffer
in a response from a
NFTokenCreateOffer
transaction.
MPT Fields
Requires the
MPTokensV1
amendment
.
Loading...
Synthetic mpt_issuance_id field
MPTokenIssuanceID
is an identifier that allows you to specify an
MPTokenIssuance
in RPCs. The server adds a synthetically parsed
mpt_issuance_id
field to API responses to avoid the need for client-side parsing of the
MPTokenIssuanceID
.
Transaction Metadata
An
mpt_issuance_id
field is provided in JSON transaction metadata (not available for binary) for all successful
MPTokenIssuanceCreate
transactions. The following APIs are impacted:
tx
,
account_tx
,
subscribe
and
ledger
.
delivered_amount
The
Amount
of a
Payment transaction
indicates the amount to deliver to the
Destination
, so if the transaction was successful, then the destination received that much --
except if the transaction was a
partial payment
. (In that case, any positive amount up to
Amount
might have arrived.) Rather than choosing whether or not to trust the
Amount
field, you should use the
delivered_amount
field of the metadata to see how much actually reached its destination.
The
xrpld
server provides a
delivered_amount
field in JSON transaction metadata for all successful
Payment
,
CheckCash
, and
AccountDelete
transactions. This field is formatted like a normal currency amount. However, the delivered amount is not available for transactions that meet both of the following criteria:
Is a partial payment
Included in a validated ledger before 2014-01-20
If both conditions are true, then
delivered_amount
contains the string value
unavailable
instead of an actual amount. If this happens, you can only figure out the actual delivered amount by reading the
AffectedNodes
in the transaction's metadata.
The
ledger
method's expanded output (
expand
, or admin-only
full
) includes
delivered_amount
for these same transaction types, consistent with
tx
,
account_tx
, and
subscribe
.
Note
The
delivered_amount
field is generated on-demand for the request, and is not included in the binary format for transaction metadata, nor is it used when calculating the
hash
of the transaction metadata. In contrast, the
DeliveredAmount
field
is
included in the binary format for partial payment transactions after 2014-01-20.
See also:
Partial Payments
## /docs/infrastructure/commandline-usage
Commandline Usage
Copy
The
xrpld
executable usually runs as a daemon that powers the XRP Ledger, although it can also run in other modes. It was renamed from
rippled
to
xrpld
.
Backward compatibility
The former name,
rippled
, still works as a symlink to
xrpld
, so existing scripts and automation continue to work during the transition.
This page describes all the options you can pass to
xrpld
when running it from the command line.
Available Modes
Daemon Mode
- The default. Connect to the XRP Ledger to process transactions and build a ledger database.
Stand-Alone Mode
- Use the
-a
or
--standalone
option. Like daemon mode, except it does not connect to other servers. You can use this mode to test transaction processing or other features.
Client Mode
- Specify an API method name to connect to another
xrpld
server as a JSON-RPC client, then exit. You can use this to look up server status and ledger data if the executable is already running in another process.
Other Usage
- Each of the following commands causes the
xrpld
executable to print some information, then exit:
Help
- Use
-h
or
--help
to print a usage statement.
Unit Tests
- Use
-u
or
--unittest
to run unit tests and print a summary of results. Th프로젝트로 돌아가기