From bc3cad3763d8d5c1547acaac7d3cc5a0144c3af8 Mon Sep 17 00:00:00 2001 From: jimtracy1007 Date: Fri, 17 Jan 2025 15:30:00 +0800 Subject: [PATCH 01/15] feat:add plugin-lightning --- agent/package.json | 1 + agent/src/index.ts | 7 +- packages/plugin-lightning/README.md | 72 ++++++++++ packages/plugin-lightning/eslint.config.mjs | 3 + packages/plugin-lightning/package.json | 35 +++++ .../src/actions/createInvoice.ts | 105 ++++++++++++++ .../src/actions/payInvoice.ts | 132 ++++++++++++++++++ packages/plugin-lightning/src/index.ts | 19 +++ .../src/providers/lightning.ts | 80 +++++++++++ .../plugin-lightning/src/templates/index.ts | 73 ++++++++++ packages/plugin-lightning/src/types/index.ts | 103 ++++++++++++++ packages/plugin-lightning/tsconfig.json | 10 ++ packages/plugin-lightning/tsup.config.ts | 23 +++ turbo.json | 4 + 14 files changed, 666 insertions(+), 1 deletion(-) create mode 100644 packages/plugin-lightning/README.md create mode 100644 packages/plugin-lightning/eslint.config.mjs create mode 100644 packages/plugin-lightning/package.json create mode 100644 packages/plugin-lightning/src/actions/createInvoice.ts create mode 100644 packages/plugin-lightning/src/actions/payInvoice.ts create mode 100644 packages/plugin-lightning/src/index.ts create mode 100644 packages/plugin-lightning/src/providers/lightning.ts create mode 100644 packages/plugin-lightning/src/templates/index.ts create mode 100644 packages/plugin-lightning/src/types/index.ts create mode 100644 packages/plugin-lightning/tsconfig.json create mode 100644 packages/plugin-lightning/tsup.config.ts diff --git a/agent/package.json b/agent/package.json index 27aee4c3404..11e429c1c59 100644 --- a/agent/package.json +++ b/agent/package.json @@ -92,6 +92,7 @@ "@elizaos/plugin-hyperliquid": "workspace:*", "@elizaos/plugin-akash": "workspace:*", "@elizaos/plugin-quai": "workspace:*", + "@elizaos/plugin-lightning": "workspace:*", "readline": "1.3.0", "ws": "8.18.0", "yargs": "17.7.2" diff --git a/agent/src/index.ts b/agent/src/index.ts index 68a58daa346..e88875fb43a 100644 --- a/agent/src/index.ts +++ b/agent/src/index.ts @@ -13,7 +13,7 @@ import { TwitterClientInterface } from "@elizaos/client-twitter"; // import { ReclaimAdapter } from "@elizaos/plugin-reclaim"; import { DirectClient } from "@elizaos/client-direct"; import { PrimusAdapter } from "@elizaos/plugin-primus"; - +import { lightningPlugin } from "@elizaos/plugin-lightning"; import { AgentRuntime, CacheManager, @@ -854,6 +854,11 @@ export async function createAgent( getSecret(character, "QUAI_PRIVATE_KEY") ? quaiPlugin : null, + getSecret(character, "LND_TLS_CERT") && + getSecret(character, "LND_MACAROON") && + getSecret(character, "LND_SOCKET") + ? lightningPlugin + : null ].filter(Boolean), providers: [], actions: [], diff --git a/packages/plugin-lightning/README.md b/packages/plugin-lightning/README.md new file mode 100644 index 00000000000..5cda0959988 --- /dev/null +++ b/packages/plugin-lightning/README.md @@ -0,0 +1,72 @@ +# @elizaos/plugin-lightning + +This plugin enables interaction with the Hyperliquid DEX through Eliza, providing spot trading capabilities. + +## Features + +- 💱 Make a new off-chain invoice. +- 📊 Make an off-chain payment. + +## Installation + +Add the plugin to your Eliza configuration: + +```json +{ + "plugins": ["@elizaos/plugin-lightning"] +} +``` + +## Configuration + +Set the following environment variables: + +```env +LND_TLS_CERT=your_lnnode_tls_cert #Base64 of LND certificate +LND_MACAROON=020..... #Base64 encoded admin.macaroon file +LND_SOCKET='x.x.x.x:10009' +``` + +## Available Actions + +### 1. CREATE_INVOICE + +Make a new off-chain invoice. + +Examples: + +``` + +"Help me create an invoice for 1000sats" +"Create an invoice for 1000sats" + +``` + +Returns: Current price, 24h change, and volume. + +### 2. PAY_INVOICE + +Make an off-chain payment. + +Examples: + +``` + +"Pay invoice lnbcrt10u1pncndjvpp58y77adkngcz3ypx6t39j245ydvk2vu67c8ugvegee3gt5wgs7yjqdxvdec82c33wdmnq73s0qcxwurrxp4nquncxe4h56m9xu6xwetyd3mrq6ehdguxkd35wuurgarex4u8gefkdsekgdtnddehxurrxecxvhmwwp6kyvfexekhxwtv8paryvnpwsuhxdryvachwangw3kn2atddq6kzvrvwfcxzanewce8ja34d43k56rkweu8jdtcwv68zmrsvdescqzzsxqrrsssp5q3hv38wfprvaazzwf8c4t33tzjcac5xz94sk8muehmn5szqaw6ks9qxpqysgqt5pjhna4922s8ayzgu5rh8clx7psp2culdr5r6cxxxqzs3e5ep345p45vggg0qegt6fu3prdrqgpd8v70l9wdhekt8gex5e8pqvxg2sp97fkmd" + + +``` + +## Security Notes + +- Store your LND_TLS_CERT and LND_MACAROON securely using environment variables +- Test with small amounts first +- Use testnet for initial testing + +## License + +MIT + +``` + +``` diff --git a/packages/plugin-lightning/eslint.config.mjs b/packages/plugin-lightning/eslint.config.mjs new file mode 100644 index 00000000000..92fe5bbebef --- /dev/null +++ b/packages/plugin-lightning/eslint.config.mjs @@ -0,0 +1,3 @@ +import eslintGlobalConfig from "../../eslint.config.mjs"; + +export default [...eslintGlobalConfig]; diff --git a/packages/plugin-lightning/package.json b/packages/plugin-lightning/package.json new file mode 100644 index 00000000000..faac1706641 --- /dev/null +++ b/packages/plugin-lightning/package.json @@ -0,0 +1,35 @@ +{ + "name": "@elizaos/plugin-lightning", + "version": "0.1.8+build.1", + "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", + "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], + "dependencies": { + "@elizaos/core": "workspace:*", + "@elizaos/plugin-tee": "workspace:*", + "astra-lightning": "^1.1.0", + "tsup": "8.3.5" + }, + "scripts": { + "build": "tsup --format esm --dts", + "dev": "tsup --format esm --dts --watch", + "lint": "eslint --fix --cache ." + }, + "peerDependencies": { + "whatwg-url": "7.1.0" + } +} diff --git a/packages/plugin-lightning/src/actions/createInvoice.ts b/packages/plugin-lightning/src/actions/createInvoice.ts new file mode 100644 index 00000000000..66f32ee8828 --- /dev/null +++ b/packages/plugin-lightning/src/actions/createInvoice.ts @@ -0,0 +1,105 @@ +import type { IAgentRuntime, Memory, State } from "@elizaos/core"; +import { + composeContext, + generateObjectDeprecated, + ModelClass, +} from "@elizaos/core"; + +import { + initLightningProvider, + LightningProvider, +} from "../providers/lightning"; +import { CreateInvoiceResult } from "astra-lightning"; +import { CreateInvoiceArgs } from "../types"; +import { createInvoiceTemplate } from "../templates"; + +export { createInvoiceTemplate }; + +export class CreateInvoiceAction { + constructor(private lightningProvider: LightningProvider) { + this.lightningProvider = lightningProvider; + } + + async createInvoice( + params: CreateInvoiceArgs + ): Promise { + if (!params.tokens) { + throw new Error("tokens is required."); + } + const retCreateInvoice = + await this.lightningProvider.createInvoice(params); + return retCreateInvoice; + } +} + +export const createInvoiceAction = { + name: "CREATE_INVOICE", + description: "Create a Lightning invoice.", + handler: async ( + runtime: IAgentRuntime, + _message: Memory, + state: State, + _options: any, + callback?: any + ) => { + console.log("CreateInvoice action handler called"); + const lightningProvider = await initLightningProvider(runtime); + const action = new CreateInvoiceAction(lightningProvider); + + // Compose bridge context + const createInvoiceContext = composeContext({ + state, + template: createInvoiceTemplate, + }); + const content = await generateObjectDeprecated({ + runtime, + context: createInvoiceContext, + modelClass: ModelClass.LARGE, + }); + + const createInvoiceOptions: CreateInvoiceArgs = { + tokens: content.tokens, + }; + + try { + const createInvoiceResp = + await action.createInvoice(createInvoiceOptions); + + if (callback) { + callback({ + text: `Successfully createInvoice ${createInvoiceResp.tokens}\r\nInvoice:${createInvoiceResp.request}`, + content: { + success: true, + invoice: createInvoiceResp.request, + }, + }); + } + return true; + } catch (error) { + console.error("Error in createInvoice handler:", error.message); + if (callback) { + callback({ text: `Error: ${error.message}` }); + } + return false; + } + }, + template: createInvoiceTemplate, + validate: async (runtime: IAgentRuntime) => { + const cert = runtime.getSetting("LND_TLS_CERT"); + const macaroon = runtime.getSetting("LND_MACAROON"); + const socket = runtime.getSetting("LND_SOCKET"); + return !!cert && !!macaroon && !!socket; + }, + examples: [ + [ + { + user: "user", + content: { + text: "Create an invoice for 1000 sats", + action: "CREATE_INVOICE", + }, + }, + ], + ], + similes: ["CREATE_INVOICE"], +}; diff --git a/packages/plugin-lightning/src/actions/payInvoice.ts b/packages/plugin-lightning/src/actions/payInvoice.ts new file mode 100644 index 00000000000..cf905ddf853 --- /dev/null +++ b/packages/plugin-lightning/src/actions/payInvoice.ts @@ -0,0 +1,132 @@ +import type { IAgentRuntime, Memory, State } from "@elizaos/core"; +import { + composeContext, + generateObjectDeprecated, + ModelClass, +} from "@elizaos/core"; + +import { + initLightningProvider, + LightningProvider, +} from "../providers/lightning"; +import { PayResult } from "astra-lightning"; +import { PayArgs } from "../types"; +import { payInvoiceTemplate } from "../templates"; + +export { payInvoiceTemplate }; + +type ExtendedPayResult = PayResult & { outgoing_channel: string }; +export class PayInvoiceAction { + constructor(private lightningProvider: LightningProvider) { + this.lightningProvider = lightningProvider; + } + + async getAvalibleChannelId(): Promise { + const { channels } = await this.lightningProvider.getLndChannel(); + const filteredActiveChannels = channels.filter( + (channel) => channel.is_active === true + ); + const sortedChannels = filteredActiveChannels.sort( + (a, b) => b.local_balance - a.local_balance + ); + if (sortedChannels.length > 0) { + return sortedChannels[0].id; + } + return ""; + } + async payInvoice(params: PayArgs): Promise { + const outgoing_channel = await this.getAvalibleChannelId(); + if (!outgoing_channel) { + throw new Error("no avalible channel"); + } + const requestArgs = { + outgoing_channel: outgoing_channel, + ...params, + }; + const retPayInvoice = + await this.lightningProvider.payInvoice(requestArgs); + return { + ...retPayInvoice, + outgoing_channel: outgoing_channel, + }; + } +} + +export const payInvoiceAction = { + name: "PAY_INVOICE", + description: "Make a payment.", + handler: async ( + runtime: IAgentRuntime, + _message: Memory, + state: State, + _options: any, + callback?: any + ) => { + console.log("payInvoice action handler called"); + const lightningProvider = await initLightningProvider(runtime); + const action = new PayInvoiceAction(lightningProvider); + + // Compose bridge context + const payInvoiceContext = composeContext({ + state, + template: payInvoiceTemplate, + }); + const content = await generateObjectDeprecated({ + runtime, + context: payInvoiceContext, + modelClass: ModelClass.LARGE, + }); + + const payInvoiceOptions: PayArgs = { + request: content.request, + outgoing_channel: content.outgoing_channel, + }; + + try { + const payInvoiceResp = await action.payInvoice(payInvoiceOptions); + console.log("🚀 ~ payInvoiceResp:", payInvoiceResp); + + if (callback) { + let text = ""; + if (payInvoiceResp.is_confirmed) { + text = `Successfully payInvoice ${content.request} from ${payInvoiceResp.outgoing_channel};\r\n Amount: ${payInvoiceResp.tokens};\r\n Fee: ${payInvoiceResp.fee};\r\n Payment Hash: ${payInvoiceResp.id};`; + } else { + text = `Failed to payInvoice ${content.request} from ${content.outgoing_channel};\r\n Amount: ${payInvoiceResp.tokens};`; + } + callback({ + text: text, + content: { + success: true, + }, + }); + } + return true; + } catch (error) { + const err = error?.[2]?.err; + console.error("Error in payInvoice handler:", err.details); + if (callback) { + callback({ text: `Error: ${err.details}` }); + } + return false; + } + }, + template: payInvoiceTemplate, + validate: async (runtime: IAgentRuntime) => { + const cert = runtime.getSetting("LND_TLS_CERT"); + const macaroon = runtime.getSetting("LND_MACAROON"); + const socket = runtime.getSetting("LND_SOCKET"); + return !!cert && !!macaroon && !!socket; + }, + examples: [ + [ + { + user: "user", + content: { + text: "Pay invoice for lnbrc...", + action: "PAY_INVOICE", + }, + }, + ], + ], + similes: ["PAY_INVOICE", "MAKE_PAYMENT"], +}; diff --git a/packages/plugin-lightning/src/index.ts b/packages/plugin-lightning/src/index.ts new file mode 100644 index 00000000000..41c582e5fdf --- /dev/null +++ b/packages/plugin-lightning/src/index.ts @@ -0,0 +1,19 @@ +export * from "./actions/createInvoice"; +export * from "./providers/lightning"; +export * from "./types"; + +import type { Plugin } from "@elizaos/core"; +import { createInvoiceAction } from "./actions/createInvoice"; +import { payInvoiceAction } from "./actions/payInvoice"; +import { lndProvider } from "./providers/lightning"; + +export const lightningPlugin: Plugin = { + name: "lightning", + description: "lightning integration plugin", + providers: [lndProvider], + evaluators: [], + services: [], + actions: [createInvoiceAction, payInvoiceAction], +}; + +export default lightningPlugin; diff --git a/packages/plugin-lightning/src/providers/lightning.ts b/packages/plugin-lightning/src/providers/lightning.ts new file mode 100644 index 00000000000..d83121bca65 --- /dev/null +++ b/packages/plugin-lightning/src/providers/lightning.ts @@ -0,0 +1,80 @@ +import { + type IAgentRuntime, + type Provider, + type Memory, + type State, +} from "@elizaos/core"; +import { + authenticatedLndGrpc, + AuthenticatedLnd, + GetIdentityResult, + GetChannelsResult, + getIdentity, + getChannels, + CreateInvoiceResult, + createInvoice, + pay, + PayResult, +} from "astra-lightning"; +import { CreateInvoiceArgs, PayArgs } from "../types"; +export class LightningProvider { + lndClient: AuthenticatedLnd; + constructor(cert: string, macaroon: string, socket: string) { + const { lnd } = authenticatedLndGrpc({ + cert: cert, + macaroon: macaroon, + socket: socket, + }); + this.lndClient = lnd; + } + async getLndIdentity(): Promise { + return await getIdentity({ lnd: this.lndClient }); + } + async getLndChannel(): Promise { + const ret = await getChannels({ lnd: this.lndClient }); + return ret; + } + async createInvoice( + createInvoiceArgs: CreateInvoiceArgs + ): Promise { + const ret = await createInvoice({ + lnd: this.lndClient, + ...createInvoiceArgs, + }); + return ret; + } + async payInvoice(payInvoiceArgs: PayArgs): Promise { + const ret = await pay({ + lnd: this.lndClient, + ...payInvoiceArgs, + }); + return ret; + } +} + +export const initLightningProvider = async (runtime: IAgentRuntime) => { + const cert = runtime.getSetting("LND_TLS_CERT"); + const macaroon = runtime.getSetting("LND_MACAROON"); + const socket = runtime.getSetting("LND_SOCKET"); + return new LightningProvider(cert, macaroon, socket); +}; + +export const lndProvider: Provider = { + async get( + runtime: IAgentRuntime, + _message: Memory, + state?: State + ): Promise { + try { + const lightningProvider = await initLightningProvider(runtime); + const { public_key: nodePubkey } = + await lightningProvider.getLndIdentity(); + const { channels } = await lightningProvider.getLndChannel(); + const agentName = state?.agentName || "The agent"; + return `${agentName}'s Lightning Node publickey : ${nodePubkey}\n,Channel count : ${channels.length}`; + } catch (error) { + console.error("Error in Lightning provider:", error); + return null; + } + }, +}; diff --git a/packages/plugin-lightning/src/templates/index.ts b/packages/plugin-lightning/src/templates/index.ts new file mode 100644 index 00000000000..6fa3f72b4a4 --- /dev/null +++ b/packages/plugin-lightning/src/templates/index.ts @@ -0,0 +1,73 @@ +export const createInvoiceTemplate = `You are an AI assistant specialized in processing requests to create Lightning Network invoices. Your task is to extract specific information from user messages and format it into a structured JSON response. + +First, review the recent messages from the conversation: + + +{{recentMessages}} + + +Your goal is to extract the following information for the invoice creation: +1. Tokens or Millitokens (amount to request). +2. Description (optional, a user-provided note about the invoice). + +Before providing the final JSON output, show your reasoning process inside tags. Follow these steps: + +1. Identify the relevant information from the user's message: + - Quote the part of the message mentioning the amount (tokens or millitokens). + - Quote the part mentioning the description (if provided). + +2. Validate each piece of information: + - Tokens or millitokens: Ensure at least one is provided and can be parsed as a valid number. + - Description: This field is optional; if present, it should be a string. + +3. If any required information is missing or invalid, prepare an appropriate error message. + +4. If all information is valid, summarize your findings. + +Respond with a JSON markdown block containing only the extracted values. All fields are required: + +\`\`\`json +{ + "description"?: string; + /** Expires At ISO 8601 Date */ + "expires_at"?: string; + "tokens": "" +} +\`\`\` + +If the input is valid, provide the structured JSON response. Otherwise, output an error message describing what is missing or invalid. + +Now, process the user's request and provide your response. +`; + +export const payInvoiceTemplate = `You are an AI assistant specialized in processing requests to make a payment.. Your task is to extract specific information from user messages and format it into a structured JSON response. + +First, review the recent messages from the conversation: + + +{{recentMessages}} + + +### Instructions: +1. **Review the user's message:** Analyze the input text to identify the required payment details. +2. **Extract the following fields:** + - "request": This is the **BOLT 11 Payment Request String**. It typically starts with "lnbc", "lntb", "lnbcrt", or similar prefixes and can contain letters and numbers. + - "outgoing_channel" (optional): This is the Outbound Standard Channel Id String. If not provided, this can be left as "null". + +3. **Validation:** + - Ensure "request" is valid and starts with "lnbc". + - If "outgoing_channel" is present, ensure it is a valid string. + +4. **Output:** If all required fields are valid, respond with the following JSON format: + +\`\`\`json + { + "request": "", + "outgoing_channel": "" + } +\`\`\` + +5. If any information is invalid or missing, respond with an error message explaining what is wrong. + +Now, process the user's request and provide your response. +`; diff --git a/packages/plugin-lightning/src/types/index.ts b/packages/plugin-lightning/src/types/index.ts new file mode 100644 index 00000000000..40a92c4daed --- /dev/null +++ b/packages/plugin-lightning/src/types/index.ts @@ -0,0 +1,103 @@ +export type CreateInvoiceArgs = { + /** CLTV Delta */ + cltv_delta?: number; + /** Invoice Description */ + description?: string; + /** Hashed Description of Payment Hex String */ + description_hash?: string; + /** Expires At ISO 8601 Date */ + expires_at?: string; + /** Use Blinded Paths For Inbound Routes */ + is_encrypting_routes?: boolean; + /** Is Fallback Address Included */ + is_fallback_included?: boolean; + /** Is Fallback Address Nested */ + is_fallback_nested?: boolean; + /** Invoice Includes Private Channels */ + is_including_private_channels?: boolean; + /** Payment Preimage Hex String */ + secret?: string; + /** Millitokens */ + mtokens?: string; + routes?: any; + /** Tokens */ + tokens?: number; + asset_id?: string; + peer_pubkey?: string; + tpr?: any; +}; + +export type PayArgs = { + /** Pay Through Specific Final Hop Public Key Hex */ + incoming_peer?: string; + /** Maximum Additional Fee Tokens To Pay */ + max_fee?: number; + /** Maximum Fee Millitokens to Pay */ + max_fee_mtokens?: string; + /** Maximum Millitokens For A Multi-Path Path */ + max_path_mtokens?: string; + /** Maximum Simultaneous Paths */ + max_paths?: number; + /** Max CLTV Timeout */ + max_timeout_height?: number; + messages?: { + /** Message Type number */ + type: string; + /** Message Raw Value Hex Encoded */ + value: string; + }[]; + /** Millitokens to Pay */ + mtokens?: string; + /** Pay Through Outbound Standard Channel Id */ + outgoing_channel?: string; + /** Pay Out of Outgoing Channel Ids */ + outgoing_channels?: string[]; + path?: { + /** Payment Hash Hex */ + id: string; + routes: { + /** Total Fee Tokens To Pay */ + fee: number; + /** Total Fee Millitokens To Pay */ + fee_mtokens: string; + hops: { + /** Standard Format Channel Id */ + channel: string; + /** Channel Capacity Tokens */ + channel_capacity: number; + /** Fee */ + fee: number; + /** Fee Millitokens */ + fee_mtokens: string; + /** Forward Tokens */ + forward: number; + /** Forward Millitokens */ + forward_mtokens: string; + /** Public Key Hex */ + public_key?: string; + /** Timeout Block Height */ + timeout: number; + }[]; + messages?: { + /** Message Type number */ + type: string; + /** Message Raw Value Hex Encoded */ + value: string; + }[]; + /** Total Millitokens To Pay */ + mtokens: string; + /** Payment Identifier Hex */ + payment?: string; + /** Expiration Block Height */ + timeout: number; + /** Total Tokens To Pay */ + tokens: number; + }[]; + }; + /** Time to Spend Finding a Route Milliseconds */ + pathfinding_timeout?: number; + /** BOLT 11 Payment Request */ + request?: string; + /** Total Tokens To Pay to Payment Request */ + tokens?: number; +}; diff --git a/packages/plugin-lightning/tsconfig.json b/packages/plugin-lightning/tsconfig.json new file mode 100644 index 00000000000..547fa531378 --- /dev/null +++ b/packages/plugin-lightning/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../core/tsconfig.json", + "compilerOptions": { + "outDir": "dist", + "rootDir": "./src", + "typeRoots": ["./node_modules/@types", "./src/types"], + "declaration": true + }, + "include": ["src"] +} diff --git a/packages/plugin-lightning/tsup.config.ts b/packages/plugin-lightning/tsup.config.ts new file mode 100644 index 00000000000..ccf57c9a5b2 --- /dev/null +++ b/packages/plugin-lightning/tsup.config.ts @@ -0,0 +1,23 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + entry: ["src/index.ts"], + outDir: "dist", + sourcemap: true, + clean: true, + format: ["esm"], // Ensure you're targeting CommonJS + external: [ + "dotenv", // Externalize dotenv to prevent bundling + "fs", // Externalize fs to use Node.js built-in module + "path", // Externalize other built-ins if necessary + "@reflink/reflink", + "@node-llama-cpp", + "https", + "http", + "agentkeepalive", + "viem", + "@lifi/sdk", + "events", + "node-cache", + ], +}); diff --git a/turbo.json b/turbo.json index 485ec01e2ff..cc95880a80b 100644 --- a/turbo.json +++ b/turbo.json @@ -49,6 +49,10 @@ "@elizaos/plugin-trustdb#build" ] }, + "@elizaos/plugin-lightning#build": { + "outputs": ["dist/**"], + "dependsOn": ["@elizaos/plugin-tee#build"] + }, "eliza-docs#build": { "outputs": ["build/**"] }, From 162e611c96e67f94e4e6180cfa6077d35a5e4697 Mon Sep 17 00:00:00 2001 From: jimtracy1007 Date: Fri, 17 Jan 2025 17:41:31 +0800 Subject: [PATCH 02/15] fix:readme --- packages/plugin-lightning/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/plugin-lightning/README.md b/packages/plugin-lightning/README.md index 5cda0959988..df765223e08 100644 --- a/packages/plugin-lightning/README.md +++ b/packages/plugin-lightning/README.md @@ -1,6 +1,6 @@ # @elizaos/plugin-lightning -This plugin enables interaction with the Hyperliquid DEX through Eliza, providing spot trading capabilities. +This plugin enables create lightning invoice or payInvoice. ## Features @@ -42,7 +42,7 @@ Examples: ``` -Returns: Current price, 24h change, and volume. +Returns: lnbcrt.... ### 2. PAY_INVOICE @@ -61,7 +61,7 @@ Examples: - Store your LND_TLS_CERT and LND_MACAROON securely using environment variables - Test with small amounts first -- Use testnet for initial testing +- Use regtest for initial testing ## License From 09dcb670e3bb6439efe5a1c721d62c73fe9f6804 Mon Sep 17 00:00:00 2001 From: Sayo Date: Fri, 17 Jan 2025 20:46:29 +0530 Subject: [PATCH 03/15] Update packages/plugin-lightning/package.json Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- packages/plugin-lightning/package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/plugin-lightning/package.json b/packages/plugin-lightning/package.json index faac1706641..1c4560323a0 100644 --- a/packages/plugin-lightning/package.json +++ b/packages/plugin-lightning/package.json @@ -21,9 +21,11 @@ "dependencies": { "@elizaos/core": "workspace:*", "@elizaos/plugin-tee": "workspace:*", - "astra-lightning": "^1.1.0", - "tsup": "8.3.5" + "astra-lightning": "^1.1.0" }, + "devDependencies": { + "tsup": "8.3.5" + } "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", From 18f25dbc0de662e5a11aa071e892601c9e686d0c Mon Sep 17 00:00:00 2001 From: Sayo Date: Fri, 17 Jan 2025 20:47:11 +0530 Subject: [PATCH 04/15] Update packages/plugin-lightning/tsup.config.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- packages/plugin-lightning/tsup.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-lightning/tsup.config.ts b/packages/plugin-lightning/tsup.config.ts index ccf57c9a5b2..396982d4ec9 100644 --- a/packages/plugin-lightning/tsup.config.ts +++ b/packages/plugin-lightning/tsup.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ outDir: "dist", sourcemap: true, clean: true, - format: ["esm"], // Ensure you're targeting CommonJS + format: ["esm"], // Output format is ECMAScript modules external: [ "dotenv", // Externalize dotenv to prevent bundling "fs", // Externalize fs to use Node.js built-in module From 334adf7edb8ca578bd17498e3b9caeecf06460fa Mon Sep 17 00:00:00 2001 From: Sayo Date: Fri, 17 Jan 2025 20:47:21 +0530 Subject: [PATCH 05/15] Update packages/plugin-lightning/src/providers/lightning.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- packages/plugin-lightning/src/providers/lightning.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/plugin-lightning/src/providers/lightning.ts b/packages/plugin-lightning/src/providers/lightning.ts index d83121bca65..8c61c1c3d4d 100644 --- a/packages/plugin-lightning/src/providers/lightning.ts +++ b/packages/plugin-lightning/src/providers/lightning.ts @@ -28,7 +28,11 @@ export class LightningProvider { this.lndClient = lnd; } async getLndIdentity(): Promise { - return await getIdentity({ lnd: this.lndClient }); + try { + return await getIdentity({ lnd: this.lndClient }); + } catch (error) { + throw new Error(`Failed to get LND identity: ${error.message}`); + } } async getLndChannel(): Promise { const ret = await getChannels({ lnd: this.lndClient }); From 345cfabccf2c84fd5f29ad4583849b02ad1ecdac Mon Sep 17 00:00:00 2001 From: Sayo Date: Fri, 17 Jan 2025 20:47:35 +0530 Subject: [PATCH 06/15] Update packages/plugin-lightning/src/providers/lightning.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../plugin-lightning/src/providers/lightning.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/plugin-lightning/src/providers/lightning.ts b/packages/plugin-lightning/src/providers/lightning.ts index 8c61c1c3d4d..17af377fe4a 100644 --- a/packages/plugin-lightning/src/providers/lightning.ts +++ b/packages/plugin-lightning/src/providers/lightning.ts @@ -41,11 +41,14 @@ export class LightningProvider { async createInvoice( createInvoiceArgs: CreateInvoiceArgs ): Promise { - const ret = await createInvoice({ - lnd: this.lndClient, - ...createInvoiceArgs, - }); - return ret; + try { + return await createInvoice({ + lnd: this.lndClient, + ...createInvoiceArgs, + }); + } catch (error) { + throw new Error(`Failed to create invoice: ${error.message}`); + } } async payInvoice(payInvoiceArgs: PayArgs): Promise { const ret = await pay({ From a41be8b4fedff1984b920a07909194cb40fcc157 Mon Sep 17 00:00:00 2001 From: Sayo Date: Sat, 18 Jan 2025 21:27:16 +0530 Subject: [PATCH 07/15] Update payInvoice.ts --- packages/plugin-lightning/src/actions/payInvoice.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugin-lightning/src/actions/payInvoice.ts b/packages/plugin-lightning/src/actions/payInvoice.ts index cf905ddf853..5976a335ebf 100644 --- a/packages/plugin-lightning/src/actions/payInvoice.ts +++ b/packages/plugin-lightning/src/actions/payInvoice.ts @@ -1,7 +1,7 @@ import type { IAgentRuntime, Memory, State } from "@elizaos/core"; import { composeContext, - generateObjectDeprecated, + generateObjectV2, ModelClass, } from "@elizaos/core"; @@ -71,7 +71,7 @@ export const payInvoiceAction = { state, template: payInvoiceTemplate, }); - const content = await generateObjectDeprecated({ + const content = await generateObjectV2({ runtime, context: payInvoiceContext, modelClass: ModelClass.LARGE, From 30f772c17ba8c1dc4ffb958341e181ccf26fba32 Mon Sep 17 00:00:00 2001 From: Sayo Date: Sat, 18 Jan 2025 21:29:36 +0530 Subject: [PATCH 08/15] Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../src/providers/lightning.ts | 28 +++++++++++++------ .../plugin-lightning/src/templates/index.ts | 2 +- packages/plugin-lightning/src/types/index.ts | 11 ++++++-- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/packages/plugin-lightning/src/providers/lightning.ts b/packages/plugin-lightning/src/providers/lightning.ts index 17af377fe4a..75152d52ee3 100644 --- a/packages/plugin-lightning/src/providers/lightning.ts +++ b/packages/plugin-lightning/src/providers/lightning.ts @@ -18,14 +18,21 @@ import { } from "astra-lightning"; import { CreateInvoiceArgs, PayArgs } from "../types"; export class LightningProvider { - lndClient: AuthenticatedLnd; + private lndClient: AuthenticatedLnd; constructor(cert: string, macaroon: string, socket: string) { - const { lnd } = authenticatedLndGrpc({ - cert: cert, - macaroon: macaroon, - socket: socket, - }); - this.lndClient = lnd; + if (!cert || !macaroon || !socket) { + throw new Error('Missing required LND credentials'); + } + try { + const { lnd } = authenticatedLndGrpc({ + cert: cert, + macaroon: macaroon, + socket: socket, + }); + this.lndClient = lnd; + } catch (error) { + throw new Error(`Failed to initialize LND client: ${error.message}`); + } } async getLndIdentity(): Promise { try { @@ -35,8 +42,11 @@ export class LightningProvider { } } async getLndChannel(): Promise { - const ret = await getChannels({ lnd: this.lndClient }); - return ret; + try { + return await getChannels({ lnd: this.lndClient }); + } catch (error) { + throw new Error(`Failed to get LND channels: ${error.message}`); + } } async createInvoice( createInvoiceArgs: CreateInvoiceArgs diff --git a/packages/plugin-lightning/src/templates/index.ts b/packages/plugin-lightning/src/templates/index.ts index 6fa3f72b4a4..c20ae02d89a 100644 --- a/packages/plugin-lightning/src/templates/index.ts +++ b/packages/plugin-lightning/src/templates/index.ts @@ -55,7 +55,7 @@ First, review the recent messages from the conversation: - "outgoing_channel" (optional): This is the Outbound Standard Channel Id String. If not provided, this can be left as "null". 3. **Validation:** - - Ensure "request" is valid and starts with "lnbc". + - Ensure "request" is valid and starts with one of: "lnbc" (mainnet), "lntb" (testnet), "lnbcrt" (regtest), or "lnsb" (signet). - If "outgoing_channel" is present, ensure it is a valid string. 4. **Output:** If all required fields are valid, respond with the following JSON format: diff --git a/packages/plugin-lightning/src/types/index.ts b/packages/plugin-lightning/src/types/index.ts index 40a92c4daed..bb455cea9c0 100644 --- a/packages/plugin-lightning/src/types/index.ts +++ b/packages/plugin-lightning/src/types/index.ts @@ -19,12 +19,19 @@ export type CreateInvoiceArgs = { secret?: string; /** Millitokens */ mtokens?: string; - routes?: any; + routes?: Array<{ + public_key: string; + base_fee_mtokens?: string; + channel?: string; + cltv_delta?: number; + fee_rate?: number; + [key: string]: unknown; + }>; /** Tokens */ tokens?: number; asset_id?: string; peer_pubkey?: string; - tpr?: any; + tpr?: Record; }; export type PayArgs = { From c1cb50182a9819f97c0eb70b87ea502ff20e2fe1 Mon Sep 17 00:00:00 2001 From: Sayo Date: Sat, 18 Jan 2025 21:30:06 +0530 Subject: [PATCH 09/15] Update packages/plugin-lightning/src/actions/payInvoice.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- packages/plugin-lightning/src/actions/payInvoice.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/plugin-lightning/src/actions/payInvoice.ts b/packages/plugin-lightning/src/actions/payInvoice.ts index 5976a335ebf..e8c24e336f7 100644 --- a/packages/plugin-lightning/src/actions/payInvoice.ts +++ b/packages/plugin-lightning/src/actions/payInvoice.ts @@ -102,10 +102,9 @@ export const payInvoiceAction = { } return true; } catch (error) { - const err = error?.[2]?.err; - console.error("Error in payInvoice handler:", err.details); + console.error("Error in payInvoice handler:", error); if (callback) { - callback({ text: `Error: ${err.details}` }); + callback({ text: `Error: ${error.message || 'An error occurred'}` }); } return false; } From 1fbc31a4828d62c9efd362a32c8f06ee327dbc5d Mon Sep 17 00:00:00 2001 From: Sayo Date: Sat, 18 Jan 2025 21:30:15 +0530 Subject: [PATCH 10/15] Update packages/plugin-lightning/src/actions/createInvoice.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- packages/plugin-lightning/src/actions/createInvoice.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-lightning/src/actions/createInvoice.ts b/packages/plugin-lightning/src/actions/createInvoice.ts index 66f32ee8828..a506af8872d 100644 --- a/packages/plugin-lightning/src/actions/createInvoice.ts +++ b/packages/plugin-lightning/src/actions/createInvoice.ts @@ -40,7 +40,7 @@ export const createInvoiceAction = { _message: Memory, state: State, _options: any, - callback?: any + callback?: (response: { text: string; content?: { success: boolean; invoice?: string } }) => void ) => { console.log("CreateInvoice action handler called"); const lightningProvider = await initLightningProvider(runtime); From 1d8b4f86291f299e18f8f979effb7657c32e76ea Mon Sep 17 00:00:00 2001 From: Sayo Date: Sat, 18 Jan 2025 21:33:38 +0530 Subject: [PATCH 11/15] Update payInvoice.ts --- packages/plugin-lightning/src/actions/payInvoice.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/plugin-lightning/src/actions/payInvoice.ts b/packages/plugin-lightning/src/actions/payInvoice.ts index e8c24e336f7..1a7bf96c233 100644 --- a/packages/plugin-lightning/src/actions/payInvoice.ts +++ b/packages/plugin-lightning/src/actions/payInvoice.ts @@ -3,6 +3,7 @@ import { composeContext, generateObjectV2, ModelClass, + elizaLogger } from "@elizaos/core"; import { @@ -62,7 +63,7 @@ export const payInvoiceAction = { _options: any, callback?: any ) => { - console.log("payInvoice action handler called"); + elizaLogger.log("payInvoice action handler called"); const lightningProvider = await initLightningProvider(runtime); const action = new PayInvoiceAction(lightningProvider); @@ -84,7 +85,7 @@ export const payInvoiceAction = { try { const payInvoiceResp = await action.payInvoice(payInvoiceOptions); - console.log("🚀 ~ payInvoiceResp:", payInvoiceResp); + elizaLogger.log("🚀 ~ payInvoiceResp:", payInvoiceResp); if (callback) { let text = ""; @@ -102,7 +103,7 @@ export const payInvoiceAction = { } return true; } catch (error) { - console.error("Error in payInvoice handler:", error); + elizaLogger.error("Error in payInvoice handler:", error); if (callback) { callback({ text: `Error: ${error.message || 'An error occurred'}` }); } From 1f89e062b88c4867c874dbf8e2460507a7963303 Mon Sep 17 00:00:00 2001 From: Sayo Date: Sat, 18 Jan 2025 21:35:52 +0530 Subject: [PATCH 12/15] Update package.json --- packages/plugin-lightning/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-lightning/package.json b/packages/plugin-lightning/package.json index 1c4560323a0..4b05713cac1 100644 --- a/packages/plugin-lightning/package.json +++ b/packages/plugin-lightning/package.json @@ -25,7 +25,7 @@ }, "devDependencies": { "tsup": "8.3.5" - } + }, "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", From d11d079b32e02c3d79164e71f92bfc34310c4cc6 Mon Sep 17 00:00:00 2001 From: jimtracy1007 Date: Mon, 20 Jan 2025 10:35:32 +0800 Subject: [PATCH 13/15] code format --- .../src/actions/createInvoice.ts | 2 +- .../src/actions/payInvoice.ts | 20 +- packages/plugin-lightning/src/index.ts | 4 - .../src/providers/lightning.ts | 2 +- pnpm-lock.yaml | 252 +++++++++++++++++- 5 files changed, 263 insertions(+), 17 deletions(-) diff --git a/packages/plugin-lightning/src/actions/createInvoice.ts b/packages/plugin-lightning/src/actions/createInvoice.ts index 66f32ee8828..af1c4d6d969 100644 --- a/packages/plugin-lightning/src/actions/createInvoice.ts +++ b/packages/plugin-lightning/src/actions/createInvoice.ts @@ -67,7 +67,7 @@ export const createInvoiceAction = { if (callback) { callback({ - text: `Successfully createInvoice ${createInvoiceResp.tokens}\r\nInvoice:${createInvoiceResp.request}`, + text: `Successfully created invoice for ${createInvoiceResp.tokens.toLocaleString()} sats\r\nInvoice: ${createInvoiceResp.request}`, content: { success: true, invoice: createInvoiceResp.request, diff --git a/packages/plugin-lightning/src/actions/payInvoice.ts b/packages/plugin-lightning/src/actions/payInvoice.ts index cf905ddf853..18a6f6d0f25 100644 --- a/packages/plugin-lightning/src/actions/payInvoice.ts +++ b/packages/plugin-lightning/src/actions/payInvoice.ts @@ -84,21 +84,23 @@ export const payInvoiceAction = { try { const payInvoiceResp = await action.payInvoice(payInvoiceOptions); - console.log("🚀 ~ payInvoiceResp:", payInvoiceResp); if (callback) { let text = ""; if (payInvoiceResp.is_confirmed) { - text = `Successfully payInvoice ${content.request} from ${payInvoiceResp.outgoing_channel};\r\n Amount: ${payInvoiceResp.tokens};\r\n Fee: ${payInvoiceResp.fee};\r\n Payment Hash: ${payInvoiceResp.id};`; + callback({ + text: `Successfully paid invoice ${content.request} from ${payInvoiceResp.outgoing_channel};\nAmount: ${payInvoiceResp.tokens};\nFee: ${payInvoiceResp.fee};\nPayment Hash: ${payInvoiceResp.id};`, + content: { success: true } + }); } else { - text = `Failed to payInvoice ${content.request} from ${content.outgoing_channel};\r\n Amount: ${payInvoiceResp.tokens};`; + callback({ + text: `Failed to payInvoice ${content.request} from ${content.outgoing_channel};\r\n Amount: ${payInvoiceResp.tokens};`, + content: { + success: false, + }, + }); } - callback({ - text: text, - content: { - success: true, - }, - }); + } return true; } catch (error) { diff --git a/packages/plugin-lightning/src/index.ts b/packages/plugin-lightning/src/index.ts index 41c582e5fdf..6f224efde67 100644 --- a/packages/plugin-lightning/src/index.ts +++ b/packages/plugin-lightning/src/index.ts @@ -5,14 +5,10 @@ export * from "./types"; import type { Plugin } from "@elizaos/core"; import { createInvoiceAction } from "./actions/createInvoice"; import { payInvoiceAction } from "./actions/payInvoice"; -import { lndProvider } from "./providers/lightning"; export const lightningPlugin: Plugin = { name: "lightning", description: "lightning integration plugin", - providers: [lndProvider], - evaluators: [], - services: [], actions: [createInvoiceAction, payInvoiceAction], }; diff --git a/packages/plugin-lightning/src/providers/lightning.ts b/packages/plugin-lightning/src/providers/lightning.ts index d83121bca65..0877995eefc 100644 --- a/packages/plugin-lightning/src/providers/lightning.ts +++ b/packages/plugin-lightning/src/providers/lightning.ts @@ -71,7 +71,7 @@ export const lndProvider: Provider = { await lightningProvider.getLndIdentity(); const { channels } = await lightningProvider.getLndChannel(); const agentName = state?.agentName || "The agent"; - return `${agentName}'s Lightning Node publickey : ${nodePubkey}\n,Channel count : ${channels.length}`; + return `${agentName}'s Lightning Node publickey: ${nodePubkey}\nChannel count: ${channels.length}`; } catch (error) { console.error("Error in Lightning provider:", error); return null; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 93395a011bd..fda88553f69 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -253,6 +253,9 @@ importers: '@elizaos/plugin-letzai': specifier: workspace:* version: link:../packages/plugin-letzai + '@elizaos/plugin-lightning': + specifier: workspace:* + version: link:../packages/plugin-lightning '@elizaos/plugin-massa': specifier: workspace:* version: link:../packages/plugin-massa @@ -1971,6 +1974,24 @@ importers: specifier: 8.3.5 version: 8.3.5(@swc/core@1.10.7(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0) + packages/plugin-lightning: + dependencies: + '@elizaos/core': + specifier: workspace:* + version: link:../core + '@elizaos/plugin-tee': + specifier: workspace:* + version: link:../plugin-tee + astra-lightning: + specifier: ^1.1.0 + version: 1.1.0 + tsup: + specifier: 8.3.5 + version: 8.3.5(@swc/core@1.10.7(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0) + whatwg-url: + specifier: 7.1.0 + version: 7.1.0 + packages/plugin-massa: dependencies: '@elizaos/core': @@ -6077,6 +6098,10 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + '@grpc/grpc-js@1.12.2': + resolution: {integrity: sha512-bgxdZmgTrJZX50OjyVwz3+mNEnCTNkh3cIqGPWVNeW9jX6bn1ZkU80uPd+67/ZpIJIjRQ9qaHCjhavyoWYxumg==} + engines: {node: '>=12.10.0'} + '@grpc/grpc-js@1.12.5': resolution: {integrity: sha512-d3iiHxdpg5+ZcJ6jnDSOT8Z0O0VMVGy34jAnYLUX8yd36b1qn8f1TwOA/Lc7TsOh03IkPJ38eGI5qD2EjNkoEA==} engines: {node: '>=12.10.0'} @@ -9569,6 +9594,9 @@ packages: '@types/cacheable-request@6.0.3': resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} + '@types/caseless@0.12.5': + resolution: {integrity: sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==} + '@types/chai-subset@1.3.5': resolution: {integrity: sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A==} @@ -9926,6 +9954,9 @@ packages: '@types/react@19.0.4': resolution: {integrity: sha512-3O4QisJDYr1uTUMZHA2YswiQZRq+Pd8D+GdVFYikTutYsTz+QZgWkAPnP7rx9txoI6EXKcPiluMqWPFV3tT9Wg==} + '@types/request@2.48.12': + resolution: {integrity: sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw==} + '@types/resolve@1.20.2': resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} @@ -9965,6 +9996,9 @@ packages: '@types/tar@6.1.13': resolution: {integrity: sha512-IznnlmU5f4WcGTh2ltRu/Ijpmk8wiWXfF0VA4s+HPjHZgvFggk1YaIkbo5krX/zUCzWF8N/l4+W/LNxnvAJ8nw==} + '@types/tough-cookie@4.0.5': + resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} + '@types/trusted-types@2.0.7': resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} @@ -9992,6 +10026,9 @@ packages: '@types/ws@7.4.7': resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} + '@types/ws@8.5.12': + resolution: {integrity: sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==} + '@types/ws@8.5.13': resolution: {integrity: sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==} @@ -11020,6 +11057,10 @@ packages: resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} engines: {node: '>=4'} + astra-lightning@1.1.0: + resolution: {integrity: sha512-uUHw/UdSev08Wkscaud3ektkYWq/wakeoZ6gG12PfLwigCe6by4PsjsCUPtC0wzs1cFh5gDrG7XmtnTPMozvNQ==} + engines: {node: '>=18'} + astring@1.9.0: resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==} hasBin: true @@ -11033,9 +11074,15 @@ packages: async@2.6.4: resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} + async@3.2.4: + resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} + async@3.2.6: resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + asyncjs-util@1.2.12: + resolution: {integrity: sha512-ZuiV9aMltl2Db9AB+4h0esHOc642ktBivOhyV3ZHQ4nHwSPH7KiLIxiPTubO4cyx6aJ1Cb5ASJVHUiTk+6DVQQ==} + asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -11330,6 +11377,10 @@ packages: bintrees@1.0.2: resolution: {integrity: sha512-VOMgTMwjAaUG580SXn3LacVgjurrbMme7ZZNYGSSV7mmtY6QQRh0Eg3pwIcntQ77DErK1L0NxkbetjcoXzVwKw==} + bip174@2.1.1: + resolution: {integrity: sha512-mdFV5+/v0XyNYXjBS6CQPLo9ekCx4gtKZFnJm5PMto7Fs9hTTDpkkzOB7/FtluRI6JbUUAu+snTYfJRgHLZbZQ==} + engines: {node: '>=8.0.0'} + bip174@3.0.0-rc.1: resolution: {integrity: sha512-+8P3BpSairVNF2Nee6Ksdc1etIjWjBOi/MH0MwKtq9YaYp+S2Hk2uvup0e8hCT4IKlS58nXJyyQVmW92zPoD4Q==} engines: {node: '>=18.0.0'} @@ -11347,6 +11398,20 @@ packages: bip39@3.1.0: resolution: {integrity: sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==} + bip66@1.1.5: + resolution: {integrity: sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==} + + bitcoin-ops@1.4.1: + resolution: {integrity: sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow==} + + bitcoinjs-lib@6.1.3: + resolution: {integrity: sha512-TYXs/Qf+GNk2nnsB9HrXWqzFuEgCg0Gx+v3UW3B8VuceFHXVvhT+7hRnTSvwkX0i8rz2rtujeU6gFaDcFqYFDw==} + engines: {node: '>=8.0.0'} + + bitcoinjs-lib@6.1.6: + resolution: {integrity: sha512-Fk8+Vc+e2rMoDU5gXkW9tD+313rhkm5h6N9HfZxXvYU9LedttVvmXKTgd9k5rsQJjkSfsv6XRM8uhJv94SrvcA==} + engines: {node: '>=8.0.0'} + bitcoinjs-lib@7.0.0-rc.0: resolution: {integrity: sha512-7CQgOIbREemKR/NT2uc3uO/fkEy+6CM0sLxboVVY6bv6DbZmPt3gg5Y/hhWgQFeZu5lfTbtVAv32MIxf7lMh4g==} engines: {node: '>=18.0.0'} @@ -11390,6 +11455,20 @@ packages: resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + bolt07@1.8.4: + resolution: {integrity: sha512-UyZRSYmVE8K++Jg1BiJrUkxQak03aS/s7ESKDsBdBPzaTlk2E09Y0JYa9HhWN7MRn48Y2K1doOzkb1Hn6XixZw==} + + bolt07@1.9.4: + resolution: {integrity: sha512-zt+PZPoD8DN/ZaqqKen0B/NiAvWOgbPkj1/XS39CcAdwqGQSW9KG8Cf28m7fzFw+amZAvgG+jzRA1rGj/lDdwA==} + + bolt09@1.0.0: + resolution: {integrity: sha512-J8wh6mRTNnYJuC43iSJRvM2Te0RtO4+Cn0JCgF6q2xWXKWjZjdPV5AGamD8R8C39/Ei6L0I780aFvIZu+bATWw==} + engines: {node: '>=16'} + + bolt09@2.1.0: + resolution: {integrity: sha512-aSLhKEWFUKGFOsQWRXcmiNzVVBCK+Tz4RUYGQZ8U1HFllHzCC68z/iJAYmPgEmyKNuyHz2twS/uku2HKFiWBRg==} + engines: {node: '>=18'} + bonjour-service@1.3.0: resolution: {integrity: sha512-3YuAUiSkWykd+2Azjgyxei8OWf8thdn8AITIog2M4UICzoqfjlqr64WIjEXZllf/W6vK1goqleSR6brGomxQqA==} @@ -11498,6 +11577,9 @@ packages: bs58check@2.1.2: resolution: {integrity: sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==} + bs58check@3.0.1: + resolution: {integrity: sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==} + bs58check@4.0.0: resolution: {integrity: sha512-FsGDOnFg9aVI9erdriULkd/JjEWONV/lQE5aYziB5PoBsXRind56lh8doIZIc9X4HoxT5x4bLjMWN1/NB8Zp5g==} @@ -13177,6 +13259,10 @@ packages: winax: optional: true + ecpair@2.1.0: + resolution: {integrity: sha512-cL/mh3MtJutFOvFc27GPZE2pWL3a3k4YvzUWEOvilnfZVlH3Jwgx/7d6tlD7/75tNk8TG2m+7Kgtz0SI1tWcqw==} + engines: {node: '>=8.0.0'} + ed25519-hd-key@1.1.2: resolution: {integrity: sha512-/0y9y6N7vM6Kj5ASr9J9wcMVDTtygxSOvYX+PJiMD7VcxCx2G03V5bLRl8Dug9EgkLFsLhGqBtQWQRcElEeWTA==} @@ -14953,6 +15039,10 @@ packages: invariant@2.2.4: resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} + invoices@3.0.0: + resolution: {integrity: sha512-/WDTkfU2RMelQpQ54BwZssqGXYNWbPnWkZ/9QV57vAvD3RLdCDbhDuucOGti8CK3sgk8nmhRV6V0WfMrxojMmA==} + engines: {node: '>=16'} + ioredis@5.4.2: resolution: {integrity: sha512-0SZXGNGZ+WzISQ67QDyZ2x0+wVxjjUndtD8oSeik/4ajifeiRufed8fCb8QW8VMyi4MXcS+UO1k/0NGhvq1PAg==} engines: {node: '>=12.22.0'} @@ -18837,6 +18927,10 @@ packages: proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + psbt@3.0.0: + resolution: {integrity: sha512-Gg35WfXAdbVqION9AJ4cO7cdgqR2iL1Dyq00AmvKCosTbm7EQrrMmHGjkWACb7ue9+aaHjMi/UdDG1SZwqA6bg==} + engines: {node: '>=16'} + psl@1.15.0: resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==} @@ -18913,6 +19007,9 @@ packages: pure-rand@6.1.0: resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} + pushdata-bitcoin@1.0.1: + resolution: {integrity: sha512-hw7rcYTJRAl4olM8Owe8x0fBuJJ+WGbMhQuLWOXEMN3PxPCKQHRkhfL+XG0+iXUmSHjkMmb3Ba55Mt21cZc9kQ==} + pvtsutils@1.3.6: resolution: {integrity: sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==} @@ -20625,6 +20722,14 @@ packages: tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} + tiny-secp256k1@2.2.2: + resolution: {integrity: sha512-KP3eqslmiUH9jxhyQuLY+GqI4wt1EiHWNHHqKVUxCZV41+MT+esucaK4mb6Ji0vKWVKBffJ6tlxU83Pq5TIUwg==} + engines: {node: '>=14.0.0'} + + tiny-secp256k1@2.2.3: + resolution: {integrity: sha512-SGcL07SxcPN2nGKHTCvRMkQLYPSoeFcvArUSCYtjVARiFAWU44cCIqYS0mYAU6nY7XfvwURuTIGo2Omt3ZQr0Q==} + engines: {node: '>=14.0.0'} + tiny-warning@1.0.3: resolution: {integrity: sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==} @@ -21030,6 +21135,10 @@ packages: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} + type-fest@4.26.1: + resolution: {integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==} + engines: {node: '>=16'} + type-fest@4.32.0: resolution: {integrity: sha512-rfgpoi08xagF3JSdtJlCwMq9DGNDE0IMh3Mkpc1wUypg9vPi786AiqeBBKcqvIkq42azsBM85N490fyZjeUftw==} engines: {node: '>=16'} @@ -21140,6 +21249,10 @@ packages: resolution: {integrity: sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==} engines: {node: '>=8'} + uint8array-tools@0.0.7: + resolution: {integrity: sha512-vrrNZJiusLWoFWBqz5Y5KMCgP9W9hnjZHzZiZRT8oNAkq3d5Z5Oe76jAvVVSRh4U8GGR90N2X1dWtrhvx6L8UQ==} + engines: {node: '>=14.0.0'} + uint8array-tools@0.0.8: resolution: {integrity: sha512-xS6+s8e0Xbx++5/0L+yyexukU7pz//Yg6IHg3BKhXotg1JcYtgxVcUctQ0HxLByiJzpAkNFawz1Nz5Xadzo82g==} engines: {node: '>=14.0.0'} @@ -21572,6 +21685,9 @@ packages: varint@6.0.0: resolution: {integrity: sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==} + varuint-bitcoin@1.1.2: + resolution: {integrity: sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==} + varuint-bitcoin@2.0.0: resolution: {integrity: sha512-6QZbU/rHO2ZQYpWFDALCDSRsXbAs1VOEmXAxtbtjLtKuMJ/FQ8YbhfxlaiKv5nklci0M6lZtlZyxo9Q+qNnyog==} @@ -27663,6 +27779,11 @@ snapshots: dependencies: graphql: 16.10.0 + '@grpc/grpc-js@1.12.2': + dependencies: + '@grpc/proto-loader': 0.7.13 + '@js-sdsl/ordered-map': 4.4.2 + '@grpc/grpc-js@1.12.5': dependencies: '@grpc/proto-loader': 0.7.13 @@ -32746,7 +32867,7 @@ snapshots: dependencies: '@babel/runtime': 7.26.0 '@noble/curves': 1.8.0 - '@noble/hashes': 1.5.0 + '@noble/hashes': 1.7.0 '@solana/buffer-layout': 4.0.1 agentkeepalive: 4.6.0 bigint-buffer: 1.1.5 @@ -33444,6 +33565,8 @@ snapshots: '@types/node': 20.17.9 '@types/responselike': 1.0.3 + '@types/caseless@0.12.5': {} + '@types/chai-subset@1.3.5': dependencies: '@types/chai': 4.3.20 @@ -33860,6 +33983,13 @@ snapshots: dependencies: csstype: 3.1.3 + '@types/request@2.48.12': + dependencies: + '@types/caseless': 0.12.5 + '@types/node': 20.17.9 + '@types/tough-cookie': 4.0.5 + form-data: 2.5.2 + '@types/resolve@1.20.2': {} '@types/responselike@1.0.3': @@ -33907,6 +34037,8 @@ snapshots: '@types/node': 20.17.9 minipass: 4.2.8 + '@types/tough-cookie@4.0.5': {} + '@types/trusted-types@2.0.7': {} '@types/unist@2.0.11': {} @@ -33929,6 +34061,10 @@ snapshots: dependencies: '@types/node': 20.17.9 + '@types/ws@8.5.12': + dependencies: + '@types/node': 20.17.9 + '@types/ws@8.5.13': dependencies: '@types/node': 20.17.9 @@ -35839,6 +35975,25 @@ snapshots: dependencies: tslib: 2.8.1 + astra-lightning@1.1.0: + dependencies: + '@grpc/grpc-js': 1.12.2 + '@grpc/proto-loader': 0.7.13 + '@types/node': 22.7.5 + '@types/request': 2.48.12 + '@types/ws': 8.5.12 + async: 3.2.6 + asyncjs-util: 1.2.12 + bitcoinjs-lib: 6.1.6 + bn.js: 5.2.1 + bolt07: 1.9.4 + bolt09: 2.1.0 + ecpair: 2.1.0 + invoices: 3.0.0 + psbt: 3.0.0 + tiny-secp256k1: 2.2.3 + type-fest: 4.26.1 + astring@1.9.0: {} async-retry@1.3.3: @@ -35851,8 +36006,14 @@ snapshots: dependencies: lodash: 4.17.21 + async@3.2.4: {} + async@3.2.6: {} + asyncjs-util@1.2.12: + dependencies: + async: 3.2.4 + asynckit@0.4.0: {} at-least-node@1.0.0: {} @@ -36262,6 +36423,8 @@ snapshots: bintrees@1.0.2: {} + bip174@2.1.1: {} + bip174@3.0.0-rc.1: dependencies: uint8array-tools: 0.0.9 @@ -36290,6 +36453,30 @@ snapshots: dependencies: '@noble/hashes': 1.3.0 + bip66@1.1.5: + dependencies: + safe-buffer: 5.2.1 + + bitcoin-ops@1.4.1: {} + + bitcoinjs-lib@6.1.3: + dependencies: + '@noble/hashes': 1.7.0 + bech32: 2.0.0 + bip174: 2.1.1 + bs58check: 3.0.1 + typeforce: 1.18.0 + varuint-bitcoin: 1.1.2 + + bitcoinjs-lib@6.1.6: + dependencies: + '@noble/hashes': 1.7.0 + bech32: 2.0.0 + bip174: 2.1.1 + bs58check: 3.0.1 + typeforce: 1.18.0 + varuint-bitcoin: 1.1.2 + bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.3): dependencies: '@noble/hashes': 1.7.0 @@ -36350,6 +36537,18 @@ snapshots: transitivePeerDependencies: - supports-color + bolt07@1.8.4: + dependencies: + bn.js: 5.2.1 + + bolt07@1.9.4: + dependencies: + bn.js: 5.2.1 + + bolt09@1.0.0: {} + + bolt09@2.1.0: {} + bonjour-service@1.3.0: dependencies: fast-deep-equal: 3.1.3 @@ -36568,6 +36767,11 @@ snapshots: create-hash: 1.2.0 safe-buffer: 5.2.1 + bs58check@3.0.1: + dependencies: + '@noble/hashes': 1.7.0 + bs58: 5.0.0 + bs58check@4.0.0: dependencies: '@noble/hashes': 1.7.0 @@ -38528,6 +38732,12 @@ snapshots: - utf-8-validate - zod + ecpair@2.1.0: + dependencies: + randombytes: 2.1.0 + typeforce: 1.18.0 + wif: 2.0.6 + ed25519-hd-key@1.1.2: dependencies: bip39: 3.0.2 @@ -39605,7 +39815,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.4 + debug: 4.4.0(supports-color@5.5.0) get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -41189,6 +41399,15 @@ snapshots: dependencies: loose-envify: 1.4.0 + invoices@3.0.0: + dependencies: + bech32: 2.0.0 + bitcoinjs-lib: 6.1.3 + bn.js: 5.2.1 + bolt07: 1.8.4 + bolt09: 1.0.0 + tiny-secp256k1: 2.2.2 + ioredis@5.4.2: dependencies: '@ioredis/commands': 1.2.0 @@ -46360,6 +46579,15 @@ snapshots: proxy-from-env@1.1.0: {} + psbt@3.0.0: + dependencies: + bip66: 1.1.5 + bitcoin-ops: 1.4.1 + bitcoinjs-lib: 6.1.3 + bn.js: 5.2.1 + pushdata-bitcoin: 1.0.1 + varuint-bitcoin: 1.1.2 + psl@1.15.0: dependencies: punycode: 2.3.1 @@ -46481,6 +46709,10 @@ snapshots: pure-rand@6.1.0: {} + pushdata-bitcoin@1.0.1: + dependencies: + bitcoin-ops: 1.4.1 + pvtsutils@1.3.6: dependencies: tslib: 2.8.1 @@ -48666,6 +48898,14 @@ snapshots: tiny-invariant@1.3.3: {} + tiny-secp256k1@2.2.2: + dependencies: + uint8array-tools: 0.0.7 + + tiny-secp256k1@2.2.3: + dependencies: + uint8array-tools: 0.0.7 + tiny-warning@1.0.3: {} tinybench@2.9.0: {} @@ -49172,6 +49412,8 @@ snapshots: type-fest@2.19.0: {} + type-fest@4.26.1: {} + type-fest@4.32.0: {} type-is@1.6.18: @@ -49298,6 +49540,8 @@ snapshots: dependencies: '@lukeed/csprng': 1.1.0 + uint8array-tools@0.0.7: {} + uint8array-tools@0.0.8: {} uint8array-tools@0.0.9: {} @@ -49710,6 +49954,10 @@ snapshots: varint@6.0.0: {} + varuint-bitcoin@1.1.2: + dependencies: + safe-buffer: 5.2.1 + varuint-bitcoin@2.0.0: dependencies: uint8array-tools: 0.0.8 From 21b46c333784d1726b7e994ab53816523bbd2855 Mon Sep 17 00:00:00 2001 From: jimtracy1007 Date: Mon, 20 Jan 2025 11:42:05 +0800 Subject: [PATCH 14/15] fix:pr 2429 code format --- packages/plugin-lightning/README.md | 12 +- .../src/actions/createInvoice.ts | 17 +- .../src/providers/lightning.ts | 17 +- packages/plugin-lightning/src/types/index.ts | 60 +- .../plugin-pyth-data/src/types/zodSchemas.ts | 566 +++++++++--------- pnpm-lock.yaml | 20 +- 6 files changed, 342 insertions(+), 350 deletions(-) diff --git a/packages/plugin-lightning/README.md b/packages/plugin-lightning/README.md index df765223e08..d0d3ad9a07d 100644 --- a/packages/plugin-lightning/README.md +++ b/packages/plugin-lightning/README.md @@ -35,7 +35,7 @@ Make a new off-chain invoice. Examples: -``` +```text "Help me create an invoice for 1000sats" "Create an invoice for 1000sats" @@ -50,7 +50,7 @@ Make an off-chain payment. Examples: -``` +```text "Pay invoice lnbcrt10u1pncndjvpp58y77adkngcz3ypx6t39j245ydvk2vu67c8ugvegee3gt5wgs7yjqdxvdec82c33wdmnq73s0qcxwurrxp4nquncxe4h56m9xu6xwetyd3mrq6ehdguxkd35wuurgarex4u8gefkdsekgdtnddehxurrxecxvhmwwp6kyvfexekhxwtv8paryvnpwsuhxdryvachwangw3kn2atddq6kzvrvwfcxzanewce8ja34d43k56rkweu8jdtcwv68zmrsvdescqzzsxqrrsssp5q3hv38wfprvaazzwf8c4t33tzjcac5xz94sk8muehmn5szqaw6ks9qxpqysgqt5pjhna4922s8ayzgu5rh8clx7psp2culdr5r6cxxxqzs3e5ep345p45vggg0qegt6fu3prdrqgpd8v70l9wdhekt8gex5e8pqvxg2sp97fkmd" @@ -62,11 +62,3 @@ Examples: - Store your LND_TLS_CERT and LND_MACAROON securely using environment variables - Test with small amounts first - Use regtest for initial testing - -## License - -MIT - -``` - -``` diff --git a/packages/plugin-lightning/src/actions/createInvoice.ts b/packages/plugin-lightning/src/actions/createInvoice.ts index 95020945a88..a19e7cf7e46 100644 --- a/packages/plugin-lightning/src/actions/createInvoice.ts +++ b/packages/plugin-lightning/src/actions/createInvoice.ts @@ -3,16 +3,17 @@ import { composeContext, generateObjectDeprecated, ModelClass, + elizaLogger, } from "@elizaos/core"; import { initLightningProvider, LightningProvider, } from "../providers/lightning"; + +import { createInvoiceTemplate } from "../templates"; import { CreateInvoiceResult } from "astra-lightning"; import { CreateInvoiceArgs } from "../types"; -import { createInvoiceTemplate } from "../templates"; - export { createInvoiceTemplate }; export class CreateInvoiceAction { @@ -21,7 +22,7 @@ export class CreateInvoiceAction { } async createInvoice( - params: CreateInvoiceArgs + params: CreateInvoiceArgs, ): Promise { if (!params.tokens) { throw new Error("tokens is required."); @@ -40,9 +41,12 @@ export const createInvoiceAction = { _message: Memory, state: State, _options: any, - callback?: (response: { text: string; content?: { success: boolean; invoice?: string } }) => void + callback?: (response: { + text: string; + content?: { success: boolean; invoice?: string }; + }) => void, ) => { - console.log("CreateInvoice action handler called"); + elizaLogger.log("CreateInvoice action handler called"); const lightningProvider = await initLightningProvider(runtime); const action = new CreateInvoiceAction(lightningProvider); @@ -57,7 +61,7 @@ export const createInvoiceAction = { modelClass: ModelClass.LARGE, }); - const createInvoiceOptions: CreateInvoiceArgs = { + const createInvoiceOptions = { tokens: content.tokens, }; @@ -76,7 +80,6 @@ export const createInvoiceAction = { } return true; } catch (error) { - console.error("Error in createInvoice handler:", error.message); if (callback) { callback({ text: `Error: ${error.message}` }); } diff --git a/packages/plugin-lightning/src/providers/lightning.ts b/packages/plugin-lightning/src/providers/lightning.ts index ac3d2d07f68..bc1ebdd02cc 100644 --- a/packages/plugin-lightning/src/providers/lightning.ts +++ b/packages/plugin-lightning/src/providers/lightning.ts @@ -3,6 +3,7 @@ import { type Provider, type Memory, type State, + elizaLogger, } from "@elizaos/core"; import { authenticatedLndGrpc, @@ -11,17 +12,17 @@ import { GetChannelsResult, getIdentity, getChannels, - CreateInvoiceResult, createInvoice, pay, PayResult, + CreateInvoiceResult, } from "astra-lightning"; -import { CreateInvoiceArgs, PayArgs } from "../types"; +import { PayArgs, CreateInvoiceArgs } from "../types"; export class LightningProvider { private lndClient: AuthenticatedLnd; constructor(cert: string, macaroon: string, socket: string) { if (!cert || !macaroon || !socket) { - throw new Error('Missing required LND credentials'); + throw new Error("Missing required LND credentials"); } try { const { lnd } = authenticatedLndGrpc({ @@ -31,7 +32,9 @@ export class LightningProvider { }); this.lndClient = lnd; } catch (error) { - throw new Error(`Failed to initialize LND client: ${error.message}`); + throw new Error( + `Failed to initialize LND client: ${error.message}`, + ); } } async getLndIdentity(): Promise { @@ -49,7 +52,7 @@ export class LightningProvider { } } async createInvoice( - createInvoiceArgs: CreateInvoiceArgs + createInvoiceArgs: CreateInvoiceArgs, ): Promise { try { return await createInvoice({ @@ -80,7 +83,7 @@ export const lndProvider: Provider = { async get( runtime: IAgentRuntime, _message: Memory, - state?: State + state?: State, ): Promise { try { const lightningProvider = await initLightningProvider(runtime); @@ -90,7 +93,7 @@ export const lndProvider: Provider = { const agentName = state?.agentName || "The agent"; return `${agentName}'s Lightning Node publickey: ${nodePubkey}\nChannel count: ${channels.length}`; } catch (error) { - console.error("Error in Lightning provider:", error); + elizaLogger.error("Error in Lightning provider:", error.message); return null; } }, diff --git a/packages/plugin-lightning/src/types/index.ts b/packages/plugin-lightning/src/types/index.ts index bb455cea9c0..38f4b6ccab1 100644 --- a/packages/plugin-lightning/src/types/index.ts +++ b/packages/plugin-lightning/src/types/index.ts @@ -1,37 +1,31 @@ + export type CreateInvoiceArgs = { - /** CLTV Delta */ - cltv_delta?: number; - /** Invoice Description */ - description?: string; - /** Hashed Description of Payment Hex String */ - description_hash?: string; - /** Expires At ISO 8601 Date */ - expires_at?: string; - /** Use Blinded Paths For Inbound Routes */ - is_encrypting_routes?: boolean; - /** Is Fallback Address Included */ - is_fallback_included?: boolean; - /** Is Fallback Address Nested */ - is_fallback_nested?: boolean; - /** Invoice Includes Private Channels */ - is_including_private_channels?: boolean; - /** Payment Preimage Hex String */ - secret?: string; - /** Millitokens */ - mtokens?: string; - routes?: Array<{ - public_key: string; - base_fee_mtokens?: string; - channel?: string; - cltv_delta?: number; - fee_rate?: number; - [key: string]: unknown; - }>; - /** Tokens */ - tokens?: number; - asset_id?: string; - peer_pubkey?: string; - tpr?: Record; + /** CLTV Delta */ + cltv_delta?: number; + /** Invoice Description */ + description?: string; + /** Hashed Description of Payment Hex String */ + description_hash?: string; + /** Expires At ISO 8601 Date */ + expires_at?: string; + /** Use Blinded Paths For Inbound Routes */ + is_encrypting_routes?: boolean; + /** Is Fallback Address Included */ + is_fallback_included?: boolean; + /** Is Fallback Address Nested */ + is_fallback_nested?: boolean; + /** Invoice Includes Private Channels */ + is_including_private_channels?: boolean; + /** Payment Preimage Hex String */ + secret?: string; + /** Millitokens */ + mtokens?: string; + routes?: any; + /** Tokens */ + tokens?: number; + asset_id?: string; + peer_pubkey?: string; + tpr?: any; }; export type PayArgs = { diff --git a/packages/plugin-pyth-data/src/types/zodSchemas.ts b/packages/plugin-pyth-data/src/types/zodSchemas.ts index e570156d5e2..46627c14d91 100644 --- a/packages/plugin-pyth-data/src/types/zodSchemas.ts +++ b/packages/plugin-pyth-data/src/types/zodSchemas.ts @@ -2,322 +2,322 @@ import { makeApi, Zodios, type ZodiosOptions } from "@zodios/core"; import { z } from "zod"; const AssetType = z.enum([ - "crypto", - "fx", - "equity", - "metal", - "rates", - "crypto_redemption_rate", + "crypto", + "fx", + "equity", + "metal", + "rates", + "crypto_redemption_rate", ]); const asset_type = AssetType.nullish(); const RpcPriceIdentifier = z.string(); const PriceFeedMetadata = z - .object({ attributes: z.record(z.string()), id: RpcPriceIdentifier }) - .passthrough(); + .object({ attributes: z.record(z.string()), id: RpcPriceIdentifier }) + .passthrough(); const PriceIdInput = z.string(); const EncodingType = z.enum(["hex", "base64"]); const BinaryUpdate = z - .object({ data: z.array(z.string()), encoding: EncodingType }) - .passthrough(); + .object({ data: z.array(z.string()), encoding: EncodingType }) + .passthrough(); const RpcPrice = z - .object({ - conf: z.string(), - expo: z.number().int(), - price: z.string(), - publish_time: z.number().int(), - }) - .passthrough(); + .object({ + conf: z.string(), + expo: z.number().int(), + price: z.string(), + publish_time: z.number().int(), + }) + .passthrough(); const RpcPriceFeedMetadataV2 = z - .object({ - prev_publish_time: z.number().int().nullable(), - proof_available_time: z.number().int().nullable(), - slot: z.number().int().gte(0).nullable(), - }) - .partial() - .passthrough(); + .object({ + prev_publish_time: z.number().int().nullable(), + proof_available_time: z.number().int().nullable(), + slot: z.number().int().gte(0).nullable(), + }) + .partial() + .passthrough(); const ParsedPriceUpdate = z - .object({ - ema_price: RpcPrice, - id: RpcPriceIdentifier, - metadata: RpcPriceFeedMetadataV2, - price: RpcPrice, - }) - .passthrough(); + .object({ + ema_price: RpcPrice, + id: RpcPriceIdentifier, + metadata: RpcPriceFeedMetadataV2, + price: RpcPrice, + }) + .passthrough(); const PriceUpdate = z - .object({ - binary: BinaryUpdate, - parsed: z.array(ParsedPriceUpdate).nullish(), - }) - .passthrough(); + .object({ + binary: BinaryUpdate, + parsed: z.array(ParsedPriceUpdate).nullish(), + }) + .passthrough(); const ParsedPublisherStakeCap = z - .object({ cap: z.number().int().gte(0), publisher: z.string() }) - .passthrough(); + .object({ cap: z.number().int().gte(0), publisher: z.string() }) + .passthrough(); const ParsedPublisherStakeCapsUpdate = z - .object({ publisher_stake_caps: z.array(ParsedPublisherStakeCap) }) - .passthrough(); + .object({ publisher_stake_caps: z.array(ParsedPublisherStakeCap) }) + .passthrough(); const LatestPublisherStakeCapsUpdateDataResponse = z - .object({ - binary: BinaryUpdate, - parsed: z.array(ParsedPublisherStakeCapsUpdate).nullish(), - }) - .passthrough(); + .object({ + binary: BinaryUpdate, + parsed: z.array(ParsedPublisherStakeCapsUpdate).nullish(), + }) + .passthrough(); const ParsedPriceFeedTwap = z - .object({ - down_slots_ratio: z.string(), - end_timestamp: z.number().int(), - id: RpcPriceIdentifier, - start_timestamp: z.number().int(), - twap: RpcPrice, - }) - .passthrough(); + .object({ + down_slots_ratio: z.string(), + end_timestamp: z.number().int(), + id: RpcPriceIdentifier, + start_timestamp: z.number().int(), + twap: RpcPrice, + }) + .passthrough(); const TwapsResponse = z - .object({ - binary: BinaryUpdate, - parsed: z.array(ParsedPriceFeedTwap).nullish(), - }) - .passthrough(); + .object({ + binary: BinaryUpdate, + parsed: z.array(ParsedPriceFeedTwap).nullish(), + }) + .passthrough(); export const schemas = { - AssetType, - asset_type, - RpcPriceIdentifier, - PriceFeedMetadata, - PriceIdInput, - EncodingType, - BinaryUpdate, - RpcPrice, - RpcPriceFeedMetadataV2, - ParsedPriceUpdate, - PriceUpdate, - ParsedPublisherStakeCap, - ParsedPublisherStakeCapsUpdate, - LatestPublisherStakeCapsUpdateDataResponse, - ParsedPriceFeedTwap, - TwapsResponse, + AssetType, + asset_type, + RpcPriceIdentifier, + PriceFeedMetadata, + PriceIdInput, + EncodingType, + BinaryUpdate, + RpcPrice, + RpcPriceFeedMetadataV2, + ParsedPriceUpdate, + PriceUpdate, + ParsedPublisherStakeCap, + ParsedPublisherStakeCapsUpdate, + LatestPublisherStakeCapsUpdateDataResponse, + ParsedPriceFeedTwap, + TwapsResponse, }; const endpoints = makeApi([ - { - method: "get", - path: "/v2/price_feeds", - alias: "price_feeds_metadata", - description: `Get the set of price feeds. + { + method: "get", + path: "/v2/price_feeds", + alias: "price_feeds_metadata", + description: `Get the set of price feeds. This endpoint fetches all price feeds from the Pyth network. It can be filtered by asset type and query string.`, - requestFormat: "json", - parameters: [ - { - name: "query", - type: "Query", - schema: z.string().nullish(), - }, - { - name: "asset_type", - type: "Query", - schema: asset_type, - }, - ], - response: z.array(PriceFeedMetadata), - }, - { - method: "get", - path: "/v2/updates/price/:publish_time", - alias: "timestamp_price_updates", - description: `Get the latest price updates by price feed id. + requestFormat: "json", + parameters: [ + { + name: "query", + type: "Query", + schema: z.string().nullish(), + }, + { + name: "asset_type", + type: "Query", + schema: asset_type, + }, + ], + response: z.array(PriceFeedMetadata), + }, + { + method: "get", + path: "/v2/updates/price/:publish_time", + alias: "timestamp_price_updates", + description: `Get the latest price updates by price feed id. Given a collection of price feed ids, retrieve the latest Pyth price for each price feed.`, - requestFormat: "json", - parameters: [ - { - name: "publish_time", - type: "Path", - schema: z.number().int(), - }, - { - name: "ids[]", - type: "Query", - schema: z.array(PriceIdInput), - }, - { - name: "encoding", - type: "Query", - schema: z.enum(["hex", "base64"]).optional(), - }, - { - name: "parsed", - type: "Query", - schema: z.boolean().optional(), - }, - { - name: "ignore_invalid_price_ids", - type: "Query", - schema: z.boolean().optional(), - }, - ], - response: PriceUpdate, - errors: [ - { - status: 404, - description: `Price ids not found`, - schema: z.void(), - }, - ], - }, - { - method: "get", - path: "/v2/updates/price/latest", - alias: "latest_price_updates", - description: `Get the latest price updates by price feed id. + requestFormat: "json", + parameters: [ + { + name: "publish_time", + type: "Path", + schema: z.number().int(), + }, + { + name: "ids[]", + type: "Query", + schema: z.array(PriceIdInput), + }, + { + name: "encoding", + type: "Query", + schema: z.enum(["hex", "base64"]).optional(), + }, + { + name: "parsed", + type: "Query", + schema: z.boolean().optional(), + }, + { + name: "ignore_invalid_price_ids", + type: "Query", + schema: z.boolean().optional(), + }, + ], + response: PriceUpdate, + errors: [ + { + status: 404, + description: `Price ids not found`, + schema: z.void(), + }, + ], + }, + { + method: "get", + path: "/v2/updates/price/latest", + alias: "latest_price_updates", + description: `Get the latest price updates by price feed id. Given a collection of price feed ids, retrieve the latest Pyth price for each price feed.`, - requestFormat: "json", - parameters: [ - { - name: "ids[]", - type: "Query", - schema: z.array(PriceIdInput), - }, - { - name: "encoding", - type: "Query", - schema: z.enum(["hex", "base64"]).optional(), - }, - { - name: "parsed", - type: "Query", - schema: z.boolean().optional(), - }, - { - name: "ignore_invalid_price_ids", - type: "Query", - schema: z.boolean().optional(), - }, - ], - response: PriceUpdate, - errors: [ - { - status: 404, - description: `Price ids not found`, - schema: z.void(), - }, - ], - }, - { - method: "get", - path: "/v2/updates/price/stream", - alias: "price_stream_sse_handler", - description: `SSE route handler for streaming price updates.`, - requestFormat: "json", - parameters: [ - { - name: "ids[]", - type: "Query", - schema: z.array(PriceIdInput), - }, - { - name: "encoding", - type: "Query", - schema: z.enum(["hex", "base64"]).optional(), - }, - { - name: "parsed", - type: "Query", - schema: z.boolean().optional(), - }, - { - name: "allow_unordered", - type: "Query", - schema: z.boolean().optional(), - }, - { - name: "benchmarks_only", - type: "Query", - schema: z.boolean().optional(), - }, - { - name: "ignore_invalid_price_ids", - type: "Query", - schema: z.boolean().optional(), - }, - ], - response: PriceUpdate, - errors: [ - { - status: 404, - description: `Price ids not found`, - schema: z.void(), - }, - ], - }, - { - method: "get", - path: "/v2/updates/publisher_stake_caps/latest", - alias: "latest_publisher_stake_caps", - description: `Get the most recent publisher stake caps update data.`, - requestFormat: "json", - parameters: [ - { - name: "encoding", - type: "Query", - schema: z.enum(["hex", "base64"]).optional(), - }, - { - name: "parsed", - type: "Query", - schema: z.boolean().optional(), - }, - ], - response: LatestPublisherStakeCapsUpdateDataResponse, - }, - { - method: "get", - path: "/v2/updates/twap/:window_seconds/latest", - alias: "latest_twaps", - description: `Get the latest TWAP by price feed id with a custom time window. + requestFormat: "json", + parameters: [ + { + name: "ids[]", + type: "Query", + schema: z.array(PriceIdInput), + }, + { + name: "encoding", + type: "Query", + schema: z.enum(["hex", "base64"]).optional(), + }, + { + name: "parsed", + type: "Query", + schema: z.boolean().optional(), + }, + { + name: "ignore_invalid_price_ids", + type: "Query", + schema: z.boolean().optional(), + }, + ], + response: PriceUpdate, + errors: [ + { + status: 404, + description: `Price ids not found`, + schema: z.void(), + }, + ], + }, + { + method: "get", + path: "/v2/updates/price/stream", + alias: "price_stream_sse_handler", + description: `SSE route handler for streaming price updates.`, + requestFormat: "json", + parameters: [ + { + name: "ids[]", + type: "Query", + schema: z.array(PriceIdInput), + }, + { + name: "encoding", + type: "Query", + schema: z.enum(["hex", "base64"]).optional(), + }, + { + name: "parsed", + type: "Query", + schema: z.boolean().optional(), + }, + { + name: "allow_unordered", + type: "Query", + schema: z.boolean().optional(), + }, + { + name: "benchmarks_only", + type: "Query", + schema: z.boolean().optional(), + }, + { + name: "ignore_invalid_price_ids", + type: "Query", + schema: z.boolean().optional(), + }, + ], + response: PriceUpdate, + errors: [ + { + status: 404, + description: `Price ids not found`, + schema: z.void(), + }, + ], + }, + { + method: "get", + path: "/v2/updates/publisher_stake_caps/latest", + alias: "latest_publisher_stake_caps", + description: `Get the most recent publisher stake caps update data.`, + requestFormat: "json", + parameters: [ + { + name: "encoding", + type: "Query", + schema: z.enum(["hex", "base64"]).optional(), + }, + { + name: "parsed", + type: "Query", + schema: z.boolean().optional(), + }, + ], + response: LatestPublisherStakeCapsUpdateDataResponse, + }, + { + method: "get", + path: "/v2/updates/twap/:window_seconds/latest", + alias: "latest_twaps", + description: `Get the latest TWAP by price feed id with a custom time window. Given a collection of price feed ids, retrieve the latest Pyth TWAP price for each price feed.`, - requestFormat: "json", - parameters: [ - { - name: "window_seconds", - type: "Path", - schema: z.number().int().gte(0), - }, - { - name: "ids[]", - type: "Query", - schema: z.array(PriceIdInput), - }, - { - name: "encoding", - type: "Query", - schema: z.enum(["hex", "base64"]).optional(), - }, - { - name: "parsed", - type: "Query", - schema: z.boolean().optional(), - }, - { - name: "ignore_invalid_price_ids", - type: "Query", - schema: z.boolean().optional(), - }, - ], - response: TwapsResponse, - errors: [ - { - status: 404, - description: `Price ids not found`, - schema: z.void(), - }, - ], - }, + requestFormat: "json", + parameters: [ + { + name: "window_seconds", + type: "Path", + schema: z.number().int().gte(0), + }, + { + name: "ids[]", + type: "Query", + schema: z.array(PriceIdInput), + }, + { + name: "encoding", + type: "Query", + schema: z.enum(["hex", "base64"]).optional(), + }, + { + name: "parsed", + type: "Query", + schema: z.boolean().optional(), + }, + { + name: "ignore_invalid_price_ids", + type: "Query", + schema: z.boolean().optional(), + }, + ], + response: TwapsResponse, + errors: [ + { + status: 404, + description: `Price ids not found`, + schema: z.void(), + }, + ], + }, ]); export const api = new Zodios(endpoints); export function createApiClient(baseUrl: string, options?: ZodiosOptions) { - return new Zodios(baseUrl, endpoints, options); + return new Zodios(baseUrl, endpoints, options); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f527a81e287..ebf76c21e2e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -827,13 +827,13 @@ importers: dependencies: '@discordjs/opus': specifier: github:discordjs/opus - version: https://codeload.github.com/discordjs/opus/tar.gz/31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13) + version: git+https://git@github.com:discordjs/opus.git#31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13) '@discordjs/rest': specifier: 2.4.0 version: 2.4.0 '@discordjs/voice': specifier: 0.17.0 - version: 0.17.0(@discordjs/opus@https://codeload.github.com/discordjs/opus/tar.gz/31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13))(bufferutil@4.0.9)(ffmpeg-static@5.2.0)(utf-8-validate@6.0.5) + version: 0.17.0(@discordjs/opus@git+https://git@github.com:discordjs/opus.git#31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13))(bufferutil@4.0.9)(ffmpeg-static@5.2.0)(utf-8-validate@6.0.5) '@elizaos/core': specifier: workspace:* version: link:../core @@ -848,7 +848,7 @@ importers: version: 0.7.15 prism-media: specifier: 1.3.5 - version: 1.3.5(@discordjs/opus@https://codeload.github.com/discordjs/opus/tar.gz/31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13))(ffmpeg-static@5.2.0) + version: 1.3.5(@discordjs/opus@git+https://git@github.com:discordjs/opus.git#31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13))(ffmpeg-static@5.2.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -5380,8 +5380,8 @@ packages: resolution: {integrity: sha512-YJOVVZ545x24mHzANfYoy0BJX5PDyeZlpiJjDkUBM/V/Ao7TFX9lcUvCN4nr0tbr5ubeaXxtEBILUrHtTphVeQ==} hasBin: true - '@discordjs/opus@https://codeload.github.com/discordjs/opus/tar.gz/31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02': - resolution: {tarball: https://codeload.github.com/discordjs/opus/tar.gz/31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02} + '@discordjs/opus@git+https://git@github.com:discordjs/opus.git#31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02': + resolution: {commit: 31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02, repo: git@github.com:discordjs/opus.git, type: git} version: 0.9.0 engines: {node: '>=12.0.0'} @@ -27798,7 +27798,7 @@ snapshots: - encoding - supports-color - '@discordjs/opus@https://codeload.github.com/discordjs/opus/tar.gz/31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13)': + '@discordjs/opus@git+https://git@github.com:discordjs/opus.git#31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13)': dependencies: '@discordjs/node-pre-gyp': 0.4.5(encoding@0.1.13) node-addon-api: 8.3.0 @@ -27820,11 +27820,11 @@ snapshots: '@discordjs/util@1.1.1': {} - '@discordjs/voice@0.17.0(@discordjs/opus@https://codeload.github.com/discordjs/opus/tar.gz/31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13))(bufferutil@4.0.9)(ffmpeg-static@5.2.0)(utf-8-validate@6.0.5)': + '@discordjs/voice@0.17.0(@discordjs/opus@git+https://git@github.com:discordjs/opus.git#31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13))(bufferutil@4.0.9)(ffmpeg-static@5.2.0)(utf-8-validate@6.0.5)': dependencies: '@types/ws': 8.5.13 discord-api-types: 0.37.83 - prism-media: 1.3.5(@discordjs/opus@https://codeload.github.com/discordjs/opus/tar.gz/31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13))(ffmpeg-static@5.2.0) + prism-media: 1.3.5(@discordjs/opus@git+https://git@github.com:discordjs/opus.git#31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13))(ffmpeg-static@5.2.0) tslib: 2.8.1 ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) transitivePeerDependencies: @@ -51313,9 +51313,9 @@ snapshots: pretty-time@1.1.0: {} - prism-media@1.3.5(@discordjs/opus@https://codeload.github.com/discordjs/opus/tar.gz/31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13))(ffmpeg-static@5.2.0): + prism-media@1.3.5(@discordjs/opus@git+https://git@github.com:discordjs/opus.git#31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13))(ffmpeg-static@5.2.0): optionalDependencies: - '@discordjs/opus': https://codeload.github.com/discordjs/opus/tar.gz/31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13) + '@discordjs/opus': git+https://git@github.com:discordjs/opus.git#31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13) ffmpeg-static: 5.2.0 prism-react-renderer@2.3.1(react@18.3.1): From a3919929a48332d442dce566d98307c0f6540ea0 Mon Sep 17 00:00:00 2001 From: Sayo Date: Mon, 20 Jan 2025 12:52:12 +0530 Subject: [PATCH 15/15] Update pnpm-lock.yaml --- pnpm-lock.yaml | 609 ++++++++++++++++++++++++++++--------------------- 1 file changed, 353 insertions(+), 256 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bb3cf0d7713..e620a245f76 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,19 +14,19 @@ importers: dependencies: '@0glabs/0g-ts-sdk': specifier: 0.2.1 - version: 0.2.1(bufferutil@4.0.9)(ethers@6.13.4(bufferutil@4.0.9)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) + version: 0.2.1(bufferutil@4.0.9)(ethers@6.13.4(bufferutil@4.0.9)(utf-8-validate@6.0.5))(utf-8-validate@6.0.5) '@coinbase/coinbase-sdk': specifier: 0.10.0 - version: 0.10.0(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.24.1) + version: 0.10.0(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@6.0.5)(zod@3.24.1) '@deepgram/sdk': specifier: ^3.9.0 - version: 3.9.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) + version: 3.9.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@6.0.5) '@injectivelabs/sdk-ts': specifier: ^1.14.33 - version: 1.14.33(@types/react@19.0.7)(bufferutil@4.0.9)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(utf-8-validate@5.0.10) + version: 1.14.33(@types/react@19.0.7)(bufferutil@4.0.9)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(utf-8-validate@6.0.5) '@vitest/eslint-plugin': specifier: 1.0.1 - version: 1.0.1(@typescript-eslint/utils@8.20.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3)(vitest@2.1.5(@types/node@20.17.9)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + version: 1.0.1(@typescript-eslint/utils@8.20.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.10.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@6.0.5))(terser@5.37.0)) amqplib: specifier: 0.10.5 version: 0.10.5 @@ -57,7 +57,7 @@ importers: version: 1.9.4 '@commitlint/cli': specifier: 18.6.1 - version: 18.6.1(@types/node@20.17.9)(typescript@5.6.3) + version: 18.6.1(@types/node@22.10.7)(typescript@5.6.3) '@commitlint/config-conventional': specifier: 18.6.3 version: 18.6.3 @@ -75,7 +75,7 @@ importers: version: 9.1.7 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.17.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)) + version: 29.7.0(@types/node@22.10.7)(babel-plugin-macros@3.1.0) lerna: specifier: 8.1.5 version: 8.1.5(@swc/core@1.10.7(@swc/helpers@0.5.15))(babel-plugin-macros@3.1.0)(encoding@0.1.13) @@ -93,13 +93,13 @@ importers: version: 5.6.3 viem: specifier: 2.21.58 - version: 2.21.58(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.24.1) + version: 2.21.58(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@6.0.5)(zod@3.24.1) vite: specifier: 5.4.11 - version: 5.4.11(@types/node@20.17.9)(terser@5.37.0) + version: 5.4.11(@types/node@22.10.7)(terser@5.37.0) vitest: specifier: 2.1.5 - version: 2.1.5(@types/node@20.17.9)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.5(@types/node@22.10.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@6.0.5))(terser@5.37.0) agent: dependencies: @@ -271,6 +271,9 @@ importers: '@elizaos/plugin-letzai': specifier: workspace:* version: link:../packages/plugin-letzai + '@elizaos/plugin-lightning': + specifier: workspace:* + version: link:../packages/plugin-lightning '@elizaos/plugin-massa': specifier: workspace:* version: link:../packages/plugin-massa @@ -2276,6 +2279,25 @@ importers: specifier: 8.3.5 version: 8.3.5(@swc/core@1.10.7(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.5.1)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0) + packages/plugin-lightning: + dependencies: + '@elizaos/core': + specifier: workspace:* + version: link:../core + '@elizaos/plugin-tee': + specifier: workspace:* + version: link:../plugin-tee + astra-lightning: + specifier: ^1.1.0 + version: 1.1.0 + whatwg-url: + specifier: 7.1.0 + version: 7.1.0 + devDependencies: + tsup: + specifier: 8.3.5 + version: 8.3.5(@swc/core@1.10.7(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.5.1)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0) + packages/plugin-massa: dependencies: '@elizaos/core': @@ -2875,6 +2897,13 @@ importers: zod: specifier: 3.23.8 version: 3.23.8 + devDependencies: + '@vitest/coverage-v8': + specifier: ^1.2.1 + version: 1.6.0(vitest@1.2.1(@types/node@22.10.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + vitest: + specifier: ^1.2.1 + version: 1.2.1(@types/node@22.10.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) packages/plugin-sgx: dependencies: @@ -6842,6 +6871,10 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + '@grpc/grpc-js@1.12.2': + resolution: {integrity: sha512-bgxdZmgTrJZX50OjyVwz3+mNEnCTNkh3cIqGPWVNeW9jX6bn1ZkU80uPd+67/ZpIJIjRQ9qaHCjhavyoWYxumg==} + engines: {node: '>=12.10.0'} + '@grpc/grpc-js@1.12.5': resolution: {integrity: sha512-d3iiHxdpg5+ZcJ6jnDSOT8Z0O0VMVGy34jAnYLUX8yd36b1qn8f1TwOA/Lc7TsOh03IkPJ38eGI5qD2EjNkoEA==} engines: {node: '>=12.10.0'} @@ -11146,6 +11179,9 @@ packages: '@types/ws@7.4.7': resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} + '@types/ws@8.5.12': + resolution: {integrity: sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==} + '@types/ws@8.5.13': resolution: {integrity: sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==} @@ -11369,6 +11405,11 @@ packages: peerDependencies: vitest: ^1.0.0 + '@vitest/coverage-v8@1.6.0': + resolution: {integrity: sha512-KvapcbMY/8GYIG0rlwwOKCVNRc0OL20rrhFkg/CHNzncV03TE2XWvO5w9uZYoxNiMEBacAJt3unSOiZ7svePew==} + peerDependencies: + vitest: 1.6.0 + '@vitest/coverage-v8@2.1.5': resolution: {integrity: sha512-/RoopB7XGW7UEkUndRXF87A9CwkoZAJW01pj8/3pgmDVsjMH2IKy6H1A38po9tmUlwhSyYs0az82rbKd9Yaynw==} peerDependencies: @@ -12279,6 +12320,10 @@ packages: resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} engines: {node: '>=4'} + astra-lightning@1.1.0: + resolution: {integrity: sha512-uUHw/UdSev08Wkscaud3ektkYWq/wakeoZ6gG12PfLwigCe6by4PsjsCUPtC0wzs1cFh5gDrG7XmtnTPMozvNQ==} + engines: {node: '>=18'} + astring@1.9.0: resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==} hasBin: true @@ -12292,9 +12337,15 @@ packages: async@2.6.4: resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} + async@3.2.4: + resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} + async@3.2.6: resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + asyncjs-util@1.2.12: + resolution: {integrity: sha512-ZuiV9aMltl2Db9AB+4h0esHOc642ktBivOhyV3ZHQ4nHwSPH7KiLIxiPTubO4cyx6aJ1Cb5ASJVHUiTk+6DVQQ==} + asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -12599,6 +12650,10 @@ packages: bintrees@1.0.2: resolution: {integrity: sha512-VOMgTMwjAaUG580SXn3LacVgjurrbMme7ZZNYGSSV7mmtY6QQRh0Eg3pwIcntQ77DErK1L0NxkbetjcoXzVwKw==} + bip174@2.1.1: + resolution: {integrity: sha512-mdFV5+/v0XyNYXjBS6CQPLo9ekCx4gtKZFnJm5PMto7Fs9hTTDpkkzOB7/FtluRI6JbUUAu+snTYfJRgHLZbZQ==} + engines: {node: '>=8.0.0'} + bip174@3.0.0-rc.1: resolution: {integrity: sha512-+8P3BpSairVNF2Nee6Ksdc1etIjWjBOi/MH0MwKtq9YaYp+S2Hk2uvup0e8hCT4IKlS58nXJyyQVmW92zPoD4Q==} engines: {node: '>=18.0.0'} @@ -12619,6 +12674,20 @@ packages: bip39@3.1.0: resolution: {integrity: sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==} + bip66@1.1.5: + resolution: {integrity: sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==} + + bitcoin-ops@1.4.1: + resolution: {integrity: sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow==} + + bitcoinjs-lib@6.1.3: + resolution: {integrity: sha512-TYXs/Qf+GNk2nnsB9HrXWqzFuEgCg0Gx+v3UW3B8VuceFHXVvhT+7hRnTSvwkX0i8rz2rtujeU6gFaDcFqYFDw==} + engines: {node: '>=8.0.0'} + + bitcoinjs-lib@6.1.6: + resolution: {integrity: sha512-Fk8+Vc+e2rMoDU5gXkW9tD+313rhkm5h6N9HfZxXvYU9LedttVvmXKTgd9k5rsQJjkSfsv6XRM8uhJv94SrvcA==} + engines: {node: '>=8.0.0'} + bitcoinjs-lib@7.0.0-rc.0: resolution: {integrity: sha512-7CQgOIbREemKR/NT2uc3uO/fkEy+6CM0sLxboVVY6bv6DbZmPt3gg5Y/hhWgQFeZu5lfTbtVAv32MIxf7lMh4g==} engines: {node: '>=18.0.0'} @@ -12668,6 +12737,20 @@ packages: resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + bolt07@1.8.4: + resolution: {integrity: sha512-UyZRSYmVE8K++Jg1BiJrUkxQak03aS/s7ESKDsBdBPzaTlk2E09Y0JYa9HhWN7MRn48Y2K1doOzkb1Hn6XixZw==} + + bolt07@1.9.4: + resolution: {integrity: sha512-zt+PZPoD8DN/ZaqqKen0B/NiAvWOgbPkj1/XS39CcAdwqGQSW9KG8Cf28m7fzFw+amZAvgG+jzRA1rGj/lDdwA==} + + bolt09@1.0.0: + resolution: {integrity: sha512-J8wh6mRTNnYJuC43iSJRvM2Te0RtO4+Cn0JCgF6q2xWXKWjZjdPV5AGamD8R8C39/Ei6L0I780aFvIZu+bATWw==} + engines: {node: '>=16'} + + bolt09@2.1.0: + resolution: {integrity: sha512-aSLhKEWFUKGFOsQWRXcmiNzVVBCK+Tz4RUYGQZ8U1HFllHzCC68z/iJAYmPgEmyKNuyHz2twS/uku2HKFiWBRg==} + engines: {node: '>=18'} + bonjour-service@1.3.0: resolution: {integrity: sha512-3YuAUiSkWykd+2Azjgyxei8OWf8thdn8AITIog2M4UICzoqfjlqr64WIjEXZllf/W6vK1goqleSR6brGomxQqA==} @@ -12776,6 +12859,9 @@ packages: bs58check@2.1.2: resolution: {integrity: sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==} + bs58check@3.0.1: + resolution: {integrity: sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==} + bs58check@4.0.0: resolution: {integrity: sha512-FsGDOnFg9aVI9erdriULkd/JjEWONV/lQE5aYziB5PoBsXRind56lh8doIZIc9X4HoxT5x4bLjMWN1/NB8Zp5g==} @@ -14504,6 +14590,10 @@ packages: winax: optional: true + ecpair@2.1.0: + resolution: {integrity: sha512-cL/mh3MtJutFOvFc27GPZE2pWL3a3k4YvzUWEOvilnfZVlH3Jwgx/7d6tlD7/75tNk8TG2m+7Kgtz0SI1tWcqw==} + engines: {node: '>=8.0.0'} + ed25519-hd-key@1.1.2: resolution: {integrity: sha512-/0y9y6N7vM6Kj5ASr9J9wcMVDTtygxSOvYX+PJiMD7VcxCx2G03V5bLRl8Dug9EgkLFsLhGqBtQWQRcElEeWTA==} @@ -16360,6 +16450,10 @@ packages: peerDependencies: reflect-metadata: ~0.2.2 + invoices@3.0.0: + resolution: {integrity: sha512-/WDTkfU2RMelQpQ54BwZssqGXYNWbPnWkZ/9QV57vAvD3RLdCDbhDuucOGti8CK3sgk8nmhRV6V0WfMrxojMmA==} + engines: {node: '>=16'} + ioredis@5.4.2: resolution: {integrity: sha512-0SZXGNGZ+WzISQ67QDyZ2x0+wVxjjUndtD8oSeik/4ajifeiRufed8fCb8QW8VMyi4MXcS+UO1k/0NGhvq1PAg==} engines: {node: '>=12.22.0'} @@ -17018,6 +17112,9 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true @@ -20357,6 +20454,10 @@ packages: engines: {node: '>= 0.10'} hasBin: true + psbt@3.0.0: + resolution: {integrity: sha512-Gg35WfXAdbVqION9AJ4cO7cdgqR2iL1Dyq00AmvKCosTbm7EQrrMmHGjkWACb7ue9+aaHjMi/UdDG1SZwqA6bg==} + engines: {node: '>=16'} + psl@1.15.0: resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==} @@ -20433,6 +20534,9 @@ packages: pure-rand@6.1.0: resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} + pushdata-bitcoin@1.0.1: + resolution: {integrity: sha512-hw7rcYTJRAl4olM8Owe8x0fBuJJ+WGbMhQuLWOXEMN3PxPCKQHRkhfL+XG0+iXUmSHjkMmb3Ba55Mt21cZc9kQ==} + pvtsutils@1.3.6: resolution: {integrity: sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==} @@ -21938,6 +22042,9 @@ packages: strip-literal@1.3.0: resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} + strip-literal@2.1.1: + resolution: {integrity: sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==} + strnum@1.0.5: resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} @@ -22290,6 +22397,14 @@ packages: tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} + tiny-secp256k1@2.2.2: + resolution: {integrity: sha512-KP3eqslmiUH9jxhyQuLY+GqI4wt1EiHWNHHqKVUxCZV41+MT+esucaK4mb6Ji0vKWVKBffJ6tlxU83Pq5TIUwg==} + engines: {node: '>=14.0.0'} + + tiny-secp256k1@2.2.3: + resolution: {integrity: sha512-SGcL07SxcPN2nGKHTCvRMkQLYPSoeFcvArUSCYtjVARiFAWU44cCIqYS0mYAU6nY7XfvwURuTIGo2Omt3ZQr0Q==} + engines: {node: '>=14.0.0'} + tiny-warning@1.0.3: resolution: {integrity: sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==} @@ -22759,6 +22874,10 @@ packages: resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==} engines: {node: '>=14.16'} + type-fest@4.26.1: + resolution: {integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==} + engines: {node: '>=16'} + type-fest@4.32.0: resolution: {integrity: sha512-rfgpoi08xagF3JSdtJlCwMq9DGNDE0IMh3Mkpc1wUypg9vPi786AiqeBBKcqvIkq42azsBM85N490fyZjeUftw==} engines: {node: '>=16'} @@ -22869,6 +22988,10 @@ packages: resolution: {integrity: sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==} engines: {node: '>=8'} + uint8array-tools@0.0.7: + resolution: {integrity: sha512-vrrNZJiusLWoFWBqz5Y5KMCgP9W9hnjZHzZiZRT8oNAkq3d5Z5Oe76jAvVVSRh4U8GGR90N2X1dWtrhvx6L8UQ==} + engines: {node: '>=14.0.0'} + uint8array-tools@0.0.8: resolution: {integrity: sha512-xS6+s8e0Xbx++5/0L+yyexukU7pz//Yg6IHg3BKhXotg1JcYtgxVcUctQ0HxLByiJzpAkNFawz1Nz5Xadzo82g==} engines: {node: '>=14.0.0'} @@ -23315,6 +23438,9 @@ packages: varint@6.0.0: resolution: {integrity: sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==} + varuint-bitcoin@1.1.2: + resolution: {integrity: sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==} + varuint-bitcoin@2.0.0: resolution: {integrity: sha512-6QZbU/rHO2ZQYpWFDALCDSRsXbAs1VOEmXAxtbtjLtKuMJ/FQ8YbhfxlaiKv5nklci0M6lZtlZyxo9Q+qNnyog==} @@ -24280,18 +24406,6 @@ packages: snapshots: - '@0glabs/0g-ts-sdk@0.2.1(bufferutil@4.0.9)(ethers@6.13.4(bufferutil@4.0.9)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10)': - dependencies: - '@ethersproject/bytes': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - ethers: 6.13.4(bufferutil@4.0.9)(utf-8-validate@5.0.10) - open-jsonrpc-provider: 0.2.1(bufferutil@4.0.9)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - debug - - supports-color - - utf-8-validate - '@0glabs/0g-ts-sdk@0.2.1(bufferutil@4.0.9)(ethers@6.13.4(bufferutil@4.0.9)(utf-8-validate@6.0.5))(utf-8-validate@6.0.5)': dependencies: '@ethersproject/bytes': 5.7.0 @@ -24424,7 +24538,7 @@ snapshots: '@acuminous/bitsyntax@0.1.2': dependencies: buffer-more-ints: 1.0.0 - debug: 4.4.0 + debug: 4.4.0(supports-color@5.5.0) safe-buffer: 5.1.2 transitivePeerDependencies: - supports-color @@ -25592,7 +25706,7 @@ snapshots: '@babel/traverse': 7.26.5 '@babel/types': 7.26.5 convert-source-map: 2.0.0 - debug: 4.4.0 + debug: 4.4.0(supports-color@5.5.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -26372,7 +26486,7 @@ snapshots: '@babel/parser': 7.26.5 '@babel/template': 7.25.9 '@babel/types': 7.26.5 - debug: 4.4.0 + debug: 4.4.0(supports-color@5.5.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -26634,7 +26748,7 @@ snapshots: - typescript - utf-8-validate - '@coinbase/coinbase-sdk@0.10.0(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.24.1)': + '@coinbase/coinbase-sdk@0.10.0(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@6.0.5)(zod@3.24.1)': dependencies: '@scure/bip32': 1.6.2 abitype: 1.0.8(typescript@5.6.3)(zod@3.24.1) @@ -26645,10 +26759,10 @@ snapshots: bip39: 3.1.0 decimal.js: 10.4.3 dotenv: 16.4.7 - ethers: 6.13.4(bufferutil@4.0.9)(utf-8-validate@5.0.10) + ethers: 6.13.4(bufferutil@4.0.9)(utf-8-validate@6.0.5) node-jose: 2.2.0 secp256k1: 5.0.1 - viem: 2.21.58(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.24.1) + viem: 2.21.58(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@6.0.5)(zod@3.24.1) transitivePeerDependencies: - bufferutil - debug @@ -26688,11 +26802,11 @@ snapshots: '@colors/colors@1.5.0': optional: true - '@commitlint/cli@18.6.1(@types/node@20.17.9)(typescript@5.6.3)': + '@commitlint/cli@18.6.1(@types/node@22.10.7)(typescript@5.6.3)': dependencies: '@commitlint/format': 18.6.1 '@commitlint/lint': 18.6.1 - '@commitlint/load': 18.6.1(@types/node@20.17.9)(typescript@5.6.3) + '@commitlint/load': 18.6.1(@types/node@22.10.7)(typescript@5.6.3) '@commitlint/read': 18.6.1 '@commitlint/types': 18.6.1 execa: 5.1.1 @@ -26742,7 +26856,7 @@ snapshots: '@commitlint/rules': 18.6.1 '@commitlint/types': 18.6.1 - '@commitlint/load@18.6.1(@types/node@20.17.9)(typescript@5.6.3)': + '@commitlint/load@18.6.1(@types/node@22.10.7)(typescript@5.6.3)': dependencies: '@commitlint/config-validator': 18.6.1 '@commitlint/execute-rule': 18.6.1 @@ -26750,7 +26864,7 @@ snapshots: '@commitlint/types': 18.6.1 chalk: 4.1.2 cosmiconfig: 8.3.6(typescript@5.6.3) - cosmiconfig-typescript-loader: 5.1.0(@types/node@20.17.9)(cosmiconfig@8.3.6(typescript@5.6.3))(typescript@5.6.3) + cosmiconfig-typescript-loader: 5.1.0(@types/node@22.10.7)(cosmiconfig@8.3.6(typescript@5.6.3))(typescript@5.6.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -27609,14 +27723,14 @@ snapshots: dependencies: dayjs: 1.11.13 - '@deepgram/sdk@3.9.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)': + '@deepgram/sdk@3.9.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@6.0.5)': dependencies: '@deepgram/captions': 1.2.0 '@types/node': 18.19.71 cross-fetch: 3.2.0(encoding@0.1.13) deepmerge: 4.3.1 events: 3.3.0 - ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) transitivePeerDependencies: - bufferutil - encoding @@ -29443,7 +29557,7 @@ snapshots: '@eslint/config-array@0.19.1': dependencies: '@eslint/object-schema': 2.1.5 - debug: 4.4.0 + debug: 4.4.0(supports-color@5.5.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -29473,7 +29587,7 @@ snapshots: '@eslint/eslintrc@3.2.0': dependencies: ajv: 6.12.6 - debug: 4.4.0 + debug: 4.4.0(supports-color@5.5.0) espree: 10.3.0 globals: 14.0.0 ignore: 5.3.2 @@ -30152,6 +30266,11 @@ snapshots: dependencies: graphql: 16.10.0 + '@grpc/grpc-js@1.12.2': + dependencies: + '@grpc/proto-loader': 0.7.13 + '@js-sdsl/ordered-map': 4.4.2 + '@grpc/grpc-js@1.12.5': dependencies: '@grpc/proto-loader': 0.7.13 @@ -30437,12 +30556,12 @@ snapshots: protobufjs: 7.4.0 rxjs: 7.8.1 - '@injectivelabs/sdk-ts@1.14.33(@types/react@19.0.7)(bufferutil@4.0.9)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(utf-8-validate@5.0.10)': + '@injectivelabs/sdk-ts@1.14.33(@types/react@19.0.7)(bufferutil@4.0.9)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(utf-8-validate@6.0.5)': dependencies: '@apollo/client': 3.12.6(@types/react@19.0.7)(graphql@16.10.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@cosmjs/amino': 0.32.4 '@cosmjs/proto-signing': 0.32.4 - '@cosmjs/stargate': 0.32.4(bufferutil@4.0.9)(utf-8-validate@5.0.10) + '@cosmjs/stargate': 0.32.4(bufferutil@4.0.9)(utf-8-validate@6.0.5) '@ethersproject/bytes': 5.7.0 '@injectivelabs/core-proto-ts': 1.13.4 '@injectivelabs/exceptions': 1.14.33(google-protobuf@3.21.4) @@ -30463,7 +30582,7 @@ snapshots: bip39: 3.1.0 cosmjs-types: 0.9.0 ethereumjs-util: 7.1.5 - ethers: 6.13.4(bufferutil@4.0.9)(utf-8-validate@5.0.10) + ethers: 6.13.4(bufferutil@4.0.9)(utf-8-validate@6.0.5) google-protobuf: 3.21.4 graphql: 16.10.0 http-status-codes: 2.3.0 @@ -30915,41 +31034,6 @@ snapshots: jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3))': - dependencies: - '@jest/console': 29.7.0 - '@jest/reporters': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 20.17.9 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - ci-info: 3.9.0 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.17.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)) - jest-haste-map: 29.7.0 - jest-message-util: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-resolve-dependencies: 29.7.0 - jest-runner: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - jest-watcher: 29.7.0 - micromatch: 4.0.8 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-ansi: 6.0.1 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - ts-node - '@jest/core@29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.7.3))': dependencies: '@jest/console': 29.7.0 @@ -38328,6 +38412,10 @@ snapshots: dependencies: '@types/node': 20.17.9 + '@types/ws@8.5.12': + dependencies: + '@types/node': 20.17.9 + '@types/ws@8.5.13': dependencies: '@types/node': 20.17.9 @@ -38637,7 +38725,7 @@ snapshots: dependencies: '@typescript-eslint/types': 8.20.0 '@typescript-eslint/visitor-keys': 8.20.0 - debug: 4.4.0 + debug: 4.4.0(supports-color@5.5.0) fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 @@ -38802,6 +38890,25 @@ snapshots: transitivePeerDependencies: - supports-color + '@vitest/coverage-v8@1.6.0(vitest@1.2.1(@types/node@22.10.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + dependencies: + '@ampproject/remapping': 2.3.0 + '@bcoe/v8-coverage': 0.2.3 + debug: 4.4.0(supports-color@5.5.0) + istanbul-lib-coverage: 3.2.2 + istanbul-lib-report: 3.0.1 + istanbul-lib-source-maps: 5.0.6 + istanbul-reports: 3.1.7 + magic-string: 0.30.17 + magicast: 0.3.5 + picocolors: 1.1.1 + std-env: 3.8.0 + strip-literal: 2.1.1 + test-exclude: 6.0.0 + vitest: 1.2.1(@types/node@22.10.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + transitivePeerDependencies: + - supports-color + '@vitest/coverage-v8@2.1.5(vitest@3.0.2(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: '@ampproject/remapping': 2.3.0 @@ -38838,13 +38945,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitest/eslint-plugin@1.0.1(@typescript-eslint/utils@8.20.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3)(vitest@2.1.5(@types/node@20.17.9)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@vitest/eslint-plugin@1.0.1(@typescript-eslint/utils@8.20.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.10.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@6.0.5))(terser@5.37.0))': dependencies: eslint: 9.18.0(jiti@2.4.2) optionalDependencies: '@typescript-eslint/utils': 8.20.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3) typescript: 5.6.3 - vitest: 2.1.5(@types/node@20.17.9)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + vitest: 2.1.5(@types/node@22.10.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@6.0.5))(terser@5.37.0) '@vitest/expect@0.34.6': dependencies: @@ -38900,14 +39007,6 @@ snapshots: optionalDependencies: vite: 5.4.11(@types/node@22.10.7)(terser@5.37.0) - '@vitest/mocker@2.1.5(vite@5.4.11(@types/node@20.17.9)(terser@5.37.0))': - dependencies: - '@vitest/spy': 2.1.5 - estree-walker: 3.0.3 - magic-string: 0.30.17 - optionalDependencies: - vite: 5.4.11(@types/node@20.17.9)(terser@5.37.0) - '@vitest/mocker@2.1.5(vite@5.4.11(@types/node@22.10.7)(terser@5.37.0))': dependencies: '@vitest/spy': 2.1.5 @@ -40082,7 +40181,7 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.4.0 + debug: 4.4.0(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -40578,6 +40677,25 @@ snapshots: dependencies: tslib: 2.8.1 + astra-lightning@1.1.0: + dependencies: + '@grpc/grpc-js': 1.12.2 + '@grpc/proto-loader': 0.7.13 + '@types/node': 22.7.5 + '@types/request': 2.48.12 + '@types/ws': 8.5.12 + async: 3.2.6 + asyncjs-util: 1.2.12 + bitcoinjs-lib: 6.1.6 + bn.js: 5.2.1 + bolt07: 1.9.4 + bolt09: 2.1.0 + ecpair: 2.1.0 + invoices: 3.0.0 + psbt: 3.0.0 + tiny-secp256k1: 2.2.3 + type-fest: 4.26.1 + astring@1.9.0: {} async-retry@1.3.3: @@ -40590,8 +40708,14 @@ snapshots: dependencies: lodash: 4.17.21 + async@3.2.4: {} + async@3.2.6: {} + asyncjs-util@1.2.12: + dependencies: + async: 3.2.4 + asynckit@0.4.0: {} at-least-node@1.0.0: {} @@ -40684,13 +40808,6 @@ snapshots: transitivePeerDependencies: - debug - axios@0.27.2: - dependencies: - follow-redirects: 1.15.9 - form-data: 4.0.1 - transitivePeerDependencies: - - debug - axios@0.27.2(debug@4.3.4): dependencies: follow-redirects: 1.15.9(debug@4.3.4) @@ -40739,7 +40856,7 @@ snapshots: axios@1.7.9: dependencies: - follow-redirects: 1.15.9 + follow-redirects: 1.15.9(debug@4.3.4) form-data: 4.0.1 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -41027,6 +41144,8 @@ snapshots: bintrees@1.0.2: {} + bip174@2.1.1: {} + bip174@3.0.0-rc.1: dependencies: uint8array-tools: 0.0.9 @@ -41057,6 +41176,30 @@ snapshots: dependencies: '@noble/hashes': 1.3.0 + bip66@1.1.5: + dependencies: + safe-buffer: 5.2.1 + + bitcoin-ops@1.4.1: {} + + bitcoinjs-lib@6.1.3: + dependencies: + '@noble/hashes': 1.7.1 + bech32: 2.0.0 + bip174: 2.1.1 + bs58check: 3.0.1 + typeforce: 1.18.0 + varuint-bitcoin: 1.1.2 + + bitcoinjs-lib@6.1.6: + dependencies: + '@noble/hashes': 1.7.1 + bech32: 2.0.0 + bip174: 2.1.1 + bs58check: 3.0.1 + typeforce: 1.18.0 + varuint-bitcoin: 1.1.2 + bitcoinjs-lib@7.0.0-rc.0(typescript@5.7.3): dependencies: '@noble/hashes': 1.7.1 @@ -41123,6 +41266,18 @@ snapshots: transitivePeerDependencies: - supports-color + bolt07@1.8.4: + dependencies: + bn.js: 5.2.1 + + bolt07@1.9.4: + dependencies: + bn.js: 5.2.1 + + bolt09@1.0.0: {} + + bolt09@2.1.0: {} + bonjour-service@1.3.0: dependencies: fast-deep-equal: 3.1.3 @@ -41341,6 +41496,11 @@ snapshots: create-hash: 1.2.0 safe-buffer: 5.2.1 + bs58check@3.0.1: + dependencies: + '@noble/hashes': 1.7.1 + bs58: 5.0.0 + bs58check@4.0.0: dependencies: '@noble/hashes': 1.7.1 @@ -42219,9 +42379,9 @@ snapshots: dependencies: layout-base: 2.0.1 - cosmiconfig-typescript-loader@5.1.0(@types/node@20.17.9)(cosmiconfig@8.3.6(typescript@5.6.3))(typescript@5.6.3): + cosmiconfig-typescript-loader@5.1.0(@types/node@22.10.7)(cosmiconfig@8.3.6(typescript@5.6.3))(typescript@5.6.3): dependencies: - '@types/node': 20.17.9 + '@types/node': 22.10.7 cosmiconfig: 8.3.6(typescript@5.6.3) jiti: 1.21.7 typescript: 5.6.3 @@ -42303,21 +42463,6 @@ snapshots: safe-buffer: 5.2.1 sha.js: 2.4.11 - create-jest@29.7.0(@types/node@20.17.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)): - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.17.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)) - jest-util: 29.7.0 - prompts: 2.4.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - create-jest@29.7.0(@types/node@20.17.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.7.3)): dependencies: '@jest/types': 29.6.3 @@ -42914,10 +43059,6 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.4.0: - dependencies: - ms: 2.1.3 - debug@4.4.0(supports-color@5.5.0): dependencies: ms: 2.1.3 @@ -43351,6 +43492,12 @@ snapshots: - utf-8-validate - zod + ecpair@2.1.0: + dependencies: + randombytes: 2.1.0 + typeforce: 1.18.0 + wif: 2.0.6 + ed25519-hd-key@1.1.2: dependencies: bip39: 3.0.2 @@ -44026,7 +44173,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.0 + debug: 4.4.0(supports-color@5.5.0) escape-string-regexp: 4.0.0 eslint-scope: 8.2.0 eslint-visitor-keys: 4.2.0 @@ -44515,7 +44662,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.4 + debug: 4.4.0(supports-color@5.5.0) get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -44804,8 +44951,6 @@ snapshots: async: 0.2.10 which: 1.3.1 - follow-redirects@1.15.9: {} - follow-redirects@1.15.9(debug@4.3.4): optionalDependencies: debug: 4.3.4 @@ -45891,7 +46036,7 @@ snapshots: http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.3 - debug: 4.4.0 + debug: 4.4.0(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -45949,14 +46094,14 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.4.0 + debug: 4.4.0(supports-color@5.5.0) transitivePeerDependencies: - supports-color https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.3 - debug: 4.4.0 + debug: 4.4.0(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -46179,6 +46324,15 @@ snapshots: '@inversifyjs/core': 1.3.5(reflect-metadata@0.2.2) reflect-metadata: 0.2.2 + invoices@3.0.0: + dependencies: + bech32: 2.0.0 + bitcoinjs-lib: 6.1.3 + bn.js: 5.2.1 + bolt07: 1.8.4 + bolt09: 1.0.0 + tiny-secp256k1: 2.2.2 + ioredis@5.4.2: dependencies: '@ioredis/commands': 1.2.0 @@ -46599,7 +46753,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.4.0 + debug: 4.4.0(supports-color@5.5.0) istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -46716,25 +46870,6 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@20.17.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)): - dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)) - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.17.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)) - exit: 0.1.2 - import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.17.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)) - jest-util: 29.7.0 - jest-validate: 29.7.0 - yargs: 17.7.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - jest-cli@29.7.0(@types/node@20.17.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.7.3)): dependencies: '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.7.3)) @@ -46792,37 +46927,6 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@20.17.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)): - dependencies: - '@babel/core': 7.26.0 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.26.0) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0(babel-plugin-macros@3.1.0) - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.8 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 20.17.9 - ts-node: 10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - jest-config@29.7.0(@types/node@20.17.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.7.3)): dependencies: '@babel/core': 7.26.0 @@ -47167,18 +47271,6 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@20.17.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)): - dependencies: - '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)) - '@jest/types': 29.6.3 - import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.17.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)) - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - jest@29.7.0(@types/node@20.17.9)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.7.3)): dependencies: '@jest/core': 29.7.0(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.7.3)) @@ -47277,6 +47369,8 @@ snapshots: js-tokens@4.0.0: {} + js-tokens@9.0.1: {} + js-yaml@3.14.1: dependencies: argparse: 1.0.10 @@ -49802,18 +49896,6 @@ snapshots: platform: 1.3.6 protobufjs: 7.4.0 - open-jsonrpc-provider@0.2.1(bufferutil@4.0.9)(utf-8-validate@5.0.10): - dependencies: - axios: 0.27.2 - reconnecting-websocket: 4.4.0 - websocket: 1.0.35 - ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) - transitivePeerDependencies: - - bufferutil - - debug - - supports-color - - utf-8-validate - open-jsonrpc-provider@0.2.1(bufferutil@4.0.9)(utf-8-validate@6.0.5): dependencies: axios: 0.27.2(debug@4.3.4) @@ -51567,6 +51649,15 @@ snapshots: dependencies: event-stream: 3.3.4 + psbt@3.0.0: + dependencies: + bip66: 1.1.5 + bitcoin-ops: 1.4.1 + bitcoinjs-lib: 6.1.3 + bn.js: 5.2.1 + pushdata-bitcoin: 1.0.1 + varuint-bitcoin: 1.1.2 + psl@1.15.0: dependencies: punycode: 2.3.1 @@ -51702,6 +51793,10 @@ snapshots: pure-rand@6.1.0: {} + pushdata-bitcoin@1.0.1: + dependencies: + bitcoin-ops: 1.4.1 + pvtsutils@1.3.6: dependencies: tslib: 2.8.1 @@ -53091,7 +53186,7 @@ snapshots: socks-proxy-agent@8.0.5: dependencies: agent-base: 7.1.3 - debug: 4.4.0 + debug: 4.4.0(supports-color@5.5.0) socks: 2.8.3 transitivePeerDependencies: - supports-color @@ -53739,6 +53834,10 @@ snapshots: dependencies: acorn: 8.14.0 + strip-literal@2.1.1: + dependencies: + js-tokens: 9.0.1 + strnum@1.0.5: {} strong-log-transformer@2.1.0: @@ -54142,6 +54241,14 @@ snapshots: tiny-invariant@1.3.3: {} + tiny-secp256k1@2.2.2: + dependencies: + uint8array-tools: 0.0.7 + + tiny-secp256k1@2.2.3: + dependencies: + uint8array-tools: 0.0.7 + tiny-warning@1.0.3: {} tinybench@2.9.0: {} @@ -54638,7 +54745,7 @@ snapshots: tuf-js@2.2.1: dependencies: '@tufjs/models': 2.0.1 - debug: 4.4.0 + debug: 4.4.0(supports-color@5.5.0) make-fetch-happen: 13.0.1 transitivePeerDependencies: - supports-color @@ -54719,6 +54826,8 @@ snapshots: type-fest@3.13.1: {} + type-fest@4.26.1: {} + type-fest@4.32.0: {} type-is@1.6.18: @@ -54854,6 +54963,8 @@ snapshots: dependencies: '@lukeed/csprng': 1.1.0 + uint8array-tools@0.0.7: {} + uint8array-tools@0.0.8: {} uint8array-tools@0.0.9: {} @@ -55277,6 +55388,10 @@ snapshots: varint@6.0.0: {} + varuint-bitcoin@1.1.2: + dependencies: + safe-buffer: 5.2.1 + varuint-bitcoin@2.0.0: dependencies: uint8array-tools: 0.0.8 @@ -55318,17 +55433,17 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - viem@2.21.58(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.24.1): + viem@2.21.58(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@6.0.5)(zod@3.24.1): dependencies: '@noble/curves': 1.7.0 '@noble/hashes': 1.6.1 '@scure/bip32': 1.6.0 '@scure/bip39': 1.5.0 abitype: 1.0.7(typescript@5.6.3)(zod@3.24.1) - isows: 1.0.6(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + isows: 1.0.6(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@6.0.5)) ox: 0.4.4(typescript@5.6.3)(zod@3.24.1) webauthn-p256: 0.0.10 - ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -55533,24 +55648,6 @@ snapshots: - supports-color - terser - vite-node@2.1.5(@types/node@20.17.9)(terser@5.37.0): - dependencies: - cac: 6.7.14 - debug: 4.4.0 - es-module-lexer: 1.6.0 - pathe: 1.1.2 - vite: 5.4.11(@types/node@20.17.9)(terser@5.37.0) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - vite-node@2.1.5(@types/node@22.10.7)(terser@5.37.0): dependencies: cac: 6.7.14 @@ -55952,6 +56049,42 @@ snapshots: - supports-color - terser + vitest@1.2.1(@types/node@22.10.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0): + dependencies: + '@vitest/expect': 1.2.1 + '@vitest/runner': 1.2.1 + '@vitest/snapshot': 1.2.1 + '@vitest/spy': 1.2.1 + '@vitest/utils': 1.2.1 + acorn-walk: 8.3.4 + cac: 6.7.14 + chai: 4.5.0 + debug: 4.4.0(supports-color@5.5.0) + execa: 8.0.1 + local-pkg: 0.5.1 + magic-string: 0.30.17 + pathe: 1.1.2 + picocolors: 1.1.1 + std-env: 3.8.0 + strip-literal: 1.3.0 + tinybench: 2.9.0 + tinypool: 0.8.4 + vite: 5.4.11(@types/node@22.10.7)(terser@5.37.0) + vite-node: 1.2.1(@types/node@22.10.7)(terser@5.37.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 22.10.7 + jsdom: 25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10) + transitivePeerDependencies: + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + vitest@1.2.1(@types/node@22.10.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@6.0.5))(terser@5.37.0): dependencies: '@vitest/expect': 1.2.1 @@ -56132,42 +56265,6 @@ snapshots: - supports-color - terser - vitest@2.1.5(@types/node@20.17.9)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0): - dependencies: - '@vitest/expect': 2.1.5 - '@vitest/mocker': 2.1.5(vite@5.4.11(@types/node@20.17.9)(terser@5.37.0)) - '@vitest/pretty-format': 2.1.8 - '@vitest/runner': 2.1.5 - '@vitest/snapshot': 2.1.5 - '@vitest/spy': 2.1.5 - '@vitest/utils': 2.1.5 - chai: 5.1.2 - debug: 4.4.0 - expect-type: 1.1.0 - magic-string: 0.30.17 - pathe: 1.1.2 - std-env: 3.8.0 - tinybench: 2.9.0 - tinyexec: 0.3.2 - tinypool: 1.0.2 - tinyrainbow: 1.2.0 - vite: 5.4.11(@types/node@20.17.9)(terser@5.37.0) - vite-node: 2.1.5(@types/node@20.17.9)(terser@5.37.0) - why-is-node-running: 2.3.0 - optionalDependencies: - '@types/node': 20.17.9 - jsdom: 25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10) - transitivePeerDependencies: - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - vitest@2.1.5(@types/node@22.10.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@6.0.5))(terser@5.37.0): dependencies: '@vitest/expect': 2.1.5