Skip to main content

useGnosis() function

Hook for connecting to a Gnosis Safe. This enables multisig wallets to connect to your application and sing transactions.

import { useGnosis } from "@thirdweb-dev/react";

Example

import { useGnosis } from "@thirdweb-dev/react";

const App = () => {
const connectWithGnosis = useGnosis();

return (
<button
onClick={() =>
connectWithGnosis({ safeAddress: "0x...", safeChainId: 1 })
}
>
Connect Gnosis Safe
</button>
);
};

Signature:

export declare function useGnosis(): (
config: GnosisConnectorArguments,
) => Promise<{
data?: import("wagmi").ConnectorData<any> | undefined;
error?: Error | undefined;
}>;

Returns:

(config: GnosisConnectorArguments) => Promise<{ data?: import("wagmi").ConnectorData<any> | undefined; error?: Error | undefined; }>