Type Alias polkadot_core_primitives::Signature
source · pub type Signature = MultiSignature;
Expand description
Alias to type for a signature for a transaction on the relay chain. This allows one of several kinds of underlying crypto to be used, so isn’t a fixed size when encoded.
Aliased Type§
enum Signature {
Ed25519(CryptoBytes<64, (SignatureTag, Ed25519Tag)>),
Sr25519(CryptoBytes<64, (SignatureTag, Sr25519Tag)>),
Ecdsa(CryptoBytes<65, (SignatureTag, EcdsaTag)>),
}
Variants§
Ed25519(CryptoBytes<64, (SignatureTag, Ed25519Tag)>)
An Ed25519 signature.
Sr25519(CryptoBytes<64, (SignatureTag, Sr25519Tag)>)
An Sr25519 signature.
Ecdsa(CryptoBytes<65, (SignatureTag, EcdsaTag)>)
An ECDSA/SECP256k1 signature.
Trait Implementations
source§impl Clone for MultiSignature
impl Clone for MultiSignature
source§fn clone(&self) -> MultiSignature
fn clone(&self) -> MultiSignature
Returns a copy 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 MultiSignature
impl Debug for MultiSignature
source§impl Decode for MultiSignature
impl Decode for MultiSignature
source§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<MultiSignature, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<MultiSignature, Error>where
__CodecInputEdqy: Input,
Attempt to deserialise the value from input.
source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
source§impl<'de> Deserialize<'de> for MultiSignature
impl<'de> Deserialize<'de> for MultiSignature
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MultiSignature, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MultiSignature, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Encode for MultiSignature
impl Encode for MultiSignature
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
source§fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl From<CryptoBytes<sp_core::::ecdsa::Signature::{constant#0}, (SignatureTag, EcdsaTag)>> for MultiSignature
impl From<CryptoBytes<sp_core::::ecdsa::Signature::{constant#0}, (SignatureTag, EcdsaTag)>> for MultiSignature
source§fn from(
x: CryptoBytes<sp_core::::ecdsa::Signature::{constant#0}, (SignatureTag, EcdsaTag)>,
) -> MultiSignature
fn from( x: CryptoBytes<sp_core::::ecdsa::Signature::{constant#0}, (SignatureTag, EcdsaTag)>, ) -> MultiSignature
Converts to this type from the input type.
source§impl From<CryptoBytes<sp_core::::ed25519::Signature::{constant#0}, (SignatureTag, Ed25519Tag)>> for MultiSignature
impl From<CryptoBytes<sp_core::::ed25519::Signature::{constant#0}, (SignatureTag, Ed25519Tag)>> for MultiSignature
source§fn from(
x: CryptoBytes<sp_core::::ed25519::Signature::{constant#0}, (SignatureTag, Ed25519Tag)>,
) -> MultiSignature
fn from( x: CryptoBytes<sp_core::::ed25519::Signature::{constant#0}, (SignatureTag, Ed25519Tag)>, ) -> MultiSignature
Converts to this type from the input type.
source§impl From<CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>> for MultiSignature
impl From<CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>> for MultiSignature
source§fn from(
x: CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>,
) -> MultiSignature
fn from( x: CryptoBytes<sp_core::::sr25519::Signature::{constant#0}, (SignatureTag, Sr25519Tag)>, ) -> MultiSignature
Converts to this type from the input type.
source§impl MaxEncodedLen for MultiSignature
impl MaxEncodedLen for MultiSignature
source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
source§impl PartialEq for MultiSignature
impl PartialEq for MultiSignature
source§fn eq(&self, other: &MultiSignature) -> bool
fn eq(&self, other: &MultiSignature) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for MultiSignature
impl Serialize for MultiSignature
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