Skip to content
New issue

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

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

Already on GitHub? # to your account

Create a type with validity checks for private key #1226

Closed
Tracked by #1115
benesjan opened this issue Jul 27, 2023 · 0 comments · Fixed by #1232
Closed
Tracked by #1115

Create a type with validity checks for private key #1226

benesjan opened this issue Jul 27, 2023 · 0 comments · Fixed by #1232
Assignees

Comments

@benesjan
Copy link
Contributor

benesjan commented Jul 27, 2023

Create a type with validity checks for private key (i.e. buffer length = 32) and ensure the type is used everywhere in the codebase.

@github-project-automation github-project-automation bot moved this to Todo in A3 Jul 27, 2023
@benesjan benesjan changed the title Create a type for private key Create a type for private key with proper validity checks Jul 27, 2023
@benesjan benesjan changed the title Create a type for private key with proper validity checks Create a type for private key with validity checks Jul 27, 2023
@benesjan benesjan changed the title Create a type for private key with validity checks Create a type with validity checks for private key Jul 27, 2023
@benesjan benesjan self-assigned this Jul 27, 2023
@benesjan benesjan moved this from Todo to In Progress in A3 Jul 27, 2023
@benesjan benesjan mentioned this issue Jul 27, 2023
6 tasks
benesjan added a commit that referenced this issue Jul 27, 2023
1. Fixes #1226.
2. Separated classes in
`yarn-project/circuits.js/src/types/partial_contract_address.ts` to
individual files.
3. Refactored curves to not pass buffers for both public and private
key.
4. In the curves I renamed the `scalar` param to `privateKey` because
having scalar being type `PrivateKey` is weird and we don't ever use
these classes with scalars which are not a representation of private
key. For this reason I think it's ok to have the parameter name be less
generic. Another alternative I considered was having a `Scalar` type and
`PrivateKey` being a type alias of it but given that we don't use
non-private-key scalar anywhere in our TS codebase I think that's
unnecessary complication.
5. Renamed `e2e-account-contract` to `e2e-account-contracst` so that the
job name is consistent with the test name.
@github-project-automation github-project-automation bot moved this from In Progress to Done in A3 Jul 27, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant