Printable short-message shard cards with checksum validation and one-card parity recovery.
pub(all) enum Recovery { Restored(Array[Int]) NeedCards(Array[Int]) Damaged(String)} derive(Eq, @moonbitlang/core/debug.DebugDebug)
pub(all) struct ShardCard { deck : String index : Int data_count : Int width : Int original_len : Int checksum : Int cells : Array[Int]} derive(Eq, @moonbitlang/core/debug.DebugDebug)
fn demo_payload() -> Array[Int]
fn recover(cards : Array[ShardCard]) -> Recovery
fn render_card(card : ShardCard) -> String
fn render_sheet(cards : Array[ShardCard]) -> String
fn validate_card(card : ShardCard) -> Bool
fn validation_commands() -> Array[String]
fn weave(deck : String, payload : Array[Int], data_count : Int) -> Array[ShardCard]
Install
Powered by MoonBit
© 2026 mooncakes.io