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§
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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_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.
Sourcefn 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 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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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,
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.