SpruceID
Search…
Example Overview
The demo directory includes a Cloudflare Worker that acts as a server-side witness (demo/witness) and a front-end UI for interacting with the witness (demo/dapp). Installation and usage instructions are found in those respective directories, but the high-level overview is given here.
The Cloudflare Worker acts a proof-of-concept that Rebase can be packaged for WASM environments, including the browser. Otherwise, it essentially functions as a tiny HTTP server. It contains 2 routes, /statement, where the client is expected to post a struct that implements Statement and then receives the generated statement from the witness and /witness where a struct that implements Proof is posted, and the witness uses its generator to produce a VC (assuming all the details check out).
The UI is a thin client that simply gathers the information required to generate the statement, interacts with browser extensions to get the user to sign the statement, informs the user where to post the statement (if necessary), then gathers the information on the location of the post (again, if necessary), returns it to the witness for a VC, then displays the VC and allows the user to download it.

The Rebase Faucet Demo

  • First, a user has access to see what credentials they can obtain from the interface, and those they've already obtained.

​

  • Once a user has connected their account, they can go through one of the various flows to obtain a credential.
​
​
  • In this example, a user must enter their Twitter handle, and sign a message containing both that handle and their public key.
​
​
  • Once completed, then, the user has to Tweet out the given attestation and submit the Tweet's URL to the service. At that point, the Tweet will be "witnessed" and if the signatures match, a credential will be issued.
​
​
  • Finally, the credential is issued to the user, and eventually can be stored in their data vault of choice.
Copy link
Outline