Skip to content

useImportSharedState

Usage

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

The useImportSharedState hook is a React Hook wrapper around the importSharedState function

import { useImportSharedState } from '@puzzlehq/sdk';
const { importSharedState, data, loading, error } = useImportSharedState("647675186868268817400383254671918006746501356512542595293158204216114847847field");

Return Value

{
importSharedState: () => 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,
};