Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aryanj-nyc/lnd-rest-client
https://github.com/aryanj-nyc/lnd-rest-client
Last synced: about 7 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/aryanj-nyc/lnd-rest-client
- Owner: AryanJ-NYC
- License: mit
- Created: 2020-08-01T18:53:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T20:40:29.000Z (almost 2 years ago)
- Last Synced: 2024-10-31T17:35:10.571Z (7 days ago)
- Language: TypeScript
- Size: 1.6 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LND REST Client
[![npm](https://img.shields.io/npm/v/lnd-rest-client?style=plastic)](https://www.npmjs.com/package/lnd-rest-client)
This project will wrap the entire [LND REST API](https://api.lightning.community/#lnd-rest-api-reference) for use in NodeJS. It is currently under development and accepting contributions.
## Installation
```bash
npm install lnd-rest-client
```or
```bash
yarn add lnd-rest-client
```## Usage
```typescript
import { LndRestClient } from 'lnd-rest-client';const lndRestClient = new LndRestClient(baseUrl, {
admin: process.env.ADMIN_MACAROON,
base: process.env.BASE_MACAROON,
invoice: process.env.INVOICE_MACAROON,
readonly: process.env.READ_ONLY_MACAROON,
});const paymentRequestInfo = await lndRestClient.getPaymentRequest(paymentRequest);
```## Local Development
Below is a list of commands you will probably find useful.
### `npm start` or `yarn start`
Runs the project in development/watch mode. Your project will be rebuilt upon changes.
Your library will be rebuilt if you make edits.
### `npm run build` or `yarn build`
Bundles the package to the `dist` folder.
The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).
### `npm test` or `yarn test`
Runs the test watcher (Jest) in an interactive mode.
By default, runs tests related to files changed since the last commit.