topology

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateNs

func ValidateNs(ns string) error

ValidateNs checks if the namespace is valid

Types

type BackedTopology

type BackedTopology interface {
	Name() string
}

type Chaincode

type Chaincode struct {
	Orgs        []string
	Private     bool
	DockerImage string
}

type Identity added in v0.5.0

type Identity struct {
	ID      string
	Type    string
	Path    string
	Default bool
	Opts    *crypto.BCCSP
	Raw     []byte
}

type Options

type Options struct {
	Mapping map[string]interface{}
}

func Convert

func Convert(m map[interface{}]interface{}) *Options

func ToOptions

func ToOptions(o *node.Options) *Options

func (*Options) Auditor

func (o *Options) Auditor() bool

func (*Options) Certifier

func (o *Options) Certifier() bool

func (*Options) Endorser added in v0.4.0

func (o *Options) Endorser() bool

func (*Options) IsRemoteOwner added in v0.3.0

func (o *Options) IsRemoteOwner(id string) bool

IsRemoteOwner returns true if the passed owner wallet identifier is marked as remote

func (*Options) IsUseHSMForAuditor

func (o *Options) IsUseHSMForAuditor() bool

func (*Options) IsUseHSMForIssuer

func (o *Options) IsUseHSMForIssuer(label string) bool

func (*Options) Issuers

func (o *Options) Issuers() []string

func (*Options) Owners

func (o *Options) Owners() []string

func (*Options) SetAuditor

func (o *Options) SetAuditor(v bool)

func (*Options) SetCertifier

func (o *Options) SetCertifier(v bool)

func (*Options) SetEndorser added in v0.4.0

func (o *Options) SetEndorser(v bool)

func (*Options) SetIssuers

func (o *Options) SetIssuers(ids []string)

func (*Options) SetOwners

func (o *Options) SetOwners(ids []string)

func (*Options) SetRemoteOwner added in v0.3.0

func (o *Options) SetRemoteOwner(id string)

SetRemoteOwner marks the passed owner wallet identifier as remote

func (*Options) UseHSMForAuditor

func (o *Options) UseHSMForAuditor()

func (*Options) UseHSMForIssuer

func (o *Options) UseHSMForIssuer(label string)

type TMS

type TMS struct {
	Network             string
	Channel             string
	Namespace           string
	Driver              string
	Alias               TMSAlias
	PublicParamsGenArgs []string
	Auditors            []string
	Certifiers          []string
	Issuers             []string
	// Transient indicates if the TMS is transient
	// A transient TMS is not deployed on the network
	Transient bool

	TokenTopology   TokenTopology          `yaml:"-"`
	FSCNodes        []*node.Node           `yaml:"-"`
	BackendTopology BackedTopology         `yaml:"-"`
	BackendParams   map[string]interface{} `yaml:"-"`
	Wallets         *Wallets               `yaml:"-"`
}

func (*TMS) AddAuditor

func (t *TMS) AddAuditor(auditor *node.Node) *TMS

func (*TMS) AddCertifier

func (t *TMS) AddCertifier(certifier *node.Node) *TMS

func (*TMS) AddIssuer

func (t *TMS) AddIssuer(issuer *node.Node) *TMS

func (*TMS) AddIssuerByID added in v0.5.0

func (t *TMS) AddIssuerByID(id string) *TMS

func (*TMS) AddNode

func (t *TMS) AddNode(custodian *node.Node)

func (*TMS) ID

func (t *TMS) ID() string

func (*TMS) SetNamespace

func (t *TMS) SetNamespace(namespace string) *TMS

SetNamespace sets the namespace of the TMS

func (*TMS) SetTokenGenPublicParams

func (t *TMS) SetTokenGenPublicParams(publicParamsGenArgs ...string)

func (*TMS) TmsID added in v0.5.0

func (t *TMS) TmsID() string

type TMSAlias added in v0.5.0

type TMSAlias string

TMSAlias represents a TMS alias

type TokenTopology

type TokenTopology interface {
	// GetTMSs returns the list of TMSs in the topology
	GetTMSs() []*TMS
}

TokenTopology models the topology of the token network

type Wallets added in v0.5.0

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

Jump to

Keyboard shortcuts

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