Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4ac90fb
feat: add scaffold for money account upgrade controller
Jwhiles Apr 10, 2026
745a963
feat: add initial version of the money account upgrade controller
Jwhiles Apr 10, 2026
2a3e478
feat: use webcrypto instead of global this
Jwhiles Apr 14, 2026
a1b9450
chore: fix version of auto-changelog
Jwhiles Apr 14, 2026
104e425
chore: update teams.json
Jwhiles Apr 14, 2026
0faa0aa
chore: fix linting of package.json files
Jwhiles Apr 14, 2026
2f2bfda
fix: include new upgrade controller in build
Jwhiles Apr 14, 2026
258484c
feat: add init method to upgrade controller
Jwhiles Apr 16, 2026
df2d10b
feat: add step-level resumability to upgrade controller
Jwhiles Apr 16, 2026
5f1798a
chore: update codeowners
Jwhiles Apr 17, 2026
75dfb85
refactor: extract constants and caveat helper from upgrade controller
Jwhiles Apr 17, 2026
e04728c
refactor: extract associate-address step into its own module
Jwhiles Apr 17, 2026
f6953b3
chore: remove first version
Jwhiles Apr 17, 2026
5d427e7
feat: add step abstraction to upgrade controller
Jwhiles Apr 17, 2026
1e70bb3
feat: add associate-address step to upgrade controller
Jwhiles Apr 17, 2026
2aac32e
chore: update package version
Jwhiles Apr 17, 2026
51aa080
chore: bump chomp api to v1
Jwhiles Apr 20, 2026
d6e28e0
fix: enforce that upgrade controller is initialised
Jwhiles Apr 20, 2026
b56ec10
chore: update readme content
Jwhiles Apr 20, 2026
9f11833
feat: continue in the case of 409 for associate address
Jwhiles Apr 20, 2026
ca4a204
chore: remove currently un-used depedencies
Jwhiles Apr 20, 2026
f338de1
chore: add error message to test
Jwhiles Apr 20, 2026
672de2c
Merge branch 'main' into add-money-account-upgrade-controller
Jwhiles Apr 20, 2026
3b80144
chore: remove extraneous tsconfig links
Jwhiles Apr 20, 2026
d644130
chore: make initialise private
Jwhiles Apr 20, 2026
89c36c5
feat: respond to pr feedback
Jwhiles Apr 20, 2026
c4311aa
fix: add money upgrade package to tsconfig
Jwhiles Apr 20, 2026
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
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
/packages/earn-controller @MetaMask/earn
/packages/money-account-balance-service @MetaMask/earn
/packages/chomp-api-service @MetaMask/earn @MetaMask/delegation
/packages/money-account-upgrade-controller @MetaMask/earn @MetaMask/delegation

## Social AI Team
/packages/ai-controllers @MetaMask/social-ai
Expand Down Expand Up @@ -232,3 +233,5 @@
/packages/money-account-controller/CHANGELOG.md @MetaMask/accounts-engineers @MetaMask/core-platform
/packages/chomp-api-service/package.json @MetaMask/earn @MetaMask/delegation @MetaMask/core-platform
/packages/chomp-api-service/CHANGELOG.md @MetaMask/earn @MetaMask/delegation @MetaMask/core-platform
/packages/money-account-upgrade-controller/package.json @MetaMask/earn @MetaMask/delegation @MetaMask/core-platform
/packages/money-account-upgrade-controller/CHANGELOG.md @MetaMask/earn @MetaMask/delegation @MetaMask/core-platform
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Each package in this repository has its own README where you can find installati
- [`@metamask/messenger-cli`](packages/messenger-cli)
- [`@metamask/money-account-balance-service`](packages/money-account-balance-service)
- [`@metamask/money-account-controller`](packages/money-account-controller)
- [`@metamask/money-account-upgrade-controller`](packages/money-account-upgrade-controller)
- [`@metamask/multichain-account-service`](packages/multichain-account-service)
- [`@metamask/multichain-api-middleware`](packages/multichain-api-middleware)
- [`@metamask/multichain-network-controller`](packages/multichain-network-controller)
Expand Down Expand Up @@ -156,6 +157,7 @@ linkStyle default opacity:0.5
messenger_cli(["@metamask/messenger-cli"]);
money_account_balance_service(["@metamask/money-account-balance-service"]);
money_account_controller(["@metamask/money-account-controller"]);
money_account_upgrade_controller(["@metamask/money-account-upgrade-controller"]);
multichain_account_service(["@metamask/multichain-account-service"]);
multichain_api_middleware(["@metamask/multichain-api-middleware"]);
multichain_network_controller(["@metamask/multichain-network-controller"]);
Expand Down Expand Up @@ -367,6 +369,10 @@ linkStyle default opacity:0.5
money_account_controller --> base_controller;
money_account_controller --> keyring_controller;
money_account_controller --> messenger;
money_account_upgrade_controller --> base_controller;
money_account_upgrade_controller --> chomp_api_service;
money_account_upgrade_controller --> keyring_controller;
money_account_upgrade_controller --> messenger;
multichain_account_service --> accounts_controller;
multichain_account_service --> base_controller;
multichain_account_service --> keyring_controller;
Expand Down
14 changes: 14 additions & 0 deletions packages/money-account-upgrade-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 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]

### Added

- Add `MoneyAccountUpgradeController` with `upgradeAccount` method ([#8426](https://github.com/MetaMask/core/pull/8426))

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

Copyright (c) 2026 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
SOFTWARE.
15 changes: 15 additions & 0 deletions packages/money-account-upgrade-controller/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# `@metamask/money-account-upgrade-controller`

MetaMask Money account upgrade controller.

## Installation

`yarn add @metamask/money-account-upgrade-controller`

or

`npm install @metamask/money-account-upgrade-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/money-account-upgrade-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,
},
},
});
77 changes: 77 additions & 0 deletions packages/money-account-upgrade-controller/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"name": "@metamask/money-account-upgrade-controller",
"version": "0.0.0",
"description": "MetaMask Money account upgrade controller",
"keywords": [
"Ethereum",
"MetaMask"
],
"homepage": "https://github.com/MetaMask/core/tree/main/packages/money-account-upgrade-controller#readme",
"bugs": {
"url": "https://github.com/MetaMask/core/issues"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/MetaMask/core.git"
},
"files": [
"dist/"
],
"sideEffects": false,
"main": "./dist/index.cjs",
"types": "./dist/index.d.cts",
"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"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"scripts": {
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
"build:all": "ts-bridge --project tsconfig.build.json --verbose --clean",
"build:docs": "typedoc",
"changelog:update": "../../scripts/update-changelog.sh @metamask/money-account-upgrade-controller",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/money-account-upgrade-controller",
"messenger-action-types:check": "tsx ../../packages/messenger-cli/src/cli.ts --check",
"messenger-action-types:generate": "tsx ../../packages/messenger-cli/src/cli.ts --generate",
"since-latest-release": "../../scripts/since-latest-release.sh",
"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"
},
"dependencies": {
"@metamask/base-controller": "^9.1.0",
Comment thread
cursor[bot] marked this conversation as resolved.
"@metamask/chomp-api-service": "^1.0.0",
"@metamask/keyring-controller": "^25.2.0",
"@metamask/messenger": "^1.1.1"
},
"devDependencies": {
"@metamask/auto-changelog": "^6.1.0",
"@metamask/utils": "^11.9.0",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^29.5.14",
"deepmerge": "^4.2.2",
"jest": "^29.7.0",
"ts-jest": "^29.2.5",
"tsx": "^4.20.5",
"typedoc": "^0.25.13",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
},
"engines": {
"node": "^18.18 || >=20"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* This file is auto generated.
* Do not edit manually.
*/

import type { MoneyAccountUpgradeController } from './MoneyAccountUpgradeController';

/**
* Runs each step in the upgrade sequence in order. A step that reports
* `'already-done'` is skipped without performing any action; a step that
* reports `'completed'` has performed its action. An error thrown by any
* step propagates and halts the sequence.
*
* @param address - The Money Account address to upgrade.
*/
export type MoneyAccountUpgradeControllerUpgradeAccountAction = {
type: `MoneyAccountUpgradeController:upgradeAccount`;
handler: MoneyAccountUpgradeController['upgradeAccount'];
};

/**
* Union of all MoneyAccountUpgradeController action types.
*/
export type MoneyAccountUpgradeControllerMethodActions =
MoneyAccountUpgradeControllerUpgradeAccountAction;
Loading
Loading