CrossMesh is a decentralized cross-chain message passing protocol that enables secure, low-latency, and verifiable communication between different blockchain networks. It serves as the foundational communication layer for multi-chain DApps, supporting DEX, NFT, DAO, and other cross-chain scenarios.
CrossMesh consists of three main layers:
npm install @crossmesh/sdk
pip install crossmesh-sdk
[dependencies]
crossmesh-relay = "0.1.0"
import { CrossMeshClient } from '@crossmesh/sdk';
const client = new CrossMeshClient({
chains: [
{
chainId: 1,
name: 'Ethereum',
rpcUrl: 'https://mainnet.infura.io/v3/YOUR_PROJECT_ID',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }
},
{
chainId: 137,
name: 'Polygon',
rpcUrl: 'https://polygon-rpc.com',
nativeCurrency: { name: 'MATIC', symbol: 'MATIC', decimals: 18 }
}
],
contractAddresses: {
messageBridge: '0x...',
lightClient: '0x...',
feeMarket: '0x...',
retryManager: '0x...'
},
rpcUrls: ['https://mainnet.infura.io/v3/YOUR_PROJECT_ID']
});
// Send a cross-chain message
const txHash = await client.sendMessage({
dstChainId: 137,
receiver: '0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6',
payload: new TextEncoder().encode('Hello CrossMesh!')
});
// Monitor message status
const status = await client.monitorMessage(txHash);
console.log('Message status:', status);
from crossmesh import CrossMeshClient
client = CrossMeshClient({
'chains': [
{
'chain_id': 1,
'name': 'Ethereum',
'rpc_url': 'https://mainnet.infura.io/v3/YOUR_PROJECT_ID',
'native_currency': {'name': 'Ether', 'symbol': 'ETH', 'decimals': 18}
}
],
'contract_addresses': {
'message_bridge': '0x...',
'light_client': '0x...',
'fee_market': '0x...',
'retry_manager': '0x...'
},
'rpc_urls': ['https://mainnet.infura.io/v3/YOUR_PROJECT_ID']
})
# Send a cross-chain message
tx_hash = await client.send_message({
'dst_chain_id': 137,
'receiver': '0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6',
'payload': b'Hello CrossMesh!'
})
# Monitor message status
status = await client.monitor_message(tx_hash)
print(f'Message status: {status}')
# Clone the repository
git clone https://github.com/ducqmomo/CrossMesh.git
cd CrossMesh
# Install dependencies
npm install
# Compile contracts
npm run compile
# Run tests
npm test
# Deploy contracts
npm run deploy
# Initialize relay node configuration
crossmesh-relay init --output config.toml
# Start relay node
crossmesh-relay start --config config.toml
# Run all tests
npm test
# Run contract tests
npx hardhat test
# Run SDK tests
cd sdk/typescript && npm test
cd sdk/python && pytest
cd sdk/rust && cargo test
# Run with coverage
npm run coverage
| Chain | Chain ID | Status | Notes |
|---|---|---|---|
| Ethereum | 1 | ✅ Supported | Mainnet |
| Polygon | 137 | ✅ Supported | Mainnet |
| BSC | 56 | ✅ Supported | Mainnet |
| Arbitrum | 42161 | 🚧 Coming Soon | Testnet |
| Optimism | 10 | 🚧 Coming Soon | Testnet |
| Avalanche | 43114 | 🚧 Coming Soon | Testnet |
CrossMesh implements multiple security mechanisms:
We welcome contributions! Please see our Contributing Guide for details.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ by the CrossMesh Team
$ claude mcp add CrossMesh \
-- python -m otcore.mcp_server <graph>