keystore

package
v0.0.0-...-499c518 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CurrentKeyMap = KeyMap{}
View Source
var MasterKeyDerivationPath = "0" // "0/1'/5'/10"

Derivation Paths

View Source
var WALLET_FILE string

Functions

func AddKeyPair

func AddKeyPair(name string, derivationPath string, extendedPrivateKey string)

AddKeyPair if an organization assigns one

func IsOwnedAddress

func IsOwnedAddress(address []byte) bool

func Open

func Open() bool

Opens up and loads the keypairs saved in this node

func SignWithExtendedKey

func SignWithExtendedKey(extendedKeyStr string, data []byte) ([]byte, error)

Sign by extended key

Types

type KeyMap

type KeyMap map[string]KeyPair

type KeyPair

type KeyPair struct {
	Name           string
	DerivationPath string
	Address        string
	PublicKey      []byte
	PrivateKey     []byte
}

func GetKeyPairByAddress

func GetKeyPairByAddress(address string) *KeyPair

Gets a keypair by address from the memory

func GetKeyPairByName

func GetKeyPairByName(name string) *KeyPair

Gets a keypair by name from the memory

func NewKeyPair

func NewKeyPair(name string) *KeyPair

NewKeyPair creates a new set of keys unrelated to an organization key hierarchy

Jump to

Keyboard shortcuts

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