func (st *simpleTemplate) Envelope(chainID string) (*cb.ConfigUpdateEnvelope, error) {
	config, err := proto.Marshal(&cb.ConfigUpdate{
		ChannelId: chainID,
		WriteSet:  st.configGroup,
	})
	if err != nil {
		return nil, err
	}
	return &cb.ConfigUpdateEnvelope{
		ConfigUpdate: config,
	}, nil
}
Envelope returns a ConfigUpdateEnvelope for the given chainID
package configtx
import (
	"fmt"
	"github.com/inklabsfoundation/inkchain/common/config"
	configmsp "github.com/inklabsfoundation/inkchain/common/config/msp"
	"github.com/inklabsfoundation/inkchain/common/policies"
	"github.com/inklabsfoundation/inkchain/common/util"
	"github.com/inklabsfoundation/inkchain/msp"
	cb "github.com/inklabsfoundation/inkchain/protos/common"
	"github.com/inklabsfoundation/inkchain/protos/utils"
	"github.com/golang/protobuf/proto"
)
const (
	CreationPolicyKey = "CreationPolicy"
	msgVersion        = int32(0)
	epoch             = 0
)
type Template interface {
	Envelope(chainID string) (*cb.ConfigUpdateEnvelope, error)
}
type simpleTemplate struct {
	configGroup *cb.ConfigGroup
}
func NewSimpleTemplate(configGroups ...*cb.ConfigGroup) Template {
	sts := make([]Template, len(configGroups))
	for i, group := range configGroups {
		sts[i] = &simpleTemplate{
			configGroup: group,
		}
	}
	return NewCompositeTemplate(sts...)
}