@@ -3,7 +3,7 @@ import hashJS from 'hash.js';
33import assert from 'minimalistic-assert' ;
44
55import { CONSTANT_POINTS , EC_ORDER , FIELD_PRIME , MAX_ECDSA_VAL , ONE , ZERO } from './constants' ;
6- import { addHexPrefix , removeHexPrefix , sanitizeBytes } from './utils/enc ' ;
6+ import { addHexPrefix , removeHexPrefix , sanitizeBytes } from './utils/encode ' ;
77import { BigNumberish , assertInRange , toBN , toHex } from './utils/number' ;
88
99export const ec = new EC (
@@ -40,17 +40,17 @@ function fixMessage(msg: string) {
4040
4141export const genKeyPair = ec . genKeyPair . bind ( ec ) ;
4242
43- export const getKeyPair = ( pk : BigNumberish ) : EC . KeyPair => {
43+ export function getKeyPair ( pk : BigNumberish ) : EC . KeyPair {
4444 const pkBn = toBN ( pk ) ;
4545 return ec . keyFromPrivate ( removeHexPrefix ( toHex ( pkBn ) ) , 'hex' ) ;
46- } ;
46+ }
4747
48- export const getStarkKey = ( keyPair : EC . KeyPair ) : string => {
48+ export function getStarkKey ( keyPair : EC . KeyPair ) : string {
4949 // this method needs to be run to generate the .pub property used below
5050 // the result can be dumped
5151 keyPair . getPublic ( true , 'hex' ) ;
5252 return addHexPrefix ( sanitizeBytes ( ( keyPair as any ) . pub . getX ( ) . toString ( 16 ) , 2 ) ) ;
53- } ;
53+ }
5454
5555/*
5656 Signs a message using the provided key.
0 commit comments