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

Add middleware helpers for Mina #393

Draft
wants to merge 35 commits into
base: master
Choose a base branch
from
Draft

Conversation

SpaceManiac
Copy link
Contributor

@SpaceManiac SpaceManiac commented Jul 15, 2024

Draft pending #389.


  • Improve exported API of mina-delegation package to deal with usability issues.
    • Rename DelegationOrder to DelegationCommand.
  • Add MinaDelegationCache to @paima-sdk/providers.
    • Given a gameName, this uses localStorage + a background worker to generate and cache a DelegationCommand proof.
    • Necessitated some build system fixups.
  • Let some IProvider.signMessage implementations accept Uint8Array in addition to string.
    • Mina itself is excluded because Auro Wallet's API accepts strings only.
    • Therefore the IProvider interface itself only accepts string still.
    • It's still not advised to pass non-UTF-8 data, e.g. EVM personal_sign data is treated as text, so it won't look pretty.
    • Mainly included because of code improvements to how the strings get hex'd.

TODO:

  • (?) Rename mina-delgation back to mina-contracts since caching is out & no longer demands that we split packages per program/contract.

Demo at PaimaStudios/paima-game-templates#81.

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 this pull request may close these issues.

1 participant