Skip to main content
Glama
clients.ts616 B
import { Client } from "xrpl"; import { MAINNET_URL, TESTNET_URL } from "../constants.js"; // Helper function for XRPL client connection export async function getXrplClient(useTestnet = false): Promise<Client> { const serverUrl = useTestnet ? TESTNET_URL : MAINNET_URL; const client = new Client(serverUrl, { connectionTimeout: 20000, // 20 seconds timeout }); try { await client.connect(); return client; } catch (error) { console.error( `Failed to connect to XRPL server at ${serverUrl}:`, error ); throw error; } }

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/RomThpt/mcp-xrpl'

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