Skip to main content
If you’ve gone through the quickstart guide, you’ve already created a shard client and used it to send commands and queries to your shard. If you missed it, a shard client connects to a specific Cardinal shard. It lets you send commands, query game state, and listen for events from that shard.

Registering a shard client

You do this by calling world.shard.register:
Register Shard Client
import { world } from './sdk'

const shard = world.shard.register({
  organization: 'argus', // corresponds to CARDINAL_ORG
  project: 'demo', // corresponds to CARDINAL_PROJECT
  shardId: 'cardinal-demo-game-1', // corresponds to CARDINAL_SHARD_ID
})

// You can create shard clients for different shards
Learn more about what shard clients can do:
I