Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Bifrost | 200 | 2 days ago | 9 | gpl-3.0 | Rust | |||||
A parachain focused on building bridges of chains based on PoS consensus. | ||||||||||
Layr | 51 | 5 years ago | 14 | JavaScript | ||||||
A decentralized (p2p) file storage system built atop Kademlia DHT that enforces data integrity, privacy, and availability through sharding, proofs of retrievability, redundancy, and encryption, with smart-contract powered incentive scheme | ||||||||||
Jelectrum | 39 | a year ago | 11 | mit | Java | |||||
An Electrum Server written in Java | ||||||||||
Blockcloud | 27 | 5 years ago | C | |||||||
An advanced Blockchain-based TCP/IP. | ||||||||||
Structured P2p Overlay Network | 11 | 4 years ago | gpl-3.0 | Python | ||||||
Final Year Project @HKU Department of Computer Science | HGFRR includes a new peer-to-peer network protocol that improves communication efficiency and security among peers, and an implementation of a fast, secure blockchain system on top of this P2P network. | ||||||||||
Go Blockchain | 11 | 6 years ago | Go | |||||||
Blockchain simulator written in Go | ||||||||||
Electrum | 9 | 5 years ago | mit | Go | ||||||
Electrum protocol client | ||||||||||
Blockchainserver | 8 | 6 years ago | C++ | |||||||
Blockchainserver implementation. | ||||||||||
Adnl Rs | 7 | 4 months ago | Rust | |||||||
ADNL implementation in Rust | ||||||||||
Modood.github.io | 6 | 3 years ago | other | HTML | ||||||
Blogs are here to stay. |
Minimal ADNL implementation in Rust (client-server only, without p2p for now). Specification of ADNL is available here.
Feature | Implemented? |
---|---|
ADNL Client | ✅ |
ADNL Server | ❌ |
ADNL P2P | ❌ |
no_std | ✅ |
ed25519 libs | curve25519_dalek + x25519_dalek |
Run this example: cargo run --example time --features "std dalek"
use adnl::{AdnlBuilder, AdnlClient};
use std::error::Error;
use std::net::{SocketAddrV4, TcpStream};
use x25519_dalek::StaticSecret;
pub fn connect(
ls_public: &str,
ls_ip: &str,
ls_port: u16,
) -> Result<AdnlClient<TcpStream>, Box<dyn Error>> {
// decode liteserver public key
let remote_public: [u8; 32] = base64::decode(ls_public)?
.try_into()
.map_err(|_| "bad public key length")?;
// generate private key
let local_secret = StaticSecret::new(rand::rngs::OsRng);
// use TcpStream as a transport for our ADNL connection
let transport = TcpStream::connect(SocketAddrV4::new(ls_ip.parse()?, ls_port))?;
// build handshake using random session keys, encrypt it with ECDH(local_secret, remote_public)
// then perform handshake over our TcpStream
let client = AdnlBuilder::with_random_aes_params(&mut rand::rngs::OsRng)
.perform_ecdh(local_secret, remote_public)
.perform_handshake(transport)
.map_err(|e| format!("{:?}", e))?;
Ok(client)
}
fn main() -> Result<(), Box<dyn Error>> {
// create AdnlClient
let mut client = connect(
"JhXt7H1dZTgxQTIyGiYV4f9VUARuDxFl/1kVBjLSMB8=",
"65.21.74.140",
46427,
)?;
// already serialized TL with gettime query
let mut query = hex::decode("7af98bb435263e6c95d6fecb497dfd0aa5f031e7d412986b5ce720496db512052e8f2d100cdf068c7904345aad16000000000000")?;
// send over ADNL, use random nonce
client
.send(&mut query, &mut rand::random())
.map_err(|e| format!("{:?}", e))?;
// receive result into vector, use 8192 bytes buffer
let mut result = Vec::<u8>::new();
client
.receive::<_, 8192>(&mut result)
.map_err(|e| format!("{:?}", e))?;
// get time from serialized TL answer
println!(
"received: {}",
u32::from_le_bytes(result[result.len() - 7..result.len() - 3].try_into()?)
);
Ok(())
}