### Checkout Main Branch Source: https://github.com/xrplf/xrpl4j/blob/main/RELEASE.md Use this command to switch to the main branch and pull the latest changes before starting a release. ```bash git checkout main git pull ``` -------------------------------- ### Construct and Sign an XRP Payment Source: https://github.com/xrplf/xrpl4j/blob/main/README.md Illustrates constructing a payment transaction, signing it with an in-memory private key, and submitting it to the XRP Ledger. Requires setup of a SignatureService and defining sender and receiver details. ```java import org.xrpl.xrpl4j.client.XrplClient; import org.xrpl.xrpl4j.crypto.keys.PrivateKey; import org.xrpl.xrpl4j.crypto.keys.Seed; import org.xrpl.xrpl4j.crypto.signing.SignatureService; import org.xrpl.xrpl4j.crypto.signing.SingleSignedTransaction; import org.xrpl.xrpl4j.model.client.transactions.SubmitResult; import org.xrpl.xrpl4j.model.transactions.Address; import org.xrpl.xrpl4j.crypto.signing.bc.BcSignatureService; import org.xrpl.xrpl4j.model.transactions.Payment; // Construct a SignatureService that uses in-memory Keys (see SignatureService.java for alternatives). SignatureService signatureService = new BcSignatureService(); // Sender (using ed25519 key) Seed seed = Seed.ed25519Seed(); // <-- Generates a random seed. PrivateKey senderPrivateKey = seed.deriveKeyPair().privateKey(); // Receiver (using secp256k1 key) Address receiverAddress = Address.of("r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59"); // Construct a Payment Payment payment = ...; // See V3 ITs for examples. SingleSignedTransaction signedTransaction = signatureService.sign(sourcePrivateKey,payment); SubmitResult result = xrplClient.submit(signedTransaction); assert result.engineResult().equals("tesSUCCESS"); ``` -------------------------------- ### Handling CurrencyAmount in EscrowObject (v6) Source: https://github.com/xrplf/xrpl4j/blob/main/V6_MIGRATION.md Provides an example of how to handle the `CurrencyAmount` type in `EscrowObject` using `handle()` or `map()` methods to process XRP, IOU, or MPT amounts. ```java // Before (v5.x.x) XrpCurrencyAmount amount = escrowObject.amount(); UnsignedLong drops = amount.toDrops(); // After (v6.0.0) CurrencyAmount amount = escrowObject.amount(); amount.handle( // Handle XRP xrpAmount ->{ UnsignedLong drops = xrpAmount.toDrops(); }, // Handle IOU issuedCurrencyAmount ->{ String value = issuedCurrencyAmount.value(); }, // Handle MPT mptAmount ->{ UnsignedLong value = mptAmount.value(); } ); ``` -------------------------------- ### Handle XRP Issue Polymorphically in v7 Source: https://github.com/xrplf/xrpl4j/blob/main/V7_MIGRATION.md Example of using the `handle()` method to process an Issue object, specifically handling the XRP case. ```java issue.handle( // Handle XRP xrpIssue -> { String currency = xrpIssue.currency(); // "XRP" }, // Handle IOU iouIssue -> { String currency = iouIssue.currency(); Address issuer = iouIssue.issuer(); }, // Handle MPT mptIssue -> { MpTokenIssuanceId issuanceId = mptIssue.mptIssuanceId(); } ); ``` -------------------------------- ### Setting ALLOW_TRUSTLINE_LOCKING Flag (v6) Source: https://github.com/xrplf/xrpl4j/blob/main/V6_MIGRATION.md Example of how an IOU issuer can set the `ALLOW_TRUSTLINE_LOCKING` flag on their account using an `AccountSet` transaction in v6.0.0. ```java AccountSet accountSet = AccountSet.builder() .account(issuerAddress) .fee(XrpCurrencyAmount.ofDrops(12)) .sequence(accountInfo.accountData().sequence()) .setFlag(AccountSetFlag.ALLOW_TRUSTLINE_LOCKING) .signingPublicKey(issuerKeyPair.publicKey()) .build(); ``` -------------------------------- ### Example EscrowCreate Transaction JSON Output Source: https://github.com/xrplf/xrpl4j/blob/main/README.md This is the JSON output generated from an EscrowCreate Java object. It represents the structure of an EscrowCreate transaction as understood by the XRP Ledger. ```json { "Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "Fee" : "12", "Sequence" : 1, "SourceTag" : 11747, "Flags" : 2147483648, "Amount" : "10000", "Destination" : "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW", "DestinationTag" : 23480, "CancelAfter" : 533257958, "FinishAfter" : 533171558, "Condition" : "A0258020E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855810100", "TransactionType" : "EscrowCreate" } ``` -------------------------------- ### Build Project Locally with Maven Source: https://github.com/xrplf/xrpl4j/blob/main/README.md Commands to build and test the xrpl4j project using Maven. Includes options to skip integration and unit tests. ```bash mvn clean install ``` ```bash mvn clean install -DskipITs ``` ```bash mvn clean install -DskipITs -DskipTests ``` -------------------------------- ### Fetch Definitions using `xrpl.js` Library Source: https://github.com/xrplf/xrpl4j/blob/main/xrpl4j-core/src/main/resources/README.md This option is for users who do not have a local `xrpld` C++ server build. It leverages the `ripple-binary-codec` package within the `xrpl.js` library. Refer to the `xrpl.js` documentation for detailed instructions. -------------------------------- ### Checkout Release Branch for Patch Source: https://github.com/xrplf/xrpl4j/blob/main/RELEASE.md Switch to the existing release branch to prepare for a patch release. Replace `[major].[minor]` with the relevant version. ```bash git checkout releases/v[major].[minor] git pull ``` -------------------------------- ### Migrating EscrowCreate Amount to CurrencyAmount (v6) Source: https://github.com/xrplf/xrpl4j/blob/main/V6_MIGRATION.md Demonstrates how existing code using `XrpCurrencyAmount` for `EscrowCreate` remains compatible in v6.0.0 due to polymorphism. ```java // This still works in v6.0.0 EscrowCreate escrowCreate = EscrowCreate.builder() .account(sourceAddress) .destination(destinationAddress) .amount(XrpCurrencyAmount.ofDrops(1000000)) .fee(XrpCurrencyAmount.ofDrops(12)) .sequence(UnsignedInteger.ONE) .build(); ``` -------------------------------- ### Generate JKS Keystore with keytool Source: https://github.com/xrplf/xrpl4j/blob/main/xrpl4j-integration-tests/src/test/resources/crypto/CryptoREADME.md Use the `keytool` command to generate a PKCS12 keystore for storing private key material. Remember the passwords used during generation. ```bash > keytool -keystore ./crypto.p12 -storetype PKCS12 -genseckey -alias secret0 -keyalg aes -keysize 256 > keytool -keystore ./crypto.p12 -storetype PKCS12 -list ``` -------------------------------- ### Creating IOU Escrow with CurrencyAmount (v6) Source: https://github.com/xrplf/xrpl4j/blob/main/V6_MIGRATION.md Shows how to create an `EscrowCreate` transaction for IOU tokens using the new `CurrencyAmount` type in v6.0.0. ```java // New in v6.0.0: IOU escrow EscrowCreate iouEscrow = EscrowCreate.builder() .account(sourceAddress) .destination(destinationAddress) .amount(IssuedCurrencyAmount.builder() .currency("USD") .issuer(issuerAddress) .value("100") .build()) .fee(XrpCurrencyAmount.ofDrops(12)) .sequence(UnsignedInteger.ONE) .build(); ``` -------------------------------- ### Creating MPT Escrow with CurrencyAmount (v6) Source: https://github.com/xrplf/xrpl4j/blob/main/V6_MIGRATION.md Demonstrates creating an `EscrowCreate` transaction for Multi-Purpose Tokens (MPTs) using the `CurrencyAmount` type in v6.0.0. ```java // New in v6.0.0: MPT escrow EscrowCreate mptEscrow = EscrowCreate.builder() .account(sourceAddress) .destination(destinationAddress) .amount(MptCurrencyAmount.builder() .mptIssuanceId(mptIssuanceId) .value(UnsignedLong.valueOf(1000)) .build()) .fee(XrpCurrencyAmount.ofDrops(12)) .sequence(UnsignedInteger.ONE) .build(); ``` -------------------------------- ### Tag Release Source: https://github.com/xrplf/xrpl4j/blob/main/RELEASE.md Create and push a Git tag for the release. Replace `[major].[minor]` with the desired version numbers. ```bash git tag v[major].[minor].0 git push origin v[major].[minor].0 ``` -------------------------------- ### Configure JKS Keystore in application.yml Source: https://github.com/xrplf/xrpl4j/blob/main/xrpl4j-integration-tests/src/test/resources/crypto/CryptoREADME.md Configure your application to use a Java Keystore by specifying the keystore file, its password, and the alias and password for your secret. ```yaml jks: jks_filename: crypto.p12 jks_password: password secret0_alias: secret0 secret0_password: password ``` -------------------------------- ### Migrate IOU Issue Creation from v6 to v7 Source: https://github.com/xrplf/xrpl4j/blob/main/V7_MIGRATION.md Shows how to create IOU issues. The builder pattern remains, but uses the concrete IouIssue class in v7. ```java Issue usd = Issue.builder() .currency("USD") .issuer(issuerAddress) .build(); ``` ```java Issue usd = IouIssue.builder() .currency("USD") .issuer(issuerAddress) .build(); ``` -------------------------------- ### Export Definitions using `rippled` Binary Source: https://github.com/xrplf/xrpl4j/blob/main/xrpl4j-core/src/main/resources/README.md Export the XRP Ledger definitions directly from a local build of the `xrpld` C++ server to a file named `definitions.json`. ```bash # Export definitions to a local file ./rippled --get_definitions > definitions.json ``` -------------------------------- ### Create Release Branch Source: https://github.com/xrplf/xrpl4j/blob/main/RELEASE.md Create a new branch for the release from the main branch. Replace `[major].[minor]` with the desired version numbers. ```bash git checkout -b releases/v[major].[minor] ``` -------------------------------- ### Set Snapshot Version Source: https://github.com/xrplf/xrpl4j/blob/main/RELEASE.md Update the project's version to a SNAPSHOT version for the upcoming release. Replace `[major].[minor]` with the desired version numbers. ```bash mvn versions:set -DnewVersion=[major].[minor].0-SNAPSHOT ``` -------------------------------- ### EscrowCreate Amount Field Change (v5 vs v6) Source: https://github.com/xrplf/xrpl4j/blob/main/V6_MIGRATION.md Illustrates the change in the `amount()` field type from `XrpCurrencyAmount` to `CurrencyAmount` in `EscrowCreate` between v5 and v6. ```java @JsonProperty("Amount") XrpCurrencyAmount amount(); ``` ```java @JsonProperty("Amount") CurrencyAmount amount(); ``` -------------------------------- ### Create MPT Issue in v7 Source: https://github.com/xrplf/xrpl4j/blob/main/V7_MIGRATION.md Demonstrates the creation of a new MPT (Multi-Party Token) issue type introduced in v7.0.0. ```java Issue mpt = MptIssue.builder() .mptIssuanceId(mptIssuanceId) .build(); ``` -------------------------------- ### Create and Submit Multi-Signed Transaction in Java Source: https://github.com/xrplf/xrpl4j/blob/main/V3_MIGRATION.md Generate a MultiSignedTransaction by collecting signatures from multiple signers using BcSignatureService.multiSignToSigner, then submit it via XrplClient.submitMultisigned. ```java Set signers = Lists.newArrayList(aliceKeyPair, bobKeyPair).stream() .map(keyPair -> signatureService.multiSignToSigner(keyPair.privateKey(), unsignedPayment)) .collect(Collectors.toSet()); MultiSignedTransaction multiSigPayment = MultiSignedTransaction.builder() .unsignedTransaction(unsignedPayment) .signerSet(signers) .build(); SubmitMultiSignedResult paymentResult = xrplClient.submitMultisigned(multiSigPayment); ``` -------------------------------- ### Generate Random Wallet Seed and KeyPair in Java Source: https://github.com/xrplf/xrpl4j/blob/main/V3_MIGRATION.md Use the Seed class to generate a random seed and derive a KeyPair. The PublicKey from the KeyPair can then be used to derive the wallet's Address. ```java import org.xrpl.xrpl4j.crypto.keys.Seed; import org.xrpl.xrpl4j.crypto.keys.KeyPair; Seed randomSeed = Seed.ed25519Seed(); // To generate a random secp256k1 Seed, use Seed.secp256k1Seed() KeyPair keyPair = randomSeed.deriveKeyPair(); Address = keyPair.publicKey().deriveAddress(); ``` -------------------------------- ### AccountRootFlags for ALLOW_TRUSTLINE_LOCKING (v6) Source: https://github.com/xrplf/xrpl4j/blob/main/V6_MIGRATION.md Shows the `AccountRootFlags` constant and method for checking the `ALLOW_TRUSTLINE_LOCKING` flag, indicating if an account's tokens can be held in escrow. ```java public static final AccountRootFlags ALLOW_TRUSTLINE_LOCKING = new AccountRootFlags(0x40000000); public boolean lsfAllowTrustLineLocking() { return this.isSet(AccountRootFlags.ALLOW_TRUSTLINE_LOCKING); } ``` -------------------------------- ### Deploy Artifacts Source: https://github.com/xrplf/xrpl4j/blob/main/RELEASE.md Set the final release version and deploy artifacts to Maven Central. This command skips tests and uses the 'release' profile. ```bash mvn versions:set -DnewVersion=[major].[minor].0 mvn clean deploy -DskipTests -P release ``` -------------------------------- ### Create Seed from Entropy or Passphrase in Java Source: https://github.com/xrplf/xrpl4j/blob/main/V3_MIGRATION.md Restore Seeds of various types from new entropy, existing entropy bytes, or a passphrase, and then derive a KeyPair and Address from the Seed. ```java import org.xrpl.xrpl4j.crypto.keys.Seed; import org.xrpl.xrpl4j.crypto.keys.Entropy; import org.xrpl.xrpl4j.crypto.keys.Passphrase; // From new, random entropy Seed seedFromRandomEntropy = Seed.ed25519SeedFromEntropy(Entropy.newInstance)); // From existing entropy bytes Seed seedFromEntropy = Seed.ed25519SeedFromEntropy(BaseEncoding.base16().decode("0102030405060708090A0B0C0D0E0F10")) // From existing passphrase Seed seedFromPassphrase = Seed.ed25519SeedFromPassphrase(Passphrase.of("Hello World")); // From existing secret Seed seedFromSecret = Seed.fromBase58EncodedSecret(Base58EncodedSecret.of("snoPBrXtMeMyMHUVTgbuqAfg1SUTb")); ``` -------------------------------- ### Migrate XRP Issue Creation from v6 to v7 Source: https://github.com/xrplf/xrpl4j/blob/main/V7_MIGRATION.md Illustrates the change in creating XRP issues. In v7, XRP issues can be created using a static constant. ```java Issue xrp = Issue.builder().currency("XRP").build(); ``` ```java Issue xrp = Issue.XRP; // or XrpIssue.XRP ``` -------------------------------- ### Access Issue Details in v6 Source: https://github.com/xrplf/xrpl4j/blob/main/V7_MIGRATION.md Shows how currency and issuer were accessed directly from the Issue object in v6.x.x. ```java Issue issue = ammObject.asset(); String currency = issue.currency(); Optional
issuer = issue.issuer(); ``` -------------------------------- ### Bump Snapshot Version Source: https://github.com/xrplf/xrpl4j/blob/main/RELEASE.md After a release, bump the version back to a SNAPSHOT for future development. Replace `[major].[minor].[patch+1]` with the next version number. ```bash mvn versions:set -DnewVersion=[major].[minor].[patch+1]-SNAPSHOT git commit -m "Bump version to [major].[minor].[patch+1]-SNAPSHOT" git push ``` -------------------------------- ### Sign and Submit Single-Signed Transaction in Java Source: https://github.com/xrplf/xrpl4j/blob/main/V3_MIGRATION.md Use BcSignatureService to sign a transaction and then submit it using XrplClient.submit. This replaces older submit methods. ```java KeyPair keyPair = Seed.ed25519Seed().deriveKeyPair(); BcSignatureService signatureService = new BcSignatureService(); SingleSignedTransaction signedTransaction = signatureService.sign(keyPair.privateKey(), transaction); xrplClient.submit(signedTransaction); ``` -------------------------------- ### Add xrpl4j Core and Client Modules to Maven Source: https://github.com/xrplf/xrpl4j/blob/main/README.md Include the xrpl4j-core and xrpl4j-client modules in your Maven project's dependencies. Ensure the xrpl4j-bom is imported in dependencyManagement. ```xml org.xrpl xrpl4j-bom 5.0.0 pom import ... org.xrpl xrpl4j-core org.xrpl xrpl4j-client ... ``` -------------------------------- ### Generate XRPL Key Pair and Address Source: https://github.com/xrplf/xrpl4j/blob/main/README.md Use this snippet to generate a random seed, derive a key pair, and then derive the corresponding XRPL address from the public key. This is suitable for in-memory key management. ```java import org.xrpl.xrpl4j.crypto.keys.KeyPair; import org.xrpl.xrpl4j.crypto.keys.PrivateKey; import org.xrpl.xrpl4j.crypto.keys.PublicKey; import org.xrpl.xrpl4j.crypto.keys.Seed; import org.xrpl.xrpl4j.model.transactions.Address; Seed seed = Seed.ed25519Seed(); // <-- Generates a random seed. KeyPair keyPair = seed.deriveKeyPair(); // <-- Derive a KeyPair from the seed. PrivateKey privateKey = keyPair.privateKey(); // <-- Derive a privateKey from the KeyPair. PublicKey publicKey = keyPair.publicKey(); // <-- Derive a publicKey from the KeyPair. Address address = publicKey.deriveAddress(); // <-- Derive an address from the publicKey ``` -------------------------------- ### Fetch Definitions from a Live `rippled` Node Source: https://github.com/xrplf/xrpl4j/blob/main/xrpl4j-core/src/main/resources/README.md Retrieve XRP Ledger definitions from any live `rippled` node using its JSON-RPC interface. Note that the raw RPC response includes a `"result": { ... }` wrapper; this must be removed to obtain a standard `definitions.json` file, along with the status field. ```json { "method": "server_definitions", "params": [{}] } ``` -------------------------------- ### Tag Patch Release Source: https://github.com/xrplf/xrpl4j/blob/main/RELEASE.md Create and push a Git tag for a patch release. Replace `[major].[minor].[patch]` with the specific version numbers. ```bash git tag v[major].[minor].[patch] git push origin v[major].[minor].[patch] ``` -------------------------------- ### Generate ED25519 Seed, KeyPair, and Address in Java Source: https://github.com/xrplf/xrpl4j/blob/main/V3_MIGRATION.md Use this snippet to generate a new random ED25519 Seed, derive a KeyPair from it, and then derive the corresponding Address from the public key in v3.0.0. ```Java Seed seed = Seed.ed25519Seed(); KeyPair keyPair = seed.deriveKeyPair(); PublicKey publicKey = keyPair.publicKey(); PrivateKey privateKey = keyPair.privateKey(); Address = publicKey.deriveAddress(); ``` -------------------------------- ### Map Issue to String Representation in v7 Source: https://github.com/xrplf/xrpl4j/blob/main/V7_MIGRATION.md Demonstrates using the `map()` method to transform an Issue object into a descriptive string based on its type. ```java String description = issue.map( xrpIssue -> "XRP", iouIssue -> iouIssue.currency() + "/" + iouIssue.issuer(), mptIssue -> "MPT:" + mptIssue.mptIssuanceId() ); ``` -------------------------------- ### Deploy Patch Artifacts Source: https://github.com/xrplf/xrpl4j/blob/main/RELEASE.md Set the final patch version and deploy artifacts to Maven Central. This command skips tests and uses the 'release' profile. ```bash mvn versions:set -DnewVersion=[major].[minor].[patch] mvn clean deploy -DskipTests -P release ``` -------------------------------- ### New EscrowObject Fields (v6) Source: https://github.com/xrplf/xrpl4j/blob/main/V6_MIGRATION.md Shows the signatures for the new optional fields `transferRate()` and `issuerNode()` in `EscrowObject` and `MetaEscrowObject` introduced in v6.0.0. ```java Optional transferRate(); Optional issuerNode(); ``` -------------------------------- ### Construct an EscrowCreate Transaction Object in Java Source: https://github.com/xrplf/xrpl4j/blob/main/README.md Build an EscrowCreate transaction object using its builder pattern. This object models an EscrowCreate transaction on the XRP Ledger and requires various parameters like account, fee, sequence, amount, destination, and optional fields like destinationTag, cancelAfter, finishAfter, condition, and sourceTag. ```java EscrowCreate escrowCreate = EscrowCreate.builder() .account(Address.of("rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn")) .fee(XrpCurrencyAmount.ofDrops(12)) .sequence(UnsignedInteger.ONE) .amount(XrpCurrencyAmount.ofDrops(10000)) .destination(Address.of("rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW")) .destinationTag(UnsignedInteger.valueOf(23480)) .cancelAfter(UnsignedLong.valueOf(533257958)) .finishAfter(UnsignedLong.valueOf(533171558)) .condition(CryptoConditionReader.readCondition( BaseEncoding.base16() .decode("A0258020E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855810100")) ) .sourceTag(UnsignedInteger.valueOf(11747)) .build(); ``` -------------------------------- ### Import XRPL-4j BOM in Maven Project Source: https://github.com/xrplf/xrpl4j/blob/main/xrpl4j-bom/README.md Add this dependency to the `` section of your project's primary POM file to manage XRPL-4j dependency versions. ```xml ... ... ... ... ... org.xrpl.xrpl4j xrpl4j-bom 3.3.0 pom import ``` -------------------------------- ### Encode and Decode XRPL Payment Transaction Source: https://github.com/xrplf/xrpl4j/blob/main/xrpl4j-core/src/main/java/org/xrpl/xrpl4j/codec/binary/README.md Demonstrates encoding a Payment transaction from JSON to XRPL binary format and then decoding it back to JSON. Ensure `binaryCodec` is initialized. ```java String paymentJson="{"+ "Account" : "r45dBj4S3VvMMYXxr9vHX4Z4Ma6ifPMCkK", "Fee" : "789", "Sequence" : 56565656, "SourceTag" : 1, "Flags" : 2147483648, "Amount" : "12345", "Destination" : "rrrrrrrrrrrrrrrrrrrrBZbvji", "DestinationTag" : 2, "TransactionType" : "Payment" }"; System.out.println("JSON="+paymentJson); String binary=binaryCodec.encode(paymentJson); System.out.println("Binary hex="+binary); String decodedJson=binaryCodec.decode(binary); System.out.println("Decoded JSON="+decodedJson); ``` -------------------------------- ### Migrate SignatureUtils.addMultiSignaturesToTransaction() to Transaction.withSigners() Source: https://github.com/xrplf/xrpl4j/blob/main/V7_MIGRATION.md Replace calls to the removed `SignatureUtils.addMultiSignaturesToTransaction()` with the new `Transaction.withSigners()` method. This method is now used directly on the transaction object to apply multiple signers. ```java // Before (v6.x.x) Transaction multiSigned = signatureUtils.addMultiSignaturesToTransaction(transaction, signerWrappers); ``` ```java // After (v7.0.0) Transaction multiSigned = transaction.withSigners(signerWrappers); ``` -------------------------------- ### Migrate SignatureUtils.addSignatureToTransaction() to Transaction.withTransactionSignature() Source: https://github.com/xrplf/xrpl4j/blob/main/V7_MIGRATION.md Replace calls to the removed `SignatureUtils.addSignatureToTransaction()` with the new `Transaction.withTransactionSignature()` method. The signing flow now directly uses this method on the transaction object. ```java // Before (v6.x.x) SingleSignedTransaction signed = signatureUtils.addSignatureToTransaction(payment, signature); ``` ```java // After (v7.0.0) Transaction signedTx = payment.withTransactionSignature(signature); SingleSignedTransaction signed = SingleSignedTransaction.builder() .unsignedTransaction(payment) .signature(signature) .signedTransaction((Payment) signedTx) .build(); ``` -------------------------------- ### AccountSetFlag for IOU Escrows (v6) Source: https://github.com/xrplf/xrpl4j/blob/main/V6_MIGRATION.md Defines the new `ALLOW_TRUSTLINE_LOCKING` flag for `AccountSet` transactions, which IOU issuers must set to enable their tokens in escrows. ```java /** * Allow trust line tokens (IOUs) issued by this account to be held in escrow (requires the TokenEscrow amendment) * and can only be enabled by the issuer account. */ ALLOW_TRUSTLINE_LOCKING(17) ``` -------------------------------- ### Serialize Java Object to XRP Ledger JSON Source: https://github.com/xrplf/xrpl4j/blob/main/README.md Serialize a Java object, such as an EscrowCreate transaction, into its XRP Ledger JSON representation using ObjectMapperFactory. This is useful for sending transactions to the XRP Ledger network. ```java ObjectMapper objectMapper = ObjectMapperFactory.create(); String json = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(escrowCreate); System.out.println(json); ``` -------------------------------- ### MPT Locked Amount Tracking in Java Source: https://github.com/xrplf/xrpl4j/blob/main/V6_MIGRATION.md This Java code defines an optional field `lockedAmount` within `MpTokenObject` and `MpTokenIssuanceObject` to track amounts locked in escrows. It is automatically updated by the XRPL. ```java /** * The amount of this MPToken that is locked in escrows. */ @JsonProperty("LockedAmount") Optional lockedAmount(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.