Skip to content

fixes-world/plugin-flow

 
 

Repository files navigation

@elizaos-plugins/plugin-flow

A plugin for interacting with the Flow blockchain within the ElizaOS ecosystem.

Description

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.

Installation

To install the plugin, use the following command in your Eliza project:

npx elizaos plugins add @elizaos-plugins/plugin-di
npx elizaos plugins add @elizaos-plugins/plugin-flow

Usage

This plugin is the base plugin for Flow blockchain interactions. It provides the core functionality for WalletService and couple sample transaction or query scripts.

Configuration

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)>

API Reference

Actions

SEND_COIN

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)
}

Common Issues & Troubleshooting

  1. Connection Issues

    • Verify network configuration (mainnet/testnet/emulator)
    • Check RPC endpoint availability
    • Ensure proper wallet configuration
  2. Transaction Failures

    • Verify sufficient balance for transfers
    • Check correct address format (Flow vs EVM)
    • Confirm token contract compatibility
  3. Authentication Issues

    • Validate private key format
    • Verify wallet address matches private key
    • Check network permissions

Security Best Practices

  1. Key Management

    • Store private keys securely
    • Use environment variables for sensitive data
    • Never expose private keys in code or logs
  2. Transaction Safety

    • Validate all addresses before transfers
    • Implement proper error handling
    • Check token compatibility before transfers

Development Guide

Setting Up Development Environment

  1. Clone the repository
  2. Install dependencies:
pnpm install
  1. Build the plugin:
pnpm run build
  1. Run tests:
pnpm run test

Credits

This plugin integrates with and builds upon several key technologies:

Special thanks to:

  • 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:

License

This plugin is part of the Eliza project. See the main project repository for license information.

About

The basic Eliza plugin for Flow Blockchain

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 74.7%
  • Cadence 25.3%