The unique address of the transaction sender.
Optional
AccountHash value identifying another transaction. If provided, this transaction is only valid if the sending account's previously-sent transaction matches the provided hash.
The first of the two assets to fund this AMM with. This must be a positive amount.
The second of the two assets to fund this AMM with. This must be a positive amount.
Optional
FeeInteger amount of XRP, in drops, to be destroyed as a cost for distributing this transaction to the network. Some transaction types have different minimum requirements.
Optional
FlagsSet of bit-flags for this transaction.
Optional
LastHighest ledger index this transaction can appear in. Specifying this field places a strict upper limit on how long the transaction can wait to be validated or rejected.
Optional
MemosAdditional arbitrary information used to identify this transaction.
Optional
NetworkIDThe network id of the transaction.
Optional
SequenceThe sequence number of the account sending the transaction. A transaction is only valid if the Sequence number is exactly 1 greater than the previous transaction from the same account. The special case 0 means the transaction is using a Ticket instead.
Optional
SignersArray of objects that represent a multi-signature which authorizes this transaction.
Optional
SigningHex representation of the public key that corresponds to the private key used to sign this transaction. If an empty string, indicates a multi-signature is present in the Signers field instead.
Optional
SourceArbitrary integer used to identify the reason for this payment, or a sender on whose behalf this transaction is made. Conventionally, a refund should specify the initial payment's SourceTag as the refund payment's DestinationTag.
Optional
TicketThe sequence number of the ticket to use in place of a Sequence number. If this is provided, Sequence must be 0. Cannot be used with AccountTxnID.
The fee to charge for trades against this AMM instance, in units of 1/100,000; a value of 1 is equivalent to 0.001%. The maximum value is 1000, indicating a 1% fee. The minimum value is 0.
The type of transaction. Valid types include: Payment
, OfferCreate
,
TrustSet
, and many others.
Optional
TxnThe signature that verifies this transaction as originating from the account it says it is from.
Generated using TypeDoc
Create a new Automated Market Maker (AMM) instance for trading a pair of assets (fungible tokens or XRP).
Creates both an AMM object and a special AccountRoot object to represent the AMM. Also transfers ownership of the starting balance of both assets from the sender to the created AccountRoot and issues an initial balance of liquidity provider tokens (LP Tokens) from the AMM account to the sender.
CAUTION: When you create the AMM, you should fund it with (approximately) equal-value amounts of each asset. Otherwise, other users can profit at your expense by trading with this AMM (performing arbitrage). The currency risk that liquidity providers take on increases with the volatility (potential for imbalance) of the asset pair. The higher the trading fee, the more it offsets this risk, so it's best to set the trading fee based on the volatility of the asset pair.