1use anyhow::anyhow;
2use derive_more::From;
3
4pub mod client;
5
6pub mod network;
7
8pub mod keys;
9
10pub mod transactions;
11
12pub mod flow {
13 pub mod access {
14 tonic::include_proto!("flow.access");
15 }
16
17 pub mod entities {
18 tonic::include_proto!("flow.entities");
19 }
20
21 pub mod execution {
22 tonic::include_proto!("flow.execution");
23 }
24
25 pub mod executiondata {
26 tonic::include_proto!("flow.executiondata");
27 }
28}
29
30#[derive(Debug, From)]
31pub enum Error {
32 #[from]
33 KeysError(keys::Error),
34 #[from]
35 TransactionsError(transactions::Error),
36 #[from]
37 ClientError(client::Error),
38}
39
40pub type Result<T> = std::result::Result<T, client::Error>;
41
42impl From<Error> for anyhow::Error {
43 fn from(value: Error) -> Self {
44 anyhow!(format!("{:?}", value))
45 }
46}