diff --git a/package.json b/package.json index 6def6f7a921..5f2dee536eb 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "@coinbase/coinbase-sdk": "^0.10.0", "csv-parse": "^5.6.0", "@0glabs/0g-ts-sdk": "^0.2.1", + "amqplib": "^0.10.4", "ollama-ai-provider": "^0.16.1", "optional": "^0.1.4", "sharp": "^0.33.5", diff --git a/packages/plugin-solana/src/evaluators/trust.ts b/packages/plugin-solana/src/evaluators/trust.ts index e8feaae03a7..75e470c87a1 100644 --- a/packages/plugin-solana/src/evaluators/trust.ts +++ b/packages/plugin-solana/src/evaluators/trust.ts @@ -253,6 +253,7 @@ async function handler(runtime: IAgentRuntime, message: Memory) { runtime, rec.contractAddress, userId, + account.username, // we need this to create the recommender account in the BE { buy_amount: rec.buyAmount, is_simulation: true, diff --git a/packages/plugin-solana/src/providers/simulationSellingService.ts b/packages/plugin-solana/src/providers/simulationSellingService.ts new file mode 100644 index 00000000000..88b8729f5cd --- /dev/null +++ b/packages/plugin-solana/src/providers/simulationSellingService.ts @@ -0,0 +1,445 @@ +import { + TrustScoreDatabase, + TokenPerformance, + // TradePerformance, + // TokenRecommendation, + ProcessedTokenData, +} from "@ai16z/plugin-trustdb"; +import { Connection, PublicKey } from "@solana/web3.js"; +// Assuming TokenProvider and IAgentRuntime are available +import { TokenProvider } from "./token.ts"; +// import { settings } from "@ai16z/eliza"; +import { IAgentRuntime } from "@ai16z/eliza"; +import { WalletProvider } from "./wallet.ts"; +import * as amqp from "amqplib"; + +interface SellDetails { + sell_amount: number; + sell_recommender_id: string | null; +} + +export class simulationSellingService { + private trustScoreDb: TrustScoreDatabase; + private walletProvider: WalletProvider; + private connection: Connection; + private baseMint: PublicKey; + private DECAY_RATE = 0.95; + private MAX_DECAY_DAYS = 30; + private backend: string; + private backendToken: string; + private amqpConnection: amqp.Connection; + private amqpChannel: amqp.Channel; + private sonarBe: string; + private sonarBeToken: string; + private runtime: IAgentRuntime; + + private runningProcesses: Set = new Set(); + + constructor(runtime: IAgentRuntime, trustScoreDb: TrustScoreDatabase) { + this.trustScoreDb = trustScoreDb; + + this.connection = new Connection(runtime.getSetting("RPC_URL")); + this.walletProvider = new WalletProvider( + this.connection, + new PublicKey(runtime.getSetting("WALLET_PUBLIC_KEY")) + ); + this.baseMint = new PublicKey( + runtime.getSetting("BASE_MINT") || + "So11111111111111111111111111111111111111112" + ); + this.backend = runtime.getSetting("BACKEND_URL"); + this.backendToken = runtime.getSetting("BACKEND_TOKEN"); + this.initializeRabbitMQ(runtime.getSetting("AMQP_URL")); + this.sonarBe = runtime.getSetting("SONAR_BE"); + this.sonarBeToken = runtime.getSetting("SONAR_BE_TOKEN"); + this.runtime = runtime; + } + /** + * Initializes the RabbitMQ connection and starts consuming messages. + * @param amqpUrl The RabbitMQ server URL. + */ + private async initializeRabbitMQ(amqpUrl: string) { + try { + this.amqpConnection = await amqp.connect(amqpUrl); + this.amqpChannel = await this.amqpConnection.createChannel(); + console.log("Connected to RabbitMQ"); + // Start consuming messages + this.consumeMessages(); + } catch (error) { + console.error("Failed to connect to RabbitMQ:", error); + } + } + + /** + * Sets up the consumer for the specified RabbitMQ queue. + */ + private async consumeMessages() { + const queue = "process_eliza_simulation"; + await this.amqpChannel.assertQueue(queue, { durable: true }); + this.amqpChannel.consume( + queue, + (msg) => { + if (msg !== null) { + const content = msg.content.toString(); + this.processMessage(content); + this.amqpChannel.ack(msg); + } + }, + { noAck: false } + ); + console.log(`Listening for messages on queue: ${queue}`); + } + + /** + * Processes incoming messages from RabbitMQ. + * @param message The message content as a string. + */ + private async processMessage(message: string) { + try { + const { tokenAddress, amount, sell_recommender_id } = + JSON.parse(message); + console.log( + `Received message for token ${tokenAddress} to sell ${amount}` + ); + + const decision: SellDecision = { + tokenPerformance: + await this.trustScoreDb.getTokenPerformance(tokenAddress), + amountToSell: amount, + sell_recommender_id: sell_recommender_id, + }; + + // Execute the sell + await this.executeSellDecision(decision); + + // Remove from running processes after completion + this.runningProcesses.delete(tokenAddress); + } catch (error) { + console.error("Error processing message:", error); + } + } + + /** + * Executes a single sell decision. + * @param decision The sell decision containing token performance and amount to sell. + */ + private async executeSellDecision(decision: SellDecision) { + const { tokenPerformance, amountToSell, sell_recommender_id } = + decision; + const tokenAddress = tokenPerformance.tokenAddress; + + try { + console.log( + `Executing sell for token ${tokenPerformance.tokenSymbol}: ${amountToSell}` + ); + + // Update the sell details + const sellDetails: SellDetails = { + sell_amount: amountToSell, + sell_recommender_id: sell_recommender_id, // Adjust if necessary + }; + const sellTimeStamp = new Date().toISOString(); + const tokenProvider = new TokenProvider( + tokenAddress, + this.walletProvider, + this.runtime.cacheManager + ); + + // Update sell details in the database + const sellDetailsData = await this.updateSellDetails( + tokenAddress, + tokenPerformance.recommenderId, + sellTimeStamp, + sellDetails, + true, // isSimulation + tokenProvider + ); + + console.log("Sell order executed successfully", sellDetailsData); + + // check if balance is zero and remove token from running processes + const balance = this.trustScoreDb.getTokenBalance(tokenAddress); + if (balance === 0) { + this.runningProcesses.delete(tokenAddress); + } + // stop the process in the sonar backend + await this.stopProcessInTheSonarBackend(tokenAddress); + } catch (error) { + console.error( + `Error executing sell for token ${tokenAddress}:`, + error + ); + } + } + + public async startService() { + // starting the service + console.log("Starting SellingService..."); + await this.startListeners(); + } + + private async startListeners() { + // scanning recommendations and selling + console.log("Scanning for token performances..."); + const tokenPerformances = + await this.trustScoreDb.getAllTokenPerformancesWithBalance(); + + await this.processTokenPerformances(tokenPerformances); + } + + private processTokenPerformances(tokenPerformances: TokenPerformance[]) { + // To Do: logic when to sell and how much + console.log("Deciding when to sell and how much..."); + const runningProcesses = this.runningProcesses; + // remove running processes from tokenPerformances + tokenPerformances = tokenPerformances.filter( + (tp) => !runningProcesses.has(tp.tokenAddress) + ); + + // start the process in the sonar backend + tokenPerformances.forEach(async (tokenPerformance) => { + const tokenProvider = new TokenProvider( + tokenPerformance.tokenAddress, + this.walletProvider, + this.runtime.cacheManager + ); + const shouldTrade = await tokenProvider.shouldTradeToken(); + if (shouldTrade) { + const balance = tokenPerformance.balance; + const sell_recommender_id = tokenPerformance.recommenderId; + const tokenAddress = tokenPerformance.tokenAddress; + const process = await this.startProcessInTheSonarBackend( + tokenAddress, + balance, + true, + sell_recommender_id, + tokenPerformance.initial_mc + ); + if (process) { + this.runningProcesses.add(tokenAddress); + } + } + }); + } + + private async startProcessInTheSonarBackend( + tokenAddress: string, + balance: number, + isSimulation: boolean, + sell_recommender_id: string, + initial_mc: number + ) { + try { + const message = JSON.stringify({ + tokenAddress, + balance, + isSimulation, + initial_mc, + sell_recommender_id, + }); + const response = await fetch( + `${this.sonarBe}/ai16z-sol/startProcess`, + { + method: "POST", + headers: { + "Content-Type": "application/json", + "x-api-key": `${this.sonarBeToken}`, + }, + body: message, + } + ); + + if (!response.ok) { + console.error( + `Failed to send message to process token ${tokenAddress}` + ); + return; + } + + const result = await response.json(); + console.log("Received response:", result); + console.log(`Sent message to process token ${tokenAddress}`); + + return result; + } catch (error) { + console.error( + `Error sending message to process token ${tokenAddress}:`, + error + ); + return null; + } + } + + private stopProcessInTheSonarBackend(tokenAddress: string) { + try { + return fetch(`${this.sonarBe}/ai16z-sol/stopProcess`, { + method: "POST", + headers: { + "Content-Type": "application/json", + "x-api-key": `${this.sonarBeToken}`, + }, + body: JSON.stringify({ tokenAddress }), + }); + } catch (error) { + console.error( + `Error stopping process for token ${tokenAddress}:`, + error + ); + } + } + + async updateSellDetails( + tokenAddress: string, + recommenderId: string, + sellTimeStamp: string, + sellDetails: SellDetails, + isSimulation: boolean, + tokenProvider: TokenProvider + ) { + const recommender = + await this.trustScoreDb.getOrCreateRecommenderWithTelegramId( + recommenderId + ); + const processedData: ProcessedTokenData = + await tokenProvider.getProcessedTokenData(); + const prices = await this.walletProvider.fetchPrices(null); + const solPrice = prices.solana.usd; + const sellSol = sellDetails.sell_amount / parseFloat(solPrice); + const sell_value_usd = + sellDetails.sell_amount * processedData.tradeData.price; + const trade = await this.trustScoreDb.getLatestTradePerformance( + tokenAddress, + recommender.id, + isSimulation + ); + const buyTimeStamp = trade.buy_timeStamp; + const marketCap = + processedData.dexScreenerData.pairs[0]?.marketCap || 0; + const liquidity = + processedData.dexScreenerData.pairs[0]?.liquidity.usd || 0; + const sell_price = processedData.tradeData.price; + const profit_usd = sell_value_usd - trade.buy_value_usd; + const profit_percent = (profit_usd / trade.buy_value_usd) * 100; + + const market_cap_change = marketCap - trade.buy_market_cap; + const liquidity_change = liquidity - trade.buy_liquidity; + + const isRapidDump = await this.isRapidDump(tokenAddress, tokenProvider); + + const sellDetailsData = { + sell_price: sell_price, + sell_timeStamp: sellTimeStamp, + sell_amount: sellDetails.sell_amount, + received_sol: sellSol, + sell_value_usd: sell_value_usd, + profit_usd: profit_usd, + profit_percent: profit_percent, + sell_market_cap: marketCap, + market_cap_change: market_cap_change, + sell_liquidity: liquidity, + liquidity_change: liquidity_change, + rapidDump: isRapidDump, + sell_recommender_id: sellDetails.sell_recommender_id || null, + }; + this.trustScoreDb.updateTradePerformanceOnSell( + tokenAddress, + recommender.id, + buyTimeStamp, + sellDetailsData, + isSimulation + ); + + // If the trade is a simulation update the balance + const oldBalance = this.trustScoreDb.getTokenBalance(tokenAddress); + const tokenBalance = oldBalance - sellDetails.sell_amount; + this.trustScoreDb.updateTokenBalance(tokenAddress, tokenBalance); + // generate some random hash for simulations + const hash = Math.random().toString(36).substring(7); + const transaction = { + tokenAddress: tokenAddress, + type: "sell", + transactionHash: hash, + amount: sellDetails.sell_amount, + price: processedData.tradeData.price, + isSimulation: true, + timestamp: new Date().toISOString(), + }; + this.trustScoreDb.addTransaction(transaction); + this.updateTradeInBe( + tokenAddress, + recommender.id, + recommender.telegramId, + sellDetailsData, + tokenBalance + ); + + return sellDetailsData; + } + async isRapidDump( + tokenAddress: string, + tokenProvider: TokenProvider + ): Promise { + const processedData: ProcessedTokenData = + await tokenProvider.getProcessedTokenData(); + console.log(`Fetched processed token data for token: ${tokenAddress}`); + + return processedData.tradeData.trade_24h_change_percent < -50; + } + + async delay(ms: number) { + return new Promise((resolve) => setTimeout(resolve, ms)); + } + + async updateTradeInBe( + tokenAddress: string, + recommenderId: string, + username: string, + data: SellDetails, + balanceLeft: number, + retries = 3, + delayMs = 2000 + ) { + for (let attempt = 1; attempt <= retries; attempt++) { + try { + await fetch( + `${this.backend}/api/updaters/updateTradePerformance`, + { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${this.backendToken}`, + }, + body: JSON.stringify({ + tokenAddress: tokenAddress, + tradeData: data, + recommenderId: recommenderId, + username: username, + isSimulation: true, + balanceLeft: balanceLeft, + }), + } + ); + // If the request is successful, exit the loop + return; + } catch (error) { + console.error( + `Attempt ${attempt} failed: Error creating trade in backend`, + error + ); + if (attempt < retries) { + console.log(`Retrying in ${delayMs} ms...`); + await this.delay(delayMs); // Wait for the specified delay before retrying + } else { + console.error("All attempts failed."); + } + } + } + } +} + +// SellDecision interface +interface SellDecision { + tokenPerformance: TokenPerformance; + amountToSell: number; + sell_recommender_id: string | null; +} diff --git a/packages/plugin-solana/src/providers/trustScoreProvider.ts b/packages/plugin-solana/src/providers/trustScoreProvider.ts index 32f41267203..d09e1126248 100644 --- a/packages/plugin-solana/src/providers/trustScoreProvider.ts +++ b/packages/plugin-solana/src/providers/trustScoreProvider.ts @@ -19,6 +19,7 @@ import { } from "@ai16z/plugin-trustdb"; import { settings } from "@ai16z/eliza"; import { IAgentRuntime, Memory, Provider, State } from "@ai16z/eliza"; +import { v4 as uuidv4 } from "uuid"; const Wallet = settings.MAIN_WALLET_ADDRESS; interface TradeData { @@ -153,6 +154,9 @@ export class TrustScoreManager { rapidDump: isRapidDump, suspiciousVolume: suspiciousVolume, validationTrust: validationTrustScore, + balance: balance, + initialMarketCap: + processedData.dexScreenerData.pairs[0]?.marketCap || 0, lastUpdated: new Date(), }, recommenderMetrics: { @@ -338,6 +342,7 @@ export class TrustScoreManager { runtime: IAgentRuntime, tokenAddress: string, recommenderId: string, + username: string, data: TradeData ): Promise { const recommender = @@ -351,10 +356,14 @@ export class TrustScoreManager { new PublicKey(Wallet!) ); + let tokensBalance = 0; const prices = await wallet.fetchPrices(runtime); const solPrice = prices.solana.usd; const buySol = data.buy_amount / parseFloat(solPrice); const buy_value_usd = data.buy_amount * processedData.tradeData.price; + const token = await this.tokenProvider.fetchTokenTradeData(); + const tokenPrice = token.price; + tokensBalance = buy_value_usd / tokenPrice; const creationData = { token_address: tokenAddress, @@ -383,8 +392,62 @@ export class TrustScoreManager { rapidDump: false, }; this.trustScoreDb.addTradePerformance(creationData, data.is_simulation); + // generate unique uuid for each TokenRecommendation + const tokenUUId = uuidv4(); + const tokenRecommendation: TokenRecommendation = { + id: tokenUUId, + recommenderId: recommenderId, + tokenAddress: tokenAddress, + timestamp: new Date(), + initialMarketCap: + processedData.dexScreenerData.pairs[0]?.marketCap || 0, + initialLiquidity: + processedData.dexScreenerData.pairs[0]?.liquidity?.usd || 0, + initialPrice: processedData.tradeData.price, + }; + this.trustScoreDb.addTokenRecommendation(tokenRecommendation); + + this.trustScoreDb.upsertTokenPerformance({ + tokenAddress: tokenAddress, + priceChange24h: processedData.tradeData.price_change_24h_percent, + volumeChange24h: processedData.tradeData.volume_24h, + trade_24h_change: processedData.tradeData.trade_24h_change_percent, + liquidity: + processedData.dexScreenerData.pairs[0]?.liquidity.usd || 0, + liquidityChange24h: 0, + holderChange24h: + processedData.tradeData.unique_wallet_24h_change_percent, + rugPull: false, + isScam: false, + marketCapChange24h: 0, + sustainedGrowth: false, + rapidDump: false, + suspiciousVolume: false, + validationTrust: 0, + balance: tokensBalance, + initialMarketCap: + processedData.dexScreenerData.pairs[0]?.marketCap || 0, + lastUpdated: new Date(), + }); + + if (data.is_simulation) { + // If the trade is a simulation update the balance + this.trustScoreDb.updateTokenBalance(tokenAddress, tokensBalance); + // generate some random hash for simulations + const hash = Math.random().toString(36).substring(7); + const transaction = { + tokenAddress: tokenAddress, + type: "buy" as "buy" | "sell", + transactionHash: hash, + amount: data.buy_amount, + price: processedData.tradeData.price, + isSimulation: true, + timestamp: new Date().toISOString(), + }; + this.trustScoreDb.addTransaction(transaction); + } // api call to update trade performance - this.createTradeInBe(tokenAddress, recommenderId, data); + this.createTradeInBe(tokenAddress, recommenderId, username, data); return creationData; } @@ -395,6 +458,7 @@ export class TrustScoreManager { async createTradeInBe( tokenAddress: string, recommenderId: string, + username: string, data: TradeData, retries = 3, delayMs = 2000 @@ -413,6 +477,7 @@ export class TrustScoreManager { tokenAddress: tokenAddress, tradeData: data, recommenderId: recommenderId, + username: username, }), } ); @@ -507,6 +572,25 @@ export class TrustScoreManager { sellDetailsData, isSimulation ); + if (isSimulation) { + // If the trade is a simulation update the balance + const oldBalance = this.trustScoreDb.getTokenBalance(tokenAddress); + const tokenBalance = oldBalance - sellDetails.sell_amount; + this.trustScoreDb.updateTokenBalance(tokenAddress, tokenBalance); + // generate some random hash for simulations + const hash = Math.random().toString(36).substring(7); + const transaction = { + tokenAddress: tokenAddress, + type: "sell" as "buy" | "sell", + transactionHash: hash, + amount: sellDetails.sell_amount, + price: processedData.tradeData.price, + isSimulation: true, + timestamp: new Date().toISOString(), + }; + this.trustScoreDb.addTransaction(transaction); + } + return sellDetailsData; } diff --git a/packages/plugin-trustdb/src/adapters/trustScoreDatabase.ts b/packages/plugin-trustdb/src/adapters/trustScoreDatabase.ts index 51b44b9eb25..b877d52e8b5 100644 --- a/packages/plugin-trustdb/src/adapters/trustScoreDatabase.ts +++ b/packages/plugin-trustdb/src/adapters/trustScoreDatabase.ts @@ -40,6 +40,8 @@ export interface TokenPerformance { rapidDump: boolean; suspiciousVolume: boolean; validationTrust: number; + balance: number; + initialMarketCap: number; lastUpdated: Date; } @@ -120,9 +122,21 @@ interface TokenPerformanceRow { rapid_dump: number; suspicious_volume: number; validation_trust: number; + balance: number; + initial_market_cap: number; last_updated: string; } +interface Transaction { + tokenAddress: string; + transactionHash: string; + type: "buy" | "sell"; + amount: number; + price: number; + isSimulation: boolean; + timestamp: string; +} + export class TrustScoreDatabase { private db: Database; @@ -192,6 +206,8 @@ export class TrustScoreDatabase { rapid_dump BOOLEAN DEFAULT FALSE, suspicious_volume BOOLEAN DEFAULT FALSE, validation_trust REAL DEFAULT 0, + balance REAL DEFAULT 0, + initial_market_cap REAL DEFAULT 0, last_updated DATETIME DEFAULT CURRENT_TIMESTAMP ); `); @@ -289,6 +305,20 @@ export class TrustScoreDatabase { FOREIGN KEY (recommender_id) REFERENCES recommenders(id) ON DELETE CASCADE ); `); + + // create transactions table + this.db.exec(` + CREATE TABLE IF NOT EXISTS transactions ( + token_address TEXT NOT NULL, + transaction_hash TEXT PRIMARY KEY, + type TEXT NOT NULL, + amount REAL NOT NULL, + price REAL NOT NULL, + timestamp TEXT NOT NULL, + is_simulation BOOLEAN DEFAULT FALSE, + FOREIGN KEY (token_address) REFERENCES token_performance(token_address) ON DELETE CASCADE + ); + `); } /** @@ -704,6 +734,8 @@ export class TrustScoreDatabase { rapid_dump, suspicious_volume, validation_trust, + balance, + initial_market_cap, last_updated ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP) ON CONFLICT(token_address) DO UPDATE SET @@ -720,6 +752,8 @@ export class TrustScoreDatabase { rapid_dump = excluded.rapid_dump, suspicious_volume = excluded.suspicious_volume, validation_trust = excluded.validation_trust, + balance = excluded.balance, + initial_market_cap = excluded.initial_market_cap, last_updated = CURRENT_TIMESTAMP; `; try { @@ -737,6 +771,8 @@ export class TrustScoreDatabase { performance.sustainedGrowth ? 1 : 0, performance.rapidDump ? 1 : 0, performance.suspiciousVolume ? 1 : 0, + performance.balance, + performance.initialMarketCap, validationTrust ); console.log( @@ -749,6 +785,25 @@ export class TrustScoreDatabase { } } + // update token balance + + updateTokenBalance(tokenAddress: string, balance: number): boolean { + const sql = ` + UPDATE token_performance + SET balance = ?, + last_updated = CURRENT_TIMESTAMP + WHERE token_address = ?; + `; + try { + this.db.prepare(sql).run(balance, tokenAddress); + console.log(`Updated token balance for ${tokenAddress}`); + return true; + } catch (error) { + console.error("Error updating token balance:", error); + return false; + } + } + /** * Retrieves token performance metrics. * @param tokenAddress Token's address @@ -776,10 +831,46 @@ export class TrustScoreDatabase { rapidDump: row.rapid_dump === 1, suspiciousVolume: row.suspicious_volume === 1, validationTrust: row.validation_trust, + balance: row.balance, + initialMarketCap: row.initial_market_cap, lastUpdated: new Date(row.last_updated), }; } + //getTokenBalance + getTokenBalance(tokenAddress: string): number { + const sql = `SELECT balance FROM token_performance WHERE token_address = ?;`; + const row = this.db.prepare(sql).get(tokenAddress) as { + balance: number; + }; + return row.balance; + } + + getAllTokenPerformancesWithBalance(): TokenPerformance[] { + const sql = `SELECT * FROM token_performance WHERE balance > 0;`; + const rows = this.db.prepare(sql).all() as TokenPerformanceRow[]; + + return rows.map((row) => ({ + tokenAddress: row.token_address, + priceChange24h: row.price_change_24h, + volumeChange24h: row.volume_change_24h, + trade_24h_change: row.trade_24h_change, + liquidity: row.liquidity, + liquidityChange24h: row.liquidity_change_24h, + holderChange24h: row.holder_change_24h, + rugPull: row.rug_pull === 1, + isScam: row.is_scam === 1, + marketCapChange24h: row.market_cap_change24h, + sustainedGrowth: row.sustained_growth === 1, + rapidDump: row.rapid_dump === 1, + suspiciousVolume: row.suspicious_volume === 1, + validationTrust: row.validation_trust, + balance: row.balance, + initialMarketCap: row.initial_market_cap, + lastUpdated: new Date(row.last_updated), + })); + } + // ----- TokenRecommendations Methods ----- /** @@ -1247,6 +1338,79 @@ export class TrustScoreDatabase { }; } + // ----- Transactions Methods ----- + /** + * Adds a new transaction to the database. + * @param transaction Transaction object + * @returns boolean indicating success + */ + + addTransaction(transaction: Transaction): boolean { + const sql = ` + INSERT INTO transactions ( + token_address, + transaction_hash, + type, + amount, + price, + is_simulation, + timestamp + ) VALUES (?, ?, ?, ?, ?, ?); + `; + try { + this.db + .prepare(sql) + .run( + transaction.tokenAddress, + transaction.transactionHash, + transaction.type, + transaction.amount, + transaction.price, + transaction.isSimulation, + transaction.timestamp + ); + return true; + } catch (error) { + console.error("Error adding transaction:", error); + return false; + } + } + + /** + * Retrieves all transactions for a specific token. + * @param tokenAddress Token's address + * @returns Array of Transaction objects + */ + getTransactionsByToken(tokenAddress: string): Transaction[] { + const sql = `SELECT * FROM transactions WHERE token_address = ? ORDER BY timestamp DESC;`; + const rows = this.db.prepare(sql).all(tokenAddress) as Array<{ + token_address: string; + transaction_hash: string; + type: string; + amount: number; + price: number; + is_simulation: boolean; + timestamp: string; + }>; + + return rows.map((row) => { + // Validate and cast 'type' to ensure it matches the expected union type + if (row.type !== "buy" && row.type !== "sell") { + throw new Error(`Unexpected transaction type: ${row.type}`); + } + + return { + tokenAddress: row.token_address, + transactionHash: row.transaction_hash, + type: row.type as "buy" | "sell", + amount: row.amount, + price: row.price, + isSimulation: row.is_simulation, + timestamp: new Date(row.timestamp).toISOString(), + }; + }); + } + /** * Close the database connection gracefully. */ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 44906db78fa..e4c1f99a495 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: '@coinbase/coinbase-sdk': specifier: ^0.10.0 version: 0.10.0(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) + amqplib: + specifier: ^0.10.4 + version: 0.10.4 csv-parse: specifier: ^5.6.0 version: 5.6.0 @@ -231,67 +234,6 @@ importers: specifier: link:@tanstack/router-plugin/vite version: link:@tanstack/router-plugin/vite - apps/agent: - dependencies: - '@ai16z/adapter-postgres': - specifier: workspace:* - version: link:../../packages/adapter-postgres - '@ai16z/adapter-sqlite': - specifier: workspace:* - version: link:../../packages/adapter-sqlite - '@ai16z/client-auto': - specifier: workspace:* - version: link:../../packages/client-auto - '@ai16z/client-direct': - specifier: workspace:* - version: link:../../packages/client-direct - '@ai16z/client-discord': - specifier: workspace:* - version: link:../../packages/client-discord - '@ai16z/client-farcaster': - specifier: workspace:* - version: link:../../packages/client-farcaster - '@ai16z/client-telegram': - specifier: workspace:* - version: link:../../packages/client-telegram - '@ai16z/client-twitter': - specifier: workspace:* - version: link:../../packages/client-twitter - '@ai16z/eliza': - specifier: workspace:* - version: link:../../packages/core - '@ai16z/plugin-bootstrap': - specifier: workspace:* - version: link:../../packages/plugin-bootstrap - '@ai16z/plugin-image-generation': - specifier: workspace:* - version: link:../../packages/plugin-image-generation - '@ai16z/plugin-node': - specifier: workspace:* - version: link:../../packages/plugin-node - '@ai16z/plugin-solana': - specifier: workspace:* - version: link:../../packages/plugin-solana - readline: - specifier: ^1.3.0 - version: 1.3.0 - viem: - specifier: ^2.21.47 - version: 2.21.47(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) - ws: - specifier: ^8.18.0 - version: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - yargs: - specifier: 17.7.2 - version: 17.7.2 - devDependencies: - ts-node: - specifier: 10.9.2 - version: 10.9.2(@types/node@22.8.4)(typescript@5.6.3) - tsup: - specifier: ^8.3.5 - version: 8.3.5(jiti@1.21.6)(postcss@8.4.47)(typescript@5.6.3)(yaml@2.6.0) - docs: dependencies: '@docusaurus/core': @@ -373,7 +315,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.9.3(@swc/helpers@0.5.15))(jiti@2.4.0)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) @@ -407,7 +349,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.9.3(@swc/helpers@0.5.15))(jiti@2.4.0)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) @@ -441,7 +383,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.9.3(@swc/helpers@0.5.15))(jiti@2.4.0)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) @@ -469,7 +411,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.9.3(@swc/helpers@0.5.15))(jiti@2.4.0)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) @@ -521,7 +463,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.9.3(@swc/helpers@0.5.15))(jiti@2.4.0)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) @@ -573,7 +515,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.9.3(@swc/helpers@0.5.15))(jiti@2.4.0)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) @@ -622,11 +564,27 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.9.3(@swc/helpers@0.5.15))(jiti@2.4.0)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) + packages/client-farcaster: + dependencies: + '@ai16z/eliza': + specifier: workspace:* + version: link:../core + '@farcaster/hub-nodejs': + specifier: ^0.12.7 + version: 0.12.7(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) + viem: + specifier: ^2.21.47 + version: 2.21.50(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) + devDependencies: + tsup: + specifier: ^8.3.5 + version: 8.3.5(@swc/core@1.9.3(@swc/helpers@0.5.15))(jiti@2.4.0)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) + packages/client-github: dependencies: '@ai16z/eliza': @@ -659,7 +617,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.9.3(@swc/helpers@0.5.15))(jiti@2.4.0)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) @@ -690,7 +648,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.9.3(@swc/helpers@0.5.15))(jiti@2.4.0)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) @@ -724,7 +682,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.9.3(@swc/helpers@0.5.15))(jiti@2.4.0)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) @@ -864,9 +822,6 @@ importers: eslint-plugin-prettier: specifier: 5.2.1 version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) - eslint-plugin-vitest: - specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) jest: specifier: 29.7.0 version: 29.7.0(@types/node@22.8.4)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3)) @@ -927,7 +882,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) jiti: specifier: 2.4.0 version: 2.4.0 @@ -973,7 +928,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) packages/plugin-coinbase: dependencies: @@ -1029,7 +984,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) packages/plugin-node: dependencies: @@ -1207,7 +1162,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.9.3(@swc/helpers@0.5.15))(jiti@2.4.0)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) @@ -1247,6 +1202,9 @@ importers: tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.9.3(@swc/helpers@0.5.15))(jiti@2.4.0)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1) + vitest: + specifier: 2.1.4 + version: 2.1.4(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1262,7 +1220,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.4(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) packages/plugin-starknet: dependencies: @@ -1305,7 +1263,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) packages/plugin-trustdb: dependencies: @@ -1342,7 +1300,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) packages/plugin-video-generation: dependencies: @@ -1367,7 +1325,7 @@ importers: version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0(jiti@2.4.0)))(eslint@9.13.0(jiti@2.4.0))(prettier@3.3.3) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) + version: 0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)) packages: @@ -1376,6 +1334,10 @@ packages: peerDependencies: ethers: 6.13.1 + '@acuminous/bitsyntax@0.1.2': + resolution: {integrity: sha512-29lUK80d1muEQqiUsSo+3A0yP6CdspgC95EnKBMi22Xlwt79i/En4Vr67+cXhU+cZjbti3TgGGC5wy1stIywVQ==} + engines: {node: '>=0.8'} + '@adraffy/ens-normalize@1.10.1': resolution: {integrity: sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==} @@ -2932,6 +2894,7 @@ packages: resolution: {integrity: sha512-hArn9FF5ZYi1IkxdJEVnJi+OxlwLV0NJYWpKXsmNOojtGtAZHxmsELA+MZlu2KW1F/K1/nt7lFOfcMXNYweq9w==} version: 0.17.0 engines: {node: '>=16.11.0'} + deprecated: This version uses deprecated encryption modes. Please use a newer version. '@discordjs/ws@1.1.1': resolution: {integrity: sha512-PZ+vLpxGCRtmr2RMkqh8Zp+BenUaJqlS6xhgWKEZcgC/vfHLEzpHtKkB0sl3nZWpwtcKk6YWy+pU3okL2I97FA==} @@ -3688,6 +3651,16 @@ packages: '@ethersproject/strings@5.7.0': resolution: {integrity: sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==} + '@faker-js/faker@7.6.0': + resolution: {integrity: sha512-XK6BTq1NDMo9Xqw/YkYyGjSsg44fbNwYRx7QK2CuoQgyy+f1rrTDHoExVM5PsyXCtfl2vs2vVJ0MN0yN6LppRw==} + engines: {node: '>=14.0.0', npm: '>=6.0.0'} + + '@farcaster/core@0.15.6': + resolution: {integrity: sha512-Vxq2JhqdZYEMjH4PIwPXQkalY46S4Mol2oCSHUafXenDx6WSoQJqF/4an4KyxGQbmA7Cf8+hl6zuNzkkHXEUyQ==} + + '@farcaster/hub-nodejs@0.12.7': + resolution: {integrity: sha512-05zXNqnHRBSbOkHl0KDh6l60nHK5MiKFky0JBGbdOZXdkFCk4FIiHv9AGLxjFXr/FxA3jSTHUJfvRRe5TonjRw==} + '@floating-ui/core@1.6.8': resolution: {integrity: sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==} @@ -3707,6 +3680,15 @@ packages: resolution: {integrity: sha512-8brlcJwFXI4fPuBtsDNQqCdWZmz8gV9jeEKOU0vc5H2SjehCQpXK/NwuSEr916zbhlBHtg/sU37qQQdgvh5BRA==} engines: {node: '>=18.0.0'} + '@grpc/grpc-js@1.11.3': + resolution: {integrity: sha512-i9UraDzFHMR+Iz/MhFLljT+fCpgxZ3O6CxwGJ8YuNYHJItIHUzKJpW2LvoFZNnGPwqc9iWy9RAucxV0JoR9aUQ==} + engines: {node: '>=12.10.0'} + + '@grpc/proto-loader@0.7.13': + resolution: {integrity: sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==} + engines: {node: '>=6'} + hasBin: true + '@hapi/hoek@9.3.0': resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} @@ -3968,6 +3950,9 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@js-sdsl/ordered-map@4.4.2': + resolution: {integrity: sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==} + '@kikobeats/time-span@1.0.5': resolution: {integrity: sha512-txRAdmi35N1wnsLS1AO5mTlbY5Cv5/61WXqek2y3L9Q7u4mgdUVq819so5xe753hL5gYeLzlWoJ/VJfXg9nx8g==} engines: {node: '>= 18'} @@ -6349,9 +6334,23 @@ packages: peerDependencies: vite: ^4.2.0 || ^5.0.0 + '@vitest/expect@2.1.4': + resolution: {integrity: sha512-DOETT0Oh1avie/D/o2sgMHGrzYUFFo3zqESB2Hn70z6QB1HrS2IQ9z5DfyTqU8sg4Bpu13zZe9V4+UTNQlUeQA==} + '@vitest/expect@2.1.5': resolution: {integrity: sha512-nZSBTW1XIdpZvEJyoP/Sy8fUg0b8od7ZpGDkTUcfJ7wz/VoZAFzFfLyxVxGFhUjJzhYqSbIpfMtl/+k/dpWa3Q==} + '@vitest/mocker@2.1.4': + resolution: {integrity: sha512-Ky/O1Lc0QBbutJdW0rqLeFNbuLEyS+mIPiNdlVlp2/yhJ0SbyYqObS5IHdhferJud8MbbwMnexg4jordE5cCoQ==} + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + '@vitest/mocker@2.1.5': resolution: {integrity: sha512-XYW6l3UuBmitWqSUXTNXcVBUCRytDogBsWuNXQijc00dtnU/9OqpXWp4OJroVrad/gLIomAq9aW8yWDBtMthhQ==} peerDependencies: @@ -6363,18 +6362,33 @@ packages: vite: optional: true + '@vitest/pretty-format@2.1.4': + resolution: {integrity: sha512-L95zIAkEuTDbUX1IsjRl+vyBSLh3PwLLgKpghl37aCK9Jvw0iP+wKwIFhfjdUtA2myLgjrG6VU6JCFLv8q/3Ww==} + '@vitest/pretty-format@2.1.5': resolution: {integrity: sha512-4ZOwtk2bqG5Y6xRGHcveZVr+6txkH7M2e+nPFd6guSoN638v/1XQ0K06eOpi0ptVU/2tW/pIU4IoPotY/GZ9fw==} + '@vitest/runner@2.1.4': + resolution: {integrity: sha512-sKRautINI9XICAMl2bjxQM8VfCMTB0EbsBc/EDFA57V6UQevEKY/TOPOF5nzcvCALltiLfXWbq4MaAwWx/YxIA==} + '@vitest/runner@2.1.5': resolution: {integrity: sha512-pKHKy3uaUdh7X6p1pxOkgkVAFW7r2I818vHDthYLvUyjRfkKOU6P45PztOch4DZarWQne+VOaIMwA/erSSpB9g==} + '@vitest/snapshot@2.1.4': + resolution: {integrity: sha512-3Kab14fn/5QZRog5BPj6Rs8dc4B+mim27XaKWFWHWA87R56AKjHTGcBFKpvZKDzC4u5Wd0w/qKsUIio3KzWW4Q==} + '@vitest/snapshot@2.1.5': resolution: {integrity: sha512-zmYw47mhfdfnYbuhkQvkkzYroXUumrwWDGlMjpdUr4jBd3HZiV2w7CQHj+z7AAS4VOtWxI4Zt4bWt4/sKcoIjg==} + '@vitest/spy@2.1.4': + resolution: {integrity: sha512-4JOxa+UAizJgpZfaCPKK2smq9d8mmjZVPMt2kOsg/R8QkoRzydHH1qHxIYNvr1zlEaFj4SXiaaJWxq/LPLKaLg==} + '@vitest/spy@2.1.5': resolution: {integrity: sha512-aWZF3P0r3w6DiYTVskOYuhBc7EMc3jvn1TkBg8ttylFFRqNN2XGD7V5a4aQdk6QiUzZQ4klNBSpCLJgWNdIiNw==} + '@vitest/utils@2.1.4': + resolution: {integrity: sha512-MXDnZn0Awl2S86PSNIim5PWXgIAx8CIkzu35mBdSApUip6RFOGXBCf3YFyeEu8n1IHk4bWD46DeYFu9mQlFIRg==} + '@vitest/utils@2.1.5': resolution: {integrity: sha512-yfj6Yrp0Vesw2cwJbP+cl04OC+IHFsuQsrsJBL9pyGeQXE56v1UAOQco+SR55Vf1nQzfV0QJg1Qum7AaWUwwYg==} @@ -6629,6 +6643,10 @@ packages: amp@0.3.1: resolution: {integrity: sha512-OwIuC4yZaRogHKiuU5WlMR5Xk/jAcpPtawWL05Gj8Lvm2F6mwoJt4O/bHI+DHwG79vWd+8OFYM4/BzYqyRd3qw==} + amqplib@0.10.4: + resolution: {integrity: sha512-DMZ4eCEjAVdX1II2TfIUpJhfKAuoCeDIo/YyETbfAqehHTXxxs7WOOd+N1Xxr4cKhx12y23zk8/os98FxlZHrw==} + engines: {node: '>=10'} + ansi-align@3.0.1: resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} @@ -6912,6 +6930,9 @@ packages: base-x@3.0.10: resolution: {integrity: sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==} + base-x@4.0.0: + resolution: {integrity: sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==} + base-x@5.0.0: resolution: {integrity: sha512-sMW3VGSX1QWVFA6l8U62MLKz29rRfpTlYdCqLdpLo1/Yd4zZwSbnUaDfciIAowAqvq7YFnWq9hrhdg1KYgc1lQ==} @@ -7057,6 +7078,9 @@ packages: bs58@4.0.1: resolution: {integrity: sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==} + bs58@5.0.0: + resolution: {integrity: sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==} + bs58@6.0.0: resolution: {integrity: sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw==} @@ -7088,6 +7112,9 @@ packages: resolution: {integrity: sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA==} engines: {node: '>=4.5'} + buffer-more-ints@1.0.0: + resolution: {integrity: sha512-EMetuGFz5SLsT0QTnXzINh4Ksr+oo4i+UGTXEshiGCQWnsgSs7ZhJ8fzlwQ+OzEMs0MpDAMr1hxnblp5a4vcHg==} + buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} @@ -11394,6 +11421,9 @@ packages: resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} engines: {node: '>= 0.4.0'} + neverthrow@6.2.2: + resolution: {integrity: sha512-POR1FACqdK9jH0S2kRPzaZEvzT11wsOxLW520PQV/+vKi9dQe+hXq19EiOvYx7lSRaF5VB9lYGsPInynrnN05w==} + next-tick@1.1.0: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} @@ -14974,6 +15004,11 @@ packages: typescript: optional: true + vite-node@2.1.4: + resolution: {integrity: sha512-kqa9v+oi4HwkG6g8ufRnb5AeplcRw8jUF6/7/Qz1qRQOXHImG8YnLbB+LLszENwFnoBl9xIf9nVdCFzNd7GQEg==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + vite-node@2.1.5: resolution: {integrity: sha512-rd0QIgx74q4S1Rd56XIiL2cYEdyWn13cunYBIuqh9mpmQr7gGS0IxXoP8R6OaZtNQQLyXSWbd4rXKYUbhFpK5w==} engines: {node: ^18.0.0 || >=20.0.0} @@ -15020,6 +15055,31 @@ packages: terser: optional: true + vitest@2.1.4: + resolution: {integrity: sha512-eDjxbVAJw1UJJCHr5xr/xM86Zx+YxIEXGAR+bmnEID7z9qWfoxpHw0zdobz+TQAFOLT+nEXz3+gx6nUJ7RgmlQ==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 2.1.4 + '@vitest/ui': 2.1.4 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + vitest@2.1.5: resolution: {integrity: sha512-P4ljsdpuzRTPI/kbND2sDZ4VmieerR2c9szEZpjc+98Z9ebvnXmM5+0tHEKqYZumXqlvnmfWsjeFOjXVriDG7A==} engines: {node: ^18.0.0 || >=20.0.0} @@ -15484,6 +15544,14 @@ snapshots: - supports-color - utf-8-validate + '@acuminous/bitsyntax@0.1.2': + dependencies: + buffer-more-ints: 1.0.0 + debug: 4.3.7(supports-color@5.5.0) + safe-buffer: 5.1.2 + transitivePeerDependencies: + - supports-color + '@adraffy/ens-normalize@1.10.1': {} '@adraffy/ens-normalize@1.11.0': {} @@ -18988,6 +19056,34 @@ snapshots: '@ethersproject/constants': 5.7.0 '@ethersproject/logger': 5.7.0 + '@faker-js/faker@7.6.0': {} + + '@farcaster/core@0.15.6(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)': + dependencies: + '@faker-js/faker': 7.6.0 + '@noble/curves': 1.7.0 + '@noble/hashes': 1.6.1 + bs58: 5.0.0 + neverthrow: 6.2.2 + viem: 2.21.50(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + - zod + + '@farcaster/hub-nodejs@0.12.7(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)': + dependencies: + '@farcaster/core': 0.15.6(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) + '@grpc/grpc-js': 1.11.3 + '@noble/hashes': 1.6.1 + neverthrow: 6.2.2 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + - zod + '@floating-ui/core@1.6.8': dependencies: '@floating-ui/utils': 0.2.8 @@ -19012,6 +19108,18 @@ snapshots: - encoding - supports-color + '@grpc/grpc-js@1.11.3': + dependencies: + '@grpc/proto-loader': 0.7.13 + '@js-sdsl/ordered-map': 4.4.2 + + '@grpc/proto-loader@0.7.13': + dependencies: + lodash.camelcase: 4.3.0 + long: 5.2.3 + protobufjs: 7.4.0 + yargs: 17.7.2 + '@hapi/hoek@9.3.0': {} '@hapi/topo@5.1.0': @@ -19347,6 +19455,8 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 + '@js-sdsl/ordered-map@4.4.2': {} + '@kikobeats/time-span@1.0.5': {} '@kwsites/file-exists@1.1.1': @@ -22285,6 +22395,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@vitest/expect@2.1.4': + dependencies: + '@vitest/spy': 2.1.4 + '@vitest/utils': 2.1.4 + chai: 5.1.2 + tinyrainbow: 1.2.0 + '@vitest/expect@2.1.5': dependencies: '@vitest/spy': 2.1.5 @@ -22292,6 +22409,14 @@ snapshots: chai: 5.1.2 tinyrainbow: 1.2.0 + '@vitest/mocker@2.1.4(vite@5.4.11(@types/node@22.8.4)(terser@5.36.0))': + dependencies: + '@vitest/spy': 2.1.4 + estree-walker: 3.0.3 + magic-string: 0.30.13 + optionalDependencies: + vite: 5.4.11(@types/node@22.8.4)(terser@5.36.0) + '@vitest/mocker@2.1.5(vite@5.4.11(@types/node@22.8.4)(terser@5.36.0))': dependencies: '@vitest/spy': 2.1.5 @@ -22300,25 +22425,50 @@ snapshots: optionalDependencies: vite: 5.4.11(@types/node@22.8.4)(terser@5.36.0) + '@vitest/pretty-format@2.1.4': + dependencies: + tinyrainbow: 1.2.0 + '@vitest/pretty-format@2.1.5': dependencies: tinyrainbow: 1.2.0 + '@vitest/runner@2.1.4': + dependencies: + '@vitest/utils': 2.1.4 + pathe: 1.1.2 + '@vitest/runner@2.1.5': dependencies: '@vitest/utils': 2.1.5 pathe: 1.1.2 + '@vitest/snapshot@2.1.4': + dependencies: + '@vitest/pretty-format': 2.1.4 + magic-string: 0.30.13 + pathe: 1.1.2 + '@vitest/snapshot@2.1.5': dependencies: '@vitest/pretty-format': 2.1.5 magic-string: 0.30.13 pathe: 1.1.2 + '@vitest/spy@2.1.4': + dependencies: + tinyspy: 3.0.2 + '@vitest/spy@2.1.5': dependencies: tinyspy: 3.0.2 + '@vitest/utils@2.1.4': + dependencies: + '@vitest/pretty-format': 2.1.4 + loupe: 3.1.2 + tinyrainbow: 1.2.0 + '@vitest/utils@2.1.5': dependencies: '@vitest/pretty-format': 2.1.5 @@ -22691,6 +22841,15 @@ snapshots: amp@0.3.1: {} + amqplib@0.10.4: + dependencies: + '@acuminous/bitsyntax': 0.1.2 + buffer-more-ints: 1.0.0 + readable-stream: 1.1.14 + url-parse: 1.5.10 + transitivePeerDependencies: + - supports-color + ansi-align@3.0.1: dependencies: string-width: 4.2.3 @@ -23010,6 +23169,8 @@ snapshots: dependencies: safe-buffer: 5.2.1 + base-x@4.0.0: {} + base-x@5.0.0: {} base64-js@1.5.1: {} @@ -23186,6 +23347,10 @@ snapshots: dependencies: base-x: 3.0.10 + bs58@5.0.0: + dependencies: + base-x: 4.0.0 + bs58@6.0.0: dependencies: base-x: 5.0.0 @@ -23217,6 +23382,8 @@ snapshots: buffer-layout@1.2.2: {} + buffer-more-ints@1.0.0: {} + buffer@5.7.1: dependencies: base64-js: 1.5.1 @@ -24997,12 +25164,21 @@ snapshots: dependencies: eslint: 9.13.0(jiti@2.4.0) - eslint-plugin-vitest@0.5.4(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)): + eslint-plugin-vitest@0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.4(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)): + dependencies: + '@typescript-eslint/utils': 7.18.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) + eslint: 9.13.0(jiti@2.4.0) + optionalDependencies: + vitest: 2.1.4(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0) + transitivePeerDependencies: + - supports-color + - typescript + + eslint-plugin-vitest@0.5.4(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0)): dependencies: '@typescript-eslint/utils': 7.18.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) eslint: 9.13.0(jiti@2.4.0) optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) vitest: 2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0) transitivePeerDependencies: - supports-color @@ -25294,7 +25470,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.4 + debug: 4.3.7(supports-color@5.5.0) get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -28635,6 +28811,8 @@ snapshots: netmask@2.0.2: {} + neverthrow@6.2.2: {} + next-tick@1.1.0: {} no-case@3.0.4: @@ -32797,6 +32975,23 @@ snapshots: - utf-8-validate - zod + vite-node@2.1.4(@types/node@22.8.4)(terser@5.36.0): + dependencies: + cac: 6.7.14 + debug: 4.3.7(supports-color@5.5.0) + pathe: 1.1.2 + vite: 5.4.11(@types/node@22.8.4)(terser@5.36.0) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + vite-node@2.1.5(@types/node@22.8.4)(terser@5.36.0): dependencies: cac: 6.7.14 @@ -32839,6 +33034,42 @@ snapshots: fsevents: 2.3.3 terser: 5.36.0 + vitest@2.1.4(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0): + dependencies: + '@vitest/expect': 2.1.4 + '@vitest/mocker': 2.1.4(vite@5.4.11(@types/node@22.8.4)(terser@5.36.0)) + '@vitest/pretty-format': 2.1.5 + '@vitest/runner': 2.1.4 + '@vitest/snapshot': 2.1.4 + '@vitest/spy': 2.1.4 + '@vitest/utils': 2.1.4 + chai: 5.1.2 + debug: 4.3.7(supports-color@5.5.0) + expect-type: 1.1.0 + magic-string: 0.30.13 + pathe: 1.1.2 + std-env: 3.8.0 + tinybench: 2.9.0 + tinyexec: 0.3.1 + tinypool: 1.0.2 + tinyrainbow: 1.2.0 + vite: 5.4.11(@types/node@22.8.4)(terser@5.36.0) + vite-node: 2.1.4(@types/node@22.8.4)(terser@5.36.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 22.8.4 + jsdom: 25.0.1(bufferutil@4.0.8)(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.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0): dependencies: '@vitest/expect': 2.1.5