Indexing Service

Schemas

Querying Schemas

async function querySchemaList(query: {
    id?: string;
    registrant?: string;
    mode?: 'offchain' | 'onchain';
    page: number;
    size?: number;
  }): Promise<
    PageInfo & {
      rows: SchemaInfo[];
    }
  >;

Parameters

Example

const res = await indexService.querySchemaList({
  id: "onchain_evm_11155111_0xd",
  registrant: "0x526dDf0Cc975E0b5B039c85b5cD7ba1e1300500e",
  mode: "onchain",
  page: 1,
  size: 2
});

Getting a Schema By ID

async function querySchema(schemaId: string): Promise<SchemaInfo>

Parameters

Example

const res = await indexService.querySchema("onchain_evm_11155111_0xd");

Attestations

Querying Attestations

async function queryAttestationList(query: {
  id?: string;
  schemaId?: string;
  attester?: string;
  page: number;
  mode?: 'offchain' | 'onchain';
  indexingValue?: string;
}): Promise<
  PageInfo & {
    rows: AttestationInfo[];
  }
>;

Parameters

Example

const res = await indexService.queryAttestationList({
  id: "",
  schemaId: "",
  attester: "",
  page: 1,
  mode: "onchain",
  indexingValue: ""
});

Getting an Attestation By ID

async function queryAttestation(
  attestationId: string
): Promise<AttestationInfo>;

Parameters

Example

const res = await indexService.queryAttestation("onchain_evm_11155111_0x5");

Last updated