Signature
Last updated
Last updated
A Signature
is a specific message embedded in a generated proof that will be checked when verifying the proof. It can be requested from the Data Vault via a SignatureRequest.
The SignatureRequest
is an object with the following properties:
message
(required): the message that the user is going to sign.
isSelectableByUser
(optional): by default set to false
. Allows the user to edit the message in the Sismo Data Vault app.
SignatureRequest
is made in the front end using either the or the .
The proof with the requested signature is then verified either in a backend using the or in a smart contract using the .
SignatureRequest is passed to the SismoConnectButton
through the signature
props
Responses are received through either:
the onResponse: (response: SismoConnectResponse) => void
callback for offchain verification or,
the onResponseBytes (response: string) => void
callback for onchain verification.
If you are verifying your proofs in a smart contract, you will need to encode your signature with some ABI encoder like or .
The SismoConnectButton
React component is available from the . It is a wrapper of the .
The useSismoConnect
hook is available from the . It is a wrapper of the . The useSismoConnect
hook exposes the sismoConnect
variable.
The exposes a SismoConnect
variable.
Once a user has generated the proof on the Sismo Data Vault App, your application must verify it. This can be made either offchain in your back end or onchain in your smart contract. The exposes a SismoConnect
variable.
If you are using Nextjs, you will need to add this config in the next.config.js
file to be able to verify the proof. You can find more information .
The exposes a Sismo Connect Library, which can be inherited by your contract either using Foundry or Hardhat.