func (s *Store) Put(ops []*operation.AnchoredOperation) error {
	operations := make([]storage.Operation, len(ops))
	for i, op := range ops {
		value, err := json.Marshal(op)
		if err != nil {
			return fmt.Errorf("failed to marshal operation: %w", err)
		}
		logger.Debugf("adding operation to storage batch: type[%s], suffix[%s], txtime[%d], pg[%d], buffer: %s",
			op.Type, op.UniqueSuffix, op.TransactionTime, op.ProtocolVersion, string(op.OperationRequest))
		op := storage.Operation{
			Key:   uuid.New().String(),
			Value: value,
			Tags: []storage.Tag{
				{
					Name:  index,
					Value: op.UniqueSuffix,
				},
			},
		}
		operations[i] = op
	}
	err := s.store.Batch(operations)
	if err != nil {
		return orberrors.NewTransient(fmt.Errorf("failed to store operations: %w", err))
	}
	logger.Debugf("stored %d operations", len(ops))
	return nil
}
Put saves document operations into operation store.
package operation
import (
	"encoding/json"
	"fmt"
	"github.com/google/uuid"
	"github.com/hyperledger/aries-framework-go/spi/storage"
	"github.com/trustbloc/edge-core/pkg/log"
	"github.com/trustbloc/sidetree-core-go/pkg/api/operation"
	orberrors "github.com/trustbloc/orb/pkg/errors"
)
const (
	namespace = "operation"
	index     = "suffix"
)
var logger = log.New("operation-store")
func New(provider storage.Provider) (*Store, error) {
	store, err := provider.OpenStore(namespace)
	if err != nil {
		return nil, fmt.Errorf("failed to open operation store: %w", err)
	}
	err = provider.SetStoreConfig(namespace, storage.StoreConfiguration{TagNames: []string{index}})
	if err != nil {
		return nil, fmt.Errorf("failed to set store configuration: %w", err)
	}
	return &Store{
		store: store,
	}, nil
}
type Store struct {
	store storage.Store
}