Skip to content

SDK Overview

@puzzlehq/sdk exposes several Javascript functions and React hooks to be used in the development of dApps. All functions exported from @puzzlehq/sdk-core are also exported by @puzzlehq/sdk.

PuzzleWalletProvider

To use the react sdk, you’ll need to first wrap your app in the PuzzleWalletProvider.

It is strongly recommended that dApps create their own WalletConnect project and pass in the projectId.

import ReactDOM from 'react-dom/client';
import YourApp from './YourApp.js';
import { PuzzleWalletProvider } from '@puzzlehq/sdk';
return ReactDOM.createRoot(document.getElementById('root')!).render(
<PuzzleWalletProvider
dAppName="<YOUR DAPP NAME>"
dAppDescription="<YOUR DAPP DESCRIPTION>"
dAppUrl="<YOUR DAPP URL>"
dAppIconURL="<YOUR DAPP ICON URL>"
projectId="<YOUR WALLETCONNECT PROJECT ID>" // optional
>
<YourApp />
</PuzzleWalletProvider>
);