@openreceive/react 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,6 +1,30 @@
1
1
  # @openreceive/react
2
2
 
3
- React checkout components for OpenReceive (`<Checkout>`, `useCheckout`, `PaymentWizard`).
3
+ Add Bitcoin Lightning checkout to your React app with a ready-to-use
4
+ `<Checkout>` component, or build your own payment screen with `useCheckout`
5
+ and `PaymentWizard`. Let customers choose a payment method, scan a QR code,
6
+ and follow payment status without building the checkout flow from scratch.
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 and React 18 or later.
20
+
21
+ ```sh
22
+ npm install @openreceive/react
23
+ ```
24
+
25
+ Follow the [frontend checkout guide](https://github.com/openreceive/openreceive/blob/master/docs/guides/frontend-checkout.md)
26
+ to connect the component to your server routes. Use the server-side payment
27
+ hook to fulfill orders; browser callbacks update the interface.
4
28
 
5
29
  ## Mount
6
30
 
@@ -20,7 +44,7 @@ export function Pay() {
20
44
  Pass `reference` to let the component create the checkout (create mode), or pass
21
45
  a `checkout` snapshot to render one your server already created. Prop names,
22
46
  defaults, and the full surface are shared across the wrappers — see
23
- `docs/internal/wrapper-parity.md` in the repository.
47
+ [frontend checkout guide](https://github.com/openreceive/openreceive/blob/master/docs/guides/frontend-checkout.md).
24
48
 
25
49
  Event handlers (`onCopy`, `onOpenWallet`, `onState`, `onSettled`,
26
50
  `onProviderCopy`, `onStartOver`, `onError`) are ordinary props. React receives
package/dist/index.js CHANGED
@@ -965,8 +965,8 @@ import {
965
965
  networkSummaryIconClasses,
966
966
  orClasses as orClasses6,
967
967
  paymentMethods,
968
- resolveWizardSelection,
969
968
  requestSwapRefund,
969
+ resolveWizardSelection,
970
970
  selectCurrentSwapInvoice,
971
971
  swapAssetMatchesRoute,
972
972
  swapOptionLimitMessage as swapOptionLimitMessage2
@@ -2552,7 +2552,11 @@ function renderCompactPaymentMethodSelector(options) {
2552
2552
  src: getNetworkIcon(option.network_label)
2553
2553
  })
2554
2554
  ),
2555
- React9.createElement("span", { className: "truncate" }, option.network_label),
2555
+ React9.createElement(
2556
+ "span",
2557
+ { className: orClasses6.methodNetworkLabel },
2558
+ option.network_label
2559
+ ),
2556
2560
  optionSelected ? React9.createElement(
2557
2561
  "span",
2558
2562
  {
@@ -2611,7 +2615,7 @@ function renderCompactPaymentMethodSelector(options) {
2611
2615
  React9.createElement(
2612
2616
  "div",
2613
2617
  {
2614
- className: orClasses6.wizardBody,
2618
+ className: orClasses6.methodBody,
2615
2619
  "aria-labelledby": "payment-method-heading"
2616
2620
  },
2617
2621
  React9.createElement(