openreceive 0.4.9 → 0.4.10

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fe8ab8db8b398d22058000b5f748f19718266fc965f5debf8dd576b4da66c09
4
- data.tar.gz: deca0fcf589e20525a4c718e705d040b2e4822574e2aa123cdc91d5aedc918d3
3
+ metadata.gz: e612d1c8beae58671f0e863dbf26622b07a689010b81c3f05abd1463b7f1a4ff
4
+ data.tar.gz: 68c216cd101ad1d50dd6175b4e565793f7b147a26e1d07e1cda18ffe42659ed6
5
5
  SHA512:
6
- metadata.gz: 9e49f637eef6482a553f21c422475a3dfce1aad95fadbadb96195f29ca84e03cd883e12bdd3d966988c9f205cf883bbfc3386509201cf3fae018f31401bd2b4f
7
- data.tar.gz: 63583d9105172a6e19f591cd6f8ffaf5a3aac74ffbb836be6b623650f5932ea90d738eea6fc2c13a60db21b894eb0b870045524f784f19fb7231b1d551ac330d
6
+ metadata.gz: 24f0505bb26aa2b2b06f439854cf8839825c24d4b1634ecc184c86a6914269f25c621664efc7ba792e04fc644ab2107784b7b78737564669bf57e77e5a8e5452
7
+ data.tar.gz: a3edc8c5fdda1f703da32f6abe8e87c2ee65fe0d8957c6da7d539b64a8f5762b2a9b0ec952c4f6ef7ee9d4ee5671d8d3675f67693eeff89c5f227b9d0026e089
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.10 - 2026-09-16
4
+
5
+ Release in lockstep with the 0.4.10 stablecoin checkout fix. The shared
6
+ pay-in asset table (`OpenReceive::Generated::SWAP_ASSET_INFO`) gains a
7
+ `pegged_to` key on the USDT and USDC rows. No Ruby engine or settlement
8
+ changes.
9
+
3
10
  ## 0.4.9 - 2026-09-14
4
11
 
5
12
  Release in lockstep with the 0.4.9 checkout method-switch fix and updated
@@ -93,17 +93,17 @@ module OpenReceive
93
93
  "USDT_TRON" => {
94
94
  "pay_in_asset" => "USDT_TRON", "label" => "USDT",
95
95
  "network_label" => "Tron", "coin" => "USDT",
96
- "network" => "TRX"
96
+ "network" => "TRX", "pegged_to" => "USD"
97
97
  }.freeze,
98
98
  "USDT_SOL" => {
99
99
  "pay_in_asset" => "USDT_SOL", "label" => "USDT",
100
100
  "network_label" => "Solana", "coin" => "USDT",
101
- "network" => "SOL"
101
+ "network" => "SOL", "pegged_to" => "USD"
102
102
  }.freeze,
103
103
  "USDC_SOL" => {
104
104
  "pay_in_asset" => "USDC_SOL", "label" => "USDC",
105
105
  "network_label" => "Solana", "coin" => "USDC",
106
- "network" => "SOL"
106
+ "network" => "SOL", "pegged_to" => "USD"
107
107
  }.freeze,
108
108
  "ETH_ETH" => {
109
109
  "pay_in_asset" => "ETH_ETH", "label" => "ETH",
@@ -113,12 +113,12 @@ module OpenReceive
113
113
  "USDT_ETH" => {
114
114
  "pay_in_asset" => "USDT_ETH", "label" => "USDT",
115
115
  "network_label" => "Ethereum", "coin" => "USDT",
116
- "network" => "ETH"
116
+ "network" => "ETH", "pegged_to" => "USD"
117
117
  }.freeze,
118
118
  "USDC_ETH" => {
119
119
  "pay_in_asset" => "USDC_ETH", "label" => "USDC",
120
120
  "network_label" => "Ethereum", "coin" => "USDC",
121
- "network" => "ETH"
121
+ "network" => "ETH", "pegged_to" => "USD"
122
122
  }.freeze,
123
123
  }.freeze
124
124
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenReceive
4
- VERSION = "0.4.9"
4
+ VERSION = "0.4.10"
5
5
  end
@@ -70,6 +70,14 @@ same diagnostics redacted, always exit 0 — safe to share.
70
70
  - Refunds exist only for swap deposits from `refund_required`. There is **no
71
71
  Lightning refund** — the wallet cannot spend. Do not chase one.
72
72
  https://openreceive.org/guides/swap-refunds.md
73
+ - "Payer reports two different amounts on a stablecoin checkout" (50.05 or
74
+ 50.03?): the deposit amount is a token quantity, `fee.pay_in_fiat` is its
75
+ fiat valuation. Only `swap.deposit_amount` is an instruction. From 0.4.10 the
76
+ packaged checkout renders a USD stablecoin's breakdown in the token and never
77
+ shows `pay_in_fiat`; on an older bundle, upgrade `@openreceive/*`. To verify,
78
+ read the row's `deposit_amount` and `fee` and confirm the UI shows only the
79
+ deposit amount. A custom UI must call `createSwapFeeBreakdown(fee, swap)`
80
+ with the swap, not the fee alone.
73
81
 
74
82
  ## 6. Checkout UI shows nothing
75
83
 
@@ -86,6 +86,17 @@ state; do not retry-loop it, and do not build an idempotency store around it —
86
86
  that serialization is the library's job. (A hook failure while persisting an
87
87
  attempt is a **503 retryable**, deliberately distinct.)
88
88
 
89
+ ## Amounts on the deposit panel
90
+
91
+ `swap.deposit_amount` is the ONLY amount a payer is ever told to send, in the
92
+ pay-in token. `swap.fee.pay_in_fiat` / `payout_fiat` are fiat valuations that
93
+ explain the spread (why the deposit exceeds the cart total); they are not
94
+ instructions. For a stablecoin pegged to the fee currency (USDT, USDC) the
95
+ packaged checkout expresses the breakdown in the token and never renders
96
+ `pay_in_fiat` — "$50.03" under "50.05 USDC" reads as the same number with a
97
+ typo. A custom UI gets the same rule from `createSwapFeeBreakdown(fee, swap)`;
98
+ pass the swap, not just the fee.
99
+
89
100
  ## Secrets
90
101
 
91
102
  `NWC_URI` and `LSC_URI_*` are server-only. Never put them in browser code,
@@ -1,6 +1,6 @@
1
1
  # OpenReceive agent directions (BTCPay Server)
2
2
 
3
- These directions describe OpenReceive 0.4.9.
3
+ These directions describe OpenReceive 0.4.10.
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
@@ -32,7 +32,7 @@ refund path on the same checkout screen.
32
32
 
33
33
  ## Step 0 — check the deployment before you change anything
34
34
 
35
- 1. Confirm the BTCPay Server version is 2.4.2 or later (Server Settings →
35
+ 1. Confirm the BTCPay Server version is 2.4.4 or later (Server Settings →
36
36
  About, or `GET /api/v1/server/info`). The plugin declares that minimum and
37
37
  BTCPay refuses to load it below.
38
38
  2. Check whether the plugin is installed (Server Settings → Plugins, or the
@@ -128,7 +128,7 @@ passes. The page it comes from is https://openreceive.org/guides/quickstart-btcp
128
128
 
129
129
  ## BTCPay Server quickstart
130
130
 
131
- Requires BTCPay Server ≥ 2.4.2.
131
+ Requires BTCPay Server ≥ 2.4.4.
132
132
 
133
133
  The OpenReceive plugin makes a receive-only NWC wallet the Lightning node of a
134
134
  BTCPay store. BTCPay mints every Lightning invoice in that wallet and records
@@ -143,7 +143,7 @@ invoices, checkout, webhooks and Greenfield API are the host.
143
143
 
144
144
  ### 1. Prerequisites
145
145
 
146
- - A BTCPay Server, version 2.4.2 or later, on any network (mainnet, testnet,
146
+ - A BTCPay Server, version 2.4.4 or later, on any network (mainnet, testnet,
147
147
  signet, regtest). The wallet must be on the same network.
148
148
  - A receive-only NWC code for the wallet you want to receive into
149
149
  ([get one here](https://openreceive.org/get_a_nwc_code_to_receive_payments)).
@@ -1,6 +1,6 @@
1
1
  # OpenReceive agent directions (Django)
2
2
 
3
- These directions describe OpenReceive 0.4.9.
3
+ These directions describe OpenReceive 0.4.10.
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
@@ -231,6 +231,13 @@ built on `@openreceive/browser/headless`. Read that before writing components.
231
231
  - `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
232
232
  and the bare amount each get a copy row. Render `swap.networkWarning*` as
233
233
  the model gives it.
234
+ - `swap.deposit_amount` is the only amount a payer is told to send. Never put
235
+ a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
236
+ "$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
237
+ send. The one fiat figure on a USDT/USDC deposit panel is the cart total
238
+ (`payout_fiat`); express "you send" and the fee in the token. Use
239
+ `createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
240
+ it applies this for you; SOL and ETH keep a fiat breakdown.
234
241
  - `createCheckoutSession` owns mint and swap start. To start swaps, pass its
235
242
  `swap` option (`selection`, `prefix`, `fetch`) together. Without it
236
243
  `startSwap` reports through `onError`.
@@ -1,6 +1,6 @@
1
1
  # OpenReceive agent directions (FastAPI)
2
2
 
3
- These directions describe OpenReceive 0.4.9.
3
+ These directions describe OpenReceive 0.4.10.
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
@@ -228,6 +228,13 @@ components.
228
228
  - `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
229
229
  and the bare amount each get a copy row. Render `swap.networkWarning*` as
230
230
  the model gives it.
231
+ - `swap.deposit_amount` is the only amount a payer is told to send. Never put
232
+ a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
233
+ "$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
234
+ send. The one fiat figure on a USDT/USDC deposit panel is the cart total
235
+ (`payout_fiat`); express "you send" and the fee in the token. Use
236
+ `createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
237
+ it applies this for you; SOL and ETH keep a fiat breakdown.
231
238
  - `createCheckoutSession` owns mint and swap start. To start swaps, pass its
232
239
  `swap` option (`selection`, `prefix`, `fetch`) together. Without it
233
240
  `startSwap` reports through `onError`.
@@ -1,6 +1,6 @@
1
1
  # OpenReceive agent directions (Fastify)
2
2
 
3
- These directions describe OpenReceive 0.4.9.
3
+ These directions describe OpenReceive 0.4.10.
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
@@ -211,6 +211,13 @@ components.
211
211
  - `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
212
212
  and the bare amount each get a copy row. Render `swap.networkWarning*` as
213
213
  the model gives it.
214
+ - `swap.deposit_amount` is the only amount a payer is told to send. Never put
215
+ a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
216
+ "$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
217
+ send. The one fiat figure on a USDT/USDC deposit panel is the cart total
218
+ (`payout_fiat`); express "you send" and the fee in the token. Use
219
+ `createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
220
+ it applies this for you; SOL and ETH keep a fiat breakdown.
214
221
  - `createCheckoutSession` owns mint and swap start. To start swaps, pass its
215
222
  `swap` option (`selection`, `prefix`, `fetch`) together. Without it
216
223
  `startSwap` reports through `onError`.
@@ -1,6 +1,6 @@
1
1
  # OpenReceive agent directions (Laravel)
2
2
 
3
- These directions describe OpenReceive 0.4.9.
3
+ These directions describe OpenReceive 0.4.10.
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
@@ -216,6 +216,13 @@ built on `@openreceive/browser/headless`. Read that before writing components.
216
216
  - `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
217
217
  and the bare amount each get a copy row. Render `swap.networkWarning*` as
218
218
  the model gives it.
219
+ - `swap.deposit_amount` is the only amount a payer is told to send. Never put
220
+ a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
221
+ "$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
222
+ send. The one fiat figure on a USDT/USDC deposit panel is the cart total
223
+ (`payout_fiat`); express "you send" and the fee in the token. Use
224
+ `createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
225
+ it applies this for you; SOL and ETH keep a fiat breakdown.
219
226
  - `createCheckoutSession` owns mint and swap start. To start swaps, pass its
220
227
  `swap` option (`selection`, `prefix`, `fetch`) together. Without it
221
228
  `startSwap` reports through `onError`.
@@ -1,6 +1,6 @@
1
1
  # OpenReceive agent directions (Next.js)
2
2
 
3
- These directions describe OpenReceive 0.4.9.
3
+ These directions describe OpenReceive 0.4.10.
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
@@ -217,6 +217,13 @@ components.
217
217
  - `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
218
218
  and the bare amount each get a copy row. Render `swap.networkWarning*` as
219
219
  the model gives it.
220
+ - `swap.deposit_amount` is the only amount a payer is told to send. Never put
221
+ a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
222
+ "$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
223
+ send. The one fiat figure on a USDT/USDC deposit panel is the cart total
224
+ (`payout_fiat`); express "you send" and the fee in the token. Use
225
+ `createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
226
+ it applies this for you; SOL and ETH keep a fiat breakdown.
220
227
  - `createCheckoutSession` owns mint and swap start. To start swaps, pass its
221
228
  `swap` option (`selection`, `prefix`, `fetch`) together. Without it
222
229
  `startSwap` reports through `onError`.
@@ -1,6 +1,6 @@
1
1
  # OpenReceive agent directions (Node.js)
2
2
 
3
- These directions describe OpenReceive 0.4.9.
3
+ These directions describe OpenReceive 0.4.10.
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
@@ -203,6 +203,13 @@ components.
203
203
  - `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
204
204
  and the bare amount each get a copy row. Render `swap.networkWarning*` as
205
205
  the model gives it.
206
+ - `swap.deposit_amount` is the only amount a payer is told to send. Never put
207
+ a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
208
+ "$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
209
+ send. The one fiat figure on a USDT/USDC deposit panel is the cart total
210
+ (`payout_fiat`); express "you send" and the fee in the token. Use
211
+ `createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
212
+ it applies this for you; SOL and ETH keep a fiat breakdown.
206
213
  - `createCheckoutSession` owns mint and swap start. To start swaps, pass its
207
214
  `swap` option (`selection`, `prefix`, `fetch`) together. Without it
208
215
  `startSwap` reports through `onError`.
@@ -1,6 +1,6 @@
1
1
  # OpenReceive agent directions (PHP)
2
2
 
3
- These directions describe OpenReceive 0.4.9.
3
+ These directions describe OpenReceive 0.4.10.
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
@@ -229,6 +229,13 @@ of https://openreceive.org/guides/checkout-ux.md, for a UI built on
229
229
  - `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
230
230
  and the bare amount each get a copy row. Render `swap.networkWarning*` as
231
231
  the model gives it.
232
+ - `swap.deposit_amount` is the only amount a payer is told to send. Never put
233
+ a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
234
+ "$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
235
+ send. The one fiat figure on a USDT/USDC deposit panel is the cart total
236
+ (`payout_fiat`); express "you send" and the fee in the token. Use
237
+ `createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
238
+ it applies this for you; SOL and ETH keep a fiat breakdown.
232
239
  - `createCheckoutSession` owns mint and swap start. To start swaps, pass its
233
240
  `swap` option (`selection`, `prefix`, `fetch`) together. Without it
234
241
  `startSwap` reports through `onError`.
@@ -1,6 +1,6 @@
1
1
  # OpenReceive agent directions (Rails)
2
2
 
3
- These directions describe OpenReceive 0.4.9.
3
+ These directions describe OpenReceive 0.4.10.
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
@@ -210,6 +210,13 @@ built on `@openreceive/browser/headless`. Read that before writing components.
210
210
  - `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
211
211
  and the bare amount each get a copy row. Render `swap.networkWarning*` as
212
212
  the model gives it.
213
+ - `swap.deposit_amount` is the only amount a payer is told to send. Never put
214
+ a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
215
+ "$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
216
+ send. The one fiat figure on a USDT/USDC deposit panel is the cart total
217
+ (`payout_fiat`); express "you send" and the fee in the token. Use
218
+ `createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
219
+ it applies this for you; SOL and ETH keep a fiat breakdown.
213
220
  - `createCheckoutSession` owns mint and swap start. To start swaps, pass its
214
221
  `swap` option (`selection`, `prefix`, `fetch`) together. Without it
215
222
  `startSwap` reports through `onError`.
@@ -1,6 +1,6 @@
1
1
  # OpenReceive agent directions (WordPress + WooCommerce)
2
2
 
3
- These directions describe OpenReceive 0.4.9.
3
+ These directions describe OpenReceive 0.4.10.
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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openreceive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenReceive