Users of Jubmoji.quest tap NFC cards to collect signatures. By collecting these signatures, they complete quests. In order to complete a quest, a user must generate a client-side zero knowledge proof about the signatures they have collected. In particular, we allow users to complete quests which will send their proof to an external server for custom verification.
We have distributed 201 NFC Cards across Zuconnect/Devconnect. Each of these cards has a BabyJubJub ECDSA private key stored in its trusted hardware, a list of all public keys can be found here. When a user taps an NFC Card, the card increments a nonce and signs the pair (nonce, randomSalt)
with its private key. This signature is the Jubmoji.
As of today, there is one general purpose proof which encompasses all the statements a user can prove, NUniqueJubmojisInCollection. This proof represents the fact that "I own N Jubmojis which were given by unique cards in this list". There are many interesting things we can do with just this one statement:
Talk to Andrew or Vivek to get a quest set up for your project. In particular, we will give you a few NFC cards to hand out signatures with, and create the quest for you on jubmoji.quest. When users complete your quest, they will generate a proof client-side and be redirected to a url of your choice with the proof.
Proofs are sent to a url of your choice in the proof
url param, i.e. https://url.com/jubmojis?proof=EXAMPLE_SERIALIZED_PROOF. There is an example verification script located here, to use it you must install jubmoji-api: npm i jubmoji-api
. Optionally, for more general elliptic curve and BabyJubJub utilities, see babyjubjub-ecdsa.
Install yarn: corepack enable
.
Run yarn install
in root directory.
npx prisma migrate dev --name [name]
to create a dev migration.npx prisma generate
to regenerate the prisma client.Run both of these from root:
cd packages/jubmoji-api && yarn run build
cd apps/jubmoji-quest && yarn dev
We are grateful for all the work done by others that was needed for this to exist. A few special shoutouts: