-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathlib.rs
More file actions
79 lines (68 loc) · 2.51 KB
/
lib.rs
File metadata and controls
79 lines (68 loc) · 2.51 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#![deny(trivial_numeric_casts, warnings)]
#![allow(broken_intra_doc_links)]
#![allow(
clippy::too_many_arguments,
clippy::implicit_hasher,
clippy::module_inception,
clippy::new_without_default
)]
extern crate log;
mod app_conn;
mod connect;
mod identity;
mod types;
/// Utils for random generation of types
pub mod gen;
/// Utils for serializing and deserializing
pub mod ser_utils {
pub use common::ser_utils::*;
pub use proto::ser_string::*;
}
/// Common types
pub mod common {
pub use crypto::identity::derive_public_key;
pub use proto::app_server::messages::{NamedRelayAddress, RelayAddress};
pub use proto::crypto::{
HashResult, HashedLock, InvoiceId, PaymentId, PlainLock, PrivateKey, PublicKey, RandValue,
Signature, Uid,
};
pub use proto::funder::messages::{
Commit, Currency, FriendsRoute, PaymentStatus, PaymentStatusSuccess, Rate, Receipt,
};
pub use proto::index_server::messages::{
MultiRoute, NamedIndexServerAddress, RouteCapacityRate,
};
pub use proto::net::messages::NetAddress;
}
/// Common Offset files:
pub use proto::file;
/// Offset connection
pub mod conn {
pub use super::app_conn::{buyer, config, routes, seller};
pub use super::connect::{connect, AppConnTuple, ConnPairApp, ConnectError};
pub use super::identity::{identity_from_file, IdentityFromFileError};
pub use proto::app_server::messages::{
AppPermissions, AppRequest, AppServerToApp, AppToAppServer,
};
pub use proto::funder::messages::{RequestResult, ResponseClosePayment};
pub use proto::index_client::messages::{ClientResponseRoutes, ResponseRoutesResult};
}
// TODO: Possibly reduce what we export from report in the future?
/// Report related types
pub mod report {
pub use proto::report::messages::{
AddFriendReport, ChannelConsistentReport, ChannelInconsistentReport, ChannelStatusReport,
CurrencyConfigReport, CurrencyReport, FriendLivenessReport, FriendReport,
FriendStatusReport, FunderReport, McBalanceReport, MoveTokenHashedReport,
RequestsStatusReport, ResetTermsReport,
};
pub use proto::funder::messages::{
BalanceInfo, CountersInfo, CurrencyBalance, CurrencyBalanceInfo, McInfo, TokenInfo,
};
pub use proto::app_server::messages::NodeReport;
pub use proto::index_client::messages::{AddIndexServer, IndexClientReport};
}
/// Verification functions
pub mod verify {
pub use signature::verify::{verify_commit, verify_move_token_hashed_report, verify_receipt};
}