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

Update eth-snap-keyring to 0.2.x to use the keyring-api 0.2.x #20865

Merged
merged 19 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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 app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,9 @@ export default class MetamaskController extends EventEmitter {
saveState: async () => {
await this.keyringController.persistAllKeyrings();
},
removeAccount: async (address) => {
await this.removeAccount(address);
},
});
builder.type = SnapKeyring.type;
return builder;
Expand Down
150 changes: 61 additions & 89 deletions lavamoat/browserify/beta/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,29 +161,13 @@
},
"packages": {
"@ethereumjs/tx>@ethereumjs/rlp": true,
"@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": true,
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": true,
"@ethereumjs/tx>ethereum-cryptography": true,
"browserify>buffer": true,
"browserify>events": true,
"browserify>insert-module-globals>is-buffer": true
}
},
"@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography": {
"globals": {
"TextDecoder": true,
"crypto": true
},
"packages": {
"@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": true,
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true
}
},
"@ethereumjs/tx>@ethereumjs/util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": {
"globals": {
"Headers": true,
Expand All @@ -208,6 +192,7 @@
"crypto": true
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
"@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true
}
},
Expand Down Expand Up @@ -926,7 +911,7 @@
"@metamask/eth-json-rpc-middleware>clone": true,
"@metamask/eth-json-rpc-middleware>pify": true,
"@metamask/eth-json-rpc-middleware>safe-stable-stringify": true,
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
"@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true,
"eth-rpc-errors": true,
"json-rpc-engine": true
}
Expand Down Expand Up @@ -965,7 +950,7 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true,
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
"@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true,
"@metamask/scure-bip39": true,
"browserify>buffer": true
}
Expand Down Expand Up @@ -1037,7 +1022,7 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true,
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
"@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true,
"browserify>buffer": true,
"browserify>events": true,
"mocha>serialize-javascript>randombytes": true
Expand Down Expand Up @@ -1093,17 +1078,25 @@
},
"@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": {
"packages": {
"@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true,
"koa>content-disposition>safe-buffer": true
}
},
"@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethereum-cryptography": {
"packages": {
"browserify>buffer": true,
"ethereumjs-util>ethereum-cryptography>keccak": true,
"ethereumjs-util>ethereum-cryptography>secp256k1": true,
"mocha>serialize-javascript>randombytes": true
}
},
"@metamask/eth-ledger-bridge-keyring>hdkey": {
"packages": {
"@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true,
Expand All @@ -1123,32 +1116,6 @@
"koa>content-disposition>safe-buffer": true
}
},
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"eth-sig-util>tweetnacl": true,
"eth-sig-util>tweetnacl-util": true
}
},
"@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography": {
"globals": {
"TextDecoder": true,
"crypto": true
},
"packages": {
"@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
}
},
"@metamask/eth-snap-keyring>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@metamask/eth-token-tracker": {
"globals": {
"console.warn": true
Expand Down Expand Up @@ -1284,6 +1251,17 @@
"browserify>events": true
}
},
"@metamask/eth-trezor-keyring>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"eth-sig-util>tweetnacl": true,
"eth-sig-util>tweetnacl-util": true
}
},
"@metamask/eth-trezor-keyring>@metamask/utils": {
"globals": {
"TextDecoder": true,
Expand All @@ -1298,7 +1276,7 @@
},
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": {
"packages": {
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": true
"@metamask/eth-trezor-keyring>@metamask/eth-sig-util": true
}
},
"@metamask/eth-trezor-keyring>@trezor/connect-web": {
Expand Down Expand Up @@ -1559,29 +1537,14 @@
"@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true,
"@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"eth-sig-util>tweetnacl": true,
"eth-sig-util>tweetnacl-util": true
}
},
"@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": {
"globals": {
"TextDecoder": true,
"crypto": true
},
"packages": {
"@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
}
},
"@metamask/keyring-controller>@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@metamask/keyring-controller>@metamask/utils": {
"globals": {
"TextDecoder": true,
Expand All @@ -1597,26 +1560,39 @@
},
"@metamask/keyring-controller>ethereumjs-wallet": {
"packages": {
"@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": true,
"@truffle/codec>utf8": true,
"browserify>buffer": true,
"browserify>crypto-browserify": true,
"eth-lattice-keyring>gridplus-sdk>aes-js": true,
"ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>ethereum-cryptography>bs58check": true,
"ethereumjs-util>ethereum-cryptography>scrypt-js": true,
"mocha>serialize-javascript>randombytes": true,
"uuid": true
}
},
"@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": {
"packages": {
"browserify>assert": true,
"browserify>buffer": true,
"browserify>crypto-browserify>create-hmac": true,
"ethereumjs-util>ethereum-cryptography>bs58check": true,
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"ethereumjs-util>ethereum-cryptography>keccak": true,
"ethereumjs-util>ethereum-cryptography>secp256k1": true,
"koa>content-disposition>safe-buffer": true,
"mocha>serialize-javascript>randombytes": true
}
},
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": {
"packages": {
"@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true
}
},
Expand Down Expand Up @@ -1649,29 +1625,14 @@
"@metamask/message-manager>@metamask/eth-sig-util": {
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": true,
"@ethereumjs/tx>ethereum-cryptography": true,
"bn.js": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"eth-sig-util>tweetnacl": true,
"eth-sig-util>tweetnacl-util": true
}
},
"@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography": {
"globals": {
"TextDecoder": true,
"crypto": true
},
"packages": {
"@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
}
},
"@metamask/message-manager>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@metamask/message-manager>jsonschema": {
"packages": {
"browserify>url": true
Expand Down Expand Up @@ -3559,13 +3520,21 @@
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethereum-cryptography": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true,
"koa>content-disposition>safe-buffer": true
}
},
"eth-sig-util>ethereumjs-util>ethereum-cryptography": {
"packages": {
"browserify>buffer": true,
"ethereumjs-util>ethereum-cryptography>keccak": true,
"ethereumjs-util>ethereum-cryptography>secp256k1": true,
"mocha>serialize-javascript>randombytes": true
}
},
"eth-sig-util>ethereumjs-util>ethjs-util": {
"packages": {
"browserify>buffer": true,
Expand Down Expand Up @@ -3606,11 +3575,19 @@
"browserify>assert": true,
"browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-abi>ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true
}
},
"ethereumjs-abi>ethereumjs-util>ethereum-cryptography": {
"packages": {
"browserify>buffer": true,
"ethereumjs-util>ethereum-cryptography>keccak": true,
"ethereumjs-util>ethereum-cryptography>secp256k1": true,
"mocha>serialize-javascript>randombytes": true
}
},
"ethereumjs-util": {
"packages": {
"bn.js": true,
Expand Down Expand Up @@ -3673,14 +3650,9 @@
},
"ethereumjs-util>ethereum-cryptography": {
"packages": {
"browserify>assert": true,
"browserify>buffer": true,
"browserify>crypto-browserify>create-hmac": true,
"ethereumjs-util>ethereum-cryptography>bs58check": true,
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"ethereumjs-util>ethereum-cryptography>keccak": true,
"ethereumjs-util>ethereum-cryptography>secp256k1": true,
"koa>content-disposition>safe-buffer": true,
"mocha>serialize-javascript>randombytes": true
}
},
Expand Down
Loading
Loading