Skip to main content
Glama

Veri5ight MCP Server

by 5ajaki
address.ts928 B
import { getAddress } from "../../address/index.js"; import { toBeHex } from "../../utils/maths.js"; import { Typed } from "../typed.js"; import { Coder } from "./abstract-coder.js"; import type { Reader, Writer } from "./abstract-coder.js"; /** * @_ignore */ export class AddressCoder extends Coder { constructor(localName: string) { super("address", "address", localName, false); } defaultValue(): string { return "0x0000000000000000000000000000000000000000"; } encode(writer: Writer, _value: string | Typed): number { let value = Typed.dereference(_value, "string"); try { value = getAddress(value); } catch (error: any) { return this._throwError(error.message, _value); } return writer.writeValue(value); } decode(reader: Reader): any { return getAddress(toBeHex(reader.readValue(), 20)); } }

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/5ajaki/veri5ight'

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