Ejemplo n.º 1
0
 def xmss_getnewaddress(
     self,
     signatures=4096,
     SEED=None,
     type='WOTS+'
 ):  # new address format returns a stateful XMSS class object
     return merkle.XMSS(signatures, SEED)
Ejemplo n.º 2
0
def getnewaddress(signatures=4096, type='XMSS', SEED=None):						#new address format is a list of two items [address, data structure from random_mss call]
	addr = []
	if type == 'XMSS':
		new = merkle.XMSS(signatures=signatures, SEED=SEED)
		addr.append(new.address)
		addr.append(new)
	elif type == 'WOTS':
		new = merkle.random_wmss(signatures=signatures)
		addr.append(chain.roottoaddr(new[0].merkle_root))
		addr.append(new)
	elif type == 'LDOTS':
		new = merkle.random_ldmss(signatures=signatures)
		addr.append(chain.roottoaddr(new[0].merkle_root))
		addr.append(new)
	else: 
		raise Exception('OTS type not recognised')

	return addr
Ejemplo n.º 3
0
import merkle
import json

num_accounts = 100
file_name = "aws_wallet"

wallets = {}
for i in range(num_accounts):
    print "Generating (",i+1,"/",num_accounts,")"
    wallet = merkle.XMSS(signatures=4096, SEED=None)
    wallets[wallet.address] = wallet.mnemonic

f = open(file_name, 'w')
with open(file_name, 'w') as f:
    json.dump(wallets, f)#, encoding = "ISO-8859-1")