Towns extends the Farcaster miniapp specification with additional context data specific to the Towns platform. You can find the original Farcaster miniapp specification here. Towns expect you to follow the metatags specified in the Farcaster miniapp specification.Documentation Index
Fetch the complete documentation index at: https://docs.towns.com/llms.txt
Use this file to discover all available pages before exploring further.
Context
context.user
Towns provides information about the currently connected user:username- Username of the user. Can change per channel.displayName- Display name of the user. Can change per channel.pfpUrl- Profile image URL of the user.
context.towns
Towns-specific data about the current session:useruserId- The Towns UserId of the user currently connected to the miniappaddress- The Towns App Smart Wallet address of the connected user
env- Environment identifier:alpha(testnet) oromega(production)spaceId- The Space ID if the user is interacting from a space (optional)channelId- The Channel ID where the user is interacting from. This can be a Space Channel, DM, or GDM.
Actions
Towns supports the following Farcaster miniapp actions:Core Actions
actions.ready- Notify when miniapp is readyactions.openUrl- Open external URLs in a new windowactions.close- Close the miniappactions.composeCast- Compose messages in Towns with optional text and embedsactions.getCapabilities- Get list of supported capabilitiesactions.getChains- Get supported blockchain chains
Wallet Actions
wallet.getEthereumProvider- Get Ethereum wallet provider for the Towns Smart Walletwallet.ethProviderRequest- Make Ethereum provider requests using the connected walletwallet.eip6963RequestProvider- Announce Ethereum provider via EIP-6963