File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use crate::{
6
6
assets:: AssetIdentifier ,
7
7
errors:: IronfishError ,
8
8
keys:: { IncomingViewKey , PublicAddress , ViewKey } ,
9
- primitives:: { ExtendedPoint , Nullifier } ,
9
+ primitives:: { ExtendedPoint , Nullifier , Scalar } ,
10
10
wasm_bindgen_wrapper,
11
11
} ;
12
12
use ironfish:: errors:: IronfishErrorKind ;
@@ -83,6 +83,11 @@ impl Note {
83
83
self . 0 . commitment ( ) . to_vec ( )
84
84
}
85
85
86
+ #[ wasm_bindgen( getter, js_name = commitmentPoint) ]
87
+ pub fn commitment_point ( & self ) -> Scalar {
88
+ self . 0 . commitment_point ( ) . into ( )
89
+ }
90
+
86
91
#[ wasm_bindgen]
87
92
pub fn encrypt ( & self , shared_secret : & [ u8 ] ) -> Result < Vec < u8 > , IronfishError > {
88
93
let shared_secret: & [ u8 ; 32 ] = shared_secret
Original file line number Diff line number Diff line change @@ -333,7 +333,7 @@ impl Note {
333
333
///
334
334
/// The owner can publish this value to commit to the fact that the note
335
335
/// exists, without revealing any of the values on the note until later.
336
- pub ( crate ) fn commitment_point ( & self ) -> Scalar {
336
+ pub fn commitment_point ( & self ) -> Scalar {
337
337
// The commitment is in the prime order subgroup, so mapping the
338
338
// commitment to the u-coordinate is an injective encoding.
339
339
ironfish_jubjub:: ExtendedPoint :: from ( self . commitment_full_point ( ) )
You can’t perform that action at this time.
0 commit comments