Skip to main content

Setting Up Providers

Your Sui dApp needs three providers wrapped in the correct order:
  1. 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 file src/lib/dapp-kit.ts:
src/lib/dapp-kit.ts

Create Providers Component

Create a new file src/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