The LightLink Plugin allows agents to interact with the LightLink network.
The plugin lets agents:
- Check balances.
- Transfer both ERC20 and Eth.
- Swap (via Elektrik)
- Search the block explorer for contracts and addresses.
pnpm add @elizaos/plugin-lightlink
# Required
EVM_PRIVATE_KEY=your-private-key-here
# Optional - Custom RPC URLs
LIGHTLINK_MAINNET_RPC_URL=https://your-custom-mainnet-rpc-url
LIGHTLINK_TESTNET_RPC_URL=https://your-custom-testnet-rpc-url
By default, LightLink Phoenix (mainnet) is enabled. To enable additional chains, add them to your character config:
"settings": {
"chains": {
"evm": [
"lightlinkTestnet", "ethereum", "sepolia"
]
}
}
Check the balance of an address. All address can be written as an ENS name or a raw address.
// Example: Check balance of 0x742d35Cc6634C0532925a3b844Bc454e4438f44e
Check the balance of vitalik.eth on lightlink
Transfer native tokens on the same chain:
// Example: Transfer 1 ETH
Transfer 1 ETH to 0x742d35Cc6634C0532925a3b844Bc454e4438f44e
Swap tokens on the same chain, you can also provide the address of the tokens you want to swap directly.
// Example: Swap 1 ETH to USDC
Swap 1 ETH to USDC on lightlink testnet
Search the block explorer for contracts and addresses.
// Example: Search for a contract
Whats the contract address for the USDC (sometimes written as USDC.e) token on lightlink?
- Clone the repository
- Install dependencies: pnpm install
- Build the plugin: pnpm run build
- Run tests: pnpm test