Setting Up Providers
Your Sui dApp needs three providers wrapped in the correct order:- DAppKitProvider - From @mysten/dapp-kit-react
Configure DApp Kit
Before creating the providers, we need to configure our DApp Kit. This includes setting up our RPC endpoints and registering types for hook type inference. Create a new filesrc/lib/dapp-kit.ts:
src/lib/dapp-kit.ts
Create Providers Component
Create a new filesrc/components/providers.tsx:
src/components/providers.tsx
Update main.tsx
Wrap your app with the Providers component:src/main.tsx
Next Steps
Connect Wallet
Add wallet connection with UI components