masterkey

package
v0.0.0-...-4fa03f3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAlreadyKeyed denotes that this address has already been key'd
	ErrAlreadyKeyed = errors.New("account already key'ed")
)

Functions

This section is empty.

Types

type MasterKey

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

MasterKey encapslates the master key for the longy game

func NewMasterKey

func NewMasterKey(privateKey tmcrypto.PrivKey, chainID string) (MasterKey, error)

NewMasterKey is the constructor for `Key`. A new secp256k1 is generated if empty. The `chainID` is used when generating RekeyTransactions to prevent cross-chain replay attacks

func (*MasterKey) SendKeyTransaction

func (mk *MasterKey) SendKeyTransaction(
	attendeeAddr sdk.AccAddress,
	newPublicKey tmcrypto.PubKey,
	commitment util.Commitment,
) error

SendKeyTransaction generates a `RekeyMsg`, authorized by the master key. The transaction bytes generated are created using the cosmos-sdk/x/auth module's StdSignDoc.

Jump to

Keyboard shortcuts

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