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

[new feature] verify signatures #438

Closed
frankiebee opened this issue Dec 9, 2024 · 0 comments · Fixed by #445
Closed

[new feature] verify signatures #438

frankiebee opened this issue Dec 9, 2024 · 0 comments · Fixed by #445
Assignees

Comments

@frankiebee
Copy link
Collaborator

frankiebee commented Dec 9, 2024

New Feature Spec:

import { verify } from '@entropyxyz/sdk/utils/crypto'
import { Entropy, /*all the other things*/ } from '@entropyxyz/sdk'

.... // start up entropy

const sig = entropy.sign(args)
// these will have the same outputs they are the same functions
(await entropy.verify(sig) === await verify(sig))

if (await entropy.verify(sig)) {
// carry on
} else {
  throw new Error('Could not verify signature')
}

for signature interface see #434

function verify (Signature): Promise<boolean>

see also #437 for how we will handle cases where the program has it's own custom hashing algorithm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant