useCapabilities

A hook to get the current wallet's capabilities according to EIP-5792 .

This function is dependent on the wallet's support for EIP-5792, but will not throw. The returned object contains a message field detailing any issues with the wallet's support for EIP-5792.

Example

import { useCapabilities } from "thirdweb/react";
const { data: capabilities, isLoading } = useCapabilities();
function useCapabilities(options?: {
queryOptions?: { enabled?: boolean; retry?: number };
}): UseQueryResult<GetCapabilitiesResult>;

Parameters

Type

let options: { queryOptions?: { enabled?: boolean; retry?: number } };

Returns

let returnType: UseQueryResult<GetCapabilitiesResult>;

a React Query object.