@my-swu/simulator-client / MatchSavePayload
Interface: MatchSavePayload
Defined in: packages/ts-sdk/src/generated/types/common.ts:4198
Full state snapshot of one match, suitable for stateless transport.
SDK consumers persist this however they like (clipboard, IndexedDB, file download, server upload). The simulator does not store it on disk.
Example:
import type { MatchSavePayload } from '@my-swu/simulator-client'
const matchSavePayload: MatchSavePayload = {
"version": 0,
"sourceMatchId": 'example',
"seats": [],
"aiOpponents": [],
"aiPaused": false,
"copiedCards": [],
"state": {},
}
console.log(matchSavePayload)Properties
aiOpponents
Example:
import type { MatchSavePayload } from '@my-swu/simulator-client'
const matchSavePayload: MatchSavePayload = {
"version": 0,
"sourceMatchId": 'example',
"seats": [],
"aiOpponents": [],
"aiPaused": false,
"copiedCards": [],
"state": {},
}
const { aiOpponents } = matchSavePayload
console.log(aiOpponents)aiOpponents:
AiOpponentConfig[]
Defined in: packages/ts-sdk/src/generated/types/common.ts:4203
AI seat configs. Restore re-spawns drivers from these; MCTS trees and RNG state are deliberately rebuilt from restored gameplay state.
aiPaused
Example:
import type { MatchSavePayload } from '@my-swu/simulator-client'
const matchSavePayload: MatchSavePayload = {
"version": 0,
"sourceMatchId": 'example',
"seats": [],
"aiOpponents": [],
"aiPaused": false,
"copiedCards": [],
"state": {},
}
const { aiPaused } = matchSavePayload
console.log(aiPaused)aiPaused:
boolean
Defined in: packages/ts-sdk/src/generated/types/common.ts:4207
Whether AI was manually paused when this snapshot was captured.
aiPausedSeats?
Example:
import type { MatchSavePayload } from '@my-swu/simulator-client'
const matchSavePayload: MatchSavePayload = {
"version": 0,
"sourceMatchId": 'example',
"seats": [],
"aiOpponents": [],
"aiPaused": false,
"copiedCards": [],
"state": {},
}
const { aiPausedSeats } = matchSavePayload
console.log(aiPausedSeats)
optionalaiPausedSeats?:Seat[]
Defined in: packages/ts-sdk/src/generated/types/common.ts:4212
Exact manually paused AI seats. Empty payloads from older clients use ai_paused as the all-seat compatibility fallback.
copiedCards
Example:
import type { MatchSavePayload } from '@my-swu/simulator-client'
const matchSavePayload: MatchSavePayload = {
"version": 0,
"sourceMatchId": 'example',
"seats": [],
"aiOpponents": [],
"aiPaused": false,
"copiedCards": [],
"state": {},
}
const { copiedCards } = matchSavePayload
console.log(copiedCards)copiedCards:
UnitCopiedCardEntry[]
Defined in: packages/ts-sdk/src/generated/types/common.ts:4218
Wire mirror of the [UnitState::copied_card] Arcs that the inner state could not embed. Keyed by unit.instance_id. Empty when no active unit has a copied card.
lessonScenarioId?
Example:
import type { MatchSavePayload } from '@my-swu/simulator-client'
const matchSavePayload: MatchSavePayload = {
"version": 0,
"sourceMatchId": 'example',
"seats": [],
"aiOpponents": [],
"aiPaused": false,
"copiedCards": [],
"state": {},
}
const { lessonScenarioId } = matchSavePayload
console.log(lessonScenarioId)
optionallessonScenarioId?:string|null
Defined in: packages/ts-sdk/src/generated/types/common.ts:4222
Authored Learn scenario whose scripted AI opener remains active.
restoreAuthorizationSignature?
Example:
import type { MatchSavePayload } from '@my-swu/simulator-client'
const matchSavePayload: MatchSavePayload = {
"version": 0,
"sourceMatchId": 'example',
"seats": [],
"aiOpponents": [],
"aiPaused": false,
"copiedCards": [],
"state": {},
}
const { restoreAuthorizationSignature } = matchSavePayload
console.log(restoreAuthorizationSignature)
optionalrestoreAuthorizationSignature?:string|null
Defined in: packages/ts-sdk/src/generated/types/common.ts:4231
Server-generated HMAC-SHA256 capability over every other payload field plus the out-of-band seat token authorized to export this save. The token itself is never embedded. Public restore verifies this signature without loading the source session, so a save survives source cleanup and restarts while rejecting any payload or token tampering. Local and history saves leave this as None.
seats
Example:
import type { MatchSavePayload } from '@my-swu/simulator-client'
const matchSavePayload: MatchSavePayload = {
"version": 0,
"sourceMatchId": 'example',
"seats": [],
"aiOpponents": [],
"aiPaused": false,
"copiedCards": [],
"state": {},
}
const { seats } = matchSavePayload
console.log(seats)seats:
MatchSaveSeat[]
Defined in: packages/ts-sdk/src/generated/types/common.ts:4236
Per-seat deck definitions, used at restore to rebuild the catalog Arc maps that the inner [MatchState] skipped at serialize time.
sourceMatchId
Example:
import type { MatchSavePayload } from '@my-swu/simulator-client'
const matchSavePayload: MatchSavePayload = {
"version": 0,
"sourceMatchId": 'example',
"seats": [],
"aiOpponents": [],
"aiPaused": false,
"copiedCards": [],
"state": {},
}
const { sourceMatchId } = matchSavePayload
console.log(sourceMatchId)sourceMatchId:
string
Defined in: packages/ts-sdk/src/generated/types/common.ts:4241
Match id of the original session this save was captured from. The restored match gets a fresh id; this field is for traceability only.
state
Example:
import type { MatchSavePayload } from '@my-swu/simulator-client'
const matchSavePayload: MatchSavePayload = {
"version": 0,
"sourceMatchId": 'example',
"seats": [],
"aiOpponents": [],
"aiPaused": false,
"copiedCards": [],
"state": {},
}
const { state } = matchSavePayload
console.log(state)state:
object
Defined in: packages/ts-sdk/src/generated/types/common.ts:4251
The serialized engine state. Catalog Arcs are skip-default here and grafted on by the restore path before the state goes live.
Opaque to the public schema — SDK consumers should treat this as an implementation-defined object that round-trips byte-for-byte. Pinning every engine sub-struct into the schema would couple the SDK type surface to the entire engine, which we explicitly do not want.
Index Signature
[k: string]: unknown
version
Example:
import type { MatchSavePayload } from '@my-swu/simulator-client'
const matchSavePayload: MatchSavePayload = {
"version": 0,
"sourceMatchId": 'example',
"seats": [],
"aiOpponents": [],
"aiPaused": false,
"copiedCards": [],
"state": {},
}
const { version } = matchSavePayload
console.log(version)version:
number
Defined in: packages/ts-sdk/src/generated/types/common.ts:4259
Wire-format version. Always [MATCH_SAVE_VERSION] for newly minted payloads; restore accepts every [SUPPORTED_SAVE_VERSIONS] entry and rejects anything else.
