Skip to main content
The ClementineAggregator service orchestrates the Clementine protocol by coordinating verifiers, operators, and watchtowers for deposits, withdrawals, and system setup.

GetNofnAggregatedXonlyPk

Returns the aggregated n-of-n x-only public key and number of verifiers. Request: Empty Response: NofnResponse
nofn_xonly_pk
bytes
required
Aggregated n-of-n x-only public key
num_verifiers
uint32
required
Number of verifiers participating

GetCompatibilityDataFromEntities

Returns compatibility data from all entities (operators, verifiers, aggregator). Request: Empty Response: EntitiesCompatibilityData
entities_compatibility_data
repeated EntityDataWithId
required
Compatibility data from each entity

GetCompatibilityParams

Returns protocol parameters that affect contract transactions, Citrea syncing, and version compatibility. Request: Empty Response: CompatibilityParamsRPC
protocol_paramset
string
required
Protocol parameter set in JSON format
security_council
string
required
Security council configuration
citrea_chain_id
uint32
required
Citrea chain identifier
clementine_version
string
required
Current Clementine version
bridge_circuit_constant
bytes
required
Bridge circuit constant value
sha256_bitvm_cache
bytes
required
SHA256 BitVM cache data

Setup

Sets up the system of verifiers, watchtowers, and operators. Request: Empty Response: VerifierPublicKeys
verifier_public_keys
repeated bytes
required
Array of verifier public keys
Process:
  1. Collects verifier keys from each verifier
  2. Distributes these verifier keys to all verifiers
  3. Collects all operator configs from each operator
  4. Distributes these operator configs to all verifiers
Usage: Called by the clementine-backend service during initial setup.

NewDeposit

Creates a new deposit by orchestrating the MuSig2 signing protocol across all verifiers. Request: Deposit
deposit_outpoint
Outpoint
required
User’s deposit UTXO
base_deposit
BaseDeposit
New original deposit request details
replacement_deposit
ReplacementDeposit
Replacement deposit details
Response: RawSignedTx
raw_tx
bytes
required
Raw signed move-to-vault transaction
Process:
  1. Calls DepositNonceGen for every verifier
  2. Aggregates nonces and sends to DepositSign
  3. Aggregates partial signatures and sends to DepositFinalize
  4. Calls operator to get their signatures
  5. Collects partial signatures and creates the move-to-vault transaction
Usage: Called by clementine-backend service to initiate a deposit.

Withdraw

Initiates a withdrawal by calling withdraw on specified operators or all operators. Request: AggregatorWithdrawalInput
withdrawal
WithdrawParamsWithSig
required
Withdrawal parameters with optional verification signature
operator_xonly_pks
repeated XOnlyPublicKeyRpc
required
List of operator x-only public keys to send withdrawal request to. If empty, sends to all operators.
Response: AggregatorWithdrawResponse
withdraw_responses
repeated OperatorWithrawalResponse
required
Response from each operator
Usage: Called by clementine-backend service to initiate a withdrawal.

OptimisticPayout

Performs an optimistic payout to reimburse a peg-out from Citrea. Request: OptimisticWithdrawParams
withdrawal
WithdrawParams
required
Withdrawal parameters
verification_signature
string
ECDSA signature from Citrea/aggregator for manual verification
Response: RawSignedTx
raw_tx
bytes
required
Raw signed optimistic payout transaction

InternalSendTx

Sends a pre-signed transaction to the network. Request: SendTxRequest
raw_tx
RawSignedTx
required
Raw signed transaction
fee_type
FeeType
required
Fee payment methodOptions:
  • CPFP - Child-Pays-For-Parent
  • RBF - Replace-By-Fee
  • NO_FUNDING - No additional fee funding
Response: Empty

SendMoveToVaultTx

Sends a move-to-vault transaction to the network. Request: SendMoveTxRequest
raw_tx
RawSignedTx
required
Raw signed move-to-vault transaction
deposit_outpoint
Outpoint
required
Associated deposit outpoint
Response: Txid
txid
bytes
required
Transaction ID of the broadcasted move-to-vault transaction

GetEntityStatuses

Returns the current status of all operators and verifiers. Request: GetEntityStatusesRequest
restart_tasks
bool
required
If true, restart stopped tasks on entities before returning status
Response: EntityStatuses
entity_statuses
repeated EntityStatusWithId
required
Status information for each entity

InternalGetEmergencyStopTx

Creates emergency stop transactions without broadcasting them. Request: GetEmergencyStopTxRequest
txids
repeated Txid
required
Array of transaction IDs to create emergency stop transactions for
Response: GetEmergencyStopTxResponse
txids
repeated Txid
required
Array of transaction IDs
encrypted_emergency_stop_txs
repeated bytes
required
Array of encrypted emergency stop transactions (approximately 3 sat/vbyte fee)
Transactions are not broadcasted. Set add_anchor to true to add an anchor output for CPFP.

Vergen

Returns version and build information. Request: Empty Response: VergenResponse
response
string
required
Version and build information string

Build docs developers (and LLMs) love