Skip to main content
Glama

pot_verify

Verify Proof of Time validity using hash and GRG shards to determine timestamp accuracy and mode for blockchain transactions.

Instructions

Verify a Proof of Time using its hash and GRG shards. Returns validity, mode (turbo/full), and timestamp.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
potHashYesPoT hash to verify (hex with 0x prefix)
grgShardsYesArray of hex-encoded GRG integrity shards
chainIdYesEVM chain ID (e.g. 84532 for Base Sepolia)
poolAddressYesUniswap V4 pool address (0x-prefixed)

Implementation Reference

  • tools.ts:94-123 (handler)
    The handler for the pot_verify tool. It reconstructs shards using the GrgPipeline and validates the proof.
    export async function potVerify(args: {
      potHash: string;
      grgShards: string[];
      chainId: number;
      poolAddress: string;
    }): Promise<unknown> {
      telemetryIncrement("pot_verify");
    
      const shards = args.grgShards.map((hex) => new Uint8Array(Buffer.from(hex, "hex")));
      let valid = false;
      let reconstructedSize = 0;
    
      try {
        const recovered = GrgPipeline.processInverse(shards, 0, args.chainId, args.poolAddress);
        valid = recovered.length > 0;
        reconstructedSize = recovered.length;
      } catch {
        valid = false;
      }
    
      const mode = adaptiveSwitch.getCurrentMode() === AdaptiveMode.TURBO ? "turbo" : "full";
    
      return serialize({
        valid,
        mode,
        potHash: args.potHash,
        reconstructedBytes: reconstructedSize,
        verifiedAt: Date.now(),
      });
    }

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/Helm-Protocol/openttt-mcp'

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