msp

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OwnerMSPID is the default MSP ID for the owner wallet
	OwnerMSPID = "OwnerMSPID"
	// IssuerMSPID is the default MSP ID for the issuer wallet
	IssuerMSPID = "IssuerMSPID"
	// AuditorMSPID is the default MSP ID for the auditor wallet
	AuditorMSPID = "AuditorMSPID"
	// CertifierMSPID is the default MSP ID for the certifier wallet
	CertifierMSPID = "CertifierMSPID"
)
View Source
const (
	// X509Identity identifies an X509-based identity
	X509Identity identity.Type = "x509"
	// IdemixIdentity identifies an idemix identity
	IdemixIdentity identity.Type = "idemix"
)

Variables

RoleToMSPID maps the role to the MSP ID

Functions

This section is empty.

Types

type RoleFactory

type RoleFactory struct {
	Logger                 logging.Logger
	TMSID                  token.TMSID
	Config                 driver2.Config
	FSCIdentity            driver.Identity
	NetworkDefaultIdentity driver.Identity
	IdentityProvider       driver2.IdentityProvider
	SignerService          driver2.SigService
	BinderService          driver2.BinderService
	StorageProvider        identity.StorageProvider
	DeserializerManager    driver2.DeserializerManager
	// contains filtered or unexported fields
}

RoleFactory is the factory for creating wallets, idemix and x509

func NewRoleFactory

func NewRoleFactory(
	logger logging.Logger,
	TMSID token.TMSID,
	config driver2.Config,
	fscIdentity driver.Identity,
	networkDefaultIdentity driver.Identity,
	identityProvider driver2.IdentityProvider,
	signerService driver2.SigService,
	binderService driver2.BinderService,
	storageProvider identity.StorageProvider,
	deserializerManager driver2.DeserializerManager,
	ignoreRemote bool,
) *RoleFactory

NewRoleFactory creates a new RoleFactory

func (*RoleFactory) BindingRole

func (f *RoleFactory) BindingRole(role identity.Role) (identity.Role, error)

BindingRole returns a new role wrapping the passed one. Identities will be bound to the long term identities this factory refers to.

func (*RoleFactory) IdentitiesForRole

func (f *RoleFactory) IdentitiesForRole(role driver.IdentityRole) ([]*config.Identity, error)

IdentitiesForRole returns the configured identities for the passed role

func (*RoleFactory) NewIdemix

func (f *RoleFactory) NewIdemix(role driver.IdentityRole, cacheSize int, issuerPublicKey []byte, curveID math3.CurveID) (identity.Role, error)

NewIdemix creates a new Idemix-based role

func (*RoleFactory) NewWrappedX509

func (f *RoleFactory) NewWrappedX509(role driver.IdentityRole, ignoreRemote bool) (identity.Role, error)

func (*RoleFactory) NewX509

func (f *RoleFactory) NewX509(role driver.IdentityRole) (identity.Role, error)

NewX509 creates a new X509-based role

type WrappingBindingInfo

type WrappingBindingInfo struct {
	driver.IdentityInfo
	IdentityType identity.Type

	RootIdentity     driver.Identity
	IdentityProvider driver2.IdentityProvider
	BinderService    driver2.BinderService
}

WrappingBindingInfo wraps a driver.IdentityInfo to further register the audit info, and binds the new identity to the default FSC node identity

func (*WrappingBindingInfo) EnrollmentID

func (i *WrappingBindingInfo) EnrollmentID() string

func (*WrappingBindingInfo) Get

func (i *WrappingBindingInfo) Get() (driver.Identity, []byte, error)

func (*WrappingBindingInfo) ID

func (i *WrappingBindingInfo) ID() string

type WrappingBindingRole

type WrappingBindingRole struct {
	identity.Role
	IdentityType identity.Type

	RootIdentity     driver.Identity
	IdentityProvider driver2.IdentityProvider
	BinderService    driver2.BinderService
}

func (*WrappingBindingRole) GetIdentityInfo

func (r *WrappingBindingRole) GetIdentityInfo(id string) (driver.IdentityInfo, error)

Directories

Path Synopsis
msp
msp

Jump to

Keyboard shortcuts

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