func NewBlocksFromNumHandler(channelID string, cfg Config, blockchainProvider blockchainClientProvider) *Blocks {
	h := &Blocks{
		handler: newHandler(
			channelID, cfg,
			fmt.Sprintf("%s/blocks", cfg.BasePath),
			http.MethodGet,
			blockchainProvider,
			fromTimeParam, maxBlocksParam,
		),
	}
	h.getBlocks = h.getBlocksFromNumber
	return h
}
NewBlocksFromNumHandler returns a new handler that retrieves a range of blocks starting
at the block number given by the parameter, from-time, and returns a maximum
number of blocks given by parameter max-blocks. The blocks are returned in JSON encoding.
package blockchainhandler
import (
	"fmt"
	"net/http"
	"strconv"
	"github.com/gorilla/mux"
	"github.com/trustbloc/sidetree-core-go/pkg/restapi/common"
	"github.com/trustbloc/sidetree-fabric/pkg/httpserver"
)
type getBlocksFunc func(req *http.Request) ([]Block, error)
type Blocks struct {
	*handler
	getBlocks getBlocksFunc
}