This repository was archived by the owner on Apr 22, 2026. It is now read-only.
Closed
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
0a0a0f9 to
6a19a6f
Compare
6cc06f5 to
ee98fb4
Compare
beb2a51 to
1ac52ae
Compare
1ac52ae to
a8fc798
Compare
a8fc798 to
36374e9
Compare
5db9f56 to
89f3b43
Compare
89f3b43 to
dcab63c
Compare
dcab63c to
6fe32b4
Compare
6fe32b4 to
bcc40ab
Compare
bcc40ab to
59683e7
Compare
59683e7 to
ec36132
Compare
Contributor
|
@kyranjamie this is wonderful, any expected ETA for this PR? to do something like stacksgov/sips#70 we'll want to have this kind of request accounts functionality |
f073b3c to
de8377e
Compare
de8377e to
cbd6c86
Compare
cbd6c86 to
bfc6ecb
Compare
Contributor
Author
|
I'll be picking this up as soon as I'm done with ledger bugs/issues |
bfc6ecb to
ab8a9f3
Compare
ab8a9f3 to
dd4b1a4
Compare
dd4b1a4 to
5cf51a9
Compare
8f519f5 to
93a8122
Compare
93a8122 to
bb2c367
Compare
|
came her from #2371 This functionality would be amazing for allowing development of simple apps that require hiro wallet authentication and don't have a need for nodejs other than stacks. |
bb2c367 to
b6f788c
Compare
Adds a new `request` mechanism through which dApps can interact with the wallet with a JSON RPC API. Initially, this only supports: `stx_requestAccounts`, a method that requests public key information from the wallet. chore: tidy test app, adding request accounts chore: move request account logic to new file
b6f788c to
a0edbf1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP.
This PR refactors the communication mechanism dApps can use to interact with the wallet. It is inspired by EIP-1102, and relates to an ongoing Wallet Protocol SIP proposal.
Rather than adding a new method to the
StacksProviderobject for each possible operation, a singlerequestmethod should be called, which sends arguments complaint with the JSON RPC Specification. This has some benefits, such as creating a universal API that can work outside of this wallet's specific context, and also simplifies the implementation, which currently requires work across multiple script contexts to add a single action.A uuid is created using
crypto.randomUUID();in the inpage script, which maps to the RPC specidfield, helping to map responses to their given request.requestmethodrequestmethodThis screencast shows the behaviour of how transaction verification works. First, we request a transaction on a clean account before we've ever given it permissions for that app:
localhost:3000. When we try again after allowingstx_requestAccounts, the transaction no longer throws an error. The exact UX/copy tbd.Kapture.2022-04-26.at.14.18.49.mp4