Skip to content

Commit 4cd969f

Browse files
committed
fix: add jsdoc comment
1 parent 66d543d commit 4cd969f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export type Status =
1414
| 'NOT_RECEIVED'
1515
| 'RECEIVED'
1616
| 'PENDING'
17-
| 'ACCEPTED_ON_L1'
1817
| 'ACCEPTED_ON_L2'
18+
| 'ACCEPTED_ON_L1'
1919
| 'REJECTED';
2020
export type TransactionStatus = 'TRANSACTION_RECEIVED';
2121
export type Type = 'DEPLOY' | 'INVOKE_FUNCTION';

src/utils/ellipticCurve.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ export function getStarkKey(keyPair: KeyPair): string {
5353
return addHexPrefix(sanitizeBytes((keyPair as any).pub.getX().toString(16), 2));
5454
}
5555

56+
/**
57+
* Takes a public key and casts it into `elliptic` KeyPair format.
58+
*
59+
* @param publicKey - public key which should get casted to a KeyPair
60+
* @returns keyPair with public key only, which can be used to verify signatures, but cant sign anything
61+
*/
5662
export function getKeyPairFromPublicKey(publicKey: BigNumberish): KeyPair {
5763
const publicKeyBn = toBN(publicKey);
5864
return ec.keyFromPublic(removeHexPrefix(toHex(publicKeyBn)), 'hex');

0 commit comments

Comments
 (0)