pub type SignedActionHashed = SignedHashed<Action>;
Expand description

The hashed action and the signature that signed it

Aliased Type§

struct SignedActionHashed {
    pub hashed: HoloHashed<Action>,
    pub signature: Signature,
}

Fields§

§hashed: HoloHashed<Action>

The hashed content.

§signature: Signature

The signature of the content.

Implementations§

§

impl<T> SignedHashed<T>where T: HashableContent, <T as HashableContent>::HashType: HashTypeSync,

pub fn new(content: T, signature: Signature) -> SignedHashed<T>

Create a new signed and hashed content by hashing the content.

§

impl<T> SignedHashed<T>where T: HashableContent,

pub fn into_inner(self) -> (HoloHashed<T>, Signature)

Destructure into a HoloHashed and Signature.

pub fn as_hash(&self) -> &HoloHash<<T as HashableContent>::HashType>

Access the already-calculated hash stored in this wrapper type.

pub fn with_presigned( hashed: HoloHashed<T>, signature: Signature ) -> SignedHashed<T>

Create with an existing signature.

pub fn signature(&self) -> &Signature

Access the signature portion.

§

impl SignedHashed<Action>

pub fn action_address(&self) -> &HoloHash<Action>

Access the Action Hash.

pub fn action(&self) -> &Action

Access the Action portion.

pub fn raw_from_same_hash<T>(other: SignedHashed<T>) -> SignedHashed<Action>where T: Into<Action> + HashableContent<HashType = Action>,

Create a new SignedActionHashed from a type that implements into Action and has the same hash bytes. The caller must make sure the hash does not change.

Trait Implementations§

§

impl<'a, T> Arbitrary<'a> for SignedHashed<T>where T: HashableContent + Arbitrary<'a>, <T as HashableContent>::HashType: PrimitiveHashType,

§

fn arbitrary(u: &mut Unstructured<'a>) -> Result<SignedHashed<T>, Error>

Generate an arbitrary value of Self from the given unstructured data. Read more
§

fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
§

impl AsRef<SignedHashed<Action>> for SignedHashed<Action>

§

fn as_ref(&self) -> &SignedHashed<Action>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl ChainItem for SignedHashed<Action>

§

type Hash = HoloHash<Action>

The type used to represent a hash of this item
source§

fn seq(&self) -> u32

The sequence in the chain
source§

fn get_hash(&self) -> &<SignedHashed<Action> as ChainItem>::Hash

The hash of this item
source§

fn prev_hash(&self) -> Option<&<SignedHashed<Action> as ChainItem>::Hash>

The hash of the previous item
source§

fn to_display(&self) -> String

A display representation of the item
§

impl<T> Clone for SignedHashed<T>where T: Clone + HashableContent,

§

fn clone(&self) -> SignedHashed<T>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
§

impl<T> Debug for SignedHashed<T>where T: Debug + HashableContent,

§

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

Formats the value using the given formatter. Read more
§

impl<'de, T> Deserialize<'de> for SignedHashed<T>where T: HashableContent + Deserialize<'de>,

§

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

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

impl From<TestChainItem> for SignedHashed<Action>

source§

fn from(a: TestChainItem) -> SignedHashed<Action>

Converts to this type from the input type.
§

impl<T> Hash for SignedHashed<T>where T: HashableContent,

§

fn hash<H>(&self, state: &mut H)where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl<C, T> HashableContent for SignedHashed<C>where C: HashableContent<HashType = T>, T: PrimitiveHashType,

§

type HashType = <C as HashableContent>::HashType

The HashType which this content will be hashed to
§

fn hash_type(&self) -> <SignedHashed<C> as HashableContent>::HashType

The HashType which this content will be hashed to
§

fn hashable_content(&self) -> HashableContentBytes

Return a subset of the content, either as SerializedBytes “content”, which will be used to compute the hash, or as an already precomputed hash which will be used directly
§

impl<T> PartialEq<SignedHashed<T>> for SignedHashed<T>where T: HashableContent,

§

fn eq(&self, other: &SignedHashed<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

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

impl<T> Serialize for SignedHashed<T>where T: HashableContent + Serialize,

§

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 SignedActionHashedExt for SignedHashed<Action>

source§

fn sign<'life0, 'async_trait>( keystore: &'life0 MetaLairClient, action_hashed: HoloHashed<Action> ) -> Pin<Box<dyn Future<Output = Result<SignedHashed<Action>, OneErr>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, SignedHashed<Action>: 'async_trait,

Construct by signing the Action (NOT including the hash)

source§

fn validate<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<(), KeystoreError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, SignedHashed<Action>: 'async_trait,

Validates a signed action

source§

fn from_content_sync(signed_action: SignedAction) -> SignedHashed<Action>where SignedHashed<Action>: Sized,

Create a hash from data
§

impl<T> Eq for SignedHashed<T>where T: Eq + HashableContent,

§

impl<T> StructuralEq for SignedHashed<T>where T: HashableContent,