File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff 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' ;
2020export type TransactionStatus = 'TRANSACTION_RECEIVED' ;
2121export type Type = 'DEPLOY' | 'INVOKE_FUNCTION' ;
Original file line number Diff line number Diff 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+ */
5662export function getKeyPairFromPublicKey ( publicKey : BigNumberish ) : KeyPair {
5763 const publicKeyBn = toBN ( publicKey ) ;
5864 return ec . keyFromPublic ( removeHexPrefix ( toHex ( publicKeyBn ) ) , 'hex' ) ;
You can’t perform that action at this time.
0 commit comments