Implements the hash to be signed from PoolL2Tx, compatible with javascript version. Implements the signature verification for a given PoolL2Tx.