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 {
    crate::models,
    serde::{Deserialize, Serialize},
};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Provider {
    /// The ID of the provider
    #[serde(rename = "id")]
    pub id: String,
    /// Name of the provider
    #[serde(rename = "providerName")]
    pub provider_name: String,
    /// An array of objects that includes chain descriptors and the
    /// corresponding fee percentages for validators supported by the provider
    #[serde(rename = "validators")]
    pub validators: Vec<models::Validator>,
    /// URL to the validator's icon
    #[serde(rename = "iconUrl", skip_serializing_if = "Option::is_none")]
    pub icon_url: Option<String>,
    /// URL to the terms of service
    #[serde(rename = "termsOfServiceUrl", skip_serializing_if = "Option::is_none")]
    pub terms_of_service_url: Option<String>,
    /// Indicates whether the terms of service are approved
    #[serde(rename = "isTermsOfServiceApproved")]
    pub is_terms_of_service_approved: bool,
    /// Is the provider private, i.e created by the user
    #[serde(rename = "isPrivate", skip_serializing_if = "Option::is_none")]
    pub is_private: Option<bool>,
    /// Is the provider a liquid staking provider
    #[serde(rename = "isLiquidStaking")]
    pub is_liquid_staking: bool,
}

impl Provider {
    pub fn new(
        id: String,
        provider_name: String,
        validators: Vec<models::Validator>,
        is_terms_of_service_approved: bool,
        is_liquid_staking: bool,
    ) -> Provider {
        Provider {
            id,
            provider_name,
            validators,
            icon_url: None,
            terms_of_service_url: None,
            is_terms_of_service_approved,
            is_private: None,
            is_liquid_staking,
        }
    }
}