1#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3pub struct Empty {}
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Txid {
6 #[prost(bytes = "vec", tag = "1")]
7 pub txid: ::prost::alloc::vec::Vec<u8>,
8}
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct Outpoint {
11 #[prost(message, optional, tag = "1")]
12 pub txid: ::core::option::Option<Txid>,
13 #[prost(uint32, tag = "2")]
14 pub vout: u32,
15}
16#[derive(Clone, PartialEq, ::prost::Message)]
17pub struct Outpoints {
18 #[prost(message, repeated, tag = "1")]
19 pub outpoints: ::prost::alloc::vec::Vec<Outpoint>,
20}
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct NofnResponse {
23 #[prost(bytes = "vec", tag = "1")]
24 pub nofn_xonly_pk: ::prost::alloc::vec::Vec<u8>,
25 #[prost(uint32, tag = "2")]
26 pub num_verifiers: u32,
27}
28#[derive(Clone, Copy, PartialEq, ::prost::Message)]
29pub struct NormalSignatureId {
30 #[prost(enumeration = "NormalSignatureKind", tag = "1")]
31 pub signature_kind: i32,
32}
33#[derive(Clone, Copy, PartialEq, ::prost::Message)]
34pub struct NumberedSignatureId {
35 #[prost(enumeration = "NumberedSignatureKind", tag = "1")]
36 pub signature_kind: i32,
37 #[prost(int32, tag = "2")]
38 pub idx: i32,
39}
40#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct TaggedSignature {
45 #[prost(bytes = "vec", tag = "3")]
46 pub signature: ::prost::alloc::vec::Vec<u8>,
47 #[prost(oneof = "tagged_signature::SignatureId", tags = "1, 2")]
48 pub signature_id: ::core::option::Option<tagged_signature::SignatureId>,
49}
50pub mod tagged_signature {
52 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
53 pub enum SignatureId {
54 #[prost(message, tag = "1")]
55 NormalSignature(super::NormalSignatureId),
56 #[prost(message, tag = "2")]
57 NumberedSignature(super::NumberedSignatureId),
58 }
59}
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct DepositSignatures {
62 #[prost(message, repeated, tag = "1")]
63 pub signatures: ::prost::alloc::vec::Vec<TaggedSignature>,
64}
65#[derive(Clone, PartialEq, ::prost::Message)]
66pub struct ChallengeAckDigest {
67 #[prost(bytes = "vec", tag = "1")]
68 pub hash: ::prost::alloc::vec::Vec<u8>,
69}
70#[derive(Clone, PartialEq, ::prost::Message)]
71pub struct WinternitzPubkey {
72 #[prost(bytes = "vec", repeated, tag = "3")]
73 pub digit_pubkey: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
74}
75#[derive(Clone, PartialEq, ::prost::Message)]
76pub struct DepositParams {
77 #[prost(message, optional, tag = "1")]
78 pub deposit: ::core::option::Option<Deposit>,
79 #[prost(message, optional, tag = "2")]
80 pub actors: ::core::option::Option<Actors>,
81 #[prost(message, optional, tag = "3")]
82 pub security_council: ::core::option::Option<SecurityCouncil>,
83}
84#[derive(Clone, PartialEq, ::prost::Message)]
85pub struct SecurityCouncil {
86 #[prost(bytes = "vec", repeated, tag = "1")]
87 pub pks: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
88 #[prost(uint32, tag = "2")]
89 pub threshold: u32,
90}
91#[derive(Clone, PartialEq, ::prost::Message)]
92pub struct Deposit {
93 #[prost(message, optional, tag = "1")]
95 pub deposit_outpoint: ::core::option::Option<Outpoint>,
96 #[prost(oneof = "deposit::DepositData", tags = "2, 3")]
97 pub deposit_data: ::core::option::Option<deposit::DepositData>,
98}
99pub mod deposit {
101 #[derive(Clone, PartialEq, ::prost::Oneof)]
102 pub enum DepositData {
103 #[prost(message, tag = "2")]
104 BaseDeposit(super::BaseDeposit),
105 #[prost(message, tag = "3")]
106 ReplacementDeposit(super::ReplacementDeposit),
107 }
108}
109#[derive(Clone, PartialEq, ::prost::Message)]
110pub struct Actors {
111 #[prost(message, optional, tag = "1")]
113 pub verifiers: ::core::option::Option<VerifierPublicKeys>,
114 #[prost(message, optional, tag = "2")]
118 pub watchtowers: ::core::option::Option<XOnlyPublicKeys>,
119 #[prost(message, optional, tag = "3")]
121 pub operators: ::core::option::Option<XOnlyPublicKeys>,
122}
123#[derive(Clone, PartialEq, ::prost::Message)]
124pub struct ReplacementDeposit {
125 #[prost(message, optional, tag = "1")]
127 pub old_move_txid: ::core::option::Option<Txid>,
128}
129#[derive(Clone, PartialEq, ::prost::Message)]
131pub struct BaseDeposit {
132 #[prost(bytes = "vec", tag = "1")]
134 pub evm_address: ::prost::alloc::vec::Vec<u8>,
135 #[prost(string, tag = "2")]
137 pub recovery_taproot_address: ::prost::alloc::string::String,
138}
139#[derive(Clone, Copy, PartialEq, ::prost::Message)]
140pub struct NumberedTransactionId {
141 #[prost(enumeration = "NumberedTransactionType", tag = "1")]
142 pub transaction_type: i32,
143 #[prost(int32, tag = "2")]
144 pub index: i32,
145}
146#[derive(Clone, Copy, PartialEq, ::prost::Message)]
147pub struct GrpcTransactionId {
148 #[prost(oneof = "grpc_transaction_id::Id", tags = "1, 2")]
149 pub id: ::core::option::Option<grpc_transaction_id::Id>,
150}
151pub mod grpc_transaction_id {
153 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
154 pub enum Id {
155 #[prost(enumeration = "super::NormalTransactionId", tag = "1")]
156 NormalTransaction(i32),
157 #[prost(message, tag = "2")]
158 NumberedTransaction(super::NumberedTransactionId),
159 }
160}
161#[derive(Clone, PartialEq, ::prost::Message)]
162pub struct KickoffId {
163 #[prost(bytes = "vec", tag = "1")]
164 pub operator_xonly_pk: ::prost::alloc::vec::Vec<u8>,
165 #[prost(uint32, tag = "2")]
166 pub round_idx: u32,
167 #[prost(uint32, tag = "3")]
168 pub kickoff_idx: u32,
169}
170#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct TransactionRequest {
172 #[prost(message, optional, tag = "1")]
173 pub deposit_outpoint: ::core::option::Option<Outpoint>,
174 #[prost(message, optional, tag = "2")]
175 pub kickoff_id: ::core::option::Option<KickoffId>,
176}
177#[derive(Clone, PartialEq, ::prost::Message)]
180pub struct DepositSignSession {
181 #[prost(message, optional, tag = "1")]
182 pub deposit_params: ::core::option::Option<DepositParams>,
183 #[prost(message, repeated, tag = "2")]
184 pub nonce_gen_first_responses: ::prost::alloc::vec::Vec<NonceGenFirstResponse>,
185}
186#[derive(Clone, PartialEq, ::prost::Message)]
187pub struct OperatorConfig {
188 #[prost(message, optional, tag = "1")]
189 pub collateral_funding_outpoint: ::core::option::Option<Outpoint>,
190 #[prost(string, tag = "2")]
191 pub xonly_pk: ::prost::alloc::string::String,
192 #[prost(string, tag = "3")]
193 pub wallet_reimburse_address: ::prost::alloc::string::String,
194}
195#[derive(Clone, PartialEq, ::prost::Message)]
196pub struct OperatorParams {
197 #[prost(oneof = "operator_params::Response", tags = "1, 2, 3")]
198 pub response: ::core::option::Option<operator_params::Response>,
199}
200pub mod operator_params {
202 #[derive(Clone, PartialEq, ::prost::Oneof)]
203 pub enum Response {
204 #[prost(message, tag = "1")]
206 OperatorDetails(super::OperatorConfig),
207 #[prost(message, tag = "2")]
209 WinternitzPubkeys(super::WinternitzPubkey),
210 #[prost(message, tag = "3")]
212 UnspentKickoffSig(super::SchnorrSig),
213 }
214}
215#[derive(Clone, PartialEq, ::prost::Message)]
216pub struct OperatorKeysWithDeposit {
217 #[prost(message, optional, tag = "1")]
218 pub operator_keys: ::core::option::Option<OperatorKeys>,
219 #[prost(message, optional, tag = "2")]
220 pub deposit_params: ::core::option::Option<DepositParams>,
221 #[prost(bytes = "vec", tag = "3")]
222 pub operator_xonly_pk: ::prost::alloc::vec::Vec<u8>,
223}
224#[derive(Clone, PartialEq, ::prost::Message)]
225pub struct OperatorKeys {
226 #[prost(message, repeated, tag = "1")]
228 pub winternitz_pubkeys: ::prost::alloc::vec::Vec<WinternitzPubkey>,
229 #[prost(message, repeated, tag = "2")]
231 pub challenge_ack_digests: ::prost::alloc::vec::Vec<ChallengeAckDigest>,
232}
233#[derive(Clone, PartialEq, ::prost::Message)]
234pub struct SchnorrSig {
235 #[prost(bytes = "vec", tag = "1")]
236 pub schnorr_sig: ::prost::alloc::vec::Vec<u8>,
237}
238#[derive(Clone, PartialEq, ::prost::Message)]
239pub struct WithdrawParams {
240 #[prost(uint32, tag = "1")]
242 pub withdrawal_id: u32,
243 #[prost(bytes = "vec", tag = "2")]
246 pub input_signature: ::prost::alloc::vec::Vec<u8>,
247 #[prost(message, optional, tag = "3")]
249 pub input_outpoint: ::core::option::Option<Outpoint>,
250 #[prost(bytes = "vec", tag = "4")]
253 pub output_script_pubkey: ::prost::alloc::vec::Vec<u8>,
254 #[prost(uint64, tag = "5")]
257 pub output_amount: u64,
258}
259#[derive(Clone, PartialEq, ::prost::Message)]
260pub struct FinalizedPayoutParams {
261 #[prost(bytes = "vec", tag = "1")]
262 pub payout_blockhash: ::prost::alloc::vec::Vec<u8>,
263 #[prost(message, optional, tag = "2")]
264 pub deposit_outpoint: ::core::option::Option<Outpoint>,
265}
266#[derive(Clone, PartialEq, ::prost::Message)]
267pub struct XOnlyPublicKeyRpc {
268 #[prost(bytes = "vec", tag = "1")]
269 pub xonly_public_key: ::prost::alloc::vec::Vec<u8>,
270}
271#[derive(Clone, PartialEq, ::prost::Message)]
272pub struct StoppedTasks {
273 #[prost(string, repeated, tag = "1")]
274 pub stopped_tasks: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
275}
276#[derive(Clone, PartialEq, ::prost::Message)]
277pub struct EntityError {
278 #[prost(string, tag = "1")]
279 pub error: ::prost::alloc::string::String,
280}
281#[derive(Clone, PartialEq, ::prost::Message)]
282pub struct EntityStatus {
283 #[prost(bool, tag = "1")]
284 pub automation: bool,
285 #[prost(string, optional, tag = "2")]
286 pub wallet_balance: ::core::option::Option<::prost::alloc::string::String>,
287 #[prost(uint32, optional, tag = "3")]
288 pub tx_sender_synced_height: ::core::option::Option<u32>,
289 #[prost(uint32, optional, tag = "4")]
290 pub finalized_synced_height: ::core::option::Option<u32>,
291 #[prost(uint32, optional, tag = "5")]
292 pub hcp_last_proven_height: ::core::option::Option<u32>,
293 #[prost(message, optional, tag = "6")]
294 pub stopped_tasks: ::core::option::Option<StoppedTasks>,
295 #[prost(uint32, optional, tag = "7")]
296 pub rpc_tip_height: ::core::option::Option<u32>,
297 #[prost(uint32, optional, tag = "8")]
298 pub bitcoin_syncer_synced_height: ::core::option::Option<u32>,
299 #[prost(uint32, optional, tag = "9")]
300 pub state_manager_next_height: ::core::option::Option<u32>,
301 #[prost(uint64, optional, tag = "10")]
302 pub btc_fee_rate_sat_vb: ::core::option::Option<u64>,
303 #[prost(uint32, optional, tag = "11")]
304 pub citrea_l2_block_height: ::core::option::Option<u32>,
305 #[prost(uint32, optional, tag = "12")]
306 pub lcp_synced_height: ::core::option::Option<u32>,
307}
308#[derive(Clone, PartialEq, ::prost::Message)]
309pub struct EntityId {
310 #[prost(enumeration = "EntityType", tag = "1")]
311 pub kind: i32,
312 #[prost(string, tag = "2")]
313 pub id: ::prost::alloc::string::String,
314}
315#[derive(Clone, PartialEq, ::prost::Message)]
316pub struct EntityStatusWithId {
317 #[prost(message, optional, tag = "1")]
318 pub entity_id: ::core::option::Option<EntityId>,
319 #[prost(oneof = "entity_status_with_id::StatusResult", tags = "2, 3")]
320 pub status_result: ::core::option::Option<entity_status_with_id::StatusResult>,
321}
322pub mod entity_status_with_id {
324 #[derive(Clone, PartialEq, ::prost::Oneof)]
325 pub enum StatusResult {
326 #[prost(message, tag = "2")]
327 Status(super::EntityStatus),
328 #[prost(message, tag = "3")]
329 Err(super::EntityError),
330 }
331}
332#[derive(Clone, PartialEq, ::prost::Message)]
336pub struct CompatibilityParamsRpc {
337 #[prost(string, tag = "1")]
339 pub protocol_paramset: ::prost::alloc::string::String,
340 #[prost(string, tag = "2")]
341 pub security_council: ::prost::alloc::string::String,
342 #[prost(uint32, tag = "3")]
343 pub citrea_chain_id: u32,
344 #[prost(string, tag = "4")]
345 pub clementine_version: ::prost::alloc::string::String,
346 #[prost(bytes = "vec", tag = "5")]
347 pub bridge_circuit_constant: ::prost::alloc::vec::Vec<u8>,
348 #[prost(bytes = "vec", tag = "6")]
349 pub sha256_bitvm_cache: ::prost::alloc::vec::Vec<u8>,
350}
351#[derive(Clone, PartialEq, ::prost::Message)]
352pub struct EntityDataWithId {
353 #[prost(message, optional, tag = "1")]
354 pub entity_id: ::core::option::Option<EntityId>,
355 #[prost(oneof = "entity_data_with_id::DataResult", tags = "2, 3")]
356 pub data_result: ::core::option::Option<entity_data_with_id::DataResult>,
357}
358pub mod entity_data_with_id {
360 #[derive(Clone, PartialEq, ::prost::Oneof)]
361 pub enum DataResult {
362 #[prost(message, tag = "2")]
363 Data(super::CompatibilityParamsRpc),
364 #[prost(string, tag = "3")]
365 Error(::prost::alloc::string::String),
366 }
367}
368#[derive(Clone, PartialEq, ::prost::Message)]
369pub struct EntitiesCompatibilityData {
370 #[prost(message, repeated, tag = "1")]
371 pub entities_compatibility_data: ::prost::alloc::vec::Vec<EntityDataWithId>,
372}
373#[derive(Clone, PartialEq, ::prost::Message)]
374pub struct EntityStatuses {
375 #[prost(message, repeated, tag = "1")]
376 pub entity_statuses: ::prost::alloc::vec::Vec<EntityStatusWithId>,
377}
378#[derive(Clone, PartialEq, ::prost::Message)]
379pub struct VerifierParams {
380 #[prost(bytes = "vec", tag = "1")]
381 pub public_key: ::prost::alloc::vec::Vec<u8>,
382}
383#[derive(Clone, PartialEq, ::prost::Message)]
384pub struct PartialSig {
385 #[prost(bytes = "vec", tag = "1")]
386 pub partial_sig: ::prost::alloc::vec::Vec<u8>,
387}
388#[derive(Clone, Copy, PartialEq, ::prost::Message)]
389pub struct NonceGenRequest {
390 #[prost(uint32, tag = "1")]
391 pub num_nonces: u32,
392}
393#[derive(Clone, PartialEq, ::prost::Message)]
394pub struct NonceGenFirstResponse {
395 #[prost(string, tag = "1")]
398 pub id: ::prost::alloc::string::String,
399 #[prost(uint32, tag = "2")]
401 pub num_nonces: u32,
402}
403#[derive(Clone, PartialEq, ::prost::Message)]
404pub struct NonceGenResponse {
405 #[prost(oneof = "nonce_gen_response::Response", tags = "1, 2")]
406 pub response: ::core::option::Option<nonce_gen_response::Response>,
407}
408pub mod nonce_gen_response {
410 #[derive(Clone, PartialEq, ::prost::Oneof)]
411 pub enum Response {
412 #[prost(message, tag = "1")]
413 FirstResponse(super::NonceGenFirstResponse),
414 #[prost(bytes, tag = "2")]
415 PubNonce(::prost::alloc::vec::Vec<u8>),
416 }
417}
418#[derive(Clone, PartialEq, ::prost::Message)]
419pub struct OptimisticWithdrawParams {
420 #[prost(message, optional, tag = "1")]
421 pub withdrawal: ::core::option::Option<WithdrawParams>,
422 #[prost(string, optional, tag = "2")]
426 pub verification_signature: ::core::option::Option<::prost::alloc::string::String>,
427}
428#[derive(Clone, PartialEq, ::prost::Message)]
429pub struct WithdrawParamsWithSig {
430 #[prost(message, optional, tag = "1")]
431 pub withdrawal: ::core::option::Option<WithdrawParams>,
432 #[prost(string, optional, tag = "2")]
439 pub verification_signature: ::core::option::Option<::prost::alloc::string::String>,
440}
441#[derive(Clone, PartialEq, ::prost::Message)]
447pub struct AggregatorWithdrawalInput {
448 #[prost(message, optional, tag = "1")]
449 pub withdrawal: ::core::option::Option<WithdrawParamsWithSig>,
450 #[prost(message, repeated, tag = "2")]
451 pub operator_xonly_pks: ::prost::alloc::vec::Vec<XOnlyPublicKeyRpc>,
452}
453#[derive(Clone, PartialEq, ::prost::Message)]
454pub struct OptimisticPayoutParams {
455 #[prost(message, optional, tag = "1")]
456 pub opt_withdrawal: ::core::option::Option<OptimisticWithdrawParams>,
457 #[prost(message, optional, tag = "2")]
458 pub nonce_gen: ::core::option::Option<NonceGenFirstResponse>,
459 #[prost(bytes = "vec", tag = "3")]
460 pub agg_nonce: ::prost::alloc::vec::Vec<u8>,
461}
462#[derive(Clone, PartialEq, ::prost::Message)]
463pub struct VerifierDepositSignParams {
464 #[prost(oneof = "verifier_deposit_sign_params::Params", tags = "1, 2")]
465 pub params: ::core::option::Option<verifier_deposit_sign_params::Params>,
466}
467pub mod verifier_deposit_sign_params {
469 #[derive(Clone, PartialEq, ::prost::Oneof)]
470 pub enum Params {
471 #[prost(message, tag = "1")]
472 DepositSignFirstParam(super::DepositSignSession),
473 #[prost(bytes, tag = "2")]
474 AggNonce(::prost::alloc::vec::Vec<u8>),
475 }
476}
477#[derive(Clone, PartialEq, ::prost::Message)]
478pub struct VerifierDepositFinalizeParams {
479 #[prost(oneof = "verifier_deposit_finalize_params::Params", tags = "1, 2, 3, 4")]
480 pub params: ::core::option::Option<verifier_deposit_finalize_params::Params>,
481}
482pub mod verifier_deposit_finalize_params {
484 #[derive(Clone, PartialEq, ::prost::Oneof)]
485 pub enum Params {
486 #[prost(message, tag = "1")]
487 DepositSignFirstParam(super::DepositSignSession),
488 #[prost(bytes, tag = "2")]
489 SchnorrSig(::prost::alloc::vec::Vec<u8>),
490 #[prost(bytes, tag = "3")]
491 MoveTxAggNonce(::prost::alloc::vec::Vec<u8>),
492 #[prost(bytes, tag = "4")]
493 EmergencyStopAggNonce(::prost::alloc::vec::Vec<u8>),
494 }
495}
496#[derive(Clone, PartialEq, ::prost::Message)]
497pub struct VerifierDepositFinalizeResponse {
498 #[prost(bytes = "vec", tag = "1")]
499 pub move_to_vault_partial_sig: ::prost::alloc::vec::Vec<u8>,
500 #[prost(bytes = "vec", tag = "2")]
501 pub emergency_stop_partial_sig: ::prost::alloc::vec::Vec<u8>,
502}
503#[derive(Clone, PartialEq, ::prost::Message)]
504pub struct VerifierPublicKeys {
505 #[prost(bytes = "vec", repeated, tag = "1")]
506 pub verifier_public_keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
507}
508#[derive(Clone, Copy, PartialEq, ::prost::Message)]
509pub struct TxDebugRequest {
510 #[prost(uint32, tag = "1")]
511 pub tx_id: u32,
512}
513#[derive(Clone, PartialEq, ::prost::Message)]
514pub struct TxDebugSubmissionError {
515 #[prost(string, tag = "1")]
516 pub error_message: ::prost::alloc::string::String,
517 #[prost(string, tag = "2")]
518 pub timestamp: ::prost::alloc::string::String,
519}
520#[derive(Clone, PartialEq, ::prost::Message)]
521pub struct TxDebugFeePayerUtxo {
522 #[prost(message, optional, tag = "1")]
523 pub txid: ::core::option::Option<Txid>,
524 #[prost(uint32, tag = "2")]
525 pub vout: u32,
526 #[prost(uint64, tag = "3")]
527 pub amount: u64,
528 #[prost(bool, tag = "4")]
529 pub confirmed: bool,
530}
531#[derive(Clone, PartialEq, ::prost::Message)]
532pub struct TxMetadata {
533 #[prost(message, optional, tag = "1")]
535 pub deposit_outpoint: ::core::option::Option<Outpoint>,
536 #[prost(message, optional, tag = "2")]
538 pub operator_xonly_pk: ::core::option::Option<XOnlyPublicKeyRpc>,
539 #[prost(uint32, tag = "4")]
540 pub round_idx: u32,
541 #[prost(uint32, tag = "5")]
542 pub kickoff_idx: u32,
543 #[prost(message, optional, tag = "6")]
545 pub tx_type: ::core::option::Option<GrpcTransactionId>,
546}
547#[derive(Clone, PartialEq, ::prost::Message)]
548pub struct TxDebugInfo {
549 #[prost(uint32, tag = "1")]
550 pub id: u32,
551 #[prost(bool, tag = "2")]
552 pub is_active: bool,
553 #[prost(string, tag = "3")]
554 pub current_state: ::prost::alloc::string::String,
555 #[prost(message, repeated, tag = "4")]
556 pub submission_errors: ::prost::alloc::vec::Vec<TxDebugSubmissionError>,
557 #[prost(message, repeated, tag = "5")]
558 pub fee_payer_utxos: ::prost::alloc::vec::Vec<TxDebugFeePayerUtxo>,
559 #[prost(string, tag = "6")]
560 pub created_at: ::prost::alloc::string::String,
561 #[prost(message, optional, tag = "7")]
562 pub txid: ::core::option::Option<Txid>,
563 #[prost(string, tag = "8")]
564 pub fee_paying_type: ::prost::alloc::string::String,
565 #[prost(uint32, tag = "9")]
566 pub fee_payer_utxos_count: u32,
567 #[prost(uint32, tag = "10")]
568 pub fee_payer_utxos_confirmed_count: u32,
569 #[prost(bytes = "vec", tag = "11")]
570 pub raw_tx: ::prost::alloc::vec::Vec<u8>,
571 #[prost(message, optional, tag = "12")]
572 pub metadata: ::core::option::Option<TxMetadata>,
573}
574#[derive(Clone, PartialEq, ::prost::Message)]
575pub struct XOnlyPublicKeys {
576 #[prost(bytes = "vec", repeated, tag = "1")]
577 pub xonly_public_keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
578}
579#[derive(Clone, PartialEq, ::prost::Message)]
580pub struct VergenResponse {
581 #[prost(string, tag = "1")]
582 pub response: ::prost::alloc::string::String,
583}
584#[derive(Clone, PartialEq, ::prost::Message)]
585pub struct RawSignedTx {
586 #[prost(bytes = "vec", tag = "1")]
587 pub raw_tx: ::prost::alloc::vec::Vec<u8>,
588}
589#[derive(Clone, PartialEq, ::prost::Message)]
590pub struct SendTxRequest {
591 #[prost(message, optional, tag = "1")]
592 pub raw_tx: ::core::option::Option<RawSignedTx>,
593 #[prost(enumeration = "FeeType", tag = "2")]
594 pub fee_type: i32,
595}
596#[derive(Clone, PartialEq, ::prost::Message)]
597pub struct RawSignedTxs {
598 #[prost(message, repeated, tag = "1")]
599 pub raw_txs: ::prost::alloc::vec::Vec<RawSignedTx>,
600}
601#[derive(Clone, PartialEq, ::prost::Message)]
602pub struct SignedTxWithType {
603 #[prost(message, optional, tag = "1")]
604 pub transaction_type: ::core::option::Option<GrpcTransactionId>,
605 #[prost(bytes = "vec", tag = "2")]
606 pub raw_tx: ::prost::alloc::vec::Vec<u8>,
607}
608#[derive(Clone, PartialEq, ::prost::Message)]
609pub struct SignedTxsWithType {
610 #[prost(message, repeated, tag = "1")]
611 pub signed_txs: ::prost::alloc::vec::Vec<SignedTxWithType>,
612}
613#[derive(Clone, PartialEq, ::prost::Message)]
614pub struct RbfSigningKeyPathRpc {
615 #[prost(bytes = "vec", tag = "1")]
617 pub merkle_root: ::prost::alloc::vec::Vec<u8>,
618}
619#[derive(Clone, PartialEq, ::prost::Message)]
620pub struct RbfSigningScriptPathRpc {
621 #[prost(bytes = "vec", tag = "1")]
622 pub control_block: ::prost::alloc::vec::Vec<u8>,
623 #[prost(bytes = "vec", tag = "2")]
624 pub script: ::prost::alloc::vec::Vec<u8>,
625}
626#[derive(Clone, PartialEq, ::prost::Message)]
627pub struct RbfSigningInfoRpc {
628 #[prost(uint32, tag = "1")]
629 pub vout: u32,
630 #[prost(uint32, tag = "4")]
632 pub tap_sighash_type: u32,
633 #[prost(oneof = "rbf_signing_info_rpc::SpendPath", tags = "2, 3")]
634 pub spend_path: ::core::option::Option<rbf_signing_info_rpc::SpendPath>,
635}
636pub mod rbf_signing_info_rpc {
638 #[derive(Clone, PartialEq, ::prost::Oneof)]
639 pub enum SpendPath {
640 #[prost(message, tag = "2")]
641 KeyPath(super::RbfSigningKeyPathRpc),
642 #[prost(message, tag = "3")]
643 ScriptPath(super::RbfSigningScriptPathRpc),
644 }
645}
646#[derive(Clone, PartialEq, ::prost::Message)]
647pub struct RawTxWithRbfInfo {
648 #[prost(bytes = "vec", tag = "1")]
649 pub raw_tx: ::prost::alloc::vec::Vec<u8>,
650 #[prost(message, optional, tag = "2")]
651 pub rbf_info: ::core::option::Option<RbfSigningInfoRpc>,
652}
653#[derive(Clone, PartialEq, ::prost::Message)]
654pub struct OperatorWithrawalResponse {
655 #[prost(message, optional, tag = "1")]
656 pub operator_xonly_pk: ::core::option::Option<XOnlyPublicKeyRpc>,
657 #[prost(oneof = "operator_withrawal_response::Response", tags = "2, 3")]
658 pub response: ::core::option::Option<operator_withrawal_response::Response>,
659}
660pub mod operator_withrawal_response {
662 #[derive(Clone, PartialEq, ::prost::Oneof)]
663 pub enum Response {
664 #[prost(message, tag = "2")]
665 RawTx(super::RawSignedTx),
666 #[prost(string, tag = "3")]
667 Error(::prost::alloc::string::String),
668 }
669}
670#[derive(Clone, PartialEq, ::prost::Message)]
671pub struct AggregatorWithdrawResponse {
672 #[prost(message, repeated, tag = "1")]
673 pub withdraw_responses: ::prost::alloc::vec::Vec<OperatorWithrawalResponse>,
674}
675#[derive(Clone, PartialEq, ::prost::Message)]
676pub struct GetEmergencyStopTxRequest {
677 #[prost(message, repeated, tag = "1")]
678 pub txids: ::prost::alloc::vec::Vec<Txid>,
679}
680#[derive(Clone, PartialEq, ::prost::Message)]
681pub struct GetEmergencyStopTxResponse {
682 #[prost(message, repeated, tag = "1")]
683 pub txids: ::prost::alloc::vec::Vec<Txid>,
684 #[prost(bytes = "vec", repeated, tag = "2")]
685 pub encrypted_emergency_stop_txs: ::prost::alloc::vec::Vec<
686 ::prost::alloc::vec::Vec<u8>,
687 >,
688}
689#[derive(Clone, PartialEq, ::prost::Message)]
690pub struct SendMoveTxRequest {
691 #[prost(message, optional, tag = "1")]
692 pub raw_tx: ::core::option::Option<RawSignedTx>,
693 #[prost(message, optional, tag = "2")]
694 pub deposit_outpoint: ::core::option::Option<Outpoint>,
695}
696#[derive(Clone, Copy, PartialEq, ::prost::Message)]
697pub struct GetEntityStatusesRequest {
698 #[prost(bool, tag = "1")]
699 pub restart_tasks: bool,
700}
701#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
702#[repr(i32)]
703pub enum NormalSignatureKind {
704 NormalSignatureUnknown = 0,
705 OperatorSighashDefault = 1,
708 Challenge = 2,
709 DisproveTimeout2 = 3,
710 Disprove2 = 4,
711 Reimburse1 = 5,
712 KickoffNotFinalized1 = 6,
713 KickoffNotFinalized2 = 7,
714 Reimburse2 = 8,
715 NoSignature = 9,
716 ChallengeTimeout2 = 10,
717 MiniAssert1 = 11,
718 OperatorChallengeAck1 = 12,
719 NotStored = 13,
720 YieldKickoffTxid = 14,
721 LatestBlockhashTimeout1 = 15,
722 LatestBlockhashTimeout2 = 16,
723 LatestBlockhashTimeout3 = 17,
724 LatestBlockhash = 18,
725}
726impl NormalSignatureKind {
727 pub fn as_str_name(&self) -> &'static str {
732 match self {
733 Self::NormalSignatureUnknown => "NormalSignatureUnknown",
734 Self::OperatorSighashDefault => "OperatorSighashDefault",
735 Self::Challenge => "Challenge",
736 Self::DisproveTimeout2 => "DisproveTimeout2",
737 Self::Disprove2 => "Disprove2",
738 Self::Reimburse1 => "Reimburse1",
739 Self::KickoffNotFinalized1 => "KickoffNotFinalized1",
740 Self::KickoffNotFinalized2 => "KickoffNotFinalized2",
741 Self::Reimburse2 => "Reimburse2",
742 Self::NoSignature => "NoSignature",
743 Self::ChallengeTimeout2 => "ChallengeTimeout2",
744 Self::MiniAssert1 => "MiniAssert1",
745 Self::OperatorChallengeAck1 => "OperatorChallengeAck1",
746 Self::NotStored => "NotStored",
747 Self::YieldKickoffTxid => "YieldKickoffTxid",
748 Self::LatestBlockhashTimeout1 => "LatestBlockhashTimeout1",
749 Self::LatestBlockhashTimeout2 => "LatestBlockhashTimeout2",
750 Self::LatestBlockhashTimeout3 => "LatestBlockhashTimeout3",
751 Self::LatestBlockhash => "LatestBlockhash",
752 }
753 }
754 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
756 match value {
757 "NormalSignatureUnknown" => Some(Self::NormalSignatureUnknown),
758 "OperatorSighashDefault" => Some(Self::OperatorSighashDefault),
759 "Challenge" => Some(Self::Challenge),
760 "DisproveTimeout2" => Some(Self::DisproveTimeout2),
761 "Disprove2" => Some(Self::Disprove2),
762 "Reimburse1" => Some(Self::Reimburse1),
763 "KickoffNotFinalized1" => Some(Self::KickoffNotFinalized1),
764 "KickoffNotFinalized2" => Some(Self::KickoffNotFinalized2),
765 "Reimburse2" => Some(Self::Reimburse2),
766 "NoSignature" => Some(Self::NoSignature),
767 "ChallengeTimeout2" => Some(Self::ChallengeTimeout2),
768 "MiniAssert1" => Some(Self::MiniAssert1),
769 "OperatorChallengeAck1" => Some(Self::OperatorChallengeAck1),
770 "NotStored" => Some(Self::NotStored),
771 "YieldKickoffTxid" => Some(Self::YieldKickoffTxid),
772 "LatestBlockhashTimeout1" => Some(Self::LatestBlockhashTimeout1),
773 "LatestBlockhashTimeout2" => Some(Self::LatestBlockhashTimeout2),
774 "LatestBlockhashTimeout3" => Some(Self::LatestBlockhashTimeout3),
775 "LatestBlockhash" => Some(Self::LatestBlockhash),
776 _ => None,
777 }
778 }
779}
780#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
784#[repr(i32)]
785pub enum NumberedSignatureKind {
786 NumberedSignatureUnknown = 0,
787 NumberedNotStored = 1,
790 OperatorChallengeNack1 = 2,
791 OperatorChallengeNack2 = 3,
792 OperatorChallengeNack3 = 4,
793 AssertTimeout1 = 5,
794 AssertTimeout2 = 6,
795 AssertTimeout3 = 7,
796 UnspentKickoff1 = 8,
797 UnspentKickoff2 = 9,
798 WatchtowerChallengeTimeout1 = 10,
799 WatchtowerChallengeTimeout2 = 11,
800 WatchtowerChallenge = 12,
801}
802impl NumberedSignatureKind {
803 pub fn as_str_name(&self) -> &'static str {
808 match self {
809 Self::NumberedSignatureUnknown => "NumberedSignatureUnknown",
810 Self::NumberedNotStored => "NumberedNotStored",
811 Self::OperatorChallengeNack1 => "OperatorChallengeNack1",
812 Self::OperatorChallengeNack2 => "OperatorChallengeNack2",
813 Self::OperatorChallengeNack3 => "OperatorChallengeNack3",
814 Self::AssertTimeout1 => "AssertTimeout1",
815 Self::AssertTimeout2 => "AssertTimeout2",
816 Self::AssertTimeout3 => "AssertTimeout3",
817 Self::UnspentKickoff1 => "UnspentKickoff1",
818 Self::UnspentKickoff2 => "UnspentKickoff2",
819 Self::WatchtowerChallengeTimeout1 => "WatchtowerChallengeTimeout1",
820 Self::WatchtowerChallengeTimeout2 => "WatchtowerChallengeTimeout2",
821 Self::WatchtowerChallenge => "WatchtowerChallenge",
822 }
823 }
824 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
826 match value {
827 "NumberedSignatureUnknown" => Some(Self::NumberedSignatureUnknown),
828 "NumberedNotStored" => Some(Self::NumberedNotStored),
829 "OperatorChallengeNack1" => Some(Self::OperatorChallengeNack1),
830 "OperatorChallengeNack2" => Some(Self::OperatorChallengeNack2),
831 "OperatorChallengeNack3" => Some(Self::OperatorChallengeNack3),
832 "AssertTimeout1" => Some(Self::AssertTimeout1),
833 "AssertTimeout2" => Some(Self::AssertTimeout2),
834 "AssertTimeout3" => Some(Self::AssertTimeout3),
835 "UnspentKickoff1" => Some(Self::UnspentKickoff1),
836 "UnspentKickoff2" => Some(Self::UnspentKickoff2),
837 "WatchtowerChallengeTimeout1" => Some(Self::WatchtowerChallengeTimeout1),
838 "WatchtowerChallengeTimeout2" => Some(Self::WatchtowerChallengeTimeout2),
839 "WatchtowerChallenge" => Some(Self::WatchtowerChallenge),
840 _ => None,
841 }
842 }
843}
844#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
845#[repr(i32)]
846pub enum FeeType {
847 Unspecified = 0,
848 Cpfp = 1,
849 Rbf = 2,
850 NoFunding = 3,
851 RbfWtxidGrind = 4,
852}
853impl FeeType {
854 pub fn as_str_name(&self) -> &'static str {
859 match self {
860 Self::Unspecified => "UNSPECIFIED",
861 Self::Cpfp => "CPFP",
862 Self::Rbf => "RBF",
863 Self::NoFunding => "NO_FUNDING",
864 Self::RbfWtxidGrind => "RBF_WTXID_GRIND",
865 }
866 }
867 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
869 match value {
870 "UNSPECIFIED" => Some(Self::Unspecified),
871 "CPFP" => Some(Self::Cpfp),
872 "RBF" => Some(Self::Rbf),
873 "NO_FUNDING" => Some(Self::NoFunding),
874 "RBF_WTXID_GRIND" => Some(Self::RbfWtxidGrind),
875 _ => None,
876 }
877 }
878}
879#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
880#[repr(i32)]
881pub enum NormalTransactionId {
882 UnspecifiedTransactionType = 0,
883 Round = 1,
884 Kickoff = 2,
885 MoveToVault = 3,
886 Payout = 4,
887 Challenge = 5,
888 Disprove = 6,
889 DisproveTimeout = 7,
890 Reimburse = 8,
891 AllNeededForDeposit = 9,
892 Dummy = 10,
893 ReadyToReimburse = 11,
894 KickoffNotFinalized = 12,
895 ChallengeTimeout = 13,
896 BurnUnusedKickoffConnectors = 14,
897 YieldKickoffTxid = 15,
898 ReplacementDeposit = 17,
899 LatestBlockhashTimeout = 18,
900 LatestBlockhash = 19,
901 OptimisticPayout = 20,
902}
903impl NormalTransactionId {
904 pub fn as_str_name(&self) -> &'static str {
909 match self {
910 Self::UnspecifiedTransactionType => "UNSPECIFIED_TRANSACTION_TYPE",
911 Self::Round => "ROUND",
912 Self::Kickoff => "KICKOFF",
913 Self::MoveToVault => "MOVE_TO_VAULT",
914 Self::Payout => "PAYOUT",
915 Self::Challenge => "CHALLENGE",
916 Self::Disprove => "DISPROVE",
917 Self::DisproveTimeout => "DISPROVE_TIMEOUT",
918 Self::Reimburse => "REIMBURSE",
919 Self::AllNeededForDeposit => "ALL_NEEDED_FOR_DEPOSIT",
920 Self::Dummy => "DUMMY",
921 Self::ReadyToReimburse => "READY_TO_REIMBURSE",
922 Self::KickoffNotFinalized => "KICKOFF_NOT_FINALIZED",
923 Self::ChallengeTimeout => "CHALLENGE_TIMEOUT",
924 Self::BurnUnusedKickoffConnectors => "BURN_UNUSED_KICKOFF_CONNECTORS",
925 Self::YieldKickoffTxid => "YIELD_KICKOFF_TXID",
926 Self::ReplacementDeposit => "REPLACEMENT_DEPOSIT",
927 Self::LatestBlockhashTimeout => "LATEST_BLOCKHASH_TIMEOUT",
928 Self::LatestBlockhash => "LATEST_BLOCKHASH",
929 Self::OptimisticPayout => "OPTIMISTIC_PAYOUT",
930 }
931 }
932 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
934 match value {
935 "UNSPECIFIED_TRANSACTION_TYPE" => Some(Self::UnspecifiedTransactionType),
936 "ROUND" => Some(Self::Round),
937 "KICKOFF" => Some(Self::Kickoff),
938 "MOVE_TO_VAULT" => Some(Self::MoveToVault),
939 "PAYOUT" => Some(Self::Payout),
940 "CHALLENGE" => Some(Self::Challenge),
941 "DISPROVE" => Some(Self::Disprove),
942 "DISPROVE_TIMEOUT" => Some(Self::DisproveTimeout),
943 "REIMBURSE" => Some(Self::Reimburse),
944 "ALL_NEEDED_FOR_DEPOSIT" => Some(Self::AllNeededForDeposit),
945 "DUMMY" => Some(Self::Dummy),
946 "READY_TO_REIMBURSE" => Some(Self::ReadyToReimburse),
947 "KICKOFF_NOT_FINALIZED" => Some(Self::KickoffNotFinalized),
948 "CHALLENGE_TIMEOUT" => Some(Self::ChallengeTimeout),
949 "BURN_UNUSED_KICKOFF_CONNECTORS" => Some(Self::BurnUnusedKickoffConnectors),
950 "YIELD_KICKOFF_TXID" => Some(Self::YieldKickoffTxid),
951 "REPLACEMENT_DEPOSIT" => Some(Self::ReplacementDeposit),
952 "LATEST_BLOCKHASH_TIMEOUT" => Some(Self::LatestBlockhashTimeout),
953 "LATEST_BLOCKHASH" => Some(Self::LatestBlockhash),
954 "OPTIMISTIC_PAYOUT" => Some(Self::OptimisticPayout),
955 _ => None,
956 }
957 }
958}
959#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
960#[repr(i32)]
961pub enum NumberedTransactionType {
962 UnspecifiedIndexedTransactionType = 0,
963 WatchtowerChallenge = 1,
964 OperatorChallengeNack = 2,
965 OperatorChallengeAck = 3,
966 AssertTimeout = 4,
967 UnspentKickoff = 5,
968 MiniAssert = 6,
969 WatchtowerChallengeTimeout = 7,
970}
971impl NumberedTransactionType {
972 pub fn as_str_name(&self) -> &'static str {
977 match self {
978 Self::UnspecifiedIndexedTransactionType => {
979 "UNSPECIFIED_INDEXED_TRANSACTION_TYPE"
980 }
981 Self::WatchtowerChallenge => "WATCHTOWER_CHALLENGE",
982 Self::OperatorChallengeNack => "OPERATOR_CHALLENGE_NACK",
983 Self::OperatorChallengeAck => "OPERATOR_CHALLENGE_ACK",
984 Self::AssertTimeout => "ASSERT_TIMEOUT",
985 Self::UnspentKickoff => "UNSPENT_KICKOFF",
986 Self::MiniAssert => "MINI_ASSERT",
987 Self::WatchtowerChallengeTimeout => "WATCHTOWER_CHALLENGE_TIMEOUT",
988 }
989 }
990 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
992 match value {
993 "UNSPECIFIED_INDEXED_TRANSACTION_TYPE" => {
994 Some(Self::UnspecifiedIndexedTransactionType)
995 }
996 "WATCHTOWER_CHALLENGE" => Some(Self::WatchtowerChallenge),
997 "OPERATOR_CHALLENGE_NACK" => Some(Self::OperatorChallengeNack),
998 "OPERATOR_CHALLENGE_ACK" => Some(Self::OperatorChallengeAck),
999 "ASSERT_TIMEOUT" => Some(Self::AssertTimeout),
1000 "UNSPENT_KICKOFF" => Some(Self::UnspentKickoff),
1001 "MINI_ASSERT" => Some(Self::MiniAssert),
1002 "WATCHTOWER_CHALLENGE_TIMEOUT" => Some(Self::WatchtowerChallengeTimeout),
1003 _ => None,
1004 }
1005 }
1006}
1007#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1008#[repr(i32)]
1009pub enum EntityType {
1010 EntityUnknown = 0,
1011 Operator = 1,
1012 Verifier = 2,
1013 Aggregator = 3,
1014}
1015impl EntityType {
1016 pub fn as_str_name(&self) -> &'static str {
1021 match self {
1022 Self::EntityUnknown => "ENTITY_UNKNOWN",
1023 Self::Operator => "OPERATOR",
1024 Self::Verifier => "VERIFIER",
1025 Self::Aggregator => "AGGREGATOR",
1026 }
1027 }
1028 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1030 match value {
1031 "ENTITY_UNKNOWN" => Some(Self::EntityUnknown),
1032 "OPERATOR" => Some(Self::Operator),
1033 "VERIFIER" => Some(Self::Verifier),
1034 "AGGREGATOR" => Some(Self::Aggregator),
1035 _ => None,
1036 }
1037 }
1038}
1039pub mod clementine_operator_client {
1041 #![allow(
1042 unused_variables,
1043 dead_code,
1044 missing_docs,
1045 clippy::wildcard_imports,
1046 clippy::let_unit_value,
1047 )]
1048 use tonic::codegen::*;
1049 use tonic::codegen::http::Uri;
1050 #[derive(Debug, Clone)]
1055 pub struct ClementineOperatorClient<T> {
1056 inner: tonic::client::Grpc<T>,
1057 }
1058 impl ClementineOperatorClient<tonic::transport::Channel> {
1059 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1061 where
1062 D: TryInto<tonic::transport::Endpoint>,
1063 D::Error: Into<StdError>,
1064 {
1065 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1066 Ok(Self::new(conn))
1067 }
1068 }
1069 impl<T> ClementineOperatorClient<T>
1070 where
1071 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1072 T::Error: Into<StdError>,
1073 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1074 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1075 {
1076 pub fn new(inner: T) -> Self {
1077 let inner = tonic::client::Grpc::new(inner);
1078 Self { inner }
1079 }
1080 pub fn with_origin(inner: T, origin: Uri) -> Self {
1081 let inner = tonic::client::Grpc::with_origin(inner, origin);
1082 Self { inner }
1083 }
1084 pub fn with_interceptor<F>(
1085 inner: T,
1086 interceptor: F,
1087 ) -> ClementineOperatorClient<InterceptedService<T, F>>
1088 where
1089 F: tonic::service::Interceptor,
1090 T::ResponseBody: Default,
1091 T: tonic::codegen::Service<
1092 http::Request<tonic::body::BoxBody>,
1093 Response = http::Response<
1094 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1095 >,
1096 >,
1097 <T as tonic::codegen::Service<
1098 http::Request<tonic::body::BoxBody>,
1099 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1100 {
1101 ClementineOperatorClient::new(InterceptedService::new(inner, interceptor))
1102 }
1103 #[must_use]
1108 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1109 self.inner = self.inner.send_compressed(encoding);
1110 self
1111 }
1112 #[must_use]
1114 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1115 self.inner = self.inner.accept_compressed(encoding);
1116 self
1117 }
1118 #[must_use]
1122 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1123 self.inner = self.inner.max_decoding_message_size(limit);
1124 self
1125 }
1126 #[must_use]
1130 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1131 self.inner = self.inner.max_encoding_message_size(limit);
1132 self
1133 }
1134 pub async fn get_x_only_public_key(
1138 &mut self,
1139 request: impl tonic::IntoRequest<super::Empty>,
1140 ) -> std::result::Result<
1141 tonic::Response<super::XOnlyPublicKeyRpc>,
1142 tonic::Status,
1143 > {
1144 self.inner
1145 .ready()
1146 .await
1147 .map_err(|e| {
1148 tonic::Status::unknown(
1149 format!("Service was not ready: {}", e.into()),
1150 )
1151 })?;
1152 let codec = tonic::codec::ProstCodec::default();
1153 let path = http::uri::PathAndQuery::from_static(
1154 "/clementine.ClementineOperator/GetXOnlyPublicKey",
1155 );
1156 let mut req = request.into_request();
1157 req.extensions_mut()
1158 .insert(
1159 GrpcMethod::new("clementine.ClementineOperator", "GetXOnlyPublicKey"),
1160 );
1161 self.inner.unary(req, path, codec).await
1162 }
1163 pub async fn get_compatibility_params(
1166 &mut self,
1167 request: impl tonic::IntoRequest<super::Empty>,
1168 ) -> std::result::Result<
1169 tonic::Response<super::CompatibilityParamsRpc>,
1170 tonic::Status,
1171 > {
1172 self.inner
1173 .ready()
1174 .await
1175 .map_err(|e| {
1176 tonic::Status::unknown(
1177 format!("Service was not ready: {}", e.into()),
1178 )
1179 })?;
1180 let codec = tonic::codec::ProstCodec::default();
1181 let path = http::uri::PathAndQuery::from_static(
1182 "/clementine.ClementineOperator/GetCompatibilityParams",
1183 );
1184 let mut req = request.into_request();
1185 req.extensions_mut()
1186 .insert(
1187 GrpcMethod::new(
1188 "clementine.ClementineOperator",
1189 "GetCompatibilityParams",
1190 ),
1191 );
1192 self.inner.unary(req, path, codec).await
1193 }
1194 pub async fn get_params(
1204 &mut self,
1205 request: impl tonic::IntoRequest<super::Empty>,
1206 ) -> std::result::Result<
1207 tonic::Response<tonic::codec::Streaming<super::OperatorParams>>,
1208 tonic::Status,
1209 > {
1210 self.inner
1211 .ready()
1212 .await
1213 .map_err(|e| {
1214 tonic::Status::unknown(
1215 format!("Service was not ready: {}", e.into()),
1216 )
1217 })?;
1218 let codec = tonic::codec::ProstCodec::default();
1219 let path = http::uri::PathAndQuery::from_static(
1220 "/clementine.ClementineOperator/GetParams",
1221 );
1222 let mut req = request.into_request();
1223 req.extensions_mut()
1224 .insert(GrpcMethod::new("clementine.ClementineOperator", "GetParams"));
1225 self.inner.server_streaming(req, path, codec).await
1226 }
1227 pub async fn get_deposit_keys(
1233 &mut self,
1234 request: impl tonic::IntoRequest<super::DepositParams>,
1235 ) -> std::result::Result<tonic::Response<super::OperatorKeys>, tonic::Status> {
1236 self.inner
1237 .ready()
1238 .await
1239 .map_err(|e| {
1240 tonic::Status::unknown(
1241 format!("Service was not ready: {}", e.into()),
1242 )
1243 })?;
1244 let codec = tonic::codec::ProstCodec::default();
1245 let path = http::uri::PathAndQuery::from_static(
1246 "/clementine.ClementineOperator/GetDepositKeys",
1247 );
1248 let mut req = request.into_request();
1249 req.extensions_mut()
1250 .insert(
1251 GrpcMethod::new("clementine.ClementineOperator", "GetDepositKeys"),
1252 );
1253 self.inner.unary(req, path, codec).await
1254 }
1255 pub async fn get_current_status(
1258 &mut self,
1259 request: impl tonic::IntoRequest<super::Empty>,
1260 ) -> std::result::Result<tonic::Response<super::EntityStatus>, tonic::Status> {
1261 self.inner
1262 .ready()
1263 .await
1264 .map_err(|e| {
1265 tonic::Status::unknown(
1266 format!("Service was not ready: {}", e.into()),
1267 )
1268 })?;
1269 let codec = tonic::codec::ProstCodec::default();
1270 let path = http::uri::PathAndQuery::from_static(
1271 "/clementine.ClementineOperator/GetCurrentStatus",
1272 );
1273 let mut req = request.into_request();
1274 req.extensions_mut()
1275 .insert(
1276 GrpcMethod::new("clementine.ClementineOperator", "GetCurrentStatus"),
1277 );
1278 self.inner.unary(req, path, codec).await
1279 }
1280 pub async fn transfer_to_btc_wallet(
1290 &mut self,
1291 request: impl tonic::IntoRequest<super::Outpoints>,
1292 ) -> std::result::Result<tonic::Response<super::RawSignedTx>, tonic::Status> {
1293 self.inner
1294 .ready()
1295 .await
1296 .map_err(|e| {
1297 tonic::Status::unknown(
1298 format!("Service was not ready: {}", e.into()),
1299 )
1300 })?;
1301 let codec = tonic::codec::ProstCodec::default();
1302 let path = http::uri::PathAndQuery::from_static(
1303 "/clementine.ClementineOperator/TransferToBtcWallet",
1304 );
1305 let mut req = request.into_request();
1306 req.extensions_mut()
1307 .insert(
1308 GrpcMethod::new(
1309 "clementine.ClementineOperator",
1310 "TransferToBtcWallet",
1311 ),
1312 );
1313 self.inner.unary(req, path, codec).await
1314 }
1315 pub async fn deposit_sign(
1326 &mut self,
1327 request: impl tonic::IntoRequest<super::DepositSignSession>,
1328 ) -> std::result::Result<
1329 tonic::Response<tonic::codec::Streaming<super::SchnorrSig>>,
1330 tonic::Status,
1331 > {
1332 self.inner
1333 .ready()
1334 .await
1335 .map_err(|e| {
1336 tonic::Status::unknown(
1337 format!("Service was not ready: {}", e.into()),
1338 )
1339 })?;
1340 let codec = tonic::codec::ProstCodec::default();
1341 let path = http::uri::PathAndQuery::from_static(
1342 "/clementine.ClementineOperator/DepositSign",
1343 );
1344 let mut req = request.into_request();
1345 req.extensions_mut()
1346 .insert(GrpcMethod::new("clementine.ClementineOperator", "DepositSign"));
1347 self.inner.server_streaming(req, path, codec).await
1348 }
1349 pub async fn restart_background_tasks(
1351 &mut self,
1352 request: impl tonic::IntoRequest<super::Empty>,
1353 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
1354 self.inner
1355 .ready()
1356 .await
1357 .map_err(|e| {
1358 tonic::Status::unknown(
1359 format!("Service was not ready: {}", e.into()),
1360 )
1361 })?;
1362 let codec = tonic::codec::ProstCodec::default();
1363 let path = http::uri::PathAndQuery::from_static(
1364 "/clementine.ClementineOperator/RestartBackgroundTasks",
1365 );
1366 let mut req = request.into_request();
1367 req.extensions_mut()
1368 .insert(
1369 GrpcMethod::new(
1370 "clementine.ClementineOperator",
1371 "RestartBackgroundTasks",
1372 ),
1373 );
1374 self.inner.unary(req, path, codec).await
1375 }
1376 pub async fn internal_withdraw(
1383 &mut self,
1384 request: impl tonic::IntoRequest<super::WithdrawParams>,
1385 ) -> std::result::Result<tonic::Response<super::RawSignedTx>, tonic::Status> {
1386 self.inner
1387 .ready()
1388 .await
1389 .map_err(|e| {
1390 tonic::Status::unknown(
1391 format!("Service was not ready: {}", e.into()),
1392 )
1393 })?;
1394 let codec = tonic::codec::ProstCodec::default();
1395 let path = http::uri::PathAndQuery::from_static(
1396 "/clementine.ClementineOperator/InternalWithdraw",
1397 );
1398 let mut req = request.into_request();
1399 req.extensions_mut()
1400 .insert(
1401 GrpcMethod::new("clementine.ClementineOperator", "InternalWithdraw"),
1402 );
1403 self.inner.unary(req, path, codec).await
1404 }
1405 pub async fn withdraw(
1413 &mut self,
1414 request: impl tonic::IntoRequest<super::WithdrawParamsWithSig>,
1415 ) -> std::result::Result<tonic::Response<super::RawSignedTx>, tonic::Status> {
1416 self.inner
1417 .ready()
1418 .await
1419 .map_err(|e| {
1420 tonic::Status::unknown(
1421 format!("Service was not ready: {}", e.into()),
1422 )
1423 })?;
1424 let codec = tonic::codec::ProstCodec::default();
1425 let path = http::uri::PathAndQuery::from_static(
1426 "/clementine.ClementineOperator/Withdraw",
1427 );
1428 let mut req = request.into_request();
1429 req.extensions_mut()
1430 .insert(GrpcMethod::new("clementine.ClementineOperator", "Withdraw"));
1431 self.inner.unary(req, path, codec).await
1432 }
1433 pub async fn get_reimbursement_txs(
1444 &mut self,
1445 request: impl tonic::IntoRequest<super::Outpoint>,
1446 ) -> std::result::Result<
1447 tonic::Response<super::SignedTxsWithType>,
1448 tonic::Status,
1449 > {
1450 self.inner
1451 .ready()
1452 .await
1453 .map_err(|e| {
1454 tonic::Status::unknown(
1455 format!("Service was not ready: {}", e.into()),
1456 )
1457 })?;
1458 let codec = tonic::codec::ProstCodec::default();
1459 let path = http::uri::PathAndQuery::from_static(
1460 "/clementine.ClementineOperator/GetReimbursementTxs",
1461 );
1462 let mut req = request.into_request();
1463 req.extensions_mut()
1464 .insert(
1465 GrpcMethod::new(
1466 "clementine.ClementineOperator",
1467 "GetReimbursementTxs",
1468 ),
1469 );
1470 self.inner.unary(req, path, codec).await
1471 }
1472 pub async fn internal_create_signed_txs(
1489 &mut self,
1490 request: impl tonic::IntoRequest<super::TransactionRequest>,
1491 ) -> std::result::Result<
1492 tonic::Response<super::SignedTxsWithType>,
1493 tonic::Status,
1494 > {
1495 self.inner
1496 .ready()
1497 .await
1498 .map_err(|e| {
1499 tonic::Status::unknown(
1500 format!("Service was not ready: {}", e.into()),
1501 )
1502 })?;
1503 let codec = tonic::codec::ProstCodec::default();
1504 let path = http::uri::PathAndQuery::from_static(
1505 "/clementine.ClementineOperator/InternalCreateSignedTxs",
1506 );
1507 let mut req = request.into_request();
1508 req.extensions_mut()
1509 .insert(
1510 GrpcMethod::new(
1511 "clementine.ClementineOperator",
1512 "InternalCreateSignedTxs",
1513 ),
1514 );
1515 self.inner.unary(req, path, codec).await
1516 }
1517 pub async fn internal_create_assert_commitment_txs(
1526 &mut self,
1527 request: impl tonic::IntoRequest<super::TransactionRequest>,
1528 ) -> std::result::Result<
1529 tonic::Response<super::SignedTxsWithType>,
1530 tonic::Status,
1531 > {
1532 self.inner
1533 .ready()
1534 .await
1535 .map_err(|e| {
1536 tonic::Status::unknown(
1537 format!("Service was not ready: {}", e.into()),
1538 )
1539 })?;
1540 let codec = tonic::codec::ProstCodec::default();
1541 let path = http::uri::PathAndQuery::from_static(
1542 "/clementine.ClementineOperator/InternalCreateAssertCommitmentTxs",
1543 );
1544 let mut req = request.into_request();
1545 req.extensions_mut()
1546 .insert(
1547 GrpcMethod::new(
1548 "clementine.ClementineOperator",
1549 "InternalCreateAssertCommitmentTxs",
1550 ),
1551 );
1552 self.inner.unary(req, path, codec).await
1553 }
1554 pub async fn internal_finalized_payout(
1555 &mut self,
1556 request: impl tonic::IntoRequest<super::FinalizedPayoutParams>,
1557 ) -> std::result::Result<tonic::Response<super::Txid>, tonic::Status> {
1558 self.inner
1559 .ready()
1560 .await
1561 .map_err(|e| {
1562 tonic::Status::unknown(
1563 format!("Service was not ready: {}", e.into()),
1564 )
1565 })?;
1566 let codec = tonic::codec::ProstCodec::default();
1567 let path = http::uri::PathAndQuery::from_static(
1568 "/clementine.ClementineOperator/InternalFinalizedPayout",
1569 );
1570 let mut req = request.into_request();
1571 req.extensions_mut()
1572 .insert(
1573 GrpcMethod::new(
1574 "clementine.ClementineOperator",
1575 "InternalFinalizedPayout",
1576 ),
1577 );
1578 self.inner.unary(req, path, codec).await
1579 }
1580 pub async fn internal_end_round(
1581 &mut self,
1582 request: impl tonic::IntoRequest<super::Empty>,
1583 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
1584 self.inner
1585 .ready()
1586 .await
1587 .map_err(|e| {
1588 tonic::Status::unknown(
1589 format!("Service was not ready: {}", e.into()),
1590 )
1591 })?;
1592 let codec = tonic::codec::ProstCodec::default();
1593 let path = http::uri::PathAndQuery::from_static(
1594 "/clementine.ClementineOperator/InternalEndRound",
1595 );
1596 let mut req = request.into_request();
1597 req.extensions_mut()
1598 .insert(
1599 GrpcMethod::new("clementine.ClementineOperator", "InternalEndRound"),
1600 );
1601 self.inner.unary(req, path, codec).await
1602 }
1603 pub async fn vergen(
1604 &mut self,
1605 request: impl tonic::IntoRequest<super::Empty>,
1606 ) -> std::result::Result<tonic::Response<super::VergenResponse>, tonic::Status> {
1607 self.inner
1608 .ready()
1609 .await
1610 .map_err(|e| {
1611 tonic::Status::unknown(
1612 format!("Service was not ready: {}", e.into()),
1613 )
1614 })?;
1615 let codec = tonic::codec::ProstCodec::default();
1616 let path = http::uri::PathAndQuery::from_static(
1617 "/clementine.ClementineOperator/Vergen",
1618 );
1619 let mut req = request.into_request();
1620 req.extensions_mut()
1621 .insert(GrpcMethod::new("clementine.ClementineOperator", "Vergen"));
1622 self.inner.unary(req, path, codec).await
1623 }
1624 }
1625}
1626pub mod clementine_verifier_client {
1628 #![allow(
1629 unused_variables,
1630 dead_code,
1631 missing_docs,
1632 clippy::wildcard_imports,
1633 clippy::let_unit_value,
1634 )]
1635 use tonic::codegen::*;
1636 use tonic::codegen::http::Uri;
1637 #[derive(Debug, Clone)]
1638 pub struct ClementineVerifierClient<T> {
1639 inner: tonic::client::Grpc<T>,
1640 }
1641 impl ClementineVerifierClient<tonic::transport::Channel> {
1642 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1644 where
1645 D: TryInto<tonic::transport::Endpoint>,
1646 D::Error: Into<StdError>,
1647 {
1648 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1649 Ok(Self::new(conn))
1650 }
1651 }
1652 impl<T> ClementineVerifierClient<T>
1653 where
1654 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1655 T::Error: Into<StdError>,
1656 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1657 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1658 {
1659 pub fn new(inner: T) -> Self {
1660 let inner = tonic::client::Grpc::new(inner);
1661 Self { inner }
1662 }
1663 pub fn with_origin(inner: T, origin: Uri) -> Self {
1664 let inner = tonic::client::Grpc::with_origin(inner, origin);
1665 Self { inner }
1666 }
1667 pub fn with_interceptor<F>(
1668 inner: T,
1669 interceptor: F,
1670 ) -> ClementineVerifierClient<InterceptedService<T, F>>
1671 where
1672 F: tonic::service::Interceptor,
1673 T::ResponseBody: Default,
1674 T: tonic::codegen::Service<
1675 http::Request<tonic::body::BoxBody>,
1676 Response = http::Response<
1677 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1678 >,
1679 >,
1680 <T as tonic::codegen::Service<
1681 http::Request<tonic::body::BoxBody>,
1682 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1683 {
1684 ClementineVerifierClient::new(InterceptedService::new(inner, interceptor))
1685 }
1686 #[must_use]
1691 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1692 self.inner = self.inner.send_compressed(encoding);
1693 self
1694 }
1695 #[must_use]
1697 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1698 self.inner = self.inner.accept_compressed(encoding);
1699 self
1700 }
1701 #[must_use]
1705 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1706 self.inner = self.inner.max_decoding_message_size(limit);
1707 self
1708 }
1709 #[must_use]
1713 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1714 self.inner = self.inner.max_encoding_message_size(limit);
1715 self
1716 }
1717 pub async fn get_params(
1722 &mut self,
1723 request: impl tonic::IntoRequest<super::Empty>,
1724 ) -> std::result::Result<tonic::Response<super::VerifierParams>, tonic::Status> {
1725 self.inner
1726 .ready()
1727 .await
1728 .map_err(|e| {
1729 tonic::Status::unknown(
1730 format!("Service was not ready: {}", e.into()),
1731 )
1732 })?;
1733 let codec = tonic::codec::ProstCodec::default();
1734 let path = http::uri::PathAndQuery::from_static(
1735 "/clementine.ClementineVerifier/GetParams",
1736 );
1737 let mut req = request.into_request();
1738 req.extensions_mut()
1739 .insert(GrpcMethod::new("clementine.ClementineVerifier", "GetParams"));
1740 self.inner.unary(req, path, codec).await
1741 }
1742 pub async fn get_compatibility_params(
1745 &mut self,
1746 request: impl tonic::IntoRequest<super::Empty>,
1747 ) -> std::result::Result<
1748 tonic::Response<super::CompatibilityParamsRpc>,
1749 tonic::Status,
1750 > {
1751 self.inner
1752 .ready()
1753 .await
1754 .map_err(|e| {
1755 tonic::Status::unknown(
1756 format!("Service was not ready: {}", e.into()),
1757 )
1758 })?;
1759 let codec = tonic::codec::ProstCodec::default();
1760 let path = http::uri::PathAndQuery::from_static(
1761 "/clementine.ClementineVerifier/GetCompatibilityParams",
1762 );
1763 let mut req = request.into_request();
1764 req.extensions_mut()
1765 .insert(
1766 GrpcMethod::new(
1767 "clementine.ClementineVerifier",
1768 "GetCompatibilityParams",
1769 ),
1770 );
1771 self.inner.unary(req, path, codec).await
1772 }
1773 pub async fn set_operator(
1778 &mut self,
1779 request: impl tonic::IntoStreamingRequest<Message = super::OperatorParams>,
1780 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
1781 self.inner
1782 .ready()
1783 .await
1784 .map_err(|e| {
1785 tonic::Status::unknown(
1786 format!("Service was not ready: {}", e.into()),
1787 )
1788 })?;
1789 let codec = tonic::codec::ProstCodec::default();
1790 let path = http::uri::PathAndQuery::from_static(
1791 "/clementine.ClementineVerifier/SetOperator",
1792 );
1793 let mut req = request.into_streaming_request();
1794 req.extensions_mut()
1795 .insert(GrpcMethod::new("clementine.ClementineVerifier", "SetOperator"));
1796 self.inner.client_streaming(req, path, codec).await
1797 }
1798 pub async fn set_operator_keys(
1804 &mut self,
1805 request: impl tonic::IntoRequest<super::OperatorKeysWithDeposit>,
1806 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
1807 self.inner
1808 .ready()
1809 .await
1810 .map_err(|e| {
1811 tonic::Status::unknown(
1812 format!("Service was not ready: {}", e.into()),
1813 )
1814 })?;
1815 let codec = tonic::codec::ProstCodec::default();
1816 let path = http::uri::PathAndQuery::from_static(
1817 "/clementine.ClementineVerifier/SetOperatorKeys",
1818 );
1819 let mut req = request.into_request();
1820 req.extensions_mut()
1821 .insert(
1822 GrpcMethod::new("clementine.ClementineVerifier", "SetOperatorKeys"),
1823 );
1824 self.inner.unary(req, path, codec).await
1825 }
1826 pub async fn nonce_gen(
1834 &mut self,
1835 request: impl tonic::IntoRequest<super::NonceGenRequest>,
1836 ) -> std::result::Result<
1837 tonic::Response<tonic::codec::Streaming<super::NonceGenResponse>>,
1838 tonic::Status,
1839 > {
1840 self.inner
1841 .ready()
1842 .await
1843 .map_err(|e| {
1844 tonic::Status::unknown(
1845 format!("Service was not ready: {}", e.into()),
1846 )
1847 })?;
1848 let codec = tonic::codec::ProstCodec::default();
1849 let path = http::uri::PathAndQuery::from_static(
1850 "/clementine.ClementineVerifier/NonceGen",
1851 );
1852 let mut req = request.into_request();
1853 req.extensions_mut()
1854 .insert(GrpcMethod::new("clementine.ClementineVerifier", "NonceGen"));
1855 self.inner.server_streaming(req, path, codec).await
1856 }
1857 pub async fn deposit_sign(
1862 &mut self,
1863 request: impl tonic::IntoStreamingRequest<
1864 Message = super::VerifierDepositSignParams,
1865 >,
1866 ) -> std::result::Result<
1867 tonic::Response<tonic::codec::Streaming<super::PartialSig>>,
1868 tonic::Status,
1869 > {
1870 self.inner
1871 .ready()
1872 .await
1873 .map_err(|e| {
1874 tonic::Status::unknown(
1875 format!("Service was not ready: {}", e.into()),
1876 )
1877 })?;
1878 let codec = tonic::codec::ProstCodec::default();
1879 let path = http::uri::PathAndQuery::from_static(
1880 "/clementine.ClementineVerifier/DepositSign",
1881 );
1882 let mut req = request.into_streaming_request();
1883 req.extensions_mut()
1884 .insert(GrpcMethod::new("clementine.ClementineVerifier", "DepositSign"));
1885 self.inner.streaming(req, path, codec).await
1886 }
1887 pub async fn optimistic_payout_sign(
1889 &mut self,
1890 request: impl tonic::IntoRequest<super::OptimisticPayoutParams>,
1891 ) -> std::result::Result<tonic::Response<super::PartialSig>, tonic::Status> {
1892 self.inner
1893 .ready()
1894 .await
1895 .map_err(|e| {
1896 tonic::Status::unknown(
1897 format!("Service was not ready: {}", e.into()),
1898 )
1899 })?;
1900 let codec = tonic::codec::ProstCodec::default();
1901 let path = http::uri::PathAndQuery::from_static(
1902 "/clementine.ClementineVerifier/OptimisticPayoutSign",
1903 );
1904 let mut req = request.into_request();
1905 req.extensions_mut()
1906 .insert(
1907 GrpcMethod::new(
1908 "clementine.ClementineVerifier",
1909 "OptimisticPayoutSign",
1910 ),
1911 );
1912 self.inner.unary(req, path, codec).await
1913 }
1914 pub async fn deposit_finalize(
1918 &mut self,
1919 request: impl tonic::IntoStreamingRequest<
1920 Message = super::VerifierDepositFinalizeParams,
1921 >,
1922 ) -> std::result::Result<
1923 tonic::Response<super::VerifierDepositFinalizeResponse>,
1924 tonic::Status,
1925 > {
1926 self.inner
1927 .ready()
1928 .await
1929 .map_err(|e| {
1930 tonic::Status::unknown(
1931 format!("Service was not ready: {}", e.into()),
1932 )
1933 })?;
1934 let codec = tonic::codec::ProstCodec::default();
1935 let path = http::uri::PathAndQuery::from_static(
1936 "/clementine.ClementineVerifier/DepositFinalize",
1937 );
1938 let mut req = request.into_streaming_request();
1939 req.extensions_mut()
1940 .insert(
1941 GrpcMethod::new("clementine.ClementineVerifier", "DepositFinalize"),
1942 );
1943 self.inner.client_streaming(req, path, codec).await
1944 }
1945 pub async fn debug_tx(
1947 &mut self,
1948 request: impl tonic::IntoRequest<super::TxDebugRequest>,
1949 ) -> std::result::Result<tonic::Response<super::TxDebugInfo>, tonic::Status> {
1950 self.inner
1951 .ready()
1952 .await
1953 .map_err(|e| {
1954 tonic::Status::unknown(
1955 format!("Service was not ready: {}", e.into()),
1956 )
1957 })?;
1958 let codec = tonic::codec::ProstCodec::default();
1959 let path = http::uri::PathAndQuery::from_static(
1960 "/clementine.ClementineVerifier/DebugTx",
1961 );
1962 let mut req = request.into_request();
1963 req.extensions_mut()
1964 .insert(GrpcMethod::new("clementine.ClementineVerifier", "DebugTx"));
1965 self.inner.unary(req, path, codec).await
1966 }
1967 pub async fn restart_background_tasks(
1969 &mut self,
1970 request: impl tonic::IntoRequest<super::Empty>,
1971 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
1972 self.inner
1973 .ready()
1974 .await
1975 .map_err(|e| {
1976 tonic::Status::unknown(
1977 format!("Service was not ready: {}", e.into()),
1978 )
1979 })?;
1980 let codec = tonic::codec::ProstCodec::default();
1981 let path = http::uri::PathAndQuery::from_static(
1982 "/clementine.ClementineVerifier/RestartBackgroundTasks",
1983 );
1984 let mut req = request.into_request();
1985 req.extensions_mut()
1986 .insert(
1987 GrpcMethod::new(
1988 "clementine.ClementineVerifier",
1989 "RestartBackgroundTasks",
1990 ),
1991 );
1992 self.inner.unary(req, path, codec).await
1993 }
1994 pub async fn internal_handle_kickoff(
1997 &mut self,
1998 request: impl tonic::IntoRequest<super::Txid>,
1999 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
2000 self.inner
2001 .ready()
2002 .await
2003 .map_err(|e| {
2004 tonic::Status::unknown(
2005 format!("Service was not ready: {}", e.into()),
2006 )
2007 })?;
2008 let codec = tonic::codec::ProstCodec::default();
2009 let path = http::uri::PathAndQuery::from_static(
2010 "/clementine.ClementineVerifier/InternalHandleKickoff",
2011 );
2012 let mut req = request.into_request();
2013 req.extensions_mut()
2014 .insert(
2015 GrpcMethod::new(
2016 "clementine.ClementineVerifier",
2017 "InternalHandleKickoff",
2018 ),
2019 );
2020 self.inner.unary(req, path, codec).await
2021 }
2022 pub async fn get_current_status(
2025 &mut self,
2026 request: impl tonic::IntoRequest<super::Empty>,
2027 ) -> std::result::Result<tonic::Response<super::EntityStatus>, tonic::Status> {
2028 self.inner
2029 .ready()
2030 .await
2031 .map_err(|e| {
2032 tonic::Status::unknown(
2033 format!("Service was not ready: {}", e.into()),
2034 )
2035 })?;
2036 let codec = tonic::codec::ProstCodec::default();
2037 let path = http::uri::PathAndQuery::from_static(
2038 "/clementine.ClementineVerifier/GetCurrentStatus",
2039 );
2040 let mut req = request.into_request();
2041 req.extensions_mut()
2042 .insert(
2043 GrpcMethod::new("clementine.ClementineVerifier", "GetCurrentStatus"),
2044 );
2045 self.inner.unary(req, path, codec).await
2046 }
2047 pub async fn internal_create_signed_txs(
2063 &mut self,
2064 request: impl tonic::IntoRequest<super::TransactionRequest>,
2065 ) -> std::result::Result<
2066 tonic::Response<super::SignedTxsWithType>,
2067 tonic::Status,
2068 > {
2069 self.inner
2070 .ready()
2071 .await
2072 .map_err(|e| {
2073 tonic::Status::unknown(
2074 format!("Service was not ready: {}", e.into()),
2075 )
2076 })?;
2077 let codec = tonic::codec::ProstCodec::default();
2078 let path = http::uri::PathAndQuery::from_static(
2079 "/clementine.ClementineVerifier/InternalCreateSignedTxs",
2080 );
2081 let mut req = request.into_request();
2082 req.extensions_mut()
2083 .insert(
2084 GrpcMethod::new(
2085 "clementine.ClementineVerifier",
2086 "InternalCreateSignedTxs",
2087 ),
2088 );
2089 self.inner.unary(req, path, codec).await
2090 }
2091 pub async fn internal_create_watchtower_challenge(
2094 &mut self,
2095 request: impl tonic::IntoRequest<super::TransactionRequest>,
2096 ) -> std::result::Result<
2097 tonic::Response<super::RawTxWithRbfInfo>,
2098 tonic::Status,
2099 > {
2100 self.inner
2101 .ready()
2102 .await
2103 .map_err(|e| {
2104 tonic::Status::unknown(
2105 format!("Service was not ready: {}", e.into()),
2106 )
2107 })?;
2108 let codec = tonic::codec::ProstCodec::default();
2109 let path = http::uri::PathAndQuery::from_static(
2110 "/clementine.ClementineVerifier/InternalCreateWatchtowerChallenge",
2111 );
2112 let mut req = request.into_request();
2113 req.extensions_mut()
2114 .insert(
2115 GrpcMethod::new(
2116 "clementine.ClementineVerifier",
2117 "InternalCreateWatchtowerChallenge",
2118 ),
2119 );
2120 self.inner.unary(req, path, codec).await
2121 }
2122 pub async fn vergen(
2123 &mut self,
2124 request: impl tonic::IntoRequest<super::Empty>,
2125 ) -> std::result::Result<tonic::Response<super::VergenResponse>, tonic::Status> {
2126 self.inner
2127 .ready()
2128 .await
2129 .map_err(|e| {
2130 tonic::Status::unknown(
2131 format!("Service was not ready: {}", e.into()),
2132 )
2133 })?;
2134 let codec = tonic::codec::ProstCodec::default();
2135 let path = http::uri::PathAndQuery::from_static(
2136 "/clementine.ClementineVerifier/Vergen",
2137 );
2138 let mut req = request.into_request();
2139 req.extensions_mut()
2140 .insert(GrpcMethod::new("clementine.ClementineVerifier", "Vergen"));
2141 self.inner.unary(req, path, codec).await
2142 }
2143 }
2144}
2145pub mod clementine_aggregator_client {
2147 #![allow(
2148 unused_variables,
2149 dead_code,
2150 missing_docs,
2151 clippy::wildcard_imports,
2152 clippy::let_unit_value,
2153 )]
2154 use tonic::codegen::*;
2155 use tonic::codegen::http::Uri;
2156 #[derive(Debug, Clone)]
2157 pub struct ClementineAggregatorClient<T> {
2158 inner: tonic::client::Grpc<T>,
2159 }
2160 impl ClementineAggregatorClient<tonic::transport::Channel> {
2161 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2163 where
2164 D: TryInto<tonic::transport::Endpoint>,
2165 D::Error: Into<StdError>,
2166 {
2167 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2168 Ok(Self::new(conn))
2169 }
2170 }
2171 impl<T> ClementineAggregatorClient<T>
2172 where
2173 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2174 T::Error: Into<StdError>,
2175 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2176 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2177 {
2178 pub fn new(inner: T) -> Self {
2179 let inner = tonic::client::Grpc::new(inner);
2180 Self { inner }
2181 }
2182 pub fn with_origin(inner: T, origin: Uri) -> Self {
2183 let inner = tonic::client::Grpc::with_origin(inner, origin);
2184 Self { inner }
2185 }
2186 pub fn with_interceptor<F>(
2187 inner: T,
2188 interceptor: F,
2189 ) -> ClementineAggregatorClient<InterceptedService<T, F>>
2190 where
2191 F: tonic::service::Interceptor,
2192 T::ResponseBody: Default,
2193 T: tonic::codegen::Service<
2194 http::Request<tonic::body::BoxBody>,
2195 Response = http::Response<
2196 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2197 >,
2198 >,
2199 <T as tonic::codegen::Service<
2200 http::Request<tonic::body::BoxBody>,
2201 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2202 {
2203 ClementineAggregatorClient::new(InterceptedService::new(inner, interceptor))
2204 }
2205 #[must_use]
2210 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2211 self.inner = self.inner.send_compressed(encoding);
2212 self
2213 }
2214 #[must_use]
2216 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2217 self.inner = self.inner.accept_compressed(encoding);
2218 self
2219 }
2220 #[must_use]
2224 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2225 self.inner = self.inner.max_decoding_message_size(limit);
2226 self
2227 }
2228 #[must_use]
2232 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2233 self.inner = self.inner.max_encoding_message_size(limit);
2234 self
2235 }
2236 pub async fn get_nofn_aggregated_xonly_pk(
2237 &mut self,
2238 request: impl tonic::IntoRequest<super::Empty>,
2239 ) -> std::result::Result<tonic::Response<super::NofnResponse>, tonic::Status> {
2240 self.inner
2241 .ready()
2242 .await
2243 .map_err(|e| {
2244 tonic::Status::unknown(
2245 format!("Service was not ready: {}", e.into()),
2246 )
2247 })?;
2248 let codec = tonic::codec::ProstCodec::default();
2249 let path = http::uri::PathAndQuery::from_static(
2250 "/clementine.ClementineAggregator/GetNofnAggregatedXonlyPk",
2251 );
2252 let mut req = request.into_request();
2253 req.extensions_mut()
2254 .insert(
2255 GrpcMethod::new(
2256 "clementine.ClementineAggregator",
2257 "GetNofnAggregatedXonlyPk",
2258 ),
2259 );
2260 self.inner.unary(req, path, codec).await
2261 }
2262 pub async fn get_compatibility_data_from_entities(
2264 &mut self,
2265 request: impl tonic::IntoRequest<super::Empty>,
2266 ) -> std::result::Result<
2267 tonic::Response<super::EntitiesCompatibilityData>,
2268 tonic::Status,
2269 > {
2270 self.inner
2271 .ready()
2272 .await
2273 .map_err(|e| {
2274 tonic::Status::unknown(
2275 format!("Service was not ready: {}", e.into()),
2276 )
2277 })?;
2278 let codec = tonic::codec::ProstCodec::default();
2279 let path = http::uri::PathAndQuery::from_static(
2280 "/clementine.ClementineAggregator/GetCompatibilityDataFromEntities",
2281 );
2282 let mut req = request.into_request();
2283 req.extensions_mut()
2284 .insert(
2285 GrpcMethod::new(
2286 "clementine.ClementineAggregator",
2287 "GetCompatibilityDataFromEntities",
2288 ),
2289 );
2290 self.inner.unary(req, path, codec).await
2291 }
2292 pub async fn get_compatibility_params(
2295 &mut self,
2296 request: impl tonic::IntoRequest<super::Empty>,
2297 ) -> std::result::Result<
2298 tonic::Response<super::CompatibilityParamsRpc>,
2299 tonic::Status,
2300 > {
2301 self.inner
2302 .ready()
2303 .await
2304 .map_err(|e| {
2305 tonic::Status::unknown(
2306 format!("Service was not ready: {}", e.into()),
2307 )
2308 })?;
2309 let codec = tonic::codec::ProstCodec::default();
2310 let path = http::uri::PathAndQuery::from_static(
2311 "/clementine.ClementineAggregator/GetCompatibilityParams",
2312 );
2313 let mut req = request.into_request();
2314 req.extensions_mut()
2315 .insert(
2316 GrpcMethod::new(
2317 "clementine.ClementineAggregator",
2318 "GetCompatibilityParams",
2319 ),
2320 );
2321 self.inner.unary(req, path, codec).await
2322 }
2323 pub async fn setup(
2332 &mut self,
2333 request: impl tonic::IntoRequest<super::Empty>,
2334 ) -> std::result::Result<
2335 tonic::Response<super::VerifierPublicKeys>,
2336 tonic::Status,
2337 > {
2338 self.inner
2339 .ready()
2340 .await
2341 .map_err(|e| {
2342 tonic::Status::unknown(
2343 format!("Service was not ready: {}", e.into()),
2344 )
2345 })?;
2346 let codec = tonic::codec::ProstCodec::default();
2347 let path = http::uri::PathAndQuery::from_static(
2348 "/clementine.ClementineAggregator/Setup",
2349 );
2350 let mut req = request.into_request();
2351 req.extensions_mut()
2352 .insert(GrpcMethod::new("clementine.ClementineAggregator", "Setup"));
2353 self.inner.unary(req, path, codec).await
2354 }
2355 pub async fn new_deposit(
2364 &mut self,
2365 request: impl tonic::IntoRequest<super::Deposit>,
2366 ) -> std::result::Result<tonic::Response<super::RawSignedTx>, tonic::Status> {
2367 self.inner
2368 .ready()
2369 .await
2370 .map_err(|e| {
2371 tonic::Status::unknown(
2372 format!("Service was not ready: {}", e.into()),
2373 )
2374 })?;
2375 let codec = tonic::codec::ProstCodec::default();
2376 let path = http::uri::PathAndQuery::from_static(
2377 "/clementine.ClementineAggregator/NewDeposit",
2378 );
2379 let mut req = request.into_request();
2380 req.extensions_mut()
2381 .insert(
2382 GrpcMethod::new("clementine.ClementineAggregator", "NewDeposit"),
2383 );
2384 self.inner.unary(req, path, codec).await
2385 }
2386 pub async fn withdraw(
2392 &mut self,
2393 request: impl tonic::IntoRequest<super::AggregatorWithdrawalInput>,
2394 ) -> std::result::Result<
2395 tonic::Response<super::AggregatorWithdrawResponse>,
2396 tonic::Status,
2397 > {
2398 self.inner
2399 .ready()
2400 .await
2401 .map_err(|e| {
2402 tonic::Status::unknown(
2403 format!("Service was not ready: {}", e.into()),
2404 )
2405 })?;
2406 let codec = tonic::codec::ProstCodec::default();
2407 let path = http::uri::PathAndQuery::from_static(
2408 "/clementine.ClementineAggregator/Withdraw",
2409 );
2410 let mut req = request.into_request();
2411 req.extensions_mut()
2412 .insert(GrpcMethod::new("clementine.ClementineAggregator", "Withdraw"));
2413 self.inner.unary(req, path, codec).await
2414 }
2415 pub async fn optimistic_payout(
2417 &mut self,
2418 request: impl tonic::IntoRequest<super::OptimisticWithdrawParams>,
2419 ) -> std::result::Result<tonic::Response<super::RawSignedTx>, tonic::Status> {
2420 self.inner
2421 .ready()
2422 .await
2423 .map_err(|e| {
2424 tonic::Status::unknown(
2425 format!("Service was not ready: {}", e.into()),
2426 )
2427 })?;
2428 let codec = tonic::codec::ProstCodec::default();
2429 let path = http::uri::PathAndQuery::from_static(
2430 "/clementine.ClementineAggregator/OptimisticPayout",
2431 );
2432 let mut req = request.into_request();
2433 req.extensions_mut()
2434 .insert(
2435 GrpcMethod::new(
2436 "clementine.ClementineAggregator",
2437 "OptimisticPayout",
2438 ),
2439 );
2440 self.inner.unary(req, path, codec).await
2441 }
2442 pub async fn internal_send_tx(
2444 &mut self,
2445 request: impl tonic::IntoRequest<super::SendTxRequest>,
2446 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status> {
2447 self.inner
2448 .ready()
2449 .await
2450 .map_err(|e| {
2451 tonic::Status::unknown(
2452 format!("Service was not ready: {}", e.into()),
2453 )
2454 })?;
2455 let codec = tonic::codec::ProstCodec::default();
2456 let path = http::uri::PathAndQuery::from_static(
2457 "/clementine.ClementineAggregator/InternalSendTx",
2458 );
2459 let mut req = request.into_request();
2460 req.extensions_mut()
2461 .insert(
2462 GrpcMethod::new("clementine.ClementineAggregator", "InternalSendTx"),
2463 );
2464 self.inner.unary(req, path, codec).await
2465 }
2466 pub async fn send_move_to_vault_tx(
2467 &mut self,
2468 request: impl tonic::IntoRequest<super::SendMoveTxRequest>,
2469 ) -> std::result::Result<tonic::Response<super::Txid>, tonic::Status> {
2470 self.inner
2471 .ready()
2472 .await
2473 .map_err(|e| {
2474 tonic::Status::unknown(
2475 format!("Service was not ready: {}", e.into()),
2476 )
2477 })?;
2478 let codec = tonic::codec::ProstCodec::default();
2479 let path = http::uri::PathAndQuery::from_static(
2480 "/clementine.ClementineAggregator/SendMoveToVaultTx",
2481 );
2482 let mut req = request.into_request();
2483 req.extensions_mut()
2484 .insert(
2485 GrpcMethod::new(
2486 "clementine.ClementineAggregator",
2487 "SendMoveToVaultTx",
2488 ),
2489 );
2490 self.inner.unary(req, path, codec).await
2491 }
2492 pub async fn get_entity_statuses(
2496 &mut self,
2497 request: impl tonic::IntoRequest<super::GetEntityStatusesRequest>,
2498 ) -> std::result::Result<tonic::Response<super::EntityStatuses>, tonic::Status> {
2499 self.inner
2500 .ready()
2501 .await
2502 .map_err(|e| {
2503 tonic::Status::unknown(
2504 format!("Service was not ready: {}", e.into()),
2505 )
2506 })?;
2507 let codec = tonic::codec::ProstCodec::default();
2508 let path = http::uri::PathAndQuery::from_static(
2509 "/clementine.ClementineAggregator/GetEntityStatuses",
2510 );
2511 let mut req = request.into_request();
2512 req.extensions_mut()
2513 .insert(
2514 GrpcMethod::new(
2515 "clementine.ClementineAggregator",
2516 "GetEntityStatuses",
2517 ),
2518 );
2519 self.inner.unary(req, path, codec).await
2520 }
2521 pub async fn internal_get_emergency_stop_tx(
2525 &mut self,
2526 request: impl tonic::IntoRequest<super::GetEmergencyStopTxRequest>,
2527 ) -> std::result::Result<
2528 tonic::Response<super::GetEmergencyStopTxResponse>,
2529 tonic::Status,
2530 > {
2531 self.inner
2532 .ready()
2533 .await
2534 .map_err(|e| {
2535 tonic::Status::unknown(
2536 format!("Service was not ready: {}", e.into()),
2537 )
2538 })?;
2539 let codec = tonic::codec::ProstCodec::default();
2540 let path = http::uri::PathAndQuery::from_static(
2541 "/clementine.ClementineAggregator/InternalGetEmergencyStopTx",
2542 );
2543 let mut req = request.into_request();
2544 req.extensions_mut()
2545 .insert(
2546 GrpcMethod::new(
2547 "clementine.ClementineAggregator",
2548 "InternalGetEmergencyStopTx",
2549 ),
2550 );
2551 self.inner.unary(req, path, codec).await
2552 }
2553 pub async fn vergen(
2554 &mut self,
2555 request: impl tonic::IntoRequest<super::Empty>,
2556 ) -> std::result::Result<tonic::Response<super::VergenResponse>, tonic::Status> {
2557 self.inner
2558 .ready()
2559 .await
2560 .map_err(|e| {
2561 tonic::Status::unknown(
2562 format!("Service was not ready: {}", e.into()),
2563 )
2564 })?;
2565 let codec = tonic::codec::ProstCodec::default();
2566 let path = http::uri::PathAndQuery::from_static(
2567 "/clementine.ClementineAggregator/Vergen",
2568 );
2569 let mut req = request.into_request();
2570 req.extensions_mut()
2571 .insert(GrpcMethod::new("clementine.ClementineAggregator", "Vergen"));
2572 self.inner.unary(req, path, codec).await
2573 }
2574 }
2575}
2576pub mod clementine_operator_server {
2578 #![allow(
2579 unused_variables,
2580 dead_code,
2581 missing_docs,
2582 clippy::wildcard_imports,
2583 clippy::let_unit_value,
2584 )]
2585 use tonic::codegen::*;
2586 #[async_trait]
2588 pub trait ClementineOperator: std::marker::Send + std::marker::Sync + 'static {
2589 async fn get_x_only_public_key(
2593 &self,
2594 request: tonic::Request<super::Empty>,
2595 ) -> std::result::Result<
2596 tonic::Response<super::XOnlyPublicKeyRpc>,
2597 tonic::Status,
2598 >;
2599 async fn get_compatibility_params(
2602 &self,
2603 request: tonic::Request<super::Empty>,
2604 ) -> std::result::Result<
2605 tonic::Response<super::CompatibilityParamsRpc>,
2606 tonic::Status,
2607 >;
2608 type GetParamsStream: tonic::codegen::tokio_stream::Stream<
2610 Item = std::result::Result<super::OperatorParams, tonic::Status>,
2611 >
2612 + std::marker::Send
2613 + 'static;
2614 async fn get_params(
2624 &self,
2625 request: tonic::Request<super::Empty>,
2626 ) -> std::result::Result<tonic::Response<Self::GetParamsStream>, tonic::Status>;
2627 async fn get_deposit_keys(
2633 &self,
2634 request: tonic::Request<super::DepositParams>,
2635 ) -> std::result::Result<tonic::Response<super::OperatorKeys>, tonic::Status>;
2636 async fn get_current_status(
2639 &self,
2640 request: tonic::Request<super::Empty>,
2641 ) -> std::result::Result<tonic::Response<super::EntityStatus>, tonic::Status>;
2642 async fn transfer_to_btc_wallet(
2652 &self,
2653 request: tonic::Request<super::Outpoints>,
2654 ) -> std::result::Result<tonic::Response<super::RawSignedTx>, tonic::Status>;
2655 type DepositSignStream: tonic::codegen::tokio_stream::Stream<
2657 Item = std::result::Result<super::SchnorrSig, tonic::Status>,
2658 >
2659 + std::marker::Send
2660 + 'static;
2661 async fn deposit_sign(
2672 &self,
2673 request: tonic::Request<super::DepositSignSession>,
2674 ) -> std::result::Result<
2675 tonic::Response<Self::DepositSignStream>,
2676 tonic::Status,
2677 >;
2678 async fn restart_background_tasks(
2680 &self,
2681 request: tonic::Request<super::Empty>,
2682 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
2683 async fn internal_withdraw(
2690 &self,
2691 request: tonic::Request<super::WithdrawParams>,
2692 ) -> std::result::Result<tonic::Response<super::RawSignedTx>, tonic::Status>;
2693 async fn withdraw(
2701 &self,
2702 request: tonic::Request<super::WithdrawParamsWithSig>,
2703 ) -> std::result::Result<tonic::Response<super::RawSignedTx>, tonic::Status>;
2704 async fn get_reimbursement_txs(
2715 &self,
2716 request: tonic::Request<super::Outpoint>,
2717 ) -> std::result::Result<
2718 tonic::Response<super::SignedTxsWithType>,
2719 tonic::Status,
2720 >;
2721 async fn internal_create_signed_txs(
2738 &self,
2739 request: tonic::Request<super::TransactionRequest>,
2740 ) -> std::result::Result<
2741 tonic::Response<super::SignedTxsWithType>,
2742 tonic::Status,
2743 >;
2744 async fn internal_create_assert_commitment_txs(
2753 &self,
2754 request: tonic::Request<super::TransactionRequest>,
2755 ) -> std::result::Result<
2756 tonic::Response<super::SignedTxsWithType>,
2757 tonic::Status,
2758 >;
2759 async fn internal_finalized_payout(
2760 &self,
2761 request: tonic::Request<super::FinalizedPayoutParams>,
2762 ) -> std::result::Result<tonic::Response<super::Txid>, tonic::Status>;
2763 async fn internal_end_round(
2764 &self,
2765 request: tonic::Request<super::Empty>,
2766 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
2767 async fn vergen(
2768 &self,
2769 request: tonic::Request<super::Empty>,
2770 ) -> std::result::Result<tonic::Response<super::VergenResponse>, tonic::Status>;
2771 }
2772 #[derive(Debug)]
2777 pub struct ClementineOperatorServer<T> {
2778 inner: Arc<T>,
2779 accept_compression_encodings: EnabledCompressionEncodings,
2780 send_compression_encodings: EnabledCompressionEncodings,
2781 max_decoding_message_size: Option<usize>,
2782 max_encoding_message_size: Option<usize>,
2783 }
2784 impl<T> ClementineOperatorServer<T> {
2785 pub fn new(inner: T) -> Self {
2786 Self::from_arc(Arc::new(inner))
2787 }
2788 pub fn from_arc(inner: Arc<T>) -> Self {
2789 Self {
2790 inner,
2791 accept_compression_encodings: Default::default(),
2792 send_compression_encodings: Default::default(),
2793 max_decoding_message_size: None,
2794 max_encoding_message_size: None,
2795 }
2796 }
2797 pub fn with_interceptor<F>(
2798 inner: T,
2799 interceptor: F,
2800 ) -> InterceptedService<Self, F>
2801 where
2802 F: tonic::service::Interceptor,
2803 {
2804 InterceptedService::new(Self::new(inner), interceptor)
2805 }
2806 #[must_use]
2808 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2809 self.accept_compression_encodings.enable(encoding);
2810 self
2811 }
2812 #[must_use]
2814 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2815 self.send_compression_encodings.enable(encoding);
2816 self
2817 }
2818 #[must_use]
2822 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2823 self.max_decoding_message_size = Some(limit);
2824 self
2825 }
2826 #[must_use]
2830 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2831 self.max_encoding_message_size = Some(limit);
2832 self
2833 }
2834 }
2835 impl<T, B> tonic::codegen::Service<http::Request<B>> for ClementineOperatorServer<T>
2836 where
2837 T: ClementineOperator,
2838 B: Body + std::marker::Send + 'static,
2839 B::Error: Into<StdError> + std::marker::Send + 'static,
2840 {
2841 type Response = http::Response<tonic::body::BoxBody>;
2842 type Error = std::convert::Infallible;
2843 type Future = BoxFuture<Self::Response, Self::Error>;
2844 fn poll_ready(
2845 &mut self,
2846 _cx: &mut Context<'_>,
2847 ) -> Poll<std::result::Result<(), Self::Error>> {
2848 Poll::Ready(Ok(()))
2849 }
2850 fn call(&mut self, req: http::Request<B>) -> Self::Future {
2851 match req.uri().path() {
2852 "/clementine.ClementineOperator/GetXOnlyPublicKey" => {
2853 #[allow(non_camel_case_types)]
2854 struct GetXOnlyPublicKeySvc<T: ClementineOperator>(pub Arc<T>);
2855 impl<T: ClementineOperator> tonic::server::UnaryService<super::Empty>
2856 for GetXOnlyPublicKeySvc<T> {
2857 type Response = super::XOnlyPublicKeyRpc;
2858 type Future = BoxFuture<
2859 tonic::Response<Self::Response>,
2860 tonic::Status,
2861 >;
2862 fn call(
2863 &mut self,
2864 request: tonic::Request<super::Empty>,
2865 ) -> Self::Future {
2866 let inner = Arc::clone(&self.0);
2867 let fut = async move {
2868 <T as ClementineOperator>::get_x_only_public_key(
2869 &inner,
2870 request,
2871 )
2872 .await
2873 };
2874 Box::pin(fut)
2875 }
2876 }
2877 let accept_compression_encodings = self.accept_compression_encodings;
2878 let send_compression_encodings = self.send_compression_encodings;
2879 let max_decoding_message_size = self.max_decoding_message_size;
2880 let max_encoding_message_size = self.max_encoding_message_size;
2881 let inner = self.inner.clone();
2882 let fut = async move {
2883 let method = GetXOnlyPublicKeySvc(inner);
2884 let codec = tonic::codec::ProstCodec::default();
2885 let mut grpc = tonic::server::Grpc::new(codec)
2886 .apply_compression_config(
2887 accept_compression_encodings,
2888 send_compression_encodings,
2889 )
2890 .apply_max_message_size_config(
2891 max_decoding_message_size,
2892 max_encoding_message_size,
2893 );
2894 let res = grpc.unary(method, req).await;
2895 Ok(res)
2896 };
2897 Box::pin(fut)
2898 }
2899 "/clementine.ClementineOperator/GetCompatibilityParams" => {
2900 #[allow(non_camel_case_types)]
2901 struct GetCompatibilityParamsSvc<T: ClementineOperator>(pub Arc<T>);
2902 impl<T: ClementineOperator> tonic::server::UnaryService<super::Empty>
2903 for GetCompatibilityParamsSvc<T> {
2904 type Response = super::CompatibilityParamsRpc;
2905 type Future = BoxFuture<
2906 tonic::Response<Self::Response>,
2907 tonic::Status,
2908 >;
2909 fn call(
2910 &mut self,
2911 request: tonic::Request<super::Empty>,
2912 ) -> Self::Future {
2913 let inner = Arc::clone(&self.0);
2914 let fut = async move {
2915 <T as ClementineOperator>::get_compatibility_params(
2916 &inner,
2917 request,
2918 )
2919 .await
2920 };
2921 Box::pin(fut)
2922 }
2923 }
2924 let accept_compression_encodings = self.accept_compression_encodings;
2925 let send_compression_encodings = self.send_compression_encodings;
2926 let max_decoding_message_size = self.max_decoding_message_size;
2927 let max_encoding_message_size = self.max_encoding_message_size;
2928 let inner = self.inner.clone();
2929 let fut = async move {
2930 let method = GetCompatibilityParamsSvc(inner);
2931 let codec = tonic::codec::ProstCodec::default();
2932 let mut grpc = tonic::server::Grpc::new(codec)
2933 .apply_compression_config(
2934 accept_compression_encodings,
2935 send_compression_encodings,
2936 )
2937 .apply_max_message_size_config(
2938 max_decoding_message_size,
2939 max_encoding_message_size,
2940 );
2941 let res = grpc.unary(method, req).await;
2942 Ok(res)
2943 };
2944 Box::pin(fut)
2945 }
2946 "/clementine.ClementineOperator/GetParams" => {
2947 #[allow(non_camel_case_types)]
2948 struct GetParamsSvc<T: ClementineOperator>(pub Arc<T>);
2949 impl<
2950 T: ClementineOperator,
2951 > tonic::server::ServerStreamingService<super::Empty>
2952 for GetParamsSvc<T> {
2953 type Response = super::OperatorParams;
2954 type ResponseStream = T::GetParamsStream;
2955 type Future = BoxFuture<
2956 tonic::Response<Self::ResponseStream>,
2957 tonic::Status,
2958 >;
2959 fn call(
2960 &mut self,
2961 request: tonic::Request<super::Empty>,
2962 ) -> Self::Future {
2963 let inner = Arc::clone(&self.0);
2964 let fut = async move {
2965 <T as ClementineOperator>::get_params(&inner, request).await
2966 };
2967 Box::pin(fut)
2968 }
2969 }
2970 let accept_compression_encodings = self.accept_compression_encodings;
2971 let send_compression_encodings = self.send_compression_encodings;
2972 let max_decoding_message_size = self.max_decoding_message_size;
2973 let max_encoding_message_size = self.max_encoding_message_size;
2974 let inner = self.inner.clone();
2975 let fut = async move {
2976 let method = GetParamsSvc(inner);
2977 let codec = tonic::codec::ProstCodec::default();
2978 let mut grpc = tonic::server::Grpc::new(codec)
2979 .apply_compression_config(
2980 accept_compression_encodings,
2981 send_compression_encodings,
2982 )
2983 .apply_max_message_size_config(
2984 max_decoding_message_size,
2985 max_encoding_message_size,
2986 );
2987 let res = grpc.server_streaming(method, req).await;
2988 Ok(res)
2989 };
2990 Box::pin(fut)
2991 }
2992 "/clementine.ClementineOperator/GetDepositKeys" => {
2993 #[allow(non_camel_case_types)]
2994 struct GetDepositKeysSvc<T: ClementineOperator>(pub Arc<T>);
2995 impl<
2996 T: ClementineOperator,
2997 > tonic::server::UnaryService<super::DepositParams>
2998 for GetDepositKeysSvc<T> {
2999 type Response = super::OperatorKeys;
3000 type Future = BoxFuture<
3001 tonic::Response<Self::Response>,
3002 tonic::Status,
3003 >;
3004 fn call(
3005 &mut self,
3006 request: tonic::Request<super::DepositParams>,
3007 ) -> Self::Future {
3008 let inner = Arc::clone(&self.0);
3009 let fut = async move {
3010 <T as ClementineOperator>::get_deposit_keys(&inner, request)
3011 .await
3012 };
3013 Box::pin(fut)
3014 }
3015 }
3016 let accept_compression_encodings = self.accept_compression_encodings;
3017 let send_compression_encodings = self.send_compression_encodings;
3018 let max_decoding_message_size = self.max_decoding_message_size;
3019 let max_encoding_message_size = self.max_encoding_message_size;
3020 let inner = self.inner.clone();
3021 let fut = async move {
3022 let method = GetDepositKeysSvc(inner);
3023 let codec = tonic::codec::ProstCodec::default();
3024 let mut grpc = tonic::server::Grpc::new(codec)
3025 .apply_compression_config(
3026 accept_compression_encodings,
3027 send_compression_encodings,
3028 )
3029 .apply_max_message_size_config(
3030 max_decoding_message_size,
3031 max_encoding_message_size,
3032 );
3033 let res = grpc.unary(method, req).await;
3034 Ok(res)
3035 };
3036 Box::pin(fut)
3037 }
3038 "/clementine.ClementineOperator/GetCurrentStatus" => {
3039 #[allow(non_camel_case_types)]
3040 struct GetCurrentStatusSvc<T: ClementineOperator>(pub Arc<T>);
3041 impl<T: ClementineOperator> tonic::server::UnaryService<super::Empty>
3042 for GetCurrentStatusSvc<T> {
3043 type Response = super::EntityStatus;
3044 type Future = BoxFuture<
3045 tonic::Response<Self::Response>,
3046 tonic::Status,
3047 >;
3048 fn call(
3049 &mut self,
3050 request: tonic::Request<super::Empty>,
3051 ) -> Self::Future {
3052 let inner = Arc::clone(&self.0);
3053 let fut = async move {
3054 <T as ClementineOperator>::get_current_status(
3055 &inner,
3056 request,
3057 )
3058 .await
3059 };
3060 Box::pin(fut)
3061 }
3062 }
3063 let accept_compression_encodings = self.accept_compression_encodings;
3064 let send_compression_encodings = self.send_compression_encodings;
3065 let max_decoding_message_size = self.max_decoding_message_size;
3066 let max_encoding_message_size = self.max_encoding_message_size;
3067 let inner = self.inner.clone();
3068 let fut = async move {
3069 let method = GetCurrentStatusSvc(inner);
3070 let codec = tonic::codec::ProstCodec::default();
3071 let mut grpc = tonic::server::Grpc::new(codec)
3072 .apply_compression_config(
3073 accept_compression_encodings,
3074 send_compression_encodings,
3075 )
3076 .apply_max_message_size_config(
3077 max_decoding_message_size,
3078 max_encoding_message_size,
3079 );
3080 let res = grpc.unary(method, req).await;
3081 Ok(res)
3082 };
3083 Box::pin(fut)
3084 }
3085 "/clementine.ClementineOperator/TransferToBtcWallet" => {
3086 #[allow(non_camel_case_types)]
3087 struct TransferToBtcWalletSvc<T: ClementineOperator>(pub Arc<T>);
3088 impl<
3089 T: ClementineOperator,
3090 > tonic::server::UnaryService<super::Outpoints>
3091 for TransferToBtcWalletSvc<T> {
3092 type Response = super::RawSignedTx;
3093 type Future = BoxFuture<
3094 tonic::Response<Self::Response>,
3095 tonic::Status,
3096 >;
3097 fn call(
3098 &mut self,
3099 request: tonic::Request<super::Outpoints>,
3100 ) -> Self::Future {
3101 let inner = Arc::clone(&self.0);
3102 let fut = async move {
3103 <T as ClementineOperator>::transfer_to_btc_wallet(
3104 &inner,
3105 request,
3106 )
3107 .await
3108 };
3109 Box::pin(fut)
3110 }
3111 }
3112 let accept_compression_encodings = self.accept_compression_encodings;
3113 let send_compression_encodings = self.send_compression_encodings;
3114 let max_decoding_message_size = self.max_decoding_message_size;
3115 let max_encoding_message_size = self.max_encoding_message_size;
3116 let inner = self.inner.clone();
3117 let fut = async move {
3118 let method = TransferToBtcWalletSvc(inner);
3119 let codec = tonic::codec::ProstCodec::default();
3120 let mut grpc = tonic::server::Grpc::new(codec)
3121 .apply_compression_config(
3122 accept_compression_encodings,
3123 send_compression_encodings,
3124 )
3125 .apply_max_message_size_config(
3126 max_decoding_message_size,
3127 max_encoding_message_size,
3128 );
3129 let res = grpc.unary(method, req).await;
3130 Ok(res)
3131 };
3132 Box::pin(fut)
3133 }
3134 "/clementine.ClementineOperator/DepositSign" => {
3135 #[allow(non_camel_case_types)]
3136 struct DepositSignSvc<T: ClementineOperator>(pub Arc<T>);
3137 impl<
3138 T: ClementineOperator,
3139 > tonic::server::ServerStreamingService<super::DepositSignSession>
3140 for DepositSignSvc<T> {
3141 type Response = super::SchnorrSig;
3142 type ResponseStream = T::DepositSignStream;
3143 type Future = BoxFuture<
3144 tonic::Response<Self::ResponseStream>,
3145 tonic::Status,
3146 >;
3147 fn call(
3148 &mut self,
3149 request: tonic::Request<super::DepositSignSession>,
3150 ) -> Self::Future {
3151 let inner = Arc::clone(&self.0);
3152 let fut = async move {
3153 <T as ClementineOperator>::deposit_sign(&inner, request)
3154 .await
3155 };
3156 Box::pin(fut)
3157 }
3158 }
3159 let accept_compression_encodings = self.accept_compression_encodings;
3160 let send_compression_encodings = self.send_compression_encodings;
3161 let max_decoding_message_size = self.max_decoding_message_size;
3162 let max_encoding_message_size = self.max_encoding_message_size;
3163 let inner = self.inner.clone();
3164 let fut = async move {
3165 let method = DepositSignSvc(inner);
3166 let codec = tonic::codec::ProstCodec::default();
3167 let mut grpc = tonic::server::Grpc::new(codec)
3168 .apply_compression_config(
3169 accept_compression_encodings,
3170 send_compression_encodings,
3171 )
3172 .apply_max_message_size_config(
3173 max_decoding_message_size,
3174 max_encoding_message_size,
3175 );
3176 let res = grpc.server_streaming(method, req).await;
3177 Ok(res)
3178 };
3179 Box::pin(fut)
3180 }
3181 "/clementine.ClementineOperator/RestartBackgroundTasks" => {
3182 #[allow(non_camel_case_types)]
3183 struct RestartBackgroundTasksSvc<T: ClementineOperator>(pub Arc<T>);
3184 impl<T: ClementineOperator> tonic::server::UnaryService<super::Empty>
3185 for RestartBackgroundTasksSvc<T> {
3186 type Response = super::Empty;
3187 type Future = BoxFuture<
3188 tonic::Response<Self::Response>,
3189 tonic::Status,
3190 >;
3191 fn call(
3192 &mut self,
3193 request: tonic::Request<super::Empty>,
3194 ) -> Self::Future {
3195 let inner = Arc::clone(&self.0);
3196 let fut = async move {
3197 <T as ClementineOperator>::restart_background_tasks(
3198 &inner,
3199 request,
3200 )
3201 .await
3202 };
3203 Box::pin(fut)
3204 }
3205 }
3206 let accept_compression_encodings = self.accept_compression_encodings;
3207 let send_compression_encodings = self.send_compression_encodings;
3208 let max_decoding_message_size = self.max_decoding_message_size;
3209 let max_encoding_message_size = self.max_encoding_message_size;
3210 let inner = self.inner.clone();
3211 let fut = async move {
3212 let method = RestartBackgroundTasksSvc(inner);
3213 let codec = tonic::codec::ProstCodec::default();
3214 let mut grpc = tonic::server::Grpc::new(codec)
3215 .apply_compression_config(
3216 accept_compression_encodings,
3217 send_compression_encodings,
3218 )
3219 .apply_max_message_size_config(
3220 max_decoding_message_size,
3221 max_encoding_message_size,
3222 );
3223 let res = grpc.unary(method, req).await;
3224 Ok(res)
3225 };
3226 Box::pin(fut)
3227 }
3228 "/clementine.ClementineOperator/InternalWithdraw" => {
3229 #[allow(non_camel_case_types)]
3230 struct InternalWithdrawSvc<T: ClementineOperator>(pub Arc<T>);
3231 impl<
3232 T: ClementineOperator,
3233 > tonic::server::UnaryService<super::WithdrawParams>
3234 for InternalWithdrawSvc<T> {
3235 type Response = super::RawSignedTx;
3236 type Future = BoxFuture<
3237 tonic::Response<Self::Response>,
3238 tonic::Status,
3239 >;
3240 fn call(
3241 &mut self,
3242 request: tonic::Request<super::WithdrawParams>,
3243 ) -> Self::Future {
3244 let inner = Arc::clone(&self.0);
3245 let fut = async move {
3246 <T as ClementineOperator>::internal_withdraw(
3247 &inner,
3248 request,
3249 )
3250 .await
3251 };
3252 Box::pin(fut)
3253 }
3254 }
3255 let accept_compression_encodings = self.accept_compression_encodings;
3256 let send_compression_encodings = self.send_compression_encodings;
3257 let max_decoding_message_size = self.max_decoding_message_size;
3258 let max_encoding_message_size = self.max_encoding_message_size;
3259 let inner = self.inner.clone();
3260 let fut = async move {
3261 let method = InternalWithdrawSvc(inner);
3262 let codec = tonic::codec::ProstCodec::default();
3263 let mut grpc = tonic::server::Grpc::new(codec)
3264 .apply_compression_config(
3265 accept_compression_encodings,
3266 send_compression_encodings,
3267 )
3268 .apply_max_message_size_config(
3269 max_decoding_message_size,
3270 max_encoding_message_size,
3271 );
3272 let res = grpc.unary(method, req).await;
3273 Ok(res)
3274 };
3275 Box::pin(fut)
3276 }
3277 "/clementine.ClementineOperator/Withdraw" => {
3278 #[allow(non_camel_case_types)]
3279 struct WithdrawSvc<T: ClementineOperator>(pub Arc<T>);
3280 impl<
3281 T: ClementineOperator,
3282 > tonic::server::UnaryService<super::WithdrawParamsWithSig>
3283 for WithdrawSvc<T> {
3284 type Response = super::RawSignedTx;
3285 type Future = BoxFuture<
3286 tonic::Response<Self::Response>,
3287 tonic::Status,
3288 >;
3289 fn call(
3290 &mut self,
3291 request: tonic::Request<super::WithdrawParamsWithSig>,
3292 ) -> Self::Future {
3293 let inner = Arc::clone(&self.0);
3294 let fut = async move {
3295 <T as ClementineOperator>::withdraw(&inner, request).await
3296 };
3297 Box::pin(fut)
3298 }
3299 }
3300 let accept_compression_encodings = self.accept_compression_encodings;
3301 let send_compression_encodings = self.send_compression_encodings;
3302 let max_decoding_message_size = self.max_decoding_message_size;
3303 let max_encoding_message_size = self.max_encoding_message_size;
3304 let inner = self.inner.clone();
3305 let fut = async move {
3306 let method = WithdrawSvc(inner);
3307 let codec = tonic::codec::ProstCodec::default();
3308 let mut grpc = tonic::server::Grpc::new(codec)
3309 .apply_compression_config(
3310 accept_compression_encodings,
3311 send_compression_encodings,
3312 )
3313 .apply_max_message_size_config(
3314 max_decoding_message_size,
3315 max_encoding_message_size,
3316 );
3317 let res = grpc.unary(method, req).await;
3318 Ok(res)
3319 };
3320 Box::pin(fut)
3321 }
3322 "/clementine.ClementineOperator/GetReimbursementTxs" => {
3323 #[allow(non_camel_case_types)]
3324 struct GetReimbursementTxsSvc<T: ClementineOperator>(pub Arc<T>);
3325 impl<
3326 T: ClementineOperator,
3327 > tonic::server::UnaryService<super::Outpoint>
3328 for GetReimbursementTxsSvc<T> {
3329 type Response = super::SignedTxsWithType;
3330 type Future = BoxFuture<
3331 tonic::Response<Self::Response>,
3332 tonic::Status,
3333 >;
3334 fn call(
3335 &mut self,
3336 request: tonic::Request<super::Outpoint>,
3337 ) -> Self::Future {
3338 let inner = Arc::clone(&self.0);
3339 let fut = async move {
3340 <T as ClementineOperator>::get_reimbursement_txs(
3341 &inner,
3342 request,
3343 )
3344 .await
3345 };
3346 Box::pin(fut)
3347 }
3348 }
3349 let accept_compression_encodings = self.accept_compression_encodings;
3350 let send_compression_encodings = self.send_compression_encodings;
3351 let max_decoding_message_size = self.max_decoding_message_size;
3352 let max_encoding_message_size = self.max_encoding_message_size;
3353 let inner = self.inner.clone();
3354 let fut = async move {
3355 let method = GetReimbursementTxsSvc(inner);
3356 let codec = tonic::codec::ProstCodec::default();
3357 let mut grpc = tonic::server::Grpc::new(codec)
3358 .apply_compression_config(
3359 accept_compression_encodings,
3360 send_compression_encodings,
3361 )
3362 .apply_max_message_size_config(
3363 max_decoding_message_size,
3364 max_encoding_message_size,
3365 );
3366 let res = grpc.unary(method, req).await;
3367 Ok(res)
3368 };
3369 Box::pin(fut)
3370 }
3371 "/clementine.ClementineOperator/InternalCreateSignedTxs" => {
3372 #[allow(non_camel_case_types)]
3373 struct InternalCreateSignedTxsSvc<T: ClementineOperator>(pub Arc<T>);
3374 impl<
3375 T: ClementineOperator,
3376 > tonic::server::UnaryService<super::TransactionRequest>
3377 for InternalCreateSignedTxsSvc<T> {
3378 type Response = super::SignedTxsWithType;
3379 type Future = BoxFuture<
3380 tonic::Response<Self::Response>,
3381 tonic::Status,
3382 >;
3383 fn call(
3384 &mut self,
3385 request: tonic::Request<super::TransactionRequest>,
3386 ) -> Self::Future {
3387 let inner = Arc::clone(&self.0);
3388 let fut = async move {
3389 <T as ClementineOperator>::internal_create_signed_txs(
3390 &inner,
3391 request,
3392 )
3393 .await
3394 };
3395 Box::pin(fut)
3396 }
3397 }
3398 let accept_compression_encodings = self.accept_compression_encodings;
3399 let send_compression_encodings = self.send_compression_encodings;
3400 let max_decoding_message_size = self.max_decoding_message_size;
3401 let max_encoding_message_size = self.max_encoding_message_size;
3402 let inner = self.inner.clone();
3403 let fut = async move {
3404 let method = InternalCreateSignedTxsSvc(inner);
3405 let codec = tonic::codec::ProstCodec::default();
3406 let mut grpc = tonic::server::Grpc::new(codec)
3407 .apply_compression_config(
3408 accept_compression_encodings,
3409 send_compression_encodings,
3410 )
3411 .apply_max_message_size_config(
3412 max_decoding_message_size,
3413 max_encoding_message_size,
3414 );
3415 let res = grpc.unary(method, req).await;
3416 Ok(res)
3417 };
3418 Box::pin(fut)
3419 }
3420 "/clementine.ClementineOperator/InternalCreateAssertCommitmentTxs" => {
3421 #[allow(non_camel_case_types)]
3422 struct InternalCreateAssertCommitmentTxsSvc<T: ClementineOperator>(
3423 pub Arc<T>,
3424 );
3425 impl<
3426 T: ClementineOperator,
3427 > tonic::server::UnaryService<super::TransactionRequest>
3428 for InternalCreateAssertCommitmentTxsSvc<T> {
3429 type Response = super::SignedTxsWithType;
3430 type Future = BoxFuture<
3431 tonic::Response<Self::Response>,
3432 tonic::Status,
3433 >;
3434 fn call(
3435 &mut self,
3436 request: tonic::Request<super::TransactionRequest>,
3437 ) -> Self::Future {
3438 let inner = Arc::clone(&self.0);
3439 let fut = async move {
3440 <T as ClementineOperator>::internal_create_assert_commitment_txs(
3441 &inner,
3442 request,
3443 )
3444 .await
3445 };
3446 Box::pin(fut)
3447 }
3448 }
3449 let accept_compression_encodings = self.accept_compression_encodings;
3450 let send_compression_encodings = self.send_compression_encodings;
3451 let max_decoding_message_size = self.max_decoding_message_size;
3452 let max_encoding_message_size = self.max_encoding_message_size;
3453 let inner = self.inner.clone();
3454 let fut = async move {
3455 let method = InternalCreateAssertCommitmentTxsSvc(inner);
3456 let codec = tonic::codec::ProstCodec::default();
3457 let mut grpc = tonic::server::Grpc::new(codec)
3458 .apply_compression_config(
3459 accept_compression_encodings,
3460 send_compression_encodings,
3461 )
3462 .apply_max_message_size_config(
3463 max_decoding_message_size,
3464 max_encoding_message_size,
3465 );
3466 let res = grpc.unary(method, req).await;
3467 Ok(res)
3468 };
3469 Box::pin(fut)
3470 }
3471 "/clementine.ClementineOperator/InternalFinalizedPayout" => {
3472 #[allow(non_camel_case_types)]
3473 struct InternalFinalizedPayoutSvc<T: ClementineOperator>(pub Arc<T>);
3474 impl<
3475 T: ClementineOperator,
3476 > tonic::server::UnaryService<super::FinalizedPayoutParams>
3477 for InternalFinalizedPayoutSvc<T> {
3478 type Response = super::Txid;
3479 type Future = BoxFuture<
3480 tonic::Response<Self::Response>,
3481 tonic::Status,
3482 >;
3483 fn call(
3484 &mut self,
3485 request: tonic::Request<super::FinalizedPayoutParams>,
3486 ) -> Self::Future {
3487 let inner = Arc::clone(&self.0);
3488 let fut = async move {
3489 <T as ClementineOperator>::internal_finalized_payout(
3490 &inner,
3491 request,
3492 )
3493 .await
3494 };
3495 Box::pin(fut)
3496 }
3497 }
3498 let accept_compression_encodings = self.accept_compression_encodings;
3499 let send_compression_encodings = self.send_compression_encodings;
3500 let max_decoding_message_size = self.max_decoding_message_size;
3501 let max_encoding_message_size = self.max_encoding_message_size;
3502 let inner = self.inner.clone();
3503 let fut = async move {
3504 let method = InternalFinalizedPayoutSvc(inner);
3505 let codec = tonic::codec::ProstCodec::default();
3506 let mut grpc = tonic::server::Grpc::new(codec)
3507 .apply_compression_config(
3508 accept_compression_encodings,
3509 send_compression_encodings,
3510 )
3511 .apply_max_message_size_config(
3512 max_decoding_message_size,
3513 max_encoding_message_size,
3514 );
3515 let res = grpc.unary(method, req).await;
3516 Ok(res)
3517 };
3518 Box::pin(fut)
3519 }
3520 "/clementine.ClementineOperator/InternalEndRound" => {
3521 #[allow(non_camel_case_types)]
3522 struct InternalEndRoundSvc<T: ClementineOperator>(pub Arc<T>);
3523 impl<T: ClementineOperator> tonic::server::UnaryService<super::Empty>
3524 for InternalEndRoundSvc<T> {
3525 type Response = super::Empty;
3526 type Future = BoxFuture<
3527 tonic::Response<Self::Response>,
3528 tonic::Status,
3529 >;
3530 fn call(
3531 &mut self,
3532 request: tonic::Request<super::Empty>,
3533 ) -> Self::Future {
3534 let inner = Arc::clone(&self.0);
3535 let fut = async move {
3536 <T as ClementineOperator>::internal_end_round(
3537 &inner,
3538 request,
3539 )
3540 .await
3541 };
3542 Box::pin(fut)
3543 }
3544 }
3545 let accept_compression_encodings = self.accept_compression_encodings;
3546 let send_compression_encodings = self.send_compression_encodings;
3547 let max_decoding_message_size = self.max_decoding_message_size;
3548 let max_encoding_message_size = self.max_encoding_message_size;
3549 let inner = self.inner.clone();
3550 let fut = async move {
3551 let method = InternalEndRoundSvc(inner);
3552 let codec = tonic::codec::ProstCodec::default();
3553 let mut grpc = tonic::server::Grpc::new(codec)
3554 .apply_compression_config(
3555 accept_compression_encodings,
3556 send_compression_encodings,
3557 )
3558 .apply_max_message_size_config(
3559 max_decoding_message_size,
3560 max_encoding_message_size,
3561 );
3562 let res = grpc.unary(method, req).await;
3563 Ok(res)
3564 };
3565 Box::pin(fut)
3566 }
3567 "/clementine.ClementineOperator/Vergen" => {
3568 #[allow(non_camel_case_types)]
3569 struct VergenSvc<T: ClementineOperator>(pub Arc<T>);
3570 impl<T: ClementineOperator> tonic::server::UnaryService<super::Empty>
3571 for VergenSvc<T> {
3572 type Response = super::VergenResponse;
3573 type Future = BoxFuture<
3574 tonic::Response<Self::Response>,
3575 tonic::Status,
3576 >;
3577 fn call(
3578 &mut self,
3579 request: tonic::Request<super::Empty>,
3580 ) -> Self::Future {
3581 let inner = Arc::clone(&self.0);
3582 let fut = async move {
3583 <T as ClementineOperator>::vergen(&inner, request).await
3584 };
3585 Box::pin(fut)
3586 }
3587 }
3588 let accept_compression_encodings = self.accept_compression_encodings;
3589 let send_compression_encodings = self.send_compression_encodings;
3590 let max_decoding_message_size = self.max_decoding_message_size;
3591 let max_encoding_message_size = self.max_encoding_message_size;
3592 let inner = self.inner.clone();
3593 let fut = async move {
3594 let method = VergenSvc(inner);
3595 let codec = tonic::codec::ProstCodec::default();
3596 let mut grpc = tonic::server::Grpc::new(codec)
3597 .apply_compression_config(
3598 accept_compression_encodings,
3599 send_compression_encodings,
3600 )
3601 .apply_max_message_size_config(
3602 max_decoding_message_size,
3603 max_encoding_message_size,
3604 );
3605 let res = grpc.unary(method, req).await;
3606 Ok(res)
3607 };
3608 Box::pin(fut)
3609 }
3610 _ => {
3611 Box::pin(async move {
3612 let mut response = http::Response::new(empty_body());
3613 let headers = response.headers_mut();
3614 headers
3615 .insert(
3616 tonic::Status::GRPC_STATUS,
3617 (tonic::Code::Unimplemented as i32).into(),
3618 );
3619 headers
3620 .insert(
3621 http::header::CONTENT_TYPE,
3622 tonic::metadata::GRPC_CONTENT_TYPE,
3623 );
3624 Ok(response)
3625 })
3626 }
3627 }
3628 }
3629 }
3630 impl<T> Clone for ClementineOperatorServer<T> {
3631 fn clone(&self) -> Self {
3632 let inner = self.inner.clone();
3633 Self {
3634 inner,
3635 accept_compression_encodings: self.accept_compression_encodings,
3636 send_compression_encodings: self.send_compression_encodings,
3637 max_decoding_message_size: self.max_decoding_message_size,
3638 max_encoding_message_size: self.max_encoding_message_size,
3639 }
3640 }
3641 }
3642 pub const SERVICE_NAME: &str = "clementine.ClementineOperator";
3644 impl<T> tonic::server::NamedService for ClementineOperatorServer<T> {
3645 const NAME: &'static str = SERVICE_NAME;
3646 }
3647}
3648pub mod clementine_verifier_server {
3650 #![allow(
3651 unused_variables,
3652 dead_code,
3653 missing_docs,
3654 clippy::wildcard_imports,
3655 clippy::let_unit_value,
3656 )]
3657 use tonic::codegen::*;
3658 #[async_trait]
3660 pub trait ClementineVerifier: std::marker::Send + std::marker::Sync + 'static {
3661 async fn get_params(
3666 &self,
3667 request: tonic::Request<super::Empty>,
3668 ) -> std::result::Result<tonic::Response<super::VerifierParams>, tonic::Status>;
3669 async fn get_compatibility_params(
3672 &self,
3673 request: tonic::Request<super::Empty>,
3674 ) -> std::result::Result<
3675 tonic::Response<super::CompatibilityParamsRpc>,
3676 tonic::Status,
3677 >;
3678 async fn set_operator(
3683 &self,
3684 request: tonic::Request<tonic::Streaming<super::OperatorParams>>,
3685 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
3686 async fn set_operator_keys(
3692 &self,
3693 request: tonic::Request<super::OperatorKeysWithDeposit>,
3694 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
3695 type NonceGenStream: tonic::codegen::tokio_stream::Stream<
3697 Item = std::result::Result<super::NonceGenResponse, tonic::Status>,
3698 >
3699 + std::marker::Send
3700 + 'static;
3701 async fn nonce_gen(
3709 &self,
3710 request: tonic::Request<super::NonceGenRequest>,
3711 ) -> std::result::Result<tonic::Response<Self::NonceGenStream>, tonic::Status>;
3712 type DepositSignStream: tonic::codegen::tokio_stream::Stream<
3714 Item = std::result::Result<super::PartialSig, tonic::Status>,
3715 >
3716 + std::marker::Send
3717 + 'static;
3718 async fn deposit_sign(
3723 &self,
3724 request: tonic::Request<tonic::Streaming<super::VerifierDepositSignParams>>,
3725 ) -> std::result::Result<
3726 tonic::Response<Self::DepositSignStream>,
3727 tonic::Status,
3728 >;
3729 async fn optimistic_payout_sign(
3731 &self,
3732 request: tonic::Request<super::OptimisticPayoutParams>,
3733 ) -> std::result::Result<tonic::Response<super::PartialSig>, tonic::Status>;
3734 async fn deposit_finalize(
3738 &self,
3739 request: tonic::Request<
3740 tonic::Streaming<super::VerifierDepositFinalizeParams>,
3741 >,
3742 ) -> std::result::Result<
3743 tonic::Response<super::VerifierDepositFinalizeResponse>,
3744 tonic::Status,
3745 >;
3746 async fn debug_tx(
3748 &self,
3749 request: tonic::Request<super::TxDebugRequest>,
3750 ) -> std::result::Result<tonic::Response<super::TxDebugInfo>, tonic::Status>;
3751 async fn restart_background_tasks(
3753 &self,
3754 request: tonic::Request<super::Empty>,
3755 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
3756 async fn internal_handle_kickoff(
3759 &self,
3760 request: tonic::Request<super::Txid>,
3761 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
3762 async fn get_current_status(
3765 &self,
3766 request: tonic::Request<super::Empty>,
3767 ) -> std::result::Result<tonic::Response<super::EntityStatus>, tonic::Status>;
3768 async fn internal_create_signed_txs(
3784 &self,
3785 request: tonic::Request<super::TransactionRequest>,
3786 ) -> std::result::Result<
3787 tonic::Response<super::SignedTxsWithType>,
3788 tonic::Status,
3789 >;
3790 async fn internal_create_watchtower_challenge(
3793 &self,
3794 request: tonic::Request<super::TransactionRequest>,
3795 ) -> std::result::Result<
3796 tonic::Response<super::RawTxWithRbfInfo>,
3797 tonic::Status,
3798 >;
3799 async fn vergen(
3800 &self,
3801 request: tonic::Request<super::Empty>,
3802 ) -> std::result::Result<tonic::Response<super::VergenResponse>, tonic::Status>;
3803 }
3804 #[derive(Debug)]
3805 pub struct ClementineVerifierServer<T> {
3806 inner: Arc<T>,
3807 accept_compression_encodings: EnabledCompressionEncodings,
3808 send_compression_encodings: EnabledCompressionEncodings,
3809 max_decoding_message_size: Option<usize>,
3810 max_encoding_message_size: Option<usize>,
3811 }
3812 impl<T> ClementineVerifierServer<T> {
3813 pub fn new(inner: T) -> Self {
3814 Self::from_arc(Arc::new(inner))
3815 }
3816 pub fn from_arc(inner: Arc<T>) -> Self {
3817 Self {
3818 inner,
3819 accept_compression_encodings: Default::default(),
3820 send_compression_encodings: Default::default(),
3821 max_decoding_message_size: None,
3822 max_encoding_message_size: None,
3823 }
3824 }
3825 pub fn with_interceptor<F>(
3826 inner: T,
3827 interceptor: F,
3828 ) -> InterceptedService<Self, F>
3829 where
3830 F: tonic::service::Interceptor,
3831 {
3832 InterceptedService::new(Self::new(inner), interceptor)
3833 }
3834 #[must_use]
3836 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3837 self.accept_compression_encodings.enable(encoding);
3838 self
3839 }
3840 #[must_use]
3842 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3843 self.send_compression_encodings.enable(encoding);
3844 self
3845 }
3846 #[must_use]
3850 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3851 self.max_decoding_message_size = Some(limit);
3852 self
3853 }
3854 #[must_use]
3858 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3859 self.max_encoding_message_size = Some(limit);
3860 self
3861 }
3862 }
3863 impl<T, B> tonic::codegen::Service<http::Request<B>> for ClementineVerifierServer<T>
3864 where
3865 T: ClementineVerifier,
3866 B: Body + std::marker::Send + 'static,
3867 B::Error: Into<StdError> + std::marker::Send + 'static,
3868 {
3869 type Response = http::Response<tonic::body::BoxBody>;
3870 type Error = std::convert::Infallible;
3871 type Future = BoxFuture<Self::Response, Self::Error>;
3872 fn poll_ready(
3873 &mut self,
3874 _cx: &mut Context<'_>,
3875 ) -> Poll<std::result::Result<(), Self::Error>> {
3876 Poll::Ready(Ok(()))
3877 }
3878 fn call(&mut self, req: http::Request<B>) -> Self::Future {
3879 match req.uri().path() {
3880 "/clementine.ClementineVerifier/GetParams" => {
3881 #[allow(non_camel_case_types)]
3882 struct GetParamsSvc<T: ClementineVerifier>(pub Arc<T>);
3883 impl<T: ClementineVerifier> tonic::server::UnaryService<super::Empty>
3884 for GetParamsSvc<T> {
3885 type Response = super::VerifierParams;
3886 type Future = BoxFuture<
3887 tonic::Response<Self::Response>,
3888 tonic::Status,
3889 >;
3890 fn call(
3891 &mut self,
3892 request: tonic::Request<super::Empty>,
3893 ) -> Self::Future {
3894 let inner = Arc::clone(&self.0);
3895 let fut = async move {
3896 <T as ClementineVerifier>::get_params(&inner, request).await
3897 };
3898 Box::pin(fut)
3899 }
3900 }
3901 let accept_compression_encodings = self.accept_compression_encodings;
3902 let send_compression_encodings = self.send_compression_encodings;
3903 let max_decoding_message_size = self.max_decoding_message_size;
3904 let max_encoding_message_size = self.max_encoding_message_size;
3905 let inner = self.inner.clone();
3906 let fut = async move {
3907 let method = GetParamsSvc(inner);
3908 let codec = tonic::codec::ProstCodec::default();
3909 let mut grpc = tonic::server::Grpc::new(codec)
3910 .apply_compression_config(
3911 accept_compression_encodings,
3912 send_compression_encodings,
3913 )
3914 .apply_max_message_size_config(
3915 max_decoding_message_size,
3916 max_encoding_message_size,
3917 );
3918 let res = grpc.unary(method, req).await;
3919 Ok(res)
3920 };
3921 Box::pin(fut)
3922 }
3923 "/clementine.ClementineVerifier/GetCompatibilityParams" => {
3924 #[allow(non_camel_case_types)]
3925 struct GetCompatibilityParamsSvc<T: ClementineVerifier>(pub Arc<T>);
3926 impl<T: ClementineVerifier> tonic::server::UnaryService<super::Empty>
3927 for GetCompatibilityParamsSvc<T> {
3928 type Response = super::CompatibilityParamsRpc;
3929 type Future = BoxFuture<
3930 tonic::Response<Self::Response>,
3931 tonic::Status,
3932 >;
3933 fn call(
3934 &mut self,
3935 request: tonic::Request<super::Empty>,
3936 ) -> Self::Future {
3937 let inner = Arc::clone(&self.0);
3938 let fut = async move {
3939 <T as ClementineVerifier>::get_compatibility_params(
3940 &inner,
3941 request,
3942 )
3943 .await
3944 };
3945 Box::pin(fut)
3946 }
3947 }
3948 let accept_compression_encodings = self.accept_compression_encodings;
3949 let send_compression_encodings = self.send_compression_encodings;
3950 let max_decoding_message_size = self.max_decoding_message_size;
3951 let max_encoding_message_size = self.max_encoding_message_size;
3952 let inner = self.inner.clone();
3953 let fut = async move {
3954 let method = GetCompatibilityParamsSvc(inner);
3955 let codec = tonic::codec::ProstCodec::default();
3956 let mut grpc = tonic::server::Grpc::new(codec)
3957 .apply_compression_config(
3958 accept_compression_encodings,
3959 send_compression_encodings,
3960 )
3961 .apply_max_message_size_config(
3962 max_decoding_message_size,
3963 max_encoding_message_size,
3964 );
3965 let res = grpc.unary(method, req).await;
3966 Ok(res)
3967 };
3968 Box::pin(fut)
3969 }
3970 "/clementine.ClementineVerifier/SetOperator" => {
3971 #[allow(non_camel_case_types)]
3972 struct SetOperatorSvc<T: ClementineVerifier>(pub Arc<T>);
3973 impl<
3974 T: ClementineVerifier,
3975 > tonic::server::ClientStreamingService<super::OperatorParams>
3976 for SetOperatorSvc<T> {
3977 type Response = super::Empty;
3978 type Future = BoxFuture<
3979 tonic::Response<Self::Response>,
3980 tonic::Status,
3981 >;
3982 fn call(
3983 &mut self,
3984 request: tonic::Request<
3985 tonic::Streaming<super::OperatorParams>,
3986 >,
3987 ) -> Self::Future {
3988 let inner = Arc::clone(&self.0);
3989 let fut = async move {
3990 <T as ClementineVerifier>::set_operator(&inner, request)
3991 .await
3992 };
3993 Box::pin(fut)
3994 }
3995 }
3996 let accept_compression_encodings = self.accept_compression_encodings;
3997 let send_compression_encodings = self.send_compression_encodings;
3998 let max_decoding_message_size = self.max_decoding_message_size;
3999 let max_encoding_message_size = self.max_encoding_message_size;
4000 let inner = self.inner.clone();
4001 let fut = async move {
4002 let method = SetOperatorSvc(inner);
4003 let codec = tonic::codec::ProstCodec::default();
4004 let mut grpc = tonic::server::Grpc::new(codec)
4005 .apply_compression_config(
4006 accept_compression_encodings,
4007 send_compression_encodings,
4008 )
4009 .apply_max_message_size_config(
4010 max_decoding_message_size,
4011 max_encoding_message_size,
4012 );
4013 let res = grpc.client_streaming(method, req).await;
4014 Ok(res)
4015 };
4016 Box::pin(fut)
4017 }
4018 "/clementine.ClementineVerifier/SetOperatorKeys" => {
4019 #[allow(non_camel_case_types)]
4020 struct SetOperatorKeysSvc<T: ClementineVerifier>(pub Arc<T>);
4021 impl<
4022 T: ClementineVerifier,
4023 > tonic::server::UnaryService<super::OperatorKeysWithDeposit>
4024 for SetOperatorKeysSvc<T> {
4025 type Response = super::Empty;
4026 type Future = BoxFuture<
4027 tonic::Response<Self::Response>,
4028 tonic::Status,
4029 >;
4030 fn call(
4031 &mut self,
4032 request: tonic::Request<super::OperatorKeysWithDeposit>,
4033 ) -> Self::Future {
4034 let inner = Arc::clone(&self.0);
4035 let fut = async move {
4036 <T as ClementineVerifier>::set_operator_keys(
4037 &inner,
4038 request,
4039 )
4040 .await
4041 };
4042 Box::pin(fut)
4043 }
4044 }
4045 let accept_compression_encodings = self.accept_compression_encodings;
4046 let send_compression_encodings = self.send_compression_encodings;
4047 let max_decoding_message_size = self.max_decoding_message_size;
4048 let max_encoding_message_size = self.max_encoding_message_size;
4049 let inner = self.inner.clone();
4050 let fut = async move {
4051 let method = SetOperatorKeysSvc(inner);
4052 let codec = tonic::codec::ProstCodec::default();
4053 let mut grpc = tonic::server::Grpc::new(codec)
4054 .apply_compression_config(
4055 accept_compression_encodings,
4056 send_compression_encodings,
4057 )
4058 .apply_max_message_size_config(
4059 max_decoding_message_size,
4060 max_encoding_message_size,
4061 );
4062 let res = grpc.unary(method, req).await;
4063 Ok(res)
4064 };
4065 Box::pin(fut)
4066 }
4067 "/clementine.ClementineVerifier/NonceGen" => {
4068 #[allow(non_camel_case_types)]
4069 struct NonceGenSvc<T: ClementineVerifier>(pub Arc<T>);
4070 impl<
4071 T: ClementineVerifier,
4072 > tonic::server::ServerStreamingService<super::NonceGenRequest>
4073 for NonceGenSvc<T> {
4074 type Response = super::NonceGenResponse;
4075 type ResponseStream = T::NonceGenStream;
4076 type Future = BoxFuture<
4077 tonic::Response<Self::ResponseStream>,
4078 tonic::Status,
4079 >;
4080 fn call(
4081 &mut self,
4082 request: tonic::Request<super::NonceGenRequest>,
4083 ) -> Self::Future {
4084 let inner = Arc::clone(&self.0);
4085 let fut = async move {
4086 <T as ClementineVerifier>::nonce_gen(&inner, request).await
4087 };
4088 Box::pin(fut)
4089 }
4090 }
4091 let accept_compression_encodings = self.accept_compression_encodings;
4092 let send_compression_encodings = self.send_compression_encodings;
4093 let max_decoding_message_size = self.max_decoding_message_size;
4094 let max_encoding_message_size = self.max_encoding_message_size;
4095 let inner = self.inner.clone();
4096 let fut = async move {
4097 let method = NonceGenSvc(inner);
4098 let codec = tonic::codec::ProstCodec::default();
4099 let mut grpc = tonic::server::Grpc::new(codec)
4100 .apply_compression_config(
4101 accept_compression_encodings,
4102 send_compression_encodings,
4103 )
4104 .apply_max_message_size_config(
4105 max_decoding_message_size,
4106 max_encoding_message_size,
4107 );
4108 let res = grpc.server_streaming(method, req).await;
4109 Ok(res)
4110 };
4111 Box::pin(fut)
4112 }
4113 "/clementine.ClementineVerifier/DepositSign" => {
4114 #[allow(non_camel_case_types)]
4115 struct DepositSignSvc<T: ClementineVerifier>(pub Arc<T>);
4116 impl<
4117 T: ClementineVerifier,
4118 > tonic::server::StreamingService<super::VerifierDepositSignParams>
4119 for DepositSignSvc<T> {
4120 type Response = super::PartialSig;
4121 type ResponseStream = T::DepositSignStream;
4122 type Future = BoxFuture<
4123 tonic::Response<Self::ResponseStream>,
4124 tonic::Status,
4125 >;
4126 fn call(
4127 &mut self,
4128 request: tonic::Request<
4129 tonic::Streaming<super::VerifierDepositSignParams>,
4130 >,
4131 ) -> Self::Future {
4132 let inner = Arc::clone(&self.0);
4133 let fut = async move {
4134 <T as ClementineVerifier>::deposit_sign(&inner, request)
4135 .await
4136 };
4137 Box::pin(fut)
4138 }
4139 }
4140 let accept_compression_encodings = self.accept_compression_encodings;
4141 let send_compression_encodings = self.send_compression_encodings;
4142 let max_decoding_message_size = self.max_decoding_message_size;
4143 let max_encoding_message_size = self.max_encoding_message_size;
4144 let inner = self.inner.clone();
4145 let fut = async move {
4146 let method = DepositSignSvc(inner);
4147 let codec = tonic::codec::ProstCodec::default();
4148 let mut grpc = tonic::server::Grpc::new(codec)
4149 .apply_compression_config(
4150 accept_compression_encodings,
4151 send_compression_encodings,
4152 )
4153 .apply_max_message_size_config(
4154 max_decoding_message_size,
4155 max_encoding_message_size,
4156 );
4157 let res = grpc.streaming(method, req).await;
4158 Ok(res)
4159 };
4160 Box::pin(fut)
4161 }
4162 "/clementine.ClementineVerifier/OptimisticPayoutSign" => {
4163 #[allow(non_camel_case_types)]
4164 struct OptimisticPayoutSignSvc<T: ClementineVerifier>(pub Arc<T>);
4165 impl<
4166 T: ClementineVerifier,
4167 > tonic::server::UnaryService<super::OptimisticPayoutParams>
4168 for OptimisticPayoutSignSvc<T> {
4169 type Response = super::PartialSig;
4170 type Future = BoxFuture<
4171 tonic::Response<Self::Response>,
4172 tonic::Status,
4173 >;
4174 fn call(
4175 &mut self,
4176 request: tonic::Request<super::OptimisticPayoutParams>,
4177 ) -> Self::Future {
4178 let inner = Arc::clone(&self.0);
4179 let fut = async move {
4180 <T as ClementineVerifier>::optimistic_payout_sign(
4181 &inner,
4182 request,
4183 )
4184 .await
4185 };
4186 Box::pin(fut)
4187 }
4188 }
4189 let accept_compression_encodings = self.accept_compression_encodings;
4190 let send_compression_encodings = self.send_compression_encodings;
4191 let max_decoding_message_size = self.max_decoding_message_size;
4192 let max_encoding_message_size = self.max_encoding_message_size;
4193 let inner = self.inner.clone();
4194 let fut = async move {
4195 let method = OptimisticPayoutSignSvc(inner);
4196 let codec = tonic::codec::ProstCodec::default();
4197 let mut grpc = tonic::server::Grpc::new(codec)
4198 .apply_compression_config(
4199 accept_compression_encodings,
4200 send_compression_encodings,
4201 )
4202 .apply_max_message_size_config(
4203 max_decoding_message_size,
4204 max_encoding_message_size,
4205 );
4206 let res = grpc.unary(method, req).await;
4207 Ok(res)
4208 };
4209 Box::pin(fut)
4210 }
4211 "/clementine.ClementineVerifier/DepositFinalize" => {
4212 #[allow(non_camel_case_types)]
4213 struct DepositFinalizeSvc<T: ClementineVerifier>(pub Arc<T>);
4214 impl<
4215 T: ClementineVerifier,
4216 > tonic::server::ClientStreamingService<
4217 super::VerifierDepositFinalizeParams,
4218 > for DepositFinalizeSvc<T> {
4219 type Response = super::VerifierDepositFinalizeResponse;
4220 type Future = BoxFuture<
4221 tonic::Response<Self::Response>,
4222 tonic::Status,
4223 >;
4224 fn call(
4225 &mut self,
4226 request: tonic::Request<
4227 tonic::Streaming<super::VerifierDepositFinalizeParams>,
4228 >,
4229 ) -> Self::Future {
4230 let inner = Arc::clone(&self.0);
4231 let fut = async move {
4232 <T as ClementineVerifier>::deposit_finalize(&inner, request)
4233 .await
4234 };
4235 Box::pin(fut)
4236 }
4237 }
4238 let accept_compression_encodings = self.accept_compression_encodings;
4239 let send_compression_encodings = self.send_compression_encodings;
4240 let max_decoding_message_size = self.max_decoding_message_size;
4241 let max_encoding_message_size = self.max_encoding_message_size;
4242 let inner = self.inner.clone();
4243 let fut = async move {
4244 let method = DepositFinalizeSvc(inner);
4245 let codec = tonic::codec::ProstCodec::default();
4246 let mut grpc = tonic::server::Grpc::new(codec)
4247 .apply_compression_config(
4248 accept_compression_encodings,
4249 send_compression_encodings,
4250 )
4251 .apply_max_message_size_config(
4252 max_decoding_message_size,
4253 max_encoding_message_size,
4254 );
4255 let res = grpc.client_streaming(method, req).await;
4256 Ok(res)
4257 };
4258 Box::pin(fut)
4259 }
4260 "/clementine.ClementineVerifier/DebugTx" => {
4261 #[allow(non_camel_case_types)]
4262 struct DebugTxSvc<T: ClementineVerifier>(pub Arc<T>);
4263 impl<
4264 T: ClementineVerifier,
4265 > tonic::server::UnaryService<super::TxDebugRequest>
4266 for DebugTxSvc<T> {
4267 type Response = super::TxDebugInfo;
4268 type Future = BoxFuture<
4269 tonic::Response<Self::Response>,
4270 tonic::Status,
4271 >;
4272 fn call(
4273 &mut self,
4274 request: tonic::Request<super::TxDebugRequest>,
4275 ) -> Self::Future {
4276 let inner = Arc::clone(&self.0);
4277 let fut = async move {
4278 <T as ClementineVerifier>::debug_tx(&inner, request).await
4279 };
4280 Box::pin(fut)
4281 }
4282 }
4283 let accept_compression_encodings = self.accept_compression_encodings;
4284 let send_compression_encodings = self.send_compression_encodings;
4285 let max_decoding_message_size = self.max_decoding_message_size;
4286 let max_encoding_message_size = self.max_encoding_message_size;
4287 let inner = self.inner.clone();
4288 let fut = async move {
4289 let method = DebugTxSvc(inner);
4290 let codec = tonic::codec::ProstCodec::default();
4291 let mut grpc = tonic::server::Grpc::new(codec)
4292 .apply_compression_config(
4293 accept_compression_encodings,
4294 send_compression_encodings,
4295 )
4296 .apply_max_message_size_config(
4297 max_decoding_message_size,
4298 max_encoding_message_size,
4299 );
4300 let res = grpc.unary(method, req).await;
4301 Ok(res)
4302 };
4303 Box::pin(fut)
4304 }
4305 "/clementine.ClementineVerifier/RestartBackgroundTasks" => {
4306 #[allow(non_camel_case_types)]
4307 struct RestartBackgroundTasksSvc<T: ClementineVerifier>(pub Arc<T>);
4308 impl<T: ClementineVerifier> tonic::server::UnaryService<super::Empty>
4309 for RestartBackgroundTasksSvc<T> {
4310 type Response = super::Empty;
4311 type Future = BoxFuture<
4312 tonic::Response<Self::Response>,
4313 tonic::Status,
4314 >;
4315 fn call(
4316 &mut self,
4317 request: tonic::Request<super::Empty>,
4318 ) -> Self::Future {
4319 let inner = Arc::clone(&self.0);
4320 let fut = async move {
4321 <T as ClementineVerifier>::restart_background_tasks(
4322 &inner,
4323 request,
4324 )
4325 .await
4326 };
4327 Box::pin(fut)
4328 }
4329 }
4330 let accept_compression_encodings = self.accept_compression_encodings;
4331 let send_compression_encodings = self.send_compression_encodings;
4332 let max_decoding_message_size = self.max_decoding_message_size;
4333 let max_encoding_message_size = self.max_encoding_message_size;
4334 let inner = self.inner.clone();
4335 let fut = async move {
4336 let method = RestartBackgroundTasksSvc(inner);
4337 let codec = tonic::codec::ProstCodec::default();
4338 let mut grpc = tonic::server::Grpc::new(codec)
4339 .apply_compression_config(
4340 accept_compression_encodings,
4341 send_compression_encodings,
4342 )
4343 .apply_max_message_size_config(
4344 max_decoding_message_size,
4345 max_encoding_message_size,
4346 );
4347 let res = grpc.unary(method, req).await;
4348 Ok(res)
4349 };
4350 Box::pin(fut)
4351 }
4352 "/clementine.ClementineVerifier/InternalHandleKickoff" => {
4353 #[allow(non_camel_case_types)]
4354 struct InternalHandleKickoffSvc<T: ClementineVerifier>(pub Arc<T>);
4355 impl<T: ClementineVerifier> tonic::server::UnaryService<super::Txid>
4356 for InternalHandleKickoffSvc<T> {
4357 type Response = super::Empty;
4358 type Future = BoxFuture<
4359 tonic::Response<Self::Response>,
4360 tonic::Status,
4361 >;
4362 fn call(
4363 &mut self,
4364 request: tonic::Request<super::Txid>,
4365 ) -> Self::Future {
4366 let inner = Arc::clone(&self.0);
4367 let fut = async move {
4368 <T as ClementineVerifier>::internal_handle_kickoff(
4369 &inner,
4370 request,
4371 )
4372 .await
4373 };
4374 Box::pin(fut)
4375 }
4376 }
4377 let accept_compression_encodings = self.accept_compression_encodings;
4378 let send_compression_encodings = self.send_compression_encodings;
4379 let max_decoding_message_size = self.max_decoding_message_size;
4380 let max_encoding_message_size = self.max_encoding_message_size;
4381 let inner = self.inner.clone();
4382 let fut = async move {
4383 let method = InternalHandleKickoffSvc(inner);
4384 let codec = tonic::codec::ProstCodec::default();
4385 let mut grpc = tonic::server::Grpc::new(codec)
4386 .apply_compression_config(
4387 accept_compression_encodings,
4388 send_compression_encodings,
4389 )
4390 .apply_max_message_size_config(
4391 max_decoding_message_size,
4392 max_encoding_message_size,
4393 );
4394 let res = grpc.unary(method, req).await;
4395 Ok(res)
4396 };
4397 Box::pin(fut)
4398 }
4399 "/clementine.ClementineVerifier/GetCurrentStatus" => {
4400 #[allow(non_camel_case_types)]
4401 struct GetCurrentStatusSvc<T: ClementineVerifier>(pub Arc<T>);
4402 impl<T: ClementineVerifier> tonic::server::UnaryService<super::Empty>
4403 for GetCurrentStatusSvc<T> {
4404 type Response = super::EntityStatus;
4405 type Future = BoxFuture<
4406 tonic::Response<Self::Response>,
4407 tonic::Status,
4408 >;
4409 fn call(
4410 &mut self,
4411 request: tonic::Request<super::Empty>,
4412 ) -> Self::Future {
4413 let inner = Arc::clone(&self.0);
4414 let fut = async move {
4415 <T as ClementineVerifier>::get_current_status(
4416 &inner,
4417 request,
4418 )
4419 .await
4420 };
4421 Box::pin(fut)
4422 }
4423 }
4424 let accept_compression_encodings = self.accept_compression_encodings;
4425 let send_compression_encodings = self.send_compression_encodings;
4426 let max_decoding_message_size = self.max_decoding_message_size;
4427 let max_encoding_message_size = self.max_encoding_message_size;
4428 let inner = self.inner.clone();
4429 let fut = async move {
4430 let method = GetCurrentStatusSvc(inner);
4431 let codec = tonic::codec::ProstCodec::default();
4432 let mut grpc = tonic::server::Grpc::new(codec)
4433 .apply_compression_config(
4434 accept_compression_encodings,
4435 send_compression_encodings,
4436 )
4437 .apply_max_message_size_config(
4438 max_decoding_message_size,
4439 max_encoding_message_size,
4440 );
4441 let res = grpc.unary(method, req).await;
4442 Ok(res)
4443 };
4444 Box::pin(fut)
4445 }
4446 "/clementine.ClementineVerifier/InternalCreateSignedTxs" => {
4447 #[allow(non_camel_case_types)]
4448 struct InternalCreateSignedTxsSvc<T: ClementineVerifier>(pub Arc<T>);
4449 impl<
4450 T: ClementineVerifier,
4451 > tonic::server::UnaryService<super::TransactionRequest>
4452 for InternalCreateSignedTxsSvc<T> {
4453 type Response = super::SignedTxsWithType;
4454 type Future = BoxFuture<
4455 tonic::Response<Self::Response>,
4456 tonic::Status,
4457 >;
4458 fn call(
4459 &mut self,
4460 request: tonic::Request<super::TransactionRequest>,
4461 ) -> Self::Future {
4462 let inner = Arc::clone(&self.0);
4463 let fut = async move {
4464 <T as ClementineVerifier>::internal_create_signed_txs(
4465 &inner,
4466 request,
4467 )
4468 .await
4469 };
4470 Box::pin(fut)
4471 }
4472 }
4473 let accept_compression_encodings = self.accept_compression_encodings;
4474 let send_compression_encodings = self.send_compression_encodings;
4475 let max_decoding_message_size = self.max_decoding_message_size;
4476 let max_encoding_message_size = self.max_encoding_message_size;
4477 let inner = self.inner.clone();
4478 let fut = async move {
4479 let method = InternalCreateSignedTxsSvc(inner);
4480 let codec = tonic::codec::ProstCodec::default();
4481 let mut grpc = tonic::server::Grpc::new(codec)
4482 .apply_compression_config(
4483 accept_compression_encodings,
4484 send_compression_encodings,
4485 )
4486 .apply_max_message_size_config(
4487 max_decoding_message_size,
4488 max_encoding_message_size,
4489 );
4490 let res = grpc.unary(method, req).await;
4491 Ok(res)
4492 };
4493 Box::pin(fut)
4494 }
4495 "/clementine.ClementineVerifier/InternalCreateWatchtowerChallenge" => {
4496 #[allow(non_camel_case_types)]
4497 struct InternalCreateWatchtowerChallengeSvc<T: ClementineVerifier>(
4498 pub Arc<T>,
4499 );
4500 impl<
4501 T: ClementineVerifier,
4502 > tonic::server::UnaryService<super::TransactionRequest>
4503 for InternalCreateWatchtowerChallengeSvc<T> {
4504 type Response = super::RawTxWithRbfInfo;
4505 type Future = BoxFuture<
4506 tonic::Response<Self::Response>,
4507 tonic::Status,
4508 >;
4509 fn call(
4510 &mut self,
4511 request: tonic::Request<super::TransactionRequest>,
4512 ) -> Self::Future {
4513 let inner = Arc::clone(&self.0);
4514 let fut = async move {
4515 <T as ClementineVerifier>::internal_create_watchtower_challenge(
4516 &inner,
4517 request,
4518 )
4519 .await
4520 };
4521 Box::pin(fut)
4522 }
4523 }
4524 let accept_compression_encodings = self.accept_compression_encodings;
4525 let send_compression_encodings = self.send_compression_encodings;
4526 let max_decoding_message_size = self.max_decoding_message_size;
4527 let max_encoding_message_size = self.max_encoding_message_size;
4528 let inner = self.inner.clone();
4529 let fut = async move {
4530 let method = InternalCreateWatchtowerChallengeSvc(inner);
4531 let codec = tonic::codec::ProstCodec::default();
4532 let mut grpc = tonic::server::Grpc::new(codec)
4533 .apply_compression_config(
4534 accept_compression_encodings,
4535 send_compression_encodings,
4536 )
4537 .apply_max_message_size_config(
4538 max_decoding_message_size,
4539 max_encoding_message_size,
4540 );
4541 let res = grpc.unary(method, req).await;
4542 Ok(res)
4543 };
4544 Box::pin(fut)
4545 }
4546 "/clementine.ClementineVerifier/Vergen" => {
4547 #[allow(non_camel_case_types)]
4548 struct VergenSvc<T: ClementineVerifier>(pub Arc<T>);
4549 impl<T: ClementineVerifier> tonic::server::UnaryService<super::Empty>
4550 for VergenSvc<T> {
4551 type Response = super::VergenResponse;
4552 type Future = BoxFuture<
4553 tonic::Response<Self::Response>,
4554 tonic::Status,
4555 >;
4556 fn call(
4557 &mut self,
4558 request: tonic::Request<super::Empty>,
4559 ) -> Self::Future {
4560 let inner = Arc::clone(&self.0);
4561 let fut = async move {
4562 <T as ClementineVerifier>::vergen(&inner, request).await
4563 };
4564 Box::pin(fut)
4565 }
4566 }
4567 let accept_compression_encodings = self.accept_compression_encodings;
4568 let send_compression_encodings = self.send_compression_encodings;
4569 let max_decoding_message_size = self.max_decoding_message_size;
4570 let max_encoding_message_size = self.max_encoding_message_size;
4571 let inner = self.inner.clone();
4572 let fut = async move {
4573 let method = VergenSvc(inner);
4574 let codec = tonic::codec::ProstCodec::default();
4575 let mut grpc = tonic::server::Grpc::new(codec)
4576 .apply_compression_config(
4577 accept_compression_encodings,
4578 send_compression_encodings,
4579 )
4580 .apply_max_message_size_config(
4581 max_decoding_message_size,
4582 max_encoding_message_size,
4583 );
4584 let res = grpc.unary(method, req).await;
4585 Ok(res)
4586 };
4587 Box::pin(fut)
4588 }
4589 _ => {
4590 Box::pin(async move {
4591 let mut response = http::Response::new(empty_body());
4592 let headers = response.headers_mut();
4593 headers
4594 .insert(
4595 tonic::Status::GRPC_STATUS,
4596 (tonic::Code::Unimplemented as i32).into(),
4597 );
4598 headers
4599 .insert(
4600 http::header::CONTENT_TYPE,
4601 tonic::metadata::GRPC_CONTENT_TYPE,
4602 );
4603 Ok(response)
4604 })
4605 }
4606 }
4607 }
4608 }
4609 impl<T> Clone for ClementineVerifierServer<T> {
4610 fn clone(&self) -> Self {
4611 let inner = self.inner.clone();
4612 Self {
4613 inner,
4614 accept_compression_encodings: self.accept_compression_encodings,
4615 send_compression_encodings: self.send_compression_encodings,
4616 max_decoding_message_size: self.max_decoding_message_size,
4617 max_encoding_message_size: self.max_encoding_message_size,
4618 }
4619 }
4620 }
4621 pub const SERVICE_NAME: &str = "clementine.ClementineVerifier";
4623 impl<T> tonic::server::NamedService for ClementineVerifierServer<T> {
4624 const NAME: &'static str = SERVICE_NAME;
4625 }
4626}
4627pub mod clementine_aggregator_server {
4629 #![allow(
4630 unused_variables,
4631 dead_code,
4632 missing_docs,
4633 clippy::wildcard_imports,
4634 clippy::let_unit_value,
4635 )]
4636 use tonic::codegen::*;
4637 #[async_trait]
4639 pub trait ClementineAggregator: std::marker::Send + std::marker::Sync + 'static {
4640 async fn get_nofn_aggregated_xonly_pk(
4641 &self,
4642 request: tonic::Request<super::Empty>,
4643 ) -> std::result::Result<tonic::Response<super::NofnResponse>, tonic::Status>;
4644 async fn get_compatibility_data_from_entities(
4646 &self,
4647 request: tonic::Request<super::Empty>,
4648 ) -> std::result::Result<
4649 tonic::Response<super::EntitiesCompatibilityData>,
4650 tonic::Status,
4651 >;
4652 async fn get_compatibility_params(
4655 &self,
4656 request: tonic::Request<super::Empty>,
4657 ) -> std::result::Result<
4658 tonic::Response<super::CompatibilityParamsRpc>,
4659 tonic::Status,
4660 >;
4661 async fn setup(
4670 &self,
4671 request: tonic::Request<super::Empty>,
4672 ) -> std::result::Result<
4673 tonic::Response<super::VerifierPublicKeys>,
4674 tonic::Status,
4675 >;
4676 async fn new_deposit(
4685 &self,
4686 request: tonic::Request<super::Deposit>,
4687 ) -> std::result::Result<tonic::Response<super::RawSignedTx>, tonic::Status>;
4688 async fn withdraw(
4694 &self,
4695 request: tonic::Request<super::AggregatorWithdrawalInput>,
4696 ) -> std::result::Result<
4697 tonic::Response<super::AggregatorWithdrawResponse>,
4698 tonic::Status,
4699 >;
4700 async fn optimistic_payout(
4702 &self,
4703 request: tonic::Request<super::OptimisticWithdrawParams>,
4704 ) -> std::result::Result<tonic::Response<super::RawSignedTx>, tonic::Status>;
4705 async fn internal_send_tx(
4707 &self,
4708 request: tonic::Request<super::SendTxRequest>,
4709 ) -> std::result::Result<tonic::Response<super::Empty>, tonic::Status>;
4710 async fn send_move_to_vault_tx(
4711 &self,
4712 request: tonic::Request<super::SendMoveTxRequest>,
4713 ) -> std::result::Result<tonic::Response<super::Txid>, tonic::Status>;
4714 async fn get_entity_statuses(
4718 &self,
4719 request: tonic::Request<super::GetEntityStatusesRequest>,
4720 ) -> std::result::Result<tonic::Response<super::EntityStatuses>, tonic::Status>;
4721 async fn internal_get_emergency_stop_tx(
4725 &self,
4726 request: tonic::Request<super::GetEmergencyStopTxRequest>,
4727 ) -> std::result::Result<
4728 tonic::Response<super::GetEmergencyStopTxResponse>,
4729 tonic::Status,
4730 >;
4731 async fn vergen(
4732 &self,
4733 request: tonic::Request<super::Empty>,
4734 ) -> std::result::Result<tonic::Response<super::VergenResponse>, tonic::Status>;
4735 }
4736 #[derive(Debug)]
4737 pub struct ClementineAggregatorServer<T> {
4738 inner: Arc<T>,
4739 accept_compression_encodings: EnabledCompressionEncodings,
4740 send_compression_encodings: EnabledCompressionEncodings,
4741 max_decoding_message_size: Option<usize>,
4742 max_encoding_message_size: Option<usize>,
4743 }
4744 impl<T> ClementineAggregatorServer<T> {
4745 pub fn new(inner: T) -> Self {
4746 Self::from_arc(Arc::new(inner))
4747 }
4748 pub fn from_arc(inner: Arc<T>) -> Self {
4749 Self {
4750 inner,
4751 accept_compression_encodings: Default::default(),
4752 send_compression_encodings: Default::default(),
4753 max_decoding_message_size: None,
4754 max_encoding_message_size: None,
4755 }
4756 }
4757 pub fn with_interceptor<F>(
4758 inner: T,
4759 interceptor: F,
4760 ) -> InterceptedService<Self, F>
4761 where
4762 F: tonic::service::Interceptor,
4763 {
4764 InterceptedService::new(Self::new(inner), interceptor)
4765 }
4766 #[must_use]
4768 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4769 self.accept_compression_encodings.enable(encoding);
4770 self
4771 }
4772 #[must_use]
4774 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4775 self.send_compression_encodings.enable(encoding);
4776 self
4777 }
4778 #[must_use]
4782 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
4783 self.max_decoding_message_size = Some(limit);
4784 self
4785 }
4786 #[must_use]
4790 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
4791 self.max_encoding_message_size = Some(limit);
4792 self
4793 }
4794 }
4795 impl<T, B> tonic::codegen::Service<http::Request<B>>
4796 for ClementineAggregatorServer<T>
4797 where
4798 T: ClementineAggregator,
4799 B: Body + std::marker::Send + 'static,
4800 B::Error: Into<StdError> + std::marker::Send + 'static,
4801 {
4802 type Response = http::Response<tonic::body::BoxBody>;
4803 type Error = std::convert::Infallible;
4804 type Future = BoxFuture<Self::Response, Self::Error>;
4805 fn poll_ready(
4806 &mut self,
4807 _cx: &mut Context<'_>,
4808 ) -> Poll<std::result::Result<(), Self::Error>> {
4809 Poll::Ready(Ok(()))
4810 }
4811 fn call(&mut self, req: http::Request<B>) -> Self::Future {
4812 match req.uri().path() {
4813 "/clementine.ClementineAggregator/GetNofnAggregatedXonlyPk" => {
4814 #[allow(non_camel_case_types)]
4815 struct GetNofnAggregatedXonlyPkSvc<T: ClementineAggregator>(
4816 pub Arc<T>,
4817 );
4818 impl<
4819 T: ClementineAggregator,
4820 > tonic::server::UnaryService<super::Empty>
4821 for GetNofnAggregatedXonlyPkSvc<T> {
4822 type Response = super::NofnResponse;
4823 type Future = BoxFuture<
4824 tonic::Response<Self::Response>,
4825 tonic::Status,
4826 >;
4827 fn call(
4828 &mut self,
4829 request: tonic::Request<super::Empty>,
4830 ) -> Self::Future {
4831 let inner = Arc::clone(&self.0);
4832 let fut = async move {
4833 <T as ClementineAggregator>::get_nofn_aggregated_xonly_pk(
4834 &inner,
4835 request,
4836 )
4837 .await
4838 };
4839 Box::pin(fut)
4840 }
4841 }
4842 let accept_compression_encodings = self.accept_compression_encodings;
4843 let send_compression_encodings = self.send_compression_encodings;
4844 let max_decoding_message_size = self.max_decoding_message_size;
4845 let max_encoding_message_size = self.max_encoding_message_size;
4846 let inner = self.inner.clone();
4847 let fut = async move {
4848 let method = GetNofnAggregatedXonlyPkSvc(inner);
4849 let codec = tonic::codec::ProstCodec::default();
4850 let mut grpc = tonic::server::Grpc::new(codec)
4851 .apply_compression_config(
4852 accept_compression_encodings,
4853 send_compression_encodings,
4854 )
4855 .apply_max_message_size_config(
4856 max_decoding_message_size,
4857 max_encoding_message_size,
4858 );
4859 let res = grpc.unary(method, req).await;
4860 Ok(res)
4861 };
4862 Box::pin(fut)
4863 }
4864 "/clementine.ClementineAggregator/GetCompatibilityDataFromEntities" => {
4865 #[allow(non_camel_case_types)]
4866 struct GetCompatibilityDataFromEntitiesSvc<T: ClementineAggregator>(
4867 pub Arc<T>,
4868 );
4869 impl<
4870 T: ClementineAggregator,
4871 > tonic::server::UnaryService<super::Empty>
4872 for GetCompatibilityDataFromEntitiesSvc<T> {
4873 type Response = super::EntitiesCompatibilityData;
4874 type Future = BoxFuture<
4875 tonic::Response<Self::Response>,
4876 tonic::Status,
4877 >;
4878 fn call(
4879 &mut self,
4880 request: tonic::Request<super::Empty>,
4881 ) -> Self::Future {
4882 let inner = Arc::clone(&self.0);
4883 let fut = async move {
4884 <T as ClementineAggregator>::get_compatibility_data_from_entities(
4885 &inner,
4886 request,
4887 )
4888 .await
4889 };
4890 Box::pin(fut)
4891 }
4892 }
4893 let accept_compression_encodings = self.accept_compression_encodings;
4894 let send_compression_encodings = self.send_compression_encodings;
4895 let max_decoding_message_size = self.max_decoding_message_size;
4896 let max_encoding_message_size = self.max_encoding_message_size;
4897 let inner = self.inner.clone();
4898 let fut = async move {
4899 let method = GetCompatibilityDataFromEntitiesSvc(inner);
4900 let codec = tonic::codec::ProstCodec::default();
4901 let mut grpc = tonic::server::Grpc::new(codec)
4902 .apply_compression_config(
4903 accept_compression_encodings,
4904 send_compression_encodings,
4905 )
4906 .apply_max_message_size_config(
4907 max_decoding_message_size,
4908 max_encoding_message_size,
4909 );
4910 let res = grpc.unary(method, req).await;
4911 Ok(res)
4912 };
4913 Box::pin(fut)
4914 }
4915 "/clementine.ClementineAggregator/GetCompatibilityParams" => {
4916 #[allow(non_camel_case_types)]
4917 struct GetCompatibilityParamsSvc<T: ClementineAggregator>(
4918 pub Arc<T>,
4919 );
4920 impl<
4921 T: ClementineAggregator,
4922 > tonic::server::UnaryService<super::Empty>
4923 for GetCompatibilityParamsSvc<T> {
4924 type Response = super::CompatibilityParamsRpc;
4925 type Future = BoxFuture<
4926 tonic::Response<Self::Response>,
4927 tonic::Status,
4928 >;
4929 fn call(
4930 &mut self,
4931 request: tonic::Request<super::Empty>,
4932 ) -> Self::Future {
4933 let inner = Arc::clone(&self.0);
4934 let fut = async move {
4935 <T as ClementineAggregator>::get_compatibility_params(
4936 &inner,
4937 request,
4938 )
4939 .await
4940 };
4941 Box::pin(fut)
4942 }
4943 }
4944 let accept_compression_encodings = self.accept_compression_encodings;
4945 let send_compression_encodings = self.send_compression_encodings;
4946 let max_decoding_message_size = self.max_decoding_message_size;
4947 let max_encoding_message_size = self.max_encoding_message_size;
4948 let inner = self.inner.clone();
4949 let fut = async move {
4950 let method = GetCompatibilityParamsSvc(inner);
4951 let codec = tonic::codec::ProstCodec::default();
4952 let mut grpc = tonic::server::Grpc::new(codec)
4953 .apply_compression_config(
4954 accept_compression_encodings,
4955 send_compression_encodings,
4956 )
4957 .apply_max_message_size_config(
4958 max_decoding_message_size,
4959 max_encoding_message_size,
4960 );
4961 let res = grpc.unary(method, req).await;
4962 Ok(res)
4963 };
4964 Box::pin(fut)
4965 }
4966 "/clementine.ClementineAggregator/Setup" => {
4967 #[allow(non_camel_case_types)]
4968 struct SetupSvc<T: ClementineAggregator>(pub Arc<T>);
4969 impl<
4970 T: ClementineAggregator,
4971 > tonic::server::UnaryService<super::Empty> for SetupSvc<T> {
4972 type Response = super::VerifierPublicKeys;
4973 type Future = BoxFuture<
4974 tonic::Response<Self::Response>,
4975 tonic::Status,
4976 >;
4977 fn call(
4978 &mut self,
4979 request: tonic::Request<super::Empty>,
4980 ) -> Self::Future {
4981 let inner = Arc::clone(&self.0);
4982 let fut = async move {
4983 <T as ClementineAggregator>::setup(&inner, request).await
4984 };
4985 Box::pin(fut)
4986 }
4987 }
4988 let accept_compression_encodings = self.accept_compression_encodings;
4989 let send_compression_encodings = self.send_compression_encodings;
4990 let max_decoding_message_size = self.max_decoding_message_size;
4991 let max_encoding_message_size = self.max_encoding_message_size;
4992 let inner = self.inner.clone();
4993 let fut = async move {
4994 let method = SetupSvc(inner);
4995 let codec = tonic::codec::ProstCodec::default();
4996 let mut grpc = tonic::server::Grpc::new(codec)
4997 .apply_compression_config(
4998 accept_compression_encodings,
4999 send_compression_encodings,
5000 )
5001 .apply_max_message_size_config(
5002 max_decoding_message_size,
5003 max_encoding_message_size,
5004 );
5005 let res = grpc.unary(method, req).await;
5006 Ok(res)
5007 };
5008 Box::pin(fut)
5009 }
5010 "/clementine.ClementineAggregator/NewDeposit" => {
5011 #[allow(non_camel_case_types)]
5012 struct NewDepositSvc<T: ClementineAggregator>(pub Arc<T>);
5013 impl<
5014 T: ClementineAggregator,
5015 > tonic::server::UnaryService<super::Deposit> for NewDepositSvc<T> {
5016 type Response = super::RawSignedTx;
5017 type Future = BoxFuture<
5018 tonic::Response<Self::Response>,
5019 tonic::Status,
5020 >;
5021 fn call(
5022 &mut self,
5023 request: tonic::Request<super::Deposit>,
5024 ) -> Self::Future {
5025 let inner = Arc::clone(&self.0);
5026 let fut = async move {
5027 <T as ClementineAggregator>::new_deposit(&inner, request)
5028 .await
5029 };
5030 Box::pin(fut)
5031 }
5032 }
5033 let accept_compression_encodings = self.accept_compression_encodings;
5034 let send_compression_encodings = self.send_compression_encodings;
5035 let max_decoding_message_size = self.max_decoding_message_size;
5036 let max_encoding_message_size = self.max_encoding_message_size;
5037 let inner = self.inner.clone();
5038 let fut = async move {
5039 let method = NewDepositSvc(inner);
5040 let codec = tonic::codec::ProstCodec::default();
5041 let mut grpc = tonic::server::Grpc::new(codec)
5042 .apply_compression_config(
5043 accept_compression_encodings,
5044 send_compression_encodings,
5045 )
5046 .apply_max_message_size_config(
5047 max_decoding_message_size,
5048 max_encoding_message_size,
5049 );
5050 let res = grpc.unary(method, req).await;
5051 Ok(res)
5052 };
5053 Box::pin(fut)
5054 }
5055 "/clementine.ClementineAggregator/Withdraw" => {
5056 #[allow(non_camel_case_types)]
5057 struct WithdrawSvc<T: ClementineAggregator>(pub Arc<T>);
5058 impl<
5059 T: ClementineAggregator,
5060 > tonic::server::UnaryService<super::AggregatorWithdrawalInput>
5061 for WithdrawSvc<T> {
5062 type Response = super::AggregatorWithdrawResponse;
5063 type Future = BoxFuture<
5064 tonic::Response<Self::Response>,
5065 tonic::Status,
5066 >;
5067 fn call(
5068 &mut self,
5069 request: tonic::Request<super::AggregatorWithdrawalInput>,
5070 ) -> Self::Future {
5071 let inner = Arc::clone(&self.0);
5072 let fut = async move {
5073 <T as ClementineAggregator>::withdraw(&inner, request).await
5074 };
5075 Box::pin(fut)
5076 }
5077 }
5078 let accept_compression_encodings = self.accept_compression_encodings;
5079 let send_compression_encodings = self.send_compression_encodings;
5080 let max_decoding_message_size = self.max_decoding_message_size;
5081 let max_encoding_message_size = self.max_encoding_message_size;
5082 let inner = self.inner.clone();
5083 let fut = async move {
5084 let method = WithdrawSvc(inner);
5085 let codec = tonic::codec::ProstCodec::default();
5086 let mut grpc = tonic::server::Grpc::new(codec)
5087 .apply_compression_config(
5088 accept_compression_encodings,
5089 send_compression_encodings,
5090 )
5091 .apply_max_message_size_config(
5092 max_decoding_message_size,
5093 max_encoding_message_size,
5094 );
5095 let res = grpc.unary(method, req).await;
5096 Ok(res)
5097 };
5098 Box::pin(fut)
5099 }
5100 "/clementine.ClementineAggregator/OptimisticPayout" => {
5101 #[allow(non_camel_case_types)]
5102 struct OptimisticPayoutSvc<T: ClementineAggregator>(pub Arc<T>);
5103 impl<
5104 T: ClementineAggregator,
5105 > tonic::server::UnaryService<super::OptimisticWithdrawParams>
5106 for OptimisticPayoutSvc<T> {
5107 type Response = super::RawSignedTx;
5108 type Future = BoxFuture<
5109 tonic::Response<Self::Response>,
5110 tonic::Status,
5111 >;
5112 fn call(
5113 &mut self,
5114 request: tonic::Request<super::OptimisticWithdrawParams>,
5115 ) -> Self::Future {
5116 let inner = Arc::clone(&self.0);
5117 let fut = async move {
5118 <T as ClementineAggregator>::optimistic_payout(
5119 &inner,
5120 request,
5121 )
5122 .await
5123 };
5124 Box::pin(fut)
5125 }
5126 }
5127 let accept_compression_encodings = self.accept_compression_encodings;
5128 let send_compression_encodings = self.send_compression_encodings;
5129 let max_decoding_message_size = self.max_decoding_message_size;
5130 let max_encoding_message_size = self.max_encoding_message_size;
5131 let inner = self.inner.clone();
5132 let fut = async move {
5133 let method = OptimisticPayoutSvc(inner);
5134 let codec = tonic::codec::ProstCodec::default();
5135 let mut grpc = tonic::server::Grpc::new(codec)
5136 .apply_compression_config(
5137 accept_compression_encodings,
5138 send_compression_encodings,
5139 )
5140 .apply_max_message_size_config(
5141 max_decoding_message_size,
5142 max_encoding_message_size,
5143 );
5144 let res = grpc.unary(method, req).await;
5145 Ok(res)
5146 };
5147 Box::pin(fut)
5148 }
5149 "/clementine.ClementineAggregator/InternalSendTx" => {
5150 #[allow(non_camel_case_types)]
5151 struct InternalSendTxSvc<T: ClementineAggregator>(pub Arc<T>);
5152 impl<
5153 T: ClementineAggregator,
5154 > tonic::server::UnaryService<super::SendTxRequest>
5155 for InternalSendTxSvc<T> {
5156 type Response = super::Empty;
5157 type Future = BoxFuture<
5158 tonic::Response<Self::Response>,
5159 tonic::Status,
5160 >;
5161 fn call(
5162 &mut self,
5163 request: tonic::Request<super::SendTxRequest>,
5164 ) -> Self::Future {
5165 let inner = Arc::clone(&self.0);
5166 let fut = async move {
5167 <T as ClementineAggregator>::internal_send_tx(
5168 &inner,
5169 request,
5170 )
5171 .await
5172 };
5173 Box::pin(fut)
5174 }
5175 }
5176 let accept_compression_encodings = self.accept_compression_encodings;
5177 let send_compression_encodings = self.send_compression_encodings;
5178 let max_decoding_message_size = self.max_decoding_message_size;
5179 let max_encoding_message_size = self.max_encoding_message_size;
5180 let inner = self.inner.clone();
5181 let fut = async move {
5182 let method = InternalSendTxSvc(inner);
5183 let codec = tonic::codec::ProstCodec::default();
5184 let mut grpc = tonic::server::Grpc::new(codec)
5185 .apply_compression_config(
5186 accept_compression_encodings,
5187 send_compression_encodings,
5188 )
5189 .apply_max_message_size_config(
5190 max_decoding_message_size,
5191 max_encoding_message_size,
5192 );
5193 let res = grpc.unary(method, req).await;
5194 Ok(res)
5195 };
5196 Box::pin(fut)
5197 }
5198 "/clementine.ClementineAggregator/SendMoveToVaultTx" => {
5199 #[allow(non_camel_case_types)]
5200 struct SendMoveToVaultTxSvc<T: ClementineAggregator>(pub Arc<T>);
5201 impl<
5202 T: ClementineAggregator,
5203 > tonic::server::UnaryService<super::SendMoveTxRequest>
5204 for SendMoveToVaultTxSvc<T> {
5205 type Response = super::Txid;
5206 type Future = BoxFuture<
5207 tonic::Response<Self::Response>,
5208 tonic::Status,
5209 >;
5210 fn call(
5211 &mut self,
5212 request: tonic::Request<super::SendMoveTxRequest>,
5213 ) -> Self::Future {
5214 let inner = Arc::clone(&self.0);
5215 let fut = async move {
5216 <T as ClementineAggregator>::send_move_to_vault_tx(
5217 &inner,
5218 request,
5219 )
5220 .await
5221 };
5222 Box::pin(fut)
5223 }
5224 }
5225 let accept_compression_encodings = self.accept_compression_encodings;
5226 let send_compression_encodings = self.send_compression_encodings;
5227 let max_decoding_message_size = self.max_decoding_message_size;
5228 let max_encoding_message_size = self.max_encoding_message_size;
5229 let inner = self.inner.clone();
5230 let fut = async move {
5231 let method = SendMoveToVaultTxSvc(inner);
5232 let codec = tonic::codec::ProstCodec::default();
5233 let mut grpc = tonic::server::Grpc::new(codec)
5234 .apply_compression_config(
5235 accept_compression_encodings,
5236 send_compression_encodings,
5237 )
5238 .apply_max_message_size_config(
5239 max_decoding_message_size,
5240 max_encoding_message_size,
5241 );
5242 let res = grpc.unary(method, req).await;
5243 Ok(res)
5244 };
5245 Box::pin(fut)
5246 }
5247 "/clementine.ClementineAggregator/GetEntityStatuses" => {
5248 #[allow(non_camel_case_types)]
5249 struct GetEntityStatusesSvc<T: ClementineAggregator>(pub Arc<T>);
5250 impl<
5251 T: ClementineAggregator,
5252 > tonic::server::UnaryService<super::GetEntityStatusesRequest>
5253 for GetEntityStatusesSvc<T> {
5254 type Response = super::EntityStatuses;
5255 type Future = BoxFuture<
5256 tonic::Response<Self::Response>,
5257 tonic::Status,
5258 >;
5259 fn call(
5260 &mut self,
5261 request: tonic::Request<super::GetEntityStatusesRequest>,
5262 ) -> Self::Future {
5263 let inner = Arc::clone(&self.0);
5264 let fut = async move {
5265 <T as ClementineAggregator>::get_entity_statuses(
5266 &inner,
5267 request,
5268 )
5269 .await
5270 };
5271 Box::pin(fut)
5272 }
5273 }
5274 let accept_compression_encodings = self.accept_compression_encodings;
5275 let send_compression_encodings = self.send_compression_encodings;
5276 let max_decoding_message_size = self.max_decoding_message_size;
5277 let max_encoding_message_size = self.max_encoding_message_size;
5278 let inner = self.inner.clone();
5279 let fut = async move {
5280 let method = GetEntityStatusesSvc(inner);
5281 let codec = tonic::codec::ProstCodec::default();
5282 let mut grpc = tonic::server::Grpc::new(codec)
5283 .apply_compression_config(
5284 accept_compression_encodings,
5285 send_compression_encodings,
5286 )
5287 .apply_max_message_size_config(
5288 max_decoding_message_size,
5289 max_encoding_message_size,
5290 );
5291 let res = grpc.unary(method, req).await;
5292 Ok(res)
5293 };
5294 Box::pin(fut)
5295 }
5296 "/clementine.ClementineAggregator/InternalGetEmergencyStopTx" => {
5297 #[allow(non_camel_case_types)]
5298 struct InternalGetEmergencyStopTxSvc<T: ClementineAggregator>(
5299 pub Arc<T>,
5300 );
5301 impl<
5302 T: ClementineAggregator,
5303 > tonic::server::UnaryService<super::GetEmergencyStopTxRequest>
5304 for InternalGetEmergencyStopTxSvc<T> {
5305 type Response = super::GetEmergencyStopTxResponse;
5306 type Future = BoxFuture<
5307 tonic::Response<Self::Response>,
5308 tonic::Status,
5309 >;
5310 fn call(
5311 &mut self,
5312 request: tonic::Request<super::GetEmergencyStopTxRequest>,
5313 ) -> Self::Future {
5314 let inner = Arc::clone(&self.0);
5315 let fut = async move {
5316 <T as ClementineAggregator>::internal_get_emergency_stop_tx(
5317 &inner,
5318 request,
5319 )
5320 .await
5321 };
5322 Box::pin(fut)
5323 }
5324 }
5325 let accept_compression_encodings = self.accept_compression_encodings;
5326 let send_compression_encodings = self.send_compression_encodings;
5327 let max_decoding_message_size = self.max_decoding_message_size;
5328 let max_encoding_message_size = self.max_encoding_message_size;
5329 let inner = self.inner.clone();
5330 let fut = async move {
5331 let method = InternalGetEmergencyStopTxSvc(inner);
5332 let codec = tonic::codec::ProstCodec::default();
5333 let mut grpc = tonic::server::Grpc::new(codec)
5334 .apply_compression_config(
5335 accept_compression_encodings,
5336 send_compression_encodings,
5337 )
5338 .apply_max_message_size_config(
5339 max_decoding_message_size,
5340 max_encoding_message_size,
5341 );
5342 let res = grpc.unary(method, req).await;
5343 Ok(res)
5344 };
5345 Box::pin(fut)
5346 }
5347 "/clementine.ClementineAggregator/Vergen" => {
5348 #[allow(non_camel_case_types)]
5349 struct VergenSvc<T: ClementineAggregator>(pub Arc<T>);
5350 impl<
5351 T: ClementineAggregator,
5352 > tonic::server::UnaryService<super::Empty> for VergenSvc<T> {
5353 type Response = super::VergenResponse;
5354 type Future = BoxFuture<
5355 tonic::Response<Self::Response>,
5356 tonic::Status,
5357 >;
5358 fn call(
5359 &mut self,
5360 request: tonic::Request<super::Empty>,
5361 ) -> Self::Future {
5362 let inner = Arc::clone(&self.0);
5363 let fut = async move {
5364 <T as ClementineAggregator>::vergen(&inner, request).await
5365 };
5366 Box::pin(fut)
5367 }
5368 }
5369 let accept_compression_encodings = self.accept_compression_encodings;
5370 let send_compression_encodings = self.send_compression_encodings;
5371 let max_decoding_message_size = self.max_decoding_message_size;
5372 let max_encoding_message_size = self.max_encoding_message_size;
5373 let inner = self.inner.clone();
5374 let fut = async move {
5375 let method = VergenSvc(inner);
5376 let codec = tonic::codec::ProstCodec::default();
5377 let mut grpc = tonic::server::Grpc::new(codec)
5378 .apply_compression_config(
5379 accept_compression_encodings,
5380 send_compression_encodings,
5381 )
5382 .apply_max_message_size_config(
5383 max_decoding_message_size,
5384 max_encoding_message_size,
5385 );
5386 let res = grpc.unary(method, req).await;
5387 Ok(res)
5388 };
5389 Box::pin(fut)
5390 }
5391 _ => {
5392 Box::pin(async move {
5393 let mut response = http::Response::new(empty_body());
5394 let headers = response.headers_mut();
5395 headers
5396 .insert(
5397 tonic::Status::GRPC_STATUS,
5398 (tonic::Code::Unimplemented as i32).into(),
5399 );
5400 headers
5401 .insert(
5402 http::header::CONTENT_TYPE,
5403 tonic::metadata::GRPC_CONTENT_TYPE,
5404 );
5405 Ok(response)
5406 })
5407 }
5408 }
5409 }
5410 }
5411 impl<T> Clone for ClementineAggregatorServer<T> {
5412 fn clone(&self) -> Self {
5413 let inner = self.inner.clone();
5414 Self {
5415 inner,
5416 accept_compression_encodings: self.accept_compression_encodings,
5417 send_compression_encodings: self.send_compression_encodings,
5418 max_decoding_message_size: self.max_decoding_message_size,
5419 max_encoding_message_size: self.max_encoding_message_size,
5420 }
5421 }
5422 }
5423 pub const SERVICE_NAME: &str = "clementine.ClementineAggregator";
5425 impl<T> tonic::server::NamedService for ClementineAggregatorServer<T> {
5426 const NAME: &'static str = SERVICE_NAME;
5427 }
5428}