constgenerate=async (schemaId:string, appid:string) => {try {//check if you install the Phatom walletif (!("phantom"in window)) {returnalert("Please install Phantom wallet") }constprovider=window.phantom?.solanaconst=awaitprovider?.connect() //connect walletconstaccount=resp.publicKey.toString()//The appid of the project created in dev center constappid="39a00e9e-7e6d-461e-9b9d-d520b355d1c0"//The schemaId of the projectconstschemaId="c7eab8b7d7e44b05b41b613fe548edf5"constconnector=newTransgateConnect(appid)constisAvailable=awaitconnector.isTransgateAvailable()if (!isAvailable) {returnalert("Please install zkPass TransGate") }constres= (awaitconnector.launchWithSolana(schemaId, account)) asResult } catch (err) {alert(JSON.stringify(err))console.log("error", err) } }
The result includes two signatures: the allocator signature and the validator signature. Developers should verify both signatures based on the other returned fields.