def get_message_to_sign(transaction): from bigchaindb.common.transaction import Transaction # fulfillments are not part of the message to sign tx_dict = Transaction._remove_signatures(transaction.to_dict()) return Transaction._to_str(tx_dict).encode()