Skip to main content

RsmCreditWriter

Trait RsmCreditWriter 

Source
pub trait RsmCreditWriter: RsmCreditReader {
    // Required methods
    fn ensure_observed_deposit_account<'life0, 'life1, 'async_trait>(
        &'life0 self,
        account: &'life1 WalletAddress,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn claim_rsm_deposit_credit<'life0, 'life1, 'async_trait>(
        &'life0 self,
        input: &'life1 RsmDepositCreditClaimInput,
    ) -> Pin<Box<dyn Future<Output = Result<RsmDepositCreditClaimRecord>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn mark_rsm_deposit_credit_submitted<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn mark_rsm_deposit_credit_failed<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        request_id: &'life1 str,
        error: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn pending_rsm_usdc_deposit_for_amount<'life0, 'life1, 'async_trait>(
        &'life0 self,
        amount_wei: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<RsmUsdcDepositMatch>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn pending_rsm_usdc_deposit_for_evm_tx_hash<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        evm_tx_hash: &'life1 str,
        amount_wei: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<RsmUsdcDepositMatch>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn pending_rsm_usdc_deposit_for_credited_hypercore_event<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        event_hash: &'life1 str,
        amount_wei: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<RsmUsdcDepositMatch>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn credited_wallet_for_hypercore_cash_event<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event_hash: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<WalletAddress>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn non_crediting_hypercore_cash_event<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event_hash: &'life1 str,
        amount_usdc: Decimal,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn apply_hypercore_cash_deposit<'life0, 'life1, 'async_trait>(
        &'life0 self,
        input: &'life1 HypercoreCashLedgerApply,
    ) -> Pin<Box<dyn Future<Output = Result<HypercoreCashLedgerApplyResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn record_hypercore_cash_deposit_pending_margin_mode<'life0, 'life1, 'async_trait>(
        &'life0 self,
        input: &'life1 HypercoreCashLedgerApply,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn ensure_observed_deposit_account<'life0, 'life1, 'async_trait>( &'life0 self, account: &'life1 WalletAddress, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Ensure an observed deposit account has a tier row before crediting.

Source

fn claim_rsm_deposit_credit<'life0, 'life1, 'async_trait>( &'life0 self, input: &'life1 RsmDepositCreditClaimInput, ) -> Pin<Box<dyn Future<Output = Result<RsmDepositCreditClaimRecord>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Claim an observed RSM deposit credit idempotently.

Source

fn mark_rsm_deposit_credit_submitted<'life0, 'life1, 'async_trait>( &'life0 self, request_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark an RSM deposit credit as submitted to the engine/journal path.

Source

fn mark_rsm_deposit_credit_failed<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, request_id: &'life1 str, error: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Mark an RSM deposit credit as failed so observers can quarantine invalid public events.

Source

fn pending_rsm_usdc_deposit_for_amount<'life0, 'life1, 'async_trait>( &'life0 self, amount_wei: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<RsmUsdcDepositMatch>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Match a pending Exchange.UsdcDeposit event to one observed HyperCore cash deposit.

Source

fn pending_rsm_usdc_deposit_for_evm_tx_hash<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, evm_tx_hash: &'life1 str, amount_wei: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<RsmUsdcDepositMatch>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Match a pending Exchange.UsdcDeposit event to a CoreWriter writer-action EVM tx hash.

Source

fn pending_rsm_usdc_deposit_for_credited_hypercore_event<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, event_hash: &'life1 str, amount_wei: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<RsmUsdcDepositMatch>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Recover a still-pending Exchange.UsdcDeposit request for an already credited HyperCore event.

Source

fn credited_wallet_for_hypercore_cash_event<'life0, 'life1, 'async_trait>( &'life0 self, event_hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<WalletAddress>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return the wallet already credited for a HyperCore cash deposit event, if any.

Source

fn non_crediting_hypercore_cash_event<'life0, 'life1, 'async_trait>( &'life0 self, event_hash: &'life1 str, amount_usdc: Decimal, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return true when a HyperCore cash deposit event is already recorded as non-crediting.

Source

fn apply_hypercore_cash_deposit<'life0, 'life1, 'async_trait>( &'life0 self, input: &'life1 HypercoreCashLedgerApply, ) -> Pin<Box<dyn Future<Output = Result<HypercoreCashLedgerApplyResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Apply a HyperCore cash deposit idempotently.

Source

fn record_hypercore_cash_deposit_pending_margin_mode<'life0, 'life1, 'async_trait>( &'life0 self, input: &'life1 HypercoreCashLedgerApply, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Persist a replayable cash deposit row when margin mode is temporarily unavailable.

Implementors§