pub struct RawSign {
pub params: RawSignParams,
}Expand description
Provide either hash (to sign a pre-computed hash) OR both bytes and
encoding (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
both `bytes` and `encoding` (to hash and then sign). These options are
mutually exclusive.",
"examples": [
{
"params": {
"hash":
"0x0775aeed9c9ce6e0fbc4db25c5e4e6368029651c905c286f813126a09025a21e"
}
}
],
"type": "object",
"required": [
"params"
],
"properties": {
"params": {
"oneOf": [
{
"description": "Sign a pre-computed hash",
"type": "object",
"required": [
"hash"
],
"properties": {
"hash": {
"description": "The hash to sign. Must start with `0x`.",
"type": "string"
}
}
},
{
"description": "Hash and sign bytes (Tron only)",
"type": "object",
"required": [
"bytes",
"encoding"
],
"properties": {
"bytes": {
"description": "The bytes to hash and sign.",
"type": "string"
},
"encoding": {
"description": "Encoding scheme. Currently only utf-8 is
supported.",
"type": "string",
"enum": [
"utf-8"
]
}
}
}
]
}
}
}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 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