def brainwallet(phrase=None): public_address=addresses.generate_publicaddress(phrase) public_key=addresses.generate_publickey(phrase) private_key=addresses.generate_privatekey(phrase) jsonresponse={} jsonresponse['public_key']=public_key jsonresponse['public_address']=public_address jsonresponse['private_key']=private_key jsonresponse=json.dumps(jsonresponse) response=make_response(str(jsonresponse), 200) response.headers['Content-Type'] = 'application/json' response.headers['Access-Control-Allow-Origin']= '*' return response
def brainwallet(phrase=None): public_address = addresses.generate_publicaddress(phrase) public_key = addresses.generate_publickey(phrase) private_key = addresses.generate_privatekey(phrase) jsonresponse = {} jsonresponse['public_key'] = public_key jsonresponse['public_address'] = public_address jsonresponse['private_key'] = private_key jsonresponse = json.dumps(jsonresponse) response = make_response(str(jsonresponse), 200) response.headers['Content-Type'] = 'application/json' response.headers['Access-Control-Allow-Origin'] = '*' return response
n_transactions=len(message)/max_op_length+1 continu=True responses=[] #PREPARE OUTPUTS value_each=fee_each specific_inputs=make_multiple_outputs(fromaddr, privatekey, n_transactions+1, value_each, fee_each) for n in range(0,n_transactions): if continu: indexstart=max_op_length*n indexend=indexstart+max_op_length if indexend>len(message): indexend=len(message) specific_input=specific_inputs[n:n+1] print "" print "MY INPUT: "+str(specific_input) print "" submessage=str(n)+" "+message[indexstart:indexend] #print submessage r=send_op_return(fromaddr, profit_address, fee_each, submessage, privatekey,specific_input) if r is None: continu=False else: responses.append(r) return specific_inputs m='Celebrimbor was the son of Curufin, fifth son of F\xc3\xabanor and Nerdanel.' declaration_tx(addresses.generate_publicaddress('Andrew1Barisser'), 0.00004, addresses.generate_privatekey('Andrew1Barisser'),m)