-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathresponse.rs
More file actions
45 lines (40 loc) · 1.09 KB
/
response.rs
File metadata and controls
45 lines (40 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
use alloy::{
primitives::{Address, B256},
rpc::types::beacon::BlsSignature,
};
use serde::{Deserialize, Serialize};
use crate::signer::{BlsPublicKey, EcdsaSignature};
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub struct BlsSignResponse {
pub pubkey: BlsPublicKey,
pub object_root: B256,
pub module_signing_id: B256,
pub signature: BlsSignature,
}
impl BlsSignResponse {
pub fn new(
pubkey: BlsPublicKey,
object_root: B256,
module_signing_id: B256,
signature: BlsSignature,
) -> Self {
Self { pubkey, object_root, module_signing_id, signature }
}
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub struct EcdsaSignResponse {
pub address: Address,
pub object_root: B256,
pub module_signing_id: B256,
pub signature: EcdsaSignature,
}
impl EcdsaSignResponse {
pub fn new(
address: Address,
object_root: B256,
module_signing_id: B256,
signature: EcdsaSignature,
) -> Self {
Self { address, object_root, module_signing_id, signature }
}
}