pub struct LegacyDaedalusPrivateKey(_);
Implementations§
source§impl LegacyDaedalusPrivateKey
impl LegacyDaedalusPrivateKey
pub fn from_bytes(bytes: &[u8]) -> Result<LegacyDaedalusPrivateKey, JsError>
pub fn as_bytes(&self) -> Vec<u8>
sourcepub fn chaincode(&self) -> Vec<u8>
pub fn chaincode(&self) -> Vec<u8>
Examples found in repository?
src/utils.rs (line 1189)
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())
}