Skip to content

Types

Glossary of Types in Identity components & utilities.

AddressReact

type AddressReact = {
  address?: Address | null; // The Ethereum address to render
  className?: string; // Optional className override for top span element.
};

AvatarReact

type AvatarReact = {
  address?: Address | null; // The Ethereum address to fetch the avatar for.
  className?: string; // Optional className override for top div element.
  loadingComponent?: JSX.Element; // Optional custom component to display while the avatar data is loading.
  defaultComponent?: JSX.Element; // Optional custom component to display when no ENS name or avatar is available.
  children?: ReactNode; // Optional attestation by passing Badge component as its children
} & ImgHTMLAttributes<HTMLImageElement>; // Optional additional image attributes to apply to the avatar.

BadgeReact

type BadgeReact = {
  className?: string; // Optional className override for top span element.
};

EASSchemaUid

type EASSchemaUid = `0x${string}`;

Attestation

type Attestation = {
  attester: Address; // the attester who created the attestation.
  decodedDataJson: string; // The attestation data decoded to JSON.
  expirationTime: number; // The Unix timestamp when the attestation expires (0 for no expiration).
  id: string; // The unique identifier of the attestation.
  recipient: Address; // The Ethereum address of the recipient of the attestation.
  revocationTime: number; // The Unix timestamp when the attestation was revoked, if applicable.
  revoked: boolean; // A boolean indicating whether the attestation is revocable or not.
  schemaId: EASSchemaUid; // The schema identifier associated with the attestation.
  time: number; // The Unix timestamp when the attestation was created.
};

GetAttestationsOptions

type GetAttestationsOptions = {
  schemas?: EASSchemaUid[];
  revoked?: boolean;
  expirationTime?: number;
  limit?: number;
};

GetAvatar

type GetAvatar = {
  ensName: string; // The ENS name to fetch the avatar for.
};

GetAvatarReturnType

type GetAvatarReturnType = string | null;

GetName

type GetName = {
  address: Address;
  chain?: Chain;
};

GetNameReturnType

type GetNameReturnType = string | null;

IdentityContextType

type IdentityContextType = {
  address: Address; // The Ethereum address to fetch the avatar and name for.
  schemaId?: Address | null; // The Ethereum address of the schema to use for EAS attestation.
};

IdentityReact

type IdentityReact = {
  address?: Address; // The Ethereum address to fetch the avatar and name for.
  chain?: Chain; // Optional chain for domain resolution
  children: ReactNode;
  className?: string; // Optional className override for top div element.
  schemaId?: Address | null; // The Ethereum address of the schema to use for EAS attestation.
  hasCopyAddressOnClick?: boolean;
};

NameReact

type NameReact = {
  address?: Address | null; // Ethereum address to be displayed.
  children?: ReactNode; // Optional attestation by passing Badge component as its children
  chain?: Chain; // Optional chain for domain resolution
  className?: string; // Optional className override for top span element.
} & HTMLAttributes<HTMLSpanElement>; // Optional additional span attributes to apply to the name.