{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.4.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package encoder\n\n## Constants\n\n```go\nconst (\n\t// ConsensusTypeSolo identifies the solo consensus implementation.\n\tConsensusTypeSolo = \"solo\"\n\t// ConsensusTypeKafka identifies the Kafka-based consensus implementation.\n\tConsensusTypeKafka = \"kafka\"\n\n\t// BlockValidationPolicyKey TODO\n\tBlockValidationPolicyKey = \"BlockValidation\"\n\n\t// OrdererAdminsPolicy is the absolute path to the orderer admins policy\n\tOrdererAdminsPolicy = \"/Channel/Orderer/Admins\"\n\n\t// SignaturePolicyType is the 'Type' string for signature policies\n\tSignaturePolicyType = \"Signature\"\n\n\t// ImplicitMetaPolicyType is the 'Type' string for implicit meta policies\n\tImplicitMetaPolicyType = \"ImplicitMeta\"\n)\n```\n\n## Functions\n\n```go\nfunc ConfigTemplateFromGroup(conf *genesisconfig.Profile, cg *cb.ConfigGroup) (*cb.ConfigGroup, error)\n```\n\n```go\nfunc DefaultConfigTemplate(conf *genesisconfig.Profile) (*cb.ConfigGroup, error)\n```\nDefaultConfigTemplate generates a config template based on the assumption that the input profile is a channel creation template and no system channel context is available.\n\n```go\nfunc MakeChannelCreationTransaction(channelID string, signer crypto.LocalSigner, conf *genesisconfig.Profile) (*cb.Envelope, error)\n```\nMakeChannelCreationTransaction is a handy utility function for creating transactions for channel creation. It assumes the invoker has no system channel context so ignores all but the application section.\n\n```go\nfunc MakeChannelCreationTransactionFromTemplate(channelID string, signer crypto.LocalSigner, conf *genesisconfig.Profile, template *cb.ConfigGroup) (*cb.Envelope, error)\n```\nMakeChannelCreationTransactionFromTemplate creates a transaction for creating a channel.  It uses the given template to produce the config update set.  Usually, the caller will want to invoke MakeChannelCreationTransaction or MakeChannelCreationTransactionWithSystemChannelContext.\n\n```go\nfunc MakeChannelCreationTransactionWithSystemChannelContext(channelID string, signer crypto.LocalSigner, conf, systemChannelConf *genesisconfig.Profile) (*cb.Envelope, error)\n```\nMakeChannelCreationTransactionWithSystemChannelContext is a utility function for creating channel creation txes. It requires a configuration representing the orderer system channel to allow more sophisticated channel creation transactions modifying pieces of the configuration like the orderer set.\n\n```go\nfunc NewApplicationGroup(conf *genesisconfig.Application) (*cb.ConfigGroup, error)\n```\nNewApplicationGroup returns the application component of the channel configuration.  It defines the organizations which are involved in application logic like chaincodes, and how these members may interact with the orderer.  It sets the mod\\_policy of all elements to \"Admins\".\n\n```go\nfunc NewApplicationOrgGroup(conf *genesisconfig.Organization) (*cb.ConfigGroup, error)\n```\nNewApplicationOrgGroup returns an application org component of the channel configuration.  It defines the crypto material for the organization (its MSP) as well as its anchor peers for use by the gossip network.  It sets the mod\\_policy of all elements to \"Admins\".\n\n```go\nfunc NewChannelCreateConfigUpdate(channelID string, conf *genesisconfig.Profile, templateConfig *cb.ConfigGroup) (*cb.ConfigUpdate, error)\n```\nNewChannelCreateConfigUpdate generates a ConfigUpdate which can be sent to the orderer to create a new channel.  Optionally, the channel group of the ordering system channel may be passed in, and the resulting ConfigUpdate will extract the appropriate versions from this file.\n\n```go\nfunc NewChannelGroup(conf *genesisconfig.Profile) (*cb.ConfigGroup, error)\n```\nNewChannelGroup defines the root of the channel configuration.  It defines basic operating principles like the hashing algorithm used for the blocks, as well as the location of the ordering service.  It will recursively call into the NewOrdererGroup, NewConsortiumsGroup, and NewApplicationGroup depending on whether these sub-elements are set in the configuration.  All mod\\_policy values are set to \"Admins\" for this group, with the exception of the OrdererAddresses value which is set to \"/Channel/Orderer/Admins\".\n\n```go\nfunc NewConsortiumGroup(conf *genesisconfig.Consortium) (*cb.ConfigGroup, error)\n```\nNewConsortiums returns a consortiums component of the channel configuration.  Each consortium defines the organizations which may be involved in channel creation, as well as the channel creation policy the orderer checks at channel creation time to authorize the action.  It sets the mod\\_policy of all elements to \"/Channel/Orderer/Admins\".\n\n```go\nfunc NewConsortiumOrgGroup(conf *genesisconfig.Organization) (*cb.ConfigGroup, error)\n```\nNewConsortiumsGroup returns an org component of the channel configuration.  It defines the crypto material for the organization (its MSP).  It sets the mod\\_policy of all elements to \"Admins\".\n\n```go\nfunc NewConsortiumsGroup(conf map[string]*genesisconfig.Consortium) (*cb.ConfigGroup, error)\n```\nNewConsortiumsGroup returns the consortiums component of the channel configuration.  This element is only defined for the ordering system channel. It sets the mod\\_policy for all elements to \"/Channel/Orderer/Admins\".\n\n```go\nfunc NewOrdererGroup(conf *genesisconfig.Orderer) (*cb.ConfigGroup, error)\n```\nNewOrdererGroup returns the orderer component of the channel configuration.  It defines parameters of the ordering service about how large blocks should be, how frequently they should be emitted, etc. as well as the organizations of the ordering network. It sets the mod\\_policy of all elements to \"Admins\".  This group is always present in any channel configuration.\n\n```go\nfunc NewOrdererOrgGroup(conf *genesisconfig.Organization) (*cb.ConfigGroup, error)\n```\nNewOrdererOrgGroup returns an orderer org component of the channel configuration.  It defines the crypto material for the organization (its MSP).  It sets the mod\\_policy of all elements to \"Admins\".\n\n## Types\n\n```go\ntype Bootstrapper struct {\n\t// contains filtered or unexported fields\n}\n```\nBootstrapper is a wrapper around NewChannelConfigGroup which can produce genesis blocks\n\n```go\nfunc New(config *genesisconfig.Profile) *Bootstrapper\n```\nNew creates a new Bootstrapper for generating genesis blocks\n\n```go\nfunc (bs *Bootstrapper) GenesisBlock() *cb.Block\n```\nGenesisBlock produces a genesis block for the default test chain id\n\n```go\nfunc (bs *Bootstrapper) GenesisBlockForChannel(channelID string) *cb.Block\n```\nGenesisBlockForChannel produces a genesis block for a given channel ID\n\n","path":"github.com/eric-erki/https-hyperledger.org/common/tools/configtxgen/encoder","name":"encoder","synopsis":"","isRedistributable":true}
