pub struct KeypairInfo {
pub secret: [u8; 64],
pub public: [u8; 32],
}
Expand description
Key info wrapped in pkcs8 format.
NOTE: the meaning of these bytes is ambiguous for now, see https://github.com/polkadot-js/common/issues/1908
For the encoded data format of this implementation:
ENCODED(117) = HEADER(16) + SECRET_KEY_LENGTH(64) + DIVIDER(5) + PUBLIC_KEY_LENGTH(32)
Fields§
§secret: [u8; 64]
Schnorrkel secret key.
public: [u8; 32]
Schnorrkel public key.
Implementations§
Source§impl KeypairInfo
impl KeypairInfo
Sourcepub const ENCODED_LENGTH: usize = 117usize
pub const ENCODED_LENGTH: usize = 117usize
The length of the pkcs8 key info.
NOTE: LENGTH(117) = HEADER(16) + SECRET_KEY_LENGTH + DIVIDER(5) + PUBLIC_KEY_LENGTH
Sourcepub fn into_keypair(self) -> Result<Keypair>
pub fn into_keypair(self) -> Result<Keypair>
Convert self to schnorrkel keypair.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeypairInfo
impl RefUnwindSafe for KeypairInfo
impl Send for KeypairInfo
impl Sync for KeypairInfo
impl Unpin for KeypairInfo
impl UnwindSafe for KeypairInfo
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