pub struct Ed25519Signature(_);
Implementations§
source§impl Ed25519Signature
impl Ed25519Signature
sourcepub fn from_bytes(bytes: Vec<u8>) -> Result<Ed25519Signature, DeserializeError>
pub fn from_bytes(bytes: Vec<u8>) -> Result<Ed25519Signature, DeserializeError>
Examples found in repository?
More examples
src/utils.rs (line 1194)
1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198
pub fn make_daedalus_bootstrap_witness(
tx_body_hash: &TransactionHash,
addr: &ByronAddress,
key: &LegacyDaedalusPrivateKey,
) -> BootstrapWitness {
let chain_code = key.chaincode();
let pubkey = Bip32PublicKey::from_bytes(&key.0.to_public().as_ref()).unwrap();
let vkey = Vkey::new(&pubkey.to_raw_key());
let signature =
Ed25519Signature::from_bytes(key.0.sign(&tx_body_hash.to_bytes()).as_ref().to_vec())
.unwrap();
BootstrapWitness::new(&vkey, &signature, chain_code, addr.attributes())
}
Trait Implementations§
source§impl Clone for Ed25519Signature
impl Clone for Ed25519Signature
source§fn clone(&self) -> Ed25519Signature
fn clone(&self) -> Ed25519Signature
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 Ed25519Signature
impl Debug for Ed25519Signature
source§impl<'de> Deserialize<'de> for Ed25519Signature
impl<'de> Deserialize<'de> for Ed25519Signature
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Deserialize for Ed25519Signature
impl Deserialize for Ed25519Signature
fn deserialize<R: BufRead>(
raw: &mut Deserializer<R>
) -> Result<Self, DeserializeError>
source§impl JsonSchema for Ed25519Signature
impl JsonSchema for Ed25519Signature
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl PartialEq<Ed25519Signature> for Ed25519Signature
impl PartialEq<Ed25519Signature> for Ed25519Signature
source§fn eq(&self, other: &Ed25519Signature) -> bool
fn eq(&self, other: &Ed25519Signature) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.