Struct lightning_signer::signer::my_keys_manager::MyKeysManager[][src]

pub struct MyKeysManager { /* fields omitted */ }

Implementations

impl MyKeysManager[src]

pub fn new(
    key_derivation_style: KeyDerivationStyle,
    seed: &[u8],
    network: Network,
    logger: Arc<dyn SyncLogger>,
    starting_time_secs: u64,
    starting_time_nanos: u32
) -> MyKeysManager
[src]

pub fn get_account_extended_key(&self) -> &ExtendedPrivKey[src]

Get the layer-1 xpub

pub fn per_commitment_point<X: Signing>(
    secp_ctx: &Secp256k1<X>,
    commitment_secret: &[u8; 32]
) -> PublicKey
[src]

Convert a commitment secret to a commitment point

pub fn get_channel_id(&self) -> [u8; 32][src]

Trait Implementations

impl KeysInterface for MyKeysManager[src]

type Signer = InMemorySigner

A type which implements Sign which will be returned by get_channel_signer.

fn get_node_secret(&self) -> SecretKey[src]

Get node secret key (aka node_id or network_key). Read more

fn get_destination_script(&self) -> Script[src]

Get a script pubkey which we send funds to when claiming on-chain contestable outputs. Read more

fn get_shutdown_pubkey(&self) -> PublicKey[src]

Get a public key which we will send funds to (in the form of a P2WPKH output) when closing a channel. Read more

fn get_channel_signer(
    &self,
    _inbound: bool,
    _channel_value_sat: u64
) -> InMemorySigner
[src]

Get a new set of Sign for per-channel secrets. These MUST be unique even if you restarted with some stale data! Read more

fn get_secure_random_bytes(&self) -> [u8; 32][src]

Gets a unique, cryptographically-secure, random 32 byte value. This is used for encrypting onion packets and for temporary channel IDs. There is no requirement that these be persisted anywhere, though they must be unique across restarts. Read more

fn read_chan_signer(&self, _reader: &[u8]) -> Result<Self::Signer, DecodeError>[src]

Reads a Signer for this KeysInterface from the given input stream. This is only called during deserialization of other objects which contain Sign-implementing objects (ie ChannelMonitors and ChannelManagers). The bytes are exactly those which <Self::Signer as Writeable>::write() writes, and contain no versioning scheme. You may wish to include your own version prefix and ensure you’ve read all of the provided bytes to ensure no corruption occurred. Read more

fn sign_invoice(
    &self,
    _invoice_preimage: Vec<u8>
) -> Result<RecoverableSignature, ()>
[src]

Sign an invoice’s preimage (note that this is the preimage of the invoice, not the HTLC’s preimage). By parameterizing by the preimage instead of the hash, we allow implementors of this trait to parse the invoice and make sure they’re signing what they expect, rather than blindly signing the hash. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.