def get(self, txid): # call fetcher # self.updater.update() # render socket = dator.Socket() result = socket.get_txid(txid) self.render("txid.html", data=result)
def get(self, height): # call fetcher # self.updater.update() # render socket = dator.Socket() result = socket.get_blockfromheight(height) self.render("address.html", data=result)
def get(self, address): # call fetcher # self.updater.update() # render socket = dator.Socket() result = socket.get_address(address) self.render("address.html", data=result)
def get(self, data): # call fetcher # self.updater.update() query = seekHandler.get_argument(self, "query") print(f"Query: {query}, {type(query)}, {len(query)}") socket = dator.Socket() try: if query.strip() == "": self.write("Nothing entered") return if query.isnumeric(): result = socket.get_blockfromheight(query) self.render("address.html", data=result) elif query.lower() != query: print("txid") result = socket.get_txid(query) if result: self.render("txid.html", data=result) else: result = socket.get_blockfromhash(query) if result: print(result) self.render("address.html", data=result) result = socket.get_address(query) if result: print(result) self.render("address.html", data=result) except Exception as e: self.write(f"Request not recognized ({e})") # render """