mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
[GridPlus] Updates Lattice-related modules to unlock functionality (#14467)
GridPlus has updated the EVM signing pathway in Lattice firmware, which has not yet been released. Additionally, requesters can now include ABI definitions with signing requests, which are used by Lattice firmware to decode calldata in place. All updates are backward compatable. Updates: * https://github.com/GridPlus/gridplus-sdk/compare/v1.1.6...v1.2.4 * https://github.com/GridPlus/eth-lattice-keyring/compare/v0.6.1...v0.7.3
This commit is contained in:
parent
c3071b273b
commit
32a82be2b6
@ -1967,9 +1967,11 @@
|
||||
"addEventListener": true,
|
||||
"browser": true,
|
||||
"clearInterval": true,
|
||||
"console.warn": true,
|
||||
"fetch": true,
|
||||
"open": true,
|
||||
"rlp.encode": true,
|
||||
"setInterval": true
|
||||
"setInterval": true,
|
||||
"txData.type": true
|
||||
},
|
||||
"packages": {
|
||||
"@ethereumjs/common": true,
|
||||
@ -1980,6 +1982,7 @@
|
||||
"ethereumjs-util": true,
|
||||
"events": true,
|
||||
"gridplus-sdk": true,
|
||||
"rlp": true,
|
||||
"secp256k1": true
|
||||
}
|
||||
},
|
||||
@ -2336,7 +2339,6 @@
|
||||
},
|
||||
"gridplus-sdk": {
|
||||
"globals": {
|
||||
"console.error": true,
|
||||
"console.warn": true,
|
||||
"setTimeout": true
|
||||
},
|
||||
@ -2347,6 +2349,7 @@
|
||||
"bech32": true,
|
||||
"bignumber.js": true,
|
||||
"bitwise": true,
|
||||
"bn.js": true,
|
||||
"borc": true,
|
||||
"bs58check": true,
|
||||
"buffer": true,
|
||||
@ -2355,8 +2358,8 @@
|
||||
"eth-eip712-util-browser": true,
|
||||
"hash.js": true,
|
||||
"js-sha3": true,
|
||||
"lodash": true,
|
||||
"rlp": true,
|
||||
"rlp-browser": true,
|
||||
"secp256k1": true,
|
||||
"superagent": true
|
||||
}
|
||||
@ -4631,12 +4634,6 @@
|
||||
"buffer": true
|
||||
}
|
||||
},
|
||||
"rlp-browser": {
|
||||
"packages": {
|
||||
"assert": true,
|
||||
"buffer": true
|
||||
}
|
||||
},
|
||||
"safe-buffer": {
|
||||
"packages": {
|
||||
"buffer": true
|
||||
|
@ -1985,9 +1985,11 @@
|
||||
"addEventListener": true,
|
||||
"browser": true,
|
||||
"clearInterval": true,
|
||||
"console.warn": true,
|
||||
"fetch": true,
|
||||
"open": true,
|
||||
"rlp.encode": true,
|
||||
"setInterval": true
|
||||
"setInterval": true,
|
||||
"txData.type": true
|
||||
},
|
||||
"packages": {
|
||||
"@ethereumjs/common": true,
|
||||
@ -1998,6 +2000,7 @@
|
||||
"ethereumjs-util": true,
|
||||
"events": true,
|
||||
"gridplus-sdk": true,
|
||||
"rlp": true,
|
||||
"secp256k1": true
|
||||
}
|
||||
},
|
||||
@ -2354,7 +2357,6 @@
|
||||
},
|
||||
"gridplus-sdk": {
|
||||
"globals": {
|
||||
"console.error": true,
|
||||
"console.warn": true,
|
||||
"setTimeout": true
|
||||
},
|
||||
@ -2365,6 +2367,7 @@
|
||||
"bech32": true,
|
||||
"bignumber.js": true,
|
||||
"bitwise": true,
|
||||
"bn.js": true,
|
||||
"borc": true,
|
||||
"bs58check": true,
|
||||
"buffer": true,
|
||||
@ -2373,8 +2376,8 @@
|
||||
"eth-eip712-util-browser": true,
|
||||
"hash.js": true,
|
||||
"js-sha3": true,
|
||||
"lodash": true,
|
||||
"rlp": true,
|
||||
"rlp-browser": true,
|
||||
"secp256k1": true,
|
||||
"superagent": true
|
||||
}
|
||||
@ -4649,12 +4652,6 @@
|
||||
"buffer": true
|
||||
}
|
||||
},
|
||||
"rlp-browser": {
|
||||
"packages": {
|
||||
"assert": true,
|
||||
"buffer": true
|
||||
}
|
||||
},
|
||||
"safe-buffer": {
|
||||
"packages": {
|
||||
"buffer": true
|
||||
|
@ -1967,9 +1967,11 @@
|
||||
"addEventListener": true,
|
||||
"browser": true,
|
||||
"clearInterval": true,
|
||||
"console.warn": true,
|
||||
"fetch": true,
|
||||
"open": true,
|
||||
"rlp.encode": true,
|
||||
"setInterval": true
|
||||
"setInterval": true,
|
||||
"txData.type": true
|
||||
},
|
||||
"packages": {
|
||||
"@ethereumjs/common": true,
|
||||
@ -1980,6 +1982,7 @@
|
||||
"ethereumjs-util": true,
|
||||
"events": true,
|
||||
"gridplus-sdk": true,
|
||||
"rlp": true,
|
||||
"secp256k1": true
|
||||
}
|
||||
},
|
||||
@ -2336,7 +2339,6 @@
|
||||
},
|
||||
"gridplus-sdk": {
|
||||
"globals": {
|
||||
"console.error": true,
|
||||
"console.warn": true,
|
||||
"setTimeout": true
|
||||
},
|
||||
@ -2347,6 +2349,7 @@
|
||||
"bech32": true,
|
||||
"bignumber.js": true,
|
||||
"bitwise": true,
|
||||
"bn.js": true,
|
||||
"borc": true,
|
||||
"bs58check": true,
|
||||
"buffer": true,
|
||||
@ -2355,8 +2358,8 @@
|
||||
"eth-eip712-util-browser": true,
|
||||
"hash.js": true,
|
||||
"js-sha3": true,
|
||||
"lodash": true,
|
||||
"rlp": true,
|
||||
"rlp-browser": true,
|
||||
"secp256k1": true,
|
||||
"superagent": true
|
||||
}
|
||||
@ -4631,12 +4634,6 @@
|
||||
"buffer": true
|
||||
}
|
||||
},
|
||||
"rlp-browser": {
|
||||
"packages": {
|
||||
"assert": true,
|
||||
"buffer": true
|
||||
}
|
||||
},
|
||||
"safe-buffer": {
|
||||
"packages": {
|
||||
"buffer": true
|
||||
|
@ -158,7 +158,7 @@
|
||||
"eth-json-rpc-infura": "^5.1.0",
|
||||
"eth-json-rpc-middleware": "^8.0.0",
|
||||
"eth-keyring-controller": "^6.2.0",
|
||||
"eth-lattice-keyring": "^0.6.1",
|
||||
"eth-lattice-keyring": "^0.7.3",
|
||||
"eth-method-registry": "^2.0.0",
|
||||
"eth-query": "^2.1.2",
|
||||
"eth-rpc-errors": "^4.0.2",
|
||||
|
@ -1,27 +0,0 @@
|
||||
patch from https://github.com/GridPlus/gridplus-sdk/pull/367
|
||||
diff --git a/node_modules/gridplus-sdk/dist/util.js b/node_modules/gridplus-sdk/dist/util.js
|
||||
index 08cc920..1f58806 100644
|
||||
--- a/node_modules/gridplus-sdk/dist/util.js
|
||||
+++ b/node_modules/gridplus-sdk/dist/util.js
|
||||
@@ -22,7 +22,7 @@ var elliptic_1 = __importDefault(require("elliptic"));
|
||||
var constants_1 = require("./constants");
|
||||
var COINS = constants_1.BIP_CONSTANTS.COINS, PURPOSES = constants_1.BIP_CONSTANTS.PURPOSES;
|
||||
var EC = elliptic_1.default.ec;
|
||||
-var ec = new EC('p256');
|
||||
+var ec;
|
||||
//--------------------------------------------------
|
||||
// LATTICE UTILS
|
||||
//--------------------------------------------------
|
||||
@@ -219,10 +219,12 @@ var parseDER = function (sigBuf) {
|
||||
};
|
||||
exports.parseDER = parseDER;
|
||||
var getP256KeyPair = function (priv) {
|
||||
+ if (ec === undefined) ec = new EC('p256');
|
||||
return ec.keyFromPrivate(priv, 'hex');
|
||||
};
|
||||
exports.getP256KeyPair = getP256KeyPair;
|
||||
var getP256KeyPairFromPub = function (pub) {
|
||||
+ if (ec === undefined) ec = new EC('p256');
|
||||
return ec.keyFromPublic(pub, 'hex');
|
||||
};
|
||||
exports.getP256KeyPairFromPub = getP256KeyPairFromPub;
|
28
yarn.lock
28
yarn.lock
@ -7456,7 +7456,7 @@ buffer@^4.3.0:
|
||||
ieee754 "^1.1.4"
|
||||
isarray "^1.0.0"
|
||||
|
||||
buffer@^5.1.0, buffer@^5.2.1, buffer@^5.4.2, buffer@^5.5.0, buffer@^5.6.0:
|
||||
buffer@^5.1.0, buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0:
|
||||
version "5.7.1"
|
||||
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
|
||||
integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
|
||||
@ -11240,16 +11240,16 @@ eth-keyring-controller@^6.2.0, eth-keyring-controller@^6.2.1:
|
||||
loglevel "^1.5.0"
|
||||
obs-store "^4.0.3"
|
||||
|
||||
eth-lattice-keyring@^0.6.1:
|
||||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/eth-lattice-keyring/-/eth-lattice-keyring-0.6.1.tgz#ebb6dfb8039d4c4c979280110aa49a7b74064850"
|
||||
integrity sha512-FzP/TPIFuyo37B4dGKg6bQN0H61h9Bdejh9bxH6sUqmDB+X+a/PlydeWxZIhEjmIvD+Huuy+bcp9hXTcCcr2Ig==
|
||||
eth-lattice-keyring@^0.7.3:
|
||||
version "0.7.3"
|
||||
resolved "https://registry.yarnpkg.com/eth-lattice-keyring/-/eth-lattice-keyring-0.7.3.tgz#fe27b1ff3f81535506be5804801da1bfdc379cbe"
|
||||
integrity sha512-DVyk316MUU0e/871eO/EFGPnMLT4sRwgft1iZ9dhY5dUcrcjs0G+Vza9/HPvKu7jJm3FPLcL2T3DJUlF4+XmZQ==
|
||||
dependencies:
|
||||
"@ethereumjs/common" "2.4.0"
|
||||
"@ethereumjs/tx" "3.3.0"
|
||||
bn.js "^5.2.0"
|
||||
ethereumjs-util "^7.0.10"
|
||||
gridplus-sdk "^1.1.6"
|
||||
gridplus-sdk "^1.2.3"
|
||||
rlp "^3.0.0"
|
||||
secp256k1 "4.0.2"
|
||||
|
||||
@ -13614,10 +13614,10 @@ graphql-subscriptions@^1.1.0:
|
||||
resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.8.0.tgz#33410e96b012fa3bdb1091cc99a94769db212b38"
|
||||
integrity sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==
|
||||
|
||||
gridplus-sdk@^1.1.6:
|
||||
version "1.1.6"
|
||||
resolved "https://registry.yarnpkg.com/gridplus-sdk/-/gridplus-sdk-1.1.6.tgz#abec7eab81daa295806aaafda50cf3b463a53ae6"
|
||||
integrity sha512-AjpnKouda18gwJpOqZRB9aY/cXKGLCj2U915hxjtlQvulRQfCtS1aNA71ZeN/rlBb77NPDZ8v1jJVerte4vKLQ==
|
||||
gridplus-sdk@^1.2.3:
|
||||
version "1.2.4"
|
||||
resolved "https://registry.yarnpkg.com/gridplus-sdk/-/gridplus-sdk-1.2.4.tgz#3bfd73a65b5af0a23bbc0164e8537981d35dd8db"
|
||||
integrity sha512-S4Yg48GG+eAuXxO0I5yWnM8w7VFgvLuP0aS7f6L+h+et1FUF3yNIR2sBuFnijcuGVcMy+jqvA66r8iSttBQfQw==
|
||||
dependencies:
|
||||
"@ethereumjs/common" "2.4.0"
|
||||
"@ethereumjs/tx" "3.3.0"
|
||||
@ -13634,7 +13634,6 @@ gridplus-sdk@^1.1.6:
|
||||
hash.js "^1.1.7"
|
||||
js-sha3 "^0.8.0"
|
||||
rlp "^3.0.0"
|
||||
rlp-browser "^1.0.1"
|
||||
secp256k1 "4.0.2"
|
||||
superagent "^3.8.3"
|
||||
|
||||
@ -24132,13 +24131,6 @@ ripple-lib@1.10.0:
|
||||
ripple-lib-transactionparser "0.8.2"
|
||||
ws "^7.2.0"
|
||||
|
||||
rlp-browser@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/rlp-browser/-/rlp-browser-1.0.1.tgz#d1ea37f289359200d33dfa006d46008a288761eb"
|
||||
integrity sha512-JU+9ntlfyKanOOPwtNuMZBmCQ/fWVoryfa7ZSYDTUKAa1zk4v2smvM0WV8BsskJuqn/DdxpO7HO2vEikMvmhOA==
|
||||
dependencies:
|
||||
buffer "^5.4.2"
|
||||
|
||||
rlp@^2.0.0, rlp@^2.2.3, rlp@^2.2.4, rlp@^2.2.6:
|
||||
version "2.2.7"
|
||||
resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf"
|
||||
|
Loading…
Reference in New Issue
Block a user