コード例 #1
0
    def setUp(self):
        self.private_key = BITCOIN_PRIVATE_KEY_2

        self.blockcypher_client = blockcypher.BlockcypherClient(
            BLOCKCYPHER_API_KEY)
        self.blockchain_info_client = blockchain_info.BlockchainInfoClient(
            BLOCKCHAIN_API_KEY)
        self.bitcoind_client = bitcoind_client

        self.fee = 10000
コード例 #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.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)
コード例 #3
0
 def test_blockcypher_get_unspents(self):
     client = blockcypher.BlockcypherClient()
     unspents = blockcypher.get_unspents(self.address, client)
     self.compare_total_value(unspents)
     self.compare_unspents(unspents)
コード例 #4
0
 def test_analyze_private_key(self):
     client = blockcypher.BlockcypherClient(BLOCKCYPHER_API_KEY)
     private_key_obj, from_address, inputs = analyze_private_key(
         self.private_key, client)
     self.assertTrue(isinstance(private_key_obj, BitcoinPrivateKey))