Skip to main content
Hook for managing the connection to the sync agent

Imports

Examples

You can connect the Sync Agent to Towns Protocol using a Bearer Token or using a Signer.

Bearer Token

Signer

If you’re using Wagmi and Viem, you can use the useEthersSigner hook to get an ethers.js v5 Signer from a Viem Wallet Client.

Definition

Source: useAgentConnection

Return Type

The connection state and methods (connect, connectUsingBearerToken, disconnect)