Skip to content
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

feat: SOL-46 adds the multichain transactions controller package #5133

Merged
merged 28 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e7cfce4
chore: created package and added controller
zone-live Jan 9, 2025
a0a03ce
chore: adding dependencis
zone-live Jan 13, 2025
f68e12e
Merge branch 'main' into SOL-46-adds-the-multichain-transactions-cont…
zone-live Jan 13, 2025
4d8d109
chore: updates
zone-live Jan 13, 2025
ff896e3
chore: reset file
zone-live Jan 13, 2025
cab9924
chore: lint fix
zone-live Jan 13, 2025
0fd57bd
chore: ran yarn
zone-live Jan 13, 2025
c6d653a
chore: fix package json entry, types
zone-live Jan 13, 2025
7f5e254
chore: update teams json
zone-live Jan 13, 2025
a56bb7d
chore: update codeowners
zone-live Jan 15, 2025
dd9cd07
Merge branch 'main' into SOL-46-adds-the-multichain-transactions-cont…
zone-live Jan 15, 2025
0f81e04
chore: runs yarn
zone-live Jan 15, 2025
70a01da
chore: fix lint issues
zone-live Jan 15, 2025
f366a9a
chore: fix lint warnings and update thresholds
zone-live Jan 15, 2025
40826b1
chore: reset
zone-live Jan 15, 2025
1573d85
chore: update dependencies
zone-live Jan 15, 2025
c21c749
chore: update to correct value
zone-live Jan 15, 2025
f2ed82a
chore: updates comparison
zone-live Jan 15, 2025
50c947a
chore: updates after review
zone-live Jan 16, 2025
8c1eac8
chore: improved testing
zone-live Jan 16, 2025
46e7ad5
Merge branch 'main' into SOL-46-adds-the-multichain-transactions-cont…
zone-live Jan 16, 2025
f18d9cc
chore: lint fix
zone-live Jan 16, 2025
b113d41
chore: update
zone-live Jan 16, 2025
e8add84
chore: update codeowners and clean up
zone-live Jan 17, 2025
1503e20
Merge branch 'main' into SOL-46-adds-the-multichain-transactions-cont…
zone-live Jan 17, 2025
5fa068d
chore: runs yarn
zone-live Jan 17, 2025
8740350
Merge branch 'main' into SOL-46-adds-the-multichain-transactions-cont…
zone-live Jan 17, 2025
42dbe03
Merge branch 'main' into SOL-46-adds-the-multichain-transactions-cont…
mcmire Jan 21, 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
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
## Accounts Team
/packages/accounts-controller @MetaMask/accounts-engineers
/packages/keyring-controller @MetaMask/accounts-engineers
/packages/multichain-transactions-controller @MetaMask/accounts-engineers

## Assets Team
/packages/assets-controllers @MetaMask/metamask-assets
Expand Down Expand Up @@ -103,5 +104,7 @@
/packages/transaction-controller/CHANGELOG.md @MetaMask/confirmations @MetaMask/wallet-framework-engineers
/packages/user-operation-controller/package.json @MetaMask/confirmations @MetaMask/wallet-framework-engineers
/packages/user-operation-controller/CHANGELOG.md @MetaMask/confirmations @MetaMask/wallet-framework-engineers
/packages/multichain-transactions-controller/package.json @MetaMask/accounts-engineers @MetaMask/wallet-framework-engineers
/packages/multichain-transactions-controller/CHANGELOG.md @MetaMask/accounts-engineers @MetaMask/wallet-framework-engineers
/packages/token-search-discovery-controller/package.json @MetaMask/portfolio @MetaMask/wallet-framework-engineers
/packages/token-search-discovery-controller/CHANGELOG.md @MetaMask/portfolio @MetaMask/wallet-framework-engineers
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Each package in this repository has its own README where you can find installati
- [`@metamask/logging-controller`](packages/logging-controller)
- [`@metamask/message-manager`](packages/message-manager)
- [`@metamask/multichain`](packages/multichain)
- [`@metamask/multichain-transactions-controller`](packages/multichain-transactions-controller)
- [`@metamask/name-controller`](packages/name-controller)
- [`@metamask/network-controller`](packages/network-controller)
- [`@metamask/notification-services-controller`](packages/notification-services-controller)
Expand All @@ -49,6 +50,7 @@ Each package in this repository has its own README where you can find installati
- [`@metamask/profile-sync-controller`](packages/profile-sync-controller)
- [`@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/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 @@ -81,6 +83,7 @@ linkStyle default opacity:0.5
logging_controller(["@metamask/logging-controller"]);
message_manager(["@metamask/message-manager"]);
multichain(["@metamask/multichain"]);
multichain_transactions_controller(["@metamask/multichain-transactions-controller"]);
name_controller(["@metamask/name-controller"]);
network_controller(["@metamask/network-controller"]);
notification_services_controller(["@metamask/notification-services-controller"]);
Expand Down
10 changes: 10 additions & 0 deletions packages/multichain-transactions-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/multichain-transactions-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/multichain-transactions-controller/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# `@metamask/multichain-transactions-controller`

This package is responsible for getting transactions from our Bitcoin and Solana snaps.

## Installation

`yarn add @metamask/multichain-transactions-controller`

or

`npm install @metamask/multichain-transactions-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/multichain-transactions-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: 95,
functions: 97,
lines: 97,
statements: 97,
},
},
});
86 changes: 86 additions & 0 deletions packages/multichain-transactions-controller/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"name": "@metamask/multichain-transactions-controller",
"version": "0.0.0",
"description": "This package is responsible for getting transactions from our Bitcoin and Solana snaps",
"keywords": [
"MetaMask",
"Ethereum"
],
"homepage": "https://github.com/MetaMask/core/tree/main/packages/multichain-transactions-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/multichain-transactions-controller",
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/multichain-transactions-controller",
"publish:preview": "yarn npm publish --tag preview",
"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": "^7.1.1",
"@metamask/keyring-api": "^13.0.0",
"@metamask/keyring-internal-api": "^2.0.0",
"@metamask/keyring-snap-client": "^2.0.0",
"@metamask/polling-controller": "^12.0.2",
"@metamask/snaps-controllers": "^9.10.0",
"@metamask/snaps-sdk": "^6.7.0",
"@metamask/snaps-utils": "^8.3.0",
"@metamask/utils": "^11.0.1",
"@types/uuid": "^8.3.0",
"immer": "^9.0.6",
"uuid": "^8.3.2"
},
"devDependencies": {
"@metamask/accounts-controller": "^21.0.1",
"@metamask/auto-changelog": "^3.4.4",
"@metamask/keyring-controller": "^19.0.3",
"@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/accounts-controller": "^21.0.0",
"@metamask/snaps-controllers": "^9.10.0"
},
"engines": {
"node": "^18.18 || >=20"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}
Loading
Loading