keymanager

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyManager

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

KeyManager provides public and private keys for ranges of milestone indexes.

func New

func New() *KeyManager

New returns a new KeyManager.

func (*KeyManager) AddKeyRange

func (k *KeyManager) AddKeyRange(publicKey ed25519.PublicKey, startIndex milestone.Index, endIndex milestone.Index)

AddKeyRange adds a new public key to the MilestoneKeyManager including its valid range.

func (*KeyManager) MilestonePublicKeyMappingForMilestoneIndex added in v1.0.5

func (k *KeyManager) MilestonePublicKeyMappingForMilestoneIndex(msIndex milestone.Index, privateKeys []ed25519.PrivateKey, milestonePublicKeysCount int) iotago.MilestonePublicKeyMapping

MilestonePublicKeyMappingForMilestoneIndex returns a MilestonePublicKeyMapping for a certain milestone index.

func (*KeyManager) PublicKeysForMilestoneIndex added in v1.0.5

func (k *KeyManager) PublicKeysForMilestoneIndex(msIndex milestone.Index) []iotago.MilestonePublicKey

PublicKeysForMilestoneIndex returns the valid public keys for a certain milestone index.

func (*KeyManager) PublicKeysSetForMilestoneIndex added in v1.0.5

func (k *KeyManager) PublicKeysSetForMilestoneIndex(msIndex milestone.Index) iotago.MilestonePublicKeySet

PublicKeysSetForMilestoneIndex returns a set of valid public keys for a certain milestone index.

type KeyRange

type KeyRange struct {
	PublicKey  iotago.MilestonePublicKey
	StartIndex milestone.Index
	EndIndex   milestone.Index
}

KeyRange defines a public key of a milestone including the range it is valid.

Jump to

Keyboard shortcuts

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