Skip to content

Seedless onboarding controller with Mock Oprf #2

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

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7b01ca5
WIP: init seedless onboarding controller
Mar 7, 2025
eacba94
WIP update controller scaffold
Mar 10, 2025
1ecddae
update private methods formats to align with other controllers
lwin-kyaw Mar 10, 2025
243752b
updated seedless controller message events and actions
lwin-kyaw Mar 10, 2025
afb6bae
add types for SeedlessOnboardingController
lwin-kyaw Mar 15, 2025
8ccdc3e
fixed build
lwin-kyaw Mar 15, 2025
3777a64
change seedless-onboarding-controller name
lwin-kyaw Mar 17, 2025
6c81274
added encryptor as class dependency
lwin-kyaw Mar 18, 2025
9a2e088
updated tests
lwin-kyaw Mar 18, 2025
13bfc38
fixed version conflicts
lwin-kyaw Mar 18, 2025
1f568ea
Updated the seedless-onboarding-controller with mock interfaces from …
lwin-kyaw Mar 20, 2025
bc2be15
lint fixed
lwin-kyaw Mar 20, 2025
56a2f7f
Updated seedless onboarding controller state
lwin-kyaw Mar 21, 2025
1c2b005
added error constants and initial state in constructor args
lwin-kyaw Mar 25, 2025
fd57a07
update 'AllowedEvents' of seedless onboarding controller
lwin-kyaw Mar 25, 2025
8bde8f3
feat store auth tokens and ek in vault
Apr 1, 2025
9ca8a76
mock: EncryptorDecryptor and MetadataStore
lwin-kyaw Apr 2, 2025
3051763
mock: updated toprf client
lwin-kyaw Apr 2, 2025
b63ba82
test: fixed: test
lwin-kyaw Apr 2, 2025
1d6045e
feat: updated metadata server url
lwin-kyaw Apr 2, 2025
18f2066
set auth token anonymous true
Apr 2, 2025
79330e0
mock: update ToprfClient Authenticate method
lwin-kyaw Apr 2, 2025
504b599
feat: updated SeedlessOnboardingController to reflect changes from To…
lwin-kyaw Apr 2, 2025
e6cdc09
fix: updated encryptor interface for the SeedlessOnboardingController
lwin-kyaw Apr 2, 2025
b65659a
fix: fixed tests and lints
lwin-kyaw Apr 2, 2025
e2b2bec
fix: validate AuthResponse in 'authenticate' method
lwin-kyaw Apr 3, 2025
08d59ac
feat: updated mocked metadata store url
lwin-kyaw Apr 3, 2025
22a2f68
fix: updated mock server url
lwin-kyaw Apr 3, 2025
8853f34
test: mock api requests with nock
lwin-kyaw Apr 4, 2025
eb6613c
test: seedless vault
lwin-kyaw Apr 4, 2025
007387b
fix: fixed lint
lwin-kyaw Apr 4, 2025
088787d
mock: updated encryption class
lwin-kyaw Apr 6, 2025
3e8b98c
mock: added updatePassword method and updated tests
lwin-kyaw Apr 6, 2025
fe05c15
feat: updated metadata structure
lwin-kyaw Apr 8, 2025
8177b6d
fix: dedupe
lwin-kyaw Apr 8, 2025
37f73a4
feat: updated seedPhrase type in 'createSeedPhraseBackup' method params
lwin-kyaw Apr 8, 2025
674f4c5
docs: updated jsdocs and method params
lwin-kyaw Apr 8, 2025
223f6d3
test: added test for incorrect password type
lwin-kyaw Apr 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
## Wallet UX Team
/packages/announcement-controller @MetaMask/wallet-ux

## Web3Auth Team
/packages/seedless-onboarding-controller @MetaMask/web3auth-engineers

## Joint team ownership
/packages/eth-json-rpc-provider @MetaMask/wallet-api-platform-engineers @MetaMask/wallet-framework-engineers
/packages/json-rpc-engine @MetaMask/wallet-api-platform-engineers @MetaMask/wallet-framework-engineers
Expand All @@ -71,6 +74,7 @@
/packages/permission-log-controller @MetaMask/wallet-api-platform-engineers @MetaMask/wallet-framework-engineers
/packages/profile-sync-controller @MetaMask/identity
/packages/remote-feature-flag-controller @MetaMask/extension-platform @MetaMask/mobile-platform
/packages/seedless-onboarding-controller @MetaMask/web3auth-engineers @MetaMask/wallet-framework-engineers

## Package Release related
/packages/accounts-controller/package.json @MetaMask/accounts-engineers @MetaMask/wallet-framework-engineers
Expand Down Expand Up @@ -127,3 +131,5 @@
/packages/remote-feature-flag-controller/CHANGELOG.md @MetaMask/extension-platform @MetaMask/mobile-platform @MetaMask/wallet-framework-engineers
/packages/bridge-status-controller/package.json @MetaMask/swaps-engineers @MetaMask/wallet-framework-engineers
/packages/bridge-status-controller/CHANGELOG.md @MetaMask/swaps-engineers @MetaMask/wallet-framework-engineers
/packages/seedless-onboarding-controller/package.json @MetaMask/web3auth-engineers @MetaMask/wallet-framework-engineers
/packages/seedless-onboarding-controller/CHANGELOG.md @MetaMask/web3auth-engineers @MetaMask/wallet-framework-engineers
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Each package in this repository has its own README where you can find installati
- [`@metamask/queued-request-controller`](packages/queued-request-controller)
- [`@metamask/rate-limit-controller`](packages/rate-limit-controller)
- [`@metamask/remote-feature-flag-controller`](packages/remote-feature-flag-controller)
- [`@metamask/seedless-onboarding-controller`](packages/seedless-onboarding-controller)
- [`@metamask/selected-network-controller`](packages/selected-network-controller)
- [`@metamask/signature-controller`](packages/signature-controller)
- [`@metamask/token-search-discovery-controller`](packages/token-search-discovery-controller)
Expand Down Expand Up @@ -104,6 +105,7 @@ linkStyle default opacity:0.5
queued_request_controller(["@metamask/queued-request-controller"]);
rate_limit_controller(["@metamask/rate-limit-controller"]);
remote_feature_flag_controller(["@metamask/remote-feature-flag-controller"]);
seedless_onboarding_controller(["@metamask/seedless-onboarding-controller"]);
selected_network_controller(["@metamask/selected-network-controller"]);
signature_controller(["@metamask/signature-controller"]);
token_search_discovery_controller(["@metamask/token-search-discovery-controller"]);
Expand All @@ -129,15 +131,15 @@ linkStyle default opacity:0.5
bridge_controller --> base_controller;
bridge_controller --> controller_utils;
bridge_controller --> polling_controller;
bridge_controller --> transaction_controller;
bridge_controller --> accounts_controller;
bridge_controller --> eth_json_rpc_provider;
bridge_controller --> network_controller;
bridge_controller --> transaction_controller;
bridge_status_controller --> base_controller;
bridge_status_controller --> bridge_controller;
bridge_status_controller --> controller_utils;
bridge_status_controller --> polling_controller;
bridge_status_controller --> accounts_controller;
bridge_status_controller --> bridge_controller;
bridge_status_controller --> network_controller;
bridge_status_controller --> transaction_controller;
composable_controller --> base_controller;
Expand Down Expand Up @@ -220,12 +222,12 @@ linkStyle default opacity:0.5
token_search_discovery_controller --> base_controller;
transaction_controller --> base_controller;
transaction_controller --> controller_utils;
transaction_controller --> remote_feature_flag_controller;
transaction_controller --> accounts_controller;
transaction_controller --> approval_controller;
transaction_controller --> eth_json_rpc_provider;
transaction_controller --> gas_fee_controller;
transaction_controller --> network_controller;
transaction_controller --> remote_feature_flag_controller;
user_operation_controller --> base_controller;
user_operation_controller --> controller_utils;
user_operation_controller --> polling_controller;
Expand Down
10 changes: 10 additions & 0 deletions packages/seedless-onboarding-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

[Unreleased]: https://github.com/MetaMask/core/
20 changes: 20 additions & 0 deletions packages/seedless-onboarding-controller/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
MIT License

Copyright (c) 2025 MetaMask

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
15 changes: 15 additions & 0 deletions packages/seedless-onboarding-controller/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# `@metamask/seedless-onboarding-controller`

Manage back up and restore of user SRP

## Installation

`yarn add @metamask/seedless-onboarding-controller`

or

`npm install @metamask/seedless-onboarding-controller`

## Contributing

This package is part of a monorepo. Instructions for contributing can be found in the [monorepo README](https://github.com/MetaMask/core#readme).
26 changes: 26 additions & 0 deletions packages/seedless-onboarding-controller/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/

const merge = require('deepmerge');
const path = require('path');

const baseConfig = require('../../jest.config.packages');

const displayName = path.basename(__dirname);

module.exports = merge(baseConfig, {
// The display name when running multiple projects
displayName,

// An object that configures minimum threshold enforcement for coverage results
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
});
75 changes: 75 additions & 0 deletions packages/seedless-onboarding-controller/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"name": "@metamask/seedless-onboarding-controller",
"version": "0.0.1",
"description": "Manage back up and restore of user SRP",
"keywords": [
"MetaMask",
"Ethereum"
],
"homepage": "https://github.com/MetaMask/core/tree/main/packages/seedless-onboarding-controller#readme",
"bugs": {
"url": "https://github.com/MetaMask/core/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/MetaMask/core.git"
},
"license": "MIT",
"sideEffects": false,
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "./dist/index.cjs",
"types": "./dist/index.d.cts",
"files": [
"dist/"
],
"scripts": {
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
"build:docs": "typedoc",
"changelog:update": "../../scripts/update-changelog.sh @metamask/seedless-onboarding-controller",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/seedless-onboarding-controller",
"publish:preview": "yarn npm publish --tag preview",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
"test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
"test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch",
"since-latest-release": "../../scripts/since-latest-release.sh"
},
"dependencies": {
"@metamask/base-controller": "^8.0.0",
"@metamask/browser-passworder": "^4.3.0",
"@metamask/keyring-controller": "^21.0.0",
"@metamask/utils": "^11.2.0"
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@types/jest": "^27.4.1",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.2.2"
},
"peerDependencies": {
"@metamask/keyring-controller": "^21.0.0"
},
"engines": {
"node": "^18.18 || >=20"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}
Loading