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

I/O should be on plain JS types where possible #50

Open
mitschabaude opened this issue Oct 25, 2024 · 0 comments
Open

I/O should be on plain JS types where possible #50

mitschabaude opened this issue Oct 25, 2024 · 0 comments
Assignees

Comments

@mitschabaude
Copy link
Member

mitschabaude commented Oct 25, 2024

Currently, interaction with Credentials, Presentations etc always requires you use o1js types. This is inconvenient and makes the library feel less like a "standard". Input values should be numbers, booleans, bytes, strings, bigints and not Field, Bool, Bytes, PublicKey etc.

Changing the implementation to do this is not hard because we have fromValue() / toValue() on every provable type which performs exactly this conversion. The only challenge is that it requires a rewrite of almost all types to also represent the "value" types (sometimes it might be enough to only represent the value types and skip the provable types)

@mitschabaude mitschabaude self-assigned this Oct 25, 2024
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

No branches or pull requests

1 participant