Skip to content

Commit

Permalink
lib: Add Silent Payments module
Browse files Browse the repository at this point in the history
  • Loading branch information
jlest01 committed Sep 6, 2024
1 parent 337e58f commit f756622
Show file tree
Hide file tree
Showing 3 changed files with 553 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ pub const KEY_PAIR_SIZE: usize = 96;
/// The size of a full ElligatorSwift encoding.
pub const ELLSWIFT_ENCODING_SIZE: usize = 64;

/// The size of a silent payments public data object.
pub const SILENT_PAYMENTS_PUBLIC_DATA_SIZE: usize = 98;

/// The Prime for the secp256k1 field element.
#[rustfmt::skip]
pub const FIELD_SIZE: [u8; 32] = [
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,15 @@ pub mod constants;
pub mod ecdh;
pub mod ecdsa;
pub mod ellswift;
pub mod silentpayments;
pub mod scalar;
pub mod schnorr;
#[cfg(feature = "serde")]
mod serde_util;

// expose ffi::SilentpaymentsLabelLookupFunction
pub use ffi::SilentpaymentsLabelLookupFunction;

use core::marker::PhantomData;
use core::ptr::NonNull;
use core::{fmt, mem, str};
Expand Down
Loading

0 comments on commit f756622

Please sign in to comment.