keypairmanager

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyPairManager

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

KeyPairManager manipulates signature structures

func New

func New(env *solo.Solo) *KeyPairManager

New instantiates a key pair manager

func (*KeyPairManager) MustGetAddress

func (keyPairHandler *KeyPairManager) MustGetAddress(keyPair *ed25519.KeyPair) ledgerstate.Address

MustGetAddress gets the Address (from L1) corresponding to specified signatureScheme. Fails test on error.

func (*KeyPairManager) MustGetAgentID

func (keyPairHandler *KeyPairManager) MustGetAgentID(keyPair *ed25519.KeyPair) iscp.AgentID

MustGetAgentID gets the AgentID corresponding to specified signatureScheme. Fails test on error.

func (*KeyPairManager) NewKeyPair

func (keyPairHandler *KeyPairManager) NewKeyPair(seed ...*ed25519.Seed) *ed25519.KeyPair

NewKeyPair generates a private/public key pair. Fails test on error.

func (*KeyPairManager) NewKeyPairWithFunds

func (keyPairHandler *KeyPairManager) NewKeyPairWithFunds(seed ...*ed25519.Seed) *ed25519.KeyPair

NewKeyPairWithFunds generates a private/public key pair and assigns 1337 iota tokens to it (amount of funds is defined in utxodb.RequestFundsAmount)

func (*KeyPairManager) RequireL1Balance

func (keyPairHandler *KeyPairManager) RequireL1Balance(keyPair *ed25519.KeyPair, color colored.Color, expectedBalance uint64)

RequireL1Balance verifies if the key pair has the expected balance of the specified color in L1. Fails test if balance is not equal to expectedBalance.

Jump to

Keyboard shortcuts

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