-
Notifications
You must be signed in to change notification settings - Fork 542
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
doc: add a sequence diagram of the snap invocation #1356
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1356 +/- ##
==========================================
+ Coverage 96.20% 96.34% +0.14%
==========================================
Files 149 151 +2
Lines 4555 4598 +43
Branches 743 747 +4
==========================================
+ Hits 4382 4430 +48
+ Misses 173 168 -5 |
f9fe931
to
8ae5058
Compare
I fixed a few things and added some detail as to how responses are returned. I'm not sure all the notes are still relevant to include though 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of nits. Sorry.
diagram.md
Outdated
|
||
`subjectType` is being checked before a middleware gets to handle an RPC request. The snap is going through the same permission mechanism in the provider as a dApp would. | ||
|
||
PermissionsController is fed the snapId as origin, but the snapId is coming from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is incomplete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh no, a lost stream of consciousness. gonna be hard to finish now :D
Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
This is a sequence diagram based on a security-focused walkthrough we had on 2023-02-20
The level of detail is arbitrary, but adding more would seem like rewriting the code into a diagram.
Descriptions and notes might need clarification.
@FrederikBolding I left you a todo at the bottom because I didn't want to make things up ;)
Preview:
https://github.com/MetaMask/snaps-monorepo/blob/naugtur/diagram/diagram.md