def run(): bulldog = bulldogAgent bulldogWallet.pendSyncRequests() prepared = bulldogWallet.preparePending() bulldog.client.submitReqs(*prepared) runAgent(bulldog, emptyLooper) return bulldog, bulldogWallet
def thriftIsRunning(emptyLooper, tdirWithPoolTxns, thriftWallet, thriftAgent, thriftAdded): thrift = thriftAgent thriftWallet.pendSyncRequests() prepared = thriftWallet.preparePending() thrift.client.submitReqs(*prepared) runAgent(thrift, emptyLooper) return thrift, thriftWallet
def acmeIsRunning(emptyLooper, tdirWithPoolTxns, acmeWallet, acmeAgent, acmeAdded): acme = acmeAgent acmeWallet.pendSyncRequests() prepared = acmeWallet.preparePending() acme.client.submitReqs(*prepared) runAgent(acme, emptyLooper) return acme, acmeWallet
def faberIsRunning(emptyLooper, tdirWithPoolTxns, faberWallet, faberAgent, faberAdded): faber = faberAgent faberWallet.pendSyncRequests() prepared = faberWallet.preparePending() faber.client.submitReqs(*prepared) runAgent(faber, emptyLooper) return faber, faberWallet
def runFaber(name=None, wallet=None, basedirpath=None, port=None, startRunning=True, bootstrap=True): return runAgent(FaberAgent, name or "Faber College", wallet, basedirpath, port, startRunning, bootstrap)
VERSION: claimDef.version, "claimDefSeqNo": claimDef.seqId }] async def addClaimDefsToWallet(self): claimDefJobCert = await self.issuer.genClaimDef( self._claimDefJobCertKey.name, self._claimDefJobCertKey.version, self._attrDefJobCert.attribNames(), 'CL') claimDefJobCertId = ID(claimDefKey=claimDefJobCert.getKey(), claimDefId=claimDefJobCert.seqId) p_prime, q_prime = primes["prime1"] await self.issuer.genKeys(claimDefJobCertId, p_prime=p_prime, q_prime=q_prime) await self.issuer.issueAccumulator(claimDefId=claimDefJobCertId, iA='110', L=5) async def bootstrap(self): await self.addClaimDefsToWallet() def createAcme(name=None, wallet=None, basedirpath=None, port=None): return createAgent(AcmeAgent, name or "Acme Corp", wallet or buildAcmeWallet(), basedirpath, port, clientClass=TestClient) if __name__ == "__main__": acme = createAcme(port=6666) runAgent(acme)
def runAcme(name=None, wallet=None, basedirpath=None, port=None, startRunning=True, bootstrap=True): return runAgent(AcmeAgent, name or "Acme Corp", wallet, basedirpath, port, startRunning, bootstrap)
def isClaimAvailable(self, link, claimName): return True def getAvailableClaimList(self): return [] def _addAtrribute(self, claimDefKey, proverId, link): pass async def postClaimVerif(self, claimName, link, frm): if claimName == "Loan-Application-Basic": self.notifyToRemoteCaller(EVENT_NOTIFY_MSG, " Loan eligibility criteria satisfied," " please send another claim " "'Loan-Application-KYC'\n", self.wallet.defaultId, frm) async def bootstrap(self): pass def createThrift(name=None, wallet=None, basedirpath=None, port=None): return createAgent(ThriftAgent, name or "Thrift Bank", wallet or buildThriftWallet(), basedirpath, port, clientClass=TestClient) if __name__ == "__main__": thrift = createThrift(port=7777) runAgent(thrift)
async def addClaimDefsToWallet(self): claimDef = await self.issuer.genClaimDef(self._claimDefKey.name, self._claimDefKey.version, self._attrDef.attribNames(), 'CL') claimDefId = ID(claimDefKey=claimDef.getKey(), claimDefId=claimDef.seqId) p_prime, q_prime = primes["prime2"] await self.issuer.genKeys(claimDefId, p_prime=p_prime, q_prime=q_prime) await self.issuer.issueAccumulator(claimDefId=claimDefId, iA='110', L=5) await self.initAvailableClaimList() async def bootstrap(self): await self.addClaimDefsToWallet() def createFaber(name=None, wallet=None, basedirpath=None, port=None): return createAgent(FaberAgent, name or "Faber College", wallet or buildFaberWallet(), basedirpath, port, clientClass=TestClient) if __name__ == "__main__": faber = createFaber(port=5555) runAgent(faber)
async def addClaimDefsToWallet(self): claimDef = await self.issuer.genClaimDef(self._claimDefKey.name, self._claimDefKey.version, self._attrDef.attribNames(), 'CL') claimDefId = ID(claimDefKey=claimDef.getKey(), claimDefId=claimDef.seqId) p_prime, q_prime = primes["prime2"] await self.issuer.genKeys(claimDefId, p_prime=p_prime, q_prime=q_prime) await self.issuer.issueAccumulator(claimDefId=claimDefId, iA='110', L=5) await self.initAvailableClaimList() async def bootstrap(self): await self.addClaimDefsToWallet() def createBulldog(name=None, wallet=None, basedirpath=None, port=None): return createAgent(BulldogAgent, name or "Bulldog", wallet or buildBulldogWallet(), basedirpath, port, clientClass=TestClient) if __name__ == "__main__": bulldog = createBulldog(port=8787) runAgent(bulldog)