@openreceive/node 0.4.18 → 0.4.19
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/dist/{chunk-LD7HMUY3.js → chunk-6XUDLYM6.js} +1 -7
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/skills/integrate-openreceive/references/btcpay.md +4 -1
- package/skills/integrate-openreceive/references/django.md +23 -2
- package/skills/integrate-openreceive/references/fastapi.md +24 -2
- package/skills/integrate-openreceive/references/fastify.md +24 -2
- package/skills/integrate-openreceive/references/laravel.md +23 -2
- package/skills/integrate-openreceive/references/next.md +29 -2
- package/skills/integrate-openreceive/references/node.md +28 -2
- package/skills/integrate-openreceive/references/php.md +23 -2
- package/skills/integrate-openreceive/references/rails.md +23 -2
- package/skills/integrate-openreceive/references/woocommerce.md +7 -5
|
@@ -491,8 +491,6 @@ function unwrapNwcResult(value) {
|
|
|
491
491
|
}
|
|
492
492
|
|
|
493
493
|
// src/nwc/transport.ts
|
|
494
|
-
import { createRequire } from "node:module";
|
|
495
|
-
import { pathToFileURL } from "node:url";
|
|
496
494
|
import { recordOrEmpty as recordOrEmpty2 } from "@openreceive/core";
|
|
497
495
|
|
|
498
496
|
// src/nwc/history-request.ts
|
|
@@ -567,7 +565,6 @@ async function historyRequest(client, params, signal) {
|
|
|
567
565
|
}
|
|
568
566
|
|
|
569
567
|
// src/nwc/transport.ts
|
|
570
|
-
var require2 = createRequire(import.meta.url);
|
|
571
568
|
async function callRequiredMethod(client, names, request, options) {
|
|
572
569
|
for (const name of names) {
|
|
573
570
|
const method = client[name];
|
|
@@ -582,10 +579,7 @@ async function callRequiredMethod(client, names, request, options) {
|
|
|
582
579
|
}
|
|
583
580
|
async function createDefaultAlbyNwcClient(connectionString) {
|
|
584
581
|
ensureNodeWebSocket();
|
|
585
|
-
const
|
|
586
|
-
const namespace = recordOrEmpty2(
|
|
587
|
-
await dynamicImport(pathToFileURL(require2.resolve("@getalby/sdk/nwc")).href)
|
|
588
|
-
);
|
|
582
|
+
const namespace = recordOrEmpty2(await import("@getalby/sdk/nwc"));
|
|
589
583
|
const Constructor = namespace.NWCClient;
|
|
590
584
|
if (typeof Constructor !== "function") {
|
|
591
585
|
throw new WalletPreflightError(
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
summarizeReconcilePass,
|
|
20
20
|
summarizeSwapProviderApiRequest,
|
|
21
21
|
summarizeSwapProviderApiResponse
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-6XUDLYM6.js";
|
|
23
23
|
|
|
24
24
|
// src/index.ts
|
|
25
25
|
import { OpenReceiveError as OpenReceiveError2 } from "@openreceive/core";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openreceive/node",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.19",
|
|
4
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",
|
|
@@ -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.19"
|
|
21
21
|
},
|
|
22
22
|
"bin": {
|
|
23
23
|
"openreceive": "./bin/openreceive.mjs"
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/btcpay/full.md
|
|
|
17
17
|
- Never tick the spend-capable override to make a save succeed.
|
|
18
18
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.19.
|
|
21
21
|
|
|
22
22
|
Connect a BTCPay Server store to a receive-only NWC wallet with the OpenReceive
|
|
23
23
|
plugin, and optionally let payers pay BTCPay invoices with USDT, USDC, ETH or
|
|
@@ -125,6 +125,9 @@ needing attention. On a regtest machine, `packages/dotnet/docker/up.sh` then
|
|
|
125
125
|
`e2e.sh` in the OpenReceive repository proves the whole path end to end, and
|
|
126
126
|
that is the only situation where cloning the repository is the right move.
|
|
127
127
|
|
|
128
|
+
Setup ends when the health check is clean. Say "Setup is finished" in one
|
|
129
|
+
message. Do not offer more work or end the message on a question.
|
|
130
|
+
|
|
128
131
|
## More documentation
|
|
129
132
|
|
|
130
133
|
Fetch one when the moment comes. Each is raw markdown, so a plain GET is
|
|
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (Django)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 43 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/django/full.md
|
|
8
8
|
# Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
|
|
9
9
|
```
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/django/full.md
|
|
|
17
17
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
18
|
- Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.19.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to a Django project — the app you are already working in. You
|
|
23
23
|
do not need a copy of the OpenReceive source: the Python package is on PyPI
|
|
@@ -152,6 +152,24 @@ in-place `pip install -U` is undone by the next `compose up`.
|
|
|
152
152
|
|
|
153
153
|
Only then start the quickstart.
|
|
154
154
|
|
|
155
|
+
## After the quickstart — hand over, then stop
|
|
156
|
+
|
|
157
|
+
The quickstart is done when `python manage.py openreceive_doctor` is clean and
|
|
158
|
+
this app serves the checkout page for one of its orders. Doctor names any
|
|
159
|
+
failed check and exits nonzero; fix it before going on.
|
|
160
|
+
|
|
161
|
+
Give the user that checkout link. The browser check in the quickstart's
|
|
162
|
+
"Render the checkout" section (payment-method icons, wallet logos, a pay
|
|
163
|
+
tutorial) is theirs: tell them what to look at, and do not run it yourself.
|
|
164
|
+
|
|
165
|
+
You cannot pay the invoice: the code is receive-only. Do not pay, settle or
|
|
166
|
+
mark an order paid, and do not look for a way to (a wallet control port, a
|
|
167
|
+
test endpoint, another wallet). If the user wants a real settlement test, they
|
|
168
|
+
pay on that link from their own wallet, and `on_paid` marks the order paid.
|
|
169
|
+
|
|
170
|
+
Setup ends here. Say "Setup is finished" in one message, with the link and
|
|
171
|
+
what to check. Do not offer more work or end the message on a question.
|
|
172
|
+
|
|
155
173
|
## Non-negotiables
|
|
156
174
|
|
|
157
175
|
The quickstart below has the code. These are the rules it cannot state for
|
|
@@ -164,6 +182,9 @@ itself, and they hold for every integration.
|
|
|
164
182
|
logs, or assets.
|
|
165
183
|
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
166
184
|
into this chat; that is the supported path.
|
|
185
|
+
- Work only in this application. Never read or run anything from another
|
|
186
|
+
project on this machine (its `node_modules`, tools or source), for any
|
|
187
|
+
reason. A browser and Playwright are not part of setup.
|
|
167
188
|
- The host owns the price. `amount_for` reads it from your own data;
|
|
168
189
|
reject payer-supplied amounts.
|
|
169
190
|
- `authorize` runs on every request, and the `resource` it receives is a
|
|
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (FastAPI)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 37 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/fastapi/full.md
|
|
8
8
|
# Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
|
|
9
9
|
```
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/fastapi/full.md
|
|
|
17
17
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
18
|
- Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.19.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to a FastAPI application — the app you are already working in.
|
|
23
23
|
You do not need a copy of the OpenReceive source: the engine is on PyPI
|
|
@@ -145,6 +145,25 @@ saying why. Upgrade first.
|
|
|
145
145
|
|
|
146
146
|
Only then start the quickstart.
|
|
147
147
|
|
|
148
|
+
## After the quickstart — hand over, then stop
|
|
149
|
+
|
|
150
|
+
The quickstart is done when
|
|
151
|
+
`openreceive doctor --app <module>:app --url <app url>` is clean and this app
|
|
152
|
+
serves the checkout page for one of its orders. Doctor names any failed check
|
|
153
|
+
and exits nonzero; fix it before going on.
|
|
154
|
+
|
|
155
|
+
Give the user that checkout link. The browser check in the quickstart's step 6
|
|
156
|
+
(payment-method icons, wallet logos, a pay tutorial) is theirs: tell them what
|
|
157
|
+
to look at, and do not run it yourself.
|
|
158
|
+
|
|
159
|
+
You cannot pay the invoice: the code is receive-only. Do not pay, settle or
|
|
160
|
+
mark an order paid, and do not look for a way to (a wallet control port, a
|
|
161
|
+
test endpoint, another wallet). If the user wants a real settlement test, they
|
|
162
|
+
pay on that link from their own wallet, and `on_paid` marks the order paid.
|
|
163
|
+
|
|
164
|
+
Setup ends here. Say "Setup is finished" in one message, with the link and
|
|
165
|
+
what to check. Do not offer more work or end the message on a question.
|
|
166
|
+
|
|
148
167
|
## Non-negotiables
|
|
149
168
|
|
|
150
169
|
The quickstart below has the code. These are the rules it cannot state for
|
|
@@ -157,6 +176,9 @@ itself, and they hold for every integration.
|
|
|
157
176
|
logs, or assets.
|
|
158
177
|
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
159
178
|
into this chat; that is the supported path.
|
|
179
|
+
- Work only in this application. Never read or run anything from another
|
|
180
|
+
project on this machine (its `node_modules`, tools or source), for any
|
|
181
|
+
reason. A browser and Playwright are not part of setup.
|
|
160
182
|
- The host owns the price. `amount_for` reads it from your own data; reject
|
|
161
183
|
payer-supplied amounts.
|
|
162
184
|
- `authorize` runs on every request, and the `resource` it receives is a CLAIM
|
|
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (Fastify)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 36 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/fastify/full.md
|
|
8
8
|
# Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
|
|
9
9
|
```
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/fastify/full.md
|
|
|
17
17
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
18
|
- Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.19.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to a Fastify application — the app you are already working in.
|
|
23
23
|
You do not need a copy of the OpenReceive source: the packages are on npm, and
|
|
@@ -138,6 +138,25 @@ first.
|
|
|
138
138
|
|
|
139
139
|
Only then start the quickstart.
|
|
140
140
|
|
|
141
|
+
## After the quickstart — hand over, then stop
|
|
142
|
+
|
|
143
|
+
The quickstart is done when
|
|
144
|
+
`npx openreceive doctor --db <file-or-url> --url <app url>` is clean and this
|
|
145
|
+
app serves the checkout page for one of its orders. Doctor names any failed
|
|
146
|
+
check and exits nonzero; fix it before going on.
|
|
147
|
+
|
|
148
|
+
Give the user that checkout link. The browser check in the quickstart's step 6
|
|
149
|
+
(payment-method icons, wallet logos, a pay tutorial) is theirs: tell them what
|
|
150
|
+
to look at, and do not run it yourself.
|
|
151
|
+
|
|
152
|
+
You cannot pay the invoice: the code is receive-only. Do not pay, settle or
|
|
153
|
+
mark an order paid, and do not look for a way to (a wallet control port, a
|
|
154
|
+
test endpoint, another wallet). If the user wants a real settlement test, they
|
|
155
|
+
pay on that link from their own wallet, and `onPaid` marks the order paid.
|
|
156
|
+
|
|
157
|
+
Setup ends here. Say "Setup is finished" in one message, with the link and
|
|
158
|
+
what to check. Do not offer more work or end the message on a question.
|
|
159
|
+
|
|
141
160
|
## Non-negotiables
|
|
142
161
|
|
|
143
162
|
The quickstart below has the code. These are the rules it cannot state for
|
|
@@ -150,6 +169,9 @@ itself, and they hold for every integration.
|
|
|
150
169
|
logs, or assets.
|
|
151
170
|
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
152
171
|
into this chat; that is the supported path.
|
|
172
|
+
- Work only in this application. Never read or run anything from another
|
|
173
|
+
project on this machine (its `node_modules`, tools or source), for any
|
|
174
|
+
reason. A browser and Playwright are not part of setup.
|
|
153
175
|
- The host owns the price. `amountFor` reads it from your own data; reject
|
|
154
176
|
payer-supplied amounts.
|
|
155
177
|
- `authorize` runs on every request, and the `resource` it receives is a CLAIM
|
|
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (Laravel)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 42 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/laravel/full.md
|
|
8
8
|
# Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
|
|
9
9
|
```
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/laravel/full.md
|
|
|
17
17
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
18
|
- Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.19.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to a Laravel application — the app you are already working in.
|
|
23
23
|
You do not need a copy of the OpenReceive source: the package is on Packagist
|
|
@@ -143,6 +143,24 @@ in-place `composer update` is undone by the next `compose up`.
|
|
|
143
143
|
|
|
144
144
|
Only then start the quickstart.
|
|
145
145
|
|
|
146
|
+
## After the quickstart — hand over, then stop
|
|
147
|
+
|
|
148
|
+
The quickstart is done when `php artisan openreceive:doctor` is clean and this
|
|
149
|
+
app serves the checkout page for one of its orders. Doctor names any failed
|
|
150
|
+
check; fix it before going on.
|
|
151
|
+
|
|
152
|
+
Give the user that checkout link. The browser check in the quickstart's
|
|
153
|
+
"Render the checkout" section (payment-method icons, wallet logos, a pay
|
|
154
|
+
tutorial) is theirs: tell them what to look at, and do not run it yourself.
|
|
155
|
+
|
|
156
|
+
You cannot pay the invoice: the code is receive-only. Do not pay, settle or
|
|
157
|
+
mark an order paid, and do not look for a way to (a wallet control port, a
|
|
158
|
+
test endpoint, another wallet). If the user wants a real settlement test, they
|
|
159
|
+
pay on that link from their own wallet, and `onPaid` marks the order paid.
|
|
160
|
+
|
|
161
|
+
Setup ends here. Say "Setup is finished" in one message, with the link and
|
|
162
|
+
what to check. Do not offer more work or end the message on a question.
|
|
163
|
+
|
|
146
164
|
## Non-negotiables
|
|
147
165
|
|
|
148
166
|
The quickstart below has the code. These are the rules it cannot state for
|
|
@@ -155,6 +173,9 @@ itself, and they hold for every integration.
|
|
|
155
173
|
logs, or assets.
|
|
156
174
|
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
157
175
|
into this chat; that is the supported path.
|
|
176
|
+
- Work only in this application. Never read or run anything from another
|
|
177
|
+
project on this machine (its `node_modules`, tools or source), for any
|
|
178
|
+
reason. A browser and Playwright are not part of setup.
|
|
158
179
|
- The host owns the price. `amountFor` reads it from your own data; reject
|
|
159
180
|
payer-supplied amounts.
|
|
160
181
|
- `authorize` runs on every request, and the `resource` it receives is a CLAIM
|
|
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (Next.js)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 38 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/next/full.md
|
|
8
8
|
# Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
|
|
9
9
|
```
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/next/full.md
|
|
|
17
17
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
18
|
- Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.19.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to a Next.js App Router application — the app you are already
|
|
23
23
|
working in. You do not need a copy of the OpenReceive source: the packages are
|
|
@@ -64,6 +64,11 @@ there and non-empty, and never print the values. A code that is already
|
|
|
64
64
|
set is not asked for again; if both are set, skip to step 5
|
|
65
65
|
(making the server load the file), then the quickstart.
|
|
66
66
|
|
|
67
|
+
On a hosted builder (v0, Vercel, Replit, Lovable), the user may say instead
|
|
68
|
+
that both codes are already set as the project's environment variables or
|
|
69
|
+
secrets. Believe them: do not ask for the codes, do not write `.env.local`, and
|
|
70
|
+
do not read or print the variables. Next reads them from the environment.
|
|
71
|
+
|
|
67
72
|
Otherwise your next action is a question to the user. Do not install packages,
|
|
68
73
|
edit the app, write `.env.example`, or search anywhere else before asking
|
|
69
74
|
it. Do not read deploy config (compose files, Vercel or platform secrets), Docker containers, or process environments, and never run
|
|
@@ -138,6 +143,25 @@ first.
|
|
|
138
143
|
|
|
139
144
|
Only then start the quickstart.
|
|
140
145
|
|
|
146
|
+
## After the quickstart — hand over, then stop
|
|
147
|
+
|
|
148
|
+
The quickstart is done when
|
|
149
|
+
`npx openreceive doctor --db <file-or-url> --url <app url>` is clean and this
|
|
150
|
+
app serves the checkout page for one of its orders. Doctor names any failed
|
|
151
|
+
check and exits nonzero; fix it before going on.
|
|
152
|
+
|
|
153
|
+
Give the user that checkout link. The browser check in the quickstart's step 6
|
|
154
|
+
(payment-method icons, wallet logos, a pay tutorial) is theirs: tell them what
|
|
155
|
+
to look at, and do not run it yourself.
|
|
156
|
+
|
|
157
|
+
You cannot pay the invoice: the code is receive-only. Do not pay, settle or
|
|
158
|
+
mark an order paid, and do not look for a way to (a wallet control port, a
|
|
159
|
+
test endpoint, another wallet). If the user wants a real settlement test, they
|
|
160
|
+
pay on that link from their own wallet, and `onPaid` marks the order paid.
|
|
161
|
+
|
|
162
|
+
Setup ends here. Say "Setup is finished" in one message, with the link and
|
|
163
|
+
what to check. Do not offer more work or end the message on a question.
|
|
164
|
+
|
|
141
165
|
## Non-negotiables
|
|
142
166
|
|
|
143
167
|
The quickstart below has the code. These are the rules it cannot state for
|
|
@@ -150,6 +174,9 @@ itself, and they hold for every integration.
|
|
|
150
174
|
logs, or assets.
|
|
151
175
|
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
152
176
|
into this chat; that is the supported path.
|
|
177
|
+
- Work only in this application. Never read or run anything from another
|
|
178
|
+
project on this machine (its `node_modules`, tools or source), for any
|
|
179
|
+
reason. A browser and Playwright are not part of setup.
|
|
153
180
|
- The host owns the price. `amountFor` reads it from your own data; reject
|
|
154
181
|
payer-supplied amounts.
|
|
155
182
|
- `authorize` runs on every request, and the `resource` it receives is a CLAIM
|
|
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (Node.js)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 34 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/node/full.md
|
|
8
8
|
# Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
|
|
9
9
|
```
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/node/full.md
|
|
|
17
17
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
18
|
- Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.19.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to a Node application — the app you are already working in. You
|
|
23
23
|
do not need a copy of the OpenReceive source: the packages are on npm, and the
|
|
@@ -61,6 +61,11 @@ there and non-empty, and never print the values. A code that is already
|
|
|
61
61
|
set is not asked for again; if both are set, skip to step 5
|
|
62
62
|
(making the server load the file), then the quickstart.
|
|
63
63
|
|
|
64
|
+
On a hosted builder (v0, Vercel, Replit, Lovable), the user may say instead
|
|
65
|
+
that both codes are already set as the project's environment variables or
|
|
66
|
+
secrets. Believe them: do not ask for the codes, do not write `.env`, and
|
|
67
|
+
do not read or print the variables. Skip step 5's file loading: the platform already puts them in `process.env`.
|
|
68
|
+
|
|
64
69
|
Otherwise your next action is a question to the user. Do not install packages,
|
|
65
70
|
edit the app, write `.env.example`, or search anywhere else before asking
|
|
66
71
|
it. Do not read deploy config (compose files, platform secrets), Docker containers, or process environments, and never run
|
|
@@ -135,6 +140,24 @@ first.
|
|
|
135
140
|
|
|
136
141
|
Only then start the quickstart.
|
|
137
142
|
|
|
143
|
+
## After the quickstart — hand over, then stop
|
|
144
|
+
|
|
145
|
+
The quickstart is done when `npx openreceive doctor --db <file-or-url> --url <app url>`
|
|
146
|
+
is clean and this app serves the checkout page for one of its orders. Doctor
|
|
147
|
+
names any failed check and exits nonzero; fix it before going on.
|
|
148
|
+
|
|
149
|
+
Give the user that checkout link. The browser check in the quickstart's
|
|
150
|
+
step 6 (payment-method icons, wallet logos, a pay tutorial) is theirs: tell
|
|
151
|
+
them what to look at, and do not run it yourself.
|
|
152
|
+
|
|
153
|
+
You cannot pay the invoice: the code is receive-only. Do not pay, settle or
|
|
154
|
+
mark an order paid, and do not look for a way to (a wallet control port, a
|
|
155
|
+
test endpoint, another wallet). If the user wants a real settlement test, they
|
|
156
|
+
pay on that link from their own wallet, and `onPaid` marks the order paid.
|
|
157
|
+
|
|
158
|
+
Setup ends here. Say "Setup is finished" in one message, with the link and
|
|
159
|
+
what to check. Do not offer more work or end the message on a question.
|
|
160
|
+
|
|
138
161
|
## Non-negotiables
|
|
139
162
|
|
|
140
163
|
The quickstart below has the code. These are the rules it cannot state for
|
|
@@ -147,6 +170,9 @@ itself, and they hold for every integration.
|
|
|
147
170
|
logs, or assets.
|
|
148
171
|
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
149
172
|
into this chat; that is the supported path.
|
|
173
|
+
- Work only in this application. Never read or run anything from another
|
|
174
|
+
project on this machine (its `node_modules`, tools or source), for any
|
|
175
|
+
reason. A browser and Playwright are not part of setup.
|
|
150
176
|
- The host owns the price. `amountFor` reads it from your own data; reject
|
|
151
177
|
payer-supplied amounts.
|
|
152
178
|
- `authorize` runs on every request, and the `resource` it receives is a CLAIM
|
|
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (PHP)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 38 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/php/full.md
|
|
8
8
|
# Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
|
|
9
9
|
```
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/php/full.md
|
|
|
17
17
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
18
|
- Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.19.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to a PHP application — the app you are already working in. You
|
|
23
23
|
do not need a copy of the OpenReceive source: the engine is on Packagist
|
|
@@ -148,6 +148,24 @@ the image, so an in-place `composer update` is undone by the next
|
|
|
148
148
|
|
|
149
149
|
Only then start the quickstart.
|
|
150
150
|
|
|
151
|
+
## After the quickstart — hand over, then stop
|
|
152
|
+
|
|
153
|
+
The quickstart is done when the quickstart's `bin/doctor` script is clean and
|
|
154
|
+
this app serves the checkout page for one of its orders. Doctor names any
|
|
155
|
+
failed check; fix it before going on.
|
|
156
|
+
|
|
157
|
+
Give the user that checkout link. The browser check in the quickstart's step 6
|
|
158
|
+
(payment-method icons, wallet logos, a pay tutorial) is theirs: tell them what
|
|
159
|
+
to look at, and do not run it yourself.
|
|
160
|
+
|
|
161
|
+
You cannot pay the invoice: the code is receive-only. Do not pay, settle or
|
|
162
|
+
mark an order paid, and do not look for a way to (a wallet control port, a
|
|
163
|
+
test endpoint, another wallet). If the user wants a real settlement test, they
|
|
164
|
+
pay on that link from their own wallet, and `onPaid` marks the order paid.
|
|
165
|
+
|
|
166
|
+
Setup ends here. Say "Setup is finished" in one message, with the link and
|
|
167
|
+
what to check. Do not offer more work or end the message on a question.
|
|
168
|
+
|
|
151
169
|
## Non-negotiables
|
|
152
170
|
|
|
153
171
|
The quickstart below has the code. These are the rules it cannot state for
|
|
@@ -160,6 +178,9 @@ itself, and they hold for every integration.
|
|
|
160
178
|
logs, or assets — and never in a `config.php` that ships in the repository.
|
|
161
179
|
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
162
180
|
into this chat; that is the supported path.
|
|
181
|
+
- Work only in this application. Never read or run anything from another
|
|
182
|
+
project on this machine (its `node_modules`, tools or source), for any
|
|
183
|
+
reason. A browser and Playwright are not part of setup.
|
|
163
184
|
- The host owns the price. `amountFor` reads it from your own data; reject
|
|
164
185
|
payer-supplied amounts.
|
|
165
186
|
- `authorize` runs on every request, and the `resource` it receives is a CLAIM
|
|
@@ -3,7 +3,7 @@ This is the full file; follow it from Step 0.
|
|
|
3
3
|
# OpenReceive agent directions (Rails)
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
# READ THIS FIRST: this file is
|
|
6
|
+
# READ THIS FIRST: this file is 40 KB and a summary drops required steps. Download it whole:
|
|
7
7
|
curl -fsSL https://openreceive.org/agent-directions/rails/full.md
|
|
8
8
|
# Skip the download only if you already have all of it: pasted, read from disk or fetched raw.
|
|
9
9
|
```
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/rails/full.md
|
|
|
17
17
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
18
|
- Start the quickstart only once the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.19.
|
|
21
21
|
|
|
22
22
|
Add OpenReceive to a Rails application — the app you are already working in. You
|
|
23
23
|
do not need a copy of the OpenReceive source: the gem is on RubyGems, the
|
|
@@ -139,6 +139,24 @@ is undone by the next `compose up`.
|
|
|
139
139
|
|
|
140
140
|
Only then start the quickstart.
|
|
141
141
|
|
|
142
|
+
## After the quickstart — hand over, then stop
|
|
143
|
+
|
|
144
|
+
The quickstart is done when `bin/rails openreceive:doctor` is clean and this
|
|
145
|
+
app serves the checkout page for one of its orders. Doctor names any failed
|
|
146
|
+
check; fix it before going on.
|
|
147
|
+
|
|
148
|
+
Give the user that checkout link. The browser check in the quickstart's
|
|
149
|
+
"Render the checkout" section (payment-method icons, wallet logos, a pay
|
|
150
|
+
tutorial) is theirs: tell them what to look at, and do not run it yourself.
|
|
151
|
+
|
|
152
|
+
You cannot pay the invoice: the code is receive-only. Do not pay, settle or
|
|
153
|
+
mark an order paid, and do not look for a way to (a wallet control port, a
|
|
154
|
+
test endpoint, another wallet). If the user wants a real settlement test, they
|
|
155
|
+
pay on that link from their own wallet, and `on_paid` marks the order paid.
|
|
156
|
+
|
|
157
|
+
Setup ends here. Say "Setup is finished" in one message, with the link and
|
|
158
|
+
what to check. Do not offer more work or end the message on a question.
|
|
159
|
+
|
|
142
160
|
## Non-negotiables
|
|
143
161
|
|
|
144
162
|
The quickstart below has the code. These are the rules it cannot state for
|
|
@@ -151,6 +169,9 @@ itself, and they hold for every integration.
|
|
|
151
169
|
logs, or assets.
|
|
152
170
|
- Do not suggest rotating, revoking or replacing a code because it was pasted
|
|
153
171
|
into this chat; that is the supported path.
|
|
172
|
+
- Work only in this application. Never read or run anything from another
|
|
173
|
+
project on this machine (its `node_modules`, tools or source), for any
|
|
174
|
+
reason. A browser and Playwright are not part of setup.
|
|
154
175
|
- The host owns the price. `config.amount_for` reads it from your own data;
|
|
155
176
|
reject payer-supplied amounts.
|
|
156
177
|
- `config.authorize` runs on every request, and the `resource` it receives is a
|
|
@@ -17,7 +17,7 @@ curl -fsSL https://openreceive.org/agent-directions/woocommerce/full.md
|
|
|
17
17
|
- Do not suggest rotating or revoking a code because it was pasted here.
|
|
18
18
|
- Setup is done only when the NWC code is saved, and the LSC code is saved or the user said "Bitcoin only".
|
|
19
19
|
|
|
20
|
-
These directions describe OpenReceive 0.4.
|
|
20
|
+
These directions describe OpenReceive 0.4.19.
|
|
21
21
|
|
|
22
22
|
Install and configure the OpenReceive payment gateway in the WooCommerce store
|
|
23
23
|
you are working in. Preserve its theme, checkout, customer accounts, order
|
|
@@ -96,7 +96,7 @@ Install the plugin built for this release. Never install the GitHub
|
|
|
96
96
|
source-code ZIP or a ZIP from an older release:
|
|
97
97
|
|
|
98
98
|
```sh
|
|
99
|
-
wp plugin install https://github.com/OpenReceive/openreceive/releases/download/v0.4.
|
|
99
|
+
wp plugin install https://github.com/OpenReceive/openreceive/releases/download/v0.4.19/openreceive-wordpress-0.4.19.zip --activate
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
It needs WooCommerce active, and PHP 8.2+ with GMP and sodium in BOTH the web
|
|
@@ -236,7 +236,7 @@ database or application.
|
|
|
236
236
|
|
|
237
237
|
### Get the installable archive
|
|
238
238
|
|
|
239
|
-
Download [openreceive-wordpress-0.4.
|
|
239
|
+
Download [openreceive-wordpress-0.4.19.zip](https://github.com/OpenReceive/openreceive/releases/download/v0.4.19/openreceive-wordpress-0.4.19.zip)
|
|
240
240
|
from the matching release. Historical releases may lack this asset. If that exact
|
|
241
241
|
URL returns 404, build the same tag below; never silently install an older ZIP.
|
|
242
242
|
The GitHub source-code ZIP is not an installable plugin. On a development machine
|
|
@@ -245,7 +245,7 @@ with Node 22+, PHP 8.2+ with GMP/sodium, Composer and WP-CLI:
|
|
|
245
245
|
```sh
|
|
246
246
|
git clone https://github.com/OpenReceive/openreceive.git
|
|
247
247
|
cd openreceive
|
|
248
|
-
git checkout v0.4.
|
|
248
|
+
git checkout v0.4.19
|
|
249
249
|
npm ci
|
|
250
250
|
npm run build:packages
|
|
251
251
|
composer install --working-dir=packages/php/wordpress
|
|
@@ -288,7 +288,9 @@ package matching the active PHP version (for example `php8.2-gmp` for PHP 8.2),
|
|
|
288
288
|
then restart that version's web PHP service. Verify `php --ri gmp` and
|
|
289
289
|
`wp openreceive doctor` for CLI, and the gateway Doctor panel for web PHP.
|
|
290
290
|
On managed WordPress hosting, ask the host to enable GMP and sodium in both
|
|
291
|
-
runtimes; if they cannot, this plugin cannot run there.
|
|
291
|
+
runtimes; if they cannot, this plugin cannot run there.
|
|
292
|
+
[WordPress hosting requirements](https://openreceive.org/guides/wordpress-hosting.md) lists what common hosts
|
|
293
|
+
offer and how to check your site. Do not use Composer's
|
|
292
294
|
`--ignore-platform-reqs` to bypass the requirements.
|
|
293
295
|
|
|
294
296
|
#### Compose files with only `image:` lines
|