Types
Glossary of Types in Identity Kit.
AvatarReact
type AvatarReact = {
address: Address; // The Ethereum address to fetch the avatar for.
className?: string; // Optional additional CSS class to apply to the avatar.
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.
props?: React.ImgHTMLAttributes<HTMLImageElement>; // Optional additional image attributes to apply to the avatar.
showAttestation?: boolean; // Optional flag to show the EAS attestation badge.
};
BadgeReact
type BadgeReact = {
backgroundColor?: string; // The background color of the badge.
borderColor?: string; // The border color of the badge.
className?: string; // // Optional additional CSS class to apply to the badge.
tickerColor?: string; // The color of the checkmark.
};
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;
};
GetAvatarReturnType
type GetAvatarReturnType = string | null;
GetName
type GetName = {
address: Address;
showAddress?: boolean;
};
GetNameReturnType
type GetNameReturnType = string | null;
NameReact
type NameReact = {
address: Address; // Ethereum address to be displayed.
className?: string; // Optional CSS class for custom styling.
props?: React.HTMLAttributes<HTMLSpanElement>; // Additional HTML attributes for the span element.
showAddress?: boolean; // Whether to prefer to show the address instead of the ENS name.
showAttestation?: boolean; // Optional flag to show the EAS attestation badge.
sliced?: boolean; // Determines if the address should be sliced when no ENS name is available.
};