A plugin for interacting with the Flow blockchain within the ElizaOS ecosystem.
This plugin provides essential functionality for interacting with the Flow blockchain, including native FLOW token transfers, fungible token transfers, and EVM token interactions. It offers a seamless way to manage Flow blockchain transactions through natural language commands.
pnpm install @elizaos/plugin-flow
The plugin requires the following environment variables to be set:
FLOW_ADDRESS=<Flow wallet address starting with 0x>
FLOW_PRIVATE_KEY=<Private key for the Flow wallet starting with 0x>
FLOW_NETWORK=<Network to connect to: "mainnet", "testnet", or "emulator" (optional, defaults to "mainnet")>
FLOW_ENDPOINT_URL=<Custom RPC endpoint URL (optional)>
import { flowPlugin } from "@elizaos/plugin-flow";
The plugin supports natural language commands for token transfers:
"Send 5 FLOW to 0xa51d7fe9e0080662";
"Send 1 FLOW - A.1654653399040a61.FlowToken to 0xa2de93114bae3e73";
"Send 1000 FROTH - 0xb73bf8e6a4477a952e0338e6cc00cc0ce5ad04ba to 0x000000000000000000000002e44fbfbd00395de5";
Transfers native FLOW tokens, Cadence fungible tokens, or EVM tokens to specified addresses.
Aliases:
- SEND_TOKEN
- SEND_TOKEN_ON_FLOW
- TRANSFER_TOKEN_ON_FLOW
- TRANSFER_TOKENS_ON_FLOW
- TRANSFER_FLOW
- SEND_FLOW
- PAY_BY_FLOW
Input Content:
interface TransferContent {
token: string | null; // null for native FLOW, Cadence identifier, or EVM address
amount: string; // Amount to transfer
to: string; // Recipient address (Flow or EVM)
matched: boolean; // Indicates if token and address types match
}
-
Connection Issues
- Verify network configuration (mainnet/testnet/emulator)
- Check RPC endpoint availability
- Ensure proper wallet configuration
-
Transaction Failures
- Verify sufficient balance for transfers
- Check correct address format (Flow vs EVM)
- Confirm token contract compatibility
-
Authentication Issues
- Validate private key format
- Verify wallet address matches private key
- Check network permissions
-
Key Management
- Store private keys securely
- Use environment variables for sensitive data
- Never expose private keys in code or logs
-
Transaction Safety
- Validate all addresses before transfers
- Implement proper error handling
- Check token compatibility before transfers
- Clone the repository
- Install dependencies:
pnpm install
- Build the plugin:
pnpm run build
- Run tests:
pnpm run test
- Support for NFT transfers
- Enhanced error handling and recovery
- Additional Flow blockchain interactions
- Expanded token support
Contributions are welcome! Please see the CONTRIBUTING.md file for more information.
This plugin integrates with and builds upon several key technologies:
- Flow Blockchain: Decentralized layer 1 blockchain
- @onflow/fcl: Flow Client Library
- @onflow/types: Flow type system
- Cadence: Smart contract programming language
Special thanks to:
- The Dapper Labs team for developing Flow
- The Flow Developer community
- The FCL SDK maintainers
- The Cadence language designers
- The Eliza community for their contributions and feedback
For more information about Flow capabilities:
This plugin is part of the Eliza project. See the main project repository for license information.