pub trait ClementineAggregator:
Send
+ Sync
+ 'static {
// Required methods
fn get_nofn_aggregated_xonly_pk<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<NofnResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn setup<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<VerifierPublicKeys>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn new_deposit<'life0, 'async_trait>(
&'life0 self,
request: Request<Deposit>,
) -> Pin<Box<dyn Future<Output = Result<Response<RawSignedTx>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn withdraw<'life0, 'async_trait>(
&'life0 self,
request: Request<WithdrawParams>,
) -> Pin<Box<dyn Future<Output = Result<Response<AggregatorWithdrawResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn optimistic_payout<'life0, 'async_trait>(
&'life0 self,
request: Request<WithdrawParams>,
) -> Pin<Box<dyn Future<Output = Result<Response<RawSignedTx>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn internal_send_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<SendTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_move_to_vault_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<SendMoveTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Txid>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn internal_create_emergency_stop_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateEmergencyStopTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SignedTxWithType>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn vergen<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<VergenResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with ClementineAggregatorServer.
Required Methods§
fn get_nofn_aggregated_xonly_pk<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<NofnResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn setup<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<VerifierPublicKeys>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn setup<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<VerifierPublicKeys>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sets up the system of verifiers, watchtowers and operators by:
- Collects verifier keys from each verifier
- Distributes these verifier keys to all verifiers
- Collects all operator configs from each operator
- Distributes these operator configs to all verifiers
Used by the clementine-backend service
Sourcefn new_deposit<'life0, 'async_trait>(
&'life0 self,
request: Request<Deposit>,
) -> Pin<Box<dyn Future<Output = Result<Response<RawSignedTx>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn new_deposit<'life0, 'async_trait>(
&'life0 self,
request: Request<Deposit>,
) -> Pin<Box<dyn Future<Output = Result<Response<RawSignedTx>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
This will call, DepositNonceGen for every verifier, then it will aggregate one by one and then send it to DepositSign, then it will aggregate the partial sigs and send it to DepositFinalize, this will also call the operator to get their signatures and send it to DepositFinalize then it will collect the partial sigs and create the move tx.
Used by the clementine-backend service to initiate a deposit
Sourcefn withdraw<'life0, 'async_trait>(
&'life0 self,
request: Request<WithdrawParams>,
) -> Pin<Box<dyn Future<Output = Result<Response<AggregatorWithdrawResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn withdraw<'life0, 'async_trait>(
&'life0 self,
request: Request<WithdrawParams>,
) -> Pin<Box<dyn Future<Output = Result<Response<AggregatorWithdrawResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Call’s withdraw on all operators Used by the clementine-backend service to initiate a withdrawal
Sourcefn optimistic_payout<'life0, 'async_trait>(
&'life0 self,
request: Request<WithdrawParams>,
) -> Pin<Box<dyn Future<Output = Result<Response<RawSignedTx>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn optimistic_payout<'life0, 'async_trait>(
&'life0 self,
request: Request<WithdrawParams>,
) -> Pin<Box<dyn Future<Output = Result<Response<RawSignedTx>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Perform an optimistic payout to reimburse a peg-out from Citrea
Sourcefn internal_send_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<SendTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn internal_send_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<SendTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a pre-signed tx to the network
fn send_move_to_vault_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<SendMoveTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Txid>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn internal_create_emergency_stop_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateEmergencyStopTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SignedTxWithType>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn internal_create_emergency_stop_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateEmergencyStopTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SignedTxWithType>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates an emergency stop tx that won’t be broadcasted. Tx will have around 3 sats/vbyte fee. Set add_anchor to true to add an anchor output for cpfp..