-
Notifications
You must be signed in to change notification settings - Fork 7
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
refactor: add new react hooks to improve devex #5
base: main
Are you sure you want to change the base?
refactor: add new react hooks to improve devex #5
Conversation
Hi @avasisht23 @moldy530 , I partially implemented this but ran into a few issues: It seems that
are not exported from the current alchemy build 3.8.1 - is this correct? Secondly, I need to sign a siwe message after successful login to obtain a backend session. What is the correct way to do this? Thanks |
hey @mwawrusch that's right! I was testing on this branch the changes I'm making here in aa-sdk.
I'll be planning to add these hooks very shortly (in 1-2 days) 🤞 and we can ideally launch in 3.8.2 |
Thanks. Great work btw, really appreciate the simplicity. |
@mwawrusch no worries! will ping you when they are live.
As for this, I believe once you get the signer back after authenticating, you can connect it to a smart account client to sign a SIWE message using the useSignMessage hook? If you want to use the signer as an EOA signer, I think you can just use signMessage on the authenticated signer itself to sign the SIWE message. lemme know if that works. |
Thanks. The actual signing i have handled, it's more about what's the best way to get notified that a connection happened, like an onConnect callback in the AlchemyAccountProvider, or listening to the state change via useSignerStatus. |
Here is my current implementation. It does trigger the sign in twice on development at least (which might be the react dev model double invokation thing).
|
9c5e988
to
76d363b
Compare
b440863
to
ccd2aad
Compare
No description provided.