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

Wallets and user onboarding (v1) #2852

Open
16 tasks
holic opened this issue May 22, 2024 · 1 comment
Open
16 tasks

Wallets and user onboarding (v1) #2852

holic opened this issue May 22, 2024 · 1 comment
Milestone

Comments

@holic
Copy link
Member

holic commented May 22, 2024

We've been prototyping a complete wallet integration and user onboarding flow in #2623

This issue will capture what we have left for a v1 and replaces some previous issues.

This new library/package will be wired up in the same way you might wire up RainbowKit or ConnectKit, where it sits within a Wagmi provider and leans on the Wagmi config for defaults. It will expose an appAccountClient that is populated once a user has fully onboarded (wallet connected, app account funded and registered into the world).

  • Get Unstable_CallWithSignatureModule audited
  • Rip out smart account and gas tank stuff for now
  • Finalize designs
    • Implement designs
  • Clarify "gas tank balance" analogy
  • Properly calculate gas required for "withdraw all funds"
  • Solidify assumptions: for MUD apps on OP Stack chains
  • Onboarded = all requirements fulfilled and balance > 0
  • Consistent error+pending states and async operations (e.g. deposits)
  • Revisit button pending states
  • UI page in sandbox to show various states for easier design iteration
  • Add tests for critical paths
  • Explore remote iframes for isolation and automatic upgrades
    • wallet connection lives in parent window, app account lives in iframe
    • account kit package mounts the remote iframe, sets up message bus(es)
    • some message bus for account kit iframe to trigger wallet actions (e.g. signing messages and txs, switching network, etc.)
    • some message bus for app account client in parent window to trigger actions on app account
      • or, more simply, just pass the app signer PK up to the parent window?
  • Explore what is required to move away from RainbowKit to our own UI (not a v1 blocker)
  • Explore mobile support (not a v1 blocker)
  • Add to templates
@holic holic added this to the Onboarding milestone May 22, 2024
@holic
Copy link
Member Author

holic commented Jun 4, 2024

Some additional reminders for myself:

  • rename config.appInfo to config.app for alignment with upcoming app metadata
  • remove config.gasPerAction and config.calldataPerAction in favor of gas tank gauge analogy
  • add "url" suffix to config options that are URLs?
  • add "learn more" config option to align with RainbowKit? also check for ConnectKit app metadata alignment
  • move rainbowkit usage into core (and into iframe portal) in prep for replacing it with something else
  • use wagmi config subset rather than the full thing excluding client?
  • use "wallet" abstraction instead of "connector" in config so we can get extra metadata like wallet name, icon, etc? (see RainbowKit for example)
  • add wagmi/viem/react peer deps for using account kit import as a wrapper around global
  • chains should use our own type to include icon URL, bundler URL, etc.
  • figure out how to include foundry chain by default without causing errors related to talking to a node that may not be listening/running (can't do this conditionally at build time since it'll be a remote script)
  • expose some notion of external store on global/instance (need to factor in app account client vs prepared app account client)
  • figure out how to expose things like usePreparedAppAccountClient exported from core
  • upgrade to zustand v5?
  • internal stores in core (e.g. useAccountModal) should be constructed as part of initializing account kit, not during import time
  • see if we can tap directly into these internal core stores rather than SyncStore to avoid undefined sprinkled everywhere
  • revisit resolveJsonModule and strong types when importing ABI from .json.d.ts files

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

No branches or pull requests

1 participant