Sismo Connect Cheatsheet

This cheatsheet presents all of the types of requests you can make with Sismo Connect. It should be a great companion when developing a Sismo Connect app.

It contains:

  • How to impersonate Data Sources in your dev Vault when developing a Sismo Connect app

    • Impersonating Data Sources enables you to be part of Data Groups and generate ZK proofs.

  • Request a large and diversified request:

    • Authentication: Data Source ownership

    • Claims: Data Group membership

  • Verify them in a back end and access verified data

Visit this section to understand Data Groups and how to create them.

What the Request and Response looks like 👉 https://test-request.sismo.io

SIsmo Connect Response generation (ZK proof generation)

SIsmo Connect Response (with a ZK proof in it)

Front End: Make a Sismo Connect Request with React Button

As an alternative to the React Button, you can use the @sismo-core/sismo-connect-client library

// react page
import {
  SismoConnectButton,
  SismoConnectConfig,
  AuthType,
  ClaimType,
  SismoConnectResponse
} from "@sismo-core/sismo-connect-react";

const config: SismoConnectConfig = {
  appId: "0x32403ced4b65f2079eda77c84e7d2be6",
  vault: {
    // For development purposes insert the Data Sources that you want to impersonate
    // Never use this in production
    impersonate: [
      // EVM Data Sources
      "dhadrien.sismo.eth",
      "leo21.sismo.eth",
      "0xA4C94A6091545e40fc9c3E0982AEc8942E282F38",
      "0x1b9424ed517f7700e7368e34a9743295a225d889",
      "0x82fbed074f62386ed43bb816f748e8817bf46ff7",
      "0xc281bd4db5bf94f02a8525dca954db3895685700",
      "vitalik.eth",
      // Github Data Source
      "github:dhadrien",
      // Twitter Data Source
      "twitter:dhadrien_",
      // Telegram Data Source
      "telegram:dhadrien",
    ],
  },
  displayRawResponse: true, // this enables you to get access directly to the 
  // Sismo Connect Response in the vault instead of redirecting back to the app
};

// button that will redirect tu users faults
export default function Home() {
return (
  <SismoConnectButton
    config={config}
    // Auths = Data Source Ownership Requests
    auths={[
      // Anonymous identifier of the vault for this app
      // vaultId = hash(vaultSecret, appId).
      // full docs: https://docs.sismo.io/sismo-docs/build-with-sismo-connect/technical-documentation/vault-and-proof-identifiers
      // user is required to prove ownership of their vaultId for this appId
      { authType: AuthType.VAULT },
      // user is required to prove ownership of an EVM account from their vault
      { authType: AuthType.EVM_ACCOUNT },
      // user is required to prove ownership of 0xa4c94a6091545e40fc9c3e0982aec8942e282f38
      {
        authType: AuthType.EVM_ACCOUNT,
        userId: "0xa4c94a6091545e40fc9c3e0982aec8942e282f38", // impersonated
      },
      // user is required to prove ownership of a GitHub account
      { authType: AuthType.GITHUB },
      // user can prove ownership of a Twitter account, optional
      { authType: AuthType.TWITTER, isOptional: true },
      // user can prove ownership of @dhadrien Telegram account, optional
      //                                   telegram of @dhadrien
      { authType: AuthType.TELEGRAM, userId: "875608110", isOptional: true },
    ]}
    
      // Claims = prove groump membership of a Data Source in a specific Data Group.
      // Data Groups = [{[dataSource1]: value1}, {[dataSource1]: value1}, .. {[dataSource]: value}]
      // When doing so Data Source is not shared to the app.
    claims={[
      {
        // claim on Sismo Hub GitHub Contributors Data Group membership: https://factory.sismo.io/groups-explorer?search=0xda1c3726426d5639f4c6352c2c976b87
        // Data Group members          = contributors to sismo-core/sismo-hub
        // value for each group member = number of contributions
        // request user to prove membership in the group
        groupId: "0xda1c3726426d5639f4c6352c2c976b87", // impersonated github:dhadrien has 1 contribution, eligible
      },
      {
        // claim ENS DAO Voters Data Group membership: https://factory.sismo.io/groups-explorer?search=0x85c7ee90829de70d0d51f52336ea4722
        // Data Group members          = voters in ENS DAO
        // value for each group member = number of votes in ENS DAO
        // request user to prove membership in the group with value >= 17
        groupId: "0x85c7ee90829de70d0d51f52336ea4722",
        claimType: ClaimType.GTE,
        value: 4, // impersonated dhadrien.sismo.eth has 17 votes, eligible
      },
      {
        // claim on Stand with Crypto NFT Minters Data Group membership: https://factory.sismo.io/groups-explorer?search=0xfae674b6cba3ff2f8ce2114defb200b1
        // Data Group members          = minters of the Stand with Crypto NFT
        // value for each group member = number of NFT minted
        // request user to prove membership in the group with value = 10
        groupId: "0xfae674b6cba3ff2f8ce2114defb200b1",
        claimType: ClaimType.EQ,
        value: 10, // dhadrin.sismo.eth minted exactly 10, eligible
      },
      {
        // claim Gitcoin Passport Holders Data Group membership: https://factory.sismo.io/groups-explorer?search=0x1cde61966decb8600dfd0749bd371f12
        // Data Group members          = Gitcoin Passport Holders
        // value for each group member = Gitcoin Passport Score
        // request user to prove membership in the group with value > 15, user can reveal more if they want
        groupId: "0x1cde61966decb8600dfd0749bd371f12",
        claimType: ClaimType.GTE,
        value: 15, // dhadrien.sismo.eth has a score of 46, eligible. Can reveal more.
        isSelectableByUser: true, // can reveal more than 15 if they want
      },
      {
        // claim on Stand with Crypto NFT Minters Data Group membership: https://factory.sismo.io/groups-explorer?search=0xfae674b6cba3ff2f8ce2114defb200b1
        // optional request user to prove membership in the group with value >= 6
        groupId: "0xfae674b6cba3ff2f8ce2114defb200b1",
        claimType: ClaimType.GTE,
        value: 6, // dhadrien.sismo.eth minted 10 NFTs, eligible
        isOptional: true,
      },
      {
        // claim on Gitcoin Passport Holders Data Group membership: https://factory.sismo.io/groups-explorer?search=0x1cde61966decb8600dfd0749bd371f12
        // optional request user to prove membership in the group with value = 15
        groupId: "0x1cde61966decb8600dfd0749bd371f12",
        claimType: ClaimType.EQ,
        value: 15, // dhadrien.sismo.eth has a score of 46 != 15, not eligible.
        isOptional: true, // can chose not to reveal
      },
      {
        // claim on Sismo Hub GitHub Contributors Data Group membership: https://factory.sismo.io/groups-explorer?search=0xda1c3726426d5639f4c6352c2c976b87
        // optional request user to prove membership in the group and reveal any value they want
        groupId: "0xda1c3726426d5639f4c6352c2c976b87",
        claimType: ClaimType.GTE,
        value: 1,
        isSelectableByUser: true, // can selectively disclose more if user wants
        isOptional: true, // can chose not to reveal
      },
    ]}
    // we ask the user to sign a message
    signature={{message: "I love Sismo!", isSelectableByUser: true}}
    // onResponseBytes calls a 'setResponse' function with the responseBytes returned by the Sismo Vault
    onResponse={ async (response: SismoConnectResponse) => {
      await fetch("/api/verify", {
        method: "POST",
        body: JSON.stringify(response),
      })
    }}
  />
)}

Verify the Sismo Connect Response in a simple backend

Sismo Connect Response from the previous Request

Copy-pasted from the test Sismo Connect Request 👉 https://test-request.sismo.io

const sismoConnectResponse = {
    appId: "0x32403ced4b65f2079eda77c84e7d2be6",
    namespace: "main",
    version: "sismo-connect-v1.1",
    signedMessage: "I love Sismo!",
    proofs: [
      {
        auths: [
          {
            authType: 0,
            userId: "0x2eb9b656c296b44433a8bb421082259e26542d4ef19a15032154c59388445efb",
            extraData: "",
            isSelectableByUser: true,
          },
        ],
        proofData:
          "0x10d82f8fda95529dd4ecc02364b9733a009b03cde77bf347f709e1f40ddc12b90e50337dba0dd3f17c28086ab8176140ebc4b1ef39deca3ae619cd86f0a5faa505250fabb8c66653f00e623a33e0614f95d33e63e4fe30fa285a4d1834b2d0061bba29f46ba78ad29717157a7b8c586601afe700ea6c50981191c165a0d337f70043c3c1a0e91239e905026afbede70dfee1443916884d1a75834ad3c04e43fe1b85e5e035c1c7b0dc8e70dd9f1b8aa142b8d20a97ae6a5905ea74480a9b7fc124dfbae35fba3b4fd3af2487442a2645f78798e868cf43c19217f94e058c4185225e4f574c37ec94c30a5147270a3444c598406337ac7ff15ff87ed1fd52478a00000000000000000000000000000000000000000000000000000000000000001bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002eb9b656c296b44433a8bb421082259e26542d4ef19a15032154c59388445efb0fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        extraData: "",
        provingScheme: "hydra-s3.1",
      },
      {
        auths: [
          {
            authType: 3,
            userId: "0x8ab1760889f26cbbf33a75fd2cf1696bfccdc9e6",
            extraData: "",
            isSelectableByUser: true,
          },
        ],
        proofData:
          "0x26972c1cd686bf4a0fc1d72b2ec931b438c5b43add9ee203542f66ab90a7d4e61320907d432941c883f95e4cc01750b7e9c81a8c48f3452354df46b270d205741fe61d2adeaa256388f7053a05a82dd9ad12ba6f12645a1392c352024a19e30714e8ddfa532bccc9832429e24f03b06ed6c8259a6da8bf08a78d91a43b33aac125666d5de5816abb52b5c93f7eb98c4bc73f07bfd3021a50507aff4ecb272fb22c6953acbf977e2eea368f96a75a269a9c412165d89da9d138165f4e2bcdb8401784db7ac61c01de2a28ef9439f477687c2699993bab0f5096a10f1a505c898828bbc878ab810b0b9b0ecd4557e534ec28eb3b9ee52c6c4c6f56d38d9bc0d7280000000000000000000000008ab1760889f26cbbf33a75fd2cf1696bfccdc9e61bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002eb9b656c296b44433a8bb421082259e26542d4ef19a15032154c59388445efb0fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
        extraData: "",
        provingScheme: "hydra-s3.1",
      },
      {
        auths: [
          {
            authType: 3,
            userId: "0xa4c94a6091545e40fc9c3e0982aec8942e282f38",
            extraData: "",
            isSelectableByUser: false,
          },
        ],
        proofData:
          "0x2498d9d44a57769b72abf6bf0453aa9cc89e32bbf247d07c1fb4712f2bc3d4281bbb9946a9c779de247f9d3a7e7701f2dfe1c26a315ac4ce7fa3af3c8b13cfe72f59a4b7bcb3c7ef2de1ac7c6698281f6a35786304cc3604010395af86dee2561d54ca0943bd7916184aa2746a47cc35315cd44d0baf353b0cae360a2bbb1c0e00afa3aeec2168d5bba9424482b7822c9a85d5b3c06476dd7d24dce3006adfab273b95793bbbe5bed01dc14d410965cf11dd61cb7da93794152ffd4071d38ac0104b45b5b1aa58ac26df1d98edbe124bf67f449498682ab997d40c8c2ce93468032c30adadce03dd140563acd6d8830e3dc55da63aecd6593384774cdaa8c976000000000000000000000000a4c94a6091545e40fc9c3e0982aec8942e282f381bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002eb9b656c296b44433a8bb421082259e26542d4ef19a15032154c59388445efb0fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
        extraData: "",
        provingScheme: "hydra-s3.1",
      },
      {
        auths: [
          {
            authType: 1,
            userId: "0x1001000000000000000000000000000035774097",
            extraData: "",
            isSelectableByUser: true,
          },
        ],
        proofData:
          "0x2b7945ec651c3d6aced00b0e0c858dc53d605965767e3e3a7c9559754cf3ea2a186e75d98c76145bfee72ff2668ceed9689a777c8b0d9caff58e88ae5757e47328a931f20d3fe65e773c71d6838c6bea8f4b56959698f3578350601fd133550d12881067ce91f13380ae638ec1939f028c7c6cd51998ba4ca66f69806a5618ed10cec359cbb0ab6101bd15d39f55efa6dc28920ef130711ac8fb221eb31a560621d45a2b3d6108300323b68372ff8ebcd91b5946031bf3069a011c4519eee1a41c638b308c0fd2e7809ce9822139d74385eff3cd5fd2b2cbb8682dd4dd09ac8201e8d385f6a828d5e1cf174cc895ff21e4385ab5decda955c210e9845a8137b000000000000000000000000010010000000000000000000000000000357740971bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002eb9b656c296b44433a8bb421082259e26542d4ef19a15032154c59388445efb0fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
        extraData: "",
        provingScheme: "hydra-s3.1",
      },
      {
        auths: [
          {
            authType: 2,
            userId: "0x1002000000000000000000000000002390703980",
            extraData: "",
            isSelectableByUser: true,
          },
        ],
        proofData:
          "0x234b35b9ff3410e4ac458c9625e4ec9e425eabced5002c70de6ad21af12ab65e0c4438d6de7a71c6e4b19eca03b00c5a596c6e5bbb73eef304c8b0cf34b36db12596ee940a14631b4f3952893349f29de2c2f5f5ec0cd5778e8b283814b6f14a134cf27c6cdf3c7f8df358b11cc6ea7375d74414e44def3fae3e088e2e502c3d1cbc31f03ec8867e2853e61f8bf59c24edb7de2e14f84a4d159ee534cab6bea9208b1ab0829b416955dbda4468549d33a16bf7bd89d2767a4bc9aacf50e8d8581ac3761f39a72a0cd64e16dadcf9188c669696a8bb01ec9b3918c99b6d53e5a6295a9c9b9bc60db7b01e640ae3fc18866593aadfa9b7a16f69faf8a711c54fc200000000000000000000000010020000000000000000000000000023907039801bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002eb9b656c296b44433a8bb421082259e26542d4ef19a15032154c59388445efb0fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
        extraData: "",
        provingScheme: "hydra-s3.1",
      },
      {
        auths: [
          {
            authType: 4,
            userId: "0x1003000000000000000000000000000875608110",
            extraData: "",
            isSelectableByUser: false,
          },
        ],
        proofData:
          "0x0ccc52761bb0eaa6c6b670ea78f69a68d05b80e770660daaf56c964d0592cc9103dfeb273ab8439e0521aa28b7f3ab67603368549bfbcaf12bd3eae710e7faa40a483c60f356afe5878c1afe14f9b4587de27da173e581891571466b14bd724f0ba9c4dc49decff13e709ae8266ca108af88db8adbc340fd70582af17fa4b6612be3135ca313bb2f1f6e7921baecf428cfbb315491449c2db8255a1c6d1198db21d9dd42807ff5e9761197454ef3f641dd301fd2dcfe10cb45f17c72d8711ade117febc9a8a6e04cb5df5318b0f8866b78922a51bb1a2bdfacc6a2dbfdea8c812234cbdc882827606ba5842743d58834b30e8dc13401ed5f63db324d910c059900000000000000000000000010030000000000000000000000000008756081101bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002eb9b656c296b44433a8bb421082259e26542d4ef19a15032154c59388445efb0fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
        extraData: "",
        provingScheme: "hydra-s3.1",
      },
      {
        claims: [
          {
            claimType: 0,
            groupId: "0xda1c3726426d5639f4c6352c2c976b87",
            groupTimestamp: "latest",
            value: 1,
            extraData: "",
            isSelectableByUser: false,
          },
        ],
        proofData:
          "0x108fe251a6bc27af488d8c73543a123a804fd02f88ec4ab8b5ef905705d5c7af256081bfa8561c3a71dc388ac2138eee745a4012d76ac307842ded5c04fa8e09277aed8243efb7a27a0fc7e2b1a95e32aa88c028c6953fd10366011a47fd5f3c2a46feca6b2303d126df02c1a114d8e2c1866746b09ad1d9d361dcf40a71298c0b82aef35157cebf6f8facc3192fabd323e0be6ab8919e4e39143926c3cc56041fa562e88e7986e79dfc72cfc8fa1dd19d3ac86a203190fa3ae1c668a3944ca41d9b656f8c1b7aa2a545e2e89876a3dec49a92b5833bdf60047ff56d89c7d43010a29aebc9d64bb9b71ade8a497aaaa9e731e04835014f1e63f86710e941c27800000000000000000000000000000000000000000000000000000000000000001bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b29813a6cc62abd4ba00fb71df00748844ffd8d6b3bf6612dcc9f77302ee93ec3047893723e9a7bacfb1a78d3cd7a46475d5235d4e6539843243601e011ea612c297e95db0e54e9c86eaeee09512f6206998a6f3bd1b071767c582f637f1131350000000000000000000000000000000000000000000000000000000000000001188afd5abda6d59313851e5226920a12cb91d3438c8e3dbaf07829b03ffffffc00000000000000000000000000000000000000000000000000000000000000002eb9b656c296b44433a8bb421082259e26542d4ef19a15032154c59388445efb0fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
        extraData: "",
        provingScheme: "hydra-s3.1",
      },
      {
        claims: [
          {
            claimType: 0,
            groupId: "0x85c7ee90829de70d0d51f52336ea4722",
            groupTimestamp: "latest",
            value: 4,
            extraData: "",
            isSelectableByUser: false,
          },
        ],
        proofData:
          "0x1ea57b2ef9a6e75f711072664b7b0523b84de28230c9ca67ff46fc68ada202832415f99efbfb9bbc91c91894260fb11d47ab40b6cadb6f37b93a300eca2a3087116df9e10252efbc220cdc1d082423c9d4fa37c2c3d3a3106a0b48fb18b420a92ca1a97df947b08cfa1e458772b260d5dbfe7a14be9c7b37d15db6d5b568080d145f892a5dc216f9fd8c7f8b11861c9b10643d5bcba9f12845a53ed5250993481484a89b9aa0db2e5fa26cf6c93c669167ee1518628dec75dc2f75da3ea695cd185917a0bbca3dda2ec52192b6218cacbe03b9bc04ebaa685d9655404173b4521a2f054589880b89bd59b728e932ec8378822964ef7d668b1037291606bcdf7900000000000000000000000000000000000000000000000000000000000000001bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b29813a6cc62abd4ba00fb71df00748844ffd8d6b3bf6612dcc9f77302ee93ec326fe397125972c6a5376a768ad125e677b231ecd6aba4f42b2ba35563ecf7f1d05b412ea09364d5333c4bf39518baeec82596273ee6351b0a4ce42429cdb1ec1000000000000000000000000000000000000000000000000000000000000000424ff51aac03aa6b99cb169b633e796681bf9a3d480011edd783c14d81ffffffe00000000000000000000000000000000000000000000000000000000000000002eb9b656c296b44433a8bb421082259e26542d4ef19a15032154c59388445efb0fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
        extraData: "",
        provingScheme: "hydra-s3.1",
      },
      {
        claims: [
          {
            claimType: 2,
            groupId: "0xfae674b6cba3ff2f8ce2114defb200b1",
            groupTimestamp: "latest",
            value: 10,
            extraData: "",
            isSelectableByUser: false,
          },
        ],
        proofData:
          "0x25eec8a4e58b1897bdc1d4d6c59e1ff1a2e89e374380e655f27d057867618e2d18c4f694537c7e2ca2aacf9b8ed9fd0d3e5d49bc19e6b20fc2b6efbb9a6a6a2c0d2bd3291633ddb83a55a80fb18e8b9c8fb14ad23d77460e3a9161b626292d4f2d2e86800012fdbd68d744bc017f637fda1f05a642d11277e46c4225a3a289dd14ac6249561ce9c5eef91afdbc365148dc14345051ac651585e737617e57017e305d62e34f19eb209fcc6ac2ff7b7d2b41c9ea46d459d0ad6fd875b570a457311f3c0ec40face16de9ece4147a6bfb2e7577059f52d9191ec0b2f217e735dc790cc17baa40331ead4f242f18679c83ef025f7c49552a74f2418335173352e33a00000000000000000000000000000000000000000000000000000000000000001bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b29813a6cc62abd4ba00fb71df00748844ffd8d6b3bf6612dcc9f77302ee93ec3223889be50de6309c4a51edd039aa1fb882c9964a746581ff319bbe982debcf82efc4cc7c03398856dbf08377861fb15549f5a9137456a615d4da264e7d69cd4000000000000000000000000000000000000000000000000000000000000000a08f0ec7865abde5ef350b4bd682b46dfa35deafb12d4cd29ac96341c4ffffffb00000000000000000000000000000000000000000000000000000000000000012eb9b656c296b44433a8bb421082259e26542d4ef19a15032154c59388445efb0fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
        extraData: "",
        provingScheme: "hydra-s3.1",
      },
      {
        claims: [
          {
            claimType: 0,
            groupId: "0x1cde61966decb8600dfd0749bd371f12",
            groupTimestamp: "latest",
            value: 15,
            extraData: "",
            isSelectableByUser: true,
          },
        ],
        proofData:
          "0x305388d773e387542aa2ae8c0d3e15eb505511e6fe779e9cc6feae63b42a6eeb0ee25c18c3e8a19cac51f7b621c14f5536116ac08e34dec5cc9ba3c5cb2af52f00c9eb41ec8792fd8cd43c479f326658a54add9b2e3693546da6e3cc42c74bd20705a9f737cfab12e6380baeebce11d35cefb80a93aff1e4ddca3f0747c4acc709eb671bf2d05d43d599e119a46d9295a57d0d203f99eb6dca9caca232a1bc8d088f92d4461a1d4e68f42da07f8759357d387e694874a994923684ebbfc687361661d5ef10fd4b7e0778949d7fdef0d928632a0a9bfd335131d9e228dbe568c204f44b40a272a6ca9cbb2e60e9b5a061121e30d5f17c1e9f1a6b557d6745658e00000000000000000000000000000000000000000000000000000000000000001bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b29813a6cc62abd4ba00fb71df00748844ffd8d6b3bf6612dcc9f77302ee93ec31e7a3215d4d02e734fa653c5ca96357521ac260e6ba94a1f05c413b0143e15bd2113caea8c11ac1bdcde3d297ebd9f24df376b1ae881a18e62e49c81b5db8267000000000000000000000000000000000000000000000000000000000000000f1cde61966decb8600dfd0749bd371f126c61746573740000000000000000000000000000000000000000000000000000000000000000000000000000000000002eb9b656c296b44433a8bb421082259e26542d4ef19a15032154c59388445efb0fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
        extraData: "",
        provingScheme: "hydra-s3.1",
      },
      {
        claims: [
          {
            claimType: 0,
            groupId: "0xfae674b6cba3ff2f8ce2114defb200b1",
            groupTimestamp: "latest",
            value: 6,
            extraData: "",
            isSelectableByUser: false,
          },
        ],
        proofData:
          "0x13df9180327d18fe2b6c1283c12496b1de06ab75bacfcf1dcf8f6e85648dd85e0988198c55261f1d444b2642f051ac7256dddfd1c64ac3662d032981fc3d1c2f08810b7f6ff0d5843ab25dd38fa12be0de6979a5f828e145b7ccb8f3661f03e11f182037f3aa38de138dbd816f5db2b6307e51d0b66e845304adc171d23d3d362ea7fcef647890af67ac3a3d4aa871b8f6d6b4526a2491329aecd2ddede78bf11321df50794c7c8f7b29ee9eb19a569c0a49b453b46864939d8d85fee24dd3870b45d93543ed9ebf3d5bd259a0c655ee2baaaa976a0f273232addd056339168c01c31bd2e90727548c6a45465a66c413de6774afefd252469922b54a03168c8f00000000000000000000000000000000000000000000000000000000000000001bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b29813a6cc62abd4ba00fb71df00748844ffd8d6b3bf6612dcc9f77302ee93ec3223889be50de6309c4a51edd039aa1fb882c9964a746581ff319bbe982debcf82efc4cc7c03398856dbf08377861fb15549f5a9137456a615d4da264e7d69cd4000000000000000000000000000000000000000000000000000000000000000608f0ec7865abde5ef350b4bd682b46dfa35deafb12d4cd29ac96341c4ffffffb00000000000000000000000000000000000000000000000000000000000000002eb9b656c296b44433a8bb421082259e26542d4ef19a15032154c59388445efb0fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
        extraData: "",
        provingScheme: "hydra-s3.1",
      },
      {
        claims: [
          {
            claimType: 0,
            groupId: "0xda1c3726426d5639f4c6352c2c976b87",
            groupTimestamp: "latest",
            value: 1,
            extraData: "",
            isSelectableByUser: true,
          },
        ],
        proofData:
          "0x0f1790c59fcb026db76551e452806906f215502f9a7c007d83e5990bdd465bfd16dbdb67e387ae998c390fc143ba4304575a2556bff9e81926d151216f6d7e550c904a0f11144d23bd4b4892d8eef69972685a755b2d6ce33f35e59e94494f6c079f0e1769f0622ed9e0f5e23518316760e6bb847600627a56e2e7b25237e8e629cf7b9076c716f9c2cfa84d22bf0f69e16f6e50a1306bcc32bed7cea8a767750ff572c580edaefa4043f29a3e359b3b4926383acf6235ee68b884dbd17d854921b900f88407d68651c11ee4cc7234ccfc496366b26ecaa239296085002f109525a94ca01d5736cde9de68afaffd84cb2dc6cf7732b5e4145f8467e7e50688d400000000000000000000000000000000000000000000000000000000000000001bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b29813a6cc62abd4ba00fb71df00748844ffd8d6b3bf6612dcc9f77302ee93ec3047893723e9a7bacfb1a78d3cd7a46475d5235d4e6539843243601e011ea612c297e95db0e54e9c86eaeee09512f6206998a6f3bd1b071767c582f637f1131350000000000000000000000000000000000000000000000000000000000000001188afd5abda6d59313851e5226920a12cb91d3438c8e3dbaf07829b03ffffffc00000000000000000000000000000000000000000000000000000000000000002eb9b656c296b44433a8bb421082259e26542d4ef19a15032154c59388445efb0fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
        extraData: "",
        provingScheme: "hydra-s3.1",
      },
    ],
  };

// backend.ts

import {
  SismoConnect,
  AuthType,
  SismoConnectVerifiedResult,
  ClaimType,
  SismoConnectConfig,
  SignatureRequest,
  AuthRequest,
  ClaimRequest,
  SismoConnectResponse
} from "@sismo-core/sismo-connect-server";

(async () => {
  // reusing the exact same config as the front end's
  const sismoConnect = SismoConnect({ config });
  
  const result: SismoConnectVerifiedResult = await sismoConnect.verify(
        sismoConnectResponse, // copied from the previous step or received from API call
        {
          auths,
          claims,
          signature,
        }
      );
  
  console.log(result.getUserIds(AuthType.VAULT));
  // vault anonymous identifier = hash(vaultSecret, AppId)
  // ['0x225c5b67c39778b40ef2528707c9fbdfed96f31b9a50826b95c2ac40e15e4c6b']
  console.log(result.getUserIds(AuthType.GITHUB));
  // [ '35774097' ] GitHub id of @dhadrien
  console.log(result.getUserIds(AuthType.TWITTER));
  // [ '2390703980' ] Twitter id of @dhadrien_
  console.log(result.getUserIds(AuthType.EVM_ACCOUNT));
  // [
  //   '0x8ab1760889f26cbbf33a75fd2cf1696bfccdc9e6', // dhadrien.sismo.eth
  //   '0xa4c94a6091545e40fc9c3e0982aec8942e282f38' // requested wallet auth
  // ]
  console.log(result.getUserIds(AuthType.TELEGRAM));
  // [ '875608110' ] // Telegram id of @dhadrien 
})()

Verify the Sismo Connect Response in a Smart Contract

Sismo Connect Response as Bytes from previous Request
0x000000000000000000000000000000000000000000000000000000000000002032403ced4b65f2079eda77c84e7d2be600000000000000000000000000000000b8e2054f8a912367e38a22ce773328ff000000000000000000000000000000007369736d6f2d636f6e6e6563742d76312e31000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000d49206c6f7665205369736d6f2100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000000000000000000fc0000000000000000000000000000000000000000000000000000000000000148000000000000000000000000000000000000000000000000000000000000019400000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000022e000000000000000000000000000000000000000000000000000000000000027c00000000000000000000000000000000000000000000000000000000000002ca00000000000000000000000000000000000000000000000000000000000003180000000000000000000000000000000000000000000000000000000000000366000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001a068796472612d73332e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012539f09ac302fa2c90a8c1144dc9477c31497d83b4564b50a3b551ce3bc5748700000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c01d51ee33825cb9f21d37f1f3f41a18a43ab62415c833616e6cf69b0da333e44b2f70f336790d46ca71a1c2fa2bc4d1d7ca14c5855759705745ff479ceab8762c274d402901d69b9864bf1857e5c82e8a3fd5f2f9dd0107b80012b70e49627acf19ead57d858eecfa4017c6ad2f6780de3796a8ccd9de41bb94140ab4139766642b4ca0cc6d29b2184f400cb44a076dd4f2593433595428161b42f9a43aed535219ca40ab9335c00c32683247dbefc06da8bc5c5f78970706d97bf31712212b560096e84d34618301e4f7acb3e2f605d4e4db2d574437fb7ca316c5d6876249bd15a0308b291b6e7d2bcc083c8a938f98b5a4c2fc354b2e66f9fcef49fbc54e0c00000000000000000000000000000000000000000000000000000000000000001bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002539f09ac302fa2c90a8c1144dc9477c31497d83b4564b50a3b551ce3bc574870fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001a068796472612d73332e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000008ab1760889f26cbbf33a75fd2cf1696bfccdc9e600000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c0046c36245a1702462fa50689c8d376398622b42657214ab656951d7ae9b0dcc110b45ee61af07b0eea4fa72ca3e621edacf4893e635c3aae475f12f9dbdf7a6703db4644ac8cbf022e7d305f51cd1813904297efa0affa0d889e53a4dd91d7e1005f7388bedadfbb532fc7cb680bcc24c0bd15318a646564b500c475f298d2d5266046269aca974f9d3b4d242bc5a8af132c852ce639f8882759bd58ab22ae370ad8891a107fe9e111e761f17c4ab42158ca6ce6e550b9887eb45a29a1e2487205d741bec2a18e7e935e88b6d71095f61951afe832093a6e9a8d466a8e69c51525a4ac4bdbcb8d3d7e745f6400cc9b82e08fae3234176ebd987b572e68e42e600000000000000000000000008ab1760889f26cbbf33a75fd2cf1696bfccdc9e61bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002539f09ac302fa2c90a8c1144dc9477c31497d83b4564b50a3b551ce3bc574870fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001a068796472612d73332e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a4c94a6091545e40fc9c3e0982aec8942e282f3800000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c0186455bc0751be15e1099ad6e112c46f4e2983b60d73f05a034181e1982f651e0c1ab4e639a8b67c1185a312ecc3f66a9b71b0f8acf18c6bc3c1002149cbd4e82e4d170f2cca430682e0085b5b0e3b9dbbe432a4324d9db8c654dfa2a6b0780717c71cdc830f9eda38e6f41f6e64c2ef80a542512c54f8d74f3889c945799cd5077d4f668ce334664fdcecb72f37865f5d2a9c21cfd0f901ef354a575c11676216927502d1931c4d53997d20f6dbcaa1cf3b5f9dcbc60705803e56387025bcd31f1981596ee7c16ab6eca74eed526fc8eb7415538682af6548ac84547746f87f1a8a4e19c6b76be746520faeb53560da2443c8fb9abfb854a53d296a63f43617000000000000000000000000a4c94a6091545e40fc9c3e0982aec8942e282f381bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002539f09ac302fa2c90a8c1144dc9477c31497d83b4564b50a3b551ce3bc574870fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001a068796472612d73332e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000100100000000000000000000000000003577409700000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c01236e3c443804a1c0511314a976a0f3ed6a51c9568061940ddaf4bfbf17588771a6a2ea1bc0c43dbd99c4a45adf986118fcdee0df04130e3c47f2e494dec6afe0d49681410f22b7888651c77900dd5f8c9737ba4bdc1f89724e4f16a6cd2158916add28d18f51595d11932563e129978b89412249d88b9b78ec2693dc2c5723f0c296e9eed70d74a5d005dfc364dc87e9475d76f0d2cbb49960a9fb4206f55632fd14d43a0582083494e0a578b437d6910a607f7985a5a05b7b4f9bfaabbbabe1fa8e6f2db4b2094cd692386caf66a4448cb9940f542a462ea132cb7af356367130a3cb2ce8c8dc0c53fc18d2beb142ad7d33f9d9efecce8c91cf2ec9368ff1a00000000000000000000000010010000000000000000000000000000357740971bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002539f09ac302fa2c90a8c1144dc9477c31497d83b4564b50a3b551ce3bc574870fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001a068796472612d73332e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000100200000000000000000000000000239070398000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c01327925609a3700d7dd247011d1b64eabc62546eb9ff9c82c511443a78ed3e700a3770455026b54f046d74a82cf864153b686381b9813e0eaa42ac7784293f4f2b7dc1bf937105999c1d6bdf875fcc572f5da400fd785ffa13040eec7077841f206b7ec9342c82334a3f9c7dd4fb0961194b8d5feaf9c3b79020b743bc3ecba90e8b7c22c68ef2626c9f96fb332336c333522916ba6594bd3d9035fb52eaf70108eebc2e98a1691787a1ed60e0133446debee56d3bcdf4a288bc0cdbbb0786ab2921c81432d2534f025d8c8328abc30f6cdf518f3c6b2e17636448c821595c7418835ebe95d91f71e8be628c9fe0e4fb86042342ebb4e8fdf4a41423fe77184a00000000000000000000000010020000000000000000000000000023907039801bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002539f09ac302fa2c90a8c1144dc9477c31497d83b4564b50a3b551ce3bc574870fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001a068796472612d73332e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100300000000000000000000000000087560811000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c00149ada8b047cdded49b1a46fe45c83055dad2f3f4ecd6793a4cecdd43f3436f0d8e7a73c5629d7f431acf47c43d53068ee773fc0b2ba2d1e16e698adc3fd7771d08ffeb23cb2761acd81eafa5f0c3f65d100f7981b87630b9c51bb8962c9b400046e8de77e0102d30e645baca09828989c43323c2c9378cfa0d982e61083d921409541c04fb3df9621a05254b815a69d30aa60872dea6fa6c62a39ffbc879d310918f9f2202ec980866a372eba36b63e5dbe7257c54455e3942cc3c8d101b0111127b5fb4530fe6dd7b3c9bd767a4e03fc2e39b7ce766485c79fde3301d71411803dba0f7b4b42b370f9bc36a1cd20008d6ed32536e5bf2decb17c2f50a8a5e00000000000000000000000010030000000000000000000000000008756081101bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002539f09ac302fa2c90a8c1144dc9477c31497d83b4564b50a3b551ce3bc574870fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c068796472612d73332e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000004c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000da1c3726426d5639f4c6352c2c976b87000000000000000000000000000000006c617465737400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c029177a4e70af68b071151d405399774b7e985655b7cb9c8b1e406b0baafc07262f098483c0ed8ad4a13879947130ef1ba739e032227952e7ce91ef510a8bdf202e522b5eac8742ffa3638c5c54285bd61345be3cd5d745cbeb4497894aff7c150296f76a566f682c295051051a0c0247f9ad0d36db58964797e8e1039cd7af8d2afef02591dee402e1ad4b6bd0b7db53e4523a440b01e5d098da8fa14b29456e24cf942de4a13fa23a78192abc613c65202602198d791d22089dad4410e4290510e6a8ec4593274c21a27efb26203899b7492bc4dddb18b69733048e88ccef811b5fb6483a8ff7b1e5382b0b889e4c601cd7fd631950b88ce3d815f903b00d6f00000000000000000000000000000000000000000000000000000000000000001bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b05e776ae4ddce6e74cf1cdb83ce48d5f2dade0f9ec5ae2bf77cc81c9506f08bf047893723e9a7bacfb1a78d3cd7a46475d5235d4e6539843243601e011ea612c297e95db0e54e9c86eaeee09512f6206998a6f3bd1b071767c582f637f1131350000000000000000000000000000000000000000000000000000000000000001188afd5abda6d59313851e5226920a12cb91d3438c8e3dbaf07829b03ffffffc00000000000000000000000000000000000000000000000000000000000000002539f09ac302fa2c90a8c1144dc9477c31497d83b4564b50a3b551ce3bc574870fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c068796472612d73332e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000004c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000085c7ee90829de70d0d51f52336ea4722000000000000000000000000000000006c617465737400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c00372fd16692d0aba01b9386a1aab2af193702362b54cc86e9789c8cfebc9bfc01a67e9f6c93d9f8579b55a8453c7de0c2b7c724f88531f608f36aa2ed8cad97802fa24f36fc7fa699986f6b21b551e4a5cc35a0bee6ef48707b9af51cfcf9df8266c5c52e74b75c9c0a63cde9e82885196f224d01a91198a47fa6c55bdbc62312b16b6574539d5018bc895bda1401cd6cc8c4b166d5b4eeae980a29ce4493f0a00424df0d64bc14dce9f9dba2b3ecb22929cce1fa76fb5455394e1a9d7f0d1802c47224b9aa48755375c9212c3366ce94ffb9721932de21cc5df599baad36bf32695ed94b81f519744f7c80813dc9fe1e1f72a55dc5d7c1f297236166814836100000000000000000000000000000000000000000000000000000000000000001bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b05e776ae4ddce6e74cf1cdb83ce48d5f2dade0f9ec5ae2bf77cc81c9506f08bf26fe397125972c6a5376a768ad125e677b231ecd6aba4f42b2ba35563ecf7f1d05b412ea09364d5333c4bf39518baeec82596273ee6351b0a4ce42429cdb1ec1000000000000000000000000000000000000000000000000000000000000000424ff51aac03aa6b99cb169b633e796681bf9a3d480011edd783c14d81ffffffe00000000000000000000000000000000000000000000000000000000000000002539f09ac302fa2c90a8c1144dc9477c31497d83b4564b50a3b551ce3bc574870fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c068796472612d73332e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000004c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002fae674b6cba3ff2f8ce2114defb200b1000000000000000000000000000000006c617465737400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c026ec3ee230ddf30b972018bdf6e00bcbc19891ddae5d22a89cf4498ff18923be25c13ef67e05130abaab9c8b9285575d4e09dc826cc0e2923bc582ee983fbe0211dd42200e2c3c80fc850d0f5670e4028de4f6b68d70f1a1dbc025669011f27126b231ad2377a830d7211c17a0c311c2950b842269d81bbaee7334be71add7031432a260ba358e1198dd8795758b2c80ec35e1fd3b6a510a1c48e48514d7d6e21476c844a3ec3c3148fb4f5491160b283f1c7aa5de24d4e0fd1c25ae786b29d32e3af0416c9bb58f6204c032b2d5471c2f390a42d2b6b7d77340de02959c80bd1ff10206c32da082fb5c16d546c2892dbfd53e5f018742a5c0150e5506ad37f300000000000000000000000000000000000000000000000000000000000000001bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b05e776ae4ddce6e74cf1cdb83ce48d5f2dade0f9ec5ae2bf77cc81c9506f08bf223889be50de6309c4a51edd039aa1fb882c9964a746581ff319bbe982debcf82efc4cc7c03398856dbf08377861fb15549f5a9137456a615d4da264e7d69cd4000000000000000000000000000000000000000000000000000000000000000a08f0ec7865abde5ef350b4bd682b46dfa35deafb12d4cd29ac96341c4ffffffb00000000000000000000000000000000000000000000000000000000000000012539f09ac302fa2c90a8c1144dc9477c31497d83b4564b50a3b551ce3bc574870fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c068796472612d73332e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000001cde61966decb8600dfd0749bd371f12000000000000000000000000000000006c617465737400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000f00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c0073cf0587a1df2b748a20203384d44fe25e563b1c02cb5e34b6cfaab590cc85d1f7c004520a8bca4b0421f8094a0070f18d594982271c539b9c5ce42cb677e79094ae21320eb843e78b999d4c09ab980c13c5cf85a07a0b7414bcfa0eb29e3cf15da2f6e4ff56d72afea48c4672e038cb19cd7c60d049e3384ad38b9968045fa066eca5cd361d70c532bbabe2ea0544e4795ee296c08ed6b0dba87bccd22b50316aa4884c4841fb5d466db2ca5966751636258d1ff9bf1018c3923b3f009c9fb24097564f0ddc309c55a8d20a3eed8f11ccacc330e9e3c9d091367f00949ef4625eab60aef3078e549c83fdd8f5c3ce2ea25fd97b74de5900085e71f850e58da00000000000000000000000000000000000000000000000000000000000000001bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b05e776ae4ddce6e74cf1cdb83ce48d5f2dade0f9ec5ae2bf77cc81c9506f08bf1e7a3215d4d02e734fa653c5ca96357521ac260e6ba94a1f05c413b0143e15bd2113caea8c11ac1bdcde3d297ebd9f24df376b1ae881a18e62e49c81b5db8267000000000000000000000000000000000000000000000000000000000000000f1cde61966decb8600dfd0749bd371f126c61746573740000000000000000000000000000000000000000000000000000000000000000000000000000000000002539f09ac302fa2c90a8c1144dc9477c31497d83b4564b50a3b551ce3bc574870fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c068796472612d73332e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000004c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000fae674b6cba3ff2f8ce2114defb200b1000000000000000000000000000000006c617465737400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c016c16066076c8431056edaef2596501f3636cf2fef8f26995eed3e2699d6af28212e47c1abfa5692685fd7a4ce6a80047396feea303b00395d96a764b419ef0e1b2ab639300fffa46445aa21da0810f694cf9f75eb41b64d33274f18f680c6d80388e238adc3b7afa3dc3ed50f47011e6cfd65d2396c026f00813c605702a72a293503329dcc878dec30cfcf7e4ad31d366ac2d96955935566912e88b3a36407218f3e6803e107ce49b9c22102a4c1319fbb78a6b4d4ad34f526139a90b075141faa7e1a187255d88c6f8e145db7fb4d1e12365ba228ef693aefb3451f816c0103d284a73e5467a07f7c64c7bfbe54b7e00f47acc04175e976ee3da258fdbbbc00000000000000000000000000000000000000000000000000000000000000001bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b05e776ae4ddce6e74cf1cdb83ce48d5f2dade0f9ec5ae2bf77cc81c9506f08bf223889be50de6309c4a51edd039aa1fb882c9964a746581ff319bbe982debcf82efc4cc7c03398856dbf08377861fb15549f5a9137456a615d4da264e7d69cd4000000000000000000000000000000000000000000000000000000000000000608f0ec7865abde5ef350b4bd682b46dfa35deafb12d4cd29ac96341c4ffffffb00000000000000000000000000000000000000000000000000000000000000002539f09ac302fa2c90a8c1144dc9477c31497d83b4564b50a3b551ce3bc574870fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c068796472612d73332e310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000004c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000da1c3726426d5639f4c6352c2c976b87000000000000000000000000000000006c617465737400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c02e607932e5d14eb0f3ed026ebdec71966d020164f1843da2c7a877da7caceb5f18d654a9d5a7df56097bb80fcd0728f26ce6c673885e70bcd7c13d241ed202110ec7ab2bcdc50d131eecb252b68cadf4d8e0c30fc3a5da94fe3769fcafc9018f09a92af67dd0fb90f07c18850eadc7226893ff205d759d4a628a22a91aa7932e299b823db102e70b37a1d4402ac586135c0617075f9b5e99dd145f7ad9a7f8cc22a91ca2aa9d81aefde5cc09efcf10c48e4180fae9277aff7cd5aaa3cbda066508a7d259995fa53a288d1bdf98a3488bf4f8998963aadd7000dd7c1368ee665e283f1117319494dd8e4393b1032af479f630b37e1be769f8f2797fb7ce4e778300000000000000000000000000000000000000000000000000000000000000001bcf94915097a9881ed45fd8d9aa4832b462b54c57cd97451dddd43b3b2431eb1801b584700a740f9576cc7e83745895452edc518a9ce60b430e1272fc4eb93b057cf80de4f8dd3e4c56f948f40c28c3acbeca71ef9f825597bf8cc059f1238b05e776ae4ddce6e74cf1cdb83ce48d5f2dade0f9ec5ae2bf77cc81c9506f08bf047893723e9a7bacfb1a78d3cd7a46475d5235d4e6539843243601e011ea612c297e95db0e54e9c86eaeee09512f6206998a6f3bd1b071767c582f637f1131350000000000000000000000000000000000000000000000000000000000000001188afd5abda6d59313851e5226920a12cb91d3438c8e3dbaf07829b03ffffffc00000000000000000000000000000000000000000000000000000000000000002539f09ac302fa2c90a8c1144dc9477c31497d83b4564b50a3b551ce3bc574870fe61c3a8c717465050c08081b2efe7d66020da96e00293df4c354c783d06b6b000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "sismo-connect-solidity/SismoConnectLib.sol";

contract MyContract is SismoConnect {
  // reference your appId
  bytes16 private _appId = 0x32403ced4b65f2079eda77c84e7d2be6;
  // allow impersonation
  bool private _isImpersonationMode = true;

  constructor()
    // use buildConfig helper to easily build a Sismo Connect config in Solidity
    SismoConnect(buildConfig({appId: _appId, isImpersonationMode: _isImpersonationMode}))
  {}

  function verifySismoConnectResponse(bytes memory response) public {
    // Recreate the request made in the fontend to verify the proof
    // We will verify the Sismo Connect Response containing the ZK Proofs against it
    AuthRequest[] memory auths = new AuthRequest[](6);
    auths[0] = _authRequestBuilder.build({authType: AuthType.VAULT});
    auths[1] = _authRequestBuilder.build({authType: AuthType.EVM_ACCOUNT});
    auths[2] = _authRequestBuilder.build({
      authType: AuthType.EVM_ACCOUNT,
      userId: uint160(0xA4C94A6091545e40fc9c3E0982AEc8942E282F38)
    });
    auths[3] = _authRequestBuilder.build({authType: AuthType.GITHUB});
    auths[4] = _authRequestBuilder.build({
      authType: AuthType.TWITTER,
      userId: 295218901,
      isOptional: true,
      isSelectableByUser: false
    });
    auths[5] = _authRequestBuilder.build({
      authType: AuthType.TELEGRAM,
      userId: 875608110,
      isOptional: true,
      isSelectableByUser: false
    });

    ClaimRequest[] memory claims = new ClaimRequest[](7);
    claims[0] = _claimRequestBuilder.build({groupId: 0xda1c3726426d5639f4c6352c2c976b87});
    claims[1] = _claimRequestBuilder.build({
      groupId: 0x85c7ee90829de70d0d51f52336ea4722,
      claimType: ClaimType.GTE,
      value: 4
    });
    claims[2] = _claimRequestBuilder.build({
      groupId: 0xfae674b6cba3ff2f8ce2114defb200b1,
      claimType: ClaimType.EQ,
      value: 10
    });
    claims[3] = _claimRequestBuilder.build({
      groupId: 0x1cde61966decb8600dfd0749bd371f12,
      claimType: ClaimType.EQ,
      value: 15,
      isSelectableByUser: true,
      isOptional: true
    });
    claims[4] = _claimRequestBuilder.build({
      groupId: 0xfae674b6cba3ff2f8ce2114defb200b1,
      claimType: ClaimType.GTE,
      value: 6,
      isSelectableByUser: true,
      isOptional: true
    });
    claims[5] = _claimRequestBuilder.build({
      groupId: 0x1cde61966decb8600dfd0749bd371f12,
      claimType: ClaimType.EQ,
      value: 15,
      isSelectableByUser: true,
      isOptional: true
    });
    claims[6] = _claimRequestBuilder.build({
      groupId: 0xda1c3726426d5639f4c6352c2c976b87,
      claimType: ClaimType.GTE,
      value: 1,
      isSelectableByUser: true,
      isOptional: true
    });

    SismoConnectVerifiedResult memory result = verify({
      responseBytes: response,
      auths: auths,
      claims: claims,
      signature: _signatureBuilder.build({message: abi.encode("I love Sismo!")})
    });

    uint256 vaultId = SismoConnectHelper.getUserId(result, AuthType.VAULT);
    uint256 githubId = SismoConnectHelper.getUserId(result, AuthType.GITHUB);
    uint256 telegramId = SismoConnectHelper.getUserId(result, AuthType.TELEGRAM);
    uint256[] memory evmAccountIds = SismoConnectHelper.getUserIds(result, AuthType.EVM_ACCOUNT);

    console.log("Vault ID: %s", vaultId);
    console.log("Github ID: %s", githubId);
    console.log("Telegram ID: %s", telegramId);
    console.log("First EVM Account ID: %s", evmAccountIds[0]);
    console.log("Second EVM Account ID: %s", evmAccountIds[1]);
  }
}

Refer to the Sismo Connect Solidity Library, the onchain app boilerplate or the onchain tutorial for more information.

Last updated