pub struct Submit<'a> {
pub common_fields: CommonFields<'a>,
pub tx_blob: Cow<'a, str>,
pub fail_hard: Option<bool>,
}
Expand description
The submit method applies a transaction and sends it to the network to be confirmed and included in future ledgers.
This command has two modes:
- Submit-only mode takes a signed, serialized transaction as a binary blob, and submits it to the network as-is. Since signed transaction objects are immutable, no part of the transaction can be modified or automatically filled in after submission.
- Sign-and-submit mode takes a JSON-formatted Transaction object, completes and signs the transaction in the same manner as the sign method, and then submits the signed transaction. We recommend only using this mode for testing and development.
To send a transaction as robustly as possible, you should construct and sign it in advance, persist it somewhere that you can access even after a power outage, then submit it as a tx_blob. After submission, monitor the network with the tx method command to see if the transaction was successfully applied; if a restart or other problem occurs, you can safely re-submit the tx_blob transaction: it won’t be applied twice since it has the same sequence number as the old transaction.
See Submit:
<https://xrpl.org/submit.html>
Fields§
§common_fields: CommonFields<'a>
The common fields shared by all requests.
tx_blob: Cow<'a, str>
Hex representation of the signed transaction to submit. This can also be a multi-signed transaction.
fail_hard: Option<bool>
If true, and the transaction fails locally, do not retry or relay the transaction to other servers
Implementations§
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for Submit<'a>
impl<'de, 'a> Deserialize<'de> for Submit<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<'a> From<Submit<'a>> for XRPLRequest<'a>
impl<'a> From<Submit<'a>> for XRPLRequest<'a>
Source§impl<'a> Model for Submit<'a>
impl<'a> Model for Submit<'a>
Source§fn get_errors(&self) -> XRPLModelResult<()>
fn get_errors(&self) -> XRPLModelResult<()>
Source§fn validate(&self) -> XRPLModelResult<()>
fn validate(&self) -> XRPLModelResult<()>
get_errors
if there was one.Source§impl<'a> Request<'a> for Submit<'a>
impl<'a> Request<'a> for Submit<'a>
fn get_common_fields(&self) -> &CommonFields<'a>
fn get_common_fields_mut(&mut self) -> &mut CommonFields<'a>
impl<'a> Eq for Submit<'a>
impl<'a> StructuralPartialEq for Submit<'a>
Auto Trait Implementations§
impl<'a> Freeze for Submit<'a>
impl<'a> RefUnwindSafe for Submit<'a>
impl<'a> Send for Submit<'a>
impl<'a> Sync for Submit<'a>
impl<'a> Unpin for Submit<'a>
impl<'a> UnwindSafe for Submit<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.