masquerade擬似コード
# circuit
private input identifiedAddress;//secret
private input identifiedPathElements;//public
private input identifiedPathIndices;//public
private input identifiedRoot;//public
private input stealthAddress;//public
private input entryPathElements;//public
private input entryPathIndices;//public
private input relayerAddress;//public
private input fee;//public
private input entryRoot;//public
input entryHash;//public

identifiedLeaf<--pedersenHash(identifiedAddress);
entryLeaf<--pedersenHash(stealthAddress);

merkle.checkMembership(identifiedRoot, indentifiedPathElements, identifiedPathIndices, identifiedLeaf) === true;
merkle.checkMembership(entryRoot, entryPathElements, entryPathIndices, leaf) === true;

# user land
b = EC.genPrivKey();
identifiedAddr = EC.getAddr(b);
r = genCSPRNG();
stealthAddr = EC.derive(identifiedAddr, r);
leaf = pedersenHash(stealthAddr);
dao4n.entryMasquerade(leaf);

# user land
entryHash = pedersenHash(
  identifiedAddress, 
  identifiedPathElements, 
  identifiedPathIndices, 
  identifiedRoot, 
  stealthAddress, 
  entryPathElements, 
  entryPathIndices, 
  entryRoot, 
  relayerAddress, 
  fee);
proof = await sdk.genMasqueradeProof(identifiedAddress, 
  identifiedPathElements, 
  identifiedPathIndices, 
  identifiedRoot, 
  stealthAddress, 
  entryPathElements, 
  entryPathIndices, 
  entryRoot, 
  relayerAddress, 
  fee,