Beispiel #1
0
 def make_mint(pubkey, DB):
     address = tools.make_address([reward_address], 1)
     return {
         'type': 'mint',
         'pubkeys': [pubkey],
         'signatures': ['first_sig'],
         'count': blockchain.count(address, DB)
     }
Beispiel #2
0
def easy_add_transaction(tx_orig, privkey, DB):
    tx = copy.deepcopy(tx_orig)
    pubkey = pt.privtopub(privkey)
    try:
        tx['count'] = blockchain.count(pubkey, DB)
    except:
        tx['count'] = 1
    tx['signature'] = pt.ecdsa_sign(tools.det_hash(tx), privkey)
    blockchain.add_tx(tx, DB)
Beispiel #3
0
def easy_add_transaction(tx_orig, privkey, DB):
    tx=copy.deepcopy(tx_orig)
    pubkey=tools.privtopub(privkey)
    address=tools.make_address([pubkey], 1)
    try:
        tx['count']=blockchain.count(address, DB)
    except:
        tx['count']=1
    tx['signatures']=[tools.sign(tools.det_hash(tx), privkey)]
    blockchain.add_tx(tx, DB)
Beispiel #4
0
def easy_add_transaction(tx_orig, privkey, DB):
    tx=copy.deepcopy(tx_orig)
    pubkey=tools.privtopub(privkey)
    try:
        tx['count']=blockchain.count(pubkey, DB)
    except:
        tx['count']=1
    tx['signature']=[tools.sign(tools.det_hash(tx), privkey)]
    print('CREATED TX: ' +str(tx))
    blockchain.add_tx(tx, DB)
Beispiel #5
0
def easy_add_transaction(tx_orig, privkey, DB):
    tx = copy.deepcopy(tx_orig)
    pubkey = tools.privtopub(privkey)
    address = tools.make_address([pubkey], 1)
    try:
        tx['count'] = blockchain.count(address, DB)
    except:
        tx['count'] = 1
    tx['signatures'] = [tools.sign(tools.det_hash(tx), privkey)]
    blockchain.add_tx(tx, DB)
Beispiel #6
0
 def make_mint(pubkey, DB): return {'type':'mint', 'id':[pubkey], 'signature':['first_sig'],
                                    'count':blockchain.count(pubkey, DB)}
                                    
 def genesis(pubkey, DB):
Beispiel #7
0
 def make_mint(pubkey, DB):
     address = tools.make_address([reward_address], 1)
     return {'type': 'mint',
             'pubkeys': [pubkey],
             'signatures': ['first_sig'],
             'count': blockchain.count(address, DB)}
Beispiel #8
0
 def make_mint(pubkey, DB): return {'type':'mint', 'id':pubkey, 
                                    'count':blockchain.count(pubkey, DB)}
                                    
 def genesis(pubkey, DB):