Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / DeckInput

Type Alias: DeckInput ​

DeckInput = GeneratedDeckInput

Defined in: packages/ts-sdk/src/resources/card-types.ts:68

Deck payload accepted by match creation and join calls.

The same shape is used for Premier, Eternal, Trilogy, Draft, Sealed, Twin Suns, and AI opponent decks. The server validates format-specific legality when the deck is submitted.

Example:

ts
import type { DeckInput } from '@my-swu/simulator-client'

const deckInput: DeckInput = {
  leader: 60,
  // Twin Suns decks list their leaders here instead of in `leader`.
  leaders: [],
  base: 95,
  cards: Array.from({ length: 50 }, () => 45),
  // Required on the wire; formats without a sideboard reject a non-empty one.
  sideboard: [],
}

console.log(deckInput)

Example ​

ts
import type { DeckInput } from '@my-swu/simulator-client'

const premierDeck: DeckInput = {
  leader: 46102,
  leaders: [],
  base: 308,
  cards: Array.from({ length: 50 }, () => 45),
  sideboard: [],
}

console.log(premierDeck.cards.length)

See ​

https://simulator-sdk.my-swu.com/guide/deckbuilding-formats

Released under the MIT License.