def unspent(cls, address: str, amount: int): data = utils.make_request("getaddressutxos", [address, utils.amount(amount)]) if data["error"] is None: utxos = [] for index, utxo in enumerate(data["result"]): utxos.append({ "txid": utxo["txid"], "index": utxo["outputIndex"], "script": utxo["script"], "value": utxo["satoshis"], "height": utxo["height"] }) data["result"] = utxos return data
def unspent(cls, address: str, amount: int): data = utils.make_request('getaddressutxos', [address, utils.amount(amount)]) if data['error'] is None: utxos = [] for index, utxo in enumerate(data['result']): utxos.append({ 'txid': utxo['txid'], 'index': utxo['outputIndex'], 'script': utxo['script'], 'value': utxo['satoshis'], 'height': utxo['height'] }) data['result'] = utxos return data
def get(self): data = int(utils.amount(General().supply()['supply'])) return Response(str(data), mimetype='text/plain')
def supply_plain(): data = int(utils.amount(General().supply()["supply"])) return Response(str(data), mimetype="text/plain")