Ejemplo n.º 1
0
    def setUp(self):
        self.private_key = BITCOIN_PRIVATE_KEY_2

        self.blockcypher_client = blockcypher.BlockcypherClient(
            BLOCKCYPHER_API_KEY)
        self.chain_com_client = chain_com.ChainComClient(
            CHAIN_API_ID, CHAIN_API_SECRET)
        self.blockchain_info_client = blockchain_info.BlockchainInfoClient(
            BLOCKCHAIN_API_KEY)
        self.bitcoind_client = bitcoind_client

        self.fee = 10000
Ejemplo n.º 2
0
    def setUp(self):
        self.recipient_address = '1EEwLZVZMc2EhMf3LXDARbp4mA3qAwhBxu'
        self.private_key = BitcoinPrivateKey(BITCOIN_PRIVATE_KEY)
        self.send_amount = 1000

        self.blockcypher_client = blockcypher.BlockcypherClient(
            BLOCKCYPHER_API_KEY)
        self.chain_com_client = chain_com.ChainComClient(
            CHAIN_API_ID, CHAIN_API_SECRET)
        self.blockchain_info_client = blockchain_info.BlockchainInfoClient(
            BLOCKCHAIN_API_KEY)
        self.bitcoind_client = bitcoind_client
        self.bitcoind = create_bitcoind_service_proxy(BITCOIND_RPC_USERNAME,
                                                      BITCOIND_RPC_PASSWORD)

        self.signed_tx = make_send_to_address_tx(self.recipient_address,
                                                 self.send_amount,
                                                 self.private_key,
                                                 self.blockcypher_client)
Ejemplo n.º 3
0
 def test_analyze_private_key(self):
     client = chain_com.ChainComClient(CHAIN_API_ID, CHAIN_API_SECRET)
     private_key_obj, from_address, inputs = analyze_private_key(
         self.private_key, client)
     self.assertTrue(isinstance(private_key_obj, BitcoinPrivateKey))
Ejemplo n.º 4
0
 def test_chain_com_get_unspents(self):
     client = chain_com.ChainComClient(CHAIN_API_ID, CHAIN_API_SECRET)
     unspents = chain_com.get_unspents(self.address, client)
     self.compare_total_value(unspents)
     self.compare_unspents(unspents)