Please help me with getwork protocol for litecoin miner.There is mixed info online about endiannes of data provided by getwork and data that should be submitted to mining pools.
According to https://litecoin.info/Scrypt the data recieved has to be split into parts and each part has to be be byteswapped to little endian(even the 32byte merkle root has to be byteswapped so 31'th byte is 1'st and so on).
According to pooler's implementation in java https://github.com/pooler/JMiner the header is byteswapped per 4 byte chunks.
And then after hashing this header with scrypt, I don't know if I am supposed to check first bytes or last bytes in hash because of endianness.
I am implementing getwork because I have code for stratum, but i am lost in all the endianness so I want to implement getwork to get all endian issues sorted and then use stratum to generate block headers according to rest of the "proper" spec.
I suppose Bitcoin and litecoin may have same specification, but i am not sure.