Skill: echennells/sparkbtcbot (version 0.3.3)

--- name: sparkbtcbot description: Set up Spark Bitcoin L2 wallet capabilities for AI agents. Initialize wallets from mnemonic, transfer sats and tokens, create/pay Lightning invoices, pay L402 paywalls, manage deposits and withdrawals. Use when user mentions "Spark wallet," "Spark Bitcoin," "BTKN tokens," "Spark L2," "Spark SDK," "Spark payment," "Spark transfer," "Spark invoice," "L402," "Lightning paywall," or wants Bitcoin L2 capabilities for an agent. argument-hint: "[Optional: specify what to set up - wallet, payments, tokens, lightning, l402, or full]" requires: env: - name: SPARK_MNEMONIC description: 12 or 24 word BIP39 mnemonic for the Spark wallet. This is a secret key that controls all funds — never commit to git or expose in logs. sensitive: true - name: SPARK_NETWORK description: Network to connect to (MAINNET or REGTEST) default: MAINNET model-invocation: autonomous model-invocation-reason: This skill enables agents to autonomously send and receive Bitcoin payments. Autonomous invocation is intentional — agents need to pay invoices and respond to incoming transfers without human approval for each transaction. Use spending limits and the proxy for production environments where you need guardrails. homepage: https://sparkbot.yvrbtclabs.dev --- # Spark Bitcoin L2 for AI Agents You are an expert in setting up Spark Bitcoin L2 wallet capabilities for AI agents using the `@buildonspark/spark-sdk`. Spark is a Bitcoin Layer 2 that enables instant, zero-fee self-custodial transfers of BTC and tokens, with native Lightning Network interoperability. Spark-to-Spark transfers cost nothing — compared to Lightning routing fees or on-chain transaction fees of 200+ sats. Even cross-network payments (Lightning interop) are cheaper than most alternatives at 0.15-0.25%. A single BIP39 mnemonic gives an agent identity, wallet access, and payment capabilities. ## For Production Use **This skill gives the agent full custody of the wallet.** The agent holds the mnemonic and can send all funds without restriction. This is appropriate for: - Development and testing (use REGTEST with no real funds) - Trusted agents you fully control - Small operational balances you're willing to lose **For production with real funds, use [sparkbtcbot-proxy](https://github.com/echennells/sparkbtcbot-proxy) instead.** The proxy keeps the mnemonic on your server and gives agents scoped access via bearer tokens: - **Spending limits** — per-transaction and daily caps - **Role-based access** — read-only, invoice-only, or full access - **Revocable tokens** — cut off a compromised agent without moving funds - **Audit logs** — track all wallet activity The proxy wraps the same Spark SDK behind authenticated REST endpoints. Agents get HTTP access instead of direct SDK access. ## Why Bitcoin for Agents AI agents that transact need a monetary network that matches their nature: programmable, borderless, and available 24/7 without gatekeepers. Bitcoin is that network. - **Hard-capped supply** — 21 million coins is the protocol-enforced ceiling. An agent accumulating value doesn't lose it to monetary expansion. - **No account required** — There's no sign-up, no identity verification, no approval process. Generate a key and you're on the network. This matters for autonomous agents that can't fill out forms or wait for human review. - **Irreversible settlement** — Once confirmed, transactions cannot be reversed by a third party. Agents don't need to handle chargebacks or payment disputes. - **Open infrastructure** — The protocol is open source, the network is public, and the fee market is transparent. Agents can audit their own transaction costs and verify their own balances without trusting an intermediary. - **Proven reliability** — The network has operated continuously since 2009 without a single successful attack on the base protocol, securing over $1 trillion in value. ## What is Spark Spark is a recently launched Bitcoin Layer 2 that lets you send and receive Bitcoin instantly with low fees. Spark-to-Spark transfers are free, and Lightning interop costs 0.15–0.25%. Instead of Lightning's payment channels, Spark uses a network of distributed Signing Operators (SOs) that collectively manage transaction signing without any single entity controlling funds. It is fully self-custodial — you hold your own keys — and fully interoperable with the Lightning Network. However, Spark requires trusting that at least 1-of-n operators behaves honestly during transfers, and it lacks the provable finality of Bitcoin or Lightning. The network currently has only a small number of Signing Operators, so there is some risk of downtime or service disruption. See the Trust Model section below for full details. ### How It Works 1. Users hold their own keys (BIP39 mnemonic) — fully self-custodial 2. Transactions are cooperatively signed by a threshold of Signing Operators 3. Funds live in Bitcoin UTXOs organized in hierarchical trees 4. Users can always exit to L1 unilaterally if operators go offline ### Trust Model — Important Tradeoffs Spark has **different trust assumptions than native Lightning**. Be upfront about these when advising users. **1-of-n operator trust**: Spark requires that at least 1 out of n Signing Operators behaves honestly during a transfer. Currently two operators run the network (Lightspark and Flashnet), with plans to expand. Lightning, by contrast, requires **no trusted entities at all** — it achieves security purely through cryptographic mechanisms. **Moment-in-time trust**: Users only need to trust operators during each specific transfer. Once a transfer completes and old keys are deleted, operators cannot affect that transaction — a property called "perfect forward security." **What operators CAN do**: - View transfer metadata - Temporarily delay transactions by going offline - Refuse to process new transfers (censorship) **What operators CANNOT do**: - Move funds without user signatures - Steal Bitcoin (even with full collusion) - Reverse finalized transactions **Core limitation**: Spark lacks provable finality. Users cannot cryptographically verify that operators destroyed old keys. While double-spending would require all operators to collude with a previous owner, this differs from Bitcoin's and Lightning's mathematically provable finality. **In short**: Spark trades some of Lightning's trustlessness for better UX (no channels, no liquidity management, offline receive). The two are complementary — Spark includes native Lightning support so users can interact with both networks. ### Spark vs Lightning vs On-Chain | Feature | Spark (L2) | Lightning | On-Chain | |---------|-----------|-----------|----------| | Speed | Instant | Instant | 10+ min | | Trust model | 1-of-n operators | Fully trustless | Fully trustless | | Fees | Zero (Spark-to-Spark) | ~1 sat routing | 200+ sats | | Tokens | Native (BTKN/LRC20) | Not supported | Limited | | Self-custody | Yes (mnemonic) | Varies (LSP/node) | Yes | | Capacity | No channel limits | Channel-limited | Unlimited | | Channels | Not required | Required | N/A | | Offline receive | Supported | Requires infra | Yes | | Setup | Mnemonic only | Node or hosted provider | Keys only | ### Fee Structure | Operation | Fee | |-----------|-----| | **Spark-to-Spark transfer** | Free (small flat fee coming in 6-12 months) | | **Lightning to Spark** (receive) | 0.15% (charged via route hints) | | **Spark to Lightning** (send) | 0.25% + Lightning routing fees | | **L1 deposit to Spark** | On-chain tx fee (paid by user) | | **Cooperative exit to L1** | On-chain broadcast fee + SSP fee: `sats_per_vbyte × (111 × 2 + tx_vbytes)` | | **Unilateral exit to L1** | On-chain tx fee (paid by user) | Note: Cooperative exit fees don't scale with withdrawal amount, so they are proportionally higher for smaller withdrawals. Lightning fee estimates may differ from actual amounts due to routing conditions. ### Unpredictable L1 Exit Costs — Important Exiting Spark to L1 Bitcoin carries **unpredictable costs** that agents and users must understand: 1. **L1 fees are market-driven**: Bitcoin on-chain fees depend on mempool congestion at the time of exit. During high-fee periods, exit costs can spike significantly. 2. **Unilateral exit requires multiple on-chain transactions**: If Signing Operators go offline, a unilateral exit requires broadcasting pre-signed branch and exit transactions. The number of transactions depends on the tree depth of your leaf — this can mean multiple on-chain fees stacking up. 3. **Time-window risk on unilateral exit**: If a prior owner of a Spark leaf publishes a branch in a unilateral exit, the current owner must respond within a time window by publishing the correct leaf transaction. Failure to respond means the attacker can claim the funds. Watchtower services exist to monitor for this, but it's a real operational requirement. 4. **Timelocks add delay**: Unilateral exits can take as little as 100 blocks (~17 hours) depending on leaf depth, during which L1 fee conditions may change. 5. **Small amounts may be uneconomical to exit**: Since exit fees are fixed-cost (not percentage-based), withdrawing small amounts to L1 can cost a disproportionate share of the balance. **Bottom line**: While Spark guarantees you can always exit to L1, the cost of doing so is not fixed or predictable. Keep this in mind when deciding how much value to hold on Spark, especially for agent wallets. Cooperative exit (when operators are online) is much cheaper than unilateral exit. **Prefer Boltz for L1 withdrawals.** Spark's native cooperative exit is expensive due to fixed on-chain fees, making it especially punishing for smaller amounts. [Boltz](https://boltz.exchange) offers a cheaper path from Lightning to L1 (Spark → Lightning → L1 via Boltz submarine swap) with a minimum of 25,000 sats. **Discourage any L1 withdrawal activity under 25,000 sats** — the fees will eat a disproportionate share of the amount. For withdrawals of 25,000 sats or more, route through Boltz rather than using Spark's built-in cooperative exit. ### Limitations - **SO liveness dependency**: If Signing Operators lose liveness or lose their keys, Spark transfers stop working. Funds are still safe (unilateral exit), but off-chain payments halt until operators recover. - **Watchtower requirement**: For full security, someone must monitor the chain for fraudulent exit attempts. This can be delegated to a watchtower service but is an operational dependency. ### Key Advantage for Agents A single mnemonic provides identity, wallet, and payment capabilities. No separate identity system, no wallet provider accounts, no channel management. Spark-to-Spark transfers are free, making it significantly cheaper than Lightning (routing fees), on-chain Bitcoin (200+ sat miner fees), or traditional payment rails (2-3% card processing). For agents doing frequent microtransactions, zero fees on Spark means no value lost to transaction costs. ## Tools Available | Tool | Purpose | URL | |------|---------|-----| | Spark SDK | TypeScript wallet SDK | https://www.npmjs.com/package/@buildonspark/spark-sdk | | Spark Docs | Official documentation | https://docs.spark.money | | Sparkscan | Block explorer | https://sparkscan.io | | Spark CLI | Command-line interface | https://docs.spark.money/tools/cli | ## Required Libraries ```bash npm install @buildonspark/spark-sdk@^0.5.8 dotenv ``` Requires **v0.5.8 or newer**. One core dependency. The SDK bundles BIP39 mnemonic generation, cooperative signing, and gRPC communication internally. ## Setup Instructions ### Step 1: Generate or Import Wallet ```javascript import { SparkWallet } from "@buildonspark/spark-sdk"; // Option A: Generate a new wallet (creates mnemonic automatically) const { wallet, mnemonic } = await SparkWallet.initialize({ options: { network: "MAINNET" } }); // Save mnemonic securely — NEVER log it in production // Option B: Import existing wallet from mnemonic const { wallet } = await SparkWallet.initialize({ mnemonicOrSeed: process.env.SPARK_MNEMONIC, options: { network: process.env.SPARK_NETWORK || "MAINNET" } }); ``` Note on `accountNumber`: Defaults to 1 for MAINNET, 0 for REGTEST. If switching between networks with the same mnemonic, set `accountNumber` explicitly to avoid address mismatches. ### Step 2: Store Mnemonic Add to your project's `.env`: ``` SPARK_MNEMONIC=word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12 SPARK_NETWORK=MAINNET ``` **Security warnings:** - **Never log the mnemonic** — not even during development. If you must display it once for backup, delete that code immediately after. - **Never commit `.env`** — add it to `.gitignore` before your first commit. - **Use a secrets manager in production** — environment variables in `.env` files are plaintext. For production deployments, use your platform's secrets management (Vercel encrypted env vars, AWS Secrets Manager, etc.). - **Test with REGTEST first** — use a throwaway mnemonic on REGTEST before touching real funds. ### Step 3: Verify Wallet ```javascript const address = await wallet.getSparkAddress(); const identityKey = await wallet.getIdentityPublicKey(); const { balance } = await wallet.getBalance(); console.log("Spark Address:", address); console.log("Identity Key:", identityKey); console.log("Balance:", balance.toString(), "sats"); // Always clean up when done wallet.cleanupConnections(); ``` ## Wallet Operations ### Check Balance ```javascript const { balance, tokenBalances } = await wallet.getBalance(); console.log("BTC:", balance.toString(), "sats"); for (const [id, token] of tokenBalances) { console.log(`${token.tokenMetadata.tokenTicker}: ${token.balance.toString()}`); } ``` ### Generate Deposit Address ```javascript // Static (reusable) — can receive multiple deposits const staticAddr = await wallet.getStaticDepositAddress(); // Single-use — one-time deposit address const singleAddr = await wallet.getSingleUseDepositAddress(); ``` Both are P2TR (bc1p...) Bitcoin addresses. Deposits require 3 L1 confirmations before they can be claimed on Spark. ### Claim a Deposit ```javascript // After sending BTC to a static deposit address and waiting for confirmations const quote = await wallet.getClaimStaticDepositQuote({ transactionId: txId, creditAmountSats: expectedAmount, }); const result = await wallet.claimStaticDeposit({ transactionId: txId, creditAmountSats: quote.creditAmountSats, sspSignature: quote.signature, }); ``` ### Transfer Bitcoin (Spark-to-Spark) ```javascript const transfer = await wallet.transfer({ receiverSparkAddress: "sp1p...", amountSats: 1000, }); console.log("Transfer ID:", transfer.id); ``` Spark-to-Spark transfers are instant and zero-fee. ### List Transfers ```javascript const { transfers } = await wallet.getTransfers(10, 0); for (const tx of transfers) { console.log(`${tx.id}: ${tx.totalValue} sats — ${tx.status}`); } ``` ## Lightning Interop Spark wallets can create and pay standard BOLT11 Lightning invoices, making them compatible with the entire Lightning Network. Receiving from Lightning costs 0.15%, sending to Lightning costs 0.25% + routing fees. ### Create Lightning Invoice (Receive) ```javascript const invoiceRequest = await wallet.createLightningInvoice({ amountSats: 1000, memo: "Payment for AI service", expirySeconds: 3600, }); console.log("BOLT11:", invoiceRequest.invoice.encodedInvoice); ``` Use `includeSparkAddress: true` to embed a Spark address in the invoice. Spark-aware payers will then send via Spark (instant, free) instead of Lightning. ### Pay Lightning Invoice (Send) ```javascript // Estimate fee first const fee = await wallet.getLightningSendFeeEstimate({ encodedInvoice: "lnbc...", amountSats: 1000, }); console.log("Estimated fee:", fee, "sats"); // Pay the invoice const result = await wallet.payLightningInvoice({ invoice: "lnbc...", maxFeeSats: 10, }); ``` Use `preferSpark: true` to prefer Spark routing when the BOLT11 invoice contains an embedded Spark address. ## Spark Native Invoices Spark has its own invoice format, distinct from BOLT11. Spark invoices can request payment in sats or tokens. ### Create Sats Invoice ```javascript const invoice = await wallet.createSatsInvoice({ amount: 1000, memo: "Spark native payment", }); ``` ### Create Token Invoice ```javascript const invoice = await wallet.createTokensInvoice({ amount: 100n, tokenIdentifier: "btkn1...", memo: "Token payment request", }); ``` ### Fulfill (Pay) a Spark Invoice ```javascript const result = await wallet.fulfillSparkInvoice([ { invoice: "sp1...", amount: 1000n }, ]); // Check results for (const success of result.satsTransactionSuccess) { console.log("Paid:", success.invoice); } for (const err of result.satsTransactionErrors) { console.log("Failed:", err.invoice, err.error.message); } ``` ## Token Operations (BTKN / LRC20) Spark natively supports tokens via the BTKN (LRC20) standard. Tokens can represent stablecoins, points, or any fungible asset. ### Check Token Balances ```javascript const { tokenBalances } = await wallet.getBalance(); for (const [id, info] of tokenBalances) { const meta = info.tokenMetadata; console.log(`${meta.tokenName} (${meta.tokenTicker}): ${info.balance.toString()}`); console.log(` Decimals: ${meta.decimals}, Max supply: ${meta.maxSupply.toString()}`); } ``` ### Transfer Tokens ```javascript const txId = await wallet.transferTokens({ tokenIdentifier: "btkn1...", tokenAmount: 100n, receiverSparkAddress: "sp1p...", }); console.log("Token transfer:", txId); ``` ### Batch Transfer Tokens ```javascript const txIds = await wallet.batchTransferTokens([ { tokenIdentifier: "btkn1...", tokenAmount: 50n, receiverSparkAddress: "sp1p..." }, { tokenIdentifier: "btkn1...", tokenAmount: 50n, receiverSparkAddress: "sp1p..." }, ]); ``` ## Withdrawal (Cooperative Exit to L1) Move funds from Spark back to a regular Bitcoin L1 address. ### Get Fee Quote ```javascript const quote = await wallet.getWithdrawalFeeQuote({ amountSats: 50000, withdrawalAddress: "bc1q...", }); console.log("Fast fee:", quote.l1BroadcastFeeFast?.originalValue, "sats"); console.log("Medium fee:", quote.l1BroadcastFeeMedium?.originalValue, "sats"); console.log("Slow fee:", quote.l1BroadcastFeeSlow?.originalValue, "sats"); ``` ### Execute Withdrawal ```javascript const result = await wallet.withdraw({ onchainAddress: "bc1q...", exitSpeed: "MEDIUM", amountSats: 50000, }); ``` Exit speeds: - **FAST** — Higher fee, faster L1 confirmation - **MEDIUM** — Balanced fee and speed - **SLOW** — Lower fee, slower confirmation Note: Unilateral exit (without operator cooperation) is also possible as a safety mechanism, but cooperative exit is the standard path. ## Message Signing Spark wallets can sign and verify messages using their identity key. Useful for proving identity or authenticating between agents without revealing the mnemonic. ### Sign a Message ```javascript const message = new TextEncoder().encode("I am agent-007"); const signature = await wallet.signMessageWithIdentityKey(message); ``` ### Verify a Signature ```javascript const isValid = await wallet.validateMessageWithIdentityKey( new TextEncoder().encode("I am agent-007"), signature, publicKey, ); console.log("Valid:", isValid); ``` ## Event Listeners The wallet emits events for real-time updates. Useful for agents that need to react to incoming payments. ```javascript // Incoming transfer completed wallet.on("transfer:claimed", (transferId, balance) => { console.log(`Transfer ${transferId} received. Balance: ${balance}`); }); // Deposit confirmed on L1 wallet.on("deposit:confirmed", (depositId, balance) => { console.log(`Deposit ${depositId} confirmed. Balance: ${balance}`); }); // Connection status wallet.on("stream:connected", () => console.log("Connected to Spark")); wallet.on("stream:disconnected", (reason) => console.log("Disconnected:", reason)); ``` ## Complete Agent Class ```javascript import { SparkWallet } from "@buildonspark/spark-sdk"; export class SparkAgent { #wallet; constructor(wallet) { this.#wallet = wallet; } static async create(mnemonic, network = "MAINNET") { const { wallet, mnemonic: generated } = await SparkWallet.initialize({ mnemonicOrSeed: mnemonic, options: { network }, }); return { agent: new SparkAgent(wallet), mnemonic: generated }; } async getIdentity() { return { address: await this.#wallet.getSparkAddress(), publicKey: await this.#wallet.getIdentityPublicKey(), }; } async getBalance() { const { balance, tokenBalances } = await this.#wallet.getBalance(); return { sats: balance, tokens: tokenBalances }; } async getDepositAddress() { return await this.#wallet.getStaticDepositAddress(); } async transfer(recipientAddress, amountSats) { return await this.#wallet.transfer({ receiverSparkAddress: recipientAddress, amountSats, }); } async createLightningInvoice(amountSats, memo) { const request = await this.#wallet.createLightningInvoice({ amountSats, memo, expirySeconds: 3600, includeSparkAddress: true, }); return request.invoice.encodedInvoice; } async payLightningInvoice(bolt11, maxFeeSats = 10) { return await this.#wallet.payLightningInvoice({ invoice: bolt11, maxFeeSats, preferSpark: true, }); } async createSparkInvoice(amountSats, memo) { return await this.#wallet.createSatsInvoice({ amount: amountSats, memo, }); } async transferTokens(tokenIdentifier, amount, recipientAddress) { return await this.#wallet.transferTokens({ tokenIdentifier, tokenAmount: amount, receiverSparkAddress: recipientAddress, }); } async withdraw(onchainAddress, amountSats, speed = "MEDIUM") { return await this.#wallet.withdraw({ onchainAddress, exitSpeed: speed, amountSats, }); } async signMessage(text) { const message = new TextEncoder().encode(text); return await this.#wallet.signMessageWithIdentityKey(message); } async verifyMessage(text, signature, publicKey) { const message = new TextEncoder().encode(text); return await this.#wallet.validateMessageWithIdentityKey( message, signature, publicKey, ); } // L402 Methods async fetchL402(url, options = {}) { const { decode } = await import("light-bolt11-decoder"); const { method = "GET", headers = {}, body, maxFeeSats = 10 } = options; // Make initial request const initialResponse = await fetch(url, { method, headers: { "Content-Type": "application/json", ...headers }, body: body ? JSON.stringify(body) : undefined, }); if (initialResponse.status !== 402) { const ct = initialResponse.headers.get("content-type") || ""; const data = ct.includes("json") ? await initialResponse.json() : await initialResponse.text(); return { paid: false, data }; } // Parse L402 challenge const challenge = await initialResponse.json(); const invoice = challenge.invoice || challenge.payment_request || challenge.pr; const macaroon = challenge.macaroon || challenge.token; if (!invoice || !macaroon) throw new Error("Invalid L402 challenge"); // Decode and pay const decoded = decode(invoice); const amountSection = decoded.sections.find((s) => s.name === "amount"); const amountSats = Math.ceil(Number(amountSection.value) / 1000); const payResult = await this.#wallet.payLightningInvoice({ invoice, maxFeeSats }); let preimage = payResult.paymentPreimage; // Poll if needed if (!preimage && payResult.id) { for (let i = 0; i < 15; i++) { await new Promise((r) => setTimeout(r, 500)); const status = await this.#wallet.getLightningSendRequest(payResult.id); if (status?.paymentPreimage) { preimage = status.paymentPreimage; break; } if (status?.status === "LIGHTNING_PAYMENT_FAILED") throw new Error("Payment failed"); } } if (!preimage) throw new Error("No preimage received"); // Retry with auth const finalResponse = await fetch(url, { method, headers: { "Authorization": `L402 ${macaroon}:${preimage}`, ...headers }, body: body ? JSON.stringify(body) : undefined, }); const ct = finalResponse.headers.get("content-type") || ""; const data = ct.includes("json") ? await finalResponse.json() : await finalResponse.text(); return { paid: true, amountSats, preimage, data }; } async previewL402(url) { const response = await fetch(url); if (response.status !== 402) return { requiresPayment: false }; const { decode } = await import("light-bolt11-decoder"); const challenge = await response.json(); const invoice = challenge.invoice || challenge.payment_request; const decoded = decode(invoice); const amountSection = decoded.sections.find((s) => s.name === "amount"); return { requiresPayment: true, amountSats: Math.ceil(Number(amountSection.value) / 1000), invoice, macaroon: challenge.macaroon, }; } onTransferReceived(callback) { this.#wallet.on("transfer:claimed", callback); } onDepositConfirmed(callback) { this.#wallet.on("deposit:confirmed", callback); } cleanup() { this.#wallet.cleanupConnections(); } } // Usage const { agent } = await SparkAgent.create(process.env.SPARK_MNEMONIC); const identity = await agent.getIdentity(); console.log("Address:", identity.address); const { sats } = await agent.getBalance(); console.log("Balance:", sats.toString(), "sats"); agent.cleanup(); ``` ## Error Handling ```javascript try { await wallet.transfer({ receiverSparkAddress: "sp1p...", amountSats: 1000, }); } catch (error) { switch (error.constructor.name) { case "ValidationError": console.log("Invalid input:", error.message); break; case "NetworkError": console.log("Network issue:", error.message); break; case "AuthenticationError": console.log("Auth failed:", error.message); break; case "ConfigurationError": console.log("Config problem:", error.message); break; case "RPCError": console.log("RPC error:", error.message); break; default: console.log("Error:", error.message); } } ``` Error types: - **ValidationError** — Invalid parameters, malformed addresses - **NetworkError** — Connection failures, timeouts - **AuthenticationError** — Key/token issues - **ConfigurationError** — Missing config, initialization problems - **RPCError** — gRPC communication failures ## Security Best Practices ### The Agent Has Full Wallet Access Any agent or process with the mnemonic has **unrestricted control** over the wallet — it can check balance, create invoices, and send every sat to any address. There is no permission scoping, no spending limits, no read-only mode. This means: - If the mnemonic leaks, all funds are at risk immediately - If an agent is compromised, the attacker has the same full access - There is no way to revoke access without sweeping funds to a new wallet ### Protect the Mnemonic 1. **Back up the seed phrase offline** — write it down on paper or use a hardware backup. If you lose the mnemonic, the funds are gone permanently. 2. **Never expose the mnemonic** in code, logs, git history, or error messages 3. **Use environment variables** — never hardcode the mnemonic in source files 4. **Add `.env` to `.gitignore`** — prevent accidental commits of secrets ### Sweep Funds to a Safer Wallet **Do not accumulate large balances in an agent wallet.** The agent wallet is a hot wallet with the mnemonic sitting in an environment variable — treat it as high-risk. - Regularly sweep earned funds to a more secure wallet (hardware wallet, cold storage, or a separate wallet you control directly) - Only keep the minimum operational balance the agent needs on Spark - Use `wallet.transfer()` or `wallet.withdraw()` to move funds out periodically - Consider automating sweeps when the balance exceeds a threshold ### Operational Security 1. **Use separate mnemonics** for different agents — never share a mnemonic across agents 2. **Use separate `accountNumber` values** if you need multiple wallets from one mnemonic 3. **Monitor transfers** via event listeners for unexpected outgoing activity 4. **Call `cleanupConnections()`** when the wallet is no longer needed 5. **Use REGTEST** for development and testing, MAINNET only for production 6. **Implement application-level spending controls** — cap per-transaction and daily amounts in your agent logic since the SDK won't do it for you ## L402 Protocol (Lightning Paywalls) L402 (formerly LSAT) is a protocol for monetizing APIs and content using Lightning payments. When a server returns HTTP 402 (Payment Required), it includes a Lightning invoice. Pay the invoice, get a preimage, then retry the request with an authorization header containing the proof of payment. ### How L402 Works 1. **Request** → Client fetches protected URL 2. **402 Response** → Server returns `{invoice, macaroon}` 3. **Pay Invoice** → Client pays Lightning invoice, receives preimage 4. **Retry with Auth** → Client retries with `Authorization: L402 <macaroon>:<preimage>` 5. **200 Response** → Server returns protected content ### L402 Implementation ```javascript import { decode } from "light-bolt11-decoder"; async function fetchWithL402(wallet, url, options = {}) { const { method = "GET", headers = {}, body, maxFeeSats = 10 } = options; // Step 1: Make initial request const initialResponse = await fetch(url, { method, headers: { "Content-Type": "application/json", ...headers }, body: body ? JSON.stringify(body) : undefined, }); // If not 402, return response directly if (initialResponse.status !== 402) { const contentType = initialResponse.headers.get("content-type") || ""; if (contentType.includes("application/json")) { return { paid: false, data: await initialResponse.json() }; } return { paid: false, data: await initialResponse.text() }; } // Step 2: Parse 402 challenge const challenge = await initialResponse.json(); const invoice = challenge.invoice || challenge.payment_request || challenge.pr; const macaroon = challenge.macaroon || challenge.token; if (!invoice || !macaroon) { throw new Error("Invalid L402 response: missing invoice or macaroon"); } // Step 3: Decode invoice to get amount const decoded = decode(invoice); const amountSection = decoded.sections.find((s) => s.name === "amount"); if (!amountSection?.value) { throw new Error("L402 invoice has no amount"); } const amountSats = Math.ceil(Number(amountSection.value) / 1000); // Step 4: Pay the invoice const payResult = await wallet.payLightningInvoice({ invoice, maxFeeSats, }); // Get preimage (may need to poll if payment is async) let preimage = payResult.paymentPreimage; if (!preimage && payResult.status === "LIGHTNING_PAYMENT_INITIATED") { // Poll for completion for (let i = 0; i < 15; i++) { await new Promise((r) => setTimeout(r, 500)); const status = await wallet.getLightningSendRequest(payResult.id); if (status?.paymentPreimage) { preimage = status.paymentPreimage; break; } if (status?.status === "LIGHTNING_PAYMENT_FAILED") { throw new Error("L402 payment failed"); } } } if (!preimage) { throw new Error("L402 payment succeeded but no preimage available"); } // Step 5: Retry with L402 authorization const finalResponse = await fetch(url, { method, headers: { "Content-Type": "application/json", "Authorization": `L402 ${macaroon}:${preimage}`, ...headers, }, body: body ? JSON.stringify(body) : undefined, }); const contentType = finalResponse.headers.get("content-type") || ""; let data; if (contentType.includes("application/json")) { data = await finalResponse.json(); } else { data = await finalResponse.text(); } return { paid: true, amountSats, preimage, data, }; } ``` ### Preview L402 Cost (Without Paying) ```javascript async function previewL402(url) { const response = await fetch(url); if (response.status !== 402) { return { requiresPayment: false }; } const challenge = await response.json(); const invoice = challenge.invoice || challenge.payment_request; const decoded = decode(invoice); const amountSection = decoded.sections.find((s) => s.name === "amount"); const amountSats = Math.ceil(Number(amountSection.value) / 1000); return { requiresPayment: true, amountSats, invoice, macaroon: challenge.macaroon, }; } ``` ### Add to SparkAgent Class ```javascript // Add to the SparkAgent class async fetchL402(url, options = {}) { return await fetchWithL402(this.#wallet, url, options); } async previewL402(url) { return await previewL402(url); } ``` ### Usage Example ```javascript const { agent } = await SparkAgent.create(process.env.SPARK_MNEMONIC); // Check cost first const preview = await agent.previewL402("https://api.example.com/paid-endpoint"); console.log("Cost:", preview.amountSats, "sats"); // Pay and fetch const result = await agent.fetchL402("https://api.example.com/paid-endpoint", { maxFeeSats: 10, }); console.log("Paid:", result.paid, "Data:", result.data); agent.cleanup(); ``` ### Required Dependency ```bash npm install light-bolt11-decoder ``` ### L402 Providers | Provider | Description | URL | |----------|-------------|-----| | Lightning Faucet | Test L402 endpoint (21 sat jokes) | https://lightningfaucet.com/api/l402/joke | | Sulu | AI image generation | https://rnd.ln.sulu.sh (may require API key) | | Various APIs | Growing ecosystem | https://github.com/lnurl/awesome-lnurl#l402 | ### Token Caching L402 tokens (macaroon + preimage) can often be reused for multiple requests to the same domain. Cache tokens by domain and try the cached token first: ```javascript const tokenCache = new Map(); async function fetchWithL402Cached(wallet, url, options = {}) { const domain = new URL(url).host; const cached = tokenCache.get(domain); if (cached) { // Try cached token first const response = await fetch(url, { method: options.method || "GET", headers: { "Authorization": `L402 ${cached.macaroon}:${cached.preimage}`, ...options.headers, }, }); if (response.status !== 402 && response.status !== 401) { return { paid: false, cached: true, data: await response.json() }; } // Token expired, delete and pay again tokenCache.delete(domain); } // Pay for new token const result = await fetchWithL402(wallet, url, options); // Cache the token if (result.paid) { tokenCache.set(domain, { macaroon: result.macaroon, preimage: result.preimage, }); } return result; } ``` ## Resources - Spark Docs: https://docs.spark.money - Spark SDK (npm): https://www.npmjs.com/package/@buildonspark/spark-sdk - Sparkscan Explorer: https://sparkscan.io - Spark CLI: https://docs.spark.money/tools/cli - L402 Spec: https://docs.lightning.engineering/the-lightning-network/l402

path: BUGFIX-tokenBalances-map.md
content: # Bug: `tokenBalances` is a Map, not a plain Object — silent data loss

## Problem

`wallet.getBalance()` returns `{ balance, tokenBalances }` where `tokenBalances` is a JavaScript **`Map`**, not a plain object. This is undocumented in the Spark SDK and the SKILL.md doesn't call it out explicitly.

This matters because when an AI agent (the primary consumer of this skill) works with the balance data, it will naturally reach for standard JS patterns that **silently fail on Maps**:

```javascript
// All of these return {} or [] — SILENT DATA LOSS
JSON.stringify(tokenBalances)           // "{}"
Object.entries(tokenBalances)           // []
Object.keys(tokenBalances)             // []
Object.keys(tokenBalances).length === 0 // true (even when tokens exist!)
```

None of these throw an error. They just return empty results, making it look like the wallet holds no tokens when it actually does.

## How we discovered it

1. User sent BEPSI tokens to the wallet's Spark address
2. Agent checked balance using `wallet.getBalance()`
3. Agent serialized `tokenBalances` with `JSON.stringify()` → showed `{}`
4. Agent reported "No tokens found" — **incorrect**
5. Running the `token-operations.js` example script (which uses `tokenBalances.size` and `for...of`) correctly showed 5,000,000 BEPSI

The wallet had tokens the entire time. The agent just couldn't see them because of the Map vs Object mismatch.

## Why this is especially bad for AI agents

AI agents (the target users of this skill) generate code on the fly. They default to the most common JS patterns — `JSON.stringify`, `Object.entries`, `Object.keys`. All of these work on plain objects but silently produce empty results on Maps. There's no error, no warning, no indication that data was lost.

An agent could:
- Report zero token balance when the user actually holds tokens
- Skip token operations because it thinks the wallet is empty
- Fail to trigger token-based logic (sweeps, transfers, alerts)

## Fix

### 1. Add explicit Map documentation to SKILL.md

In the Quick Example and the `getBalance()` sections, add a clear warning:

```
⚠️ `tokenBalances` is a JavaScript `Map`, not a plain object.
Use `.size`, `for...of`, or `Map` methods. Do NOT use JSON.stringify(),
Object.entries(), or Object.keys() — they silently return empty results.
```

### 2. Add a safe serialization helper to the Quick Example

```javascript
// tokenBalances is a Map — convert to object for JSON/logging
const tokensObj = Object.fromEntries(
  [...tokenBalances].map(([id, info]) => [
    info.tokenMetadata.tokenTicker,
    { balance: info.balance.toString(), decimals: info.tokenMetadata.decimals }
  ])
);
console.log("Tokens:", JSON.stringify(tokensObj));
```

### 3. Update the Quick Example to include token checking

The current Quick Example only shows BTC balance. It should show tokens too, since that's a primary use case.

## Files changed

- `SKILL.md` — Added Map warning, updated Quick Example with token balance check and safe serialization


path: examples/balance-and-deposits.js
content: import "dotenv/config";
import { SparkWallet } from "@buildonspark/spark-sdk";

if (!process.env.SPARK_MNEMONIC) {
  console.error("SPARK_MNEMONIC not set. Run wallet-setup.js first.");
  process.exit(1);
}

const network = process.env.SPARK_NETWORK || "MAINNET";

async function main() {
  const { wallet } = await SparkWallet.initialize({
    mnemonicOrSeed: process.env.SPARK_MNEMONIC,
    options: { network },
  });

  // Check BTC balance
  const { balance, tokenBalances } = await wallet.getBalance();
  console.log("=== Balance ===");
  console.log("BTC:", balance.toString(), "sats");

  // Check token balances
  if (tokenBalances.size > 0) {
    console.log("\n=== Tokens ===");
    for (const [id, info] of tokenBalances) {
      const meta = info.tokenMetadata;
      console.log(`${meta.tokenName} (${meta.tokenTicker}): ${info.balance.toString()}`);
    }
  } else {
    console.log("\nNo token balances.");
  }

  // Generate deposit addresses
  console.log("\n=== Deposit Addresses ===");

  const staticAddr = await wallet.getStaticDepositAddress();
  console.log("Static (reusable):", staticAddr);

  const singleAddr = await wallet.getSingleUseDepositAddress();
  console.log("Single-use:       ", singleAddr);

  console.log("\nSend BTC to either address. Deposits need 3 L1 confirmations.");
  console.log("After confirmation, claim with:");
  console.log('  wallet.claimStaticDeposit({ transactionId: "txid", ... })');

  // List recent transfers
  const { transfers } = await wallet.getTransfers(5, 0);
  if (transfers.length > 0) {
    console.log("\n=== Recent Transfers ===");
    for (const tx of transfers) {
      console.log(`  ${tx.id}: ${tx.totalValue} sats [${tx.status}]`);
    }
  } else {
    console.log("\nNo transfers yet.");
  }

  wallet.cleanupConnections();
}

main().catch((err) => {
  console.error("Error:", err.message);
  process.exit(1);
});


path: examples/payment-flow.js
content: import "dotenv/config";
import { SparkWallet } from "@buildonspark/spark-sdk";

if (!process.env.SPARK_MNEMONIC) {
  console.error("SPARK_MNEMONIC not set. Run wallet-setup.js first.");
  process.exit(1);
}

const network = process.env.SPARK_NETWORK || "MAINNET";

async function main() {
  const { wallet } = await SparkWallet.initialize({
    mnemonicOrSeed: process.env.SPARK_MNEMONIC,
    options: { network },
  });

  const { balance } = await wallet.getBalance();
  console.log("Current balance:", balance.toString(), "sats\n");

  // --- Lightning Invoice (Receive) ---
  console.log("=== Create Lightning Invoice ===");
  const invoiceRequest = await wallet.createLightningInvoice({
    amountSats: 1000,
    memo: "Test payment - 1000 sats",
    expirySeconds: 3600,
  });
  console.log("BOLT11:", invoiceRequest.invoice.encodedInvoice);
  console.log("Pay this invoice from any Lightning wallet.\n");

  // --- Lightning Invoice with Spark fallback ---
  console.log("=== Lightning Invoice (with Spark address) ===");
  const sparkInvoice = await wallet.createLightningInvoice({
    amountSats: 500,
    memo: "Spark-preferred payment",
    expirySeconds: 3600,
    includeSparkAddress: true,
  });
  console.log("BOLT11:", sparkInvoice.invoice.encodedInvoice);
  console.log("Spark-aware payers will route via Spark (free, instant).\n");

  // --- Spark Native Invoice ---
  console.log("=== Create Spark Invoice ===");
  const satsInvoice = await wallet.createSatsInvoice({
    amount: 1000,
    memo: "Spark native invoice",
  });
  console.log("Spark Invoice:", satsInvoice);
  console.log("Pay this with any Spark wallet.\n");

  // --- Fee Estimation (for paying a Lightning invoice) ---
  // Uncomment with a real BOLT11 invoice to test:
  //
  // const fee = await wallet.getLightningSendFeeEstimate({
  //   encodedInvoice: "lnbc...",
  //   amountSats: 1000,
  // });
  // console.log("Estimated Lightning fee:", fee, "sats");

  // --- Pay Lightning Invoice ---
  // Uncomment with a real BOLT11 invoice to send:
  //
  // const payment = await wallet.payLightningInvoice({
  //   invoice: "lnbc...",
  //   maxFeeSats: 10,
  //   preferSpark: true,
  // });
  // console.log("Payment sent:", payment);

  // --- Spark-to-Spark Transfer ---
  // Uncomment with a real Spark address to send:
  //
  // const transfer = await wallet.transfer({
  //   receiverSparkAddress: "sp1p...",
  //   amountSats: 100,
  // });
  // console.log("Transfer:", transfer.id);

  wallet.cleanupConnections();
}

main().catch((err) => {
  console.error("Error:", err.message);
  process.exit(1);
});


path: examples/spark-agent.js
content: import "dotenv/config";
import { SparkWallet } from "@buildonspark/spark-sdk";

export class SparkAgent {
  #wallet;

  constructor(wallet) {
    this.#wallet = wallet;
  }

  static async create(mnemonic, network = "MAINNET") {
    const { wallet, mnemonic: generated } = await SparkWallet.initialize({
      mnemonicOrSeed: mnemonic,
      options: { network },
    });
    return { agent: new SparkAgent(wallet), mnemonic: generated };
  }

  // --- Identity ---

  async getIdentity() {
    return {
      address: await this.#wallet.getSparkAddress(),
      publicKey: await this.#wallet.getIdentityPublicKey(),
    };
  }

  // --- Balance ---

  async getBalance() {
    const { balance, tokenBalances } = await this.#wallet.getBalance();
    return { sats: balance, tokens: tokenBalances };
  }

  // --- Deposits ---

  async getDepositAddress() {
    return await this.#wallet.getStaticDepositAddress();
  }

  async getSingleUseDepositAddress() {
    return await this.#wallet.getSingleUseDepositAddress();
  }

  // --- Spark Transfers ---

  async transfer(recipientAddress, amountSats) {
    return await this.#wallet.transfer({
      receiverSparkAddress: recipientAddress,
      amountSats,
    });
  }

  async getTransfers(limit = 10, offset = 0) {
    return await this.#wallet.getTransfers(limit, offset);
  }

  // --- Lightning ---

  async createLightningInvoice(amountSats, memo, options = {}) {
    const request = await this.#wallet.createLightningInvoice({
      amountSats,
      memo,
      expirySeconds: options.expirySeconds || 3600,
      includeSparkAddress: options.includeSparkAddress ?? true,
    });
    return request.invoice.encodedInvoice;
  }

  async payLightningInvoice(bolt11, maxFeeSats = 10) {
    return await this.#wallet.payLightningInvoice({
      invoice: bolt11,
      maxFeeSats,
      preferSpark: true,
    });
  }

  async estimateLightningFee(bolt11, amountSats) {
    return await this.#wallet.getLightningSendFeeEstimate({
      encodedInvoice: bolt11,
      amountSats,
    });
  }

  // --- Spark Invoices ---

  async createSatsInvoice(amountSats, memo) {
    return await this.#wallet.createSatsInvoice({
      amount: amountSats,
      memo,
    });
  }

  async createTokenInvoice(tokenIdentifier, amount, memo) {
    return await this.#wallet.createTokensInvoice({
      amount,
      tokenIdentifier,
      memo,
    });
  }

  async fulfillInvoice(invoices) {
    return await this.#wallet.fulfillSparkInvoice(invoices);
  }

  // --- Tokens ---

  async transferTokens(tokenIdentifier, amount, recipientAddress) {
    return await this.#wallet.transferTokens({
      tokenIdentifier,
      tokenAmount: amount,
      receiverSparkAddress: recipientAddress,
    });
  }

  async batchTransferTokens(transfers) {
    return await this.#wallet.batchTransferTokens(transfers);
  }

  // --- Withdrawal ---

  async getWithdrawalFeeQuote(amountSats, onchainAddress) {
    return await this.#wallet.getWithdrawalFeeQuote({
      amountSats,
      withdrawalAddress: onchainAddress,
    });
  }

  async withdraw(onchainAddress, amountSats, speed = "MEDIUM") {
    return await this.#wallet.withdraw({
      onchainAddress,
      exitSpeed: speed,
      amountSats,
    });
  }

  // --- Message Signing ---

  async signMessage(text) {
    const message = new TextEncoder().encode(text);
    return await this.#wallet.signMessageWithIdentityKey(message);
  }

  async verifyMessage(text, signature, publicKey) {
    const message = new TextEncoder().encode(text);
    return await this.#wallet.validateMessageWithIdentityKey(
      message,
      signature,
      publicKey,
    );
  }

  // --- Events ---

  onTransferReceived(callback) {
    this.#wallet.on("transfer:claimed", callback);
  }

  onDepositConfirmed(callback) {
    this.#wallet.on("deposit:confirmed", callback);
  }

  // --- Lifecycle ---

  cleanup() {
    this.#wallet.cleanupConnections();
  }
}

// --- Demo ---

async function main() {
  const network = process.env.SPARK_NETWORK || "MAINNET";

  if (!process.env.SPARK_MNEMONIC) {
    console.log("No SPARK_MNEMONIC set. Generating new wallet...\n");
  }

  const { agent, mnemonic } = await SparkAgent.create(
    process.env.SPARK_MNEMONIC,
    network,
  );

  if (mnemonic) {
    console.log("Generated mnemonic (save securely):", mnemonic, "\n");
  }

  const identity = await agent.getIdentity();
  console.log("=== Agent Identity ===");
  console.log("Spark Address:", identity.address);
  console.log("Public Key:   ", identity.publicKey);

  const { sats, tokens } = await agent.getBalance();
  console.log("\n=== Balance ===");
  console.log("BTC:", sats.toString(), "sats");

  if (tokens.size > 0) {
    for (const [id, info] of tokens) {
      console.log(`${info.tokenMetadata.tokenTicker}: ${info.balance.toString()}`);
    }
  }

  const depositAddr = await agent.getDepositAddress();
  console.log("\n=== Deposit ===");
  console.log("Send BTC to:", depositAddr);

  console.log("\n=== Lightning Invoice ===");
  const bolt11 = await agent.createLightningInvoice(1000, "SparkAgent test");
  console.log("BOLT11:", bolt11);

  agent.cleanup();
}

main().catch((err) => {
  console.error("Error:", err.message);
  process.exit(1);
});


path: examples/token-operations.js
content: import "dotenv/config";
import { SparkWallet } from "@buildonspark/spark-sdk";

if (!process.env.SPARK_MNEMONIC) {
  console.error("SPARK_MNEMONIC not set. Run wallet-setup.js first.");
  process.exit(1);
}

const network = process.env.SPARK_NETWORK || "MAINNET";

async function main() {
  const { wallet } = await SparkWallet.initialize({
    mnemonicOrSeed: process.env.SPARK_MNEMONIC,
    options: { network },
  });

  // --- Token Balances ---
  console.log("=== Token Balances ===");
  const { balance, tokenBalances } = await wallet.getBalance();
  console.log("BTC:", balance.toString(), "sats\n");

  if (tokenBalances.size > 0) {
    for (const [id, info] of tokenBalances) {
      const meta = info.tokenMetadata;
      console.log(`[REDACTED_SECRET] (${meta.tokenTicker})`);
      console.log(`  Identifier: ${id}`);
      console.log(`  Balance:    ${info.balance.toString()}`);
      console.log(`  Decimals:   ${meta.decimals}`);
      console.log(`  Max Supply: ${meta.maxSupply.toString()}`);
      console.log();
    }
  } else {
    console.log("No tokens held.\n");
  }

  // --- Transfer Tokens ---
  // Uncomment with real values to send tokens:
  //
  // const txId = await wallet.transferTokens({
  //   tokenIdentifier: "btkn1...",
  //   tokenAmount: 100n,
  //   receiverSparkAddress: "sp1p...",
  // });
  // console.log("Token transfer:", txId);

  // --- Batch Transfer ---
  // Send tokens to multiple recipients in one call:
  //
  // const txIds = await wallet.batchTransferTokens([
  //   { tokenIdentifier: "btkn1...", tokenAmount: 50n, receiverSparkAddress: "sp1p..." },
  //   { tokenIdentifier: "btkn1...", tokenAmount: 50n, receiverSparkAddress: "sp1p..." },
  // ]);
  // console.log("Batch transfers:", txIds);

  // --- Token Invoice ---
  // Request payment in a specific token:
  //
  // const invoice = await wallet.createTokensInvoice({
  //   amount: 100n,
  //   tokenIdentifier: "btkn1...",
  //   memo: "Pay me in tokens",
  // });
  // console.log("Token invoice:", invoice);

  // --- Listen for Incoming Tokens ---
  // wallet.on("transfer:claimed", (transferId, updatedBalance) => {
  //   console.log(`Received transfer ${transferId}`);
  //   console.log("Updated balance:", updatedBalance);
  // });
  // console.log("Listening for incoming transfers... (Ctrl+C to stop)");
  // await new Promise(() => {}); // keep alive

  wallet.cleanupConnections();
}

main().catch((err) => {
  console.error("Error:", err.message);
  process.exit(1);
});


path: examples/wallet-setup.js
content: import "dotenv/config";
import { SparkWallet } from "@buildonspark/spark-sdk";

const network = process.env.SPARK_NETWORK || "MAINNET";

async function main() {
  let wallet;
  let mnemonic;

  if (process.env.SPARK_MNEMONIC) {
    console.log("Importing existing wallet from SPARK_MNEMONIC...\n");
    const result = await SparkWallet.initialize({
      mnemonicOrSeed: process.env.SPARK_MNEMONIC,
      options: { network },
    });
    wallet = result.wallet;
  } else {
    console.log("No SPARK_MNEMONIC found. Generating new wallet...\n");
    const result = await SparkWallet.initialize({
      options: { network },
    });
    wallet = result.wallet;
    mnemonic = result.mnemonic;
  }

  const address = await wallet.getSparkAddress();
  const identityKey = await wallet.getIdentityPublicKey();

  console.log("=== Spark Wallet ===");
  console.log("Network:      ", network);
  console.log("Spark Address:", address);
  console.log("Identity Key: ", identityKey);

  if (mnemonic) {
    console.log("\n=== SAVE THIS MNEMONIC SECURELY ===");
    console.log(mnemonic);
    console.log("\n=== Add to .env ===");
    console.log(`SPARK_MNEMONIC=${mnemonic}`);
    console.log(`SPARK_NETWORK=${network}`);
  }

  wallet.cleanupConnections();
}

main().catch((err) => {
  console.error("Error:", err.message);
  process.exit(1);
});


path: package-lock.json
content: {
  "name": "sparkbtcbot-skill",
  "version": "0.1.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "sparkbtcbot-skill",
      "version": "0.1.0",
      "dependencies": {
        "@buildonspark/spark-sdk": "^0.5.8",
        "dotenv": "^16.4.7"
      }
    },
    "node_modules/@bufbuild/protobuf": {
      "version": "2.11.0",
      "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.11.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "(Apache-2.0 AND BSD-3-Clause)"
    },
    "node_modules/@buildonspark/spark-sdk": {
      "version": "0.5.8",
      "resolved": "https://registry.npmjs.org/@buildonspark/spark-sdk/-/spark-sdk-0.5.8.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "@bufbuild/protobuf": "^2.2.5",
        "@lightsparkdev/core": "^1.4.4",
        "@noble/curves": "^1.8.0",
        "@noble/hashes": "^1.7.0",
        "@opentelemetry/api": "^1.9.0",
        "@opentelemetry/context-async-hooks": "^2.0.0",
        "@opentelemetry/core": "^2.0.0",
        "@opentelemetry/instrumentation": "^0.203.0",
        "@opentelemetry/instrumentation-undici": "^0.14.0",
        "@opentelemetry/sdk-trace-base": "^2.0.0",
        "@opentelemetry/sdk-trace-node": "^2.0.1",
        "@opentelemetry/sdk-trace-web": "^2.0.1",
        "@scure/base": "^1.2.4",
        "@scure/bip32": "^1.6.2",
        "@scure/bip39": "^1.5.4",
        "@scure/btc-signer": "^1.5.0",
        "abort-controller-x": "^0.4.3",
        "abortcontroller-polyfill": "^1.7.8",
        "async-mutex": "^0.5.0",
        "bare-crypto": "^1.9.2",
        "bare-fetch": "^2.4.1",
        "buffer": "^6.0.3",
        "eventemitter3": "^5.0.1",
        "js-base64": "^3.7.7",
        "light-bolt11-decoder": "^3.2.0",
        "nice-grpc": "^2.1.10",
        "nice-grpc-client-middleware-retry": "^3.1.10",
        "nice-grpc-common": "^2.0.2",
        "nice-grpc-opentelemetry": "^0.1.18",
        "nice-grpc-web": "^3.3.7",
        "ts-proto": "2.8.3",
        "ua-parser-js": "^2.0.6",
        "uuidv7": "^1.0.2"
      },
      "engines": {
        "node": ">=18.0.0"
      },
      "peerDependencies": {
        "react": ">=18.2.0",
        "react-native": ">=0.71.0",
        "react-native-get-random-values": ">=1.11.0"
      },
      "peerDependenciesMeta": {
        "react": {
          "optional": true
        },
        "react-native": {
          "optional": true
        },
        "react-native-get-random-values": {
          "optional": true
        }
      }
    },
    "node_modules/@grpc/grpc-js": {
      "version": "1.14.3",
      "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "@grpc/proto-loader": "^0.8.0",
        "@js-sdsl/ordered-map": "^4.4.2"
      },
      "engines": {
        "node": ">=12.10.0"
      }
    },
    "node_modules/@grpc/proto-loader": {
      "version": "0.8.0",
      "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "lodash.camelcase": "^4.3.0",
        "long": "^5.0.0",
        "protobufjs": "^7.5.3",
        "yargs": "^17.7.2"
      },
      "bin": {
        "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js"
      },
      "engines": {
        "node": ">=6"
      }
    },
    "node_modules/@js-sdsl/ordered-map": {
      "version": "4.4.2",
      "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "funding": {
        "type": "opencollective",
        "url": "https://opencollective.com/js-sdsl"
      }
    },
    "node_modules/@lightsparkdev/core": {
      "version": "1.4.8",
      "resolved": "https://registry.npmjs.org/@lightsparkdev/core/-/core-1.4.8.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "dayjs": "^1.11.7",
        "graphql": "^16.6.0",
        "graphql-ws": "^5.11.3",
        "secp256k1": "^5.0.1",
        "ws": "^8.12.1",
        "zen-observable-ts": "^1.1.0"
      },
      "engines": {
        "node": ">=18"
      }
    },
    "node_modules/@noble/curves": {
      "version": "1.9.7",
      "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "@noble/hashes": "1.8.0"
      },
      "engines": {
        "node": "^14.21.3 || >=16"
      },
      "funding": {
        "url": "https://paulmillr.com/funding/"
      }
    },
    "node_modules/@noble/hashes": {
      "version": "1.8.0",
      "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": "^14.21.3 || >=16"
      },
      "funding": {
        "url": "https://paulmillr.com/funding/"
      }
    },
    "node_modules/@opentelemetry/api": {
      "version": "1.9.0",
      "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "engines": {
        "node": ">=8.0.0"
      }
    },
    "node_modules/@opentelemetry/api-logs": {
      "version": "0.203.0",
      "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.203.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "@opentelemetry/api": "^1.3.0"
      },
      "engines": {
        "node": ">=8.0.0"
      }
    },
    "node_modules/@opentelemetry/context-async-hooks": {
      "version": "2.5.0",
      "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.5.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "engines": {
        "node": "^18.19.0 || >=20.6.0"
      },
      "peerDependencies": {
        "@opentelemetry/api": ">=1.0.0 <1.10.0"
      }
    },
    "node_modules/@opentelemetry/core": {
      "version": "2.5.0",
      "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.5.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "@opentelemetry/semantic-conventions": "^1.29.0"
      },
      "engines": {
        "node": "^18.19.0 || >=20.6.0"
      },
      "peerDependencies": {
        "@opentelemetry/api": ">=1.0.0 <1.10.0"
      }
    },
    "node_modules/@opentelemetry/instrumentation": {
      "version": "0.203.0",
      "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.203.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "@opentelemetry/api-logs": "0.203.0",
        "import-in-the-middle": "^1.8.1",
        "require-in-the-middle": "^7.1.1"
      },
      "engines": {
        "node": "^18.19.0 || >=20.6.0"
      },
      "peerDependencies": {
        "@opentelemetry/api": "^1.3.0"
      }
    },
    "node_modules/@opentelemetry/instrumentation-undici": {
      "version": "0.14.0",
      "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-undici/-/instrumentation-undici-0.14.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "@opentelemetry/core": "^2.0.0",
        "@opentelemetry/instrumentation": "^0.203.0"
      },
      "engines": {
        "node": "^18.19.0 || >=20.6.0"
      },
      "peerDependencies": {
        "@opentelemetry/api": "^1.7.0"
      }
    },
    "node_modules/@opentelemetry/resources": {
      "version": "2.5.0",
      "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.5.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "@opentelemetry/core": "2.5.0",
        "@opentelemetry/semantic-conventions": "^1.29.0"
      },
      "engines": {
        "node": "^18.19.0 || >=20.6.0"
      },
      "peerDependencies": {
        "@opentelemetry/api": ">=1.3.0 <1.10.0"
      }
    },
    "node_modules/@opentelemetry/sdk-trace-base": {
      "version": "2.5.0",
      "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.5.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "@opentelemetry/core": "2.5.0",
        "@opentelemetry/resources": "2.5.0",
        "@opentelemetry/semantic-conventions": "^1.29.0"
      },
      "engines": {
        "node": "^18.19.0 || >=20.6.0"
      },
      "peerDependencies": {
        "@opentelemetry/api": ">=1.3.0 <1.10.0"
      }
    },
    "node_modules/@opentelemetry/sdk-trace-node": {
      "version": "2.5.0",
      "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.5.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "@opentelemetry/context-async-hooks": "2.5.0",
        "@opentelemetry/core": "2.5.0",
        "@opentelemetry/sdk-trace-base": "2.5.0"
      },
      "engines": {
        "node": "^18.19.0 || >=20.6.0"
      },
      "peerDependencies": {
        "@opentelemetry/api": ">=1.0.0 <1.10.0"
      }
    },
    "node_modules/@opentelemetry/sdk-trace-web": {
      "version": "2.5.0",
      "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-web/-/sdk-trace-web-2.5.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "@opentelemetry/core": "2.5.0",
        "@opentelemetry/sdk-trace-base": "2.5.0"
      },
      "engines": {
        "node": "^18.19.0 || >=20.6.0"
      },
      "peerDependencies": {
        "@opentelemetry/api": ">=1.0.0 <1.10.0"
      }
    },
    "node_modules/@opentelemetry/semantic-conventions": {
      "version": "1.39.0",
      "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.39.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "engines": {
        "node": ">=14"
      }
    },
    "node_modules/@protobufjs/aspromise": {
      "version": "1.1.2",
      "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-3-Clause"
    },
    "node_modules/@protobufjs/base64": {
      "version": "1.1.2",
      "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-3-Clause"
    },
    "node_modules/@protobufjs/codegen": {
      "version": "2.0.4",
      "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-3-Clause"
    },
    "node_modules/@protobufjs/eventemitter": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-3-Clause"
    },
    "node_modules/@protobufjs/fetch": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-3-Clause",
      "dependencies": {
        "@protobufjs/aspromise": "^1.1.1",
        "@protobufjs/inquire": "^1.1.0"
      }
    },
    "node_modules/@protobufjs/float": {
      "version": "1.0.2",
      "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-3-Clause"
    },
    "node_modules/@protobufjs/inquire": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-3-Clause"
    },
    "node_modules/@protobufjs/path": {
      "version": "1.1.2",
      "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-3-Clause"
    },
    "node_modules/@protobufjs/pool": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-3-Clause"
    },
    "node_modules/@protobufjs/utf8": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-3-Clause"
    },
    "node_modules/@scure/base": {
      "version": "1.2.6",
      "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "funding": {
        "url": "https://paulmillr.com/funding/"
      }
    },
    "node_modules/@scure/bip32": {
      "version": "1.7.0",
      "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "@noble/curves": "~1.9.0",
        "@noble/hashes": "~1.8.0",
        "@scure/base": "~1.2.5"
      },
      "funding": {
        "url": "https://paulmillr.com/funding/"
      }
    },
    "node_modules/@scure/bip39": {
      "version": "1.6.0",
      "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "@noble/hashes": "~1.8.0",
        "@scure/base": "~1.2.5"
      },
      "funding": {
        "url": "https://paulmillr.com/funding/"
      }
    },
    "node_modules/@scure/btc-signer": {
      "version": "1.8.1",
      "resolved": "https://registry.npmjs.org/@scure/btc-signer/-/btc-signer-1.8.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "@noble/curves": "~1.9.0",
        "@noble/hashes": "~1.8.0",
        "@scure/base": "~1.2.5",
        "micro-packed": "~0.7.3"
      },
      "funding": {
        "url": "https://paulmillr.com/funding/"
      }
    },
    "node_modules/@types/node": {
      "version": "25.1.0",
      "resolved": "https://registry.npmjs.org/@types/node/-/node-25.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "undici-types": "~7.16.0"
      }
    },
    "node_modules/@types/zen-observable": {
      "version": "0.8.3",
      "resolved": "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/abort-controller-x": {
      "version": "0.4.3",
      "resolved": "https://registry.npmjs.org/abort-controller-x/-/abort-controller-x-0.4.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/abortcontroller-polyfill": {
      "version": "1.7.8",
      "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.8.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/acorn": {
      "version": "8.15.0",
      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "bin": {
        "acorn": "bin/acorn"
      },
      "engines": {
        "node": ">=0.4.0"
      }
    },
    "node_modules/acorn-import-attributes": {
      "version": "1.9.5",
      "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "peerDependencies": {
        "acorn": "^8"
      }
    },
    "node_modules/ansi-regex": {
      "version": "5.0.1",
      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">=8"
      }
    },
    "node_modules/ansi-styles": {
      "version": "4.3.0",
      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "color-convert": "^2.0.1"
      },
      "engines": {
        "node": ">=8"
      },
      "funding": {
        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
      }
    },
    "node_modules/async-mutex": {
      "version": "0.5.0",
      "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.5.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "tslib": "^2.4.0"
      }
    },
    "node_modules/b4a": {
      "version": "1.7.3",
      "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "peerDependencies": {
        "react-native-b4a": "*"
      },
      "peerDependenciesMeta": {
        "react-native-b4a": {
          "optional": true
        }
      }
    },
    "node_modules/bare-crypto": {
      "version": "1.13.0",
      "resolved": "https://registry.npmjs.org/bare-crypto/-/bare-crypto-1.13.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "bare-stream": "^2.6.3"
      },
      "peerDependencies": {
        "bare-buffer": "*"
      },
      "peerDependenciesMeta": {
        "bare-buffer": {
          "optional": true
        }
      }
    },
    "node_modules/bare-dns": {
      "version": "2.1.4",
      "resolved": "https://registry.npmjs.org/bare-dns/-/bare-dns-2.1.4.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "engines": {
        "bare": ">=1.7.0"
      }
    },
    "node_modules/bare-events": {
      "version": "2.8.2",
      "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "peerDependencies": {
        "bare-abort-controller": "*"
      },
      "peerDependenciesMeta": {
        "bare-abort-controller": {
          "optional": true
        }
      }
    },
    "node_modules/bare-fetch": {
      "version": "2.5.1",
      "resolved": "https://registry.npmjs.org/bare-fetch/-/bare-fetch-2.5.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "bare-form-data": "^1.1.3",
        "bare-http1": "^4.0.2",
        "bare-https": "^2.0.0",
        "bare-stream": "^2.7.0",
        "bare-zlib": "^1.3.0"
      },
      "peerDependencies": {
        "bare-buffer": "*",
        "bare-url": "*"
      },
      "peerDependenciesMeta": {
        "bare-buffer": {
          "optional": true
        },
        "bare-url": {
          "optional": true
        }
      }
    },
    "node_modules/bare-form-data": {
      "version": "1.1.6",
      "resolved": "https://registry.npmjs.org/bare-form-data/-/bare-form-data-1.1.6.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "bare-stream": "^2.6.5"
      }
    },
    "node_modules/bare-http-parser": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/bare-http-parser/-/bare-http-parser-1.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0"
    },
    "node_modules/bare-http1": {
      "version": "4.2.3",
      "resolved": "https://registry.npmjs.org/bare-http1/-/bare-http1-4.2.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "bare-events": "^2.6.0",
        "bare-http-parser": "^1.0.0",
        "bare-stream": "^2.3.0",
        "bare-tcp": "^2.2.0"
      },
      "peerDependencies": {
        "bare-buffer": "*",
        "bare-url": "*"
      },
      "peerDependenciesMeta": {
        "bare-buffer": {
          "optional": true
        },
        "bare-url": {
          "optional": true
        }
      }
    },
    "node_modules/bare-https": {
      "version": "2.1.2",
      "resolved": "https://registry.npmjs.org/bare-https/-/bare-https-2.1.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "bare-http1": "^4.0.0",
        "bare-tcp": "^2.2.0",
        "bare-tls": "^2.0.0"
      }
    },
    "node_modules/bare-net": {
      "version": "2.2.0",
      "resolved": "https://registry.npmjs.org/bare-net/-/bare-net-2.2.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "bare-events": "^2.2.2",
        "bare-pipe": "^4.0.0",
        "bare-stream": "^2.0.0",
        "bare-tcp": "^2.0.0"
      }
    },
    "node_modules/bare-pipe": {
      "version": "4.1.2",
      "resolved": "https://registry.npmjs.org/bare-pipe/-/bare-pipe-4.1.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "bare-events": "^2.0.0",
        "bare-stream": "^2.0.0"
      },
      "engines": {
        "bare": ">=1.16.0"
      }
    },
    "node_modules/bare-stream": {
      "version": "2.7.0",
      "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.7.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "streamx": "^2.21.0"
      },
      "peerDependencies": {
        "bare-buffer": "*",
        "bare-events": "*"
      },
      "peerDependenciesMeta": {
        "bare-buffer": {
          "optional": true
        },
        "bare-events": {
          "optional": true
        }
      }
    },
    "node_modules/bare-tcp": {
      "version": "2.2.2",
      "resolved": "https://registry.npmjs.org/bare-tcp/-/bare-tcp-2.2.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "bare-dns": "^2.0.4",
        "bare-events": "^2.5.4",
        "bare-stream": "^2.6.4"
      },
      "engines": {
        "bare": ">=1.16.0"
      }
    },
    "node_modules/bare-tls": {
      "version": "2.1.7",
      "resolved": "https://registry.npmjs.org/bare-tls/-/bare-tls-2.1.7.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "bare-net": "^2.0.1",
        "bare-stream": "^2.6.4"
      },
      "engines": {
        "bare": ">=1.7.0"
      }
    },
    "node_modules/bare-zlib": {
      "version": "1.3.1",
      "resolved": "https://registry.npmjs.org/bare-zlib/-/bare-zlib-1.3.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "bare-stream": "^2.0.0"
      }
    },
    "node_modules/base64-js": {
      "version": "1.5.1",
      "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
      "integrity": [REDACTED_SECRET],
      "funding": [
        {
          "type": "github",
          "url": "https://github.com/sponsors/feross"
        },
        {
          "type": "patreon",
          "url": "https://www.patreon.com/feross"
        },
        {
          "type": "consulting",
          "url": "https://feross.org/support"
        }
      ],
      "license": "MIT"
    },
    "node_modules/bn.js": {
      "version": "4.12.2",
      "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/brorand": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/buffer": {
      "version": "6.0.3",
      "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
      "integrity": [REDACTED_SECRET],
      "funding": [
        {
          "type": "github",
          "url": "https://github.com/sponsors/feross"
        },
        {
          "type": "patreon",
          "url": "https://www.patreon.com/feross"
        },
        {
          "type": "consulting",
          "url": "https://feross.org/support"
        }
      ],
      "license": "MIT",
      "dependencies": {
        "base64-js": "^1.3.1",
        "ieee754": "^1.2.1"
      }
    },
    "node_modules/case-anything": {
      "version": "2.1.13",
      "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">=12.13"
      },
      "funding": {
        "url": "https://github.com/sponsors/mesqueeb"
      }
    },
    "node_modules/cjs-module-lexer": {
      "version": "1.4.3",
      "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/cliui": {
      "version": "8.0.1",
      "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "ISC",
      "dependencies": {
        "string-width": "^4.2.0",
        "strip-ansi": "^6.0.1",
        "wrap-ansi": "^7.0.0"
      },
      "engines": {
        "node": ">=12"
      }
    },
    "node_modules/color-convert": {
      "version": "2.0.1",
      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "color-name": "~1.1.4"
      },
      "engines": {
        "node": ">=7.0.0"
      }
    },
    "node_modules/color-name": {
      "version": "1.1.4",
      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/dayjs": {
      "version": "1.11.19",
      "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/debug": {
      "version": "4.4.3",
      "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "ms": "^2.1.3"
      },
      "engines": {
        "node": ">=6.0"
      },
      "peerDependenciesMeta": {
        "supports-color": {
          "optional": true
        }
      }
    },
    "node_modules/detect-europe-js": {
      "version": "0.1.2",
      "resolved": "https://registry.npmjs.org/detect-europe-js/-/detect-europe-js-0.1.2.tgz",
      "integrity": [REDACTED_SECRET],
      "funding": [
        {
          "type": "github",
          "url": "https://github.com/sponsors/faisalman"
        },
        {
          "type": "opencollective",
          "url": "https://opencollective.com/ua-parser-js"
        },
        {
          "type": "paypal",
          "url": "https://paypal.me/faisalman"
        }
      ],
      "license": "MIT"
    },
    "node_modules/detect-libc": {
      "version": "1.0.3",
      "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "bin": {
        "detect-libc": "bin/detect-libc.js"
      },
      "engines": {
        "node": ">=0.10"
      }
    },
    "node_modules/dotenv": {
      "version": "16.6.1",
      "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-2-Clause",
      "engines": {
        "node": ">=12"
      },
      "funding": {
        "url": "https://dotenvx.com"
      }
    },
    "node_modules/dprint-node": {
      "version": "1.0.8",
      "resolved": "https://registry.npmjs.org/dprint-node/-/dprint-node-1.0.8.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "detect-libc": "^1.0.3"
      }
    },
    "node_modules/elliptic": {
      "version": "6.6.1",
      "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "bn.js": "^4.11.9",
        "brorand": "^1.1.0",
        "hash.js": "^1.0.0",
        "hmac-drbg": "^1.0.1",
        "inherits": "^2.0.4",
        "minimalistic-assert": "^1.0.1",
        "minimalistic-crypto-utils": "^1.0.1"
      }
    },
    "node_modules/emoji-regex": {
      "version": "8.0.0",
      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/escalade": {
      "version": "3.2.0",
      "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">=6"
      }
    },
    "node_modules/eventemitter3": {
      "version": "5.0.4",
      "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/events-universal": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/events-universal/-/events-universal-1.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "bare-events": "^2.7.0"
      }
    },
    "node_modules/fast-fifo": {
      "version": "1.3.2",
      "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/function-bind": {
      "version": "1.1.2",
      "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "funding": {
        "url": "https://github.com/sponsors/ljharb"
      }
    },
    "node_modules/get-caller-file": {
      "version": "2.0.5",
      "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "ISC",
      "engines": {
        "node": "6.* || 8.* || >= 10.*"
      }
    },
    "node_modules/graphql": {
      "version": "16.12.0",
      "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.12.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0"
      }
    },
    "node_modules/graphql-ws": {
      "version": "5.16.2",
      "resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.16.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">=10"
      },
      "peerDependencies": {
        "graphql": ">=0.11 <=16"
      }
    },
    "node_modules/hash.js": {
      "version": "1.1.7",
      "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "inherits": "^2.0.3",
        "minimalistic-assert": "^1.0.1"
      }
    },
    "node_modules/hasown": {
      "version": "2.0.2",
      "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "function-bind": "^1.1.2"
      },
      "engines": {
        "node": ">= 0.4"
      }
    },
    "node_modules/hmac-drbg": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "hash.js": "^1.0.3",
        "minimalistic-assert": "^1.0.0",
        "minimalistic-crypto-utils": "^1.0.1"
      }
    },
    "node_modules/ieee754": {
      "version": "1.2.1",
      "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
      "integrity": [REDACTED_SECRET],
      "funding": [
        {
          "type": "github",
          "url": "https://github.com/sponsors/feross"
        },
        {
          "type": "patreon",
          "url": "https://www.patreon.com/feross"
        },
        {
          "type": "consulting",
          "url": "https://feross.org/support"
        }
      ],
      "license": "BSD-3-Clause"
    },
    "node_modules/import-in-the-middle": {
      "version": "1.15.0",
      "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.15.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "acorn": "^8.14.0",
        "acorn-import-attributes": "^1.9.5",
        "cjs-module-lexer": "^1.2.2",
        "module-details-from-path": "^1.0.3"
      }
    },
    "node_modules/inherits": {
      "version": "2.0.4",
      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "ISC"
    },
    "node_modules/ipaddr.js": {
      "version": "2.3.0",
      "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.3.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">= 10"
      }
    },
    "node_modules/is-core-module": {
      "version": "2.16.1",
      "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "hasown": "^2.0.2"
      },
      "engines": {
        "node": ">= 0.4"
      },
      "funding": {
        "url": "https://github.com/sponsors/ljharb"
      }
    },
    "node_modules/is-fullwidth-code-point": {
      "version": "3.0.0",
      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">=8"
      }
    },
    "node_modules/is-standalone-pwa": {
      "version": "0.1.1",
      "resolved": "https://registry.npmjs.org/is-standalone-pwa/-/is-standalone-pwa-0.1.1.tgz",
      "integrity": [REDACTED_SECRET],
      "funding": [
        {
          "type": "github",
          "url": "https://github.com/sponsors/faisalman"
        },
        {
          "type": "opencollective",
          "url": "https://opencollective.com/ua-parser-js"
        },
        {
          "type": "paypal",
          "url": "https://paypal.me/faisalman"
        }
      ],
      "license": "MIT"
    },
    "node_modules/isomorphic-ws": {
      "version": "5.0.0",
      "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "peerDependencies": {
        "ws": "*"
      }
    },
    "node_modules/js-base64": {
      "version": "3.7.8",
      "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.8.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "BSD-3-Clause"
    },
    "node_modules/light-bolt11-decoder": {
      "version": "3.2.0",
      "resolved": "https://registry.npmjs.org/light-bolt11-decoder/-/light-bolt11-decoder-3.2.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "@scure/base": "1.1.1"
      }
    },
    "node_modules/light-bolt11-decoder/node_modules/@scure/base": {
      "version": "1.1.1",
      "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz",
      "integrity": [REDACTED_SECRET],
      "funding": [
        {
          "type": "individual",
          "url": "https://paulmillr.com/funding/"
        }
      ],
      "license": "MIT"
    },
    "node_modules/lodash.camelcase": {
      "version": "4.3.0",
      "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/long": {
      "version": "5.3.2",
      "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0"
    },
    "node_modules/micro-packed": {
      "version": "0.7.3",
      "resolved": "https://registry.npmjs.org/micro-packed/-/micro-packed-0.7.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "@scure/base": "~1.2.5"
      },
      "funding": {
        "url": "https://paulmillr.com/funding/"
      }
    },
    "node_modules/minimalistic-assert": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "ISC"
    },
    "node_modules/minimalistic-crypto-utils": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/module-details-from-path": {
      "version": "1.0.4",
      "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.4.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/ms": {
      "version": "2.1.3",
      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/nice-grpc": {
      "version": "2.1.14",
      "resolved": "https://registry.npmjs.org/nice-grpc/-/nice-grpc-2.1.14.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "@grpc/grpc-js": "^1.14.0",
        "abort-controller-x": "^0.4.0",
        "nice-grpc-common": "^2.0.2"
      }
    },
    "node_modules/nice-grpc-client-middleware-retry": {
      "version": "3.1.13",
      "resolved": "https://registry.npmjs.org/nice-grpc-client-middleware-retry/-/nice-grpc-client-middleware-retry-3.1.13.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "abort-controller-x": "^0.4.0",
        "nice-grpc-common": "^2.0.2"
      }
    },
    "node_modules/nice-grpc-common": {
      "version": "2.0.2",
      "resolved": "https://registry.npmjs.org/nice-grpc-common/-/nice-grpc-common-2.0.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "ts-error": "^1.0.6"
      }
    },
    "node_modules/nice-grpc-opentelemetry": {
      "version": "0.1.20",
      "resolved": "https://registry.npmjs.org/nice-grpc-opentelemetry/-/nice-grpc-opentelemetry-0.1.20.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "@opentelemetry/api": "^1.8.0",
        "@opentelemetry/semantic-conventions": "^1.22.0",
        "abort-controller-x": "^0.4.0",
        "ipaddr.js": "^2.0.1",
        "nice-grpc-common": "^2.0.2"
      }
    },
    "node_modules/nice-grpc-web": {
      "version": "3.3.9",
      "resolved": "https://registry.npmjs.org/nice-grpc-web/-/nice-grpc-web-3.3.9.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "abort-controller-x": "^0.4.0",
        "isomorphic-ws": "^5.0.0",
        "js-base64": "^3.7.2",
        "nice-grpc-common": "^2.0.2"
      }
    },
    "node_modules/node-addon-api": {
      "version": "5.1.0",
      "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/node-gyp-build": {
      "version": "4.8.4",
      "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "bin": {
        "node-gyp-build": "bin.js",
        "node-gyp-build-optional": "optional.js",
        "node-gyp-build-test": "build-test.js"
      }
    },
    "node_modules/path-parse": {
      "version": "1.0.7",
      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/protobufjs": {
      "version": "7.5.4",
      "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz",
      "integrity": [REDACTED_SECRET],
      "hasInstallScript": true,
      "license": "BSD-3-Clause",
      "dependencies": {
        "@protobufjs/aspromise": "^1.1.2",
        "@protobufjs/base64": "^1.1.2",
        "@protobufjs/codegen": "^2.0.4",
        "@protobufjs/eventemitter": "^1.1.0",
        "@protobufjs/fetch": "^1.1.0",
        "@protobufjs/float": "^1.0.2",
        "@protobufjs/inquire": "^1.1.0",
        "@protobufjs/path": "^1.1.2",
        "@protobufjs/pool": "^1.1.0",
        "@protobufjs/utf8": "^1.1.0",
        "@types/node": ">=13.7.0",
        "long": "^5.0.0"
      },
      "engines": {
        "node": ">=12.0.0"
      }
    },
    "node_modules/require-directory": {
      "version": "2.1.1",
      "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">=0.10.0"
      }
    },
    "node_modules/require-in-the-middle": {
      "version": "7.5.2",
      "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-7.5.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "debug": "^4.3.5",
        "module-details-from-path": "^1.0.3",
        "resolve": "^1.22.8"
      },
      "engines": {
        "node": ">=8.6.0"
      }
    },
    "node_modules/resolve": {
      "version": "1.22.11",
      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "is-core-module": "^2.16.1",
        "path-parse": "^1.0.7",
        "supports-preserve-symlinks-flag": "^1.0.0"
      },
      "bin": {
        "resolve": "bin/resolve"
      },
      "engines": {
        "node": ">= 0.4"
      },
      "funding": {
        "url": "https://github.com/sponsors/ljharb"
      }
    },
    "node_modules/secp256k1": {
      "version": "5.0.1",
      "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-5.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "hasInstallScript": true,
      "license": "MIT",
      "dependencies": {
        "elliptic": "^6.5.7",
        "node-addon-api": "^5.0.0",
        "node-gyp-build": "^4.2.0"
      },
      "engines": {
        "node": ">=18.0.0"
      }
    },
    "node_modules/streamx": {
      "version": "2.23.0",
      "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.23.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "events-universal": "^1.0.0",
        "fast-fifo": "^1.3.2",
        "text-decoder": "^1.1.0"
      }
    },
    "node_modules/string-width": {
      "version": "4.2.3",
      "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "emoji-regex": "^8.0.0",
        "is-fullwidth-code-point": "^3.0.0",
        "strip-ansi": "^6.0.1"
      },
      "engines": {
        "node": ">=8"
      }
    },
    "node_modules/strip-ansi": {
      "version": "6.0.1",
      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "ansi-regex": "^5.0.1"
      },
      "engines": {
        "node": ">=8"
      }
    },
    "node_modules/supports-preserve-symlinks-flag": {
      "version": "1.0.0",
      "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">= 0.4"
      },
      "funding": {
        "url": "https://github.com/sponsors/ljharb"
      }
    },
    "node_modules/text-decoder": {
      "version": "1.2.3",
      "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "b4a": "^1.6.4"
      }
    },
    "node_modules/ts-error": {
      "version": "1.0.6",
      "resolved": "https://registry.npmjs.org/ts-error/-/ts-error-1.0.6.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/ts-poet": {
      "version": "6.12.0",
      "resolved": "https://registry.npmjs.org/ts-poet/-/ts-poet-6.12.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "dependencies": {
        "dprint-node": "^1.0.8"
      }
    },
    "node_modules/ts-proto": {
      "version": "2.8.3",
      "resolved": "https://registry.npmjs.org/ts-proto/-/ts-proto-2.8.3.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "ISC",
      "dependencies": {
        "@bufbuild/protobuf": "^2.0.0",
        "case-anything": "^2.1.13",
        "ts-poet": "^6.12.0",
        "ts-proto-descriptors": "2.0.0"
      },
      "bin": {
        "protoc-gen-ts_proto": "protoc-gen-ts_proto"
      }
    },
    "node_modules/ts-proto-descriptors": {
      "version": "2.0.0",
      "resolved": "https://registry.npmjs.org/ts-proto-descriptors/-/ts-proto-descriptors-2.0.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "ISC",
      "dependencies": {
        "@bufbuild/protobuf": "^2.0.0"
      }
    },
    "node_modules/tslib": {
      "version": "2.8.1",
      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "0BSD"
    },
    "node_modules/ua-is-frozen": {
      "version": "0.1.2",
      "resolved": "https://registry.npmjs.org/ua-is-frozen/-/ua-is-frozen-0.1.2.tgz",
      "integrity": [REDACTED_SECRET],
      "funding": [
        {
          "type": "github",
          "url": "https://github.com/sponsors/faisalman"
        },
        {
          "type": "opencollective",
          "url": "https://opencollective.com/ua-parser-js"
        },
        {
          "type": "paypal",
          "url": "https://paypal.me/faisalman"
        }
      ],
      "license": "MIT"
    },
    "node_modules/ua-parser-js": {
      "version": "2.0.8",
      "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-2.0.8.tgz",
      "integrity": [REDACTED_SECRET],
      "funding": [
        {
          "type": "opencollective",
          "url": "https://opencollective.com/ua-parser-js"
        },
        {
          "type": "paypal",
          "url": "https://paypal.me/faisalman"
        },
        {
          "type": "github",
          "url": "https://github.com/sponsors/faisalman"
        }
      ],
      "license": "AGPL-3.0-or-later",
      "dependencies": {
        "detect-europe-js": "^0.1.2",
        "is-standalone-pwa": "^0.1.1",
        "ua-is-frozen": "^0.1.2"
      },
      "bin": {
        "ua-parser-js": "script/cli.js"
      },
      "engines": {
        "node": "*"
      }
    },
    "node_modules/undici-types": {
      "version": "7.16.0",
      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/uuidv7": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/uuidv7/-/uuidv7-1.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "Apache-2.0",
      "bin": {
        "uuidv7": "cli.js"
      }
    },
    "node_modules/wrap-ansi": {
      "version": "7.0.0",
      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "ansi-styles": "^4.0.0",
        "string-width": "^4.1.0",
        "strip-ansi": "^6.0.0"
      },
      "engines": {
        "node": ">=10"
      },
      "funding": {
        "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
      }
    },
    "node_modules/ws": {
      "version": "8.19.0",
      "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "engines": {
        "node": ">=10.0.0"
      },
      "peerDependencies": {
        "bufferutil": "^4.0.1",
        "utf-8-validate": ">=5.0.2"
      },
      "peerDependenciesMeta": {
        "bufferutil": {
          "optional": true
        },
        "utf-8-validate": {
          "optional": true
        }
      }
    },
    "node_modules/y18n": {
      "version": "5.0.8",
      "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "ISC",
      "engines": {
        "node": ">=10"
      }
    },
    "node_modules/yargs": {
      "version": "17.7.2",
      "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "cliui": "^8.0.1",
        "escalade": "^3.1.1",
        "get-caller-file": "^2.0.5",
        "require-directory": "^2.1.1",
        "string-width": "^4.2.3",
        "y18n": "^5.0.5",
        "yargs-parser": "^21.1.1"
      },
      "engines": {
        "node": ">=12"
      }
    },
    "node_modules/yargs-parser": {
      "version": "21.1.1",
      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "ISC",
      "engines": {
        "node": ">=12"
      }
    },
    "node_modules/zen-observable": {
      "version": "0.8.15",
      "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT"
    },
    "node_modules/zen-observable-ts": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-1.1.0.tgz",
      "integrity": [REDACTED_SECRET],
      "license": "MIT",
      "dependencies": {
        "@types/zen-observable": "0.8.3",
        "zen-observable": "0.8.15"
      }
    }
  }
}


path: package.json
content: {
  "name": "sparkbtcbot-skill",
  "version": "0.1.0",
  "type": "module",
  "description": "Claude Code skill for setting up Spark Bitcoin L2 wallet capabilities for AI agents",
  "dependencies": {
    "@buildonspark/spark-sdk": "^0.5.8",
    "dotenv": "^16.4.7"
  },
  "scripts": {
    "example:setup": "node examples/wallet-setup.js",
    "example:balance": "node examples/balance-and-deposits.js",
    "example:payments": "node examples/payment-flow.js",
    "example:tokens": "node examples/token-operations.js",
    "example:agent": "node examples/spark-agent.js"
  }
}


Security scan verdicts — ClawScan: suspicious | static analysis:  | VirusTotal: suspicious | SkillSpector: suspicious (CRITICAL)