mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 07:37:57 +00:00
a756baf3b2
This functionality is required for #1984. This PR enables [`sp-keyring`](https://github.com/paritytech/polkadot-sdk/blob/21d36b7b4229c4d5225944f197918cde23fda4ea/substrate/primitives/keyring/src/sr25519.rs#L31-L40) in `no-std` environments, allowing to generate the public key (e.g. `AccountKeyring::Alice.public().to_ss58check()`), which can be later used in the any of built-in [_runtime-genesis-config_ variant](https://github.com/paritytech/polkadot-sdk/blob/21d36b7b4229c4d5225944f197918cde23fda4ea/polkadot/node/service/src/chain_spec.rs#L1066-L1073). The proposal is as follows: - expose [`core::Pair` trait](https://github.com/paritytech/polkadot-sdk/blob/d6f15306282e3de848a09c9aa9cba6f95a7811f0/substrate/primitives/core/src/crypto.rs#L832) in `no-std`, - `full_crypto` feature enables `sign` method, - `std` feature enables `generate_with_phrase` and `generate` methods (randomness is required), - All other functionality, currently gated by `full_crypto` will be available unconditionally (`no-std`): -- `from_string` -- `from_string_with_seed` -- `from seed` -- `from_seed_slice` -- `from_phrase` -- `derive` -- `verify` --- Depends on https://github.com/rust-bitcoin/rust-bip39/pull/57 --------- Co-authored-by: command-bot <> Co-authored-by: Davide Galassi <davxy@datawok.net>
117 lines
4.7 KiB
TOML
117 lines
4.7 KiB
TOML
[package]
|
|
name = "substrate-test-runtime"
|
|
version = "2.0.0"
|
|
authors.workspace = true
|
|
edition.workspace = true
|
|
build = "build.rs"
|
|
license = "Apache-2.0"
|
|
homepage = "https://substrate.io"
|
|
repository.workspace = true
|
|
publish = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[package.metadata.docs.rs]
|
|
targets = ["x86_64-unknown-linux-gnu"]
|
|
|
|
[dependencies]
|
|
sp-application-crypto = { path = "../../primitives/application-crypto", default-features = false, features = ["serde"] }
|
|
sp-consensus-aura = { path = "../../primitives/consensus/aura", default-features = false, features = ["serde"] }
|
|
sp-consensus-babe = { path = "../../primitives/consensus/babe", default-features = false, features = ["serde"] }
|
|
sp-genesis-builder = { path = "../../primitives/genesis-builder", default-features = false }
|
|
sp-block-builder = { path = "../../primitives/block-builder", default-features = false }
|
|
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ["derive"] }
|
|
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
|
|
sp-inherents = { path = "../../primitives/inherents", default-features = false }
|
|
sp-keyring = { path = "../../primitives/keyring", default-features = false }
|
|
sp-offchain = { path = "../../primitives/offchain", default-features = false }
|
|
sp-core = { path = "../../primitives/core", default-features = false, features = ["serde"] }
|
|
sp-crypto-hashing = { path = "../../primitives/crypto/hashing", default-features = false }
|
|
sp-std = { path = "../../primitives/std", default-features = false }
|
|
sp-io = { path = "../../primitives/io", default-features = false }
|
|
frame-support = { path = "../../frame/support", default-features = false }
|
|
sp-version = { path = "../../primitives/version", default-features = false }
|
|
sp-session = { path = "../../primitives/session", default-features = false }
|
|
sp-api = { path = "../../primitives/api", default-features = false }
|
|
sp-runtime = { path = "../../primitives/runtime", default-features = false, features = ["serde"] }
|
|
pallet-babe = { path = "../../frame/babe", default-features = false }
|
|
pallet-balances = { path = "../../frame/balances", default-features = false }
|
|
frame-executive = { path = "../../frame/executive", default-features = false }
|
|
frame-system = { path = "../../frame/system", default-features = false }
|
|
frame-system-rpc-runtime-api = { path = "../../frame/system/rpc/runtime-api", default-features = false }
|
|
pallet-timestamp = { path = "../../frame/timestamp", default-features = false }
|
|
sp-consensus-grandpa = { path = "../../primitives/consensus/grandpa", default-features = false, features = ["serde"] }
|
|
sp-trie = { path = "../../primitives/trie", default-features = false }
|
|
sp-transaction-pool = { path = "../../primitives/transaction-pool", default-features = false }
|
|
trie-db = { version = "0.28.0", default-features = false }
|
|
sc-service = { path = "../../client/service", default-features = false, features = ["test-helpers"], optional = true }
|
|
sp-state-machine = { path = "../../primitives/state-machine", default-features = false }
|
|
sp-externalities = { path = "../../primitives/externalities", default-features = false }
|
|
|
|
# 3rd party
|
|
array-bytes = { version = "6.1", optional = true }
|
|
log = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
futures = "0.3.21"
|
|
sc-block-builder = { path = "../../client/block-builder" }
|
|
sc-chain-spec = { path = "../../client/chain-spec" }
|
|
sc-executor = { path = "../../client/executor" }
|
|
sc-executor-common = { path = "../../client/executor/common" }
|
|
sp-consensus = { path = "../../primitives/consensus/common" }
|
|
substrate-test-runtime-client = { path = "client" }
|
|
sp-tracing = { path = "../../primitives/tracing" }
|
|
serde = { features = ["alloc", "derive"], workspace = true }
|
|
serde_json = { features = ["alloc"], workspace = true }
|
|
|
|
[build-dependencies]
|
|
substrate-wasm-builder = { path = "../../utils/wasm-builder", optional = true }
|
|
|
|
[features]
|
|
default = ["std"]
|
|
|
|
std = [
|
|
"array-bytes",
|
|
"codec/std",
|
|
"frame-executive/std",
|
|
"frame-support/std",
|
|
"frame-system-rpc-runtime-api/std",
|
|
"frame-system/std",
|
|
"log/std",
|
|
"pallet-babe/std",
|
|
"pallet-balances/std",
|
|
"pallet-timestamp/std",
|
|
"sc-executor/std",
|
|
"sc-service",
|
|
"scale-info/std",
|
|
"serde/std",
|
|
"serde_json/std",
|
|
"sp-api/std",
|
|
"sp-application-crypto/std",
|
|
"sp-block-builder/std",
|
|
"sp-consensus-aura/std",
|
|
"sp-consensus-babe/std",
|
|
"sp-consensus-grandpa/std",
|
|
"sp-core/std",
|
|
"sp-crypto-hashing/std",
|
|
"sp-externalities/std",
|
|
"sp-genesis-builder/std",
|
|
"sp-inherents/std",
|
|
"sp-io/std",
|
|
"sp-keyring/std",
|
|
"sp-offchain/std",
|
|
"sp-runtime/std",
|
|
"sp-session/std",
|
|
"sp-state-machine/std",
|
|
"sp-std/std",
|
|
"sp-tracing/std",
|
|
"sp-transaction-pool/std",
|
|
"sp-trie/std",
|
|
"sp-version/std",
|
|
"substrate-wasm-builder",
|
|
"trie-db/std",
|
|
]
|
|
# Special feature to disable logging
|
|
disable-logging = ["sp-api/disable-logging"]
|