Reference

API Reference

Interface with the anon0mesh relay and wallet services.

The anon0mesh CLI and mobile SDK provide high-level abstractions for mesh communication and Arcium-powered confidential swaps.

Available Methods

mesh.scan()

Discover nearby nodes and zones. Returns a list of active relays.

wallet.swap()

Initialize a confidential Solana swap. Automatically queues for mesh relay if offline.

msg.send()

Encrypt and send a message via E2EE P2P relay.

Example: Offline Swap Request

// Example JS SDK usage
import { MeshClient } from '@anon0mesh/sdk';

const mesh = new MeshClient();
await mesh.connect(); // Connects to local BLE relay

const swap = await mesh.wallet.prepareSwap({
  sell: 'SOL',
  amount: 0.2,
  buy: 'USDC',
  confidential: true
});

console.log('Swap queued for relay:', swap.id);