Move rpc types to proto.