Esempio n. 1
0
def gen_addr():
    payload = trans(request.get_data(as_text=True))
    if (payload == ""):
        priv = request.args.get("priv")
        if priv == None:
            return json.dumps(Ethereum.generate_addr())
    else:
        priv = payload["priv"]
    
    return json.dumps(Ethereum.generate_addr(priv))
Esempio n. 2
0
def translate_sig():
    if request.method == "GET":
        sig = request.args.get("sig")
    else:
        sig = trans(request.get_data(as_text=True))["sig"]
    
    return json.dumps(Ethereum.split_sig(sig))   
Esempio n. 3
0
def gen_addr():
    payload = trans(request.get_data(as_text=True))
    if (payload == ""):
        return json.dumps(Ethereum.generate_addr())
    else:
        return json.dumps(Ethereum.generate_addr(payload["priv"]))