Example #1
0
def broadcast(namespace_id, private_key, blockchain_client, testset=False):

    nulldata = build(namespace_id, testset=testset)
    # response = {'success': True }
    response = embed_data_in_blockchain(nulldata, private_key, blockchain_client, format="hex")
    response.update({"data": nulldata})
    return response
def send_checkpoint( chaincom_client, privkey_str, checkpoint_str="http://blockstack.org/summit" ):
    """
    Write an OP_RETURN to the blockchain, to checkpoint our progress.
    Should be written every Nth name.
    """
    
    nulldata = binascii.hexlify( checkpoint_str )
    return pybitcoin.embed_data_in_blockchain( nulldata, privkey_str, chaincom_client, 10000, format='hex')
Example #3
0
def send_checkpoint( chaincom_client, privkey_str, checkpoint_str="http://blockstack.org/summit" ):
    """
    Write an OP_RETURN to the blockchain, to checkpoint our progress.
    Should be written every Nth name.
    """
    
    nulldata = binascii.hexlify( checkpoint_str )
    return pybitcoin.embed_data_in_blockchain( nulldata, privkey_str, chaincom_client, 10000, format='hex')
Example #4
0
def broadcast(name, data_hash, consensus_hash, private_key, blockchain_client=BlockchainInfoClient(), testset=False):
    """
    Write a name update into the blockchain.
    Returns a JSON object with 'data' set to the nulldata and 'transaction_hash' set to the transaction hash on success.
    """
    nulldata = build(name, consensus_hash, data_hash=data_hash, testset=testset)
    response = embed_data_in_blockchain(nulldata, private_key, blockchain_client, format='hex')
    response.update({'data': nulldata})
    return response
Example #5
0
def broadcast(name, private_key, blockchain_client, 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
Example #6
0
def broadcast(name,
              data_hash,
              consensus_hash,
              private_key,
              blockchain_client=BlockchainInfoClient(),
              testset=False):
    """
    Write a name update into the blockchain.
    Returns a JSON object with 'data' set to the nulldata and 'transaction_hash' set to the transaction hash on success.
    """
    nulldata = build(name,
                     consensus_hash,
                     data_hash=data_hash,
                     testset=testset)
    response = embed_data_in_blockchain(nulldata,
                                        private_key,
                                        blockchain_client,
                                        format='hex')
    response.update({'data': nulldata})
    return response