keystore

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2019 License: Unlicense, ISC Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Filename = "wallet.bin"
)

A bunch of constants

Variables

View Source
var (
	ErrAddressNotFound  = errors.New("address not found")
	ErrAlreadyEncrypted = errors.New("private key is already encrypted")
	ErrChecksumMismatch = errors.New("checksum mismatch")
	ErrDuplicate        = errors.New("duplicate key or address")
	ErrMalformedEntry   = errors.New("malformed entry")
	ErrWatchingOnly     = errors.New("keystore is watching-only")
	ErrLocked           = errors.New("keystore is locked")
	ErrWrongPassphrase  = errors.New("wrong passphrase")
)

Possible errors when dealing with key stores.

View Source
var (
	// VersArmory is the latest version used by Armory.
	VersArmory = version{1, 35, 0, 0}
	// Vers20LastBlocks is the version where key store files now hold
	// the 20 most recently seen block hashes.
	Vers20LastBlocks = version{1, 36, 0, 0}
	// VersUnsetNeedsPrivkeyFlag is the bugfix version where the
	// createPrivKeyNextUnlock address flag is correctly unset
	// after creating and encrypting its private key after unlock.
	// Otherwise, re-creating private keys will occur too early
	// in the address chain and fail due to encrypting an already
	// encrypted address.  Key store versions at or before this
	// version include a special case to allow the duplicate
	// encrypt.
	VersUnsetNeedsPrivkeyFlag = version{1, 36, 1, 0}
	// VersCurrent is the current key store file version.
	VersCurrent = VersUnsetNeedsPrivkeyFlag
)

Various versions.

Functions

This section is empty.

Types

type BlockIterator

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

BlockIterator allows for the forwards and backwards iteration of recently seen blocks.

func (*BlockIterator) BlockStamp

func (it *BlockIterator) BlockStamp() BlockStamp

BlockStamp is

func (*BlockIterator) Next

func (it *BlockIterator) Next() bool

Next is

func (*BlockIterator) Prev

func (it *BlockIterator) Prev() bool

Prev is

type BlockStamp

type BlockStamp struct {
	Hash   *chainhash.Hash
	Height int32
}

BlockStamp defines a block (by height and a unique hash) and is used to mark a point in the blockchain that a key store element is synced to.

type FullSync

type FullSync struct{}

FullSync is a type representing an address that is in sync with the recently seen blocks.

func (FullSync)