n8n-nodes-berachain
v1.0.0
Published
A comprehensive n8n community node for Berachain Proof of Liquidity L1 blockchain providing 23 resources and 200+ operations for DeFi automation, BGT governance, HONEY stablecoin, validators, and native protocol interactions.
Maintainers
Readme
n8n-nodes-berachain
Comprehensive Berachain Proof of Liquidity blockchain integration for n8n
License Notice
This software is licensed under the Business Source License 1.1 (BSL 1.1).
- Free for non-commercial use
- Commercial use requires a license from Velocity BPA
- Converts to Apache 2.0 on January 1, 2028
See LICENSE, COMMERCIAL_LICENSE.md, and LICENSING_FAQ.md for details.
For commercial licensing inquiries, contact Velocity BPA.
Overview
This n8n community node provides deep integration with the Berachain blockchain ecosystem, including its unique Proof of Liquidity (PoL) consensus mechanism. It supports all major Berachain protocols:
- BGT - Bera Governance Token (non-transferable, earned through PoL)
- HONEY - Overcollateralized stablecoin
- BEX - Native decentralized exchange
- Bend - Lending protocol
- Berps - Perpetuals trading
- Infrared - Liquid staking (iBGT)
- Reward Vaults - LP staking for BGT rewards
- Validators & Gauges - BGT emission governance
Installation
Via n8n Community Nodes
- Open your n8n instance
- Go to Settings > Community Nodes
- Select Install
- Enter
n8n-nodes-berachain - Click Install
Manual Installation
# Navigate to your n8n custom nodes directory
cd ~/.n8n/custom
# Clone or copy the package
npm install n8n-nodes-berachainDevelopment Installation
git clone https://github.com/velocitybpa/n8n-nodes-berachain.git
cd n8n-nodes-berachain
npm install
npm run build
npm link
# In your n8n directory
npm link n8n-nodes-berachainConfiguration
Credentials
Berachain Network (Required)
Configure your connection to Berachain:
| Field | Description |
|-------|-------------|
| Network | Select Mainnet, Bartio Testnet, or Custom |
| Custom RPC URL | Your RPC endpoint (for custom network) |
| WebSocket URL | Optional WebSocket for real-time events |
| Private Key | Optional, required for write operations |
| Beratrail API Key | Optional, for enhanced data access |
Berachain API (Optional)
For subgraph and advanced analytics:
| Field | Description | |-------|-------------| | Environment | Mainnet or Testnet | | Subgraph API Key | For querying Berachain subgraphs | | Custom Subgraph URL | Override default subgraph endpoints |
Nodes
Berachain Node
The main node with 23 resource categories and 130+ operations.
Berachain Trigger
Real-time event triggers for blockchain events.
Resources & Operations
Account
getBalance- Get native BERA balancegetTokenBalances- Get all token balancesgetTransactionCount- Get noncegetAccountInfo- Comprehensive account datagetBgtBalance- Get BGT balance and detailsgetBoosts- Get active BGT boostsestimateGas- Estimate gas for transaction
Transaction
sendBera- Send native BERAsendTransaction- Send custom transactiongetTransaction- Get transaction by hashgetReceipt- Get transaction receiptwaitForTransaction- Wait for confirmationgetGasPrice- Get current gas pricegetFeeData- Get comprehensive fee data
BERA
getBalance- Get BERA balancetransfer- Transfer BERAwrap- Wrap BERA to WBERAunwrap- Unwrap WBERA to BERAgetWberaBalance- Get WBERA balance
BGT (Bera Governance Token)
getBalance- Get BGT balancegetBalances- Get detailed BGT infogetBoosts- Get boost informationqueueBoost- Queue BGT for boostingactivateBoost- Activate queued boostcancelBoost- Cancel queued boostdropBoost- Drop active boostdelegate- Delegate voting powergetDelegate- Get current delegategetVotes- Get voting power
HONEY (Stablecoin)
getBalance- Get HONEY balancegetStats- Get HONEY protocol statsgetMintRate- Get current mint rategetRedeemRate- Get current redeem ratepreviewMint- Preview mint outputpreviewRedeem- Preview redeem outputmint- Mint HONEY with collateralredeem- Redeem HONEY for collateralgetCollateralBasket- Get supported collaterals
Validator
getActiveValidators- List active validatorsgetValidatorInfo- Get validator detailsgetCuttingBoard- Get validator's cutting boardgetValidatorWeight- Get validator BGT weightgetBgtPerBlock- Get BGT emission rate
Reward Vault
getVaults- List reward vaultsgetVaultInfo- Get vault detailsstake- Stake tokens in vaultunstake- Unstake tokens from vaultgetStake- Get staked balanceclaimRewards- Claim BGT rewardsgetEarned- Get pending rewardsgetApy- Get vault APY
Cutting Board
getConfig- Get cutting board configgetDistribution- Get reward distributiongetWeights- Get vault weights
Gauge
getGauges- List all gaugesgetGaugeInfo- Get gauge detailsgetWeight- Get gauge weightgetVotingConfig- Get voting configuration
BEX (DEX)
getPools- List liquidity poolsgetPoolInfo- Get pool detailsgetQuote- Get swap quoteswap- Execute swapaddLiquidity- Add liquidity to poolremoveLiquidity- Remove liquiditygetLpBalance- Get LP token balancegetReserves- Get pool reserves
Bend (Lending)
getMarkets- List lending marketsgetMarketInfo- Get market detailsgetUserPosition- Get user's positionsupply- Supply assetswithdraw- Withdraw assetsborrow- Borrow assetsrepay- Repay borrowed assetsgetHealthFactor- Get health factor
Berps (Perpetuals)
getMarkets- List perpetual marketsgetMarketInfo- Get market detailsgetPositions- Get open positionsopenPosition- Open new positionclosePosition- Close positionaddMargin- Add margin to positionremoveMargin- Remove margingetFundingRate- Get funding rategetVaultInfo- Get Berps vault infodepositToVault- Deposit to vaultwithdrawFromVault- Withdraw from vault
Contract
call- Call view functionexecute- Execute state-changing functiongetCode- Get contract bytecodeisContract- Check if address is contract
Token
getInfo- Get ERC20 token infogetBalance- Get token balancetransfer- Transfer tokensapprove- Approve spendergetAllowance- Get allowance
NFT
getOwner- Get NFT owner (ERC721)getBalance- Get NFT balance (ERC721)getTokenUri- Get token URItransfer- Transfer NFTgetBalance1155- Get balance (ERC1155)
Block
getLatestBlock- Get latest blockgetBlockByNumber- Get block by numbergetBlockNumber- Get current block numbergetBlockWithTx- Get block with transactions
Event
getLogs- Get raw event logsgetContractLogs- Get decoded contract logs
Governance
getVotingPower- Get voting powergetPastVotes- Get historical votesgetDelegate- Get delegate addressdelegate- Delegate voting power
Infrared (Liquid Staking)
getIbgtBalance- Get iBGT balancegetIbgtPrice- Get iBGT/BGT ratestakeBgt- Stake BGT for iBGTunstakeIbgt- Unstake iBGT for BGTgetPendingRewards- Get pending rewardsclaimRewards- Claim rewards
Multicall
executeMulticall- Execute multiple callsaggregate- Batch view calls
Analytics
getNetworkStats- Get network statisticsgetGasStats- Get gas statisticsgetPolStats- Get PoL statisticsgetValidatorStats- Get validator stats
Subgraph
querySubgraph- Execute GraphQL querygetStatus- Get subgraph status
Utility
validateAddress- Validate addresschecksumAddress- Get checksum addressconvertUnits- Convert units (wei/ether)hashData- Hash data (keccak256)getChainId- Get chain IDtestConnection- Test RPC connection
Trigger Events
The Berachain Trigger node supports:
- New Block - Trigger on each new block
- Pending Transaction - Trigger on pending tx
- BGT Queued - BGT boost queued
- BGT Activated - BGT boost activated
- BGT Dropped - BGT boost dropped
- BGT Delegated - BGT delegation changed
- HONEY Minted - HONEY minted
- HONEY Redeemed - HONEY redeemed
- Reward Vault Staked - Tokens staked in vault
- Reward Vault Withdrawn - Tokens withdrawn
- Rewards Claimed - BGT rewards claimed
- BEX Swap - DEX swap executed
- Bend Supply - Assets supplied to Bend
- Bend Borrow - Assets borrowed from Bend
- Berps Position Opened - Perp position opened
- Berps Position Closed - Perp position closed
- Custom Contract Event - Any contract event
Example Workflows
Monitor BGT Rewards
{
"nodes": [
{
"name": "Berachain Trigger",
"type": "n8n-nodes-berachain.berachainTrigger",
"parameters": {
"event": "rewardsClaimed",
"vaultAddress": "0x..."
}
},
{
"name": "Slack",
"type": "n8n-nodes-base.slack",
"parameters": {
"channel": "#defi-alerts",
"text": "BGT rewards claimed: {{$json.args.amount}}"
}
}
]
}Auto-Compound BGT
{
"nodes": [
{
"name": "Schedule",
"type": "n8n-nodes-base.schedule",
"parameters": {
"rule": { "interval": [{ "hours": 24 }] }
}
},
{
"name": "Check Rewards",
"type": "n8n-nodes-berachain.berachain",
"parameters": {
"resource": "rewardVault",
"operation": "getEarned"
}
},
{
"name": "Claim Rewards",
"type": "n8n-nodes-berachain.berachain",
"parameters": {
"resource": "rewardVault",
"operation": "claimRewards"
}
}
]
}Track HONEY Mints
{
"nodes": [
{
"name": "HONEY Trigger",
"type": "n8n-nodes-berachain.berachainTrigger",
"parameters": {
"event": "honeyMinted"
}
},
{
"name": "Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"parameters": {
"operation": "append",
"sheetId": "...",
"values": {
"timestamp": "={{$json.blockNumber}}",
"amount": "={{$json.args.amount}}"
}
}
}
]
}Berachain Concepts
Proof of Liquidity (PoL)
Berachain's consensus mechanism where validators earn BGT rewards proportional to liquidity they attract:
- Liquidity Providers stake LP tokens in Reward Vaults
- Reward Vaults distribute BGT to stakers
- Validators configure Cutting Boards to direct BGT to vaults
- BGT Holders boost validators to increase their emissions
BGT (Bera Governance Token)
- Non-transferable - Can only be earned, not bought
- Earned through - Providing liquidity and staking in Reward Vaults
- Use cases - Boost validators, delegate voting power, burn for BERA
HONEY
Berachain's native overcollateralized stablecoin:
- Mint with approved collateral (WBERA, WETH, WBTC, etc.)
- Dynamic mint/redeem rates based on market conditions
- Core to Berachain DeFi ecosystem
Reward Vaults
Smart contracts that distribute BGT to LP token stakers:
- Each vault accepts specific LP tokens
- BGT rewards based on validator cutting board allocation
- Users can stake, unstake, and claim rewards
Error Handling
All operations return structured error responses:
{
"success": false,
"error": {
"message": "Insufficient balance",
"code": "INSUFFICIENT_FUNDS",
"details": { ... }
}
}Network Support
| Network | Chain ID | Status | |---------|----------|--------| | Mainnet | 80094 | ✅ Supported | | Bartio Testnet | 80084 | ✅ Supported | | Custom | Any | ✅ Supported |
Development
# Install dependencies
npm install
# Build
npm run build
# Lint
npm run lint
# Test
npm test
# Format
npm run formatSupport
- Issues: GitHub Issues
- Documentation: Berachain Docs
- Commercial Support: Contact Velocity BPA
Contributing
Contributions are welcome under the BSL 1.1 license terms. Please read our contributing guidelines before submitting PRs.
Changelog
v1.0.0
- Initial release
- 23 resource categories
- 130+ operations
- Real-time event triggers
- Full PoL support
Built with ❤️ by Velocity BPA for the Berachain ecosystem
