mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Include a copy of ValidatorId
This avoids needing to depend on Polkadot.
This commit is contained in:
+16
-17
@@ -17,8 +17,8 @@ keywords = ["parity", "substrate", "blockchain"]
|
||||
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]
|
||||
|
||||
[features]
|
||||
kusama = []
|
||||
default = ["kusama"]
|
||||
kusama = ["polkadot"]
|
||||
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
@@ -30,24 +30,23 @@ serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
url = "2.1"
|
||||
codec = { package = "parity-scale-codec", version = "1.3", default-features = false, features = ["derive", "full"] }
|
||||
|
||||
frame-metadata = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-version = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
hex = "0.4.0"
|
||||
sp-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
substrate-subxt-proc-macro = { version = "0.8.0", path = "proc-macro" }
|
||||
sp-std = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
polkadot = { git = "https://github.com/paritytech/polkadot", branch = "master", optional = true, default-features = false, features = ["std"], package = "polkadot-primitives" }
|
||||
sp-std = "2.0.0-rc3"
|
||||
application-crypto = { version = "2.0.0-rc3", package = "sp-application-crypto" }
|
||||
sp-core = "2.0.0-rc3"
|
||||
sp-rpc = "2.0.0-rc3"
|
||||
pallet-indices = "2.0.0-rc3"
|
||||
sp-runtime = "2.0.0-rc3"
|
||||
sp-version = "2.0.0-rc3"
|
||||
sc-rpc-api = "0.8.0-rc3"
|
||||
sp-finality-grandpa = "2.0.0-rc3"
|
||||
sp-consensus-babe = "0.8.0-rc3"
|
||||
pallet-im-online = "2.0.0-rc3"
|
||||
sp-authority-discovery = "2.0.0-rc3"
|
||||
frame-metadata = "11.0.0-rc3"
|
||||
frame-support = "2.0.0-rc3"
|
||||
sp-transaction-pool = "2.0.0-rc3"
|
||||
|
||||
[dev-dependencies]
|
||||
async-std = { version = "1.5.0", features = ["attributes"] }
|
||||
|
||||
+10
-1
@@ -49,11 +49,19 @@ impl sp_runtime::BoundToRuntimeAppPublic for Grandpa {
|
||||
|
||||
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
|
||||
|
||||
#[cfg(feature = "kusama")]
|
||||
mod validator_app {
|
||||
use application_crypto::{app_crypto, sr25519};
|
||||
app_crypto!(sr25519, sp_core::crypto::KeyTypeId(*b"para"));
|
||||
}
|
||||
|
||||
/// Parachain marker struct
|
||||
#[cfg(feature = "kusama")]
|
||||
pub struct Parachains;
|
||||
|
||||
#[cfg(feature = "kusama")]
|
||||
impl sp_runtime::BoundToRuntimeAppPublic for Parachains {
|
||||
type Public = polkadot::parachain::ValidatorId;
|
||||
type Public = validator_app::Public;
|
||||
}
|
||||
|
||||
/// Authority discovery marker struct
|
||||
@@ -62,6 +70,7 @@ impl sp_runtime::BoundToRuntimeAppPublic for AuthorityDiscovery {
|
||||
type Public = AuthorityDiscoveryId;
|
||||
}
|
||||
|
||||
#[cfg(feature = "kusama")]
|
||||
impl_opaque_keys! {
|
||||
/// Substrate base runtime keys
|
||||
pub struct BasicSessionKeys {
|
||||
|
||||
Reference in New Issue
Block a user