File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,13 @@ const aPoint = (p: unknown) => (p instanceof Point ? p : err('Point expected'));
4848export interface AffinePoint { x : bigint , y : bigint }
4949/** Point in 3d xyz projective coordinates. 3d takes less inversions than 2d. */
5050class Point {
51- constructor ( readonly px : bigint , readonly py : bigint , readonly pz : bigint ) {
51+ readonly px : bigint ;
52+ readonly py : bigint ;
53+ readonly pz : bigint ;
54+ constructor ( px : bigint , py : bigint , pz : bigint ) {
55+ this . px = px ;
56+ this . py = py ;
57+ this . pz = pz ;
5258 Object . freeze ( this ) ;
5359 }
5460 /** Generator / base point */
@@ -228,7 +234,13 @@ const getPublicKey = (privKey: PrivKey, isCompressed = true): Bytes => {
228234}
229235/** ECDSA Signature class. Supports only compact 64-byte representation, not DER. */
230236class Signature {
231- constructor ( readonly r : bigint , readonly s : bigint , readonly recovery ?: number ) {
237+ readonly r : bigint ;
238+ readonly s : bigint ;
239+ readonly recovery ?: number ;
240+ constructor ( r : bigint , s : bigint , recovery ?: number ) {
241+ this . r = r ;
242+ this . s = s ;
243+ if ( this . recovery != null ) this . recovery = recovery ;
232244 this . assertValidity ( ) ; // recovery bit is optional when
233245 Object . freeze ( this ) ;
234246 } // constructed outside.
You can’t perform that action at this time.
0 commit comments