aboutsummaryrefslogtreecommitdiff
path: root/p2p/examples
diff options
context:
space:
mode:
authorhozan23 <hozan23@karyontech.net>2024-05-20 12:52:21 +0200
committerhozan23 <hozan23@karyontech.net>2024-05-20 12:52:21 +0200
commit64c23e7425b277729170356e618b6e1a763962dc (patch)
tree2ad1519cc5a88209c9804f600ca53a4a7cc420dd /p2p/examples
parent97629ecb9e4723e5b30b08e757ac3478f9a8746a (diff)
p2p: rexport keypair module from karyon_core
Diffstat (limited to 'p2p/examples')
-rw-r--r--p2p/examples/chat.rs5
-rw-r--r--p2p/examples/monitor.rs9
-rw-r--r--p2p/examples/peer.rs9
3 files changed, 12 insertions, 11 deletions
diff --git a/p2p/examples/chat.rs b/p2p/examples/chat.rs
index 4eafb07..d120f50 100644
--- a/p2p/examples/chat.rs
+++ b/p2p/examples/chat.rs
@@ -7,10 +7,9 @@ use async_trait::async_trait;
use clap::Parser;
use smol::{channel, Executor};
-use karyon_core::crypto::{KeyPair, KeyPairType};
-use karyon_net::{Endpoint, Port};
-
use karyon_p2p::{
+ endpoint::{Endpoint, Port},
+ keypair::{KeyPair, KeyPairType},
protocol::{ArcProtocol, Protocol, ProtocolEvent, ProtocolID},
ArcPeer, Backend, Config, P2pError, Version,
};
diff --git a/p2p/examples/monitor.rs b/p2p/examples/monitor.rs
index 019f751..5da55aa 100644
--- a/p2p/examples/monitor.rs
+++ b/p2p/examples/monitor.rs
@@ -5,10 +5,11 @@ use std::sync::Arc;
use clap::Parser;
use smol::{channel, Executor};
-use karyon_core::crypto::{KeyPair, KeyPairType};
-use karyon_net::{Endpoint, Port};
-
-use karyon_p2p::{Backend, Config};
+use karyon_p2p::{
+ endpoint::{Endpoint, Port},
+ keypair::{KeyPair, KeyPairType},
+ Backend, Config,
+};
use shared::run_executor;
diff --git a/p2p/examples/peer.rs b/p2p/examples/peer.rs
index db747c9..77bf732 100644
--- a/p2p/examples/peer.rs
+++ b/p2p/examples/peer.rs
@@ -5,10 +5,11 @@ use std::sync::Arc;
use clap::Parser;
use smol::{channel, Executor};
-use karyon_core::crypto::{KeyPair, KeyPairType};
-use karyon_net::{Endpoint, Port};
-
-use karyon_p2p::{Backend, Config};
+use karyon_p2p::{
+ endpoint::{Endpoint, Port},
+ keypair::{KeyPair, KeyPairType},
+ Backend, Config,
+};
use shared::run_executor;