@@ -20,46 +20,46 @@ use crate::ln::features::BlindedHopFeatures;
20
20
use crate :: offers:: invoice:: BlindedPayInfo ;
21
21
use crate :: offers:: merkle:: TaggedHash ;
22
22
23
- pub ( super ) fn payer_keys ( ) -> KeyPair {
23
+ pub ( crate ) fn payer_keys ( ) -> KeyPair {
24
24
let secp_ctx = Secp256k1 :: new ( ) ;
25
25
KeyPair :: from_secret_key ( & secp_ctx, & SecretKey :: from_slice ( & [ 42 ; 32 ] ) . unwrap ( ) )
26
26
}
27
27
28
- pub ( super ) fn payer_sign < T : AsRef < TaggedHash > > ( message : & T ) -> Result < Signature , Infallible > {
28
+ pub ( crate ) fn payer_sign < T : AsRef < TaggedHash > > ( message : & T ) -> Result < Signature , Infallible > {
29
29
let secp_ctx = Secp256k1 :: new ( ) ;
30
30
let keys = KeyPair :: from_secret_key ( & secp_ctx, & SecretKey :: from_slice ( & [ 42 ; 32 ] ) . unwrap ( ) ) ;
31
31
Ok ( secp_ctx. sign_schnorr_no_aux_rand ( message. as_ref ( ) . as_digest ( ) , & keys) )
32
32
}
33
33
34
- pub ( super ) fn payer_pubkey ( ) -> PublicKey {
34
+ pub ( crate ) fn payer_pubkey ( ) -> PublicKey {
35
35
payer_keys ( ) . public_key ( )
36
36
}
37
37
38
- pub ( super ) fn recipient_keys ( ) -> KeyPair {
38
+ pub ( crate ) fn recipient_keys ( ) -> KeyPair {
39
39
let secp_ctx = Secp256k1 :: new ( ) ;
40
40
KeyPair :: from_secret_key ( & secp_ctx, & SecretKey :: from_slice ( & [ 43 ; 32 ] ) . unwrap ( ) )
41
41
}
42
42
43
- pub ( super ) fn recipient_sign < T : AsRef < TaggedHash > > ( message : & T ) -> Result < Signature , Infallible > {
43
+ pub ( crate ) fn recipient_sign < T : AsRef < TaggedHash > > ( message : & T ) -> Result < Signature , Infallible > {
44
44
let secp_ctx = Secp256k1 :: new ( ) ;
45
45
let keys = KeyPair :: from_secret_key ( & secp_ctx, & SecretKey :: from_slice ( & [ 43 ; 32 ] ) . unwrap ( ) ) ;
46
46
Ok ( secp_ctx. sign_schnorr_no_aux_rand ( message. as_ref ( ) . as_digest ( ) , & keys) )
47
47
}
48
48
49
- pub ( super ) fn recipient_pubkey ( ) -> PublicKey {
49
+ pub ( crate ) fn recipient_pubkey ( ) -> PublicKey {
50
50
recipient_keys ( ) . public_key ( )
51
51
}
52
52
53
- pub ( super ) fn pubkey ( byte : u8 ) -> PublicKey {
53
+ pub ( crate ) fn pubkey ( byte : u8 ) -> PublicKey {
54
54
let secp_ctx = Secp256k1 :: new ( ) ;
55
55
PublicKey :: from_secret_key ( & secp_ctx, & privkey ( byte) )
56
56
}
57
57
58
- pub ( super ) fn privkey ( byte : u8 ) -> SecretKey {
58
+ pub ( crate ) fn privkey ( byte : u8 ) -> SecretKey {
59
59
SecretKey :: from_slice ( & [ byte; 32 ] ) . unwrap ( )
60
60
}
61
61
62
- pub ( super ) fn payment_paths ( ) -> Vec < ( BlindedPayInfo , BlindedPath ) > {
62
+ pub ( crate ) fn payment_paths ( ) -> Vec < ( BlindedPayInfo , BlindedPath ) > {
63
63
let paths = vec ! [
64
64
BlindedPath {
65
65
introduction_node_id: pubkey( 40 ) ,
@@ -101,17 +101,17 @@ pub(super) fn payment_paths() -> Vec<(BlindedPayInfo, BlindedPath)> {
101
101
payinfo. into_iter ( ) . zip ( paths. into_iter ( ) ) . collect ( )
102
102
}
103
103
104
- pub ( super ) fn payment_hash ( ) -> PaymentHash {
104
+ pub ( crate ) fn payment_hash ( ) -> PaymentHash {
105
105
PaymentHash ( [ 42 ; 32 ] )
106
106
}
107
107
108
- pub ( super ) fn now ( ) -> Duration {
108
+ pub ( crate ) fn now ( ) -> Duration {
109
109
std:: time:: SystemTime :: now ( )
110
110
. duration_since ( std:: time:: SystemTime :: UNIX_EPOCH )
111
111
. expect ( "SystemTime::now() should come after SystemTime::UNIX_EPOCH" )
112
112
}
113
113
114
- pub ( super ) struct FixedEntropy ;
114
+ pub ( crate ) struct FixedEntropy ;
115
115
116
116
impl EntropySource for FixedEntropy {
117
117
fn get_secure_random_bytes ( & self ) -> [ u8 ; 32 ] {
0 commit comments