Trait BlockchainsAssetsApi

Source
pub trait BlockchainsAssetsApi: Send + Sync {
    // Required methods
    fn estimate_network_fee<'life0, 'async_trait>(
        &'life0 self,
        params: EstimateNetworkFeeParams,
    ) -> Pin<Box<dyn Future<Output = Result<EstimatedNetworkFeeResponse, Error<EstimateNetworkFeeError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_asset<'life0, 'async_trait>(
        &'life0 self,
        params: GetAssetParams,
    ) -> Pin<Box<dyn Future<Output = Result<Asset, Error<GetAssetError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_blockchain<'life0, 'async_trait>(
        &'life0 self,
        params: GetBlockchainParams,
    ) -> Pin<Box<dyn Future<Output = Result<BlockchainResponse, Error<GetBlockchainError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_supported_assets<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<AssetTypeResponse>, Error<GetSupportedAssetsError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_assets<'life0, 'async_trait>(
        &'life0 self,
        params: ListAssetsParams,
    ) -> Pin<Box<dyn Future<Output = Result<ListAssetsResponse, Error<ListAssetsError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_blockchains<'life0, 'async_trait>(
        &'life0 self,
        params: ListBlockchainsParams,
    ) -> Pin<Box<dyn Future<Output = Result<ListBlockchainsResponse, Error<ListBlockchainsError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn register_new_asset<'life0, 'async_trait>(
        &'life0 self,
        params: RegisterNewAssetParams,
    ) -> Pin<Box<dyn Future<Output = Result<AssetResponse, Error<RegisterNewAssetError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_asset_price<'life0, 'async_trait>(
        &'life0 self,
        params: SetAssetPriceParams,
    ) -> Pin<Box<dyn Future<Output = Result<AssetPriceResponse, Error<SetAssetPriceError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn validate_address<'life0, 'async_trait>(
        &'life0 self,
        params: ValidateAddressParams,
    ) -> Pin<Box<dyn Future<Output = Result<ValidateAddressResponse, Error<ValidateAddressError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn estimate_network_fee<'life0, 'async_trait>( &'life0 self, params: EstimateNetworkFeeParams, ) -> Pin<Box<dyn Future<Output = Result<EstimatedNetworkFeeResponse, Error<EstimateNetworkFeeError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /estimate_network_fee

Gets the estimated required fee for an asset. Fireblocks fetches, calculates and caches the result every 30 seconds. Customers should query this API while taking the caching interval into consideration. Notes: - The networkFee parameter is the gasPrice with a given delta added, multiplied by the gasLimit plus the delta. - The estimation provided depends on the asset type. - For UTXO-based assets, the response contains the feePerByte parameter - For ETH-based and all EVM based assets, the response will contain gasPrice parameter. This is calculated by adding the baseFee to the actualPriority based on the latest 12 blocks. The response for ETH-based contains the baseFee, gasPrice, and priorityFee parameters. - For ADA-based assets, the response will contain the parameter networkFee and feePerByte parameters. - For XRP and XLM, the response will contain the transaction fee. - For other assets, the response will contain the networkFee parameter. Learn more about Fireblocks Fee Management in the following guide.
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.

Source

fn get_asset<'life0, 'async_trait>( &'life0 self, params: GetAssetParams, ) -> Pin<Box<dyn Future<Output = Result<Asset, Error<GetAssetError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /assets/{id}

Returns an asset by ID or legacyID.
Note: - We will continue displaying and supporting the legacy ID (API ID). Since not all Fireblocks services fully support the new Assets UUID, please use only the legacy ID until further notice.

Source

fn get_blockchain<'life0, 'async_trait>( &'life0 self, params: GetBlockchainParams, ) -> Pin<Box<dyn Future<Output = Result<BlockchainResponse, Error<GetBlockchainError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /blockchains/{id}

Returns a blockchain by ID or legacyID.

Source

fn get_supported_assets<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<AssetTypeResponse>, Error<GetSupportedAssetsError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /supported_assets

Legacy Endpoint – Retrieves all assets supported by Fireblocks in your workspace without extended information.
Note: - This endpoint will remain available for the foreseeable future and is not deprecated.
- The List assets endpoint provides more detailed asset information and improved performance.
- We recommend transitioning to the List assets endpoint for better results.
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.

Source

fn list_assets<'life0, 'async_trait>( &'life0 self, params: ListAssetsParams, ) -> Pin<Box<dyn Future<Output = Result<ListAssetsResponse, Error<ListAssetsError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /assets

Retrieves all assets supported by Fireblocks in your workspace, providing extended information and enhanced performance compared to the legacy supported_assets endpoint.
Note: - We will continue displaying and supporting the legacy ID (API ID). Since not all Fireblocks services fully support the new Assets UUID, please use only the legacy ID until further notice.

Source

fn list_blockchains<'life0, 'async_trait>( &'life0 self, params: ListBlockchainsParams, ) -> Pin<Box<dyn Future<Output = Result<ListBlockchainsResponse, Error<ListBlockchainsError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /blockchains

Returns all blockchains supported by Fireblocks.

Source

fn register_new_asset<'life0, 'async_trait>( &'life0 self, params: RegisterNewAssetParams, ) -> Pin<Box<dyn Future<Output = Result<AssetResponse, Error<RegisterNewAssetError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

POST /assets

Register a new asset to a workspace and return the newly created asset’s details. Currently supported chains are: - EVM based chains - Stellar - Algorand - TRON - Solana Learn more about Supporting Additional Assets in Fireblocks in the following guide.
Endpoint Permission: Owner, Admin, Non-Signing Admin, NCW Admin, Editor, and Signer.

Source

fn set_asset_price<'life0, 'async_trait>( &'life0 self, params: SetAssetPriceParams, ) -> Pin<Box<dyn Future<Output = Result<AssetPriceResponse, Error<SetAssetPriceError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

POST /assets/prices/{id}

Set asset price for the given asset id. Returns the asset price response.

Source

fn validate_address<'life0, 'async_trait>( &'life0 self, params: ValidateAddressParams, ) -> Pin<Box<dyn Future<Output = Result<ValidateAddressResponse, Error<ValidateAddressError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /transactions/validate_address/{assetId}/{address}

Checks if an address is valid and active (for XRP, DOT, XLM, and EOS).
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.

Implementors§