Skip to content

Add lnurlmint v0.1.2 - #842

Open
bitkarrot wants to merge 2 commits into
lnbits:mainfrom
bitkarrot:add-lnurlmint-v0.1.2
Open

Add lnurlmint v0.1.2#842
bitkarrot wants to merge 2 commits into
lnbits:mainfrom
bitkarrot:add-lnurlmint-v0.1.2

Conversation

@bitkarrot

Copy link
Copy Markdown
Collaborator

Summary

Adds lnurlmint v0.1.2 to the vetted extensions registry.

lnurlmint implements LUD-25 lnurlcash, letting each LNbits wallet run its own mint of Lightning-funded bearer notes. Notes circulate offline as lnurlw:// withdraw links and can be rotated, split, merged, or melted back into a BOLT-11 payment. A port of the standalone lnurl-mint FastAPI app into the LNbits extension model.

Features

  • Per-wallet mints with custom fees, limits, and identity
  • Mint (LUD-06), Melt (LUD-03), Rotate, Split, Merge
  • Verify (LUD-21) settlement status + offline verification (LUD-25) secp256k1 signatures
  • Comment-protected notes, sunset mode, Tor support
  • Management SPA + public one-pager with QR/LNURL/node info

Manifest

Verification

  • python3 check.py lnurlmint passes (hash match, icon OK, min_lnbits_version match)
  • Archive excludes tests/, .planning/, .claude/ via .gitattributes export-ignore
  • Archive contains mandatory files: LICENSE, README.md, __init__.py, config.json, manifest.json
  • details_link points to the repo config.json

Test plan

  • python3 check.py lnurlmint from a clean checkout of this PR

Register lnurlmint (LUD-25 lnurlcash) — mint Lightning-funded bearer
notes per-wallet. Notes circulate offline as lnurlw:// withdraw links
and can be rotated, split, merged, or melted back to a BOLT-11 payment.
The jmeter CI hardcoded lnbits/lnbits-extensions in the
LNBITS_EXTENSIONS_MANIFESTS raw URL, so fork PRs 404 because the
branch only exists in the fork, not upstream.

Use github.event.pull_request.head.repo.full_name (falls back to
github.repository for push events) and github.event.pull_request.head.ref
(falls back to github.ref_name) so the manifest is fetched from the
correct repo for fork PRs.
@bitkarrot

Copy link
Copy Markdown
Collaborator Author

Regarding the jmeter CI failure

The jmeter job fails on the Fetch vetted extension list step with a 404:

https://raw.githubusercontent.com/lnbits/lnbits-extensions/add-lnurlmint-v0.1.2/extensions.json  →  404

This is a pre-existing CI infrastructure bug on main, not an issue with the lnurlmint entry. The workflow hardcodes the upstream repo in the manifest URL:

LNBITS_EXTENSIONS_MANIFESTS: "https://raw.githubusercontent.com/lnbits/lnbits-extensions/${{ github.head_ref || github.ref_name }}/extensions.json"

For fork PRs, the branch only exists in the fork (bitkarrot/lnbits-extensions), not in lnbits/lnbits-extensions, so the raw URL 404s. This affects every fork-submitted PR, not just this one.

Additionally, for fork PRs GitHub Actions runs the workflow definition from the base branch (main), not the PR head branch (a security measure), so the workflow fix included in this PR cannot take effect until it is merged to main.

Proposed fix (for main)

Use the PR head repo so the manifest is fetched from the correct location for fork PRs:

LNBITS_EXTENSIONS_MANIFESTS: "https://raw.githubusercontent.com/${{ github.event.pull_request.head.repo.full_name || github.repository }}/${{ github.event.pull_request.head.ref || github.ref_name }}/extensions.json"

The same change applies to the EXTENSIONS_MANIFEST_PATH env var in the run jmx scripts step (though that one is a local checkout path and resolves correctly already).

What does pass

  • validate-json — JSON syntax valid
  • check-json (python check.py) — hash match, icon OK, min_lnbits_version match, all mandatory files present in the archive

The extension manifest itself is valid and ready for review. The jmeter failure is purely the CI infra issue described above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant