A plugin for ElizaOS that enables interaction with the OmniFlix Network blockchain.
npm install @elizaos/plugin-omniflix
# Required: RPC endpoint for OmniFlix Network
OMNIFLIX_RPC_ENDPOINT="https://rpc.omniflix.network:443"
# Required: API endpoint for OmniFlix Network
OMNIFLIX_API_URL="https://rest.omniflix.network"
# Required: Either mnemonic or private key (one is required)
OMNIFLIX_MNEMONIC="your mnemonic"
# OR
OMNIFLIX_PRIVATE_KEY="your hex private key"
You can configure different networks by updating the endpoints:
OMNIFLIX_RPC_ENDPOINT="https://rpc.omniflix.network"
OMNIFLIX_API_URL="https://rest.omniflix.network"
OMNIFLIX_RPC_ENDPOINT="https://rpc.testnet.omniflix.network"
OMNIFLIX_API_URL="https://api.testnet.omniflix.network"
Note: Make sure to use the appropriate network endpoints based on your requirements. The mainnet endpoints should be used for production environments, while testnet are suitable for testing.
Commands:
- What is my balance?
- How many FLIX do I have?
- Check my wallet balance
Commands:
- Send 100 FLIX to omniflix1abc123...
- Transfer 50 FLIX to omniflix1xyz789...
Commands:
- What is my staked balance?
- Show my delegated FLIX
- Check my staking balance
Commands:
- Delegate 100 FLIX to omniflixvaloper1abc123...
- Stake 50 FLIX with validator omniflixvaloper1xyz789...
Commands:
- Undelegate 100 FLIX from omniflixvaloper1abc123...
- Unstake 50 FLIX from validator omniflixvaloper1xyz789...
Commands:
- Redelegate 100 FLIX from omniflixvaloper1abc123... to omniflixvaloper1def456...
- Move 50 FLIX stake from validator1 to validator2
Commands:
- Cancel unbonding of 100 FLIX from omniflixvaloper1abc123... at creation height 123456
- Stop unbonding 50 FLIX from validator omniflixvaloper1xyz789... at creation height 789012
- Cancel unbonding delegation with:
- Amount: 100 FLIX
- Validator: omniflixvaloper1abc123...
- Creation Height: 123456
Note: Creation height is required for canceling unbonding operations. You can find the creation height:
- In the unbonding delegation response
- Through the chain explorer
- From the original unbonding transaction
Commands:
- Vote yes on proposal 1
- Vote no on proposal 2
- Vote abstain on proposal 3
- Vote no_with_veto on proposal 4
Valid Options:
- yes
- no
- abstain
- no_with_veto
Note: proposal Id and vote option is required for voting on proposals or it will take unspecified vote option. You can find the proposal ID:
- In the proposal response
- Through the chain explorer
- From the original proposal transaction
- Import the plugin:
import { OmniflixPlugin } from "@elizaos/plugin-omniflix";
- Register with ElizaOS:
import { Eliza } from "@elizaos/core";
const eliza = new Eliza();
eliza.registerPlugin(OmniflixPlugin);
import { voteOnProposal } from "@elizaos/plugin-omniflix";
// Vote on a proposal
const voteOnProposal = await voteOnProposal(
{
proposalId: "1",
vote: "YES",
},
{
apiEndpoint: "https://rest.omniflix.network",
rpcEndpoint: "https://rpc.omniflix.network:443",
}
);
- Display denomination: FLIX
- Base denomination: uflix (auto-converted by plugin)
- Wallet addresses: Start with
omniflix
- Validator addresses: Start with
omniflixvaloper
- Unbonding period: 28 days
- Redelegation: Has cooldown period
- Delegation: Minimum amount may apply
- Unbonding cancellation requires:
- Validator address
- Amount
- Creation height (block height when unbonding started)
- Must be within unbonding period
- Voting eligibility: Proposals must be in voting period
- Voting frequency: One vote per address per proposal
- Voting power: Proportional to staked amount
This plugin is part of the ElizaOS project. See LICENSE file for details.