Quick Start Guide
1. Install Blocana SDK
npm install @blocana/sdk
The Blocana SDK provides everything you need to interact with the Blocana blockchain, including transaction creation, account management, and smart contract deployment.
2. Initialize the Client
import { BlockClient } from '@blocana/sdk'; const client = new BlockClient({ network: 'testnet', apiKey: 'YOUR_API_KEY' });
Connect to the Blocana network by initializing a client with your API key. You can generate an API key in the developer dashboard.
3. Create Your First Transaction
const transaction = await client.createTransaction({ from: 'YOUR_WALLET_ADDRESS', to: 'RECIPIENT_ADDRESS', amount: '1.5', data: '0x' // Optional data payload }); const signedTx = await client.signTransaction( transaction, 'YOUR_PRIVATE_KEY' ); const receipt = await client.sendTransaction(signedTx); console.log('Transaction hash:', receipt.transactionHash);
Create, sign, and send a transaction to transfer tokens or interact with smart contracts on the Blocana blockchain.
4. Deploy a Smart Contract
const compiledContract = await client.compileContract( contractSourceCode ); const deployTx = await client.deployContract( compiledContract, [/* constructor arguments */], 'YOUR_PRIVATE_KEY' ); console.log('Contract address:', deployTx.contractAddress);
Compile and deploy smart contracts directly from your application using the Blocana SDK.
SDKs & APIs
JavaScript/TypeScript SDK
Full-featured SDK for building web applications, Node.js services, and more.
View DocumentationJava SDK
Enterprise-grade SDK for building Java applications and Android mobile apps.
View DocumentationPython SDK
Pythonic SDK for data science, analytics, and backend services integration.
View DocumentationREST API
Comprehensive RESTful API for integrating Blocana with any programming language.
API ReferenceGraphQL API
Flexible query language for retrieving exactly the data you need in a single request.
API ReferenceBlockchain RPC API
Direct access to the Blocana blockchain via standard JSON-RPC interface.
API ReferenceDeveloper Guides
Smart Contract Development
Learn how to write, test, and deploy secure smart contracts on the Blocana blockchain.
Read GuideTransaction Processing
Understand how transactions are created, signed, and processed on the Blocana network.
Read GuideEvent Subscriptions
Learn how to subscribe to blockchain events and build real-time applications.
Read GuideSecurity Best Practices
Essential security guidelines for building secure applications on Blocana.
Read GuideCode Examples
View All ExamplesSimple Token Transfer
JavaScript// Send tokens to another address const tx = await client.sendTokens({ to: "0x123...abc", amount: "10.5", gasLimit: 21000 }); console.log(`TX Hash: ${tx.hash}`);
Smart Contract Interaction
TypeScript// Load a deployed contract const contract = client.loadContract( contractAddress, contractABI ); // Call contract method const balance = await contract.methods .balanceOf("0x456...def") .call();
Event Subscription
Python# Subscribe to contract events subscription = client.subscribe( contract_address, event="Transfer", from_block="latest" ) for event in subscription: print(f"Transfer: {event}")
Additional Resources
Developer Community
Join our active developer community to get help, share knowledge, and collaborate on projects.
Join CommunityDeveloper Tools
Explore our suite of developer tools including block explorers, testing frameworks, and more.
Browse ToolsDeveloper Support
Get personalized help from our developer support team for your Blocana project.
Contact Support