async def _sendReq(self, op, clbk): req = Request(identifier=self.wallet.defaultId, operation=op) req = self.wallet.prepReq(req) self.client.submitReqs(req) return await eventually(_ensureReqCompleted, req.key, self.client, clbk, timeout=20, retryWait=0.5)
async def _sendReq(self, op, clbk): req = Request(identifier=self.wallet.defaultId, operation=op) req = self.wallet.prepReq(req) self.client.submitReqs(req) try: resp = await eventually(_ensureReqCompleted, req.key, self.client, clbk, timeout=20, retryWait=0.5) except NoConsensusYet: raise TimeoutError('Request timed out') return resp
def request(self): if not self.seqNo: assert self.origin is not None op = { TXN_TYPE: CRED_DEF, DATA: { NAME: self.name, VERSION: self.version, TYPE: self.typ, ATTR_NAMES: ",".join(self.attrNames) } } return Request(identifier=self.origin, operation=op)
def request(self): if not self.seqNo: assert self.origin is not None R_str = {k: str(v) for k, v in self.R.items()} op = { TXN_TYPE: ISSUER_KEY, REFERENCE: self.claimDefSeqNo, DATA: { "N": str(self.N), "R": R_str, "S": str(self.S), "Z": str(self.Z) } } return Request(identifier=self.origin, operation=op)
def ledgerRequest(self): if not self.seqNo: return Request(identifier=self.trustee, operation=self._op())
def getRequest(self, requestAuthor: Identifier): if not self.seqNo: return Request(identifier=requestAuthor, operation=self._opForGet())
def ledgerRequest(self): if self.ledgerStore.isWriting and not self.seqNo: assert self.origin is not None return Request(identifier=self.origin, operation=self._op())
def ledgerRequest(self): if not self.seqNo: assert self.identifier is not None return Request(identifier=self.sponsor, operation=self._op())