Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump @zk-kit/eddsa-poseidon from 0.5.1 to 0.11.0 #1325

Merged
merged 2 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@zk-kit/baby-jubjub": "^0.3.0",
"@zk-kit/eddsa-poseidon": "^0.5.1",
"@zk-kit/eddsa-poseidon": "^0.11.0",
"@zk-kit/poseidon-cipher": "^0.3.0",
"ethers": "^6.11.1"
},
Expand Down
4 changes: 2 additions & 2 deletions crypto/ts/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const genRandomSalt = (): bigint => genRandomBabyJubValue();
* @param privKey A private key generated using genPrivKey()
* @returns A BabyJub-compatible private key.
*/
export const formatPrivKeyForBabyJub = (privKey: PrivKey): bigint => BigInt(deriveSecretScalar(privKey));
export const formatPrivKeyForBabyJub = (privKey: PrivKey): bigint => BigInt(deriveSecretScalar(privKey.toString()));

/**
* Losslessly reduces the size of the representation of a public key
Expand All @@ -49,7 +49,7 @@ export const unpackPubKey = (packed: bigint): PubKey => {
* @returns A public key associated with the private key
*/
export const genPubKey = (privKey: PrivKey): PubKey => {
const key = derivePublicKey(privKey);
const key = derivePublicKey(privKey.toString());
return [BigInt(key[0]), BigInt(key[1])];
};

Expand Down
2 changes: 1 addition & 1 deletion domainobjs/ts/commands/PCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class PCommand implements ICommand {
/**
* @notice Signs this command and returns a Signature.
*/
sign = (privKey: PrivKey): Signature => sign(privKey.rawPrivKey, this.hash());
sign = (privKey: PrivKey): Signature => sign(privKey.rawPrivKey.toString(), this.hash());

/**
* @notice Returns true if the given signature is a correct signature of this
Expand Down
29 changes: 13 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading