pub struct UnsignedExternalMessage {
pub dst: StdAddr,
pub body: UnsignedBody,
pub init: Option<StateInit>,
}Expand description
Unsigned external message.
Fields§
§dst: StdAddrDestination contract address.
body: UnsignedBodyUnsigned payload.
init: Option<StateInit>Optional initial contract state.
Implementations§
Source§impl UnsignedExternalMessage
impl UnsignedExternalMessage
Sourcepub fn set_state_init(&mut self, init: Option<StateInit>)
pub fn set_state_init(&mut self, init: Option<StateInit>)
Updates the state init of the external message to the specified one.
Sourcepub fn with_state_init(self, init: StateInit) -> Self
pub fn with_state_init(self, init: StateInit) -> Self
Returns an external message with the specified state init.
Sourcepub fn sign(
self,
key: &SigningKey,
signature_id: Option<i32>,
) -> Result<OwnedMessage>
pub fn sign( self, key: &SigningKey, signature_id: Option<i32>, ) -> Result<OwnedMessage>
Signs the payload and returns an external message with filled signature.
Sourcepub fn with_signature(self, signature: &Signature) -> Result<OwnedMessage>
pub fn with_signature(self, signature: &Signature) -> Result<OwnedMessage>
Returns an external message with filled signature.
Sourcepub fn with_fake_signature(self) -> Result<OwnedMessage>
pub fn with_fake_signature(self) -> Result<OwnedMessage>
Returns an external message with signature filled with zero bytes.
Sourcepub fn without_signature(self) -> Result<OwnedMessage>
pub fn without_signature(self) -> Result<OwnedMessage>
Returns an external message with empty signature.
Sourcepub fn fill_signature(
&self,
signature: Option<&[u8; 64]>,
) -> Result<OwnedMessage>
pub fn fill_signature( &self, signature: Option<&[u8; 64]>, ) -> Result<OwnedMessage>
Returns an external message with filled signature.
Auto Trait Implementations§
impl Freeze for UnsignedExternalMessage
impl !RefUnwindSafe for UnsignedExternalMessage
impl Send for UnsignedExternalMessage
impl Sync for UnsignedExternalMessage
impl Unpin for UnsignedExternalMessage
impl !UnwindSafe for UnsignedExternalMessage
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
Mutably borrows from an owned value. Read more