A ready-to-go library for integrating lightning payments into your application.
Romer is a non-custodial Lightning node in library form. Its central goal is to provide a small, simple, and straightforward interface that enables users to easily send and receive payments over the Lightning network.
The primary abstraction of the library is [Romer
][api_docs_romer], which can be constructed by providing
your c= api key to Rome::new
. Romer
can then be controlled via commands such as send
, receive
, list_payments
,
balance
, etc.
use romer::Romer;
fn main() {
let romer = Romer::new("my-api-key").unwrap();
// receive bitcoin by creating an invoice
let invoice = romer.receive(100_000, "alpaca socks").unwrap();
// send bitcoin by paying a lightning invoice
romer.send("INVOICE_STR").unwrap();
// see all payments sent and received
let payments = romer.list_payments();
// see balance information
let balance = romer.balance();
}
Romer itself is written in Rust and may therefore be natively added as a library dependency to any std
Rust program. However, beyond its Rust API it also offers language bindings for Swift, Kotlin, and Python based on the UniFFI.
The Minimum Supported Rust Version (MSRV) is currently 1.63.0.