Giter VIP home page Giter VIP logo

ldk-node-rn's Introduction

LDK-Node

BDK RN is released under the MIT license. Docs Current npm package version. Issues Stars Forks Demo App

A React Native library for LDK Node, a ready-to-go Lightning node library built using LDK and BDK.

LDK Node is a non-custodial Lightning node. Its central goal is to provide a small, simple, and straightforward interface that enables users to easily set up and run a Lightning node with an integrated on-chain wallet. While minimalism is at its core, LDK Node aims to be sufficiently modular and configurable to be useful for a variety of use cases.

The primary abstraction of the library is the Node, which can be retrieved by setting up and configuring a Builder to your liking and calling build(). Node can then be controlled via commands such as start, stop, connectOpenChannel, sendPayment, etc.:

This release covers the same API from LDK Node 0.1.0 Rust. It has support for sourcing chain data via an Esplora server, filesystem persistence, gossip sourcing via the Lightning peer-to-peer network, and configurable entropy sources for the integrated LDK and BDK-based wallets.

Please note: This release is considered experimental, and should not be run in production

Installation

Using npm:

npm i --save ldk-node

Using yarn:

yarn add ldk-node

[IOS Only] Install pods:

npx pod-install
or
cd ios && pod install

Examples

Build, Start & Sync the local node

import {Builder, Config, Node} from 'ldk-node';
import {NetAddress} from 'ldk-node/lib/classes/Bindings';

// ....

// Your preferred `Esplora` url
const esploraUrl = https://blockstream.info/testnet/api;

// configuration options for the node
const config = await new Config().create('alice_node', 'regtest', new NetAddress('127.0.0.1', 5001));

const builder = await new Builder().fromConfig(config);
await builder.setEsploraServer(esploraUrl);

// Build node
const node: Node = await builder.build();

// Starting the node
await node.start();

// Syncing the node
await node.syncWallets();

References:

ldk-node-rn's People

Contributors

bitcoinzavior avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.