pub struct ZomeCallParams {
pub provenance: HoloHash<Agent>,
pub cell_id: CellId,
pub zome_name: ZomeName,
pub fn_name: FunctionName,
pub cap_secret: Option<CapSecret>,
pub payload: ExternIO,
pub nonce: Nonce256Bits,
pub expires_at: Timestamp,
}Expand description
Zome calls need to be signed regardless of how they are called. This defines exactly what needs to be signed.
Fields§
§provenance: HoloHash<Agent>Provenance to sign.
cell_id: CellIdCell ID to sign.
zome_name: ZomeNameZome name to sign.
fn_name: FunctionNameFunction name to sign.
cap_secret: Option<CapSecret>Cap secret to sign.
payload: ExternIOPayload to sign.
nonce: Nonce256BitsNonce to sign.
expires_at: TimestampTime after which this zome call MUST NOT be accepted.
Implementations§
Source§impl ZomeCallParams
impl ZomeCallParams
Sourcepub fn serialize_and_hash(
&self,
) -> Result<(Vec<u8>, Vec<u8>), SerializedBytesError>
pub fn serialize_and_hash( &self, ) -> Result<(Vec<u8>, Vec<u8>), SerializedBytesError>
Prepare the canonical bytes for zome call parameters so that they are always signed and verified in the same way. Signature is generated for the hash of the bytes.
Trait Implementations§
Source§impl Clone for ZomeCallParams
impl Clone for ZomeCallParams
Source§fn clone(&self) -> ZomeCallParams
fn clone(&self) -> ZomeCallParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ZomeCallParams
impl Debug for ZomeCallParams
Source§impl<'de> Deserialize<'de> for ZomeCallParams
impl<'de> Deserialize<'de> for ZomeCallParams
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ZomeCallParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ZomeCallParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ZomeCallParams
impl Serialize for ZomeCallParams
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
Auto Trait Implementations§
impl Freeze for ZomeCallParams
impl RefUnwindSafe for ZomeCallParams
impl Send for ZomeCallParams
impl Sync for ZomeCallParams
impl Unpin for ZomeCallParams
impl UnsafeUnpin for ZomeCallParams
impl UnwindSafe for ZomeCallParams
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