Skip to content

useCreateSharedState

Usage

connect() must be called and WalletConnect session must be initiated before account information will be returned.

The useCreateSharedState hook is a React Hook wrapper around the createSharedState function

import { useCreateSharedState } from '@puzzlehq/sdk';
const { createSharedState, data, loading, error } = useCreateSharedState();

Return Value

{
createSharedState: () => void,
data?: {
seed: string, // seed used to import the shared state across accounts
address: string // aleo1.... address of the shared state
},
loading: boolean,
error?: string,
};