import json


# execute a transaction/sendCoinsToAddress call
def sendCoinsToAddress(sidechainNode, address, amount, fee):
    j = {
        "outputs": [
            {
                "publicKey": str(address),
                "value": amount
            }
        ],
        "fee": fee
    }
    request = json.dumps(j)
    response = sidechainNode.transaction_sendCoinsToAddress(request)
    return response["result"]["transactionId"]

import json


# execute a transaction/sendCoinsToAddress call
def sendCoinsToAddress(sidechainNode, address, amount, fee):
    j = {
        "outputs": [
            {
                "publicKey": str(address),
                "value": amount
            }
        ],
        "fee": fee
    }
    request = json.dumps(j)
    response = sidechainNode.transaction_sendCoinsToAddress(request)
    return response["result"]["transactionId"]

# execute a transaction/sendCoinsToAddress call