inspect-key: Adds support for expect-public (#10430)

* Introduce `SecretUri`

* `inspect-key`: Adds support for `expect-public`

`expect-public` can be used to check that a given secret uri corresponds to the given public key.
This is mainly useful when the secret uri is protected by a password and a new derived account
should be generated. With `--expect-public` the user can pass the public key/account-id of the
"base" secret uri aka the one without any derivation to ensure the correct password was inserted.

* Fixes

* 🤦

* Apply suggestions from code review

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Review feedback

* FMT

* Bump the versions

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
Bastian Köcher
2021-12-11 08:13:18 +01:00
committed by GitHub
parent 91260e8b05
commit f6f58f95e1
152 changed files with 413 additions and 165 deletions
@@ -28,7 +28,7 @@ impl-trait-for-tuples = "0.2.1"
[dev-dependencies]
sp-runtime-interface-test-wasm = { version = "2.0.0", path = "test-wasm" }
sp-state-machine = { version = "0.10.0-dev", path = "../state-machine" }
sp-core = { version = "4.0.0", path = "../core" }
sp-core = { version = "4.1.0-dev", path = "../core" }
sp-io = { version = "4.0.0-dev", path = "../io" }
rustversion = "1.0.5"
trybuild = "1.0.52"
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
sp-runtime-interface = { version = "4.0.0", default-features = false, path = "../" }
sp-std = { version = "4.0.0", default-features = false, path = "../../std" }
sp-io = { version = "4.0.0-dev", default-features = false, path = "../../io" }
sp-core = { version = "4.0.0", default-features = false, path = "../../core" }
sp-core = { version = "4.1.0-dev", default-features = false, path = "../../core" }
[build-dependencies]
substrate-wasm-builder = { version = "5.0.0-dev", path = "../../../utils/wasm-builder" }
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
sp-runtime-interface = { version = "4.0.0", default-features = false, path = "../" }
sp-std = { version = "4.0.0", default-features = false, path = "../../std" }
sp-io = { version = "4.0.0-dev", default-features = false, path = "../../io" }
sp-core = { version = "4.0.0", default-features = false, path = "../../core" }
sp-core = { version = "4.1.0-dev", default-features = false, path = "../../core" }
[build-dependencies]
substrate-wasm-builder = { version = "5.0.0-dev", path = "../../../utils/wasm-builder" }