accountmanager

package
v0.0.0-...-afe9103 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultAccountManagerFile = "/.cookiemonster/accountmanager.json"
	DefaultAccountManager     AccountManager
	MasterKey                 = "master"
)

Functions

func AddMasterKey

func AddMasterKey(privKeyBz []byte) error

func DumpAccountManagerToFile

func DumpAccountManagerToFile(am *AccountManager, fileLocation string) error

Types

type AccountManager

type AccountManager struct {
	MasterKey     []byte
	NumOfAccount  int
	MasterAddress string
}

func LoadAccountManagerFromFile

func LoadAccountManagerFromFile(fileLocation string) (*AccountManager, error)

func MustLoadAccountManagerFromFile

func MustLoadAccountManagerFromFile(fileDir string) *AccountManager

func (*AccountManager) CreateNewPrivKeyForAddress

func (am *AccountManager) CreateNewPrivKeyForAddress(Address string) cryptotypes.PrivKey

func (*AccountManager) LoadMasterKey

func (am *AccountManager) LoadMasterKey()

func (*AccountManager) RegisterAccountForAddress

func (am *AccountManager) RegisterAccountForAddress(Address string) (sdk.AccAddress, error)

import

type AccountManagerLoader

type AccountManagerLoader struct {
	MasterKeyHex string
	NumOfAccount int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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