mirror of
https://github.com/selfxyz/self.git
synced 2026-01-22 21:17:59 -05:00
getting tree from server
This commit is contained in:
@@ -123,30 +123,18 @@ export const sbtApp: AppType = {
|
||||
|
||||
setStep(Steps.GENERATING_PROOF);
|
||||
|
||||
await new Promise(resolve => setTimeout(resolve, 10));
|
||||
const reveal_bitmap = revealBitmapFromMapping(disclosure);
|
||||
|
||||
// const serializedCommitmentTree = await axios.get(COMMITMENT_TREE_TRACKER_URL, { httpsAgent })
|
||||
// const serializedCommitmentTree = await axios.get(COMMITMENT_TREE_TRACKER_URL)
|
||||
|
||||
// console.log('Fetching commitment tree from:', COMMITMENT_TREE_TRACKER_URL);
|
||||
|
||||
// const serializedCommitmentTree = await response.json();
|
||||
// console.log(serializedCommitmentTree);
|
||||
|
||||
// const serializedCommitmentTree = "[[\"9366833337168993085050982292715343583458999801189875133285760454940954329736\",\"17067815450997614268337156469331439256078702232208444991806942459610897177755\"],[\"5757843324860707578753413472099376283217223062835733089254074659436006978958\"]]"
|
||||
// const serializedCommitmentTree = "[[\"9366833337168993085050982292715343583458999801189875133285760454940954329736\",\"17067815450997614268337156469331439256078702232208444991806942459610897177755\",\"6218618977460894587557092460164616095207478656436068295742870309857616419830\"],[\"5757843324860707578753413472099376283217223062835733089254074659436006978958\",\"6218618977460894587557092460164616095207478656436068295742870309857616419830\"],[\"21507073014749590076447052772712414887309630021883814888490891898697250244046\"]]"
|
||||
// const serializedCommitmentTree = "[[\"9366833337168993085050982292715343583458999801189875133285760454940954329736\",\"17067815450997614268337156469331439256078702232208444991806942459610897177755\",\"6218618977460894587557092460164616095207478656436068295742870309857616419830\",\"1009498555512750055176786258919772755314598234878788682229429740456064488924\"],[\"5757843324860707578753413472099376283217223062835733089254074659436006978958\",\"9384382887555344903988763589988369409408141218078864334664000402547342440893\"],[\"6444500081923737565029349850782686417529434309028817508928891238372057960879\"]]"
|
||||
// const serializedCommitmentTree = "[[\"9366833337168993085050982292715343583458999801189875133285760454940954329736\",\"17067815450997614268337156469331439256078702232208444991806942459610897177755\",\"6218618977460894587557092460164616095207478656436068295742870309857616419830\",\"1009498555512750055176786258919772755314598234878788682229429740456064488924\",\"2317777252282411584898482846587421326341858131145081778162865818517424463113\"],[\"5757843324860707578753413472099376283217223062835733089254074659436006978958\",\"9384382887555344903988763589988369409408141218078864334664000402547342440893\",\"2317777252282411584898482846587421326341858131145081778162865818517424463113\"],[\"6444500081923737565029349850782686417529434309028817508928891238372057960879\",\"2317777252282411584898482846587421326341858131145081778162865818517424463113\"],[\"11484632410345214898912322261100606383648392524576747792553991794581959208396\"]]"
|
||||
const serializedCommitmentTree = "[[\"9366833337168993085050982292715343583458999801189875133285760454940954329736\",\"17067815450997614268337156469331439256078702232208444991806942459610897177755\",\"6218618977460894587557092460164616095207478656436068295742870309857616419830\",\"1009498555512750055176786258919772755314598234878788682229429740456064488924\",\"2317777252282411584898482846587421326341858131145081778162865818517424463113\",\"14350861400343175672772758664935358862843556622155842278173685659399974430673\"],[\"5757843324860707578753413472099376283217223062835733089254074659436006978958\",\"9384382887555344903988763589988369409408141218078864334664000402547342440893\",\"20714514634358291855499138323356766695315870633431415798546884765927810445680\"],[\"6444500081923737565029349850782686417529434309028817508928891238372057960879\",\"20714514634358291855499138323356766695315870633431415798546884765927810445680\"],[\"13949165376611379310020797746578693825960496340786495286952352659551479278661\"]]"
|
||||
console.log('serializedCommitmentTree:', serializedCommitmentTree);
|
||||
const response = await axios.get(COMMITMENT_TREE_TRACKER_URL)
|
||||
// const serializedCommitmentTree = "[[\"9366833337168993085050982292715343583458999801189875133285760454940954329736\",\"17067815450997614268337156469331439256078702232208444991806942459610897177755\",\"6218618977460894587557092460164616095207478656436068295742870309857616419830\",\"1009498555512750055176786258919772755314598234878788682229429740456064488924\",\"2317777252282411584898482846587421326341858131145081778162865818517424463113\",\"14350861400343175672772758664935358862843556622155842278173685659399974430673\"],[\"5757843324860707578753413472099376283217223062835733089254074659436006978958\",\"9384382887555344903988763589988369409408141218078864334664000402547342440893\",\"20714514634358291855499138323356766695315870633431415798546884765927810445680\"],[\"6444500081923737565029349850782686417529434309028817508928891238372057960879\",\"20714514634358291855499138323356766695315870633431415798546884765927810445680\"],[\"13949165376611379310020797746578693825960496340786495286952352659551479278661\"]]"
|
||||
console.log('response.data:', response.data);
|
||||
|
||||
const imt = new LeanIMT(
|
||||
(a: bigint, b: bigint) => poseidon2([a, b]),
|
||||
[]
|
||||
);
|
||||
|
||||
imt.import(serializedCommitmentTree);
|
||||
imt.import(response.data);
|
||||
|
||||
try {
|
||||
const inputs = generateCircuitInputsDisclose(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export const RELAYER_URL = "https://0pw5u65m3a.execute-api.eu-north-1.amazonaws.com/api-stage/mint"
|
||||
export const COMMITMENT_TREE_TRACKER_URL = "https://34.222.134.21/api/download-merkle-tree"
|
||||
export const COMMITMENT_TREE_TRACKER_URL = "https://app.proofofpassport.com/api/download-merkle-tree"
|
||||
|
||||
export const PUBKEY_TREE_DEPTH = 16
|
||||
export const COMMITMENT_TREE_DEPTH = 16
|
||||
|
||||
Reference in New Issue
Block a user