pub struct LocalKey { /* private fields */ }Expand description
A secp256k1 key held in memory, from a key file’s text (32-byte hex,
sign.mjs loadKey). Nothing here prints or displays the key.
Implementations§
Source§impl LocalKey
impl LocalKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self>
pub fn from_bytes(bytes: &[u8; 32]) -> Result<Self>
From 32 bytes.
Sourcepub fn from_hex(text: &str) -> Result<Self>
pub fn from_hex(text: &str) -> Result<Self>
From a key file’s text: 64 hex characters, surrounding whitespace
ignored (sign.mjs loadKey).
Sourcepub fn pubkey_hex(&self) -> String
pub fn pubkey_hex(&self) -> String
The x-only public key as 64 lowercase hex characters.
Trait Implementations§
Source§impl BlockSigner for LocalKey
impl BlockSigner for LocalKey
Source§fn pubkey(&self) -> XOnlyPublicKey
fn pubkey(&self) -> XOnlyPublicKey
The x-only key that sits in the federation’s leaf.
Source§fn sign_partial(&self, request: &PartialRequest<'_>) -> Result<Signature>
fn sign_partial(&self, request: &PartialRequest<'_>) -> Result<Signature>
A BIP-340 signature over a block template’s tapscript sighash.
Source§fn sign_pegout_input(
&self,
request: &PegoutSignRequest<'_>,
) -> Result<Signature>
fn sign_pegout_input( &self, request: &PegoutSignRequest<'_>, ) -> Result<Signature>
A BIP-340 signature over one peg-out input’s tapscript sighash.
Auto Trait Implementations§
impl Freeze for LocalKey
impl RefUnwindSafe for LocalKey
impl Send for LocalKey
impl Sync for LocalKey
impl Unpin for LocalKey
impl UnsafeUnpin for LocalKey
impl UnwindSafe for LocalKey
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