-
Notifications
You must be signed in to change notification settings - Fork 80
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
SIP: Modern Wallet APIs #166
base: main
Are you sure you want to change the base?
Conversation
Great work @janniks. Leather supports this SIP 🖤 |
Thanks for the input @m-aboelenein @kyranjamie . Do you think you could do another review with final remarks until ~Tue. 20.02.2024 to wrap this up with bipartisan support? 🙏 |
Added methods |
@aryzing @kyranjamie I added an update to the encoding (as discussed on last weeks call). Also updated:
Ping me if you disagree with anything -- trying to make the naming more logical and short |
CC @pradel would also love to get your feedback on this updated approach to "Connect"/auth -- it's less convoluted, but also more explicit (might need multiple steps for some things, that were just magically done in auth previously , e.g. requesting a gaia token would be it's own step, (although wallets could also add it to something like getAddresses / getAccounts) |
@janniks I like this change, less magic on what's going on and the behavior seems to be pretty similar to how ETH is doing things, making it easier for ETH devs to use the API |
CC @friedger would also love to get some of your feedback+expertise, since you've worked on this area in the past 🙏 |
Also, Thanks for all the feedback everyone! 👏 I feel like we're nearing a good document here. I think we can wrap it up soon 🫡 |
Let me know which email-addresses/github-usernames to add to the author list. cc @kyranjamie @m-aboelenein @aryzing |
Aren't all the commits yours? 😂 I wasn't even thinking about making it to the author list, not sure I've contributed enough, up to you 🤷 |
I’ll consider anybody an author/editor that contributed in some say 😉 so lmk. Honestly I don’t need the section, but probably even changeable later |
Sure, why not :) link to my github, @aryzing , thanks 🙏 |
@janniks does this modern wallet API, include API's that would help the wallet/dapp know if there is a difference between the network and/or account between what is active on the extension and what is signed in with on the dapp? A. Account switching, There may be other relevant issues, but this is a recent one that came to my mind leather-io/extension#4859 Similar with different networks being used. I think we'll see similar issues once subnets and other layered approaches become popular which require users to install/add networks much like Metamask does for L2 on Ethereum. |
Exciting update! I am thrilled to share that we now have a beta version of sats-connect that implements the SIP check the docs for details. https://docs.xverse.app/sats-connect-wallet-api-for-bitcoin-and-stacks-1 |
Doesn't this imply that the account management strategy / state management strategy of wallets would leak into the spec? Seems that the concept of an "active" account is just a way for some wallets to organize or handle what data they keep in memory or present to the user. A "comprehensive" wallet could present all accounts & balances simultaneously to the user (even from both mainnet & testnet). Would it make sense to include the address & network as part of the request? After all, if the result of the operations in this SIP are a function of the network and address, should those not be included in the requests too? If included, the "comprehensive" wallet described above (that has no concept of an "active" account) would know exactly what to do too. For wallets segregating state based on the "active" account abstraction, they'd have a clear way of checking whether address / network match the currently "active" ones and act as seen fit. |
There was similar ideas to https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md#chainchanged-1 -- we haven't scoped them onto this SIP yet, but we can add it. |
Co-authored-by: Marvin <[email protected]>
Co-authored-by: Marvin <[email protected]>
address and network as part of the request, I would love to see that scoped in. @aryzing thanks for that explanation I do believe that is a valuable addition to this sip to help deal with the issues I mentioned with the wallet. |
SIP