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.
isSliced?: boolean; // Determines if the displayed address should be sliced.
};
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.
};
AvatarReact
type AvatarReact = {
address?: Address | null; // The Ethereum address to fetch the avatar for.
chain?: Chain; // Optional chain for domain resolution
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.
};
BaseMainnetName
export type BaseMainnetName = `${string}.base.eth`;
Basename
type Basename = BaseMainnetName | BaseSepoliaName;
BaseSepoliaName
type BaseSepoliaName = `${string}.basetest.eth`;
EASSchemaUid
type EASSchemaUid = `0x${string}`;
EASChainDefinition
type EASChainDefinition = {
easGraphqlAPI: string; // EAS GraphQL API endpoint
id: number; // blockchain source id
schemaUids: EASSchemaUid[]; // Array of EAS Schema UIDs
};
EthBalanceReact
type EthBalanceReact = {
address?: Address;
className?: string;
};
GetAddress
type GetAddress = {
name: string | Basename;
chain?: Chain;
};
GetAddressReturnType
type GetAddressReturnType = Address | null;
GetAttestationsOptions
type GetAttestationsOptions = {
schemas?: EASSchemaUid[];
revoked?: boolean;
expirationTime?: number;
limit?: number;
};
GetAvatar
type GetAvatar = {
chain?: Chain; // Optional chain for domain resolution
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.
UseAddressOptions
type UseAddressOptions = {
name: string | Basename; // The ENS or Basename for which the Ethereum address is to be fetched
chain?: Chain; // Optional chain for domain resolution
};
UseAvatarOptions
type UseAvatarOptions = {
ensName: string;
chain?: Chain; // Optional chain for domain resolution
};
UseQueryOptions
type UseQueryOptions = {
enabled?: boolean;
cacheTime?: number;
};
UseNameOptions
type UseNameOptions = {
address: Address; // The Ethereum address for which the ENS name is to be fetched.
chain?: Chain; // Optional chain for domain resolution
};