@openreceive/http 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 CHANGED
@@ -1,13 +1,35 @@
1
1
  # @openreceive/http
2
2
 
3
- Framework-neutral receive-checkout handler. Its normal form requires `service`,
4
- `authorize`, and the `host` integration. Create bodies never accept payer
5
- amounts; the host's `amountFor` hook is the only price authority, and the
6
- commit hook appends a payment-attempt row before the invoice is returned.
3
+ Add Bitcoin Lightning checkout to your Node.js application while keeping
4
+ your orders, prices, and fulfillment in your own code. This package provides
5
+ the Web Request/Response handler and payment repository used by the Express,
6
+ Fastify, and Next.js adapters, with payment attempts stored in your existing
7
+ database.
8
+
9
+ OpenReceive supports optional swaps from **USDT, USDC, SOL, and ETH** through
10
+ a configured swap provider. The provider converts the payment to **BTC over
11
+ Lightning**, which settles into the merchant's connected wallet. Available
12
+ assets and networks depend on the provider; swaps are optional.
13
+
14
+ ## Install
7
15
 
8
16
  This package is ESM-only and requires Node >= 22.
9
17
 
10
- `createHost({ db, amountFor, onPaid })` builds that
18
+ ```sh
19
+ npm install @openreceive/http
20
+ ```
21
+
22
+ Start with the [integration quickstart](https://github.com/openreceive/openreceive/blob/master/docs/guides/quickstart-node.md)
23
+ and the [payment storage guide](https://github.com/openreceive/openreceive/blob/master/docs/guides/storage.md).
24
+
25
+ ## Connect your application
26
+
27
+ For Express, Fastify, or Next.js, start with the matching adapter; each uses
28
+ this handler and repository. For a custom Node.js host, compose `service`,
29
+ `authorize`, and the `host` integration. Amounts come from your server, and
30
+ a payment attempt is committed before checkout instructions are returned.
31
+
32
+ `createHost({ db, amountFor, onPaid })` builds the
11
33
  host integration on the library-owned payment repository inside the host
12
34
  application's existing database (pg, node:sqlite, better-sqlite3, or a custom
13
35
  adapter). The library owns attempt selection, per-reference commit locking,
@@ -54,4 +76,5 @@ here (`npm run check:public-api` pins both surfaces):
54
76
  `WirePaymentCheck`, `WireError`, …), generated from the
55
77
  OpenAPI contract. The adapters re-export these too.
56
78
 
57
- See the root README, the storage guide, and the OpenAPI contract.
79
+ See the [API reference](https://github.com/openreceive/openreceive/blob/master/docs/guides/api-reference.md)
80
+ and [HTTP contract](https://github.com/openreceive/openreceive/blob/master/spec/openapi/openreceive-http.v1.yaml).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openreceive/http",
3
- "version": "0.4.5",
4
- "description": "Framework-neutral (Web Request/Response) HTTP handler for OpenReceive checkout that builds on @openreceive/node and requires its Node runtime: request routing, host integration, and payment-attempt persistence.",
3
+ "version": "0.4.6",
4
+ "description": "Node.js HTTP routes and payment storage for Bitcoin Lightning checkout, with optional USDT, USDC, SOL and ETH swaps.",
5
5
  "keywords": [
6
6
  "bitcoin",
7
7
  "lightning",
@@ -17,8 +17,8 @@
17
17
  "main": "./dist/index.js",
18
18
  "types": "./dist/index.d.ts",
19
19
  "dependencies": {
20
- "@openreceive/core": "0.4.5",
21
- "@openreceive/node": "0.4.5"
20
+ "@openreceive/core": "0.4.6",
21
+ "@openreceive/node": "0.4.6"
22
22
  },
23
23
  "exports": {
24
24
  ".": {
@@ -1,6 +1,6 @@
1
1
  # OpenReceive agent directions (BTCPay Server)
2
2
 
3
- These directions describe OpenReceive 0.4.5.
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.5.
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.5.
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.5.
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.5.
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.5.
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.5.
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.5.
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.5.
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.5.
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