Hypr Docs

Hypr Cards SDK

Hyper Cards SDK is an all-purpose tool set that enables game developers to easily build any on-chain card games employing zero-knowledge proof technology.

The problem we solved

Creating card game protocols on public blockchains poses several challenges. One of the main challenges is the need for players to hide their card values from each other, whereas on-chain information is absolutely transparent due to the nature of blockchain technology. On-chain data encryption or obfuscation can be achieved using cryptographic techniques such as zero-knowledge proofs or secure multi-party computation, but these techniques can be very complicated and require a steep learning curve for game developers. And that is why we’re here to do all the heavy lifting on cryptography in Hyper blockchain and ship a set of well-designed zero-knowledge card game SDK (with complex contained) and tools so game developers can only focus on their games.

The Solidity APIs for smart contract

After taking a good hard look at how card games work in the real world, we found a bunch of common things that they all need to do. Then the magic zero-knowledge proof tech was used to build a sweet set of APIs for card games that can handle all these common operations. We made it super easy for game developers to use our APIs by packaging them up as precompiled smart contracts that can be plugged right into their Ethereum Virtual Machine (EVM) game contracts. This way, they can focus on making their games awesome without having to worry about reinventing the wheel every time.
Dive in and look at a sample or continue reading below.
API name
Compute aggregation public key
Mask a playing card
Reveal a masked playing card
Solidity Interface
Contract Address
Mental Poker Exec
API name
Verify proof of ownership of a game key
Verify proof of shuffling of deck
Verify proof of reveal token of a card
Solidity Interface
Contract Address
Mental Poker Verify
The Typescript/Javascript API for game client
API name
Create a random game key pair
Create a public parameter to setup game instance
Generate an initial encoded deck of playing cards
Mask an encoded card
Shuffle and remask the deck of cards, off-chain, with a random permutation
Compute a reveal token for a given masked card
Reveal a masked card to see its original value

What can be built with the zkGaming SDK?

The zkgaming SDK can be applied to various games that have a card model, including but not limited to poker games, card trading games, casino games, board games, and turn-based games.