This repository was archived by the owner on Apr 22, 2026. It is now read-only.
Wallet JSON RPC API, Request Accounts - #2378
Closed
kyranjamie wants to merge 1 commit into
Closed
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
April 20, 2022 16:34
0a0a0f9 to
6a19a6f
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
April 21, 2022 17:58
6cc06f5 to
ee98fb4
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
April 22, 2022 13:28
beb2a51 to
1ac52ae
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
April 22, 2022 13:39
1ac52ae to
a8fc798
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
April 25, 2022 12:47
a8fc798 to
36374e9
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
May 7, 2022 07:55
5db9f56 to
89f3b43
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
May 9, 2022 09:53
89f3b43 to
dcab63c
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
May 9, 2022 10:19
dcab63c to
6fe32b4
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
May 9, 2022 10:40
6fe32b4 to
bcc40ab
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
May 9, 2022 10:44
bcc40ab to
59683e7
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
May 9, 2022 10:52
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 |
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
May 31, 2022 14:08
f073b3c to
de8377e
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
May 31, 2022 15:03
de8377e to
cbd6c86
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
May 31, 2022 15:27
cbd6c86 to
bfc6ecb
Compare
Contributor
Author
|
I'll be picking this up as soon as I'm done with ledger bugs/issues |
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
June 1, 2022 19:41
bfc6ecb to
ab8a9f3
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
June 2, 2022 16:25
ab8a9f3 to
dd4b1a4
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
June 3, 2022 07:50
dd4b1a4 to
5cf51a9
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
June 6, 2022 07:41
8f519f5 to
93a8122
Compare
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
June 6, 2022 10:43
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. |
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
June 30, 2022 13:36
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
kyranjamie
force-pushed
the
feat/request-accounts
branch
from
July 15, 2022 16:17
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