Skip to content

getStarknetIdPfpVerifierData

Action for getting profile picture (PFP) verifier data associated with a Starknet ID.

Import

import { getStarknetIdPfpVerifierData } from "starkweb/core";

Usage

index.ts
import { getStarknetIdPfpVerifierData } from "starkweb/core";
import { config } from "./config";
 
const pfpData = await getStarknetIdPfpVerifierData(config, {
  starknetId: "0x123...", 
  field: "profile", 
  verifier: "0x456...", 
});

Parameters

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

starknetId

Hex

The Starknet ID to get PFP verifier data for.

field

string

The specific field of PFP data to retrieve.

verifier

Hex

The address of the verifier.

index.ts
import { getStarknetIdPfpVerifierData } from "starkweb/core";
import { config } from "./config";
 
const pfpData = await getStarknetIdPfpVerifierData(config, {
  starknetId: "0x123...", 
  field: "profile", 
  verifier: "0x456...", 
});

chainId (optional)

Hex | undefined

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

index.ts
import { getStarknetIdPfpVerifierData } from "starkweb/core";
import { mainnet } from "starkweb/chains"; 
import { config } from "./config";
 
const pfpData = await getStarknetIdPfpVerifierData(config, {
  starknetId: "0x123...",
  field: "profile",
  verifier: "0x456...",
  chainId: mainnet.chain_id, 
});

Return Type

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

Returns the PFP verifier data value for the specified field and verifier.

Example

example.ts
import { getStarknetIdPfpVerifierData } from "starkweb/core";
import { mainnet } from "starkweb/chains"; 
import { config } from "./config";
 
// Get PFP verifier data on current chain
const pfpData = await getStarknetIdPfpVerifierData(config, {
  starknetId: "0x123...", 
  field: "profile", 
  verifier: "0x456...", 
});
console.log("PFP verifier data:", pfpData);
 
// Get PFP verifier data on specific chain
const mainnetPfpData = await getStarknetIdPfpVerifierData(config, {
  starknetId: "0x123...",
  field: "profile",
  verifier: "0x456...",
  chainId: mainnet.chain_id, 
});

Error

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

TanStack Query

import {
  type GetStarknetIdPfpVerifierDataData,
  type GetStarknetIdPfpVerifierDataOptions,
  type GetStarknetIdPfpVerifierDataQueryFnData,
  type GetStarknetIdPfpVerifierDataQueryKey,
  getStarknetIdPfpVerifierDataQueryKey,
  getStarknetIdPfpVerifierDataQueryOptions,
} from "starkweb/query";