Ejemplo n.º 1
0
def bch_tx(recipient, amount, currency, prkey):
    key = bch_network(prkey=prkey)
    try:
        tx = key.send([(recipient, amount, currency)])
        error = False
    except InsufficientFunds:
        tx = False
    except ValueError:
        tx = False
    return tx
Ejemplo n.º 2
0
def bch_balance(currency, prkey):
    key = bch_network(prkey=prkey)
    return key.get_balance(currency)
Ejemplo n.º 3
0
 def __init__(self):
     self.network = bch_network()
Ejemplo n.º 4
0
def test_bch_network():
    key = bch_network()
    if CRYPTO_NETWORK == 'testnet':
        assert type(key) == bitcash.wallet.PrivateKeyTestnet
    elif CRYPTO_NETWORK == 'mainnet':
        assert type(key) == bitcash.wallet.PrivateKey
Ejemplo n.º 5
0
def bch_tx_count(prkey):
    key = bch_network(prkey=prkey)
    txs = key.get_transactions()
    return len(txs)
Ejemplo n.º 6
0
def bch_tx_history(prkey):
    key = bch_network(prkey=prkey)
    return key.get_transactions()