Secure peer-to-peer connectivity between dApps and wallets
- Privacy-first, end-to-end encrypted, no metrics, no tracking
- No central dependency, rather a variety of signaling layers
- Peer-to-peer transport via WebRTC (or other transport layers)
- Reuse of existing infrastructure and p2p standards
- User control over connection & configuration
[dependencies]
openlv = "0.1.0"use openlv::prelude::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let dapp = openlv::dapp()
.protocol(Protocol::Ntfy)
.server("https://ntfy.sh/")
.on_request(|msg| async move {
println!("received: {msg}");
Ok(json!({"result": "ok"}))
})
.await?;
dapp.connect().await?;
println!("Connection URL: {}", dapp.uri());
dapp.wait_for_link().await?;
let resp = dapp.send(json!({"method": "eth_chainId", "params": []})).await?;
println!("Response: {resp}");
dapp.close().await?;
Ok(())
}use openlv::prelude::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let wallet = openlv::wallet("openlv://...")
.on_request(|msg| async move {
println!("received: {msg}");
Ok(json!({"result": "ok"}))
})
.await?;
wallet.connect().await?;
wallet.wait_for_link().await?;
println!("Connected!");
wallet.close().await?;
Ok(())
}A secure privacy-first protocol for establishing peer-to-peer JSON-RPC connectivity between decentralized applications (dApps) and cryptocurrency wallets.
Open Lavatory Protocol eliminates centralized relay servers by enabling direct peer-to-peer connections between decentralized applications (dApps) and cryptocurrency wallets. Using public signaling servers for initial handshake and WebRTC combined with asymmetric encryption, it prioritizes privacy and self-sovereignty.
Head to the documentation to learn more about openlv.
This repository includes the following packages:
| Package | Description |
|---|---|
| openlv |
| Examples | Description |
|---|---|
| wallet | |
| dapp |