XRPL Transaction Models¶
Use these models to prepare or process XRP Ledger transactions.
Base Transaction Model¶
The base model for all transactions and their nested object types.
-
class
xrpl.models.transactions.transaction.
Memo
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.base_model.BaseModel
An arbitrary piece of data attached to a transaction. A transaction can have multiple Memo objects as an array in the Memos field. Must contain one or more of
memo_data
,memo_format
, andmemo_type
.-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.base_model.BaseModel¶ Construct a new BaseModel from a dictionary of parameters.
- Parameters
value – The value to construct the BaseModel from.
- Returns
A new BaseModel object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
memo_data
: Optional[str] = None¶ The data of the memo, as a hexadecimal string.
-
memo_format
: Optional[str] = None¶ The format of the memo, as a hexadecimal string. Conventionally, this should be the MIME type of the memo data.
-
memo_type
: Optional[str] = None¶ The type of the memo, as a hexadecimal string. Conventionally, this should be an RFC 5988 relation defining the format of the memo data.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a BaseModel.
If not overridden, returns the object dict with all non-None values.
- Returns
The dictionary representation of a BaseModel.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
classmethod
-
class
xrpl.models.transactions.transaction.
Signer
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.base_model.BaseModel
One Signer in a multi-signature. A multi-signed transaction can have an array of up to 8 Signers, each contributing a signature, in the Signers field.
-
account
: str = <object object>¶ The address of the Signer. This can be a funded account in the XRP Ledger or an unfunded address. This field is required.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.base_model.BaseModel¶ Construct a new BaseModel from a dictionary of parameters.
- Parameters
value – The value to construct the BaseModel from.
- Returns
A new BaseModel object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Returns True if the input dictionary was derived by the to_dict method of an instance of this class. In other words, True if this is a dictionary representation of an instance of this class.
NOTE: does not account for model inheritance, IE will only return True if dictionary represents an instance of this class, but not if dictionary represents an instance of a subclass of this class.
- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a dict representation of an instance of this class.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
signing_pub_key
: str = <object object>¶ The public key that should be used to verify this Signer’s signature. This field is required.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Signer.
- Returns
The dictionary representation of a Signer.
-
txn_signature
: str = <object object>¶ The signature that this Signer provided for this transaction. This field is required.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.transaction.
Transaction
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.base_model.BaseModel
The base class for all transaction types. Represents fields common to all transaction types.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
memos
: Optional[List[xrpl.models.transactions.transaction.Memo]] = None¶ Additional arbitrary information attached to this transaction.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[xrpl.models.transactions.transaction.Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: xrpl.models.transactions.transaction.TransactionType = <object object>¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.transaction.
TransactionType
(value)¶ Bases:
str
,enum.Enum
Enum containing the different Transaction types.
-
ACCOUNT_DELETE
= 'AccountDelete'¶
-
ACCOUNT_SET
= 'AccountSet'¶
-
CHECK_CANCEL
= 'CheckCancel'¶
-
CHECK_CASH
= 'CheckCash'¶
-
CHECK_CREATE
= 'CheckCreate'¶
-
DEPOSIT_PREAUTH
= 'DepositPreauth'¶
-
ESCROW_CANCEL
= 'EscrowCancel'¶
-
ESCROW_CREATE
= 'EscrowCreate'¶
-
ESCROW_FINISH
= 'EscrowFinish'¶
-
OFFER_CANCEL
= 'OfferCancel'¶
-
OFFER_CREATE
= 'OfferCreate'¶
-
PAYMENT
= 'Payment'¶
-
PAYMENT_CHANNEL_CLAIM
= 'PaymentChannelClaim'¶
-
PAYMENT_CHANNEL_CREATE
= 'PaymentChannelCreate'¶
-
PAYMENT_CHANNEL_FUND
= 'PaymentChannelFund'¶
-
SET_REGULAR_KEY
= 'SetRegularKey'¶
-
SIGNER_LIST_SET
= 'SignerListSet'¶
-
TRUST_SET
= 'TrustSet'¶
-
Specific Transaction Types¶
Model objects for specific types of Transactions in the XRP Ledger.
-
class
xrpl.models.transactions.
AccountDelete
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents an AccountDelete transaction, which deletes an account and any objects it owns in the XRP Ledger, if possible, sending the account’s remaining XRP to a specified destination account.
See Deletion of Accounts for the requirements to delete an account.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
destination
: str = <object object>¶ The address of the account to send any remaining XRP to. This field is required.
-
destination_tag
: Optional[int] = None¶ The destination tag at the
destination
account where funds should be sent.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: xrpl.models.transactions.transaction.TransactionType = 'AccountDelete'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
AccountSet
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents an AccountSet transaction, which modifies the properties of an account in the XRP Ledger.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
clear_flag
: Optional[int] = None¶ Disable a specific AccountSet Flag
-
domain
: Optional[str] = None¶ Set the DNS domain of the account owner.
-
email_hash
: Optional[str] = None¶ Set the MD5 Hash to be used for generating an avatar image for this account.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
message_key
: Optional[str] = None¶ Set a public key for sending encrypted messages to this account.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
set_flag
: Optional[int] = None¶ Enable a specific AccountSet Flag
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
tick_size
: Optional[int] = None¶ Set the tick size to use when trading tokens issued by this account in the decentralized exchange. See Tick Size for details.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: TransactionType = 'AccountSet'¶
-
transfer_rate
: Optional[int] = None¶ Set the transfer fee to use for tokens issued by this account. See TransferRate for details.
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
AccountSetFlag
(value)¶ Bases:
int
,enum.Enum
There are several options which can be either enabled or disabled for an account. Account options are represented by different types of flags depending on the situation. The AccountSet transaction type has several “AccountSet Flags” (prefixed asf) that can enable an option when passed as the SetFlag parameter, or disable an option when passed as the ClearFlag parameter. This enum represents those options.
-
ASF_ACCOUNT_TXN_ID
= 5¶ Track the ID of this account’s most recent transaction. Required for AccountTxnID
-
ASF_DEPOSIT_AUTH
= 9¶ Enable Deposit Authorization on this account.
-
ASF_DISABLE_MASTER
= 4¶ Disallow use of the master key pair. Can only be enabled if the account has configured another way to sign transactions, such as a Regular Key or a Signer List.
-
ASF_DISALLOW_XRP
= 3¶ XRP should not be sent to this account. (Enforced by client applications)
-
ASF_NO_FREEZE
= 6¶ Permanently give up the ability to freeze individual trust lines or disable Global Freeze. This flag can never be disabled after being enabled.
-
ASF_REQUIRE_AUTH
= 2¶ Require authorization for users to hold balances issued by this address. Can only be enabled if the address has no trust lines connected to it.
-
ASF_REQUIRE_DEST
= 1¶ Require a destination tag to send transactions to this account.
-
-
class
xrpl.models.transactions.
CheckCancel
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents a CheckCancel transaction, which cancels an unredeemed Check, removing it from the ledger without sending any money. The source or the destination of the check can cancel a Check at any time using this transaction type. If the Check has expired, any address can cancel it.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
check_id
: str = <object object>¶ The ID of the Check ledger object to cancel, as a 64-character hexadecimal string. This field is required.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: xrpl.models.transactions.transaction.TransactionType = 'CheckCancel'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
CheckCash
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents a CheckCash transaction, which redeems a Check object to receive up to the amount authorized by the corresponding CheckCreate transaction. Only the Destination address of a Check can cash it.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
amount
: Optional[Amount] = None¶ Redeem the Check for exactly this amount, if possible. The currency must match that of the SendMax of the corresponding CheckCreate transaction. You must provide either this field or
DeliverMin
.
-
check_id
: str = <object object>¶ The ID of the Check ledger object to cash, as a 64-character hexadecimal string. This field is required.
-
deliver_min
: Optional[Amount] = None¶ Redeem the Check for at least this amount and for as much as possible. The currency must match that of the
SendMax
of the corresponding CheckCreate transaction. You must provide either this field orAmount
.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: TransactionType = 'CheckCash'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
CheckCreate
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents a CheckCreate transaction, which creates a Check object. A Check object is a deferred payment that can be cashed by its intended destination. The sender of this transaction is the sender of the Check.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
destination
: str = <object object>¶ The address of the account that can cash the Check. This field is required.
-
destination_tag
: Optional[int] = None¶ An arbitrary destination tag that identifies the reason for the Check, or a hosted recipient to pay.
-
expiration
: Optional[int] = None¶ Time after which the Check is no longer valid, in seconds since the Ripple Epoch.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
invoice_id
: Optional[str] = None¶ Arbitrary 256-bit hash representing a specific reason or identifier for this Check.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
send_max
: Union[xrpl.models.amounts.issued_currency_amount.IssuedCurrencyAmount, str] = <object object>¶ Maximum amount of source token the Check is allowed to debit the sender, including transfer fees on non-XRP tokens. The Check can only credit the destination with the same token (from the same issuer, for non-XRP tokens). This field is required.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: xrpl.models.transactions.transaction.TransactionType = 'CheckCreate'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
DepositPreauth
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents a DepositPreauth transaction, which gives another account pre-approval to deliver payments to the sender of this transaction, if this account is using Deposit Authorization.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
Grant preauthorization to this address. You must provide this OR
unauthorize
but not both.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: TransactionType = 'DepositPreauth'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
Revoke preauthorization from this address. You must provide this OR
authorize
but not both.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
EscrowCancel
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents an EscrowCancel transaction, which returns escrowed XRP to the sender after the Escrow has expired.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
offer_sequence
: int = <object object>¶ Transaction sequence (or Ticket number) of the EscrowCreate transaction that created the Escrow. This field is required.
-
owner
: str = <object object>¶ The address of the account that funded the Escrow. This field is required.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: xrpl.models.transactions.transaction.TransactionType = 'EscrowCancel'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
EscrowCreate
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents an EscrowCreate transaction, which locks up XRP until a specific time or condition is met.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
amount
: Amount = <object object>¶ Amount of XRP, in drops, to deduct from the sender’s balance and set aside in escrow. This field is required.
-
cancel_after
: Optional[int] = None¶ The time, in seconds since the Ripple Epoch, when this escrow expires. This value is immutable; the funds can only be returned the sender after this time.
-
condition
: Optional[str] = None¶ Hex value representing a PREIMAGE-SHA-256 crypto-condition The funds can only be delivered to the recipient if this condition is fulfilled.
-
destination
: str = <object object>¶ The address that should receive the escrowed XRP when the time or condition is met. This field is required.
-
destination_tag
: Optional[int] = None¶ An arbitrary destination tag that identifies the reason for the Escrow, or a hosted recipient to pay.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
finish_after
: Optional[int] = None¶ The time, in seconds since the Ripple Epoch, when the escrowed XRP can be released to the recipient. This value is immutable; the funds cannot move until this time is reached.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: TransactionType = 'EscrowCreate'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
EscrowFinish
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents an EscrowFinish transaction, delivers XRP from a held payment to the recipient.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
condition
: Optional[str] = None¶ The previously-supplied PREIMAGE-SHA-256 crypto-condition of the Escrow, if any, as hexadecimal.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
fulfillment
: Optional[str] = None¶ The PREIMAGE-SHA-256 crypto-condition fulfillment matching the Escrow’s condition, if any, as hexadecimal.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
offer_sequence
: int = <object object>¶ Transaction sequence (or Ticket number) of the EscrowCreate transaction that created the Escrow. This field is required.
-
owner
: str = <object object>¶ The source account that funded the Escrow. This field is required.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: TransactionType = 'EscrowFinish'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
Memo
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.base_model.BaseModel
An arbitrary piece of data attached to a transaction. A transaction can have multiple Memo objects as an array in the Memos field. Must contain one or more of
memo_data
,memo_format
, andmemo_type
.-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.base_model.BaseModel¶ Construct a new BaseModel from a dictionary of parameters.
- Parameters
value – The value to construct the BaseModel from.
- Returns
A new BaseModel object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
memo_data
: Optional[str] = None¶ The data of the memo, as a hexadecimal string.
-
memo_format
: Optional[str] = None¶ The format of the memo, as a hexadecimal string. Conventionally, this should be the MIME type of the memo data.
-
memo_type
: Optional[str] = None¶ The type of the memo, as a hexadecimal string. Conventionally, this should be an RFC 5988 relation defining the format of the memo data.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a BaseModel.
If not overridden, returns the object dict with all non-None values.
- Returns
The dictionary representation of a BaseModel.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
classmethod
-
class
xrpl.models.transactions.
OfferCancel
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents an OfferCancel transaction, which removes an Offer object from the decentralized exchange.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
offer_sequence
: int = <object object>¶ The Sequence number (or Ticket number) of a previous OfferCreate transaction. If specified, cancel any Offer object in the ledger that was created by that transaction. It is not considered an error if the Offer specified does not exist.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: xrpl.models.transactions.transaction.TransactionType = 'OfferCancel'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
OfferCreate
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents an OfferCreate transaction, which executes a limit order in the decentralized exchange. If the specified exchange cannot be completely fulfilled, it creates an Offer object for the remainder. Offers can be partially fulfilled.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
expiration
: Optional[int] = None¶ Time after which the offer is no longer active, in seconds since the Ripple Epoch.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
offer_sequence
: Optional[int] = None¶ The Sequence number (or Ticket number) of a previous OfferCreate to cancel when placing this Offer.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
taker_gets
: Union[xrpl.models.amounts.issued_currency_amount.IssuedCurrencyAmount, str] = <object object>¶ The amount and type of currency being provided by the sender of this transaction. This field is required.
-
taker_pays
: Union[xrpl.models.amounts.issued_currency_amount.IssuedCurrencyAmount, str] = <object object>¶ The amount and type of currency the sender of this transaction wants in exchange for the full
taker_gets
amount. This field is required.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: xrpl.models.transactions.transaction.TransactionType = 'OfferCreate'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
OfferCreateFlag
(value)¶ Bases:
int
,enum.Enum
Transactions of the OfferCreate type support additional values in the Flags field. This enum represents those options.
-
TF_FILL_OR_KILL
= 262144¶ Treat the offer as a Fill or Kill order. Only try to match existing offers in the ledger, and only do so if the entire TakerPays quantity can be obtained. If the fix1578 amendment is enabled and the offer cannot be executed when placed, the transaction has the result code tecKILLED; otherwise, the transaction uses the result code tesSUCCESS even when it was killed without trading any currency.
-
TF_IMMEDIATE_OR_CANCEL
= 131072¶ Treat the offer as an Immediate or Cancel order. If enabled, the offer never becomes a ledger object: it only tries to match existing offers in the ledger. If the offer cannot match any offers immediately, it executes “successfully” without trading any currency. In this case, the transaction has the result code tesSUCCESS, but creates no Offer objects in the ledger.
-
TF_PASSIVE
= 65536¶
-
TF_SELL
= 524288¶ Exchange the entire TakerGets amount, even if it means obtaining more than the TakerPays amount in exchange.
-
-
class
xrpl.models.transactions.
Payment
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents a Payment <https://xrpl.org/payment.html>`_ transaction, which sends value from one account to another. (Depending on the path taken, this can involve additional exchanges of value, which occur atomically.) This transaction type can be used for several types of payments.
Payments are also the only way to create accounts.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
amount
: Amount = <object object>¶ The amount of currency to deliver. If the Partial Payment flag is set, deliver up to this amount instead. This field is required.
-
deliver_min
: Optional[Amount] = None¶ Minimum amount of destination currency this transaction should deliver. Only valid if this is a partial payment. If omitted, any positive amount is considered a success.
-
destination
: str = <object object>¶ The address of the account receiving the payment. This field is required.
-
destination_tag
: Optional[int] = None¶ An arbitrary destination tag that identifies the reason for the Payment, or a hosted recipient to pay.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
invoice_id
: Optional[str] = None¶ Arbitrary 256-bit hash representing a specific reason or identifier for this Check.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
paths
: Optional[List[Any]] = None¶ Array of payment paths to be used (for a cross-currency payment). Must be omitted for XRP-to-XRP transactions.
-
send_max
: Optional[Amount] = None¶ Maximum amount of source currency this transaction is allowed to cost, including transfer fees, exchange rates, and slippage. Does not include the XRP destroyed as a cost for submitting the transaction. Must be supplied for cross-currency or cross-issue payments. Must be omitted for XRP-to-XRP payments.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: TransactionType = 'Payment'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
PaymentChannelClaim
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents a PaymentChannelClaim transaction, which claims XRP from a payment channel, adjusts channel’s expiration, or both. This transaction can be used differently depending on the transaction sender’s role in the specified channel.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
amount
: Optional[str] = None¶ The cumulative amount of XRP that has been authorized to deliver by the attached claim signature. Required unless closing the channel.
-
balance
: Optional[str] = None¶ The cumulative amount of XRP to have delivered through this channel after processing this claim. Required unless closing the channel.
-
channel
: str = <object object>¶ The unique ID of the payment channel, as a 64-character hexadecimal string. This field is required.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
public_key
: Optional[str] = None¶ The public key that should be used to verify the attached signature. Must match the PublicKey that was provided when the channel was created. Required if
signature
is provided.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signature
: Optional[str] = None¶ The signature of the claim, as hexadecimal. This signature must be verifiable for the this channel and the given
public_key
andamount
values. May be omitted if closing the channel or if the sender of this transaction is the source address of the channel; required otherwise.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: xrpl.models.transactions.transaction.TransactionType = 'PaymentChannelClaim'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
PaymentChannelCreate
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents a PaymentChannelCreate transaction, which creates a payment channel and funds it with XRP. The sender of this transaction is the “source address” of the payment channel.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
amount
: Union[xrpl.models.amounts.issued_currency_amount.IssuedCurrencyAmount, str] = <object object>¶ The amount of XRP, in drops, to set aside in this channel. This field is required.
-
cancel_after
: Optional[int] = None¶ An immutable expiration time for the channel, in seconds since the Ripple Epoch. The channel can be closed sooner than this but cannot remain open later than this time.
-
destination
: str = <object object>¶ The account that can receive XRP from this channel, also known as the “destination address” of the channel. Cannot be the same as the sender. This field is required.
-
destination_tag
: Optional[int] = None¶ An arbitrary destination tag that identifies the reason for the Payment Channel, or a hosted recipient to pay.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
public_key
: str = <object object>¶ The public key of the key pair that the source will use to authorize claims against this channel, as hexadecimal. This can be any valid secp256k1 or Ed25519 public key. This field is required.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
settle_delay
: int = <object object>¶ The amount of time, in seconds, the source address must wait between requesting to close the channel and fully closing it. This field is required.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: xrpl.models.transactions.transaction.TransactionType = 'PaymentChannelCreate'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
PaymentChannelFund
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents a PaymentChannelFund transaction, adds additional XRP to an open payment channel, and optionally updates the expiration time of the channel. Only the source address of the channel can use this transaction.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
amount
: str = <object object>¶ The amount of XRP, in drops, to add to the channel. This field is required.
-
channel
: str = <object object>¶ The unique ID of the payment channel, as a 64-character hexadecimal string. This field is required.
-
expiration
: Optional[int] = None¶ A new mutable expiration time to set for the channel, in seconds since the Ripple Epoch. This must be later than the existing expiration time of the channel or later than the current time plus the settle delay of the channel. This is separate from the immutable
cancel_after
time.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: xrpl.models.transactions.transaction.TransactionType = 'PaymentChannelFund'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
PaymentFlag
(value)¶ Bases:
int
,enum.Enum
Transactions of the Payment type support additional values in the Flags field. This enum represents those options.
-
TF_LIMIT_QUALITY
= 262144¶
-
TF_NO_DIRECT_RIPPLE
= 65536¶
-
TF_PARTIAL_PAYMENT
= 131072¶
-
-
class
xrpl.models.transactions.
SetRegularKey
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents a SetRegularKey transaction, which assigns, changes, or removes a secondary “regular” key pair associated with an account.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
regular_key
: Optional[str] = None¶ The classic address derived from the key pair to authorize for this account. If omitted, removes any existing regular key pair from the account. Must not match the account’s master key pair.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: xrpl.models.transactions.transaction.TransactionType = 'SetRegularKey'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
Signer
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.base_model.BaseModel
One Signer in a multi-signature. A multi-signed transaction can have an array of up to 8 Signers, each contributing a signature, in the Signers field.
-
account
: str = <object object>¶ The address of the Signer. This can be a funded account in the XRP Ledger or an unfunded address. This field is required.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.base_model.BaseModel¶ Construct a new BaseModel from a dictionary of parameters.
- Parameters
value – The value to construct the BaseModel from.
- Returns
A new BaseModel object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Returns True if the input dictionary was derived by the to_dict method of an instance of this class. In other words, True if this is a dictionary representation of an instance of this class.
NOTE: does not account for model inheritance, IE will only return True if dictionary represents an instance of this class, but not if dictionary represents an instance of a subclass of this class.
- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a dict representation of an instance of this class.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
signing_pub_key
: str = <object object>¶ The public key that should be used to verify this Signer’s signature. This field is required.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Signer.
- Returns
The dictionary representation of a Signer.
-
txn_signature
: str = <object object>¶ The signature that this Signer provided for this transaction. This field is required.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
SignerEntry
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.base_model.BaseModel
Represents one entry in a list of multi-signers authorized to an account.
-
account
: str = <object object>¶ This field is required.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.signer_list_set.SignerEntry¶ Construct a new SignerEntry from a dictionary of parameters.
- Parameters
value – The value to construct the SignerEntry from.
- Returns
A new SignerEntry object, constructed using the given parameters.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Returns True if the input dictionary was derived by the to_dict method of an instance of this class. In other words, True if this is a dictionary representation of an instance of this class.
NOTE: does not account for model inheritance, IE will only return True if dictionary represents an instance of this class, but not if dictionary represents an instance of a subclass of this class.
- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a dict representation of an instance of this class.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
signer_weight
: int = <object object>¶ This field is required.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a SignerEntry.
- Returns
The dictionary representation of a SignerEntry.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
SignerListSet
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents a SignerListSet transaction, which creates, replaces, or removes a list of signers that can be used to multi-sign a transaction.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signer_entries
: Optional[List[SignerEntry]] = None¶
-
signer_quorum
: int = <object object>¶ This field is required.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: TransactionType = 'SignerListSet'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
TrustSet
(*args: List[Any], **kwargs: Dict[str, Any])¶ Bases:
xrpl.models.transactions.transaction.Transaction
Represents a TrustSet transaction on the XRP Ledger. Creates or modifies a trust line linking two accounts.
-
account
: str = <object object>¶ The address of the sender of the transaction. This field is required.
-
account_txn_id
: Optional[str] = None¶ A hash value identifying a previous transaction from the same sender. If provided, this transaction is only considered valid if the identified transaction is the most recent transaction sent by this address. See AccountTxnID for details.
-
fee
: Optional[str] = None¶ (Auto-fillable) The amount of XRP to destroy as a cost to send this transaction. See Transaction Cost for details.
-
flags
: int = 0¶ A bitwise map of flags modifying this transaction’s behavior. See Flags Field for more details.
-
classmethod
from_dict
(value: Dict[str, Any]) → xrpl.models.transactions.transaction.Transaction¶ Construct a new Transaction from a dictionary of parameters.
- Parameters
value – The value to construct the Transaction from.
- Returns
A new Transaction object, constructed using the given parameters.
- Raises
XRPLModelException – If the dictionary provided is invalid.
-
classmethod
from_xrpl
(value: Union[str, Dict[str, Any]]) → xrpl.models.base_model.BaseModel¶ Creates a BaseModel object based on a JSON-like dictionary of keys in the JSON format used by the binary codec, or an actual JSON string representing the same data.
- Parameters
value – The dictionary or JSON string to be instantiated.
- Returns
A BaseModel object instantiated from the input.
-
classmethod
get_transaction_type
(transaction_type: str) → Type[xrpl.models.transactions.transaction.Transaction]¶ Returns the correct transaction type based on the string name.
- Parameters
transaction_type – The String name of the Transaction object.
- Returns
The transaction class with the given name.
- Raises
XRPLModelException – If transaction_type is not a valid Transaction type.
-
has_flag
(flag: int) → bool¶ Returns whether the transaction has the given flag value set.
- Parameters
flag – The given flag value for which the function will determine whether it is set.
- Returns
Whether the transaction has the given flag value set.
-
classmethod
is_dict_of_model
(dictionary: Dict[str, Any]) → bool¶ Checks whether the provided
dictionary
is a dictionary representation of this class.Note: This only checks the exact model, and does not count model inheritance. This method returns
False
if the dictionary represents a subclass of this class.- Parameters
dictionary – The dictionary to check.
- Returns
True if dictionary is a
dict
representation of an instance of this class; False if not.
-
is_valid
() → bool¶ Returns whether this BaseModel is valid.
- Returns
Whether this BaseModel is valid.
-
last_ledger_sequence
: Optional[int] = None¶ The highest 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. See Reliable Transaction Submission for details.
-
limit_amount
: xrpl.models.amounts.issued_currency_amount.IssuedCurrencyAmount = <object object>¶ This field is required.
-
quality_in
: Optional[int] = None¶
-
quality_out
: Optional[int] = None¶
-
sequence
: Optional[int] = None¶ (Auto-fillable) The sequence number of the transaction. Must match the sending account’s next unused sequence number. See Account Sequence for details.
-
signers
: Optional[List[Signer]] = None¶ Signing data authorizing a multi-signed transaction. Added during multi-signing.
-
signing_pub_key
: str = ''¶ The public key authorizing a single-signed transaction. Automatically added during signing.
-
source_tag
: Optional[int] = None¶ An arbitrary source tag representing a hosted user or specific purpose at the sending account where this transaction comes from.
-
to_dict
() → Dict[str, Any]¶ Returns the dictionary representation of a Transaction.
- Returns
The dictionary representation of a Transaction.
-
transaction_type
: xrpl.models.transactions.transaction.TransactionType = 'TrustSet'¶
-
txn_signature
: Optional[str] = None¶ The cryptographic signature from the sender that authorizes this transaction. Automatically added during signing.
-
validate
() → None¶ Raises if this object is invalid.
- Raises
XRPLModelException – if this object is invalid.
-
-
class
xrpl.models.transactions.
TrustSetFlag
(value)¶ Bases:
int
,enum.Enum
Transactions of the TrustSet type support additional values in the Flags field. This enum represents those options.
-
TF_CLEAR_FREEZE
= 2097152¶
-
TF_CLEAR_NO_RIPPLE
= 262144¶
-
TF_SET_AUTH
= 65536¶
-
TF_SET_FREEZE
= 1048576¶
-
TF_SET_NO_RIPPLE
= 131072¶
-