Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Data shapeServer APIGenerated

CraftRefundProposal

Defined in: server/api.d.ts:3279

An unfinished craft before material settlement. Frozen. Call the event’s refund callback synchronously to request all its materials back; otherwise the native refund rules apply.

kind: "alchemy" | "smithing"

Defined in: server/api.d.ts:3283

Which craft.


materials: CraftRefundMaterial[]

Defined in: server/api.d.ts:3313

All remaining original ingredients, including processed alchemy ingredients. Station liquids and ingredients already returned are excluded. Do not grant these yourself; call refund().


outcome: "failed" | "cancelled"

Defined in: server/api.d.ts:3303

No product was granted for this craft.


reason: string

Defined in: server/api.d.ts:3308

Why it ended: cancelled for normal native or script cancellation; interrupted for native teardown without a normal exit; clientError for an alchemy adapter failure; craftingFailed for a broken smithing workpiece. Server closures also include disconnected, timeout and contextInvalidated; settlement refusals retain their existing reasons. Client exit reasons are observations, not server-verified combat evidence.


session: string

Defined in: server/api.d.ts:3288

The session being settled, once only.


station: string

Defined in: server/api.d.ts:3293

Station id.


virtualWorld: number

Defined in: server/api.d.ts:3298

The session’s virtual world.