首页龙虾技能列表 › Blink — Blink工具

Blink — Blink工具

v1.7.2

[AI辅助] Bitcoin Lightning wallet for agents — balances, invoices, payments, BTC/USD swaps, QR codes, price conversion, transaction history, and L402 auto-pay client...

1· 420·0 当前·0 累计
by @pretyflaco·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/12
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill's requested resources, files, and behavior align with its stated purpose as a Blink Lightning wallet: it needs Node and an API key, talks to Blink endpoints, and persistently stores small wallet-related artifacts under ~/.blink.
评估建议
This skill appears to be what it claims: a Blink Lightning wallet implemented in Node that needs your BLINK_API_KEY and will talk to Blink's API/WebSocket endpoints. Before installing: 1) Provide a minimal-scoped API key (Read/Receive and only add Write when you intend to send funds). 2) Be aware the scripts will read common shell rc files (~/.profile, ~/.bashrc, etc.) to find BLINK_API_KEY if the env var isn't set — this is done locally with a narrow regex, but you may prefer to export BLINK_AP...
详细分析 ▾
用途与能力
Name/description (Blink Lightning wallet) match the declared requirements: node binary and BLINK_API_KEY. Optional env vars (BLINK_API_URL, BLINK_WS_URL, L402 and budget envs) are relevant to wallet, swap, and L402 functionality. No unrelated cloud credentials or services are requested.
指令范围
Runtime instructions and scripts perform wallet ops, create/check invoices, pay, subscribe via WebSocket, estimate swaps, and manage budgets/L402 tokens. They read only BLINK_API_KEY (env or by regex from common shell rc files) and write transient QR PNGs to /tmp and persistent small files under ~/.blink (l402 root key, token cache, budget & spending log). Reading shell rc files is limited to extracting BLINK_API_KEY via a narrow regex; this is scope-appropriate but is a privacy-sensitive action the user should be aware of.
安装机制
No install script is provided (instruction + included JS files). No downloads from external URLs or package registry installs. Code claims zero runtime npm dependencies and uses Node built-ins only. No high-risk install behavior observed.
凭证需求
Only BLINK_API_KEY is required as a primary credential. Other env vars are optional and directly support L402, budget, or endpoint selection. The code does read common shell rc files to find BLINK_API_KEY when the env var is absent—justified for usability but privacy-relevant. No unrelated SECRET/TOKEN/KEY envs are requested.
持久化与权限
The skill persists small wallet-related artifacts under ~/.blink (L402 root key or generated fallback, L402 token cache, budget config, spending log) and writes temp QR PNGs to /tmp. It does not request elevated system privileges or set always:true. Persisted files may contain sensitive tokens/keys so users should be aware and verify filesystem permissions; the persistence is coherent with the wallet feature set.
scripts/_blink_client.js:27
Environment variable access combined with network send.
scripts/_blink_client.js:60
File read combined with network send (possible exfiltration).
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.7.22026/3/5

Fix: request preImage for intra-ledger settlements in l402_pay. L402 now works when both payer and payee use Blink wallets.

● 无害

安装命令 点击复制

官方npx clawhub@latest install blink
镜像加速npx clawhub@latest install blink --registry https://cn.clawhub-mirror.com

技能文档

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.

什么 Blink?

Blink is a custodial Bitcoin Lightning wallet with a GraphQL API. Key concepts:

  • API 键 — authentication 令牌 (格式: blink_...) 带有 scoped permissions (读取, 接收, 写入)
  • BTC Wallet — balance denominated 在...中 satoshis
  • USD Wallet — balance denominated 在...中 cents (stablecoin pegged 到 USD)
  • Lightning Invoice — BOLT-11 payment 请求 字符串 (lnbc...) used 到 接收 payments
  • Lightning Address — human-readable address (用户@domain) 对于 sending payments 没有 invoice
  • LNURL — protocol 对于 interacting 带有 Lightning services 通过 encoded URLs
  • L402 — HTTP payment protocol (RFC draft) gates resources 后面 Lightning invoice. Servers return HTTP 402 带有 macaroon + invoice; clients pay 和 重试 带有 令牌.

Environment

  • Requires bash 和 节点.js 18+.
  • Requires BLINK_API_KEY environment 变量 带有 appropriate scopes.
  • 对于 WebSocket subscriptions: 节点 22+ (native) 或 节点 20+ 带有 --experimental-websocket.
  • Zero runtime npm dependencies. 仅 节点.js built-在...中 modules used (节点:util, 节点:fs, 节点:path, 节点:child_process).

Use this skill for concrete wallet operations, not generic Lightning theory.

Getting Started

1. 获取 API 键

  • 创建 free 账户 在 dashboard.blink.sv.
  • Go 到 API Keys 和 创建 键 带有 scopes 您 需要.
  • 设置 在...中 environment:
export BLINK_API_KEY="blink_..."

API 键 Scopes:

  • 读取 — 查询 balances, 事务 history, price, 账户 info
  • 接收 — 创建 invoices
  • 写入 — 发送 payments (使用 带有 caution)
Tip: Start with Read + Receive only. Add Write when you need to send payments.

2. 验证 works

node {baseDir}/scripts/balance.js

If you see JSON with your wallet balances, you're ready.

3. Staging / Testnet (recommended 对于 第一个-时间 setup)

To use the Blink staging environment (signet) instead of real money:

export BLINK_API_URL="https://api.staging.blink.sv/graphql"

Create a staging API key at 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 键 auto-detection

Scripts automatically resolve BLINK_API_KEY using this order:

  • process.env.BLINK_API_KEY (checked 第一个)
  • Shell rc files: ~/.个人资料, ~/.bashrc, ~/.bash_profile, ~/.zshrc — scanned 对于 导出 BLINK_API_KEY=... line 仅

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.

可选: CLI wrapper (满 GitHub repo 仅)

If you have cloned the full GitHub repo, you can optionally install a blink CLI command:

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/