Skip to content

Releases: forgesworn/nwc-kit

v0.1.9

Choose a tag to compare

@TheCryptoDonkey TheCryptoDonkey released this 19 Oct 09:12
fd1938f

Documented

  • The README and llms.txt examples now catch NwcError and map code and
    walletCode to not-sent, refused and ambiguous outcomes, define every
    variable they use, and name farrier-kit in the install line.
  • llms.txt lists the fields of NwcCapabilities, PayInvoiceResult,
    NwcTransaction, GetInfoResult and GetBalanceResult, the units of
    amount and what payInvoice's optional amount is for, the
    NwcTransport interface, the pool argument of NostrRelayTransport and
    the extension 05 parameters.
  • listTransactions rejects a limit above 20 with INVALID_REQUEST; the
    docs previously said it was capped. The README and llms.txt now say so.
  • connect() is optional: request methods call it when no capabilities are
    cached. Documented, with the effect of close().
  • AGENTS.md classes INVALID_RESPONSE and ambiguous WALLET_ERROR codes
    with the other post-publication failures.
  • The README names the type-only core and filter nostr-tools subpaths and
    no longer names the internal execute method.
  • recipes/ is now in the published package, and the README links
    RELEASING.md by 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.tgz

v0.1.8

Choose a tag to compare

@TheCryptoDonkey TheCryptoDonkey released this 23 Sep 15:09
d5a4720

Fixed

  • getInfo() accepts a 33-byte compressed Lightning node id (66 hex
    characters, starting 02 or 03) as pubkey. 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 on pay_invoice now reads "outcome
    unknown: reconcile before retrying".

Documented

  • Classify WALLET_ERROR: only an explicit refusal such as PAYMENT_FAILED or
    INSUFFICIENT_BALANCE is definite; INTERNAL, OTHER and unrecognised codes
    are ambiguous. UNSUPPORTED_EXTENSION joins the pre-publication list.
  • The wallet table separates Rizful, tested on mainnet, from wallets that were
    only surveyed in code. llms.txt records the Rizful acceptance.
  • The site no longer claims the result method is checked before decryption, or
    that inspectNwcConnection() 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.tgz

nwc-kit v0.1.7

Choose a tag to compare

@TheCryptoDonkey TheCryptoDonkey released this 14 Aug 11:09
c702cb8

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.tgz

v0.1.6

Choose a tag to compare

@TheCryptoDonkey TheCryptoDonkey released this 14 Aug 07:52
4069481

Fixed

  • listTransactions() no longer requires an extensions tag. It previously
    refused any wallet whose kind 13194 event did not name 05 there, 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 after list_transactions was 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, execute still refuses any method missing from that list, and
    validateTransaction still guards the response. A wallet advertising neither
    the extension nor the method is still refused.

Documented

  • LNbits nwcprovider is reachable after all.
    PR #51 adds NIP-44 v2 and has
    been open and unreviewed since July. Its padding was checked against
    nostr-tools across 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.tgz

v0.1.5

Choose a tag to compare

@TheCryptoDonkey TheCryptoDonkey released this 14 Aug 07:40
ab3f3b2

Fixed

  • Transaction timestamps outside the Unix-seconds range are now refused.
    created_at, expires_at and settled_at in 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.
    LNbits nwcprovider is incompatible: it is NIP-04 only and publishes no
    encryption tag, so discovery fails before anything is sent. Zeus reaches the
    wire through @getalby/sdk, which publishes no extensions tag, so extension
    05 is unavailable there even though list_transactions is implemented.

  • Zeus returns a successful pay_invoice result 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.tgz

v0.1.4

Choose a tag to compare

@TheCryptoDonkey TheCryptoDonkey released this 14 Aug 07:28
8a6cb36

Fixed

  • Transaction and wallet-info results no longer reject "" and null in
    optional fields. Go marshals an unset string as "" and a nil pointer as
    null unless the struct tag says omitempty, 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, and payInvoice() 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 invoice is 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.tgz

v0.1.3

Choose a tag to compare

@TheCryptoDonkey TheCryptoDonkey released this 14 Aug 06:57
e833c79

Documented

  • INVALID_RESPONSE on 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.md and llms.txt now 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.tgz

v0.1.2

Choose a tag to compare

@TheCryptoDonkey TheCryptoDonkey released this 13 Aug 19:40
4ebd0af

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 existing infoTimeoutMs, 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.tgz

v0.1.1

Choose a tag to compare

@TheCryptoDonkey TheCryptoDonkey released this 13 Aug 18:36
d187b24

Changed

  • Prepare the first release through npm trusted publishing with provenance.
    The public API and runtime behaviour are unchanged from 0.1.0.

Documented

  • Wallet compatibility: this client requires a signed kind 13194 info event
    advertising nip44_v2 before 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