@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.
Files changed (31) hide show
  1. package/README.md +46 -21
  2. package/dist/{chunk-VZ7M7ZUE.js → chunk-CPVYEWVM.js} +68 -84
  3. package/dist/headless.d.ts +51 -60
  4. package/dist/headless.js +16 -12
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.js +1 -1
  7. package/dist/{status-iwqocz21.d.ts → status-Doh8Wz4D.d.ts} +35 -33
  8. package/dist/styles.css +1 -1
  9. package/package.json +6 -7
  10. package/skills/integrate-openreceive/SKILL.md +16 -5
  11. package/skills/integrate-openreceive/references/btcpay.md +193 -0
  12. package/skills/integrate-openreceive/references/django.md +667 -0
  13. package/skills/integrate-openreceive/references/fastapi.md +537 -0
  14. package/skills/integrate-openreceive/references/fastify.md +529 -0
  15. package/skills/integrate-openreceive/references/laravel.md +658 -0
  16. package/skills/integrate-openreceive/references/next.md +580 -0
  17. package/skills/integrate-openreceive/references/node.md +33 -14
  18. package/skills/integrate-openreceive/references/php.md +598 -0
  19. package/skills/integrate-openreceive/references/rails.md +72 -27
  20. package/skills/integrate-openreceive/references/woocommerce.md +176 -0
  21. package/dist/assets/icons/btc.svg +0 -1
  22. package/dist/assets/icons/crypto.svg +0 -12
  23. package/dist/assets/icons/eth.svg +0 -1
  24. package/dist/assets/icons/lightning.svg +0 -11
  25. package/dist/assets/icons/ltc.svg +0 -1
  26. package/dist/assets/icons/sol.svg +0 -1
  27. package/dist/assets/icons/trx.svg +0 -1
  28. package/dist/assets/icons/usdc.svg +0 -1
  29. package/dist/assets/icons/usdt.svg +0 -1
  30. package/dist/assets/icons/xmr.svg +0 -1
  31. package/dist/assets/icons/xrp.svg +0 -1
package/README.md CHANGED
@@ -1,6 +1,30 @@
1
1
  # @openreceive/browser
2
2
 
3
- Framework-free browser helpers for OpenReceive checkout: prepare/create calls, status polling, QR and wallet helpers.
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
- ## Icon assets
27
-
28
- The payment-method icons (`btc`, `lightning`, `usdt`, …) are compiled into
29
- this package's JavaScript — nothing to copy, serve, or configure, under any
30
- bundler:
31
-
32
- - The custom element (`@openreceive/elements`, and the Vue/Svelte/Angular
33
- wrappers over it) draws them inline in its shadow root from
34
- `paymentIconSvgs`.
35
- - Everything that wants a URL — `@openreceive/react`, the display models,
36
- `getPaymentMethodIcon` and friends, your own `<img>` — gets the same icons
37
- from `paymentIconUrls` as `data:image/svg+xml` URIs. If your
38
- Content-Security-Policy `img-src` forbids `data:`, allow it, or pass
39
- `assetBaseUrl` / `resolveAssetUrl` and the icons are served as files
40
- instead (`dist/assets/icons/*.svg` still ships, keyed by
41
- `paymentIconPaths`).
42
-
43
- `@openreceive/provider-data`'s wallet logos and pay tutorials are files
44
- (PNG/WebP) your host serves; see
45
- [docs/guides/provider-registry.md](../../../docs/guides/provider-registry.md#assets).
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).