v0.0.4: internal refactor to extract types/validators
factor out core api