Trait ScriptGenerators

Source
pub trait ScriptGenerators {
    // Required methods
    fn ln_funding(
        amount: u64,
        local_pubkey: &LocalPubkey,
        remote_pubkey: PublicKey,
    ) -> Self;
    fn ln_to_local(
        amount: u64,
        revocationpubkey: PublicKey,
        local_delayedpubkey: PublicKey,
        to_self_delay: u16,
    ) -> Self;
    fn ln_to_remote_v1(amount: u64, remote_pubkey: PublicKey) -> Self;
    fn ln_to_remote_v2(amount: u64, remote_pubkey: PublicKey) -> Self;
}

Required Methods§

Source

fn ln_funding( amount: u64, local_pubkey: &LocalPubkey, remote_pubkey: PublicKey, ) -> Self

Source

fn ln_to_local( amount: u64, revocationpubkey: PublicKey, local_delayedpubkey: PublicKey, to_self_delay: u16, ) -> Self

NB: We use argument named local_delayedpubkey, but in fact the source for this key is the remote node key, since we generate a transaction which we will sign for the remote node.

Source

fn ln_to_remote_v1(amount: u64, remote_pubkey: PublicKey) -> Self

NB: We use argument named remote_pubkey, but in fact the source for this key is the local node key, since we generate a transaction which we will sign for the remote node.

Source

fn ln_to_remote_v2(amount: u64, remote_pubkey: PublicKey) -> Self

NB: We use argument named remote_pubkey, but in fact the source for this key is the local node key, since we generate a transaction which we will sign for the remote node.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ScriptGenerators for LockScript

Source§

fn ln_funding( _: u64, local_pubkey: &LocalPubkey, remote_pubkey: PublicKey, ) -> Self

Source§

fn ln_to_local( _: u64, revocationpubkey: PublicKey, local_delayedpubkey: PublicKey, to_self_delay: u16, ) -> Self

Source§

fn ln_to_remote_v1(_: u64, _: PublicKey) -> Self

Source§

fn ln_to_remote_v2(_: u64, remote_pubkey: PublicKey) -> Self

Source§

impl ScriptGenerators for PubkeyScript

Source§

fn ln_funding( amount: u64, local_pubkey: &LocalPubkey, remote_pubkey: PublicKey, ) -> Self

Source§

fn ln_to_local( amount: u64, revocationpubkey: PublicKey, local_delayedpubkey: PublicKey, to_self_delay: u16, ) -> Self

Source§

fn ln_to_remote_v1(_: u64, remote_pubkey: PublicKey) -> Self

Source§

fn ln_to_remote_v2(amount: u64, remote_pubkey: PublicKey) -> Self

Source§

impl ScriptGenerators for WitnessScript

Source§

fn ln_funding( amount: u64, local_pubkey: &LocalPubkey, remote_pubkey: PublicKey, ) -> Self

Source§

fn ln_to_local( amount: u64, revocationpubkey: PublicKey, local_delayedpubkey: PublicKey, to_self_delay: u16, ) -> Self

Source§

fn ln_to_remote_v1(_: u64, _: PublicKey) -> Self

Source§

fn ln_to_remote_v2(amount: u64, remote_pubkey: PublicKey) -> Self

Source§

impl ScriptGenerators for Output

Source§

fn ln_funding( amount: u64, local_pubkey: &LocalPubkey, remote_pubkey: PublicKey, ) -> Self

Source§

fn ln_to_local( amount: u64, revocationpubkey: PublicKey, local_delayedpubkey: PublicKey, to_self_delay: u16, ) -> Self

Source§

fn ln_to_remote_v1(amount: u64, remote_pubkey: PublicKey) -> Self

Source§

fn ln_to_remote_v2(amount: u64, remote_pubkey: PublicKey) -> Self

Implementors§