diff --git a/apps/sample-app/.env.example b/apps/sample-app/.env.example deleted file mode 100644 index 9a0544f..0000000 --- a/apps/sample-app/.env.example +++ /dev/null @@ -1 +0,0 @@ -RPC_URL= # RPC URL. Example: https://eth.llamarpc.com \ No newline at end of file diff --git a/apps/sample-app/README.md b/apps/sample-app/README.md deleted file mode 100644 index c10cdcf..0000000 --- a/apps/sample-app/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# ts-turborepo-boilerplate: sample-app - -> Note: use this app as reference but preferred way is to re-write app -> from zero instead of refactoring this one. -> When you don't need this anymore, you can delete it - -Sample app that uses [sample-lib](../../packages/sample-lib) Blockchain -provider to fetch Vitalik and Zero address native balance and sums them - -## Setup - -1. Change package name to your own in [`package.json`](./package.json) -2. Install dependencies running `pnpm install` - -### ⚙️ Setting up env variables - -- Create `.env` file and copy paste `.env.example` content in there. - -``` -$ cp .env.example .env -``` - -Available options: -| Name | Description | Default | Required | Notes | -|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------|-----------|----------------------------------|-----------------------------------------------------------------| -| `RPC_URL` | RPC URL to use for querying balances | N/A | Yes | | - -## Available Scripts - -Available scripts that can be run using `pnpm`: - -| Script | Description | -| ------------- | ------------------------------------------------------- | -| `build` | Build library using tsc | -| `check-types` | Check types issues using tsc | -| `clean` | Remove `dist` folder | -| `lint` | Run ESLint to check for coding standards | -| `lint:fix` | Run linter and automatically fix code formatting issues | -| `format` | Check code formatting and style using Prettier | -| `format:fix` | Run formatter and automatically fix issues | -| `start` | Run the app | -| `test` | Run tests using vitest | -| `test:cov` | Run tests with coverage report | diff --git a/apps/sample-app/package.json b/apps/sample-app/package.json deleted file mode 100644 index 4c23d45..0000000 --- a/apps/sample-app/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@ts-turborepo-boilerplate/sample-app", - "version": "0.0.1", - "type": "module", - "main": "./dist/index.js", - "scripts": { - "build": "tsc -p tsconfig.build.json", - "check-types": "tsc --noEmit -p ./tsconfig.json", - "clean": "rm -rf dist", - "format": "prettier --check \"{src,test}/**/*.{js,ts,json}\"", - "format:fix": "prettier --write \"{src,test}/**/*.{js,ts,json}\"", - "lint": "eslint \"{src,test}/**/*.{js,ts,json}\"", - "lint:fix": "pnpm lint --fix", - "start": "node dist/index.js", - "test": "vitest run --config vitest.config.ts --passWithNoTests", - "test:cov": "vitest run --config vitest.config.ts --coverage" - }, - "dependencies": { - "@ts-turborepo-boilerplate/sample-lib": "workspace:*", - "dotenv": "16.4.5", - "zod": "3.23.8" - } -} diff --git a/apps/sample-app/src/config/env.ts b/apps/sample-app/src/config/env.ts deleted file mode 100644 index 3aab646..0000000 --- a/apps/sample-app/src/config/env.ts +++ /dev/null @@ -1,18 +0,0 @@ -import dotenv from "dotenv"; -import { z } from "zod"; - -dotenv.config(); - -const validationSchema = z.object({ - RPC_URL: z.string().url(), -}); - -const env = validationSchema.safeParse(process.env); - -if (!env.success) { - console.error(env.error.issues.map((issue) => JSON.stringify(issue)).join("\n")); - process.exit(1); -} - -export const environment = env.data; -export type Environment = z.infer; diff --git a/apps/sample-app/src/config/index.ts b/apps/sample-app/src/config/index.ts deleted file mode 100644 index 39f5fe2..0000000 --- a/apps/sample-app/src/config/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./env.js"; diff --git a/apps/sample-app/src/index.ts b/apps/sample-app/src/index.ts deleted file mode 100644 index 8164e40..0000000 --- a/apps/sample-app/src/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { inspect } from "util"; -import { BlockchainProvider, IBlockchainProvider } from "@ts-turborepo-boilerplate/sample-lib"; - -import { environment } from "./config/env.js"; -import { BalancesController } from "./stats/index.js"; - -const main = async (): Promise => { - const dataProvider: IBlockchainProvider = new BlockchainProvider(environment.RPC_URL); - - const balanceController = new BalancesController(dataProvider); - - const vitalikAddress = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; - const zeroAddress = "0x0000000000000000000000000000000000000000"; - - const balance = await balanceController.addBalances(vitalikAddress, zeroAddress); - - console.log(`Vitalik's and Zero summed balance is: ${balance}`); -}; - -process.on("unhandledRejection", (reason, p) => { - console.error(`Unhandled Rejection at: \n${inspect(p, undefined, 100)}, \nreason: ${reason}`); -}); - -process.on("uncaughtException", (error: Error) => { - console.error( - `An uncaught exception occurred: ${error}\n` + `Exception origin: ${error.stack}`, - ); -}); - -main().catch((err) => { - console.error(`Caught error in main handler: ${err}`); -}); diff --git a/apps/sample-app/src/stats/balances.controller.ts b/apps/sample-app/src/stats/balances.controller.ts deleted file mode 100644 index 80b2aa3..0000000 --- a/apps/sample-app/src/stats/balances.controller.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Address, IBlockchainProvider } from "@ts-turborepo-boilerplate/sample-lib"; - -export class BalancesController { - constructor(private readonly blockchainProvider: IBlockchainProvider) {} - - public async addBalances(addressA: Address, addressB: Address): Promise { - const balances = await Promise.all([ - this.blockchainProvider.getBalance(addressA), - this.blockchainProvider.getBalance(addressB), - ]); - - return balances[0] + balances[1]; - } -} diff --git a/apps/sample-app/src/stats/index.ts b/apps/sample-app/src/stats/index.ts deleted file mode 100644 index f445b01..0000000 --- a/apps/sample-app/src/stats/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./balances.controller.js"; diff --git a/apps/sample-app/test/stats/controller/balances.controller.spec.ts b/apps/sample-app/test/stats/controller/balances.controller.spec.ts deleted file mode 100644 index bcbf90f..0000000 --- a/apps/sample-app/test/stats/controller/balances.controller.spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { IBlockchainProvider } from "@ts-turborepo-boilerplate/sample-lib"; -import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; - -import { BalancesController } from "../../../src/stats/index.js"; - -describe("BalancesController", () => { - let balancesController: BalancesController; - let blockchainProviderMock: IBlockchainProvider; - - beforeEach(() => { - blockchainProviderMock = { - getBalance: vi.fn(), - }; - balancesController = new BalancesController(blockchainProviderMock); - }); - - afterEach(() => { - vi.clearAllMocks(); - }); - - describe("addBalances", () => { - it("should return the sum of balances for two addresses", async () => { - const addressA = "0x1234567890abcdef"; - const addressB = "0xabcdef1234567890"; - const balanceA = BigInt(1000000000000000000); - const balanceB = BigInt(2000000000000000000); - - vi.spyOn(blockchainProviderMock, "getBalance").mockResolvedValueOnce(balanceA); - vi.spyOn(blockchainProviderMock, "getBalance").mockResolvedValueOnce(balanceB); - - const result = await balancesController.addBalances(addressA, addressB); - - expect(result).toEqual(balanceA + balanceB); - expect(blockchainProviderMock.getBalance).toHaveBeenCalledTimes(2); - expect(blockchainProviderMock.getBalance).toHaveBeenCalledWith(addressA); - expect(blockchainProviderMock.getBalance).toHaveBeenCalledWith(addressB); - }); - }); -}); diff --git a/apps/sample-app/tsconfig.build.json b/apps/sample-app/tsconfig.build.json deleted file mode 100644 index da6827f..0000000 --- a/apps/sample-app/tsconfig.build.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig.build.json", - "compilerOptions": { - "outDir": "dist" - }, - "include": ["src/**/*"], - "exclude": ["node_modules", "dist", "tests"] -} diff --git a/packages/sample-lib/src/exceptions/index.ts b/packages/sample-lib/src/exceptions/index.ts deleted file mode 100644 index 898cc47..0000000 --- a/packages/sample-lib/src/exceptions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./invalidRpcUrl.exception.js"; diff --git a/packages/sample-lib/src/exceptions/invalidRpcUrl.exception.ts b/packages/sample-lib/src/exceptions/invalidRpcUrl.exception.ts deleted file mode 100644 index 79527bf..0000000 --- a/packages/sample-lib/src/exceptions/invalidRpcUrl.exception.ts +++ /dev/null @@ -1,6 +0,0 @@ -export class InvalidRpcUrl extends Error { - constructor(url: string) { - super(`${url} is invalid`); - this.name = "InvalidRpcUrl"; - } -} diff --git a/packages/sample-lib/src/external.ts b/packages/sample-lib/src/external.ts deleted file mode 100644 index bd4710b..0000000 --- a/packages/sample-lib/src/external.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type { IBlockchainProvider, Address } from "./internal.js"; - -export { InvalidRpcUrl } from "./internal.js"; - -export { BlockchainProvider } from "./internal.js"; diff --git a/packages/sample-lib/src/interfaces/blockchainProvider.interface.ts b/packages/sample-lib/src/interfaces/blockchainProvider.interface.ts deleted file mode 100644 index 6a03403..0000000 --- a/packages/sample-lib/src/interfaces/blockchainProvider.interface.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Address } from "../internal.js"; - -/** - * Represents an interface for a blockchain provider. - */ -export interface IBlockchainProvider { - /** - * Retrieves the balance of the specified address. - * @param {Address} address The address for which to retrieve the balance. - * @returns {Promise} A Promise that resolves to the balance of the address. - */ - getBalance(address: Address): Promise; -} diff --git a/packages/sample-lib/src/interfaces/index.ts b/packages/sample-lib/src/interfaces/index.ts deleted file mode 100644 index 21f7f75..0000000 --- a/packages/sample-lib/src/interfaces/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./blockchainProvider.interface.js"; diff --git a/packages/sample-lib/src/internal.ts b/packages/sample-lib/src/internal.ts deleted file mode 100644 index 9f7bdbf..0000000 --- a/packages/sample-lib/src/internal.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type { Address } from "viem"; -export * from "./exceptions/index.js"; -export * from "./interfaces/index.js"; -export * from "./providers/index.js"; diff --git a/packages/sample-lib/src/providers/blockchainProvider.ts b/packages/sample-lib/src/providers/blockchainProvider.ts deleted file mode 100644 index a224ede..0000000 --- a/packages/sample-lib/src/providers/blockchainProvider.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { Address, Chain, HttpTransport } from "viem"; -import { createPublicClient, http } from "viem"; -import { mainnet } from "viem/chains"; - -import { IBlockchainProvider, InvalidRpcUrl } from "../internal.js"; - -export class BlockchainProvider implements IBlockchainProvider { - private client: ReturnType>; - - constructor(rpcUrl: string) { - // dummy check for the rpcUrl - if (!rpcUrl || !rpcUrl.startsWith("http")) { - throw new InvalidRpcUrl(rpcUrl); - } - - this.client = createPublicClient({ - chain: mainnet, - transport: http(rpcUrl), - }); - } - - /** @inheritdoc */ - async getBalance(address: Address): Promise { - return this.client.getBalance({ address }); - } -} diff --git a/packages/sample-lib/src/providers/index.ts b/packages/sample-lib/src/providers/index.ts deleted file mode 100644 index ce52aa2..0000000 --- a/packages/sample-lib/src/providers/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./blockchainProvider.js"; diff --git a/packages/sample-lib/test/unit/blockchainProvider.spec.ts b/packages/sample-lib/test/unit/blockchainProvider.spec.ts deleted file mode 100644 index 02f3a56..0000000 --- a/packages/sample-lib/test/unit/blockchainProvider.spec.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; - -import { BlockchainProvider, InvalidRpcUrl } from "../../src/internal.js"; - -const mockClient = { - getBalance: vi.fn(), -}; - -vi.mock("viem", async (importOriginal) => { - const actual = await importOriginal(); - return { - ...actual, - createPublicClient: vi.fn().mockImplementation(() => mockClient), - http: vi.fn(), - }; -}); - -describe("BlockchainProvider", () => { - let blockchainProvider: BlockchainProvider; - - beforeEach(() => { - blockchainProvider = new BlockchainProvider("http://example.com/rpc"); - }); - - afterEach(() => { - vi.clearAllMocks(); - }); - - describe("constructor", () => { - it("creates a client with the specified rpcUrl", () => { - const provider = new BlockchainProvider("http://example.com/rpc"); - expect(provider).toBeDefined(); - expect(provider["client"]).toBeDefined(); - }); - - it("throws an error for an invalid rpcUrl", () => { - expect(() => new BlockchainProvider("invalid-url")).toThrow(InvalidRpcUrl); - }); - }); - - describe("getBalance", () => { - it("returns the balance for a valid address", async () => { - const address = "0x1234567890abcdef"; - const expectedBalance = BigInt(1000000000000000000); - vi.spyOn(mockClient, "getBalance").mockResolvedValue(expectedBalance); - - const result = await blockchainProvider.getBalance(address); - - expect(result).toEqual(expectedBalance); - }); - }); -}); diff --git a/packages/sample-lib/tsconfig.json b/packages/sample-lib/tsconfig.json deleted file mode 100644 index 66bb87a..0000000 --- a/packages/sample-lib/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src/**/*"] -} diff --git a/packages/sample-lib/vitest.config.ts b/packages/sample-lib/vitest.config.ts deleted file mode 100644 index 8e1bbf4..0000000 --- a/packages/sample-lib/vitest.config.ts +++ /dev/null @@ -1,22 +0,0 @@ -import path from "path"; -import { configDefaults, defineConfig } from "vitest/config"; - -export default defineConfig({ - test: { - globals: true, // Use Vitest's global API without importing it in each file - environment: "node", // Use the Node.js environment - include: ["test/**/*.spec.ts"], // Include test files - exclude: ["node_modules", "dist"], // Exclude certain directories - coverage: { - provider: "v8", - reporter: ["text", "json", "html"], // Coverage reporters - exclude: ["node_modules", "dist", "src/index.ts", ...configDefaults.exclude], // Files to exclude from coverage - }, - }, - resolve: { - alias: { - // Setup path alias based on tsconfig paths - "@": path.resolve(__dirname, "src"), - }, - }, -}); diff --git a/packages/sample-lib/README.md b/packages/shared/README.md similarity index 100% rename from packages/sample-lib/README.md rename to packages/shared/README.md diff --git a/packages/sample-lib/package.json b/packages/shared/package.json similarity index 92% rename from packages/sample-lib/package.json rename to packages/shared/package.json index 6703fb4..45674ad 100644 --- a/packages/sample-lib/package.json +++ b/packages/shared/package.json @@ -1,5 +1,5 @@ { - "name": "@ts-turborepo-boilerplate/sample-lib", + "name": "@grants-stack-indexer/shared", "version": "0.0.1", "private": true, "description": "", @@ -28,6 +28,6 @@ "test:cov": "vitest run --config vitest.config.ts --coverage" }, "dependencies": { - "viem": "2.21.4" + "viem": "2.21.19" } } diff --git a/packages/shared/src/external.ts b/packages/shared/src/external.ts new file mode 100644 index 0000000..10fab87 --- /dev/null +++ b/packages/shared/src/external.ts @@ -0,0 +1 @@ +export type { AnyProtocolEvent, Address } from "./internal.js"; diff --git a/packages/sample-lib/src/index.ts b/packages/shared/src/index.ts similarity index 100% rename from packages/sample-lib/src/index.ts rename to packages/shared/src/index.ts diff --git a/packages/shared/src/internal.ts b/packages/shared/src/internal.ts new file mode 100644 index 0000000..2844bb7 --- /dev/null +++ b/packages/shared/src/internal.ts @@ -0,0 +1,2 @@ +export type { Address } from "viem"; +export * from "./types/index.js"; diff --git a/packages/shared/src/types/events/allo.ts b/packages/shared/src/types/events/allo.ts new file mode 100644 index 0000000..8e5a39d --- /dev/null +++ b/packages/shared/src/types/events/allo.ts @@ -0,0 +1,20 @@ +import { Address } from "../../internal.js"; + +/** + * This type is used to represent a Allo events. + */ +export type AlloEvent = "PoolCreated"; + +/** + * This type maps Allo events to their respective parameters. + */ +export type AlloEventParams = T extends "PoolCreated" + ? PoolCreatedParams + : never; + +// ============================================================================= +// =============================== Event Parameters ============================ +// ============================================================================= +export type PoolCreatedParams = { + contractAddress: Address; +}; diff --git a/packages/shared/src/types/events/common.ts b/packages/shared/src/types/events/common.ts new file mode 100644 index 0000000..e64fb7e --- /dev/null +++ b/packages/shared/src/types/events/common.ts @@ -0,0 +1,44 @@ +import { Address } from "../../internal.js"; +import { AlloEvent, AlloEventParams, StrategyEvent, StrategyEventParams } from "./index.js"; + +export type ContractName = "Strategy" | "Allo"; +export type AnyEvent = StrategyEvent | AlloEvent; + +/** + * This type is used to map contract names to their respective event names. + */ +export type ContractToEventName = T extends "Allo" + ? AlloEvent + : T extends "Strategy" + ? StrategyEvent + : never; + +/** + * This type is used to map contract names to their respective event parameters. + */ +export type EventParams> = T extends "Allo" + ? E extends AlloEvent + ? AlloEventParams + : never + : T extends "Strategy" + ? E extends StrategyEvent + ? StrategyEventParams + : never + : never; + +/** + * This type is used to represent a protocol event. + */ +export type ProtocolEvent> = { + block_number: number; + block_timestamp: number; + chain_id: number; + contract_name: T; + event_id: string; + event_name: E; + log_index: number; + params: EventParams; + src_address: Address; +}; + +export type AnyProtocolEvent = ProtocolEvent>; diff --git a/packages/shared/src/types/events/index.ts b/packages/shared/src/types/events/index.ts new file mode 100644 index 0000000..dfe6730 --- /dev/null +++ b/packages/shared/src/types/events/index.ts @@ -0,0 +1,4 @@ +export * from "./allo.js"; +export * from "./common.js"; +export * from "./registry.js"; +export * from "./strategy.js"; diff --git a/packages/shared/src/types/events/registry.ts b/packages/shared/src/types/events/registry.ts new file mode 100644 index 0000000..46e4ac1 --- /dev/null +++ b/packages/shared/src/types/events/registry.ts @@ -0,0 +1,6 @@ +//TODO: remove comment once we support registry events +// export type RegistryEvent = +// | "ProfileCreated" +// | "ProfileMetadataUpdated" +// | "ProfileNameUpdated" +// | "ProfileOwnerUpdated"; diff --git a/packages/shared/src/types/events/strategy.ts b/packages/shared/src/types/events/strategy.ts new file mode 100644 index 0000000..e52e79d --- /dev/null +++ b/packages/shared/src/types/events/strategy.ts @@ -0,0 +1,34 @@ +import { Address } from "../../internal.js"; + +/** + * This type is used to represent a Strategy events. + */ +export type StrategyEvent = "Registered" | "TimestampsUpdated" | "AllocatedWithToken"; +/** + * This type maps Strategy events to their respective parameters. + */ +export type StrategyEventParams = T extends "Registered" + ? RegisteredParams + : T extends "TimestampsUpdated" + ? TimestampsUpdatedParams + : T extends "AllocatedWithToken" + ? AllocatedWithTokenParams + : never; + +// ============================================================================= +// =============================== Event Parameters ============================ +// ============================================================================= +export type RegisteredParams = { + contractAddress: Address; +}; + +export type TimestampsUpdatedParams = { + contractAddress: Address; + timestamp: number; +}; + +export type AllocatedWithTokenParams = { + contractAddress: Address; + tokenAddress: Address; + amount: number; +}; diff --git a/packages/shared/src/types/index.ts b/packages/shared/src/types/index.ts new file mode 100644 index 0000000..0e54746 --- /dev/null +++ b/packages/shared/src/types/index.ts @@ -0,0 +1 @@ +export * from "./events/index.js"; diff --git a/packages/shared/test/index.spec.ts b/packages/shared/test/index.spec.ts new file mode 100644 index 0000000..e383c0a --- /dev/null +++ b/packages/shared/test/index.spec.ts @@ -0,0 +1,5 @@ +import { describe, it } from "vitest"; + +describe("dummy", () => { + it.skip("dummy", () => {}); +}); diff --git a/packages/sample-lib/tsconfig.build.json b/packages/shared/tsconfig.build.json similarity index 100% rename from packages/sample-lib/tsconfig.build.json rename to packages/shared/tsconfig.build.json diff --git a/apps/sample-app/tsconfig.json b/packages/shared/tsconfig.json similarity index 100% rename from apps/sample-app/tsconfig.json rename to packages/shared/tsconfig.json diff --git a/apps/sample-app/vitest.config.ts b/packages/shared/vitest.config.ts similarity index 100% rename from apps/sample-app/vitest.config.ts rename to packages/shared/vitest.config.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3a9a1b3..c099c36 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -96,23 +96,26 @@ importers: specifier: 5.2.2 version: 5.2.2 - apps/sample-app: + packages/data-flow: dependencies: - "@ts-turborepo-boilerplate/sample-lib": + viem: + specifier: 2.21.19 + version: 2.21.19(typescript@5.5.4)(zod@3.23.8) + + packages/indexer-client: + dependencies: + "@grants-stack-indexer/shared": specifier: workspace:* - version: link:../../packages/sample-lib - dotenv: - specifier: 16.4.5 - version: 16.4.5 - zod: - specifier: 3.23.8 - version: 3.23.8 + version: link:../shared + graphql-request: + specifier: 7.1.0 + version: 7.1.0(graphql@16.9.0) - packages/sample-lib: + packages/shared: dependencies: viem: - specifier: 2.21.4 - version: 2.21.4(typescript@5.5.4)(zod@3.23.8) + specifier: 2.21.19 + version: 2.21.19(typescript@5.5.4)(zod@3.23.8) packages: "@adraffy/ens-normalize@1.10.0": @@ -121,6 +124,12 @@ packages: integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==, } + "@adraffy/ens-normalize@1.11.0": + resolution: + { + integrity: sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==, + } + "@ampproject/remapping@2.3.0": resolution: { @@ -620,6 +629,14 @@ packages: } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + "@graphql-typed-document-node/core@3.2.0": + resolution: + { + integrity: sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==, + } + 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 + "@humanwhocodes/config-array@0.11.14": resolution: { @@ -707,29 +724,35 @@ packages: integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==, } - "@noble/curves@1.2.0": + "@molt/command@0.9.0": resolution: { - integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==, + integrity: sha512-1JI8dAlpqlZoXyKWVQggX7geFNPxBpocHIXQCsnxDjKy+3WX4SGyZVJXuLlqRRrX7FmQCuuMAfx642ovXmPA9g==, } - "@noble/curves@1.4.0": + "@molt/types@0.2.0": resolution: { - integrity: sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==, + integrity: sha512-p6ChnEZDGjg9PYPec9BK6Yp5/DdSrYQvXTBAtgrnqX6N36cZy37ql1c8Tc5LclfIYBNG7EZp8NBcRTYJwyi84g==, } - "@noble/hashes@1.3.2": + "@noble/curves@1.2.0": resolution: { - integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==, + integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==, } - engines: { node: ">= 16" } - "@noble/hashes@1.4.0": + "@noble/curves@1.6.0": + resolution: + { + integrity: sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==, + } + engines: { node: ^14.21.3 || >=16 } + + "@noble/hashes@1.3.2": resolution: { - integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==, + integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==, } engines: { node: ">= 16" } @@ -909,10 +932,10 @@ packages: integrity: sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==, } - "@scure/bip32@1.4.0": + "@scure/bip32@1.5.0": resolution: { - integrity: sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==, + integrity: sha512-8EnFYkqEQdnkuGBVpCzKxyIwDCBLDVj3oiX0EKUFre/tOjL/Hqba1D6n/8RcmaQy4f95qQFrO2A8Sr6ybh4NRw==, } "@scure/bip39@1.4.0": @@ -1132,10 +1155,10 @@ packages: } hasBin: true - abitype@1.0.5: + abitype@1.0.6: resolution: { - integrity: sha512-YzDhti7cjlfaBhHutMaboYB21Ha3rXR9QTkNJFzYC4kC8YclaiwPBBBJY8ejFdu2wnJeZCVZSMlQJ7fi8S6hsw==, + integrity: sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A==, } peerDependencies: typescript: ">=5.0.4" @@ -1187,6 +1210,12 @@ packages: integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==, } + alge@0.8.1: + resolution: + { + integrity: sha512-kiV9nTt+XIauAXsowVygDxMZLplZxDWt0W8plE/nB32/V2ziM/P/TxDbSVK7FYIUt2Xo16h3/htDh199LNPCKQ==, + } + ansi-colors@4.1.1: resolution: { @@ -1685,13 +1714,6 @@ packages: } engines: { node: ">=8" } - dotenv@16.4.5: - resolution: - { - integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==, - } - engines: { node: ">=12" } - eastasianwidth@0.2.0: resolution: { @@ -2162,6 +2184,32 @@ packages: integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==, } + graphql-request@7.1.0: + resolution: + { + integrity: sha512-Ouu/lYVFhARS1aXeZoVJWnGT6grFJXTLwXJuK4mUGGRo0EUk1JkyYp43mdGmRgUVezpRm6V5Sq3t8jBDQcajng==, + } + hasBin: true + peerDependencies: + "@dprint/formatter": ^0.3.0 + "@dprint/typescript": ^0.91.1 + dprint: ^0.46.2 + graphql: 14 - 16 + peerDependenciesMeta: + "@dprint/formatter": + optional: true + "@dprint/typescript": + optional: true + dprint: + optional: true + + graphql@16.9.0: + resolution: + { + integrity: sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==, + } + engines: { node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0 } + has-flag@3.0.0: resolution: { @@ -2361,10 +2409,10 @@ packages: integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==, } - isows@1.0.4: + isows@1.0.6: resolution: { - integrity: sha512-hEzjY+x9u9hPmBom9IIAqdJCwNLax+xrPb51vEPpERoFlIxgmZcHzsT5jKG06nvInKOBGvReAVz80Umed5CczQ==, + integrity: sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw==, } peerDependencies: ws: "*" @@ -2544,6 +2592,12 @@ packages: integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==, } + lodash.ismatch@4.4.0: + resolution: + { + integrity: sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==, + } + lodash.isplainobject@4.0.6: resolution: { @@ -3017,6 +3071,19 @@ packages: } engines: { node: ">=8.10.0" } + readline-sync@1.4.10: + resolution: + { + integrity: sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==, + } + engines: { node: ">= 0.8.0" } + + remeda@1.61.0: + resolution: + { + integrity: sha512-caKfSz9rDeSKBQQnlJnVW3mbVdFgxgGWQKq1XlFokqjf+hQD5gxutLGTTY2A/x24UxVyJe9gH5fAkFI63ULw4A==, + } + require-directory@2.1.1: resolution: { @@ -3228,6 +3295,13 @@ packages: } engines: { node: ">=0.6.19" } + string-length@6.0.0: + resolution: + { + integrity: sha512-1U361pxZHEQ+FeSjzqRpV+cu2vTzYeWeafXFLykiFlv4Vc0n3njgU8HrMbyik5uwm77naWMuVG8fhEF+Ovb1Kg==, + } + engines: { node: ">=16" } + string-width@4.2.3: resolution: { @@ -3423,6 +3497,12 @@ packages: engines: { node: ">=4.2.0" } hasBin: true + ts-toolbelt@9.6.0: + resolution: + { + integrity: sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==, + } + tsconfig-paths@3.15.0: resolution: { @@ -3517,6 +3597,13 @@ packages: } engines: { node: ">=10" } + type-fest@4.26.1: + resolution: + { + integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==, + } + engines: { node: ">=16" } + typescript@5.2.2: resolution: { @@ -3567,10 +3654,10 @@ packages: integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==, } - viem@2.21.4: + viem@2.21.19: resolution: { - integrity: sha512-4E61XWhErjuXh5ObEoosKSy4iMvYnkuQq9jGLW5Isod68dNrENnyNV0QlVpn0LB3qunJ4ZMFMhYdfTjETqe7cQ==, + integrity: sha512-FdlkN+UI1IU5sYOmzvygkxsUNjDRD5YHht3gZFu2X9xFv6Z3h9pXq9ycrYQ3F17lNfb41O2Ot4/aqbUkwOv9dA==, } peerDependencies: typescript: ">=5.0.4" @@ -3648,10 +3735,10 @@ packages: jsdom: optional: true - webauthn-p256@0.0.5: + webauthn-p256@0.0.10: resolution: { - integrity: sha512-drMGNWKdaixZNobeORVIqq7k5DsRC9FnG201K2QjeOoQLmtSDaSsVZdkg6n5jUALJKcAG++zBPJXmv6hy0nWFg==, + integrity: sha512-EeYD+gmIT80YkSIDb2iWq0lq2zbHo1CxHlQTeJ+KkCILWpVy3zASH3ByD4bopzfk0uCwXxLqKGLqp2W4O28VFA==, } which@2.0.2: @@ -3710,10 +3797,10 @@ packages: integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==, } - ws@8.17.1: + ws@8.18.0: resolution: { - integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==, + integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==, } engines: { node: ">=10.0.0" } peerDependencies: @@ -3833,6 +3920,8 @@ packages: snapshots: "@adraffy/ens-normalize@1.10.0": {} + "@adraffy/ens-normalize@1.11.0": {} + "@ampproject/remapping@2.3.0": dependencies: "@jridgewell/gen-mapping": 0.3.5 @@ -4159,6 +4248,10 @@ snapshots: "@eslint/js@8.56.0": {} + "@graphql-typed-document-node/core@3.2.0(graphql@16.9.0)": + dependencies: + graphql: 16.9.0 + "@humanwhocodes/config-array@0.11.14": dependencies: "@humanwhocodes/object-schema": 2.0.3 @@ -4216,18 +4309,34 @@ snapshots: "@jridgewell/resolve-uri": 3.1.2 "@jridgewell/sourcemap-codec": 1.5.0 + "@molt/command@0.9.0": + dependencies: + "@molt/types": 0.2.0 + alge: 0.8.1 + chalk: 5.3.0 + lodash.camelcase: 4.3.0 + lodash.snakecase: 4.1.1 + readline-sync: 1.4.10 + string-length: 6.0.0 + strip-ansi: 7.1.0 + ts-toolbelt: 9.6.0 + type-fest: 4.26.1 + zod: 3.23.8 + + "@molt/types@0.2.0": + dependencies: + ts-toolbelt: 9.6.0 + "@noble/curves@1.2.0": dependencies: "@noble/hashes": 1.3.2 - "@noble/curves@1.4.0": + "@noble/curves@1.6.0": dependencies: - "@noble/hashes": 1.4.0 + "@noble/hashes": 1.5.0 "@noble/hashes@1.3.2": {} - "@noble/hashes@1.4.0": {} - "@noble/hashes@1.5.0": {} "@nodelib/fs.scandir@2.1.5": @@ -4297,10 +4406,10 @@ snapshots: "@scure/base@1.1.9": {} - "@scure/bip32@1.4.0": + "@scure/bip32@1.5.0": dependencies: - "@noble/curves": 1.4.0 - "@noble/hashes": 1.4.0 + "@noble/curves": 1.6.0 + "@noble/hashes": 1.5.0 "@scure/base": 1.1.9 "@scure/bip39@1.4.0": @@ -4476,7 +4585,7 @@ snapshots: jsonparse: 1.3.1 through: 2.3.8 - abitype@1.0.5(typescript@5.5.4)(zod@3.23.8): + abitype@1.0.6(typescript@5.5.4)(zod@3.23.8): optionalDependencies: typescript: 5.5.4 zod: 3.23.8 @@ -4507,6 +4616,13 @@ snapshots: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 + alge@0.8.1: + dependencies: + lodash.ismatch: 4.4.0 + remeda: 1.61.0 + ts-toolbelt: 9.6.0 + zod: 3.23.8 + ansi-colors@4.1.1: {} ansi-escapes@7.0.0: @@ -4768,8 +4884,6 @@ snapshots: dependencies: is-obj: 2.0.0 - dotenv@16.4.5: {} - eastasianwidth@0.2.0: {} electron-to-chromium@1.5.18: {} @@ -5096,6 +5210,15 @@ snapshots: graphemer@1.4.0: {} + graphql-request@7.1.0(graphql@16.9.0): + dependencies: + "@graphql-typed-document-node/core": 3.2.0(graphql@16.9.0) + "@molt/command": 0.9.0 + graphql: 16.9.0 + zod: 3.23.8 + + graphql@16.9.0: {} + has-flag@3.0.0: {} has-flag@4.0.0: {} @@ -5168,9 +5291,9 @@ snapshots: isexe@2.0.0: {} - isows@1.0.4(ws@8.17.1): + isows@1.0.6(ws@8.18.0): dependencies: - ws: 8.17.1 + ws: 8.18.0 istanbul-lib-coverage@3.2.2: {} @@ -5275,6 +5398,8 @@ snapshots: lodash.camelcase@4.3.0: {} + lodash.ismatch@4.4.0: {} + lodash.isplainobject@4.0.6: {} lodash.kebabcase@4.1.1: {} @@ -5516,6 +5641,10 @@ snapshots: dependencies: picomatch: 2.3.1 + readline-sync@1.4.10: {} + + remeda@1.61.0: {} + require-directory@2.1.1: {} require-from-string@2.0.2: {} @@ -5627,6 +5756,10 @@ snapshots: string-argv@0.3.2: {} + string-length@6.0.0: + dependencies: + strip-ansi: 7.1.0 + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -5743,6 +5876,8 @@ snapshots: source-map-support: 0.5.21 yn: 2.0.0 + ts-toolbelt@9.6.0: {} + tsconfig-paths@3.15.0: dependencies: "@types/json5": 0.0.29 @@ -5790,6 +5925,8 @@ snapshots: type-fest@0.20.2: {} + type-fest@4.26.1: {} + typescript@5.2.2: {} typescript@5.5.4: {} @@ -5810,17 +5947,17 @@ snapshots: v8-compile-cache-lib@3.0.1: {} - viem@2.21.4(typescript@5.5.4)(zod@3.23.8): + viem@2.21.19(typescript@5.5.4)(zod@3.23.8): dependencies: - "@adraffy/ens-normalize": 1.10.0 - "@noble/curves": 1.4.0 - "@noble/hashes": 1.4.0 - "@scure/bip32": 1.4.0 + "@adraffy/ens-normalize": 1.11.0 + "@noble/curves": 1.6.0 + "@noble/hashes": 1.5.0 + "@scure/bip32": 1.5.0 "@scure/bip39": 1.4.0 - abitype: 1.0.5(typescript@5.5.4)(zod@3.23.8) - isows: 1.0.4(ws@8.17.1) - webauthn-p256: 0.0.5 - ws: 8.17.1 + abitype: 1.0.6(typescript@5.5.4)(zod@3.23.8) + isows: 1.0.6(ws@8.18.0) + webauthn-p256: 0.0.10 + ws: 8.18.0 optionalDependencies: typescript: 5.5.4 transitivePeerDependencies: @@ -5888,10 +6025,10 @@ snapshots: - supports-color - terser - webauthn-p256@0.0.5: + webauthn-p256@0.0.10: dependencies: - "@noble/curves": 1.4.0 - "@noble/hashes": 1.4.0 + "@noble/curves": 1.6.0 + "@noble/hashes": 1.5.0 which@2.0.2: dependencies: @@ -5926,7 +6063,7 @@ snapshots: wrappy@1.0.2: {} - ws@8.17.1: {} + ws@8.18.0: {} ws@8.5.0: {}