fireblocks-sdk 2026.3.27

Rust implementation of the Fireblocks SDK
Documentation
// Fireblocks API
//
// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
//
// The version of the OpenAPI document: 1.8.0
// Contact: developers@fireblocks.com
// Generated by: https://openapi-generator.tech

use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SignedMessageSignature {
    /// R + S values concatenated
    #[serde(rename = "fullSig", skip_serializing_if = "Option::is_none")]
    pub full_sig: Option<String>,
    #[serde(rename = "r", skip_serializing_if = "Option::is_none")]
    pub r: Option<String>,
    #[serde(rename = "s", skip_serializing_if = "Option::is_none")]
    pub s: Option<String>,
    #[serde(rename = "v", skip_serializing_if = "Option::is_none")]
    pub v: Option<i32>,
}

impl SignedMessageSignature {
    pub fn new() -> SignedMessageSignature {
        SignedMessageSignature {
            full_sig: None,
            r: None,
            s: None,
            v: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
#[serde(try_from = "u8", into = "u8")]
pub enum V {
    Variant0,
    Variant1,
}

impl TryFrom<u8> for V {
    type Error = String;

    fn try_from(value: u8) -> Result<Self, Self::Error> {
        match value {
            0 => Ok(V::Variant0),
            1 => Ok(V::Variant1),
            _ => Err(format!("invalid v value: {value}")),
        }
    }
}

impl From<V> for u8 {
    fn from(v: V) -> Self {
        match v {
            V::Variant0 => 0,
            V::Variant1 => 1,
        }
    }
}