Release v1.1.0 - Add WebLN API support for Lightning wallet integration
- Add window.webln API for web app Lightning wallet integration
- Implement webln.enable(), getInfo(), sendPayment(), makeInvoice() methods
- Add WebLN permission prompts with proper amount display for payments
- Dispatch webln:ready and webln:enabled events per WebLN standard
- Add NWC client caching for persistent wallet connections
- Implement inline BOLT11 invoice amount parsing
- Always prompt for sendPayment (security-critical, irreversible)
- Add signMessage/verifyMessage stubs that return "not supported"
- Fix response handling for undefined returns in content script
Files modified:
- projects/common/src/lib/models/nostr.ts (WeblnMethod, ExtensionMethod types)
- projects/common/src/lib/models/webln.ts (new - WebLN response types)
- projects/common/src/public-api.ts (export webln types)
- projects/{chrome,firefox}/src/plebian-signer-extension.ts (window.webln)
- projects/{chrome,firefox}/src/background.ts (WebLN handlers)
- projects/{chrome,firefox}/src/background-common.ts (WebLN permissions)
- projects/{chrome,firefox}/public/prompt.html (WebLN cards)
- projects/{chrome,firefox}/src/prompt.ts (WebLN method handling)
- projects/common/src/lib/services/storage/types.ts (ExtensionMethod type)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"manifest_version": 3,
|
||||
"name": "Plebeian Signer",
|
||||
"description": "Nostr Identity Manager & Signer",
|
||||
"version": "1.0.11",
|
||||
"version": "1.1.0",
|
||||
"homepage_url": "https://github.com/PlebeianApp/plebeian-signer",
|
||||
"options_page": "options.html",
|
||||
"permissions": [
|
||||
|
||||
@@ -211,6 +211,53 @@
|
||||
<div id="card2Nip44Decrypt" class="card sam-mt sam-ml sam-mr">
|
||||
<div id="card2Nip44Decrypt_text" class="text"></div>
|
||||
</div>
|
||||
|
||||
<!-- Card for webln.enable -->
|
||||
<div id="cardWeblnEnable" class="card sam-mt sam-ml sam-mr">
|
||||
<p class="description">
|
||||
<b class="host-INSERT color-primary"></b> is requesting permission to
|
||||
<b class="color-primary">connect to your Lightning wallet</b>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Card for webln.getInfo -->
|
||||
<div id="cardWeblnGetInfo" class="card sam-mt sam-ml sam-mr">
|
||||
<p class="description">
|
||||
<b class="host-INSERT color-primary"></b> is requesting permission to
|
||||
<b class="color-primary">read your wallet info</b>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Card for webln.sendPayment -->
|
||||
<div id="cardWeblnSendPayment" class="card sam-mt sam-ml sam-mr">
|
||||
<p class="description">
|
||||
<b class="host-INSERT color-primary"></b> is requesting permission to
|
||||
<b class="color-primary">send a Lightning payment</b> of
|
||||
<b id="paymentAmountSpan" class="color-primary"></b>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Card2 for webln.sendPayment (shows invoice) -->
|
||||
<div id="card2WeblnSendPayment" class="card sam-mt sam-ml sam-mr">
|
||||
<div id="card2WeblnSendPayment_json" class="json"></div>
|
||||
</div>
|
||||
|
||||
<!-- Card for webln.makeInvoice -->
|
||||
<div id="cardWeblnMakeInvoice" class="card sam-mt sam-ml sam-mr">
|
||||
<p class="description">
|
||||
<b class="host-INSERT color-primary"></b> is requesting permission to
|
||||
<b class="color-primary">create a Lightning invoice</b>
|
||||
<span id="invoiceAmountSpan"></span>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Card for webln.keysend -->
|
||||
<div id="cardWeblnKeysend" class="card sam-mt sam-ml sam-mr">
|
||||
<p class="description">
|
||||
<b class="host-INSERT color-primary"></b> is requesting permission to
|
||||
<b class="color-primary">send a keysend payment</b>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!------------->
|
||||
|
||||
Reference in New Issue
Block a user