-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Update EW introduction content #2790
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4aba0e2
Add svg.
bgravenorst 3215d48
Update EW introduction content.
bgravenorst 2700917
Add rebrand admonition.
bgravenorst a7801b2
Merge remote-tracking branch 'origin' into DOC-2782
bgravenorst 0f80082
Remove MPC.
bgravenorst 299db2f
Merge branch 'main' into DOC-2782
yashovardhan 4aec1f2
Add svg.
bgravenorst d459f03
Update EW introduction content.
bgravenorst 7355ebc
Add rebrand admonition.
bgravenorst b9e37e8
Remove MPC.
bgravenorst 8d1b765
Apply suggestions from code review
bgravenorst a912613
Merge origin/DOC-2782 into DOC-2782
bgravenorst efdf697
Address feedback.
bgravenorst cf6562a
Merge branch 'main' into DOC-2782
bgravenorst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| --- | ||
| title: Architecture | ||
| sidebar_label: Architecture | ||
| description: "How MetaMask Embedded Wallets fit together: SDK layout, integrations, and wallet management infrastructure." | ||
| --- | ||
|
|
||
| import PnPCoreKitFlowLight from '@site/static/img/embedded-wallets/flow-diagrams/pnp-core-kit-flow-light.png' | ||
| import PnPCoreKitFlowDark from '@site/static/img/embedded-wallets/flow-diagrams/pnp-core-kit-flow-dark.png' | ||
|
|
||
| MetaMask Embedded Wallets includes front-end SDKs that run in your app and coordinate OAuth sign-in | ||
| with the Embedded Wallets network. You use these SDKs to authenticate a user, retrieve the key | ||
| material required for that user, and create a client that can sign requests on the user's behalf. | ||
|
|
||
| :::note[Rebrand] | ||
|
|
||
| The SDKs are now branded as MetaMask Embedded Wallet SDKs (formerly Web3Auth Plug and Play SDKs). | ||
| Package names and APIs remain Web3Auth (for example, Web3Auth React SDK), and code snippets may reference `web3auth` identifiers. | ||
|
|
||
| ::: | ||
|
|
||
| At a high level, the flow includes: | ||
|
|
||
| 1. **Your app**: Starts OAuth sign-in with the selected login provider. | ||
| 1. **Login providers**: Authenticates the user and returns an ID token. | ||
| 1. **Embedded Wallet SDK**: Submits the ID token for validation and requests the user's OAuth key share. | ||
| 1. **Core kit (tKey)**: Combines key shares to recreate the user's signing key. | ||
| 1. **Embedded Wallets network**: Validates tokens and returns the required key share. | ||
| 1. **Your app**: uses the SDK-provided client to create a wallet provider and sign requests on the | ||
| user's behalf. | ||
|
|
||
| The following diagram summarizes the login flow and shows how the SDK components interact with the | ||
| integrating app and the Embedded Wallets network. | ||
|
|
||
| <picture> | ||
| <source srcset={PnPCoreKitFlowLight} media="(prefers-color-scheme: light)" /> | ||
| <source srcset={PnPCoreKitFlowDark} media="(prefers-color-scheme: dark)" /> | ||
|
bgravenorst marked this conversation as resolved.
|
||
| <img | ||
| src={PnPCoreKitFlowLight} | ||
| style={{ display: 'block', maxHeight: '600px', margin: '20px auto' }} | ||
| alt="This diagram describes the relationship between the Embedded Wallet SDK and integrating application" | ||
| /> | ||
| </picture> | ||
|
|
||
| ### Wallet management infrastructure | ||
|
|
||
| The [wallet management infrastructure](./infrastructure/README.mdx) improves security by splitting a | ||
| user's wallet into multiple key shares, which avoids direct exposure of seed phrases. Users combine | ||
| OAuth sign-in, trusted devices, and other recovery factors to access and manage their cryptographic | ||
| keys. The infrastructure is designed so that no single party holds the full private key. | ||
|
|
||
| To create an OAuth login share, users interact with the Embedded Wallets network. Key generation | ||
| uses a threshold process that requires multiple participants to contribute shares. This helps keep | ||
| wallets non-custodial, because no single party (including MetaMask or the login provider) can use a | ||
| single share to control the wallet. | ||
|
|
||
| :::tip managing wallets | ||
|
|
||
| The infrastructure uses [Shamir's Secret Sharing](./infrastructure/sss-architecture.mdx) to split and | ||
| recover wallet keys. | ||
| For more details, see [Wallet management infrastructure](./infrastructure/README.mdx). | ||
|
|
||
| ::: | ||
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
133 changes: 133 additions & 0 deletions
133
static/img/embedded-wallets/wallet-user-flow-comparison.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.