Skip to content

Commit 082735b

Browse files
committed
Merge branch 'main' into adapt-multichain-api-for-sip-26
2 parents ef12a89 + 2ec8c03 commit 082735b

17 files changed

+1016
-1
lines changed

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
/packages/transaction-controller @MetaMask/confirmations
2727
/packages/user-operation-controller @MetaMask/confirmations
2828

29+
## Earn Team
30+
/packages/earn-controller @MetaMask/earn
2931
## Notifications Team
3032
/packages/notification-services-controller @MetaMask/notifications
3133

@@ -74,6 +76,8 @@
7476
/packages/approval-controller/CHANGELOG.md @MetaMask/confirmations @MetaMask/wallet-framework-engineers
7577
/packages/assets-controllers/package.json @MetaMask/metamask-assets @MetaMask/wallet-framework-engineers
7678
/packages/assets-controllers/CHANGELOG.md @MetaMask/metamask-assets @MetaMask/wallet-framework-engineers
79+
/packages/earn-controller/package.json @MetaMask/earn @MetaMask/wallet-framework-engineers
80+
/packages/earn-controller/CHANGELOG.md @MetaMask/earn @MetaMask/wallet-framework-engineers
7781
/packages/ens-controller/package.json @MetaMask/confirmations @MetaMask/wallet-framework-engineers
7882
/packages/ens-controller/CHANGELOG.md @MetaMask/confirmations @MetaMask/wallet-framework-engineers
7983
/packages/gas-fee-controller/package.json @MetaMask/confirmations @MetaMask/wallet-framework-engineers
@@ -108,3 +112,4 @@
108112
/packages/multichain-transactions-controller/CHANGELOG.md @MetaMask/accounts-engineers @MetaMask/wallet-framework-engineers
109113
/packages/token-search-discovery-controller/package.json @MetaMask/portfolio @MetaMask/wallet-framework-engineers
110114
/packages/token-search-discovery-controller/CHANGELOG.md @MetaMask/portfolio @MetaMask/wallet-framework-engineers
115+

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Each package in this repository has its own README where you can find installati
2929
- [`@metamask/build-utils`](packages/build-utils)
3030
- [`@metamask/composable-controller`](packages/composable-controller)
3131
- [`@metamask/controller-utils`](packages/controller-utils)
32+
- [`@metamask/earn-controller`](packages/earn-controller)
3233
- [`@metamask/ens-controller`](packages/ens-controller)
3334
- [`@metamask/eth-json-rpc-provider`](packages/eth-json-rpc-provider)
3435
- [`@metamask/gas-fee-controller`](packages/gas-fee-controller)
@@ -74,6 +75,7 @@ linkStyle default opacity:0.5
7475
build_utils(["@metamask/build-utils"]);
7576
composable_controller(["@metamask/composable-controller"]);
7677
controller_utils(["@metamask/controller-utils"]);
78+
earn_controller(["@metamask/earn-controller"]);
7779
ens_controller(["@metamask/ens-controller"]);
7880
eth_json_rpc_provider(["@metamask/eth-json-rpc-provider"]);
7981
gas_fee_controller(["@metamask/gas-fee-controller"]);

packages/earn-controller/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
[Unreleased]: https://github.com/MetaMask/core/

packages/earn-controller/LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
MIT License
2+
3+
Copyright (c) 2025 MetaMask
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

packages/earn-controller/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# `@metamask/earn-controller`
2+
3+
Manages state for earning features and coordinates interactions between staking services, SDK integrations, and other controllers to enable users to participate in various earning opportunities.
4+
5+
## Installation
6+
7+
`yarn add @metamask/earn-controller`
8+
9+
or
10+
11+
`npm install @metamask/earn-controller`
12+
13+
## Contributing
14+
15+
This package is part of a monorepo. Instructions for contributing can be found in the [monorepo README](https://github.com/MetaMask/core#readme).
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* For a detailed explanation regarding each configuration property and type check, visit:
3+
* https://jestjs.io/docs/configuration
4+
*/
5+
6+
const merge = require('deepmerge');
7+
const path = require('path');
8+
9+
const baseConfig = require('../../jest.config.packages');
10+
11+
const displayName = path.basename(__dirname);
12+
13+
module.exports = merge(baseConfig, {
14+
// The display name when running multiple projects
15+
displayName,
16+
17+
// An object that configures minimum threshold enforcement for coverage results
18+
coverageThreshold: {
19+
global: {
20+
branches: 100,
21+
functions: 100,
22+
lines: 100,
23+
statements: 100,
24+
},
25+
},
26+
});

packages/earn-controller/package.json

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"name": "@metamask/earn-controller",
3+
"version": "0.0.0",
4+
"description": "Manages state for earning features and coordinates interactions between staking services, SDK integrations, and other controllers to enable users to participate in various earning opportunities",
5+
"keywords": [
6+
"MetaMask",
7+
"Ethereum"
8+
],
9+
"homepage": "https://github.com/MetaMask/core/tree/main/packages/earn-controller#readme",
10+
"bugs": {
11+
"url": "https://github.com/MetaMask/core/issues"
12+
},
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/MetaMask/core.git"
16+
},
17+
"license": "MIT",
18+
"sideEffects": false,
19+
"exports": {
20+
".": {
21+
"import": {
22+
"types": "./dist/index.d.mts",
23+
"default": "./dist/index.mjs"
24+
},
25+
"require": {
26+
"types": "./dist/index.d.cts",
27+
"default": "./dist/index.cjs"
28+
}
29+
},
30+
"./package.json": "./package.json"
31+
},
32+
"main": "./dist/index.cjs",
33+
"types": "./dist/index.d.cts",
34+
"files": [
35+
"dist/"
36+
],
37+
"scripts": {
38+
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
39+
"build:docs": "typedoc",
40+
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/earn-controller",
41+
"changelog:update": "../../scripts/update-changelog.sh @metamask/earn-controller",
42+
"publish:preview": "yarn npm publish --tag preview",
43+
"test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
44+
"test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
45+
"test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
46+
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch",
47+
"since-latest-release": "../../scripts/since-latest-release.sh"
48+
},
49+
"dependencies": {
50+
"@ethersproject/providers": "^5.7.0",
51+
"@metamask/base-controller": "^7.1.1",
52+
"@metamask/controller-utils": "^11.4.5",
53+
"@metamask/stake-sdk": "^1.0.0"
54+
},
55+
"devDependencies": {
56+
"@metamask/accounts-controller": "^22.0.0",
57+
"@metamask/auto-changelog": "^3.4.4",
58+
"@metamask/network-controller": "^22.1.1",
59+
"@types/jest": "^27.4.1",
60+
"deepmerge": "^4.2.2",
61+
"jest": "^27.5.1",
62+
"ts-jest": "^27.1.4",
63+
"typedoc": "^0.24.8",
64+
"typedoc-plugin-missing-exports": "^2.0.0",
65+
"typescript": "~5.2.2"
66+
},
67+
"peerDependencies": {
68+
"@metamask/accounts-controller": "^22.0.0",
69+
"@metamask/network-controller": "^22.1.1"
70+
},
71+
"engines": {
72+
"node": "^18.18 || >=20"
73+
},
74+
"publishConfig": {
75+
"access": "public",
76+
"registry": "https://registry.npmjs.org/"
77+
}
78+
}

0 commit comments

Comments
 (0)