mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 02:17:58 +00:00
Add serde for Signature types (#4109)
* refactor: Added `from_slice()` method to ECDSA signatures * doc: Modified ECDSA signature docstring to note Recovery ID * feat: Implemented serde for Signature types Note: using hexstring encoding * feat: Automatically derive serde for MultiSignature * refactor: Convert hex bytes using try_from instead of from_slice Avoids panicking in critical code Implemented from Peer Review * clean: spaces -> tabs * test: Added tests for Signature serialization Added dependency on serde_json for testing purposes
This commit is contained in:
committed by
Bastian Köcher
parent
621c02440a
commit
566328cd3e
@@ -164,6 +164,7 @@ impl BuildStorage for (StorageOverlay, ChildrenStorageOverlay) {
|
||||
pub type ConsensusEngineId = [u8; 4];
|
||||
|
||||
/// Signature verify that can work with any known signature types..
|
||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
||||
#[derive(Eq, PartialEq, Clone, Encode, Decode, RuntimeDebug)]
|
||||
pub enum MultiSignature {
|
||||
/// An Ed25519 signature.
|
||||
|
||||
Reference in New Issue
Block a user