keys

package
v0.10.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: ISC Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteKeysFile

func WriteKeysFile(netParams *dagconfig.Params, path string, encryptedPrivateKeys []*EncryptedPrivateKey,
	publicKeys [][]byte, minimumSignatures uint32, ecdsa bool) error

WriteKeysFile writes a keys file with the given data

Types

type Data

type Data struct {
	PublicKeys        [][]byte
	MinimumSignatures uint32
	ECDSA             bool
	// contains filtered or unexported fields
}

Data holds all the data related to the wallet keys

func ReadKeysFile

func ReadKeysFile(netParams *dagconfig.Params, path string) (*Data, error)

ReadKeysFile returns the data related to the keys file

func (*Data) DecryptPrivateKeys

func (d *Data) DecryptPrivateKeys() ([][]byte, error)

DecryptPrivateKeys asks the user to enter the password for the private keys and returns the decrypted private keys.

type EncryptedPrivateKey

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

EncryptedPrivateKey represents an encrypted private key

func CreateKeyPairs

func CreateKeyPairs(numKeys uint32, ecdsa bool) (encryptedPrivateKeys []*EncryptedPrivateKey, publicKeys [][]byte, err error)

CreateKeyPairs generates `numKeys` number of key pairs.

func ImportKeyPairs

func ImportKeyPairs(numKeys uint32) (encryptedPrivateKeys []*EncryptedPrivateKey, publicKeys [][]byte, err error)

ImportKeyPairs imports a `numKeys` of private keys and generates key pairs out of them.

Jump to

Keyboard shortcuts

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