Type-safe, performant Java 21 SDK for Ethereum.
Maven
<dependency>
<groupId>sh.brane</groupId>
<artifactId>brane-rpc</artifactId>
<version>0.3.0</version>
</dependency>Zero Codegen
Bind interfaces to ABI at runtime. No build step.
Type-Safe Primitives
Address, Wei, Hash — catch bugs at compile time.Virtual Thread Native
Simple blocking code that scales. No reactive chains.
Sealed Exceptions
Exhaustive error handling with pattern matching.
Common Actions
Connect
// HD wallet with derived accounts (BIP-44)
var wallet = MnemonicWallet.fromPhrase(mnemonic);
var account0 = wallet.derive(0); // m/44'/60'/0'/0/0
var account1 = wallet.derive(1); // m/44'/60'/0'/0/1
var account2 = wallet.derive(2); // m/44'/60'/0'/0/2
// Connect with signing capabilities
var signer = Brane.connect(rpcUrl, account0);
// Check connection and chain
var chainId = signer.getChainId();
var balance = signer.getBalance(account0.address());
log.info("Connected to chain {} with balance {}", chainId, balance.toEther());
// WebSocket with real-time block subscriptions
var ws = Brane.connectWs("wss://eth.llamarpc.com");
ws.subscribeNewHeads(block -> {
log.info("New block: {} with {} txs", block.number(), block.transactions().size());
processBlock(block);
});
// Subscribe to contract events
ws.subscribeLogs(usdcAddress, transferTopic, log -> {
var transfer = decodeTransfer(log);
log.info("Transfer: {} -> {} amount {}", transfer.from(), transfer.to(), transfer.amount());
});Features
- EIP-1559 and EIP-4844 blob transactions
- HD wallets (BIP-39/44) and EIP-712 signing
- HTTP and WebSocket providers with subscriptions
- Multicall3 batching for efficient reads
- Event log parsing and filtering
- Anvil testing: snapshots, impersonation, time control
- Transaction simulation with state overrides
Community
- Follow @s8torxyz and @brane_sh for project updates
- Join the discussions on GitHub
- Looking for contributors and maintainers — DM @s8torxyz or apply here