user

package
v0.0.0-...-e4e9725 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACView

type ACView int
const (
	ACVC4dtUser ACView = iota
	ACVC4dtPartner
	ACVC4dtAdmin
	ACVAdmin
)

type Builder

type Builder struct {
	UserID byzcoin.InstanceID
	// contains filtered or unexported fields
}

Builder allows to create a new user either directly from a DARC with the appropriate permissions, or from a Spawner contract.

func NewUserBuilder

func NewUserBuilder(alias string) (*Builder, error)

NewUserBuilder creates a new Builder.

func (*Builder) CreateFromDarc

func (ub *Builder) CreateFromDarc(cl *byzcoin.Client, spawnerDarcID darc.ID,
	spawnerSigner darc.Signer) (*User, error)

CreateFromDarc creates a new user from a darc that has the necessary rules to create all elements.

func (*Builder) CreateFromSpawner

func (ub *Builder) CreateFromSpawner(spawner ActiveSpawner) (*User, error)

CreateFromSpawner creates a new user from a spawner instance.

func (*Builder) SetAlias

func (ub *Builder) SetAlias(alias string)

SetAlias sets the alias of the user in the credential.

func (*Builder) SetCoinID

func (ub *Builder) SetCoinID(coinID byzcoin.InstanceID)

SetCoinID sets the coinID of the user in the credential.

func (*Builder) SetEmail

func (ub *Builder) SetEmail(email string)

SetEmail sets the email of the user in the credential.

func (*Builder) SetLtsID

func (ub *Builder) SetLtsID(ltsID byzcoin.InstanceID)

SetLtsID sets the LTS_ID that the user can use

func (*Builder) SetLtsX

func (ub *Builder) SetLtsX(pub kyber.Point)

SetLtsX sets the public key of the LTS

func (*Builder) SetSpawnerID

func (ub *Builder) SetSpawnerID(spawnerID byzcoin.InstanceID)

SetSpawnerID sets the spawnerID of the user in the credential.

func (*Builder) SetView

func (ub *Builder) SetView(view ACView)

SetView sets the initial view of the user.

Jump to

Keyboard shortcuts

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