pub struct RawSign {
pub params: RawSignParams,
}Expand description
Provide either hash (to sign a pre-computed hash) OR bytes,
encoding, and hash_function (to hash and then sign). These options
are mutually exclusive.
JSON schema
{
"title": "raw_sign",
"description": "Provide either `hash` (to sign a pre-computed hash) OR
`bytes`, `encoding`, and `hash_function` (to hash and then sign). These
options are mutually exclusive.",
"type": "object",
"required": [
"params"
],
"properties": {
"params": {
"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"
]
}
}
}
]
}
}
}Fields§
§params: RawSignParamsTrait Implementations§
Source§impl<'de> Deserialize<'de> for RawSign
impl<'de> Deserialize<'de> for RawSign
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
Auto Trait Implementations§
impl Freeze for RawSign
impl RefUnwindSafe for RawSign
impl Send for RawSign
impl Sync for RawSign
impl Unpin for RawSign
impl UnsafeUnpin for RawSign
impl UnwindSafe for RawSign
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