Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Lavatory

Secure peer-to-peer connectivity between dApps and wallets

Documentation: openlv.sh Status: In Development Tests: Passing License: LGPL-3.0


Features

  • 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

Quickstart

[dependencies]
openlv = "0.1.0"

dApp (host)

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(())
}

Wallet (client)

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(())
}

Overview

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.

Documentation

Head to the documentation to learn more about openlv.

Repository Structure

This repository includes the following packages:

Package Description
openlv crates
Examples Description
wallet
dapp

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages