diff --git a/goat.code-workspace b/goat.code-workspace index 52df73996..c4b4b0172 100644 --- a/goat.code-workspace +++ b/goat.code-workspace @@ -51,6 +51,10 @@ "name": "[Wallet] πŸ€ crossmint", "path": "./typescript/packages/wallets/crossmint" }, + { + "name": "[Wallet] πŸͺͺ chromia", + "path": "./typescript/packages/wallets/chromia" + }, { "name": "[Wallet] 🌞 solana", "path": "./typescript/packages/wallets/solana" diff --git a/typescript/.changeset/spotty-yaks-laugh.md b/typescript/.changeset/spotty-yaks-laugh.md new file mode 100644 index 000000000..b20a39f2e --- /dev/null +++ b/typescript/.changeset/spotty-yaks-laugh.md @@ -0,0 +1,7 @@ +--- +"goat-examples-vercel-ai-chromia": minor +"@goat-sdk/wallet-chromia": minor +"@goat-sdk/core": minor +--- + +Added Chromia and send-chr tools diff --git a/typescript/examples/vercel-ai/chromia/.env.template b/typescript/examples/vercel-ai/chromia/.env.template new file mode 100644 index 000000000..5700b2b84 --- /dev/null +++ b/typescript/examples/vercel-ai/chromia/.env.template @@ -0,0 +1,2 @@ +OPENAI_API_KEY= +EVM_PRIVATE_KEY= \ No newline at end of file diff --git a/typescript/examples/vercel-ai/chromia/README.md b/typescript/examples/vercel-ai/chromia/README.md new file mode 100644 index 000000000..fe597983b --- /dev/null +++ b/typescript/examples/vercel-ai/chromia/README.md @@ -0,0 +1,15 @@ +# Vercel AI with Chromia Example + +## Setup + +Copy the `.env.template` and populate with your values. + +``` +cp .env.template .env +``` + +## Usage + +``` +npx ts-node index.ts +``` diff --git a/typescript/examples/vercel-ai/chromia/index.ts b/typescript/examples/vercel-ai/chromia/index.ts new file mode 100644 index 000000000..9db230f41 --- /dev/null +++ b/typescript/examples/vercel-ai/chromia/index.ts @@ -0,0 +1,51 @@ +import { openai } from "@ai-sdk/openai"; +import { generateText } from "ai"; +import { getOnChainTools } from "@goat-sdk/adapter-vercel-ai"; +import { createClient } from "postchain-client"; +import { CHROMIA_MAINNET_BRID, chromia } from "@goat-sdk/wallet-chromia"; +import { createConnection, createInMemoryEvmKeyStore, createKeyStoreInteractor } from "@chromia/ft4"; +import { sendCHR } from "@goat-sdk/core"; + +require("dotenv").config(); + +const privateKey = process.env.EVM_PRIVATE_KEY; + +if (!privateKey) { + throw new Error("EVM_PRIVATE_KEY is not set in the environment"); +} + +(async () => { + const chromiaClient = await createClient({ + nodeUrlPool: ["https://system.chromaway.com:7740"], + blockchainRid: CHROMIA_MAINNET_BRID.ECONOMY_CHAIN + }); + const connection = createConnection(chromiaClient); + const evmKeyStore = createInMemoryEvmKeyStore({ + privKey: privateKey, + } as any); + const keystoreInteractor = createKeyStoreInteractor(chromiaClient, evmKeyStore) + const accounts = await keystoreInteractor.getAccounts(); + const accountAddress = accounts[0].id.toString("hex"); + console.log("ACCOUNT ADDRESS: ", accountAddress); + + const tools = await getOnChainTools({ + wallet: chromia({ + client: chromiaClient, + accountAddress, + keystoreInteractor, + connection + }), + plugins: [ + sendCHR() + ], + }); + + const result = await generateText({ + model: openai("gpt-4o-mini"), + tools: tools, + maxSteps: 5, + prompt: "send 0.0001 CHR to ", + }); + + console.log(result.text); +})(); diff --git a/typescript/examples/vercel-ai/chromia/package.json b/typescript/examples/vercel-ai/chromia/package.json new file mode 100644 index 000000000..8af30bf23 --- /dev/null +++ b/typescript/examples/vercel-ai/chromia/package.json @@ -0,0 +1,21 @@ +{ + "name": "goat-examples-vercel-ai-chromia", + "version": "0.1.1", + "description": "", + "private": true, + "scripts": { + "test": "vitest run --passWithNoTests" + }, + "author": "", + "license": "MIT", + "dependencies": { + "@ai-sdk/openai": "^1.0.4", + "@chromia/ft4": "catalog:", + "@goat-sdk/adapter-vercel-ai": "workspace:*", + "@goat-sdk/core": "workspace:*", + "@goat-sdk/wallet-chromia": "workspace:*", + "ai": "catalog:", + "dotenv": "^16.4.5", + "postchain-client": "catalog:" + } +} diff --git a/typescript/examples/vercel-ai/chromia/tsconfig.json b/typescript/examples/vercel-ai/chromia/tsconfig.json new file mode 100644 index 000000000..a7fc4a937 --- /dev/null +++ b/typescript/examples/vercel-ai/chromia/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "dist" + }, + "include": ["index.ts"], + "exclude": ["node_modules", "dist"] +} diff --git a/typescript/packages/core/package.json b/typescript/packages/core/package.json index 23c525c06..ef395d443 100644 --- a/typescript/packages/core/package.json +++ b/typescript/packages/core/package.json @@ -15,7 +15,9 @@ "@lit-protocol/lit-node-client": "catalog:", "@lit-protocol/wrapped-keys": "catalog:", "@solana/web3.js": "catalog:", + "@chromia/ft4": "catalog:", "abitype": "^1.0.6", + "postchain-client": "catalog:", "viem": "catalog:", "zod": "catalog:" }, diff --git a/typescript/packages/core/src/chromia/methods.ts b/typescript/packages/core/src/chromia/methods.ts new file mode 100644 index 000000000..56f32a029 --- /dev/null +++ b/typescript/packages/core/src/chromia/methods.ts @@ -0,0 +1,24 @@ +import { formatUnits } from "viem"; +import type { z } from "zod"; +import type { ChromiaWalletClient } from "../wallets"; +import type { getAddressParametersSchema, getCHRBalanceParametersSchema } from "./parameters"; + +export function getAddress( + walletClient: ChromiaWalletClient, + parameters: z.infer, +): string { + return walletClient.getAddress(); +} + +export async function getBalance( + walletClient: ChromiaWalletClient, + parameters: z.infer, +): Promise { + try { + const balance = await walletClient.balanceOf(parameters.address ?? getAddress(walletClient, {})); + + return formatUnits(balance.value, balance.decimals); + } catch (error) { + throw new Error(`Failed to fetch balance: ${error}`); + } +} diff --git a/typescript/packages/core/src/chromia/parameters.ts b/typescript/packages/core/src/chromia/parameters.ts new file mode 100644 index 000000000..450985cce --- /dev/null +++ b/typescript/packages/core/src/chromia/parameters.ts @@ -0,0 +1,9 @@ +import { z } from "zod"; + +export const getAddressParametersSchema = z.object({}); + +export const getCHRBalanceParametersSchema = z.object({ + address: z + .optional(z.string()) + .describe("The address to get the balance of, defaults to the address of the wallet"), +}); diff --git a/typescript/packages/core/src/chromia/tools.ts b/typescript/packages/core/src/chromia/tools.ts new file mode 100644 index 000000000..e4feb81d3 --- /dev/null +++ b/typescript/packages/core/src/chromia/tools.ts @@ -0,0 +1,19 @@ +import type { DeferredTool } from "../tools"; +import type { ChromiaWalletClient } from "../wallets"; +import { getAddress, getBalance } from "./methods"; +import { getAddressParametersSchema, getCHRBalanceParametersSchema } from "./parameters"; + +export const deferredChromiaTools: DeferredTool[] = [ + { + name: "get_address", + description: "This {{tool}} returns the address of the Chromia wallet.", + parameters: getAddressParametersSchema, + method: getAddress, + }, + { + name: "get_chr_balance", + description: "This {{tool}} returns the CHR balance of a Chromia wallet.", + parameters: getCHRBalanceParametersSchema, + method: getBalance, + }, +]; diff --git a/typescript/packages/core/src/index.ts b/typescript/packages/core/src/index.ts index d2b848fef..b39bfaa91 100644 --- a/typescript/packages/core/src/index.ts +++ b/typescript/packages/core/src/index.ts @@ -2,6 +2,7 @@ import { ethSendTransaction } from "./plugins/eth-send-transaction"; import type { Plugin } from "./plugins/plugins"; import { sendETH } from "./plugins/send-eth"; import { sendSOL } from "./plugins/send-sol"; +import { sendCHR } from "./plugins/send-chr"; import { type DeferredTool, type GetDeferredToolsParams, @@ -40,6 +41,7 @@ export { sendETH, sendSOL, ethSendTransaction, + sendCHR, addParametersToDescription, parametersToJsonExample, type Tool, diff --git a/typescript/packages/core/src/plugins/send-chr.ts b/typescript/packages/core/src/plugins/send-chr.ts new file mode 100644 index 000000000..25fef9e21 --- /dev/null +++ b/typescript/packages/core/src/plugins/send-chr.ts @@ -0,0 +1,42 @@ +import { z } from "zod"; +import type { Plugin } from "./plugins"; +import { ChromiaWalletClient } from "../wallets"; + +export const CHR_ASSET_ID = + "5f16d1545a0881f971b164f1601cbbf51c29efd0633b2730da18c403c3b428b5"; + +export function sendCHR(): Plugin { + return { + name: "send_chr", + supportsSmartWallets: () => false, + supportsChain: (chain) => chain.type === "chromia", + getTools: async () => { + return [ + { + name: "send_chr", + description: "This {{tool}} sends CHR to an address on a Chromia chain.", + parameters: sendCHRParametersSchema, + method: sendCHRMethod, + } + ] + } + } +} + +const sendCHRParametersSchema = z.object({ + to: z.string().describe("The address to send CHR to"), + amount: z.string().describe("The amount of CHR to send"), +}); + +async function sendCHRMethod( + walletClient: ChromiaWalletClient, + parameters: z.infer, +): Promise { + try { + const { to, amount } = parameters; + await walletClient.sendTransaction({to, assetId: CHR_ASSET_ID, amount}); + return `CHR sent to ${to} with amount ${amount}`; + } catch (error) { + return `Error sending CHR: ${error}`; + } +} \ No newline at end of file diff --git a/typescript/packages/core/src/tools.ts b/typescript/packages/core/src/tools.ts index 049ee2db2..d804ffdf0 100644 --- a/typescript/packages/core/src/tools.ts +++ b/typescript/packages/core/src/tools.ts @@ -4,7 +4,8 @@ import type { Plugin } from "./plugins/plugins"; import { deferredSolanaTools } from "./solana/tools"; import { replaceToolPlaceholder } from "./utils"; import type { AnyEVMWalletClient, ChainForWalletClient, WalletClient } from "./wallets"; -import { isEVMChain, isEVMSmartWalletClient, isSolanaChain } from "./wallets"; +import { isEVMChain, isEVMSmartWalletClient, isSolanaChain, isChromiaChain } from "./wallets"; +import { deferredChromiaTools } from "./chromia/tools"; // biome-ignore lint/suspicious/noExplicitAny: Tools can return any type export type Tool = { @@ -72,6 +73,9 @@ export async function getDeferredTools[])); + } else if (isChromiaChain(chain)) { + // We know that TWalletClient is compatible with ChromiaWalletClient here + tools.push(...(deferredChromiaTools as unknown as DeferredTool[])); } else { throw new Error(`Unsupported chain type: ${chain.type}`); } diff --git a/typescript/packages/core/src/wallets/chromia.ts b/typescript/packages/core/src/wallets/chromia.ts new file mode 100644 index 000000000..5032dedf7 --- /dev/null +++ b/typescript/packages/core/src/wallets/chromia.ts @@ -0,0 +1,25 @@ + +import { DictPair, QueryObject, RawGtv } from "postchain-client"; +import { TransactionWithReceipt } from "@chromia/ft4"; +import type { WalletClient } from "./core"; + +export function isChromiaWalletClient(wallet: WalletClient): wallet is ChromiaWalletClient { + return wallet.getChain().type === "chromia"; +} + +export type ChromiaTransaction = { + to: string; + assetId: string; + amount: string; +}; + +export type ChromiaReadRequest = string | QueryObject; + +export type ChromiaReadResult = RawGtv; + +export type ChromiaTransactionResult = TransactionWithReceipt; + +export interface ChromiaWalletClient extends WalletClient { + sendTransaction: (transaction: ChromiaTransaction) => Promise; + read: (request: ChromiaReadRequest) => Promise; +} diff --git a/typescript/packages/core/src/wallets/core.ts b/typescript/packages/core/src/wallets/core.ts index 6931db57f..6d9ef1a7b 100644 --- a/typescript/packages/core/src/wallets/core.ts +++ b/typescript/packages/core/src/wallets/core.ts @@ -14,7 +14,7 @@ export type Balance = { * @param id - Chain ID, optional for EVM */ export type Chain = { - type: "evm" | "solana" | "aptos"; + type: "evm" | "solana" | "aptos" | "chromia"; id?: number; // optional for EVM }; @@ -30,6 +30,10 @@ export type AptosChain = Chain & { type: "aptos"; }; +export type ChromiaChain = Chain & { + type: "chromia"; +}; + export interface WalletClient { getAddress: () => string; getChain: () => Chain; diff --git a/typescript/packages/core/src/wallets/index.ts b/typescript/packages/core/src/wallets/index.ts index 5795bdd91..f7e288748 100644 --- a/typescript/packages/core/src/wallets/index.ts +++ b/typescript/packages/core/src/wallets/index.ts @@ -16,9 +16,15 @@ import { type SolanaWalletClient, isSolanaWalletClient, } from "./solana"; +import { + type ChromiaReadRequest, + type ChromiaTransaction, + type ChromiaWalletClient, + isChromiaWalletClient, +} from "./chromia"; import type { Balance, Chain, Signature, WalletClient } from "./core"; -import { type AnyEVMWalletClient, type ChainForWalletClient, isEVMChain, isSolanaChain } from "./utils"; +import { type AnyEVMWalletClient, type ChainForWalletClient, isEVMChain, isSolanaChain, isChromiaChain } from "./utils"; export type { EVMWalletClient, @@ -35,6 +41,9 @@ export type { SolanaTransactionResult, Signature, Balance, + ChromiaWalletClient, + ChromiaReadRequest, + ChromiaTransaction, EVMSmartWalletClient, ChainForWalletClient, EVMTypedData, @@ -46,5 +55,6 @@ export { isEVMSmartWalletClient, isEVMChain, isSolanaChain, + isChromiaChain, type AnyEVMWalletClient, }; diff --git a/typescript/packages/core/src/wallets/utils.ts b/typescript/packages/core/src/wallets/utils.ts index 9e2e1e05b..37b83ce6e 100644 --- a/typescript/packages/core/src/wallets/utils.ts +++ b/typescript/packages/core/src/wallets/utils.ts @@ -1,4 +1,4 @@ -import type { Chain, EVMChain, SolanaChain, WalletClient } from "./core"; +import type { Chain, ChromiaChain, EVMChain, SolanaChain, WalletClient } from "./core"; import type { EVMWalletClient } from "./evm"; import type { EVMSmartWalletClient } from "./evm-smart-wallet"; import type { SolanaWalletClient } from "./solana"; @@ -17,4 +17,8 @@ export function isSolanaChain(chain: Chain): chain is SolanaChain { return chain.type === "solana"; } +export function isChromiaChain(chain: Chain): chain is ChromiaChain { + return chain.type === "chromia"; +} + export type AnyEVMWalletClient = EVMWalletClient | EVMSmartWalletClient; diff --git a/typescript/packages/wallets/chromia/README.md b/typescript/packages/wallets/chromia/README.md new file mode 100644 index 000000000..4fc921ee4 --- /dev/null +++ b/typescript/packages/wallets/chromia/README.md @@ -0,0 +1,62 @@ +# Goat Wallet Chromia 🐐 - TypeScript + +## Installation +``` +npm install @goat-sdk/wallet-chromia +``` + +## Usage + +### With EVM Wallet + +Chromia is interoperable with EVM, it is not EVM-compatible. + +> When you add a network (like Binance Chain or Polygon) to Metamask, it behaves exactly the same way as Ethereum. That’s because all of these chains are based on the Ethereum Virtual Machine. +> +> Chromia users will not add Chromia as a network and view their tokens in Metamask the same way they would with an Ethereum fork. +> +> Instead, by cryptographically linking your Chromia address to your EVM address, Metamask can be used to sign transactions that originate on Chromia. This will feel familiar, with some key differences. For example, there is no need to set or pay gas fees in Metamask. Instead, the user flow is more like: + +[Read More](https://blog.chromia.com/chromia-explained-eif/) + +Setup `.env` +```sh +EVM_PRIVATE_KEY=0xabc +``` + +```typescript +import { openai } from "@ai-sdk/openai"; +import { generateText } from "ai"; +import { getOnChainTools } from "@goat-sdk/adapter-vercel-ai"; +import { createClient } from "postchain-client"; +import { CHROMIA_MAINNET_BRID, chromia } from "@goat-sdk/wallet-chromia"; +import { createConnection, createInMemoryEvmKeyStore, createKeyStoreInteractor } from "@chromia/ft4"; +import { sendCHR } from "@goat-sdk/core"; + +const privateKey = process.env.EVM_PRIVATE_KEY + +const chromiaClient = await createClient({ + nodeUrlPool: ["https://system.chromaway.com:7740"], + blockchainRid: CHROMIA_MAINNET_BRID.ECONOMY_CHAIN +}); +const connection = createConnection(chromiaClient); +const evmKeyStore = createInMemoryEvmKeyStore({ + privKey: privateKey, +} as any); +const keystoreInteractor = createKeyStoreInteractor(chromiaClient, evmKeyStore) +const accounts = await keystoreInteractor.getAccounts(); +const accountAddress = accounts[0].id.toString("hex"); +console.log("ACCOUNT ADDRESS: ", accountAddress); + +const tools = await getOnChainTools({ + wallet: chromia({ + client: chromiaClient, + accountAddress, + keystoreInteractor, + connection + }), + plugins: [ + sendCHR() + ], +}); +``` \ No newline at end of file diff --git a/typescript/packages/wallets/chromia/package.json b/typescript/packages/wallets/chromia/package.json new file mode 100644 index 000000000..2249eca5c --- /dev/null +++ b/typescript/packages/wallets/chromia/package.json @@ -0,0 +1,34 @@ +{ + "name": "@goat-sdk/wallet-chromia", + "version": "0.1.4", + "sideEffects": false, + "files": ["dist/**/*", "README.md", "package.json"], + "scripts": { + "build": "tsup", + "clean": "rm -rf dist", + "test": "vitest run --passWithNoTests" + }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "dependencies": { + "@goat-sdk/core": "workspace:*", + "@chromia/ft4": "1.0.1", + "postchain-client": "1.20.1" + }, + "peerDependencies": { + "@goat-sdk/core": "workspace:*", + "@chromia/ft4": "1.0.1", + "postchain-client": "1.20.1" + }, + "homepage": "https://ohmygoat.dev", + "repository": { + "type": "git", + "url": "git+https://github.com/goat-sdk/goat.git" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/goat-sdk/goat/issues" + }, + "keywords": ["ai", "agents", "web3"] +} diff --git a/typescript/packages/wallets/chromia/src/index.ts b/typescript/packages/wallets/chromia/src/index.ts new file mode 100644 index 000000000..ffaa98ffe --- /dev/null +++ b/typescript/packages/wallets/chromia/src/index.ts @@ -0,0 +1,89 @@ +import { + DictPair, + IClient, + QueryObject, + RawGtv, + SignatureProvider, +} from "postchain-client"; +import { + Connection, + createAmount, + createInMemoryFtKeyStore, + createKeyStoreInteractor, + KeyStoreInteractor, + Session, +} from "@chromia/ft4"; + +export enum CHROMIA_MAINNET_BRID { + ECONOMY_CHAIN = "15C0CA99BEE60A3B23829968771C50E491BD00D2E3AE448580CD48A8D71E7BBA", +} +export const CHR_ASSET_ID = + "5f16d1545a0881f971b164f1601cbbf51c29efd0633b2730da18c403c3b428b5"; + +export type ChromiaWalletOptions = { + client: IClient; + keystoreInteractor: KeyStoreInteractor; + accountAddress: string; + connection: Connection; +}; + +export type ChromiaTransaction = { + to: string; + assetId: string; + amount: string; +}; + +export function chromia({ + client, + keystoreInteractor, + accountAddress, + connection, +}: ChromiaWalletOptions) { + return { + getAddress: () => { + return accountAddress; + }, + getChain(): { type: "chromia" } { + return { + type: "chromia", + }; + }, + async signMessage(message: string) { + // TODO: Implement keystore signing + return { signature: "" }; + }, + async sendTransaction({ to, assetId, amount }: ChromiaTransaction) { + const accounts = await keystoreInteractor.getAccounts(); + const session = await keystoreInteractor.getSession(accounts[0].id); + const asset = await connection.getAssetById(assetId); + if (!asset) { + throw new Error("Asset not found"); + } + const amountToSend = createAmount(amount, asset.decimals); + return await session.account.transfer(to, assetId, amountToSend); + }, + async read(nameOrQueryObject: string | QueryObject) { + return client.query(nameOrQueryObject); + }, + async balanceOf(address: string) { + const account = await connection.getAccountById(address); + if (account) { + const balance = await account.getBalanceByAssetId(CHR_ASSET_ID); + if (balance) { + return { + decimals: balance.asset.decimals, + symbol: balance.asset.symbol, + name: balance.asset.name, + value: BigInt(balance.amount.value), + }; + } + } + return { + decimals: 0, + symbol: "CHR", + name: "Chromia", + value: BigInt(0), + }; + }, + }; +} diff --git a/typescript/packages/wallets/chromia/tsconfig.json b/typescript/packages/wallets/chromia/tsconfig.json new file mode 100644 index 000000000..b4ae67c1f --- /dev/null +++ b/typescript/packages/wallets/chromia/tsconfig.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "../../../tsconfig.base.json", + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +} diff --git a/typescript/packages/wallets/chromia/tsup.config.ts b/typescript/packages/wallets/chromia/tsup.config.ts new file mode 100644 index 000000000..2d38789ad --- /dev/null +++ b/typescript/packages/wallets/chromia/tsup.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from "tsup"; +import { treeShakableConfig } from "../../../tsup.config.base"; + +export default defineConfig({ + ...treeShakableConfig, +}); diff --git a/typescript/packages/wallets/chromia/turbo.json b/typescript/packages/wallets/chromia/turbo.json new file mode 100644 index 000000000..45f951676 --- /dev/null +++ b/typescript/packages/wallets/chromia/turbo.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://turbo.build/schema.json", + "extends": ["//"], + "tasks": { + "build": { + "inputs": ["src/**", "tsup.config.ts", "!./**/*.test.{ts,tsx}", "tsconfig.json"], + "dependsOn": ["^build"], + "outputs": ["dist/**"] + } + } +} diff --git a/typescript/pnpm-lock.yaml b/typescript/pnpm-lock.yaml index 3da7375fd..94e0444d2 100644 --- a/typescript/pnpm-lock.yaml +++ b/typescript/pnpm-lock.yaml @@ -6,6 +6,9 @@ settings: catalogs: default: + '@chromia/ft4': + specifier: 1.0.1 + version: 1.0.1 '@langchain/core': specifier: 0.3.6 version: 0.3.6 @@ -15,7 +18,18 @@ catalogs: '@solana/web3.js': specifier: 1.95.8 version: 1.95.8 - + ai: + specifier: 4.0.3 + version: 4.0.3 + postchain-client: + specifier: 1.20.1 + version: 1.20.1 + viem: + specifier: 2.21.49 + version: 2.21.49 + zod: + specifier: 3.23.8 + version: 3.23.8 importers: .: @@ -101,7 +115,7 @@ importers: version: 8.4.49 tailwindcss: specifier: ^3.4.1 - version: 3.4.16(ts-node@10.9.2(@types/node@22.7.4)(typescript@5.6.3)) + version: 3.4.16(ts-node@10.9.2(@types/node@22.7.5)(typescript@5.6.3)) examples/eleven-labs/dynamic: dependencies: @@ -159,7 +173,7 @@ importers: version: 8.4.49 tailwindcss: specifier: ^3.4.1 - version: 3.4.16(ts-node@10.9.2(@types/node@22.7.4)(typescript@5.6.3)) + version: 3.4.16(ts-node@10.9.2(@types/node@22.7.5)(typescript@5.6.3)) examples/langchain/lit: dependencies: @@ -254,6 +268,33 @@ importers: specifier: 2.21.49 version: 2.21.49(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.24.0) + examples/vercel-ai/chromia: + dependencies: + '@ai-sdk/openai': + specifier: ^1.0.4 + version: 1.0.4(zod@3.23.8) + '@chromia/ft4': + specifier: 'catalog:' + version: 1.0.1(buffer@6.0.3)(bufferutil@4.0.8)(events@3.3.0)(postchain-client@1.20.1(buffer@6.0.3)(events@3.3.0))(utf-8-validate@5.0.10) + '@goat-sdk/adapter-vercel-ai': + specifier: workspace:* + version: link:../../../packages/adapters/vercel-ai + '@goat-sdk/core': + specifier: workspace:* + version: link:../../../packages/core + '@goat-sdk/wallet-chromia': + specifier: workspace:* + version: link:../../../packages/wallets/chromia + ai: + specifier: 'catalog:' + version: 4.0.3(react@19.0.0-rc-66855b96-20241106)(zod@3.23.8) + dotenv: + specifier: ^16.4.5 + version: 16.4.5 + postchain-client: + specifier: 'catalog:' + version: 1.20.1(buffer@6.0.3)(events@3.3.0) + examples/vercel-ai/coingecko: dependencies: '@ai-sdk/openai': @@ -502,6 +543,9 @@ importers: packages/core: dependencies: + '@chromia/ft4': + specifier: 'catalog:' + version: 1.0.1(buffer@6.0.3)(bufferutil@4.0.8)(events@3.3.0)(postchain-client@1.20.1(buffer@6.0.3)(events@3.3.0))(utf-8-validate@5.0.10) '@lit-protocol/lit-node-client': specifier: 'catalog:' version: 7.0.2(@walletconnect/modal@2.7.0)(bufferutil@4.0.8)(tslib@2.8.1)(typescript@5.6.3)(utf-8-validate@5.0.10)(web-vitals@3.5.2) @@ -513,7 +557,10 @@ importers: version: 1.95.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) abitype: specifier: ^1.0.6 - version: 1.0.7(typescript@5.6.3)(zod@3.23.8) + version: 1.0.6(typescript@5.6.3)(zod@3.23.8) + postchain-client: + specifier: 'catalog:' + version: 1.20.1(buffer@6.0.3)(events@3.3.0) viem: specifier: 'catalog:' version: 2.21.49(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) @@ -676,6 +723,18 @@ importers: specifier: ^2.1.5 version: 2.1.5(@types/node@22.7.4)(terser@5.37.0) + packages/wallets/chromia: + dependencies: + '@chromia/ft4': + specifier: 1.0.1 + version: 1.0.1(buffer@6.0.3)(bufferutil@4.0.8)(events@3.3.0)(postchain-client@1.20.1(buffer@6.0.3)(events@3.3.0))(utf-8-validate@5.0.10) + '@goat-sdk/core': + specifier: workspace:* + version: link:../../core + postchain-client: + specifier: 1.20.1 + version: 1.20.1(buffer@6.0.3)(events@3.3.0) + packages/wallets/crossmint: dependencies: '@crossmint/common-sdk-base': @@ -771,6 +830,9 @@ packages: peerDependencies: react: '>=16.8.0' + '@adraffy/ens-normalize@1.10.1': + resolution: {integrity: sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==} + '@adraffy/ens-normalize@1.11.0': resolution: {integrity: sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==} @@ -1773,6 +1835,16 @@ packages: '@changesets/write@0.3.2': resolution: {integrity: sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==} + '@chromia/asn1@1.0.1': + resolution: {integrity: sha512-lS7H+4Va0lANSQQG345UiwurP4BoA/sAqZ5jZ9WS5nTgYZIn9O6mPev+S0R4uFsoYCnn4/AtPErKgj6GsQBS4Q==} + + '@chromia/ft4@1.0.1': + resolution: {integrity: sha512-eruBIYzu00aXu8qdDQYDIjsB5SiMXXcOOYfC+al06aE+0kes498UA1WVo15BBSV9PVDo8QUq8ynz1xChUxfS/g==} + peerDependencies: + buffer: ^5.x || ^6.x + events: ^3.3.0 + postchain-client: ^1.16.1 + '@coinbase/wallet-sdk@3.9.3': resolution: {integrity: sha512-N/A2DRIf0Y3PHc1XAMvbBUu4zisna6qAdqABMZwBMNEfWrXpAwx16pZGkYCLGE+Rvv1edbcB2LYDRnACNcmCiw==} @@ -2986,6 +3058,9 @@ packages: resolution: {integrity: sha512-Ygv6WnWJHLLiW4fnNDC1z+i13bud+enXOFRBlpxI+NJliPWx5wdR+oWlTjLuBPTqjUjtHXtjkU6w3kuuH6upZA==} engines: {node: ^14.21.3 || >=16} + '@noble/curves@1.2.0': + resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} + '@noble/curves@1.4.0': resolution: {integrity: sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==} @@ -2996,6 +3071,9 @@ packages: resolution: {integrity: sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==} engines: {node: ^14.21.3 || >=16} + '@noble/hashes@1.3.2': + resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} + engines: {node: '>= 16'} '@noble/curves@1.7.0': resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} engines: {node: ^14.21.3 || >=16} @@ -3601,6 +3679,9 @@ packages: '@types/better-sqlite3@7.6.11': resolution: {integrity: sha512-i8KcD3PgGtGBLl3+mMYA8PdKkButvPyARxA7IQAd6qeslht13qxb1zzO8dRCtE7U3IoJS782zDBAeoKiM695kg==} + '@types/bn.js@5.1.6': + resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} + '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} @@ -3646,6 +3727,9 @@ packages: '@types/node@22.7.4': resolution: {integrity: sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==} + '@types/node@22.7.5': + resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} + '@types/phoenix@1.6.6': resolution: {integrity: sha512-PIzZZlEppgrpoT2QgbnDU+MMzuR6BbCjllj0bM70lWoejMeNJAxCchxnv7J3XFkI8MpygtRpzXrIlmWUBclP5A==} @@ -4089,6 +4173,9 @@ packages: asap@2.0.6: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} + asn1.js@4.10.1: + resolution: {integrity: sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==} + assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} @@ -4233,6 +4320,23 @@ packages: brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + browserify-aes@1.2.0: + resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} + + browserify-cipher@1.0.1: + resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} + + browserify-des@1.0.2: + resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} + + browserify-rsa@4.1.1: + resolution: {integrity: sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ==} + engines: {node: '>= 0.10'} + + browserify-sign@4.2.3: + resolution: {integrity: sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==} + engines: {node: '>= 0.12'} + browserslist@4.24.2: resolution: {integrity: sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -4262,6 +4366,9 @@ packages: buffer-reverse@1.0.1: resolution: {integrity: sha512-M87YIUBsZ6N924W57vDwT/aOu8hw7ZgdByz6ijksLjmHJELBASmYTTlNHRgjE+pTsT9oJXGaDSgqqwfdHotDUg==} + buffer-xor@1.0.3: + resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} + buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} @@ -4381,6 +4488,10 @@ packages: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} + cipher-base@1.0.6: + resolution: {integrity: sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==} + engines: {node: '>= 0.10'} + citty@0.1.6: resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} @@ -4526,6 +4637,15 @@ packages: engines: {node: '>=0.8'} hasBin: true + create-ecdh@4.0.4: + resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} + + create-hash@1.2.0: + resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + + create-hmac@1.1.7: + resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} @@ -4547,6 +4667,10 @@ packages: crossws@0.3.1: resolution: {integrity: sha512-HsZgeVYaG+b5zA+9PbIPGq4+J/CJynJuearykPsXx4V/eMhyQ5EDVg3Ak2FBZtVXCiOLu/U7IiwDHTr9MA+IKw==} + crypto-browserify@3.12.1: + resolution: {integrity: sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ==} + engines: {node: '>= 0.10'} + crypto-js@4.2.0: resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} @@ -4661,6 +4785,9 @@ packages: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} + des.js@1.1.0: + resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} + destr@2.0.3: resolution: {integrity: sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==} @@ -4697,6 +4824,9 @@ packages: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} + diffie-hellman@5.0.3: + resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} + dijkstrajs@1.0.3: resolution: {integrity: sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==} @@ -4877,6 +5007,10 @@ packages: ethereum-cryptography@2.2.1: resolution: {integrity: sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==} + ethers@6.13.4: + resolution: {integrity: sha512-21YtnZVg4/zKkCQPjrDj38B1r4nQvTZLopUGMLQ1ePU2zV/joCfDC3t3iKQjWRzjjjbzR+mdAIoikeBRNkdllA==} + engines: {node: '>=14.0.0'} + ethers@5.7.2: resolution: {integrity: sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==} @@ -4909,6 +5043,9 @@ packages: resolution: {integrity: sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA==} engines: {node: '>=18.0.0'} + evp_bytestokey@1.0.3: + resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -5201,6 +5338,10 @@ packages: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} + hash-base@3.0.5: + resolution: {integrity: sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==} + engines: {node: '>= 0.10'} + hash.js@1.1.7: resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} @@ -5784,6 +5925,9 @@ packages: marky@1.2.5: resolution: {integrity: sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==} + md5.js@1.3.5: + resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + memoize-one@5.2.1: resolution: {integrity: sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==} @@ -5863,6 +6007,10 @@ packages: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} + miller-rabin@4.0.1: + resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} + hasBin: true + mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -6051,6 +6199,9 @@ packages: node-addon-api@2.0.2: resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} + node-addon-api@5.1.0: + resolution: {integrity: sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==} + node-addon-api@7.1.1: resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} @@ -6276,9 +6427,15 @@ packages: package-manager-detector@0.2.7: resolution: {integrity: sha512-g4+387DXDKlZzHkP+9FLt8yKj8+/3tOkPv7DVTJGGRm00RkEWgqbFstX1mXJ4M0VDYhUqsTOiISqNOJnhAu3PQ==} + + parse-asn1@5.1.7: + resolution: {integrity: sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==} + engines: {node: '>= 0.10'} + pako@2.1.0: resolution: {integrity: sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==} + parse-json@4.0.0: resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} engines: {node: '>=4'} @@ -6332,6 +6489,10 @@ packages: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} + pbkdf2@3.1.2: + resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} + engines: {node: '>=0.12'} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -6395,6 +6556,12 @@ packages: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} + postchain-client@1.20.1: + resolution: {integrity: sha512-xZVPBUsa/DxyDiOn41cs7LQ/aXu8gXdeyaaa9XNJq/O/acCqyD4Djs7ETb/BZqqH/PKVz17n9dP6hVGlwGJB5Q==} + peerDependencies: + buffer: ^5.x || ^6.x + events: ^3.3.0 + postcss-import@15.1.0: resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} engines: {node: '>=14.0.0'} @@ -6509,6 +6676,13 @@ packages: proxy-compare@2.5.1: resolution: {integrity: sha512-oyfc0Tx87Cpwva5ZXezSp5V9vht1c7dZBhvuV/y3ctkgMVUmiAGDVeeB0dKhGSyT0v1ZTEQYpe/RXlBVBNuCLA==} + + prr@1.0.1: + resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} + + public-encrypt@4.0.3: + resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} + pump@3.0.2: resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} @@ -6555,6 +6729,9 @@ packages: randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + randomfill@1.0.4: + resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} + range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} @@ -6779,6 +6956,9 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true + ripemd160@2.0.2: + resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + rollup@4.28.1: resolution: {integrity: sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -6812,9 +6992,15 @@ packages: scheduler@0.25.0-rc-66855b96-20241106: resolution: {integrity: sha512-HQXp/Mnp/MMRSXMQF7urNFla+gmtXW/Gr1KliuR0iboTit4KvZRY8KYaq5ccCTAOJiUqQh2rE2F3wgUekmgdlA==} + + secp256k1@4.0.4: + resolution: {integrity: sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==} + engines: {node: '>=18.0.0'} + scrypt-js@3.0.1: resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} + secure-json-parse@2.7.0: resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} @@ -7038,6 +7224,9 @@ packages: std-env@3.8.0: resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} + stream-browserify@3.0.0: + resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} + stream-shift@1.0.3: resolution: {integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==} @@ -7332,6 +7521,9 @@ packages: tslib@2.4.1: resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} + tslib@2.7.0: + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -7942,6 +8134,8 @@ snapshots: '@11labs/client': 0.0.4 react: 19.0.0-rc-66855b96-20241106 + '@adraffy/ens-normalize@1.10.1': {} + '@adraffy/ens-normalize@1.11.0': {} '@ai-sdk/anthropic@0.0.53(zod@3.23.8)': @@ -8187,7 +8381,6 @@ snapshots: - '@langchain/mistralai' - '@langchain/ollama' - axios - - bufferutil - cheerio - encoding - handlebars @@ -8198,7 +8391,6 @@ snapshots: - supports-color - svelte - typeorm - - utf-8-validate - vue '@ai16z/adapter-supabase@0.1.4-alpha.3(@google-cloud/vertexai@1.9.2)(@langchain/core@0.3.6(openai@4.69.0(zod@3.23.8)))(bufferutil@4.0.8)(react@19.0.0-rc-66855b96-20241106)(sswr@2.1.0(svelte@5.10.0))(svelte@5.10.0)(utf-8-validate@5.0.10)(vue@3.5.13(typescript@5.6.3))(whatwg-url@7.1.0)': @@ -9348,6 +9540,23 @@ snapshots: human-id: 1.0.2 prettier: 2.8.8 + '@chromia/asn1@1.0.1': + dependencies: + bn.js: 4.12.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + safer-buffer: 2.1.2 + + '@chromia/ft4@1.0.1(buffer@6.0.3)(bufferutil@4.0.8)(events@3.3.0)(postchain-client@1.20.1(buffer@6.0.3)(events@3.3.0))(utf-8-validate@5.0.10)': + dependencies: + buffer: 6.0.3 + ethers: 6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) + events: 3.3.0 + postchain-client: 1.20.1(buffer@6.0.3)(events@3.3.0) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + '@coinbase/wallet-sdk@3.9.3': dependencies: bn.js: 5.2.1 @@ -11355,6 +11564,10 @@ snapshots: '@noble/ciphers@1.1.3': {} + '@noble/curves@1.2.0': + dependencies: + '@noble/hashes': 1.3.2 + '@noble/curves@1.4.0': dependencies: '@noble/hashes': 1.4.0 @@ -12283,6 +12496,10 @@ snapshots: dependencies: '@types/node': 22.7.4 + '@types/bn.js@5.1.6': + dependencies: + '@types/node': 22.7.4 + '@types/connect@3.4.38': dependencies: '@types/node': 22.7.4 @@ -12330,6 +12547,10 @@ snapshots: dependencies: undici-types: 6.19.8 + '@types/node@22.7.5': + dependencies: + undici-types: 6.19.8 + '@types/phoenix@1.6.6': {} '@types/prop-types@15.7.14': {} @@ -13420,9 +13641,13 @@ snapshots: acorn@8.14.0: {} - aes-js@3.0.0: {} + aes-js@4.0.0-beta.5: {} - agent-base@7.1.3: {} + agent-base@7.1.1: + dependencies: + debug: 4.3.7(supports-color@5.5.0) + transitivePeerDependencies: + - supports-color agentkeepalive@4.5.0: dependencies: @@ -13551,6 +13776,11 @@ snapshots: asap@2.0.6: {} + asn1.js@4.10.1: + dependencies: + bn.js: 4.12.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 assertion-error@1.1.0: {} assertion-error@2.0.1: {} @@ -13701,6 +13931,47 @@ snapshots: brorand@1.1.0: {} + browserify-aes@1.2.0: + dependencies: + buffer-xor: 1.0.3 + cipher-base: 1.0.6 + create-hash: 1.2.0 + evp_bytestokey: 1.0.3 + inherits: 2.0.4 + safe-buffer: 5.2.1 + + browserify-cipher@1.0.1: + dependencies: + browserify-aes: 1.2.0 + browserify-des: 1.0.2 + evp_bytestokey: 1.0.3 + + browserify-des@1.0.2: + dependencies: + cipher-base: 1.0.6 + des.js: 1.1.0 + inherits: 2.0.4 + safe-buffer: 5.2.1 + + browserify-rsa@4.1.1: + dependencies: + bn.js: 5.2.1 + randombytes: 2.1.0 + safe-buffer: 5.2.1 + + browserify-sign@4.2.3: + dependencies: + bn.js: 5.2.1 + browserify-rsa: 4.1.1 + create-hash: 1.2.0 + create-hmac: 1.1.7 + elliptic: 6.6.1 + hash-base: 3.0.5 + inherits: 2.0.4 + parse-asn1: 5.1.7 + readable-stream: 2.3.8 + safe-buffer: 5.2.1 + browserslist@4.24.2: dependencies: caniuse-lite: 1.0.30001687 @@ -13735,6 +14006,8 @@ snapshots: buffer-reverse@1.0.1: {} + buffer-xor@1.0.3: {} + buffer@5.7.1: dependencies: base64-js: 1.5.1 @@ -13850,6 +14123,11 @@ snapshots: ci-info@3.9.0: {} + cipher-base@1.0.6: + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + citty@0.1.6: dependencies: consola: 3.2.3 @@ -14003,6 +14281,28 @@ snapshots: crc-32@1.2.2: {} + create-ecdh@4.0.4: + dependencies: + bn.js: 4.12.1 + elliptic: 6.6.1 + + create-hash@1.2.0: + dependencies: + cipher-base: 1.0.6 + inherits: 2.0.4 + md5.js: 1.3.5 + ripemd160: 2.0.2 + sha.js: 2.4.11 + + create-hmac@1.1.7: + dependencies: + cipher-base: 1.0.6 + create-hash: 1.2.0 + inherits: 2.0.4 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + create-require@1.1.1: {} cross-env@7.0.3: @@ -14031,6 +14331,21 @@ snapshots: dependencies: uncrypto: 0.1.3 + crypto-browserify@3.12.1: + dependencies: + browserify-cipher: 1.0.1 + browserify-sign: 4.2.3 + create-ecdh: 4.0.4 + create-hash: 1.2.0 + create-hmac: 1.1.7 + diffie-hellman: 5.0.3 + hash-base: 3.0.5 + inherits: 2.0.4 + pbkdf2: 3.1.2 + public-encrypt: 4.0.3 + randombytes: 2.1.0 + randomfill: 1.0.4 + crypto-js@4.2.0: {} crypto@1.0.1: {} @@ -14107,6 +14422,11 @@ snapshots: depd@2.0.0: {} + des.js@1.1.0: + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + destr@2.0.3: {} destroy@1.2.0: {} @@ -14127,6 +14447,12 @@ snapshots: diff@4.0.2: {} + diffie-hellman@5.0.3: + dependencies: + bn.js: 4.12.1 + miller-rabin: 4.0.1 + randombytes: 2.1.0 + dijkstrajs@1.0.3: {} dir-glob@3.0.1: @@ -14367,6 +14693,16 @@ snapshots: '@scure/bip32': 1.4.0 '@scure/bip39': 1.3.0 + ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10): + dependencies: + '@adraffy/ens-normalize': 1.10.1 + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@types/node': 22.7.5 + aes-js: 4.0.0-beta.5 + tslib: 2.7.0 + ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@ethersproject/abi': 5.7.0 @@ -14422,6 +14758,11 @@ snapshots: eventsource-parser@3.0.0: {} + evp_bytestokey@1.0.3: + dependencies: + md5.js: 1.3.5 + safe-buffer: 5.2.1 + execa@5.1.1: dependencies: cross-spawn: 7.0.6 @@ -14780,6 +15121,11 @@ snapshots: dependencies: has-symbols: 1.1.0 + hash-base@3.0.5: + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + hash.js@1.1.7: dependencies: inherits: 2.0.4 @@ -15427,6 +15773,12 @@ snapshots: marky@1.2.5: {} + md5.js@1.3.5: + dependencies: + hash-base: 3.0.5 + inherits: 2.0.4 + safe-buffer: 5.2.1 + memoize-one@5.2.1: {} merge-stream@2.0.0: {} @@ -15626,6 +15978,11 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 + miller-rabin@4.0.1: + dependencies: + bn.js: 4.12.1 + brorand: 1.1.0 + mime-db@1.52.0: {} mime-types@2.1.35: @@ -15799,6 +16156,8 @@ snapshots: node-addon-api@2.0.2: {} + node-addon-api@5.1.0: {} + node-addon-api@7.1.1: {} node-dir@0.1.17: @@ -16046,6 +16405,15 @@ snapshots: package-manager-detector@0.2.7: {} + parse-asn1@5.1.7: + dependencies: + asn1.js: 4.10.1 + browserify-aes: 1.2.0 + evp_bytestokey: 1.0.3 + hash-base: 3.0.5 + pbkdf2: 3.1.2 + safe-buffer: 5.2.1 + pako@2.1.0: {} parse-json@4.0.0: @@ -16085,6 +16453,14 @@ snapshots: pathval@2.0.0: {} + pbkdf2@3.1.2: + dependencies: + create-hash: 1.2.0 + create-hmac: 1.1.7 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + picocolors@1.1.1: {} picomatch@2.3.1: {} @@ -16145,6 +16521,18 @@ snapshots: possible-typed-array-names@1.0.0: {} + postchain-client@1.20.1(buffer@6.0.3)(events@3.3.0): + dependencies: + '@chromia/asn1': 1.0.1 + '@types/bn.js': 5.1.6 + buffer: 6.0.3 + crypto-browserify: 3.12.1 + events: 3.3.0 + lodash: 4.17.21 + secp256k1: 4.0.4 + stream-browserify: 3.0.0 + zod: 3.23.8 + postcss-import@15.1.0(postcss@8.4.49): dependencies: postcss: 8.4.49 @@ -16157,13 +16545,13 @@ snapshots: camelcase-css: 2.0.1 postcss: 8.4.49 - postcss-load-config@4.0.2(postcss@8.4.49)(ts-node@10.9.2(@types/node@22.7.4)(typescript@5.6.3)): + postcss-load-config@4.0.2(postcss@8.4.49)(ts-node@10.9.2(@types/node@22.7.5)(typescript@5.6.3)): dependencies: lilconfig: 3.1.3 yaml: 2.6.1 optionalDependencies: postcss: 8.4.49 - ts-node: 10.9.2(@types/node@22.7.4)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@22.7.5)(typescript@5.6.3) postcss-load-config@6.0.1(jiti@2.4.1)(postcss@8.4.49)(yaml@2.6.1): dependencies: @@ -16256,6 +16644,18 @@ snapshots: proxy-compare@2.5.1: {} + prr@1.0.1: + optional: true + + public-encrypt@4.0.3: + dependencies: + bn.js: 4.12.1 + browserify-rsa: 4.1.1 + create-hash: 1.2.0 + parse-asn1: 5.1.7 + randombytes: 2.1.0 + safe-buffer: 5.2.1 + pump@3.0.2: dependencies: end-of-stream: 1.4.4 @@ -16306,6 +16706,11 @@ snapshots: dependencies: safe-buffer: 5.2.1 + randomfill@1.0.4: + dependencies: + randombytes: 2.1.0 + safe-buffer: 5.2.1 + range-parser@1.2.1: {} rc@1.2.8: @@ -16567,6 +16972,11 @@ snapshots: dependencies: glob: 7.2.3 + ripemd160@2.0.2: + dependencies: + hash-base: 3.0.5 + inherits: 2.0.4 + rollup@4.28.1: dependencies: '@types/estree': 1.0.6 @@ -16627,6 +17037,12 @@ snapshots: scheduler@0.25.0-rc-66855b96-20241106: {} + secp256k1@4.0.4: + dependencies: + elliptic: 6.6.1 + node-addon-api: 5.1.0 + node-gyp-build: 4.8.4 + scrypt-js@3.0.1: {} secure-json-parse@2.7.0: {} @@ -16897,6 +17313,11 @@ snapshots: std-env@3.8.0: {} + stream-browserify@3.0.0: + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.2 + stream-shift@1.0.3: {} streamsearch@1.1.0: {} @@ -17046,7 +17467,7 @@ snapshots: system-architecture@0.1.0: {} - tailwindcss@3.4.16(ts-node@10.9.2(@types/node@22.7.4)(typescript@5.6.3)): + tailwindcss@3.4.16(ts-node@10.9.2(@types/node@22.7.5)(typescript@5.6.3)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -17065,7 +17486,7 @@ snapshots: postcss: 8.4.49 postcss-import: 15.1.0(postcss@8.4.49) postcss-js: 4.0.1(postcss@8.4.49) - postcss-load-config: 4.0.2(postcss@8.4.49)(ts-node@10.9.2(@types/node@22.7.4)(typescript@5.6.3)) + postcss-load-config: 4.0.2(postcss@8.4.49)(ts-node@10.9.2(@types/node@22.7.5)(typescript@5.6.3)) postcss-nested: 6.2.0(postcss@8.4.49) postcss-selector-parser: 6.1.2 resolve: 1.22.8 @@ -17220,10 +17641,31 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + ts-node@10.9.2(@types/node@22.7.5)(typescript@5.6.3): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 22.7.5 + acorn: 8.14.0 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.6.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optional: true + tslib@1.14.1: {} tslib@2.4.1: {} + tslib@2.7.0: {} + tslib@2.8.1: {} tsup@8.3.5(jiti@2.4.1)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.6.1): diff --git a/typescript/pnpm-workspace.yaml b/typescript/pnpm-workspace.yaml index 8d929791e..b48d5ca2a 100644 --- a/typescript/pnpm-workspace.yaml +++ b/typescript/pnpm-workspace.yaml @@ -10,6 +10,8 @@ catalog: "@solana/web3.js": 1.95.8 ai: 4.0.3 "@langchain/core": 0.3.6 + postchain-client: 1.20.1 + "@chromia/ft4": 1.0.1 "@lit-protocol/lit-node-client": "7.0.2" "@lit-protocol/types": "7.0.2" "@lit-protocol/lit-auth-client": "7.0.2"