A simple agent that creates group tosses based on user messages.
- Create group tosses with custom topics and options
- Automatically add members to the group
- Support for yes/no tosses and custom option tosses
- Specify toss amounts
- Node.js 20 or higher
- Yarn package manager
- Clone the repository
- Install dependencies:
yarn install
- Generate XMTP keys:
yarn gen:keys
This will create a .env
file with the necessary keys.
Start the agent:
yarn start
For development with auto-restart:
yarn dev
Send a message to the agent with the following format:
@toss [topic] for [amount]
Examples:
@toss Will it rain tomorrow for 5
- Creates a yes/no toss with 5 USDC@toss Lakers vs Celtics for 10
- Creates a toss with Lakers and Celtics as options with 10 USDC
The following environment variables are required:
WALLET_KEY
- The private key of the walletENCRYPTION_KEY
- Encryption key for the local databaseXMTP_ENV
- XMTP environment (local, dev, production)
MIT