⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

v1.7.0

blink

pretyflaco@pretyflaco⭐ 1 stars· last commit 7mo ago· 2 open issues

Bitcoin Lightning wallet for agents — balances, invoices, payments, BTC/USD swaps, QR codes, price conversion, transaction history, and L402 auto-pay client via the Blink API. All output is JSON.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐ 1 on GitHubGitHub ↗

New / niche

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

Blink Lightning CLI

Bitcoin Lightning wallet for the command line — zero runtime npm dependencies, Node.js 18+ built-ins only.

24 commands for wallet management, payments, invoices, swaps, L402 paywall operations (consumer + producer), service discovery, and budget controls. Designed for humans and AI agents alike.

Highlights

  • Zero runtime dependencies — only Node.js 18+ built-ins (node:crypto, node:fs, node:util, etc.)
  • 24 commands — balance, payments, invoices, QR codes, swaps, L402 consumer + producer, service discovery, budget controls
  • L402 paywall toolkit — create Lightning paywalls (producer) and pay them (consumer)
  • 261 tests, 0 failing — node:test framework, no test library dependencies
  • JSON-first output — structured JSON to stdout, status messages to stderr
  • AI-agent native — published on ClawHub for OpenClaw/Hermes agents; also works with any LLM or human

Quick Start

export BLINK_API_KEY="blink_..."

blink balance                                          # wallet balances + USD estimates
blink create-invoice 1000 "Coffee payment"             # create a Lightning invoice
blink pay-invoice lnbc...                              # pay a Lightning invoice
blink price 50000                                      # convert sats to USD
blink l402-challenge --amount 100 --expiry 3600        # create an L402 paywall challenge
blink l402-verify --token <macaroon>:<preimage>        # verify a client's payment proof

Commands

Wallet

CommandDescription
blink balanceShow BTC and USD wallet balances with pre-computed USD estimates
blink account-infoShow account level, spending limits, and wallet summary
blink transactionsList recent wallet transactions with pagination
blink priceBTC/USD price, currency conversion, and price history (no API key required)

Payments

CommandDescription
blink pay-invoice <bolt11>Pay a BOLT-11 Lightning invoice
blink pay-lnaddress <addr> <sats>Send sats to a Lightning Address (user@domain)
blink pay-lnurl <lnurl> <sats>Send sats to a raw LNURL payRequest string
blink fee-probe <bolt11>Estimate the fee for paying a Lightning invoice without sending

Invoices

CommandDescription
blink create-invoice <sats> [memo]Create a BTC Lightning invoice with optional auto-subscribe
blink create-invoice-usd <cents> [memo]Create a USD-denominated Lightning invoice
blink check-invoice <hash>Check payment status of a Lightning invoice by payment hash
blink subscribe-invoice <bolt11>Watch an invoice for payment via WebSocket
blink subscribe-updatesStream account activity updates via WebSocket (NDJSON)
blink qr <bolt11>Generate a QR code for a Lightning invoice (terminal + PNG file)

Swaps

CommandDescription
blink swap-quote <direction> <amount>Get a BTC <-> USD conversion quote (no funds moved)
blink swap-execute <direction> <amount>Execute a BTC <-> USD wallet conversion

L402 Consumer (pay paywalls)

CommandDescription
blink l402-discover <url>Probe a URL for L402 payment requirements (no payment made)
blink l402-pay <url>Fetch an L402-gated resource, paying automatically via Blink
blink l402-store <subcommand>Manage the L402 token cache (~/.blink/l402-tokens.json)
blink l402-search [query]Search L402 service directories (l402.directory, 402index.io)
blink l402-info <service_id>Get full service details + paid health reports

L402 Producer (create paywalls)

CommandDescription
blink l402-challenge --amount <sats>Create an L402 payment challenge (invoice + signed macaroon)
blink l402-verify --token <mac>:<pre>Verify an L402 payment token (preimage + HMAC + caveats)

Budget Controls

CommandDescription
blink budget statusShow current spend vs rolling limits and remaining budget
blink budget set --hourly <sats> --daily <sats>Set per-hour and per-day spending limits
blink budget allowlist list|add|remove <domain>Manage L402 domain allowlist
blink budget log [--last N]Show recent spending entries
blink budget resetClear spending history

Installation

Standalone

git clone https://github.com/blinkbitcoin/blink-skills.git
cd blink-skills
export BLINK_API_KEY="blink_..."
./bin/blink.js balance

Or add to your PATH:

export PATH="$PATH:$(pwd)/bin"
blink balance

OpenClaw / Hermes Agents

Published on ClawHub as [email protected]. The full skill manifest and agent instructions are in blink/SKILL.md.

With blink-mcp

For MCP-native clients (Claude Desktop, Cursor, etc.), see blink-mcp. The CLI is typically 80-100x more token-efficient per agent session than MCP tool calls.

Configuration

VariableRequiredDescription
BLINK_API_KEYYes (wallet ops)Blink API key (blink_...). Not needed for price.
BLINK_API_URLNoOverride API endpoint. Default: https://api.blink.sv/graphql
BLINK_L402_ROOT_KEYNo64-char hex root key for L402 producer HMAC signing. Auto-generated to ~/.blink/l402-root-key if not set.
BLINK_BUDGET_HOURLY_SATSNoMax sats spendable in rolling 1-hour window.
BLINK_BUDGET_DAILY_SATSNoMax sats spendable in rolling 24-hour window.
BLINK_L402_ALLOWED_DOMAINSNoComma-separated domain allowlist for L402 auto-pay.

Staging / testnet:

expor

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • blink/SKILL.md7.8 KBupstream ↗
    ---
    name: blink
    description: Bitcoin Lightning wallet for agents — balances, invoices, payments, BTC/USD swaps, QR codes, price conversion, transaction history, and L402 auto-pay client via the Blink API. All output is JSON.
    version: 1.7.0
    repository: https://github.com/blinkbitcoin/blink-skill
    metadata:
      oa:
        project: blink
        identifier: blink
        version: '1.4.6'
        expires_at_unix: 1798761600
        capabilities:
          - http:outbound
          - filesystem:read
          - filesystem:write
      openclaw:
        requires:
          env: [BLINK_API_KEY]
          bins: [node]
        optionalEnv: [BLINK_API_URL, BLINK_WS_URL, BLINK_L402_ROOT_KEY, BLINK_BUDGET_HOURLY_SATS, BLINK_BUDGET_DAILY_SATS, BLINK_L402_ALLOWED_DOMAINS]
        primaryEnv: BLINK_API_KEY
        emoji: '⚡'
        homepage: 'https://github.com/blinkbitcoin/blink-skill'
        security:
          secrets: ['BLINK_API_KEY']
          network: 'outbound HTTPS to api.blink.sv (or BLINK_API_URL override); outbound WSS to ws.blink.sv for subscriptions'
          filesystem: 'reads ~/.profile, ~/.bashrc, ~/.bash_profile, ~/.zshrc to locate BLINK_API_KEY export (env var checked first); writes temporary QR PNGs to /tmp; writes L402 token cache to ~/.blink/l402-tokens.json; writes budget config to ~/.blink/budget.json and spending log to ~/.blink/spending-log.json'
          persistence: 'L402 token cache at ~/.blink/l402-tokens.json; budget config at ~/.blink/budget.json; spending log at ~/.blink/spending-log.json (auto-pruned, 25h retention)'
          notes: 'Zero npm runtime dependencies. Only Node.js built-in modules used. No global installs required — scripts run standalone via node.'
    ---
    
    # Blink Skill
    
    Bitcoin Lightning wallet operations via the Blink API. Enables agents to check balances, receive payments via invoices, send payments over Lightning, track transactions, monitor prices, and automatically pay for L402-gated web services.
    
    ## What is Blink?
    
    Blink is a custodial Bitcoin Lightning wallet with a GraphQL API. Key concepts:
    
    - **API Key** — authentication token (format: `blink_...`) with scoped permissions (Read, Receive, Write)
    - **BTC Wallet** — balance denominated in satoshis
    - **USD Wallet** — balance denominated in cents (stablecoin pegged to USD)
    - **Lightning Invoice** — BOLT-11 payment request string (`lnbc...`) used to receive payments
    - **Lightning Address** — human-readable address (`user@domain`) for sending payments without an invoice
    - **LNURL** — protocol for interacting with Lightning services via encoded URLs
    - **L402** — HTTP payment protocol (RFC draft) that gates resources behind a Lightning invoice. Servers return HTTP 402 with a macaroon + invoice; clients pay and retry with the token.
    
    ## Environment
    
    - Requires `bash` and Node.js 18+.
    - Requires `BLINK_API_KEY` environment variable with appropriate scopes.
    - For WebSocket subscriptions: Node 22+ (native) or Node 20+ with `--experimental-websocket`.
    - Zero runtime npm dependencies. Only Node.js built-in modules are used (`node:util`, `node:fs`, `node:path`, `node:child_process`).
    
    Use this skill for concrete wallet operations, not generic Lightning theory.
    
    ## Getting Started
    
    ### 1. Get your API key
    
    1. Create a free account at [dashboard.blink.sv](https://dashboard.blink.sv).
    2. Go to **API Keys** and create a key with the scopes you need.
    3. Set it in your environment:
    
    ```bash
    export BLINK_API_KEY="blink_..."
    ```
    
    **API Key Scopes:**
    
    - **Read** — query balances, transaction history, price, account info
    - **Receive** — create invoices
    - **Write** — send payments (use with caution)
    
    > **Tip:** Start with Read + Receive only. Add Write when you need to send payments.
    
    ### 2. Verify it works
    
    ```bash
    node {baseDir}/scripts/balance.js
    ```
    
    If you see JSON with your wallet balances, you're ready.
    
    ### 3. Staging / Testnet (recommended for first-time setup)
    
    To use the Blink staging environment (signet) instead of real money:
    
    ```bash
    export BLINK_API_URL="https://api.staging.blink.sv/graphql"
    ```
    
    Create a staging API key at [dashboard.staging.blink.sv](https://dashboard.staging.blink.sv). The staging environment uses signet bitcoin (no real value) — perfect for testing payment flows safely.
    
    If `BLINK_API_URL` is not set, production (`https://api.blink.sv/graphql`) is used by default.
    
    ### API key auto-detection
    
    Scripts automatically resolve `BLINK_API_KEY` using this order:
    
    1. `process.env.BLINK_API_KEY` (checked first)
    2. Shell rc files: `~/.profile`, `~/.bashrc`, `~/.bash_profile`, `~/.zshrc` — scanned for an `export BLINK_API_KEY=...` line only
    
    No `source ~/.profile` prefix is needed. The rc file scan uses a targeted regex that reads only the `BLINK_API_KEY` export line — no other data is extracted from these files.
    
    ### Optional: CLI wrapper (full GitHub repo only)
    
    If you have cloned the [full GitHub repo](https://github.com/blinkbitcoin/blink-skill), you can optionally install a `blink` CLI command:
    
    ```bash
    npm install   # install dev dependencies (eslint, prettier)
    npm link      # creates global 'blink' command
    blink --help  # verify
    ```
    
    > **Note:** `npm link` modifies global npm state. This is optional — all functionality is available by running scripts directly with `node {baseDir}/scripts/<script>.js`. The ClawHub-installed version does not require or use `npm link`.
    
    ## Agent Safety Policy
    
    These rules are mandatory for any AI agent using this skill:
    
    1. **Ask before spending.** Never execute `pay-invoice`, `pay-lnaddress`, `pay-lnurl`, or `swap-execute` without explicit user confirmation of the amount and recipient.
    2. **Dry-run first.** For swaps, always run with `--dry-run` before executing for real unless the user explicitly says to skip it.
    3. **Check balance before sending.** Always run `balance` before any payment or swap to verify sufficient funds.
    4. **Probe fees before paying.** Run `fee-probe` before `pay-invoice` to show the user the fee cost.
    5. **Use minimum scopes.** Only request Write-scoped API keys when send operations are actually needed.
    6. **Never log or display the API key.** Treat `BLINK_API_KEY` as a secret. Do not echo it, include it in messages, or write it to files.
    7. **Prefer staging for testing.** When the user is testing or learning, suggest setting `BLINK_API_URL` to the staging endpoint.
    8. **Respect irreversibility.** Warn the user that Lightning payments and swaps cannot be reversed once executed.
    9. **L402 auto-pay requires confirmation.** Never call `l402-pay` without dry-running first (`--dry-run`) and confirming the satoshi amount with the user. The token cache (`~/.blink/l402-tokens.json`) means subsequent calls may reuse a paid token silently — inform the user when a cached token is used.
    
    ## Bitcoin Units
    
    - **BTC wallet** amounts are always in **satoshis** (sats). 1 BTC = 100,000,000 sats.
    - **USD wallet** amounts are always in **cents**. $1.00 = 100 cents.
    - When displaying amounts to users, use the formatted fields from output JSON (e.g. `btcBalanceUsdFormatted`, `usdBalanceFormatted`).
    - Do not perform manual BTC-to-USD conversion math — use `blink price <sats>` or the `btcBalanceUsd` field from `balance` output instead.
    - For swap amounts, the `--unit` flag controls interpretation: `sats` for BTC, `cents` for USD.
    
    ## Workflow
    
    1. Pick the operation path first:
    
    - Receive payments (invoice creation, QR codes, payment monitoring).
    - Send payments (invoice pay, Lightning Address, LNURL, BTC or USD wallet).
    - Swap between wallets (BTC <-> USD internal conversion).
    - Read-only queries (balance, transactions, price, account info).
    
    2. Configure API access from [blink-api-and-auth](references/blink-api-and-auth.md):
    
    - Set `BLINK_API_KEY` with the correct scopes for your operation.
    - Optionally set `BLINK_API_URL` for staging/testnet.
    - Verify connectivity with `blink balance`.
    
    3. For sending payments, follow [payment-operations](references/payment-operations.md):
    
    - Check balance before sending.
    - Probe fees with `blink fee-probe`.
    - Choose BTC or USD wallet with `--wallet` flag.
    - Execute paym
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/pretyflaco-blink-claw-skill-blink.md

// REPO STATS

1 stars
2 open issues
Last commit: 7mo ago