Skip to main content

RawTransactionEnvelope

Enum RawTransactionEnvelope 

Source
pub enum RawTransactionEnvelope {
Show 13 variants Payment { signed: Signed<PaymentPayload>, fee: Uint<256, 4>, }, TokenIssue(Signed<TokenIssuePayload>, Address), TokenMint(Signed<TokenMintPayload>), TokenAuthority(Signed<TokenAuthorityPayload>), TokenBlacklist(Signed<TokenBlacklistPayload>), TokenWhitelist(Signed<TokenWhitelistPayload>), TokenPause(Signed<TokenPausePayload>), TokenBurn(Signed<TokenBurnPayload>), TokenClawback(Signed<TokenClawbackPayload>), TokenMetadata(Signed<TokenMetadataUpdatePayload>), TokenBridgeAndMint(Signed<TokenBridgeAndMintPayload>), TokenBurnAndBridge(Signed<TokenBurnAndBridgePayload>), CreateMultiSig(Signed<CreateMultiSigPayload>),
}
Expand description

The 1Money Network Signed Transaction Payload.

The signed transaction is used to store the transaction payload and the signature that signed by the sender; it’s the core transaction type of the 1Money Network.

Users build the transaction payload and sign it with their private key, and then the payload with the signature formed the transaction request.

Variants§

§

Payment

Payment transaction variant.

payload with the signature signed by the sender.

Fields

§fee: Uint<256, 4>
§

TokenIssue(Signed<TokenIssuePayload>, Address)

Token issue transaction variant.

payload with the signature signed by the sender.

§

TokenMint(Signed<TokenMintPayload>)

Token mint transaction variant.

payload with the signature signed by the sender.

§

TokenAuthority(Signed<TokenAuthorityPayload>)

Token authority transaction variant.

payload with the signature signed by the sender.

§

TokenBlacklist(Signed<TokenBlacklistPayload>)

Token blacklist transaction variant.

payload with the signature signed by the sender.

§

TokenWhitelist(Signed<TokenWhitelistPayload>)

Token whitelist transaction variant.

payload with the signature signed by the sender.

§

TokenPause(Signed<TokenPausePayload>)

Token pause transaction variant.

payload with the signature signed by the sender.

§

TokenBurn(Signed<TokenBurnPayload>)

Token burn transaction variant.

payload with the signature signed by the sender.

§

TokenClawback(Signed<TokenClawbackPayload>)

Token clawback transaction variant.

payload with the signature signed by the clawback authority.

§

TokenMetadata(Signed<TokenMetadataUpdatePayload>)

Token metadata transaction variant.

payload with the signature signed by the sender.

§

TokenBridgeAndMint(Signed<TokenBridgeAndMintPayload>)

Bridge and mint transaction variant.

payload with the signature signed by the sender.

§

TokenBurnAndBridge(Signed<TokenBurnAndBridgePayload>)

Burn and bridge transaction variant.

payload with the signature signed by the sender.

§

CreateMultiSig(Signed<CreateMultiSigPayload>)

Create multi-signature account transaction variant.

payload with the signature signed by the sender.

Implementations§

Source§

impl RawTransactionEnvelope

Source

pub fn tx_hash(&self) -> &FixedBytes<32>

Returns the hash of the signed transaction, if the hash is not initialized, it will be calculated the real hash from the payload and the signature then return.

Source

pub fn slow_hash(&self) -> FixedBytes<32>

Source

pub fn signature(&self) -> &SignatureType

Source

pub fn nonce(&self) -> u64

Source

pub fn value(&self) -> Uint<256, 4>

Source

pub fn chain_id(&self) -> u64

Source

pub fn recipient(&self) -> Option<Address>

Source

pub fn token(&self) -> Address

Source

pub fn token_with_creation(&self) -> (Address, bool)

Source

pub fn as_payment(&self) -> Option<&Signed<PaymentPayload>>

Extract the inner signed transaction for specific payload types

Source

pub fn as_token_mint(&self) -> Option<&Signed<TokenMintPayload>>

Source

pub fn as_token_issue(&self) -> Option<(&Signed<TokenIssuePayload>, &Address)>

Source

pub fn as_token_authority(&self) -> Option<&Signed<TokenAuthorityPayload>>

Source

pub fn as_token_pause(&self) -> Option<&Signed<TokenPausePayload>>

Source

pub fn as_token_burn(&self) -> Option<&Signed<TokenBurnPayload>>

Source

pub fn as_token_clawback(&self) -> Option<&Signed<TokenClawbackPayload>>

Source

pub fn as_token_metadata(&self) -> Option<&Signed<TokenMetadataUpdatePayload>>

Source

pub fn as_blacklist(&self) -> Option<&Signed<TokenBlacklistPayload>>

Source

pub fn as_whitelist(&self) -> Option<&Signed<TokenWhitelistPayload>>

Trait Implementations§

Source§

impl Clone for RawTransactionEnvelope

Source§

fn clone(&self) -> RawTransactionEnvelope

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RawTransactionEnvelope

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for RawTransactionEnvelope

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<RawTransactionEnvelope, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for RawTransactionEnvelope

Source§

impl From<(Signed<PaymentPayload>, Uint<256, 4>)> for RawTransactionEnvelope

Source§

fn from(_: (Signed<PaymentPayload>, Uint<256, 4>)) -> RawTransactionEnvelope

Converts to this type from the input type.
Source§

impl From<(Signed<TokenIssuePayload>, Address)> for RawTransactionEnvelope

Source§

fn from(_: (Signed<TokenIssuePayload>, Address)) -> RawTransactionEnvelope

Converts to this type from the input type.
Source§

impl From<Signed<PaymentPayload>> for RawTransactionEnvelope

Source§

fn from(signed: Signed<PaymentPayload>) -> RawTransactionEnvelope

Converts to this type from the input type.
Source§

impl From<Signed<TokenAuthorityPayload>> for RawTransactionEnvelope

Source§

fn from(signed: Signed<TokenAuthorityPayload>) -> RawTransactionEnvelope

Converts to this type from the input type.
Source§

impl From<Signed<TokenBlacklistPayload>> for RawTransactionEnvelope

Source§

fn from(signed: Signed<TokenBlacklistPayload>) -> RawTransactionEnvelope

Converts to this type from the input type.
Source§

impl From<Signed<TokenBurnPayload>> for RawTransactionEnvelope

Source§

fn from(signed: Signed<TokenBurnPayload>) -> RawTransactionEnvelope

Converts to this type from the input type.
Source§

impl From<Signed<TokenClawbackPayload>> for RawTransactionEnvelope

Source§

fn from(signed: Signed<TokenClawbackPayload>) -> RawTransactionEnvelope

Converts to this type from the input type.
Source§

impl From<Signed<TokenMetadataUpdatePayload>> for RawTransactionEnvelope

Source§

fn from(signed: Signed<TokenMetadataUpdatePayload>) -> RawTransactionEnvelope

Converts to this type from the input type.
Source§

impl From<Signed<TokenMintPayload>> for RawTransactionEnvelope

Source§

fn from(signed: Signed<TokenMintPayload>) -> RawTransactionEnvelope

Converts to this type from the input type.
Source§

impl From<Signed<TokenPausePayload>> for RawTransactionEnvelope

Source§

fn from(signed: Signed<TokenPausePayload>) -> RawTransactionEnvelope

Converts to this type from the input type.
Source§

impl From<Signed<TokenWhitelistPayload>> for RawTransactionEnvelope

Source§

fn from(signed: Signed<TokenWhitelistPayload>) -> RawTransactionEnvelope

Converts to this type from the input type.
Source§

impl PartialEq for RawTransactionEnvelope

Source§

fn eq(&self, other: &RawTransactionEnvelope) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for RawTransactionEnvelope

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl SignerRecoverable for RawTransactionEnvelope

Source§

fn recover_signer(&self) -> Result<Address, SigError>

Recover the signer of the transaction.

Source§

impl StructuralPartialEq for RawTransactionEnvelope

Source§

impl TryFrom<PaymentTransactionRequest> for RawTransactionEnvelope

Source§

type Error = SignatureError

The type returned in the event of a conversion error.
Source§

fn try_from( tx_req: PaymentTransactionRequest, ) -> Result<RawTransactionEnvelope, <RawTransactionEnvelope as TryFrom<PaymentTransactionRequest>>::Error>

Performs the conversion.
Source§

impl TryFrom<TokenAuthorityRequest> for RawTransactionEnvelope

Source§

type Error = SignatureError

The type returned in the event of a conversion error.
Source§

fn try_from( req: TokenAuthorityRequest, ) -> Result<RawTransactionEnvelope, <RawTransactionEnvelope as TryFrom<TokenAuthorityRequest>>::Error>

Performs the conversion.
Source§

impl TryFrom<TokenBlacklistRequest> for RawTransactionEnvelope

Source§

type Error = SignatureError

The type returned in the event of a conversion error.
Source§

fn try_from( req: TokenBlacklistRequest, ) -> Result<RawTransactionEnvelope, <RawTransactionEnvelope as TryFrom<TokenBlacklistRequest>>::Error>

Performs the conversion.
Source§

impl TryFrom<TokenBridgeAndMintRequest> for RawTransactionEnvelope

Source§

type Error = SignatureError

The type returned in the event of a conversion error.
Source§

fn try_from( req: TokenBridgeAndMintRequest, ) -> Result<RawTransactionEnvelope, <RawTransactionEnvelope as TryFrom<TokenBridgeAndMintRequest>>::Error>

Performs the conversion.
Source§

impl TryFrom<TokenBurnAndBridgeRequest> for RawTransactionEnvelope

Source§

type Error = SignatureError

The type returned in the event of a conversion error.
Source§

fn try_from( req: TokenBurnAndBridgeRequest, ) -> Result<RawTransactionEnvelope, <RawTransactionEnvelope as TryFrom<TokenBurnAndBridgeRequest>>::Error>

Performs the conversion.
Source§

impl TryFrom<TokenBurnRequest> for RawTransactionEnvelope

Source§

type Error = SignatureError

The type returned in the event of a conversion error.
Source§

fn try_from( req: TokenBurnRequest, ) -> Result<RawTransactionEnvelope, <RawTransactionEnvelope as TryFrom<TokenBurnRequest>>::Error>

Performs the conversion.
Source§

impl TryFrom<TokenClawbackRequest> for RawTransactionEnvelope

Source§

type Error = SignatureError

The type returned in the event of a conversion error.
Source§

fn try_from( req: TokenClawbackRequest, ) -> Result<RawTransactionEnvelope, <RawTransactionEnvelope as TryFrom<TokenClawbackRequest>>::Error>

Performs the conversion.
Source§

impl TryFrom<TokenIssueRequest> for RawTransactionEnvelope

Source§

type Error = SignatureError

The type returned in the event of a conversion error.
Source§

fn try_from( req: TokenIssueRequest, ) -> Result<RawTransactionEnvelope, <RawTransactionEnvelope as TryFrom<TokenIssueRequest>>::Error>

Performs the conversion.
Source§

impl TryFrom<TokenMetadataUpdateRequest> for RawTransactionEnvelope

Source§

type Error = SignatureError

The type returned in the event of a conversion error.
Source§

fn try_from( req: TokenMetadataUpdateRequest, ) -> Result<RawTransactionEnvelope, <RawTransactionEnvelope as TryFrom<TokenMetadataUpdateRequest>>::Error>

Performs the conversion.
Source§

impl TryFrom<TokenMintRequest> for RawTransactionEnvelope

Source§

type Error = SignatureError

The type returned in the event of a conversion error.
Source§

fn try_from( req: TokenMintRequest, ) -> Result<RawTransactionEnvelope, <RawTransactionEnvelope as TryFrom<TokenMintRequest>>::Error>

Performs the conversion.
Source§

impl TryFrom<TokenPauseRequest> for RawTransactionEnvelope

Source§

type Error = SignatureError

The type returned in the event of a conversion error.
Source§

fn try_from( req: TokenPauseRequest, ) -> Result<RawTransactionEnvelope, <RawTransactionEnvelope as TryFrom<TokenPauseRequest>>::Error>

Performs the conversion.
Source§

impl TryFrom<TokenWhitelistRequest> for RawTransactionEnvelope

Source§

type Error = SignatureError

The type returned in the event of a conversion error.
Source§

fn try_from( req: TokenWhitelistRequest, ) -> Result<RawTransactionEnvelope, <RawTransactionEnvelope as TryFrom<TokenWhitelistRequest>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<'de, T> BorrowedRpcObject<'de> for T
where T: RpcBorrow<'de> + RpcSend,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<'de, T> RpcBorrow<'de> for T
where T: Deserialize<'de> + Debug + Send + Sync + Unpin,

Source§

impl<T> RpcObject for T
where T: RpcSend + RpcRecv,

Source§

impl<T> RpcRecv for T
where T: DeserializeOwned + Debug + Send + Sync + Unpin + 'static,

Source§

impl<T> RpcSend for T
where T: Serialize + Clone + Debug + Send + Sync + Unpin,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more