コード例 #1
0
ファイル: update.py プロジェクト: abhilashreddyp/blockstore
def broadcast(name, data, private_key,
              blockchain_client=BlockchainInfoClient(), testset=False):
    nulldata = build(name, data_hash=hex_hash160(data), testset=testset)
    response = embed_data_in_blockchain(
        nulldata, private_key, blockchain_client, format='hex')
    response.update({'data': nulldata})
    return response
コード例 #2
0
ファイル: register.py プロジェクト: abhilashreddyp/blockstore
def broadcast(name, private_key,
              blockchain_client=BlockchainInfoClient(), testset=False):
    nulldata = build(name, testset=testset)
    # response = {'success': True }
    response = embed_data_in_blockchain(
        nulldata, private_key, blockchain_client, format='hex')
    response.update({'data': nulldata})
    return response
コード例 #3
0
def broadcast(name,
              private_key,
              blockchain_client=BlockchainInfoClient(),
              testset=False):
    nulldata = build(name, testset=testset)
    # response = {'success': True }
    response = embed_data_in_blockchain(nulldata,
                                        private_key,
                                        blockchain_client,
                                        format='hex')
    response.update({'data': nulldata})
    return response
コード例 #4
0
ファイル: update.py プロジェクト: unclenate/blockstore
def broadcast(name,
              data,
              private_key,
              blockchain_client=BlockchainInfoClient(),
              testset=False):
    nulldata = build(name, data_hash=hex_hash160(data), testset=testset)
    response = embed_data_in_blockchain(nulldata,
                                        private_key,
                                        blockchain_client,
                                        format='hex')
    response.update({'data': nulldata})
    return response
コード例 #5
0
ファイル: preorder.py プロジェクト: unclenate/blockstore
def broadcast(name, consensus_hash, private_key,
              blockchain_client=BlockchainInfoClient(), testset=False):
    """ Builds and broadcasts a preorder transaction.
    """
    hash160 = BitcoinPrivateKey(private_key).public_key().hash160()
    script_pubkey = script_to_hex(
        'OP_DUP OP_HASH160 %s OP_EQUALVERIFY OP_CHECKSIG' % hash160)
    nulldata = build(
        name, script_pubkey, consensus_hash, testset=testset)
    response = embed_data_in_blockchain(
        nulldata, private_key, blockchain_client, format='hex')
    # response = {'success': True }
    response.update(
        {'data': nulldata, 'consensus_hash': consensus_hash})
    return response