Skip to content

Commit

Permalink
Merge pull request #24 from sorare/pd/compressed-starkey
Browse files Browse the repository at this point in the history
Allow exporting a compressed public stark key
  • Loading branch information
piedup committed Oct 13, 2023
2 parents e31459a + 50eaa7f commit d257171
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Crypto used in the Sorare stack",
"author": "Sorare",
"license": "MIT",
"version": "2.0.1",
"version": "2.0.2",
"main": "lib.js",
"dependencies": {
"@noble/curves": "^1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export const generateKey = (mnemonic?: string) => {
return `0x${privateKey.padStart(64, '0')}`;
};

export const exportPublicKey = (privateKey: string) =>
`0x${bytesToHex(starknet.getPublicKey(privateKey, true))}`;
export const exportPublicKey = (privateKey: string, isCompressed = true) =>
`0x${bytesToHex(starknet.getPublicKey(privateKey, isCompressed))}`;

const hashTransfer = (transfer: Transfer) => {
const {
Expand Down

0 comments on commit d257171

Please sign in to comment.