Skip to main content
Glama
context.ts733 B
import { type Network, networkName, networks } from "./config"; import { FlowConnector, FlowWallet } from "./flow"; import type { FlowBlockchainContext } from "./types"; import flowJSON from "../../flow.json" assert { type: "json" }; export async function buildBlockchainContext(network: Network = networkName): Promise<FlowBlockchainContext> { if (!networks.includes(network)) { throw new Error(`Unsupported network: ${network}`); } const connector = new FlowConnector(flowJSON, network); let wallet: FlowWallet | undefined = undefined; try { wallet = new FlowWallet(connector); } catch (_e) { // No need to log error here, it's probably because the wallet is not set } return { connector, wallet }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Outblock/flow-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server