Core API Documentation

Comprehensive guides, code samples, and reference documentation for building decentralized applications with the Elenē core API.

🚀 Get Started

Getting Started

Why Use the Core API?

  • Interact with multiple blockchains through a single unified interface
  • Execute cross-chain transactions with native multi-network support
  • Instantly access real-time blockchain data feeds

This documentation will guide you through every step of setting up and using the Core API for developing blockchain applications.

Installation & Setup

1. Install CLI

npm install -g @elenelabs/core-api

Install the command-line interface for Core API with full network capabilities and smart contract bindings.

2. Configure Your Network

core-api init my-project --network ethereum --chain 1

Initialize a new project with Ethereum mainnet. Supported networks: Ethereum, Polkadot, Binance Smart Chain, Solana.

3. Run Development Server

cd my-project core-api dev --watch --hot-reload
Live Rebuilding
Instant Feedback
Auto Reconnect

Start development server with full auto-reconnect and real-time updates across all blockchain networks.

Usage Guide

Core API Features

Basic Contract Interaction

import { ElenAPI } from '@elenelabs/core-api'; const api = new ElenAPI({ network: 'ethereum', chainId: 1, contractAddress: '0xYourContractAddress', apiKey: 'YOUR_API_KEY' }); // Read contract storage const balance = await api.readStorage('balanceOf', { account: '0xUserAddress' }); // Execute transaction const receipt = await api.sendTransaction({ to: '0xRecipient', amount: '0.1 ETH' });

Why This Matters

  • Cross-chain compatible contract interface
  • Type-safe smart contract calls
  • Built-in gas price estimation

Supported Method Types

Smart Contract
  • • Direct contract method calls
  • • ABI parsing tools
  • • Event listener system
Blockchain
  • • Blockchain stats
  • • Wallet address balance checks
  • • Pending transaction queries
NFT
  • • NFT metadata retrieval
  • • Token ownership tracking
  • • Marketplace integrations

Advanced Usage

Private Key Management

const secureConfig = { walletType: 'ledger', keyStoreType: 'keystore', derivationPath: "m/44'/60'/0'/0/0", encryption: { algorithm: 'AES-256-GCM', salt: 'secure-salt-value' } }; const secureAPI = new SecureElenAPI(secureConfig);

Professional-grade private key management with support for hardware wallets and encrypted keystores.

Multi-Chain Bridge

const crossChainTransfer = async () => { return await api.bridgeTokens({ fromChain: 'ethereum', toChain: 'polygon', amount: '100 USDC', receiver: '0xReceiverAddress', slippageTolerance: 0.02 }); };

Seamlessly transfer tokens across chains with built-in bridge support and slippage protection.

API Reference

Core Classes

ElenAPI

Main interface for blockchain interactions

  • readStorage()
  • sendTransaction()
  • watchEvents()

SecureElenAPI

Security-enhanced API instance

  • encryptData()
  • decryptKeystore()
  • signWithLedger()

Utility Classes

AddressValidator

  • validateEthAddress()
  • validateSolAddress()

GasEstimator

  • estimateGasCost()
  • getFastestPrice()

ABICompiler

  • compileSolidity()
  • generateABI()

Get Help & Stay Connected

Discord

24/7 real-time support and community discussions

Join Chat

GitHub

Report issues and contribute to Core API development