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: Implement MultichainRouter and onProtocolRequest (SIP-26) #2875

Merged
merged 35 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4402125
wip: Add MultichainRoutingController
FrederikBolding Nov 5, 2024
9968b13
Add onProtocolRequest export
FrederikBolding Nov 5, 2024
7586814
Add address resolving logic
FrederikBolding Nov 7, 2024
37ea776
Rethrow error
FrederikBolding Nov 7, 2024
223c2c9
Use account Snaps for address resolution + consider connected accounts
FrederikBolding Nov 8, 2024
a16ea84
Add basic tests
FrederikBolding Nov 12, 2024
9b73af4
Call SnapKeyring instead of the Snap directly
FrederikBolding Nov 12, 2024
679f95c
Refactor protocol caveats
FrederikBolding Nov 13, 2024
6879f9f
Chain ID -> Scope
FrederikBolding Nov 14, 2024
638b724
Missing renames
FrederikBolding Nov 14, 2024
01e1c83
Use KeyringController
FrederikBolding Nov 15, 2024
c5d7291
Handle origins and use proper method for address resolution
FrederikBolding Nov 15, 2024
20f6f74
Simplify origin handling
FrederikBolding Nov 15, 2024
6a9679a
Fix typo
FrederikBolding Nov 15, 2024
3b932ae
Fix struct type
FrederikBolding Nov 20, 2024
be054fa
Add tests for protocol endowment
FrederikBolding Nov 20, 2024
ab0f00b
Add more tests
FrederikBolding Nov 20, 2024
e8df59d
MultichainRoutingController -> MultichainRouter
FrederikBolding Nov 21, 2024
89e6421
Add getSupportedMethods
FrederikBolding Dec 5, 2024
300c434
Use withKeyring
FrederikBolding Dec 13, 2024
81f20ea
Improve typing
FrederikBolding Dec 13, 2024
58c855d
Add getSupportedAccounts
FrederikBolding Jan 16, 2025
8fcf325
More fixes
FrederikBolding Jan 16, 2025
1111838
Add isSupportedScope
FrederikBolding Jan 20, 2025
560e555
Add export
FrederikBolding Jan 24, 2025
edcb5d6
Update API for SnapKeyring
FrederikBolding Jan 28, 2025
8442e86
Fix lint
FrederikBolding Jan 28, 2025
ca7dc69
Update coverage
FrederikBolding Jan 28, 2025
8048e81
Update manifests and coverage
FrederikBolding Jan 29, 2025
5e7b78e
Apply suggestions from code review
FrederikBolding Jan 29, 2025
eb39646
Address PR comments
FrederikBolding Jan 29, 2025
27ffe7c
Update error message and add assertion
FrederikBolding Jan 29, 2025
f86cb09
Fix option name
FrederikBolding Jan 29, 2025
2425dcd
Use Json as the return type for handleRequest
FrederikBolding Jan 30, 2025
2ac2396
Address PR comments
FrederikBolding Jan 31, 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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "R4WjwqkDLNMUtU07n8AGq0WZKjsqjTjQXlASF++J4ws=",
"shasum": "Yzt/aRJTbRwAn3zbbK7W3MjgVVt2f6jLMGSc6pe2oyg=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/browserify/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "06xWu+ehUlNMpbJQxTZi2mlnAJId3cLHEK6fWD2Z9rc=",
"shasum": "J+fHvBGBrcoSZ5R1dEiIO3PegqNGFElb1i4h9Zw4zxg=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
8 changes: 4 additions & 4 deletions packages/snaps-controllers/coverage.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"branches": 93.06,
"functions": 96.61,
"lines": 98.08,
"statements": 97.8
"branches": 93.28,
"functions": 96.8,
"lines": 98.15,
"statements": 97.88
}
1 change: 1 addition & 0 deletions packages/snaps-controllers/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export * from './utils';
export * from './cronjob';
export * from './interface';
export * from './insights';
export * from './multichain';
Loading
Loading