Skip to main content

RfqWriter

Trait RfqWriter 

Source
pub trait RfqWriter: RfqReader {
    // Required methods
    fn upsert_quote_provider_sync(&self, qp: &QuoteProviderRecord) -> Result<()>;
    fn update_quote_provider_status_sync(
        &self,
        wallet: &WalletAddress,
        status: &str,
    ) -> Result<()>;
    fn persist_rfq_record_sync(
        &self,
        rfq_id: &Uuid,
        taker_wallet: &WalletAddress,
        underlying: &str,
        status: &str,
        taker_signature: &str,
        taker_nonce: u64,
        legs_hash: &[u8; 32],
        legs: &[(String, String, Decimal)],
        expires_at_ms: u64,
    ) -> Result<()>;
    fn persist_rfq_quote_sync(
        &self,
        quote_id: &Uuid,
        rfq_id: &Uuid,
        qp_wallet: &WalletAddress,
        net_premium: Decimal,
        valid_for_ms: u64,
        qp_signature: &str,
        qp_nonce: u64,
        legs: &[(String, String, Decimal, Decimal)],
        expires_at_ms: u64,
    ) -> Result<()>;
    fn update_rfq_status_sync(&self, rfq_id: &Uuid, status: &str) -> Result<()>;
}
Expand description

Quote provider and RFQ mutations.

Required Methods§

Source

fn upsert_quote_provider_sync(&self, qp: &QuoteProviderRecord) -> Result<()>

Upsert a quote provider registration.

Source

fn update_quote_provider_status_sync( &self, wallet: &WalletAddress, status: &str, ) -> Result<()>

Update a quote provider’s status (“active” / “suspended”).

Source

fn persist_rfq_record_sync( &self, rfq_id: &Uuid, taker_wallet: &WalletAddress, underlying: &str, status: &str, taker_signature: &str, taker_nonce: u64, legs_hash: &[u8; 32], legs: &[(String, String, Decimal)], expires_at_ms: u64, ) -> Result<()>

Persist an RFQ record and its legs atomically.

Source

fn persist_rfq_quote_sync( &self, quote_id: &Uuid, rfq_id: &Uuid, qp_wallet: &WalletAddress, net_premium: Decimal, valid_for_ms: u64, qp_signature: &str, qp_nonce: u64, legs: &[(String, String, Decimal, Decimal)], expires_at_ms: u64, ) -> Result<()>

Persist a quote provider’s firm quote and its legs atomically.

Source

fn update_rfq_status_sync(&self, rfq_id: &Uuid, status: &str) -> Result<()>

Update RFQ record status.

Implementors§