create-towns-protocol-app
and follow the instructions in the terminal. This will set up a new React project with all the necessary dependencies and configurations.
vite-plugin-node-polyfills
to your vite.config.ts
:
WagmiProvider
- For Web3 wallet connection (recommended)TownsSyncProvider
- For interacting with Towns Protocolomega
- The Towns mainnet, uses Base as the EVM chaingamma
- The Towns testnet, uses Base Sepolia as the EVM chaingamma
as a starting point.
gamma
network.getEthersSigner
to get the signer from viem wallet client.
Towns SDK uses ethers under the hood, so you’ll need to convert the viem wallet client to an ethers signer.You can get the getEthersSigner
function from Wagmi docs./bearer-token
in any conversation to get your token.#general
channel.
Here’s how to create a form
ChatApp
component to your app and you’re ready to start chatting!