@openreceive/node 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -1
- package/package.json +3 -3
- package/skills/integrate-openreceive/references/btcpay.md +1 -1
- package/skills/integrate-openreceive/references/django.md +1 -1
- package/skills/integrate-openreceive/references/fastapi.md +1 -1
- package/skills/integrate-openreceive/references/fastify.md +1 -1
- package/skills/integrate-openreceive/references/laravel.md +1 -1
- package/skills/integrate-openreceive/references/next.md +1 -1
- package/skills/integrate-openreceive/references/node.md +1 -1
- package/skills/integrate-openreceive/references/php.md +1 -1
- package/skills/integrate-openreceive/references/rails.md +1 -1
- package/skills/integrate-openreceive/references/woocommerce.md +24 -1
package/README.md
CHANGED
|
@@ -1,7 +1,50 @@
|
|
|
1
1
|
# @openreceive/node
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Accept Bitcoin Lightning payments directly into a wallet you control from
|
|
4
|
+
your Node.js application. This package connects to your receive-only Nostr
|
|
5
|
+
Wallet Connect (NWC) wallet, creates invoices, checks settlement, and provides
|
|
6
|
+
the swap service and command-line tools.
|
|
7
|
+
|
|
8
|
+
OpenReceive supports optional swaps from **USDT, USDC, SOL, and ETH** through
|
|
9
|
+
a configured swap provider. The provider converts the payment to **BTC over
|
|
10
|
+
Lightning**, which settles into the merchant's connected wallet. Available
|
|
11
|
+
assets and networks depend on the provider; swaps are optional.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
4
14
|
|
|
5
15
|
This package is ESM-only and requires Node >= 22.
|
|
6
16
|
|
|
17
|
+
```sh
|
|
18
|
+
npm install @openreceive/node
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Start with the [integration quickstart](https://github.com/openreceive/openreceive/blob/master/docs/guides/quickstart-node.md)
|
|
22
|
+
and the [payment storage guide](https://github.com/openreceive/openreceive/blob/master/docs/guides/storage.md).
|
|
23
|
+
|
|
7
24
|
Part of [OpenReceive](https://openreceive.org). Start with the [Node quickstart](https://github.com/openreceive/openreceive/blob/master/docs/guides/quickstart-node.md); the full API is in the [API reference](https://github.com/openreceive/openreceive/blob/master/docs/guides/api-reference.md).
|
|
25
|
+
|
|
26
|
+
## Choose your integration
|
|
27
|
+
|
|
28
|
+
For a web checkout, install `@openreceive/express`, `@openreceive/fastify`, or
|
|
29
|
+
`@openreceive/next`. They use this service and add payment persistence,
|
|
30
|
+
authorization, and mounted routes. For a custom Node.js host, compose the
|
|
31
|
+
service with `@openreceive/http`.
|
|
32
|
+
|
|
33
|
+
Use this package directly when you need the service or its types as part of
|
|
34
|
+
that integration. The service does not persist payment attempts on its own.
|
|
35
|
+
The normal HTTP integration records them in your existing database before
|
|
36
|
+
exposing payment instructions.
|
|
37
|
+
|
|
38
|
+
- **Connect your wallet:** set `NWC_URI` on the server to a receive-only NWC
|
|
39
|
+
connection. Startup checks reject spend-capable connections by default.
|
|
40
|
+
- **Enable optional swaps:** configure your provider through `LSC_URI_PRIMARY`
|
|
41
|
+
and optionally `LSC_URI_BACKUP`.
|
|
42
|
+
- **Keep your business logic:** the host controls orders, prices,
|
|
43
|
+
authorization, and fulfillment.
|
|
44
|
+
|
|
45
|
+
## Guides
|
|
46
|
+
|
|
47
|
+
- [Environment and wallet configuration](https://github.com/openreceive/openreceive/blob/master/docs/guides/environment-variables.md)
|
|
48
|
+
- [Optional swaps](https://github.com/openreceive/openreceive/blob/master/docs/guides/automated-swaps.md)
|
|
49
|
+
- [Test with a fake wallet](https://github.com/openreceive/openreceive/blob/master/docs/guides/host-testing.md)
|
|
50
|
+
- [Deploy and reconcile payments](https://github.com/openreceive/openreceive/blob/master/docs/guides/deploying.md)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openreceive/node",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.4.6",
|
|
4
|
+
"description": "Accept Bitcoin Lightning payments in Node.js with your own wallet and optional USDT, USDC, SOL and ETH swaps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bitcoin",
|
|
7
7
|
"lightning",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@getalby/sdk": "^8.0.3",
|
|
20
|
-
"@openreceive/core": "0.4.
|
|
20
|
+
"@openreceive/core": "0.4.6"
|
|
21
21
|
},
|
|
22
22
|
"bin": {
|
|
23
23
|
"openreceive": "./bin/openreceive.mjs"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (BTCPay Server)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.6.
|
|
4
4
|
|
|
5
5
|
Connect a BTCPay Server store to a receive-only NWC wallet with the OpenReceive
|
|
6
6
|
plugin, and optionally let payers pay BTCPay invoices with USDT, USDC, ETH or
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Django)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.6.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Django project — the app you are already working in. You
|
|
6
6
|
do not need a copy of the OpenReceive source: the Python package is on PyPI
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (FastAPI)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.6.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a FastAPI application — the app you are already working in.
|
|
6
6
|
You do not need a copy of the OpenReceive source: the engine is on PyPI
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Fastify)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.6.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Fastify application — the app you are already working in.
|
|
6
6
|
You do not need a copy of the OpenReceive source: the packages are on npm, and
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Laravel)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.6.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Laravel application — the app you are already working in.
|
|
6
6
|
You do not need a copy of the OpenReceive source: the package is on Packagist
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Next.js)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.6.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Next.js App Router application — the app you are already
|
|
6
6
|
working in. You do not need a copy of the OpenReceive source: the packages are
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Node.js)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.6.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Node application — the app you are already working in. You
|
|
6
6
|
do not need a copy of the OpenReceive source: the packages are on npm, and the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (PHP)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.6.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a PHP application — the app you are already working in. You
|
|
6
6
|
do not need a copy of the OpenReceive source: the engine is on Packagist
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Rails)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.6.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Rails application — the app you are already working in. You
|
|
6
6
|
do not need a copy of the OpenReceive source: the gem is on RubyGems, the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (WordPress + WooCommerce)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.6.
|
|
4
4
|
|
|
5
5
|
Install and configure the OpenReceive gateway in the existing WooCommerce
|
|
6
6
|
store. Preserve its theme, checkout, customer accounts, order model and prices.
|
|
@@ -90,6 +90,29 @@ Requirements: WordPress 6.6+, WooCommerce 9+, 64-bit PHP 8.2+ with GMP and sodiu
|
|
|
90
90
|
and MySQL 8 or MariaDB 10.5+. Activation creates payment-attempt tables in the
|
|
91
91
|
existing WordPress database. No separate database or application is required.
|
|
92
92
|
|
|
93
|
+
### Get the installable archive
|
|
94
|
+
|
|
95
|
+
Use `openreceive-wordpress-<version>.zip` from the selected
|
|
96
|
+
[OpenReceive GitHub release](https://github.com/OpenReceive/openreceive/releases)
|
|
97
|
+
when that asset is listed. A GitHub source-code zip is not the plugin archive.
|
|
98
|
+
If the release does not yet provide a built zip, build it on a development
|
|
99
|
+
machine with Node 22+, PHP 8.2+, Composer and WP-CLI:
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
git clone https://github.com/OpenReceive/openreceive.git
|
|
103
|
+
cd openreceive
|
|
104
|
+
git checkout <release-tag>
|
|
105
|
+
npm ci
|
|
106
|
+
npm run build:packages
|
|
107
|
+
composer install --working-dir=packages/php/wordpress
|
|
108
|
+
npm run release:wordpress:build
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Upload the resulting `dist/openreceive-wordpress-<version>.zip`. WP-CLI must be
|
|
112
|
+
on `PATH`, or set `OPENRECEIVE_WP_CLI` to the absolute path of its phar. The
|
|
113
|
+
WordPress server needs neither Node nor Composer: dependencies and checkout
|
|
114
|
+
assets are bundled inside the built plugin.
|
|
115
|
+
|
|
93
116
|
### Configure the wallet
|
|
94
117
|
|
|
95
118
|
Open **WooCommerce → Settings → Payments → OpenReceive**. Enter a receive-only
|