This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // client.ts | |
| import { A2AClient, SendMessageSuccessResponse } from "@a2a-js/sdk/client"; | |
| import { Message, MessageSendParams } from "@a2a-js/sdk"; | |
| import { v4 as uuidv4 } from "uuid"; | |
| async function run() { | |
| // Create a client pointing to the agent's Agent Card URL. | |
| const client = await A2AClient.fromCardUrl("http://localhost:4000/.well-known/agent-card.json"); | |
| const sendParams: MessageSendParams = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // server.ts | |
| import express from "express"; | |
| import { v4 as uuidv4 } from "uuid"; | |
| import type { AgentCard, Message } from "@a2a-js/sdk"; | |
| import { | |
| AgentExecutor, | |
| RequestContext, | |
| ExecutionEventBus, | |
| DefaultRequestHandler, | |
| InMemoryTaskStore, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; | |
| import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; | |
| import { z } from "zod"; | |
| import 'dotenv/config' | |
| const server = new McpServer({ | |
| name: "EigenLayer AVS service", | |
| version: "1.0.0", | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from modelcontextprotocol.sdk.client.mcp import McpClient | |
| from modelcontextprotocol.sdk.client.stdio import StdioClientTransport | |
| import asyncio | |
| import json | |
| async def run_mcp_client(): | |
| # Initialize MCP client | |
| client = McpClient( | |
| name="AVS Data Fetcher Client", | |
| version="1.0.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from modelcontextprotocol.sdk.server.mcp import McpServer | |
| from modelcontextprotocol.sdk.server.stdio import StdioServerTransport | |
| from pydantic import BaseModel, Field | |
| from typing import Optional | |
| import requests | |
| import os | |
| from dotenv import load_dotenv | |
| # Load environment variables from .env file | |
| load_dotenv() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "newuser", | |
| "connector.class": "io.debezium.connector.jdbc.JdbcSinkConnector", | |
| "tasks.max": "1", | |
| "connection.url": "jdbc:postgresql://${MASTER_DB_HOST}:${MASTER_DB_PORT}/${MASTER_DB_NAME}", | |
| "connection.username": "${MASTER_DB_USER}", | |
| "connection.password": "${MASTER_DB_PASSWORD}", | |
| "insert.mode": "upsert", | |
| "delete.enabled": "true", | |
| "primary.key.mode": "record_key", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "user", | |
| "connector.class": "io.debezium.connector.postgresql.PostgresConnector", | |
| "database.hostname": "${MASTER_DB_HOST}", | |
| "database.port": "${MASTER_DB_PORT}", | |
| "database.user": "${MASTER_DB_USER}", | |
| "database.password": "${MASTER_DB_PASSWORD}", | |
| "database.server.name": "user", | |
| "database.dbname": "${MASTER_DB_NAME}", | |
| "tasks.max": "1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3" | |
| services: | |
| zookeeper: | |
| image: confluentinc/cp-zookeeper:latest | |
| hostname: zookeeper | |
| container_name: zookeeper | |
| ports: | |
| - "2181:2181" | |
| environment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import smartpy as sp | |
| FA2 = sp.io.import_script_from_url("https://smartpy.io/templates/fa2_lib.py") | |
| class MyProject( | |
| FA2.Admin, | |
| FA2.BurnNft, | |
| FA2.ChangeMetadata, | |
| FA2.WithdrawMutez, | |
| FA2.MintNft, | |
| FA2.OnchainviewBalanceOf, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // sign a message for LazyMintVoucher | |
| const data = { | |
| receiver: alice.address, | |
| displayTypes: [ | |
| ethers.utils.hexDataSlice(ethers.utils.formatBytes32String("paint"), 0, 16), | |
| ethers.utils.hexDataSlice(ethers.utils.formatBytes32String("wheel"), 0, 16), | |
| ethers.utils.hexDataSlice(ethers.utils.formatBytes32String("engine"), 0, 16), | |
| ], | |
| traitTypes: [ | |
| ethers.utils.hexDataSlice(ethers.utils.formatBytes32String("paint"), 0, 16), |
NewerOlder