pub enum RawSignParams {
Hash {
hash: String,
},
Bytes {
bytes: String,
encoding: BytesEncoding,
hash_function: BytesHashFunction,
},
}Expand description
RawSignParams
JSON schema
{
"oneOf": [
{
"title": "Hash",
"description": "Sign a pre-computed hash",
"type": "object",
"required": [
"hash"
],
"properties": {
"hash": {
"description": "The hash to sign. Must start with `0x`.",
"type": "string"
}
}
},
{
"title": "Bytes",
"description": "Hash and sign bytes using the specified encoding
and hash function.",
"type": "object",
"required": [
"bytes",
"encoding",
"hash_function"
],
"properties": {
"bytes": {
"description": "The bytes to hash and sign.",
"type": "string"
},
"encoding": {
"description": "The encoding scheme for the bytes.",
"type": "string",
"enum": [
"hex",
"utf-8"
]
},
"hash_function": {
"description": "The hash function to hash the bytes.",
"type": "string",
"enum": [
"keccak256",
"sha256"
]
}
}
}
]
}Variants§
Hash
Bytes
Fields
§
encoding: BytesEncodingThe encoding scheme for the bytes.
§
hash_function: BytesHashFunctionThe hash function to hash the bytes.
Trait Implementations§
Source§impl Clone for RawSignParams
impl Clone for RawSignParams
Source§fn clone(&self) -> RawSignParams
fn clone(&self) -> RawSignParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RawSignParams
impl Debug for RawSignParams
Source§impl<'de> Deserialize<'de> for RawSignParams
impl<'de> Deserialize<'de> for RawSignParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&RawSignParams> for RawSignParams
impl From<&RawSignParams> for RawSignParams
Source§fn from(value: &RawSignParams) -> Self
fn from(value: &RawSignParams) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RawSignParams
impl RefUnwindSafe for RawSignParams
impl Send for RawSignParams
impl Sync for RawSignParams
impl Unpin for RawSignParams
impl UnsafeUnpin for RawSignParams
impl UnwindSafe for RawSignParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more