(plugin, txid, vout, *kwargs)
| 78 | |
| 79 | @plugin.method("getutxout") |
| 80 | def getutxout(plugin, txid, vout, *kwargs): |
| 81 | txoutstr = bcli(plugin, ["gettxout", txid, vout]).strip() |
| 82 | if txoutstr == "": |
| 83 | return {"amount": None, "script": None} |
| 84 | txout = json.loads(txoutstr) |
| 85 | return {"amount": txout['value'], |
| 86 | "script": txout['scriptPubKey']['hex']} |
| 87 | |
| 88 | |
| 89 | plugin.add_option("bitcoin-rpcuser", '', '') |