Index of every page on this site: llms.txt
All skills
lightninglabs avatar

/wavelength-web

@76dd536
Run it yourself

Embed a self-custodial Lightning wallet in a web app with the Wavelength SDK (@lightninglabs/wavelength-web, @lightninglabs/wavelength-react, @lightninglabs/wavelength-core). Use when integrating Wavelength into a browser or React app, creating a wallet client, sending or receiving Lightning payments in the browser, wiring WavelengthProvider, hosting wasm runtime assets, or adding passkey protection. Triggers include "wavelength", "embed a Lightning wallet", "createWebWalletEngine", "WavelengthProvider", "useWalletPasskey", and "wavelength runtime assets".

Use this Skill: https://skilld.dev/gh/lightninglabs/wavelength-sdk/wavelength-web

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈145 tokens for metadata: the name and description. ≈846 when used: this file.

Description uses 7.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈579 characters, or 7.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Wavelength web integration

Wavelength embeds a self-custodial Lightning wallet in a web app. The wallet daemon runs as WebAssembly in a Web Worker in the user's browser; there is no node to run, no channels to open, and no inbound liquidity to manage.

Docs index: https://wavelength.lightning.engineering/llms.txt. Every docs page has a markdown twin at the same URL with .md appended; fetch those.

Packages

Check the npm registry for current versions; do not rely on memorized ones.

  • @lightninglabs/wavelength-web: the browser transport. createWebClient() builds a raw client; createWebWalletEngine() wraps it in a WalletEngine and is the factory to use with the React provider. Re-exports everything from core.
  • @lightninglabs/wavelength-react: <WavelengthProvider> plus hooks. Takes an injected engine; it does not depend on the web package.
  • @lightninglabs/wavelength-core: the transport-agnostic contract and types. Install it directly only when building a custom binding.

Task routing

Building Read first
Any new integration https://wavelength.lightning.engineering/web/get-started/quickstart.md
React app https://wavelength.lightning.engineering/integrations/react.md
Wallet creation and unlock https://wavelength.lightning.engineering/guides/create-a-wallet.md
Sending payments https://wavelength.lightning.engineering/guides/send-a-payment.md
Receiving payments https://wavelength.lightning.engineering/guides/receive-a-lightning-payment.md
Passkey protection https://wavelength.lightning.engineering/guides/use-a-passkey.md
Asset hosting or COOP/COEP issues https://wavelength.lightning.engineering/web/get-started/hosting-runtime-assets.md

Critical rules

  • Create the engine with createWebWalletEngine() from wavelength-web and inject it into React via <WavelengthProvider engine={...}>. Never import wavelength-web inside framework-agnostic or react-only modules; the react package deliberately has no dependency on the web transport.
  • The wasm runtime assets are self-hosted by the embedding app. Copy them to a public directory and point runtimeBaseUrl at it. There is no CDN default yet; a missing or wrong runtimeBaseUrl is the most common integration failure.
  • A Content-Security-Policy must allow script-src blob:. The runtime loader always executes the bootstrap scripts (wasm_exec.js, sqlite-bridge.js) from a blob URL rather than a <script src>; a CSP without blob: breaks the SDK outright. See https://wavelength.lightning.engineering/web/get-started/hosting-runtime-assets.md.
  • Passkey ceremonies are injected. Pass webPasskeyCeremony from wavelength-web into useWalletPasskey(ceremony); do not implement WebAuthn calls by hand.
  • The daemon persists to OPFS. Wallet state survives reloads; test flows must unlock an existing wallet rather than recreating it on every load.
  • Wallet state arrives as a lowercase string union (for example "ready"); daemon JSON is camelCase at the SDK boundary. Do not pattern-match proto numeric states or PascalCase field names from daemon-level docs.

Verify the integration

After wiring, confirm: the app builds, the engine's phase (from useWallet()) reaches ready, and an invoice can be created. Reload the page and unlock to confirm persistence.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning3mo3 checks · Risk SAFE
  • Gen Agent Trust Hub3mo

    The skill provides legitimate integration instructions for the Wavelength SDK, a set of tools for embedding Lightning wallets in web applications. All referenced resources, documentation, and software packages are hosted by the official vendor, and no security risks were identified.

  • Socket3mo

    No alerts

  • Snyk3mo

    Risk: MEDIUM · 2 issues

Signed by skilld at 76dd536. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 4 months ago

README badge

README badge for lightninglabs/wavelength-sdk/wavelength-web