Interface AmmDeposit
- All Superinterfaces:
Transaction
- All Known Implementing Classes:
ImmutableAmmDeposit
Object mapping for the AMMDeposit transaction.
This class will be marked Beta until the AMM amendment is enabled on mainnet. Its API is subject to
change.
-
Field Summary
Fields inherited from interface org.xrpl.xrpl4j.model.transactions.Transaction
typeMap -
Method Summary
Modifier and TypeMethodDescriptionamount()The amount of one asset to deposit to the AMM.amount2()The amount of another asset to add to the AMM.asset()The definition for one of the assets in the AMM's pool.asset2()The definition for the other asset in the AMM's pool.static ImmutableAmmDeposit.Builderbuilder()Construct aAmmDepositbuilder.The maximum effective price, in the deposit asset, to pay for each LP Token received.flags()AAmmDepositFlagsfor this transaction.How many of the AMM's LP Tokens to buy.An optionalTradingFeeto set on the AMM instance.Methods inherited from interface org.xrpl.xrpl4j.model.transactions.Transaction
account, accountTransactionId, delegate, fee, lastLedgerSequence, memos, networkId, sequence, signers, signingPublicKey, sourceTag, ticketSequence, transactionFlags, transactionSignature, transactionType, unknownFields, validateDelegateNotSameAsAccount
-
Method Details
-
builder
Construct aAmmDepositbuilder.- Returns:
- An
ImmutableAmmDeposit.Builder.
-
flags
AmmDepositFlags flags()AAmmDepositFlagsfor this transaction. This field must be set manually.- Returns:
- A
AmmDepositFlagsfor this transaction.
-
asset
Issue asset()The definition for one of the assets in the AMM's pool.- Returns:
- An
Issue.
-
asset2
Issue asset2()The definition for the other asset in the AMM's pool.- Returns:
- An
Issue.
-
amount
Optional<CurrencyAmount> amount()The amount of one asset to deposit to the AMM. If present, this must match the type of one of the assets (tokens or XRP) in the AMM's pool.- Returns:
- An optionally present
CurrencyAmount.
-
amount2
Optional<CurrencyAmount> amount2()The amount of another asset to add to the AMM. If present, this must match the type of the other asset in the AMM's pool and cannot be the same asset as Amount.- Returns:
- An optionally present
CurrencyAmount.
-
effectivePrice
Optional<CurrencyAmount> effectivePrice()The maximum effective price, in the deposit asset, to pay for each LP Token received.- Returns:
- An optionally present
CurrencyAmount.
-
lpTokenOut
Optional<CurrencyAmount> lpTokenOut()How many of the AMM's LP Tokens to buy.In a well-formed transaction, this field is always an
IssuedCurrencyAmount. However, the XRPL will fail AMM transactions that specifyXrpCurrencyAmounts with atecerror code, which means these malformed transactions can be included in validated ledgers. Therefore, this field is typed as aCurrencyAmountso that malformed transactions can be correctly deserialized. See #529- Returns:
- An optionally present
CurrencyAmount.
-
tradingFee
Optional<TradingFee> tradingFee()An optionalTradingFeeto set on the AMM instance. This field is only honored if the AMM's LP token balance is zero, and can only be set if flags isAmmDepositFlags.TWO_ASSET_IF_EMPTY.- Returns:
- An
OptionalTradingFee.
-