The full protocol spec is there, I built mine from this without even touching the reference implementation.