|
rippled
|
This changelog is intended to list all updates to the public API methods.
For info about how API versioning works, including examples, please view the XLS-22d spec. For details about the implementation of API versioning, view the implementation PR. API versioning ensures existing integrations and users continue to receive existing behavior, while those that request a higher API version will experience new behavior.
The API version controls the API behavior you see. This includes what properties you see in responses, what parameters you're permitted to send in requests, and so on. You specify the API version in each of your requests. When a breaking change is introduced to the rippled API, a new version is released. To avoid breaking your code, you should set (or increase) your version when you're ready to upgrade.
For a log of breaking changes, see the API Version [number] headings. In general, breaking changes are associated with a particular API Version number. For non-breaking changes, scroll to the XRP Ledger version [x.y.z] headings. Non-breaking changes are associated with a particular XRP Ledger (rippled) release.
API version 2 is available in rippled version 2.0.0 and later. To use this API, clients specify "api_version" : 2 in each request.
In API version 2, the following deprecated methods are no longer available: (https://github.com/XRPLF/rippled/pull/4759)
tx_history - Instead, use other methods such as account_tx or ledger with the transactions field set to true.ledger_header - Instead, use the ledger method.In API version 2, JSON elements for transaction output have been changed and made consistent for all methods which output transactions. (https://github.com/XRPLF/rippled/pull/4775) This helps to unify the JSON serialization format of transactions. (https://github.com/XRPLF/clio/issues/722, https://github.com/XRPLF/rippled/issues/4727)
tx_jsontx_blobmetameta_blobAdditionally, these elements are now consistently available next to tx_json (i.e. sibling elements), where possible:
hash - Transaction ID. This data was stored inside transaction output in API version 1, but in API version 2 is a sibling element.ledger_index - Ledger index (only set on validated ledgers)ledger_hash - Ledger hash (only set on closed or validated ledgers)close_time_iso - Ledger close time expressed in ISO 8601 time format (only set on validated ledgers)validated - Bool element set to true if the transaction is in a validated ledger, otherwise falseThis change affects the following methods:
tx - Transaction data moved into element tx_json (was inline inside result) or, if binary output was requested, moved from tx to tx_blob. Renamed binary transaction metadata element (if it was requested) from meta to meta_blob. Changed location of hash and added new elementsaccount_tx - Renamed transaction element from tx to tx_json. Renamed binary transaction metadata element (if it was requested) from meta to meta_blob. Changed location of hash and added new elementstransaction_entry - Renamed transaction metadata element from metadata to meta. Changed location of hash and added new elementssubscribe - Renamed transaction element from transaction to tx_json. Changed location of hash and added new elementssign, sign_for, submit and submit_multisigned - Changed location of hash element.When reading Payments, the Amount field should generally not be used. Instead, use delivered_amount to see the amount that the Payment delivered. To clarify its meaning, the Amount field is being renamed to DeliverMax. (https://github.com/XRPLF/rippled/pull/4733)
Payment transaction type, JSON RPC field Amount is renamed to DeliverMax. To enable smooth client transition, Amount is still handled, as described below: (https://github.com/XRPLF/rippled/pull/4733)submit_multisigned etc. methods), Amount is recognized as an alias to DeliverMax for both API version 1 and version 2 clients.Amount and DeliverMax fields is allowed only if they are identical; otherwise such input is rejected with rpcINVALID_PARAMS error.subscribe, account_tx etc. methods), DeliverMax is present in both API version 1 and version 2.Amount is only present in API version 1 and not in version 2.signer_lists is returned in the root of the response. (In API version 1, it was nested under account_data.) (https://github.com/XRPLF/rippled/pull/3770)signer_lists value, the API now returns an "invalidParams" error. (https://github.com/XRPLF/rippled/pull/4585)signer_lists must be a boolean. In API version 1, strings were accepted and may return a normal response - i.e. as if signer_lists were true.)ledger_index_min, ledger_index_max, and ledger_index returns invalidParams because if you use ledger_index_min or ledger_index_max, then it does not make sense to also specify ledger_index. In API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4571)ledger_index_min, ledger_index_max, and ledger_hash. (https://github.com/XRPLF/rippled/issues/4545#issuecomment-1565065579)ledger_index_min or ledger_index_max beyond the range of ledgers that the server has:lgrIdxMalformed in API version 2. Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/issues/4288)binary or forward parameters returns invalidParams (rpcINVALID_PARAMS). Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4620)transactions parameter returns invalidParams (rpcINVALID_PARAMS). Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4620)This version is supported by all rippled versions. For WebSocket and HTTP JSON-RPC requests, it is currently the default API version used when no api_version is specified.
The commandline always uses the latest API version. The command line is intended for ad-hoc usage by humans, not programs or automated scripts. The command line is not meant for use in production code.
The network_id field was added in the server_info response in version 1.5.0 (2019), but it is not returned in reporting mode. However, use of reporting mode is now discouraged, in favor of using Clio instead.
As of 2025-01-28, version 2.4.0 is in development. You can use a pre-release version by building from source or using the nightly package.
ledger_entry: state is added an alias for ripple_state.validators: Added new field validator_list_threshold in response.simulate: A new RPC that executes a dry run of a transaction submissionNetworkID field.Version 2.3.0 was released on Nov 25, 2024.
book_changes: If the requested ledger version is not available on this node, a ledgerNotFound error is returned and the node does not attempt to acquire the ledger from the p2p network (as with other non-admin RPCs).Admins can still attempt to retrieve old ledgers with the ledger_request RPC.
book_changes: Returns a validated field in its response, which was missing in prior versions.Version 2.2.0 was released on Jun 5, 2024. The following additions are non-breaking (because they are purely additive):
feature method now has a non-admin mode for users. (It was previously only available to admin connections.) The method returns an updated list of amendments, including their names and other information. (#4781)Version 2.0.0 was released on Jan 9, 2024. The following additions are non-breaking (because they are purely additive):
server_definitions: A new RPC that generates a definitions.json-like output that can be used in XRPL libraries.Payment transactions, DeliverMax has been added. This is a replacement for the Amount field, which should not be used. Typically, the delivered_amount (in transaction metadata) should be used. To ease the transition, DeliverMax is present regardless of API version, since adding a field is non-breaking.beta_rpc_api setting).The following is a non-breaking addition to the API.
feature method now has a non-admin mode for users. (It was previously only available to admin connections.) The method returns an updated list of amendments, including their names and other information. (#4781)Version 1.12.0 was released on Sep 6, 2023. The following additions are non-breaking (because they are purely additive).
server_info: Added ports, an array which advertises the RPC and WebSocket ports. This information is also included in the /crawl endpoint (which calls server_info internally). grpc and peer ports are also included. (https://github.com/XRPLF/rippled/pull/4427)ports contains objects, each containing a port for the listening port (a number string), and a protocol array listing the supported protocols on that port.featureClawback). (https://github.com/XRPLF/rippled/pull/4553)lsfAllowTrustLineClawback (https://github.com/XRPLF/rippled/pull/4617)asfAllowTrustLineClawback AccountSet Flag as well.AccountSet transaction to set the AllowTrustLineClawback flag. They must do this before creating any trust lines, offers, escrows, payment channels, or checks.Account: The issuer of the asset being clawed back. Must also be the sender of the transaction.Amount: The amount being clawed back, with the Amount.issuer being the token holder's address.amm_info API to retrieve AMM information for a given tokens pair.AMMCreate transaction type to create AMM instance.AMMDeposit transaction type to deposit funds into AMM instance.AMMWithdraw transaction type to withdraw funds from AMM instance.AMMVote transaction type to vote for the trading fee of AMM instance.AMMBid transaction type to bid for the Auction Slot of AMM instance.AMMDelete transaction type to delete AMM instance.sfAMMID to AccountRoot to indicate that the account is AMM's account. AMMID is used to fetch ltAMM.lsfAMMNode TrustLine flag to indicate that one side of the TrustLine is AMM account.tfLPToken, tfSingleAsset, tfTwoAsset, tfOneAssetLPToken, tfLimitLPToken, tfTwoAssetIfEmpty, tfWithdrawAll, tfOneAssetWithdrawAll which allow a trader to specify different fields combination for AMMDeposit and AMMWithdraw transactions.Version 1.11.0 was released on Jun 20, 2023.
feature admin API, there is a new possible value for the vetoed field. (https://github.com/XRPLF/rippled/pull/4291)vetoed can now be true, false, or "Obsolete".ledger_data method, when all entries are filtered out, the state field of the response is now an empty list (in other words, an empty array, []). (Previously, it would return null.) While this is technically a breaking change, the new behavior is consistent with the documentation, so this is considered only a bug fix. (https://github.com/XRPLF/rippled/pull/4398)fixNFTokenRemint amendment activates, there will be a new AccountRoot field, FirstNFTSequence. This field is set to the current account sequence when the account issues their first NFT. If an account has not issued any NFTs, then the field is not set. (#4406)FirstNFTSequence + MintedNFTokens + 256 is less than the current ledger sequence.NetworkID. (https://github.com/XRPLF/rippled/pull/4370)telNETWORK_ID_MAKES_TX_NON_CANONICAL: a NetworkID is present but the chain's network ID is less than 1025. Remove the field from the transaction, and try again.telREQUIRES_NETWORK_ID: a NetworkID is required, but is not present. Add the field to the transaction, and try again.telWRONG_NETWORK: a NetworkID is specified, but it is for a different network. Submit the transaction to a different server which is connected to the correct network.nftoken_id, nftoken_ids and offer_id meta fields into NFT tx and account_tx responses. (https://github.com/XRPLF/rippled/pull/4447)account_flags object to the account_info method response. (https://github.com/XRPLF/rippled/pull/4459)NFTokenPages to the account_objects RPC. (https://github.com/XRPLF/rippled/pull/4352)marker returned from the account_lines command would not work on subsequent commands. (https://github.com/XRPLF/rippled/pull/4361)Version 1.10.0 was released on Mar 14, 2023.
XRPFees feature is enabled, the fee_ref field will be removed from the ledger subscription stream, because it will no longer have any meaning.The following information is useful to developers contributing to this project:
The purpose of unit tests is to catch bugs and prevent regressions. In general, it often makes sense to create a test function when there is a breaking change to the API. For APIs that have changed in a new API version, the tests should be modified so that both the prior version and the new version are properly tested.
To take one example: for account_info version 1, WebSocket and JSON-RPC behavior should be tested. The latest API version, i.e. API version 2, should be tested over WebSocket, JSON-RPC, and command line.