Open janniks opened 10 months ago
Great work @janniks. Leather supports this SIP π€
Thanks for the input @m-aboelenein @kyranjamie .
I updated the stuff we chatted about on the call, and also added some OPEN QUESTIONS
to the top.
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 getAddresses
and getAccounts
for better compatibility with current solution.
@aryzing @kyranjamie I added an update to the encoding (as discussed on last weeks call). Let me know what you think! This can be used as the canonical repr and Stacks.js would also migrate towards it. (Serialized hex encoded string could also still be used (easy to tell apart).
Also updated:
functionName
to name
, functionArgs
to arguments
contractName
+ contractAddress
to contract
-- which is a ${string}.${string}
(how it's copy pasted from the explorer)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
@janniks sips@kyranjamie.com & @kyranjamie
Let me know which email-addresses/github-usernames to add to the author list
Aren't all the commits yours? :joy: I wasn't even thinking about making it to the author list, not sure I've contributed enough, up to you :shrug:
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 :pray:
@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? Say you are on account 1 in the dapp and your Leather is active on account 2. In Metamask you would get a warning (do you want to switch to account 2?) or something like that. I have a feeling that could help prevent some issues where users are confused about which account is signing.
A. Account switching, There may be other relevant issues, but this is a recent one that came to my mind https://github.com/leather-wallet/extension/issues/4859 As part of that, this one is probably harder/impossible? (detect when different secret key is used) https://github.com/leather-wallet/extension/issues/3006
Similar with different networks being used. Especially relevant when users are on testnet and forget to switch back to mainnet... the experience is currently confusing for users. This issue pops up every time there is a popular public testnet.
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. B. Network: https://github.com/leather-wallet/extension/issues/4194 (changing network, adding network, dapp to prompt switch or addition)
@janniks @m-aboelenein & mahmoud@xverse.app
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 Very excited to hear your thoughts and feedback π
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?
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.
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.
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.
Helping SIP Editors with SIP number assignment. SIP will be assigned to: SIP-030 @janniks
SIP Editors @314159265359879 @rafaelcr @jiga @AcrossfireX please help review and once ready request "Accepted" status.
Wallet RPC Standards
π Read the full SIP-030 on Wallet RPC Standards