a little reorg to separate things

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
peer: add an encoding test

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
peer: switch to an encoder

update expected test results

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>