Add API + tests for Swarm