Protocol Smart Contract
Go To:

Shuffle

Cryptographic card deck shuffle0x00000000000000000000000000000000000000AB~5,000 gas

Why It Matters

On-chain card games need verifiable shuffles. This precompile provides casino-grade randomness with rejection sampling to eliminate modulo bias.

Interface

Input:  bytes (optional salt)
Output: 104 bytes (52 cards x 2 chars)
Format: SuitRank (e.g., "SA" = Ace of Spades, "CQ" = Queen of Clubs)

Suits: S(pades), H(earts), D(iamonds), C(lubs)
Ranks: A, 2-9, T(en), J, Q, K