---
title: Blockchain Tools
description: Core blockchain interaction tools for EVM, Solana, and 60+ chains
---
# Blockchain Tools
Fundamental blockchain interaction tools providing read/write access to 60+ blockchains including Ethereum, Solana, BNB Chain, Arbitrum, and more.
## EVM Tools (50+ tools)
### Balance & Account Tools
<div className="grid grid-cols-1 gap-4 my-6">
**`get_balance`** - Get native token balance
```typescript
{
address: string; // Wallet address
chainId?: number; // Chain ID (default: 1)
}
```
**`get_token_balance`** - Get ERC-20 token balance
```typescript
{
address: string; // Wallet address
tokenAddress: string; // Token contract address
chainId?: number;
}
```
**`get_multiple_balances`** - Batch balance queries using Multicall
```typescript
{
addresses: string[]; // Multiple addresses
tokens?: string[]; // Optional token addresses
chainId?: number;
}
```
</div>
### Transfer Tools
<div className="grid grid-cols-1 gap-4 my-6">
**`transfer_eth`** - Send native ETH/MATIC/BNB
```typescript
{
to: string; // Recipient address
amount: string; // Amount in ETH
chainId?: number;
gasLimit?: number;
}
```
**`transfer_token`** - Send ERC-20 tokens
```typescript
{
token: string; // Token contract address
to: string;
amount: string;
chainId?: number;
}
```
**`batch_transfer`** - Send to multiple recipients
```typescript
{
token?: string; // Optional (ETH if not provided)
recipients: Array<{
to: string;
amount: string;
}>;
chainId?: number;
}
```
</div>
### Contract Interaction
<div className="grid grid-cols-1 gap-4 my-6">
**`call_contract`** - Read from smart contract
```typescript
{
contract: string; // Contract address
abi: any[]; // Contract ABI
method: string; // Method name
params?: any[]; // Method parameters
chainId?: number;
}
```
**`send_transaction`** - Write to smart contract
```typescript
{
contract: string;
abi: any[];
method: string;
params?: any[];
value?: string; // ETH to send
chainId?: number;
}
```
**`multicall`** - Batch multiple contract calls
```typescript
{
calls: Array<{
target: string;
allowFailure: boolean;
callData: string;
}>;
chainId?: number;
}
```
</div>
### Token Tools
<div className="grid grid-cols-1 gap-4 my-6">
**`get_token_metadata`** - Get token info (name, symbol, decimals)
```typescript
{
tokenAddress: string;
chainId?: number;
}
```
**`approve_token`** - Approve token spending
```typescript
{
token: string;
spender: string;
amount: string; // or "max" for unlimited
chainId?: number;
}
```
**`get_allowance`** - Check approved amount
```typescript
{
token: string;
owner: string;
spender: string;
chainId?: number;
}
```
</div>
## Solana Tools (40+ tools)
### Keypair & Wallet Tools
<div className="grid grid-cols-1 gap-4 my-6">
**`generate_keypair`** - Create new Solana keypair
```typescript
{
saveId?: string; // Optional ID to save
}
```
**`generate_vanity`** - Generate vanity address
```typescript
{
prefix?: string; // Desired prefix
suffix?: string; // Desired suffix
caseSensitive?: boolean;
}
```
**`import_keypair`** - Import from private key
```typescript
{
privateKey: string; // Base58 private key
saveId?: string;
}
```
</div>
### SPL Token Tools
<div className="grid grid-cols-1 gap-4 my-6">
**`get_spl_balance`** - Get SPL token balance
```typescript
{
publicKey: string;
mint: string; // Token mint address
}
```
**`transfer_spl`** - Transfer SPL tokens
```typescript
{
from: string; // Sender keypair ID
to: string; // Recipient address
mint: string;
amount: number;
}
```
**`create_token`** - Create new SPL token
```typescript
{
decimals: number;
authority: string; // Keypair ID
metadata?: {
name: string;
symbol: string;
uri: string;
};
}
```
</div>
### Transaction Tools
<div className="grid grid-cols-1 gap-4 my-6">
**`send_sol`** - Transfer native SOL
```typescript
{
from: string;
to: string;
amount: number; // In SOL
memo?: string;
}
```
**`get_transaction`** - Get transaction details
```typescript
{
signature: string;
}
```
**`simulate_transaction`** - Simulate before sending
```typescript
{
transaction: string; // Base64 transaction
}
```
</div>
### Program Tools
<div className="grid grid-cols-1 gap-4 my-6">
**`call_program`** - Call Solana program
```typescript
{
programId: string;
instruction: {
keys: Array<{
pubkey: string;
isSigner: boolean;
isWritable: boolean;
}>;
data: Buffer;
};
}
```
**`deploy_program`** - Deploy program
```typescript
{
program: Buffer; // Compiled program
authority: string;
}
```
</div>
## Multi-Chain Tools (30+ tools)
### Chain Info
<div className="grid grid-cols-1 gap-4 my-6">
**`get_chain_info`** - Get blockchain metadata
```typescript
{
chainId: number;
}
// Returns: name, nativeCurrency, rpcUrls, blockExplorer
```
**`list_chains`** - List all supported chains
```typescript
{
filter?: {
type?: 'mainnet' | 'testnet';
ecosystem?: 'evm' | 'solana' | 'cosmos';
};
}
```
</div>
### Bridge Tools
<div className="grid grid-cols-1 gap-4 my-6">
**`get_bridge_quote`** - Get cross-chain transfer quote
```typescript
{
fromChain: number;
toChain: number;
token: string;
amount: string;
}
```
**`execute_bridge`** - Bridge tokens cross-chain
```typescript
{
fromChain: number;
toChain: number;
token: string;
amount: string;
recipient: string;
}
```
</div>
### Gas Tools
<div className="grid grid-cols-1 gap-4 my-6">
**`get_gas_price`** - Get current gas prices
```typescript
{
chainId: number;
}
// Returns: slow, standard, fast, instant
```
**`estimate_gas`** - Estimate transaction gas
```typescript
{
transaction: {
to: string;
data?: string;
value?: string;
};
chainId: number;
}
```
</div>
## Supported Chains
### EVM Chains (40+)
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 my-6">
**Layer 1**
- Ethereum
- BNB Chain
- Polygon
- Avalanche
- Fantom
**Layer 2**
- Arbitrum One
- Arbitrum Nova
- Optimism
- Base
- Linea
- zkSync Era
- Polygon zkEVM
- Scroll
**Specialized**
- Gnosis Chain
- Moonbeam
- Celo
- Aurora
- Cronos
</div>
### Non-EVM Chains (20+)
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 my-6">
**Solana Ecosystem**
- Solana Mainnet
- Solana Devnet
- Solana Testnet
**Cosmos Ecosystem**
- Cosmos Hub
- Osmosis
- Juno
- Akash
**Others**
- Algorand
- Near
- Aptos
- Sui
- Cardano
</div>
## Usage Examples
### Check Balance on Multiple Chains
```typescript
import { universalCrypto } from '@universal-crypto/sdk';
// Check ETH balance on Ethereum and Arbitrum
const address = '0x...';
const [ethBalance, arbBalance] = await Promise.all([
universalCrypto.tools.get_balance({ address, chainId: 1 }),
universalCrypto.tools.get_balance({ address, chainId: 42161 }),
]);
console.log(`Ethereum: ${ethBalance} ETH`);
console.log(`Arbitrum: ${arbBalance} ETH`);
```
### Cross-Chain Token Transfer
```typescript
// Bridge USDC from Ethereum to Arbitrum
const quote = await universalCrypto.tools.get_bridge_quote({
fromChain: 1, // Ethereum
toChain: 42161, // Arbitrum
token: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC
amount: '100', // 100 USDC
});
console.log(`Fee: ${quote.fee} USDC`);
console.log(`Time: ${quote.estimatedTime} seconds`);
// Execute bridge
const tx = await universalCrypto.tools.execute_bridge({
...quote,
recipient: '0x...',
});
console.log(`Bridge transaction: ${tx.hash}`);
```
### Batch Token Transfers (Multicall)
```typescript
// Send tokens to multiple recipients in one transaction
const result = await universalCrypto.tools.batch_transfer({
token: '0x...', // Token address
recipients: [
{ to: '0xAlice...', amount: '10' },
{ to: '0xBob...', amount: '20' },
{ to: '0xCharlie...', amount: '30' },
],
chainId: 1,
});
console.log(`Sent to ${result.success} recipients`);
```
### Solana Token Creation
```typescript
// Create a new SPL token
const token = await universalCrypto.tools.create_token({
decimals: 9,
authority: 'my-keypair-id',
metadata: {
name: 'My Token',
symbol: 'MTK',
uri: 'https://token-metadata.json',
},
});
console.log(`Created token: ${token.mint}`);
// Mint initial supply
await universalCrypto.tools.mint_spl_tokens({
mint: token.mint,
to: 'recipient-address',
amount: 1000000,
authority: 'my-keypair-id',
});
```
## Pricing
| Tool Category | Cost | Notes |
|---------------|------|-------|
| Read Operations | Free | Balance, metadata, chain info |
| Write Operations | Gas only | User pays blockchain gas fees |
| Multicall | Free | Batch up to 100 calls |
| Bridge Operations | Bridge fee | Varies by protocol |
## Next Steps
- [EVM Reference](/tools/blockchain/evm) - Complete EVM tool documentation
- [Solana Reference](/tools/blockchain/solana) - Complete Solana tool documentation
- [Multi-Chain Guide](/guides/multi-chain) - Cross-chain integration guide
- [Chain List](/reference/chains) - All supported blockchains
## See Also
- [Wallet Tools](/tools/wallets) - Key management and signing
- [DeFi Tools](/tools/defi) - Protocol integrations
- [Security](/tools/security) - Safe blockchain interactions