parties

package
v0.78.8 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAliasIsReserved   = errors.New("this alias is reserved")
	ReservedPartyAliases = []string{"network"}
)

Functions

This section is empty.

Types

type Broker

type Broker interface {
	Send(event events.Event)
}

Broker is used to notify administrative actions on parties profiles.

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(broker Broker) *Engine

func (*Engine) AssignDeriveKey added in v0.77.0

func (e *Engine) AssignDeriveKey(ctx context.Context, party types.PartyID, derivedKey string)

func (*Engine) CheckDerivedKeyOwnership added in v0.77.0

func (e *Engine) CheckDerivedKeyOwnership(party types.PartyID, derivedKey string) bool

func (*Engine) CheckSufficientBalanceToUpdateProfile

func (e *Engine) CheckSufficientBalanceToUpdateProfile(party types.PartyID, balance *num.Uint) error

func (*Engine) OnMinBalanceForUpdatePartyProfileUpdated

func (e *Engine) OnMinBalanceForUpdatePartyProfileUpdated(_ context.Context, min *num.Uint) error

func (*Engine) RelatedKeys added in v0.77.0

func (e *Engine) RelatedKeys(key string) (*types.PartyID, []string)

RelatedKeys returns all keys related to the specified key. If a derived key is provided, it returns all other derived keys and the party key. If a party key is provided, it returns all derived keys and the party key itself. The keys will be in an indeterminate order.

func (*Engine) UpdateProfile

func (e *Engine) UpdateProfile(ctx context.Context, partyID types.PartyID, cmd *commandspb.UpdatePartyProfile) error

type SnapshottedEngine

type SnapshottedEngine struct {
	*Engine
	// contains filtered or unexported fields
}

func NewSnapshottedEngine

func NewSnapshottedEngine(broker Broker) *SnapshottedEngine

func (*SnapshottedEngine) GetState

func (e *SnapshottedEngine) GetState(k string) ([]byte, []types.StateProvider, error)

func (*SnapshottedEngine) Keys

func (e *SnapshottedEngine) Keys() []string

func (*SnapshottedEngine) LoadState

func (*SnapshottedEngine) Namespace

func (e *SnapshottedEngine) Namespace() types.SnapshotNamespace

func (*SnapshottedEngine) StopSnapshots

func (e *SnapshottedEngine) StopSnapshots()

func (*SnapshottedEngine) Stopped

func (e *SnapshottedEngine) Stopped() bool

Jump to

Keyboard shortcuts

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