add serialization to libnp types