Documentation ¶
Index ¶
- type ACView
- type Builder
- func (ub *Builder) CreateFromDarc(cl *byzcoin.Client, spawnerDarcID darc.ID, spawnerSigner darc.Signer) (*User, error)
- func (ub *Builder) CreateFromSpawner(spawner ActiveSpawner) (*User, error)
- func (ub *Builder) SetAlias(alias string)
- func (ub *Builder) SetCoinID(coinID byzcoin.InstanceID)
- func (ub *Builder) SetEmail(email string)
- func (ub *Builder) SetLtsID(ltsID byzcoin.InstanceID)
- func (ub *Builder) SetLtsX(pub kyber.Point)
- func (ub *Builder) SetSpawnerID(spawnerID byzcoin.InstanceID)
- func (ub *Builder) SetView(view ACView)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 ¶
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 ¶
CreateFromSpawner creates a new user from a spawner instance.
func (*Builder) SetCoinID ¶
func (ub *Builder) SetCoinID(coinID byzcoin.InstanceID)
SetCoinID sets the coinID 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.
Click to show internal directories.
Click to hide internal directories.