func NewService(store storage.StateStorer, postageStore Storer, chainID int64) (Service, error) {
	s := &service{
		store:        store,
		postageStore: postageStore,
		chainID:      chainID,
	}
	n := 0
	if err := s.store.Iterate(s.key(), func(_, _ []byte) (stop bool, err error) {
		n++
		return false, nil
	}); err != nil {
		return nil, err
	}
	for i := 0; i < n; i++ {
		st := &StampIssuer{}
		err := s.store.Get(s.keyForIndex(i), st)
		if err != nil {
			return nil, err
		}
		s.Add(st)
	}
	return s, nil
}
NewService constructs a new Service.
package postage
import (
	"bytes"
	"errors"
	"fmt"
	"io"
	"sync"
	"github.com/ethsana/sana/pkg/storage"
)
const (
	postagePrefix = "postage"
	blockThreshold = 10
)
var (
	ErrNotFound = errors.New("not found")
	ErrNotUsable = errors.New("not usable")
)
type Service interface {
	Add(*StampIssuer)
	StampIssuers() []*StampIssuer
	GetStampIssuer([]byte) (*StampIssuer, error)
	IssuerUsable(*StampIssuer) bool
	BatchCreationListener
	io.Closer
}
type service struct {
	lock         sync.Mutex
	store        storage.StateStorer
	postageStore Storer
	chainID      int64
	issuers      []*StampIssuer
}