(
&mut self,
data: u64,
pubkey: BlsPublicKey,
proxy_bls: BlsPublicKey,
proxy_ecdsa: Option<Address>,
)
| 76 | } |
| 77 | |
| 78 | pub async fn send_request( |
| 79 | &mut self, |
| 80 | data: u64, |
| 81 | pubkey: BlsPublicKey, |
| 82 | proxy_bls: BlsPublicKey, |
| 83 | proxy_ecdsa: Option<Address>, |
| 84 | ) -> Result<()> { |
| 85 | let datagram = Datagram { data }; |
| 86 | |
| 87 | let request = SignConsensusRequest::builder(pubkey).with_msg(&datagram); |
| 88 | let signature = self.config.signer_client.request_consensus_signature(request).await?; |
| 89 | |
| 90 | info!("Proposer commitment (consensus): {}", signature); |
| 91 | |
| 92 | let proxy_request_bls = SignProxyRequest::builder(proxy_bls).with_msg(&datagram); |
| 93 | let proxy_signature_bls = |
| 94 | self.config.signer_client.request_proxy_signature_bls(proxy_request_bls).await?; |
| 95 | |
| 96 | info!("Proposer commitment (proxy BLS): {}", proxy_signature_bls); |
| 97 | |
| 98 | if let Some(proxy_ecdsa) = proxy_ecdsa { |
| 99 | let proxy_request_ecdsa = SignProxyRequest::builder(proxy_ecdsa).with_msg(&datagram); |
| 100 | let proxy_signature_ecdsa = self |
| 101 | .config |
| 102 | .signer_client |
| 103 | .request_proxy_signature_ecdsa(proxy_request_ecdsa) |
| 104 | .await?; |
| 105 | info!("Proposer commitment (proxy ECDSA): {}", proxy_signature_ecdsa); |
| 106 | } |
| 107 | |
| 108 | SIG_RECEIVED_COUNTER.inc(); |
| 109 | |
| 110 | Ok(()) |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | #[tokio::main] |
no test coverage detected