generators

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CryptoMaterialGenerator

type CryptoMaterialGenerator interface {
	// Setup generates the setup material for the given TMS.
	Setup(tms *topology.TMS) (string, error)
	// GenerateCertifierIdentities generates the certifier identities for the given TMS and FSC node.
	GenerateCertifierIdentities(tms *topology.TMS, node *node.Node, certifiers ...string) []Identity
	// GenerateOwnerIdentities generates the owner identities for the given TMS and FSC node.
	GenerateOwnerIdentities(tms *topology.TMS, n *node.Node, owners ...string) []Identity
	// GenerateIssuerIdentities generates the issuer identities for the given TMS and FSC node.
	GenerateIssuerIdentities(tms *topology.TMS, n *node.Node, issuers ...string) []Identity
	// GenerateAuditorIdentities generates the auditor identities for the given TMS and FSC node.
	GenerateAuditorIdentities(tms *topology.TMS, n *node.Node, auditors ...string) []Identity
}

CryptoMaterialGenerator models the crypto material generator

type Identity

type Identity struct {
	ID      string
	Type    string
	Path    string
	Default bool
	Opts    *topology.BCCSP
}

type PublicParamsGenerator

type PublicParamsGenerator interface {
	// Generate generates the public parameters for the given TMS, wallets, and any additional relevant argument.
	// It returns the public parameters and any error.
	Generate(tms *topology.TMS, wallets *Wallets, args ...interface{}) ([]byte, error)
}

PublicParamsGenerator models the public parameters generator

type TokenPlatform

type TokenPlatform interface {
	// TokenGen executes the cmd/tokengen with the passed command
	TokenGen(keygen common.Command) (*gexec.Session, error)
	// GetPublicParamsGenerators returns the public parameters' generator for the given driver
	GetPublicParamsGenerators(driver string) PublicParamsGenerator
	// PublicParameters returns the public parameters of the given TMS
	PublicParameters(tms *topology.TMS) []byte
	// PublicParametersFile returns the path to the public parameters file of the given TMS
	PublicParametersFile(tms *topology.TMS) string
	// PublicParametersDir returns the path to the directory containing the public parameters
	PublicParametersDir() string
	// GetContext returns the NWO context
	GetContext() api2.Context
	// GetBuilder returns the NWO builder
	GetBuilder() api2.Builder
	// TokenDir returns the path to directory containing the token artifacts
	TokenDir() string
}

TokenPlatform models the token platform and some of its help functions

type Wallets

type Wallets struct {
	Certifiers []Identity
	Issuers    []Identity
	Owners     []Identity
	Auditors   []Identity
}

Directories

Path Synopsis
mock
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL