Repository navigation
Releases: forgesworn/nwc-kit
Release list
v0.1.9
Documented
- The README and
llms.txtexamples now catchNwcErrorand mapcodeand
walletCodeto not-sent, refused and ambiguous outcomes, define every
variable they use, and namefarrier-kitin the install line. llms.txtlists the fields ofNwcCapabilities,PayInvoiceResult,
NwcTransaction,GetInfoResultandGetBalanceResult, the units of
amountand whatpayInvoice's optionalamountis for, the
NwcTransportinterface, thepoolargument ofNostrRelayTransportand
the extension 05 parameters.listTransactionsrejects alimitabove 20 withINVALID_REQUEST; the
docs previously said it was capped. The README andllms.txtnow say so.connect()is optional: request methods call it when no capabilities are
cached. Documented, with the effect ofclose().AGENTS.mdclassesINVALID_RESPONSEand ambiguousWALLET_ERRORcodes
with the other post-publication failures.- The README names the type-only
coreandfilternostr-toolssubpaths and
no longer names the internalexecutemethod. recipes/is now in the published package, and the README links
RELEASING.mdby its repository URL because it is not published.
Reproducible build: byte-identical output verified across two independent CI runners.
Artefact integrity
file: forgesworn-nwc-kit-0.1.9.tgz
size: 47777 bytes
sha256: 16e91c7bbf48b6449e8dd82afd618f7104c2211a723170561a87cced4c86c7cd
sha512-XmszWLHjYWztbBENgerjFizZiB1Qzg8VTcFhW6QynT1c2xvp6DVByzY6s5VZLo4myq6JIdWZ8AG1VRerG6KyWA==
Verify against the registry tarball:
curl -sLO https://registry.npmjs.org/@forgesworn/nwc-kit/-/nwc-kit-0.1.9.tgz
shasum -a 256 nwc-kit-0.1.9.tgzv0.1.8
Fixed
getInfo()accepts a 33-byte compressed Lightning node id (66 hex
characters, starting 02 or 03) aspubkey. It previously demanded 32-byte
hex and so refused the node id that LND-backed services and Alby Hub return.- The demo no longer labels a failed payment after publication as "rejected by
nwc-kit". A timeout or invalid response onpay_invoicenow reads "outcome
unknown: reconcile before retrying".
Documented
- Classify
WALLET_ERROR: only an explicit refusal such asPAYMENT_FAILEDor
INSUFFICIENT_BALANCEis definite;INTERNAL,OTHERand unrecognised codes
are ambiguous.UNSUPPORTED_EXTENSIONjoins the pre-publication list. - The wallet table separates Rizful, tested on mainnet, from wallets that were
only surveyed in code.llms.txtrecords the Rizful acceptance. - The site no longer claims the result method is checked before decryption, or
thatinspectNwcConnection()returns budget hints. Its version is injected
at build time and the LNURLvault installer link points at
vault.lnurlcash.com.
Reproducible build: byte-identical output verified across two independent CI runners.
Artefact integrity
file: forgesworn-nwc-kit-0.1.8.tgz
size: 42580 bytes
sha256: 2ed86ee8bba8beda78e4065735399590e68314a647cab9399bd66f61094c7999
sha512-7uP361UqR/ih/Rfc0+sckviLSYTYeCRbdydDPz13U6xI57L7ryOduFAOtHqpAuT4USzq/FV90lwZe44wX2/WnA==
Verify against the registry tarball:
curl -sLO https://registry.npmjs.org/@forgesworn/nwc-kit/-/nwc-kit-0.1.8.tgz
shasum -a 256 nwc-kit-0.1.8.tgznwc-kit v0.1.7
Documented
- Record the controlled mainnet Rizful acceptance through the 402-mcp payment
path, while keeping the one-wallet/provider limitation explicit. - Add npm funding metadata alongside the repository and documentation sponsor
links.
Reproducible build: byte-identical output verified across two independent CI runners.
Artefact integrity
file: forgesworn-nwc-kit-0.1.7.tgz
size: 41055 bytes
sha256: 7ad12390fe5aca1fe6fc11c6c86aa8a0e1ac4e62572e8e8bb41214eab111c48c
sha512-xtvec80eeqkhaOjWOOxCcHCv/6S3Zizxfr8JdJRsXrh8Gzj4K330yfbS4CDqBaPUOJoAadCa1H/wCtzzIihacQ==
Verify against the registry tarball:
curl -sLO https://registry.npmjs.org/@forgesworn/nwc-kit/-/nwc-kit-0.1.7.tgz
shasum -a 256 nwc-kit-0.1.7.tgzv0.1.6
Fixed
-
listTransactions()no longer requires anextensionstag. It previously
refused any wallet whose kind 13194 event did not name05there, and no
wallet service surveyed publishes that tag at all: not Alby Hub, not Coinos,
not@getalby/sdk, which is what Zeus speaks through. The extensions
mechanism arrived afterlist_transactionswas already deployed and nobody
went back, so the requirement refused every wallet that implements the method
on the grounds that it had not said so twice.A method named in the wallet's capability list is now accepted as the
declaration of it. That is the wallet's own explicit statement rather than an
assumption,executestill refuses any method missing from that list, and
validateTransactionstill guards the response. A wallet advertising neither
the extension nor the method is still refused.
Documented
- LNbits
nwcprovideris reachable after all.
PR #51 adds NIP-44 v2 and has
been open and unreviewed since July. Its padding was checked against
nostr-toolsacross eighteen plaintext lengths, boundaries included, and
agrees byte for byte, so landing it would make LNbits work with this client.
Reproducible build: byte-identical output verified across two independent CI runners.
Artefact integrity
file: forgesworn-nwc-kit-0.1.6.tgz
size: 40830 bytes
sha256: 82e90a03d4f646a9450e7198b482460bacc90f5eb85b6d18aae07f727a968351
sha512-rfyhQotpm6eZwdZbqMsP3Sta8FaM5excpOfmTlBwt6hUTuLjw50Qs5ekkAWExQYbldzHCrSL+DfbZkEcbwa6Tw==
Verify against the registry tarball:
curl -sLO https://registry.npmjs.org/@forgesworn/nwc-kit/-/nwc-kit-0.1.6.tgz
shasum -a 256 nwc-kit-0.1.6.tgzv0.1.5
Fixed
- Transaction timestamps outside the Unix-seconds range are now refused.
created_at,expires_atandsettled_atin milliseconds are perfectly good
positive integers, so they passed every existing check and reached application
code as dates roughly forty thousand years out. Coinos shipped this by
accident and it broke a client's date parser. Anything past the year 2100 is
rejected. Amounts and fees are unaffected, being milli-satoshis rather than
timestamps.
Documented
-
A survey of what shipping wallets put on the wire, taken from their service
code rather than from the specification. Alby Hub, Coinos and Zeus work.
LNbitsnwcprovideris incompatible: it is NIP-04 only and publishes no
encryptiontag, so discovery fails before anything is sent. Zeus reaches the
wire through@getalby/sdk, which publishes noextensionstag, so extension
05 is unavailable there even thoughlist_transactionsis implemented. -
Zeus returns a successful
pay_invoiceresult with an empty preimage on
purpose, to mean an HTLC is in flight but not yet settled. This client refuses
that response rather than reporting a settlement it cannot substantiate, and
the refusal is an ambiguous outcome rather than a failure: an application that
reads it as "the payment did not happen" will be wrong precisely when the
payment is still on its way.
Reproducible build: byte-identical output verified across two independent CI runners.
Artefact integrity
file: forgesworn-nwc-kit-0.1.5.tgz
size: 39258 bytes
sha256: be67333dc8ded7b311e5d553d52e68be4d1c44b47a442ddf2fa272022ce62370
sha512-Xc03JcMEkLs9b88V3n64JbEuYDN1WVvTPtNm1HtmvvNqPfS3uTLI6o2xh3sn0XDMdPhevDEkxF3W5HC/DyOyCQ==
Verify against the registry tarball:
curl -sLO https://registry.npmjs.org/@forgesworn/nwc-kit/-/nwc-kit-0.1.5.tgz
shasum -a 256 nwc-kit-0.1.5.tgzv0.1.4
Fixed
-
Transaction and wallet-info results no longer reject
""andnullin
optional fields. Go marshals an unset string as""and a nil pointer as
nullunless the struct tag saysomitempty, and Alby Hub's NIP-47 structs
mostly do not carry it. Its ordinary responses therefore arrive full of empty
strings and nulls where a literal reading of the specification expects the
field to be missing.The effect was severe.
makeInvoice()failed every time against Alby Hub,
because a freshly created invoice has no preimage and the empty string was
read as a malformed one.lookupInvoice()failed on anything unsettled,
listTransactions()failed on any page containing a pending entry, and
getInfo()failed whenever a single optional field, such as an unset node
alias or colour, came back null.Emptiness is now recognised as absence wherever a field is optional. Values
that are present and wrong are still refused, andpayInvoice()still demands
a real preimage: there it is the evidence of settlement rather than an
optional detail, so an empty one remains a rejection. -
An empty
invoiceis treated as absence rather than corruption, because an
outgoing keysend payment has no invoice to report.
Added
test/wallet-shapes.test.ts, fixtures taken from what shipping wallets put on
the wire rather than from what the specification's prose describes.
Reproducible build: byte-identical output verified across two independent CI runners.
Artefact integrity
file: forgesworn-nwc-kit-0.1.4.tgz
size: 37988 bytes
sha256: 6ad6905f56afbe926f87623fc997caa17ab40ce0e3ea6ff18d1e24c1e955835f
sha512-SufUT944CIoDfoUWoIvy8gF69T3C9HyRgXaoSmIBgU5ayipbYNqZA/cEo2ld1bUGvLsGGoST1SQksK8xEEr9Sg==
Verify against the registry tarball:
curl -sLO https://registry.npmjs.org/@forgesworn/nwc-kit/-/nwc-kit-0.1.4.tgz
shasum -a 256 nwc-kit-0.1.4.tgzv0.1.3
Documented
-
INVALID_RESPONSEon a published payment is an ambiguous outcome, not a
refusal. The previous wording listed timeout, abort, close and publication
failure as the ambiguous cases, which invited the reading that a rejected
response meant the money had definitely stayed put. It does not.A wallet that answers with an unusable result has not said the payment failed;
it has said nothing that can be acted on. Found against a real wallet: a bridge
returned an empty preimage as a successful result whenever its node could not
route the payment, because the node signalled failure with an HTTP 200 body
rather than an error status. This client rejects such a response instead of
reporting a settlement it cannot substantiate, but rejection is a statement
about the evidence, not about the money.README.md,SECURITY.md,THREAT-MODEL.mdandllms.txtnow enumerate
which error codes are ambiguous after publication, and which are raised before
publication and therefore prove that nothing was attempted.
No runtime or API change.
Reproducible build: byte-identical output verified across two independent CI runners.
Artefact integrity
file: forgesworn-nwc-kit-0.1.3.tgz
size: 36844 bytes
sha256: de591f07453578429842c88fafd00e7fab9aae5f5de0e882749e176e14b332ff
sha512-3POhlz9kq7alalb7bqJn90qTQ2mH6aobTRwmqqsZ+9+lMPK0Cr4E4ZZRhu/XXTjWcAuTTCoWawCEZOqzp3rZsA==
Verify against the registry tarball:
curl -sLO https://registry.npmjs.org/@forgesworn/nwc-kit/-/nwc-kit-0.1.3.tgz
shasum -a 256 nwc-kit-0.1.3.tgzv0.1.2
Fixed
-
Capability discovery now retries when a relay answers with nothing. Measured
against a live wallet on a single relay,connect()succeeded on the first
query 4 times in 8; with retries, 7 in 8. The first call a consumer makes was
failing up to half the time.Discovery is a read, so repeating it cannot cost anything. That is the
opposite of a payment, and the distinction is why retrying is safe here and
never safe for a request. Only a fast empty answer is retried: a relay that
consumed its whole timeout is unresponsive rather than empty, and is left
alone. Retries run inside the existinginfoTimeoutMs, so the worst case a
caller waits is unchanged.Multiple relays remain the real answer to a relay that goes quiet, and that is
the connection string's job rather than this client's.
Reproducible build: byte-identical output verified across two independent CI runners.
Artefact integrity
file: forgesworn-nwc-kit-0.1.2.tgz
size: 35787 bytes
sha256: e736e1a8078ea14e4280e2830dd26b29d4c799dfbdcf9f8f9442413f66500d53
sha512-mQNnDcBvze8WaqvRP36gFq0ixCJbTFH2fp6YeM7Z1GRWCVbk8dLYjfSGQf1o7D3mQlzXTFZh0Fx2Zp2GK5Kt/A==
Verify against the registry tarball:
curl -sLO https://registry.npmjs.org/@forgesworn/nwc-kit/-/nwc-kit-0.1.2.tgz
shasum -a 256 nwc-kit-0.1.2.tgzv0.1.1
Changed
- Prepare the first release through npm trusted publishing with provenance.
The public API and runtime behaviour are unchanged from0.1.0.
Documented
- Wallet compatibility: this client requires a signed kind 13194 info event
advertisingnip44_v2before it will send anything. NIP-47 makes that event a
SHOULD, so this is stricter than the specification, and deliberately: a wallet
advertising no encryption mode defaults to NIP-04 under the specification, and
NIP-04 is not implemented here. A wallet that skips the info event fails with
INFO_UNAVAILABLE.
Reproducible build: byte-identical output verified across two independent CI runners.
Artefact integrity
file: forgesworn-nwc-kit-0.1.1.tgz
size: 33847 bytes
sha256: 19fea859a1a24279ed428cb05c23a418469a7c6d3528b692fd7e8f9912fb72ae
sha512-ZKjQ6TfMkmlxJMC9nndmF5jd2e/h1nbE5v4wLwGqIrXwHYRBg/Ilbhjj6Fjmhgfs31e014bvOANEbPc9icT5ZA==
Verify against the registry tarball:
curl -sLO https://registry.npmjs.org/@forgesworn/nwc-kit/-/nwc-kit-0.1.1.tgz
shasum -a 256 nwc-kit-0.1.1.tgz