openreceive 0.2.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a0236c2d34919d5be3ddb63a8ea58a4d3f7893d5dfcd0f8cb03142ead583473f
4
+ data.tar.gz: 050d0a795038c6435360ebdbc32a43bb970b9b1fc9d389794e0f923e5c5f435d
5
+ SHA512:
6
+ metadata.gz: 15f158eca326663f007e002700a59e715116c4bf359cbc40f3f7e15c8b22de9535e9e5aad9ecd2c336ee35943839471651e8eb31d26626a2216163a3883ca060
7
+ data.tar.gz: 483b606a42e3da3191271b4473fc96110c550a830a21afb7760bf2dbeb763ea6f1b370a4ad8c649e5d5b48ebc5da137f2977831b80fea501eaf87f6a665a35a8
data/CHANGELOG.md ADDED
@@ -0,0 +1,30 @@
1
+ # Changelog
2
+
3
+ ## 0.2.1 - 2026-08-24
4
+
5
+ The Ruby gems release in lockstep with the npm workspace version. The full
6
+ release narrative lives in the repository-root
7
+ [CHANGELOG](https://github.com/openreceive/openreceive/blob/master/CHANGELOG.md);
8
+ entries here are scoped to this gem.
9
+
10
+ - Packaging only: `npm run release:gem:build` now names the built `.gem` with
11
+ the version RubyGems actually mints, so prerelease versions build and push.
12
+
13
+ ## 0.1.1 - 2026-08-18
14
+
15
+ - First packaged release of the `openreceive` core gem: exact-money helpers,
16
+ NWC URI parsing/redaction, wallet-error normalization, transaction
17
+ normalization, and settlement-authority primitives.
18
+ - Built-in price feed (`OpenReceive::Rates`): static provider and cached live
19
+ feed with primary/fallback failover and the shared 46-currency list.
20
+ - Swap-address validation helpers (`OpenReceive::SwapAddress`).
21
+ - `OpenReceive::NwcRubyReceiveClient` adapts NIP-47 params to the shape the
22
+ wrapped client declares, by introspecting it: a positional request hash, a
23
+ `**rest` client, or exact keyword names — including nwc-ruby's `until_ts`
24
+ for the NIP-47 `until` scan window. A param the client cannot express raises
25
+ and names itself instead of failing as "wrong number of arguments".
26
+ - `OpenReceive::NwcRubyReceiveClient#subscribe_notifications`: optional NWC-02
27
+ notifications forwarded to `nwc-ruby`'s `subscribe_to_notifications`, with
28
+ the yielded notification object translated back to the NWC-02 wire payload.
29
+ The adapter reports the capability of the client it wraps, so a client that
30
+ cannot notify still gets `listen_for_notifications!`'s "keep polling" error.
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OpenReceive contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # openreceive
2
+
3
+ Pure Ruby exact-money, NWC normalization, and settlement-authority primitives
4
+ for [OpenReceive](https://openreceive.org). It has no persistence dependency.
5
+ Settlement requires `settled_at` or state `settled`; a preimage alone does not
6
+ settle a payment.
7
+
8
+ OpenReceive adds receive-only Bitcoin Lightning payments to a website or app:
9
+ your server creates and verifies BOLT11 invoices through a wallet you control
10
+ via a receive-only Nostr Wallet Connect (NWC / NIP-47) connection. This gem is
11
+ the dependency-free core; most applications want one of the gems built on it:
12
+
13
+ - [`openreceive-server`](https://rubygems.org/gems/openreceive-server) — the
14
+ storage-free Service and framework-agnostic Rack app for the shipped HTTP
15
+ routes.
16
+ - [`openreceive-rails`](https://rubygems.org/gems/openreceive-rails) — the
17
+ mountable Rails engine with host-owned payment scaffolding.
18
+
19
+ ## Install
20
+
21
+ ```sh
22
+ gem install openreceive
23
+ ```
24
+
25
+ or in a Gemfile:
26
+
27
+ ```ruby
28
+ gem "openreceive"
29
+ ```
30
+
31
+ ## What it provides
32
+
33
+ - Exact decimal money conversion (fiat price -> msats) backed by `BigDecimal`,
34
+ with the shared cross-language test vectors.
35
+ - NWC connection-URI parsing, validation, and redaction
36
+ (`OpenReceive.parse_nwc_uri`, `OpenReceive.redact_nwc_uri`). Receive-only NWC
37
+ codes never belong in browser code, logs, or examples.
38
+ - Wallet-error and transaction normalization
39
+ (`OpenReceive::Nwc.normalize_wallet_error`,
40
+ `OpenReceive::Nwc.normalize_transaction`).
41
+ - Settlement-authority rules: what counts as settled, and what never does.
42
+ - The built-in price feed (`OpenReceive::Rates`): a static provider and the
43
+ cached live feed with primary/fallback failover, fail-closed windows, and
44
+ the shared currency list.
45
+ - Swap-address checksum validation (`OpenReceive::SwapAddress`): refund and
46
+ deposit addresses are checksum-verified, never shape-guessed.
47
+ - `OpenReceive::NwcRubyReceiveClient`, a thin adapter over a host-supplied
48
+ `nwc-ruby` client, including the optional NWC-02 notification subscription
49
+ (`subscribe_notifications`, forwarded to that gem's
50
+ `subscribe_to_notifications`).
51
+
52
+ The behavior is pinned to the same test vectors as the Node engine
53
+ (`spec/test-vectors` in the repository), so both engines make identical
54
+ decisions.
55
+
56
+ ## Links
57
+
58
+ - Documentation: <https://openreceive.org>
59
+ - Source: <https://github.com/openreceive/openreceive>
60
+ - Changelog: [CHANGELOG.md](CHANGELOG.md)
61
+
62
+ MIT license.