@openreceive/browser 0.4.3 → 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 +46 -21
- package/dist/{chunk-VZ7M7ZUE.js → chunk-CPVYEWVM.js} +68 -84
- package/dist/headless.d.ts +51 -60
- package/dist/headless.js +16 -12
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{status-iwqocz21.d.ts → status-Doh8Wz4D.d.ts} +35 -33
- package/dist/styles.css +1 -1
- package/package.json +6 -7
- package/skills/integrate-openreceive/SKILL.md +16 -5
- package/skills/integrate-openreceive/references/btcpay.md +193 -0
- package/skills/integrate-openreceive/references/django.md +667 -0
- package/skills/integrate-openreceive/references/fastapi.md +537 -0
- package/skills/integrate-openreceive/references/fastify.md +529 -0
- package/skills/integrate-openreceive/references/laravel.md +658 -0
- package/skills/integrate-openreceive/references/next.md +580 -0
- package/skills/integrate-openreceive/references/node.md +33 -14
- package/skills/integrate-openreceive/references/php.md +598 -0
- package/skills/integrate-openreceive/references/rails.md +72 -27
- package/skills/integrate-openreceive/references/woocommerce.md +176 -0
- package/dist/assets/icons/btc.svg +0 -1
- package/dist/assets/icons/crypto.svg +0 -12
- package/dist/assets/icons/eth.svg +0 -1
- package/dist/assets/icons/lightning.svg +0 -11
- package/dist/assets/icons/ltc.svg +0 -1
- package/dist/assets/icons/sol.svg +0 -1
- package/dist/assets/icons/trx.svg +0 -1
- package/dist/assets/icons/usdc.svg +0 -1
- package/dist/assets/icons/usdt.svg +0 -1
- package/dist/assets/icons/xmr.svg +0 -1
- package/dist/assets/icons/xrp.svg +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
# @openreceive/browser
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Build a Bitcoin Lightning checkout that fits your own design. OpenReceive
|
|
4
|
+
provides browser helpers for creating checkout sessions, following payment
|
|
5
|
+
status, displaying QR codes, and opening wallets, plus a headless checkout
|
|
6
|
+
engine for custom payment screens.
|
|
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
|
+
Pair this browser package with an OpenReceive server integration. Your server
|
|
14
|
+
authorizes the order, sets the amount, configures swaps, and verifies
|
|
15
|
+
settlement; wallet and provider credentials stay on the server.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
Use Node.js 22 or later for package tooling.
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npm install @openreceive/browser
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Follow the [frontend checkout guide](https://github.com/openreceive/openreceive/blob/master/docs/guides/frontend-checkout.md)
|
|
26
|
+
to connect your UI to your server routes. Use the server-side payment
|
|
27
|
+
hook to fulfill orders; browser callbacks update the interface.
|
|
4
28
|
|
|
5
29
|
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).
|
|
6
30
|
|
|
@@ -23,23 +47,24 @@ vue/svelte/angular wrappers. It is curated symbol-by-symbol rather than a
|
|
|
23
47
|
re-export of the package, so a name that is not on it is package-private and
|
|
24
48
|
will move without notice.
|
|
25
49
|
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
`
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
## Images
|
|
51
|
+
|
|
52
|
+
Everything the checkout draws ships inside the JavaScript: the payment-method
|
|
53
|
+
icons, the wallet logos and the pay tutorials. There is no image file to copy
|
|
54
|
+
or serve and no asset option to set. Deploy your normal JavaScript and CSS
|
|
55
|
+
build output, including any generated JavaScript chunks. Bundlers with code
|
|
56
|
+
splitting can defer tutorial screenshots until first open; single-file builds
|
|
57
|
+
(including the standalone checkout) include them upfront. If your
|
|
58
|
+
Content-Security-Policy has a strict `img-src`, allow `data:`.
|
|
59
|
+
|
|
60
|
+
- The payment-method icons (`btc`, `lightning`, `usdt`, …) are compiled into
|
|
61
|
+
this package: the custom element (`@openreceive/elements`, and the
|
|
62
|
+
Vue/Svelte/Angular wrappers over it) draws them inline in its shadow root
|
|
63
|
+
from `paymentIconSvgs`, and everything that wants a URL —
|
|
64
|
+
`@openreceive/react`, the display models, `getPaymentMethodIcon` and
|
|
65
|
+
friends, your own `<img>` — gets them from `paymentIconUrls` as
|
|
66
|
+
`data:image/svg+xml` URIs.
|
|
67
|
+
- The wallet logos and pay tutorials are `data:image/webp` URIs in
|
|
68
|
+
`@openreceive/provider-data`; `/headless` re-exports
|
|
69
|
+
`loadPayTutorialImages` / `payTutorialImage` for the lazy tutorial chunk.
|
|
70
|
+
See [docs/guides/provider-registry.md](https://github.com/OpenReceive/openreceive/blob/master/docs/guides/provider-registry.md#assets).
|