Smart Contracts
Integrate blockchain functionality for on-chain assets and transactions.
Supported Chains
- Ethereum (Mainnet, Sepolia)
- Polygon (Mainnet, Mumbai)
- Arbitrum
- Base
- Solana
Minting NFTs
// Mint an NFT
const nft = await aethex.blockchain.mint({
chain: 'polygon',
contract: '0x...',
recipient: '0x...',
metadata: {
name: 'Epic Sword',
image: 'ipfs://...',
attributes: [
{ trait_type: 'Damage', value: 100 }
]
}
});
Wallet Connection
// Connect user wallet
const wallet = await aethex.blockchain.connectWallet();
// Get balance
const balance = await wallet.getBalance();
// Sign message
const signature = await wallet.signMessage('Verify ownership');