Fork API types.

All tests pass (for now...)  Rebasing this PR is a _pain_
I don't know what makePodList does, but can this use api.Encode?