Package org.xrpl.xrpl4j.model.ledger
Interface AmmObject
- All Superinterfaces:
LedgerObject
- All Known Implementing Classes:
ImmutableAmmObject
Represents an AMM ledger object, which describes a single Automated Market Maker instance.
This class will be marked Beta until the AMM amendment is enabled on mainnet. Its API is subject to
change.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.model.ledger.LedgerObject
LedgerObject.LedgerEntryType -
Method Summary
Modifier and TypeMethodDescriptionaccount()The address of the special account that holds this AMM's assets.asset()The definition for one of the two assets this AMM holds.asset2()The definition for the other asset this AMM holds.Details of the current owner of the auction slot.static ImmutableAmmObject.Builderbuilder()Construct aAmmObjectbuilder.default Flagsflags()A bit-map of boolean flags.index()The unique ID of theAmmObject.default LedgerObject.LedgerEntryTypeThe type of ledger object, which will always be "AMM" in this case.The total outstanding balance of liquidity provider tokens from this AMM instance.A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages.The percentage fee to be charged for trades against this AMM instance, in units of 1/10,000.A list of vote objects, representing votes on the pool's trading fee.
-
Method Details
-
builder
Construct aAmmObjectbuilder.- Returns:
- An
ImmutableAmmObject.Builder.
-
ledgerEntryType
The type of ledger object, which will always be "AMM" in this case.- Returns:
- Always returns
LedgerObject.LedgerEntryType.AMM.
-
flags
A bit-map of boolean flags. No flags are defined forAmmObject, so this value is always 0.- Returns:
- Always
Flags.UNSET.
-
asset
Issue asset()The definition for one of the two assets this AMM holds.- Returns:
- An
Issue.
-
asset2
Issue asset2()The definition for the other asset this AMM holds.- Returns:
- An
Issue.
-
account
Address account()The address of the special account that holds this AMM's assets.- Returns:
- An
Address.
-
auctionSlot
Optional<AuctionSlot> auctionSlot()Details of the current owner of the auction slot.- Returns:
- An
AuctionSlot.
-
lpTokenBalance
IssuedCurrencyAmount lpTokenBalance()The total outstanding balance of liquidity provider tokens from this AMM instance. The holders of these tokens can vote on the AMM's trading fee in proportion to their holdings, or redeem the tokens for a share of the AMM's assets which grows with the trading fees collected.- Returns:
- An
IssuedCurrencyAmount.
-
tradingFee
TradingFee tradingFee()The percentage fee to be charged for trades against this AMM instance, in units of 1/10,000. The maximum value is 1000, for a 1% fee.- Returns:
- A
TradingFee.
-
voteSlots
List<VoteEntryWrapper> voteSlots()A list of vote objects, representing votes on the pool's trading fee.- Returns:
- A
ListofVoteEntryWrappers.
-
ownerNode
String ownerNode()A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages.Note: The object does not contain a direct link to the owner directory containing it, since that value can be derived from the Account.
- Returns:
- A
Stringcontaining the owner node hint.
-
voteSlotsUnwrapped
-
index
Hash256 index()The unique ID of theAmmObject.- Returns:
- A
Hash256.
-