testnet
GitHub

Querying EAS Data

integration beginner

A guide to the various methods available for retrieving attestation data on Maroo.

Prerequisites

  • marood installed
  • Access to a Maroo node

Method 1: Using the CLI

The CLI is best for ad-hoc queries and debugging. It formats the output as human-readable YAML/JSON.
# Get a single attestation
marood query eas get-attestation [contract] [uid]

# Get attestations for a user (requires Indexer)
marood query eas get-received-attestation-uids [indexer] [recipient] [schema-uid]

Method 2: Using gRPC (Go)

For backend services (e.g., an exchange verifying KYC), use the generated Protobuf client. This avoids the overhead of JSON parsing.
import "github.com/delight-labs/maroo/x/eas/types"

// ... inside your function ...
queryClient := types.NewQueryClient(grpcConn)
res, err := queryClient.GetAttestation(ctx, &types.QueryGetAttestationRequest{...})

Method 3: Using EVM JSON-RPC

Frontend dApps using ethers.js or viem should continue to use standard contract calls. The x/eas module does not interfere with standard EVM RPCs.
const eas = new EAS(contractAddress);
const attestation = await eas.getAttestation(uid);
Note: Use Method 3 for browser-based dApps (MetaMask). Use Method 2 for high-performance indexers.
Source: maroo
ESC
Type to search