Skip to content

getStarknetIdExtendedVerifierData

Action for getting extended verifier data associated with a Starknet ID.

Import

import { getStarknetIdExtendedVerifierData } from "starkweb/core";

Usage

index.ts
import { getStarknetIdExtendedVerifierData } from "starkweb/core";
import { config } from "./config";
 
const verifierData = await getStarknetIdExtendedVerifierData(config, {
  starknetId: "0x123...", 
  field: "twitter", 
  domain: "app", 
  verifier: "0x456...", 
});

Parameters

import { type GetStarknetIdExtendedVerifierDataParameters } from "starkweb/core";

starknetId

Hex

The Starknet ID to get extended verifier data for.

field

string

The specific field of verifier data to retrieve.

domain

string

The domain for the extended data.

verifier

Hex

The address of the verifier.

index.ts
import { getStarknetIdExtendedVerifierData } from "starkweb/core";
import { config } from "./config";
 
const verifierData = await getStarknetIdExtendedVerifierData(config, {
  starknetId: "0x123...", 
  field: "twitter", 
  domain: "app", 
  verifier: "0x456...", 
});

chainId (optional)

Hex | undefined

The chain ID to query. If not provided, uses the current chain.

index.ts
import { getStarknetIdExtendedVerifierData } from "starkweb/core";
import { mainnet } from "starkweb/chains"; 
import { config } from "./config";
 
const verifierData = await getStarknetIdExtendedVerifierData(config, {
  starknetId: "0x123...",
  field: "twitter",
  domain: "app",
  verifier: "0x456...",
  chainId: mainnet.chain_id, 
});

Return Type

import { type GetStarknetIdExtendedVerifierDataReturnType } from "starkweb/core";

Returns the extended verifier data value for the specified field, domain, and verifier.

Example

example.ts
import { getStarknetIdExtendedVerifierData } from "starkweb/core";
import { mainnet } from "starkweb/chains"; 
import { config } from "./config";
 
// Get extended verifier data on current chain
const verifierData = await getStarknetIdExtendedVerifierData(config, {
  starknetId: "0x123...", 
  field: "twitter", 
  domain: "app", 
  verifier: "0x456...", 
});
console.log("Extended verifier data:", verifierData);
 
// Get extended verifier data on specific chain
const mainnetData = await getStarknetIdExtendedVerifierData(config, {
  starknetId: "0x123...",
  field: "twitter",
  domain: "app",
  verifier: "0x456...",
  chainId: mainnet.chain_id, 
});

Error

import { type GetStarknetIdExtendedVerifierDataErrorType } from "starkweb/core";

TanStack Query

import {
  type GetStarknetIdExtendedVerifierDataData,
  type GetStarknetIdExtendedVerifierDataOptions,
  type GetStarknetIdExtendedVerifierDataQueryFnData,
  type GetStarknetIdExtendedVerifierDataQueryKey,
  getStarknetIdExtendedVerifierDataQueryKey,
  getStarknetIdExtendedVerifierDataQueryOptions,
} from "starkweb/query";