Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juancarlospaco/bitcoin-lightning
Open-source zero-fee no-download offline-capable anonymous instant micropayments platform with plugins Bitcoin Lightning ⚡️
https://github.com/juancarlospaco/bitcoin-lightning
bitcoin bitcoin-lightning-network cash cryptocurrency decentralized easy-to-use economy finance get-rich-slowly lightning-network nim nim-lang payment-integration sustainability web3
Last synced: 3 months ago
JSON representation
Open-source zero-fee no-download offline-capable anonymous instant micropayments platform with plugins Bitcoin Lightning ⚡️
- Host: GitHub
- URL: https://github.com/juancarlospaco/bitcoin-lightning
- Owner: juancarlospaco
- License: mit
- Created: 2022-08-24T19:26:51.000Z (over 2 years ago)
- Default Branch: nim
- Last Pushed: 2024-07-02T14:35:17.000Z (7 months ago)
- Last Synced: 2024-10-15T00:53:37.029Z (4 months ago)
- Topics: bitcoin, bitcoin-lightning-network, cash, cryptocurrency, decentralized, easy-to-use, economy, finance, get-rich-slowly, lightning-network, nim, nim-lang, payment-integration, sustainability, web3
- Language: Nim
- Homepage:
- Size: 392 KB
- Stars: 16
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Bitcoin Lightning client
- Open-source zero-fee no-download offline-capable anonymous instant micropayments platform with plugins.
![](https://camo.githubusercontent.com/073fa39391eedc7e9ecfaa28086d04c053f53b5f3661aecbb33a7a97cf2b7b5c/68747470733a2f2f692e696d6775722e636f6d2f4548764b364c712e706e67 "Add micropayments to any software with a one-liner")
![](https://raw.githubusercontent.com/juancarlospaco/bitcoin-lightning/nim/screenshot.png "Send, receive, withdraw and more")
![](https://raw.githubusercontent.com/juancarlospaco/bitcoin-lightning/nim/plugins.jpg "Tips, Donos, Paywalls, Bots, Tickets, Livestreams, Offline-Shop via plugins")
![](https://img.shields.io/github/languages/top/juancarlospaco/bitcoin-lightning?style=for-the-badge)
![](https://img.shields.io/github/stars/juancarlospaco/bitcoin-lightning?style=for-the-badge)
![](https://img.shields.io/github/languages/code-size/juancarlospaco/bitcoin-lightning?style=for-the-badge)
![](https://img.shields.io/github/issues-raw/juancarlospaco/bitcoin-lightning?style=for-the-badge "Bugs")
![](https://img.shields.io/github/issues-pr-raw/juancarlospaco/bitcoin-lightning?style=for-the-badge "PRs")
![](https://img.shields.io/github/last-commit/juancarlospaco/bitcoin-lightning?style=for-the-badge "Commits")# Offline
- DIY cardboard offline Bitcoin ATMs, Arduino/RaspberryPi.
![](https://camo.githubusercontent.com/2103250a9d68b0afe02ddd6f455666355a3fda21fd90862645ec043efea92055/68747470733a2f2f692e696d6775722e636f6d2f476936626e334c2e6a7067 "DIY cardboard offline Bitcoin ATMs")
https://user-images.githubusercontent.com/1653275/136722218-10bc7a5a-7194-4a38-8a54-86825bab704e.mp4
- [International payments over Radio](https://twitter.com/nvk/status/1101548727460741120).
![](https://raw.githubusercontent.com/juancarlospaco/bitcoin-lightning/nim/ln2radio.jpg)
# Shop
- Rural or mobile shops just need 1 QR, works even without internet (invoice via SMS) or electricity (QR or URL).
https://user-images.githubusercontent.com/1653275/166477530-63653087-dd5e-4843-ab64-79cfcb339fcf.mp4
# Example
```nim
import bitcoinlightning
let client: BitcoinLightning = newBitcoinLightning(apiKey = "YOUR_API_KEY_HERE")
echo client.getWallet() # Get your wallet.
echo client.getInvoice(amount = 666.Positive) # Receive (Sell).
echo client.payInvoice("YOUR_INVOICE_HERE") # Send (Pay).
```# ELI5
- **Receive money** with 1 new Bitcoin Lightning incoming invoice, thats just 1 `string` (or Link, or QR).
- **Send money** with 1 new Bitcoin Lightning outgoing invoice, thats just 1 `string` (or Link, or QR).# Design
- It does not use anything from Nim standard library, very future-proof.
- HTTPS JSON REST API, KISS. 1 file, <100 lines, zero dependencies, any target.
- Simple minimal API, all functions with 2 arguments max.Disclaimer
Bitcoin Lightning is decentralized, so theres multiple services,
but this way was the simplest and recommended approach as of 2022,
if you just want to build something that can be monetized quickly.
I investigated to use lntxbot but it has no HTTP API.
I investigated to use Bitrefill but it has no HTTP API.
I investigated to use Binance but it has no Lightning API.
Anyway the idea of the Lightning network is that the API server does not really matter,
because you can just send to any other Lightning wallet anywhere.
In the future, if better services appear, then the library can be changed.# FAQ
- I try to send a million USD/EUR and it fails?
It is a **lightweight API for MICROpayments**, use Bitcoin onchain for big amounts.
- I need to generate QR?
https://github.com/ThomasTJdev/nim_qr#examples
- I need more features, like other coins and more?
https://github.com/juancarlospaco/binance#binance
- Is this a web app?
HTTPS JSON REST API client.
# See also
- https://github.com/juancarlospaco/binance#binance
- https://github.com/juancarlospaco/tradingview#tradingview
- https://github.com/juancarlospaco/cloudbet#cloudbet# 💰➡️🍕
Bitcoin BTC
**BEP20 Binance Smart Chain Network BSC**
```
0xb78c4cf63274bb22f83481986157d234105ac17e
```
**BTC Bitcoin Network**
```
1Pnf45MgGgY32X4KDNJbutnpx96E4FxqVi
```
**Lightning Network**
```
[email protected]
```Ethereum ETH Dai DAI Uniswap UNI Axie Infinity AXS Smooth Love Potion SLP Uniswap UNI USDC
**BEP20 Binance Smart Chain Network BSC**
```
0xb78c4cf63274bb22f83481986157d234105ac17e
```
**ERC20 Ethereum Network**
```
0xb78c4cf63274bb22f83481986157d234105ac17e
```Tether USDT
**BEP20 Binance Smart Chain Network BSC**
```
0xb78c4cf63274bb22f83481986157d234105ac17e
```
**ERC20 Ethereum Network**
```
0xb78c4cf63274bb22f83481986157d234105ac17e
```
**TRC20 Tron Network**
```
TWGft53WgWvH2mnqR8ZUXq1GD8M4gZ4Yfu
```Solana SOL
**BEP20 Binance Smart Chain Network BSC**
```
0xb78c4cf63274bb22f83481986157d234105ac17e
```
**SOL Solana Network**
```
FKaPSd8kTUpH7Q76d77toy1jjPGpZSxR4xbhQHyCMSGq
```Cardano ADA
**BEP20 Binance Smart Chain Network BSC**
```
0xb78c4cf63274bb22f83481986157d234105ac17e
```
**ADA Cardano Network**
```
DdzFFzCqrht9Y1r4Yx7ouqG9yJNWeXFt69xavLdaeXdu4cQi2yXgNWagzh52o9k9YRh3ussHnBnDrg7v7W2hSXWXfBhbo2ooUKRFMieM
```Sandbox SAND Decentraland MANA
**ERC20 Ethereum Network**
```
0xb78c4cf63274bb22f83481986157d234105ac17e
```Algorand ALGO
**ALGO Algorand Network**
```
WM54DHVZQIQDVTHMPOH6FEZ4U2AU3OBPGAFTHSCYWMFE7ETKCUUOYAW24Q
```Polkadot DOT
**DOT Network**
```
13GdxHQbQA1K6i7Ctf781nQkhQhoVhGgUnrjn9EvcJnYWCEd
```
**BEP20 Binance Smart Chain Network BSC**
```
0xb78c4cf63274bb22f83481986157d234105ac17e
```Binance
[https://pay.binance.com/en/checkout/e92e536210fd4f62b426ea7ee65b49c3](https://pay.binance.com/en/checkout/e92e536210fd4f62b426ea7ee65b49c3 "Send via Binance Pay")
# Stars
![](https://starchart.cc/juancarlospaco/bitcoin-lightning.svg)
:star: [@luisacosta828](https://github.com/luisacosta828 '2022-08-26')
:star: [@juancarlospaco](https://github.com/juancarlospaco '2022-08-26')
:star: [@overtube](https://github.com/overtube '2022-08-27')
:star: [@adam-acosta](https://github.com/adam-acosta '2022-09-01')
:star: [@kirbylife](https://github.com/kirbylife '2022-09-01')
:star: [@22388o](https://github.com/22388o '2022-09-09')
:star: [@Miqueas](https://github.com/Miqueas '2022-09-19')
:star: [@codehangen](https://github.com/codehangen '2022-09-27')
:star: [@frankmoshe](https://github.com/frankmoshe '2022-11-04')
:star: [@hugosenari](https://github.com/hugosenari '2022-12-02')
:star: [@lf-araujo](https://github.com/lf-araujo '2023-01-01')
:star: [@eantho](https://github.com/eantho '2023-02-26')
:star: [@Bulli77](https://github.com/Bulli77 '2023-03-24')
:star: [@degaur](https://github.com/degaur '2023-07-19')
:star: [@catsuns](https://github.com/catsuns '2023-07-22')
:star: [@Shamulwa](https://github.com/Shamulwa '2023-09-21')
:star: [@xioren](https://github.com/xioren '2023-10-09')
:star: [@osascruz](https://github.com/osascruz '2023-10-18')
:star: [@nichdemos](https://github.com/nichdemos '2023-12-31')
:star: [@lucasnuic](https://github.com/lucasnuic '2024-05-03')
:star: [@ranjian0](https://github.com/ranjian0 '2024-07-02')