mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
Normalize Crate Names in SRML/Node Template (#3543)
* Fix some instances of `runtime-io` * Patch a bunch * More patches for consistancy * more patch * Fix various build issues * Fix tests * Patch `srml-support-*` crates * Fix doc tests * Revert "Fix doc tests" This reverts commit ba2ec61da7acc36821a70e76a31a6a5bf13bbe95. * Revert "Patch `srml-support-*` crates" This reverts commit 9a6070450107dec17784ba34af4b871023f6dc81. * Missed one * Fix doc tests
This commit is contained in:
@@ -34,19 +34,19 @@ impl RuntimePublic for Public {
|
||||
type Signature = Signature;
|
||||
|
||||
fn all(key_type: KeyTypeId) -> crate::Vec<Self> {
|
||||
rio::ed25519_public_keys(key_type)
|
||||
runtime_io::ed25519_public_keys(key_type)
|
||||
}
|
||||
|
||||
fn generate_pair(key_type: KeyTypeId, seed: Option<&str>) -> Self {
|
||||
rio::ed25519_generate(key_type, seed)
|
||||
runtime_io::ed25519_generate(key_type, seed)
|
||||
}
|
||||
|
||||
fn sign<M: AsRef<[u8]>>(&self, key_type: KeyTypeId, msg: &M) -> Option<Self::Signature> {
|
||||
rio::ed25519_sign(key_type, self, msg)
|
||||
runtime_io::ed25519_sign(key_type, self, msg)
|
||||
}
|
||||
|
||||
fn verify<M: AsRef<[u8]>>(&self, msg: &M, signature: &Self::Signature) -> bool {
|
||||
rio::ed25519_verify(&signature, msg.as_ref(), self)
|
||||
runtime_io::ed25519_verify(&signature, msg.as_ref(), self)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,19 +34,19 @@ impl RuntimePublic for Public {
|
||||
type Signature = Signature;
|
||||
|
||||
fn all(key_type: KeyTypeId) -> crate::Vec<Self> {
|
||||
rio::sr25519_public_keys(key_type)
|
||||
runtime_io::sr25519_public_keys(key_type)
|
||||
}
|
||||
|
||||
fn generate_pair(key_type: KeyTypeId, seed: Option<&str>) -> Self {
|
||||
rio::sr25519_generate(key_type, seed)
|
||||
runtime_io::sr25519_generate(key_type, seed)
|
||||
}
|
||||
|
||||
fn sign<M: AsRef<[u8]>>(&self, key_type: KeyTypeId, msg: &M) -> Option<Self::Signature> {
|
||||
rio::sr25519_sign(key_type, self, msg)
|
||||
runtime_io::sr25519_sign(key_type, self, msg)
|
||||
}
|
||||
|
||||
fn verify<M: AsRef<[u8]>>(&self, msg: &M, signature: &Self::Signature) -> bool {
|
||||
rio::sr25519_verify(&signature, msg.as_ref(), self)
|
||||
runtime_io::sr25519_verify(&signature, msg.as_ref(), self)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user