hyli-net 0.15.0

Hyli network SDK
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::tcp::{tcp_client::TcpClient, tcp_server::TcpServer, TcpMessageLabel};
use borsh::{BorshDeserialize, BorshSerialize};
use sdk::Transaction;

#[derive(Debug, Clone, BorshSerialize, BorshDeserialize, Eq, PartialEq, TcpMessageLabel)]
pub enum TcpServerMessage {
    NewTx(Transaction),
}

#[derive(Debug, Clone, BorshSerialize, BorshDeserialize, Eq, PartialEq, TcpMessageLabel)]
pub struct TcpServerResponse;

pub type TcpApiServer = TcpServer<TcpServerMessage, TcpServerResponse>;
pub type TcpApiClient = TcpClient<TcpServerMessage, TcpServerResponse>;