useSDK

function useSDK(): ThirdwebSDK | undefined;

Returns

ThirdwebSDK Access the instance of the thirdweb SDK created by the ThirdwebProvider to call methods using the connected wallet on the desiredChainId.

type ReturnType = ThirdwebSDK | undefined;

Example

const sdk = useSDK();