mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
Merge pull request #1931 from TheBlueMatt/2022-12-1910-followups
Trivial #1910 Followups
This commit is contained in:
commit
c04d1c985f
2 changed files with 4 additions and 2 deletions
|
@ -483,10 +483,12 @@ pub trait NodeSigner {
|
||||||
fn ecdh(&self, recipient: Recipient, other_key: &PublicKey, tweak: Option<&Scalar>) -> Result<SharedSecret, ()>;
|
fn ecdh(&self, recipient: Recipient, other_key: &PublicKey, tweak: Option<&Scalar>) -> Result<SharedSecret, ()>;
|
||||||
|
|
||||||
/// Sign an invoice.
|
/// Sign an invoice.
|
||||||
|
///
|
||||||
/// By parameterizing by the raw invoice bytes instead of the hash, we allow implementors of
|
/// By parameterizing by the raw invoice bytes 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
|
/// this trait to parse the invoice and make sure they're signing what they expect, rather than
|
||||||
/// blindly signing the hash.
|
/// blindly signing the hash.
|
||||||
/// The hrp is ascii bytes, while the invoice data is base32.
|
///
|
||||||
|
/// The `hrp_bytes` are ASCII bytes, while the `invoice_data` is base32.
|
||||||
///
|
///
|
||||||
/// The secret key used to sign the invoice is dependent on the [`Recipient`].
|
/// The secret key used to sign the invoice is dependent on the [`Recipient`].
|
||||||
///
|
///
|
||||||
|
|
|
@ -36,6 +36,7 @@ use bitcoin::network::constants::Network;
|
||||||
use bitcoin::hash_types::{BlockHash, Txid};
|
use bitcoin::hash_types::{BlockHash, Txid};
|
||||||
|
|
||||||
use bitcoin::secp256k1::{SecretKey, PublicKey, Secp256k1, ecdsa::Signature, Scalar};
|
use bitcoin::secp256k1::{SecretKey, PublicKey, Secp256k1, ecdsa::Signature, Scalar};
|
||||||
|
use bitcoin::secp256k1::ecdh::SharedSecret;
|
||||||
use bitcoin::secp256k1::ecdsa::RecoverableSignature;
|
use bitcoin::secp256k1::ecdsa::RecoverableSignature;
|
||||||
|
|
||||||
use regex;
|
use regex;
|
||||||
|
@ -51,7 +52,6 @@ use crate::chain::keysinterface::{InMemorySigner, Recipient, KeyMaterial, Entrop
|
||||||
|
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
use std::time::{SystemTime, UNIX_EPOCH};
|
use std::time::{SystemTime, UNIX_EPOCH};
|
||||||
use bitcoin::secp256k1::ecdh::SharedSecret;
|
|
||||||
use bitcoin::Sequence;
|
use bitcoin::Sequence;
|
||||||
|
|
||||||
pub struct TestVecWriter(pub Vec<u8>);
|
pub struct TestVecWriter(pub Vec<u8>);
|
||||||
|
|
Loading…
Add table
Reference in a new issue