Skip to content

v0.5.0

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Oct 09:41
· 8 commits to main since this release
f039788

Added

  • @arkade-os/lnurl-client 0.8.0: the glue a wallet otherwise writes itself — createLocalStorageLnurlWatermarkStore(key?) from /browser is the cursor backend createLnurlPaymentRepository needs beside the IndexedDB record store: one JSON map of ${baseUrl}|${lightningAddress} cursors under key, where a map that cannot be read counts as empty so the next sync replays rather than skips. lnurlActivityResolver and sentActivityResolver await their getter on every prepare, so () => repository.all() passes straight in. arkadeLnurl().sessionLnurl() returns the LNURL a nameless claim will serve, before the claim lands. chainName(chainId) names a CAIP-2 chain as the BTCPay LNURLVerify plugin does. It also adds integration helpers: createLocalStorageLnurlSentPaymentStore(key?) in /browser backs createLnurlSendTracker, and tracker.subscribe(listener) fires after each write that landed. syncPayments and receiver.sync() take a signal that stops fetching and writing. lnurlActivity(activity) reads a tagged activity row back typed, with LNURL_ACTIVITY_KIND / SENT_ACTIVITY_KIND exported. LnurlAddressErrorCode types LnurlError.code for address endpoints, held to the server's codes by a type-level test. For payers, lnurlPayableRanges(payRequest) gives the sendable ranges and whether an amount fits, and firstQuote(options) with isLnurlRail falls back from a rail that cannot quote. For token receive, tokenOptionAccepts applies an option's bounds and requestTokenQuote requests, checks and normalizes a quote with a minimum lifetime. Receiver discovery moves into the facade: owned({ refresh: true }) re-binds the current destinations only on active aliases the server lists as bound elsewhere, or on every alias where the server does not say; claim, owned and upgrade run one at a time per identity and server across facades; a signal passed to owned or claim rejects with its reason and stops further writes; addresses() and domain read without side effects; bootstrapReceiver passes refresh and signal through.
  • The owner's address list reports where each address pays — GET /lnurl/address adds arkadeAddress, claimPublicKey and boardingAddress (null until bound), so a client re-binds only an alias whose destination moved.

Changed

  • arkadeLnurl().owned() returns only an active address; it no longer falls back to a revoked one when nothing else is owned. It also waits for a claim, owned or upgrade still running for the same identity and server, and an object typed as ArkadeLnurl now needs domain and addresses().

Removed

  • HD Lightning-address receiving — the server learnt each receiver's branch xpub and allocated its indexes itself, so it is gone rather than deprecated: the hd body of POST /lnurl/address/:handle/arkade (a body carrying only hd gets the same 400 as one missing arkadeAddress), GET /lnurl/address/:handle/arkade/allocations, and in @arkade-os/lnurl-client the /hd entry, listHdAllocations, Receiver.allocations(), the hd option of registerArkadeIdentity and arkadeLnurl, the HdReceiveConfig, HdReceiveAllocation and HdReceiveAllocationPage types and the @scure/bip32 dependency. Migration 27 drops the HD tables and the addresses.hd_receive column, allocation history included. An address registered in HD mode has no Arkade destination until its owner binds a static one again with arkadeAddress and claimPublicKey; rotating means re-binding, which owned({ refresh: true }) already does.

Fixed

  • API docs (public and admin) load again: Redoc is pinned to v2.5.4, since latest now serves the 3.x ES-module bundle, which a classic script tag cannot run.