Documentation
¶
Index ¶
- Constants
- Variables
- type BlockIterator
- type BlockStamp
- type FullSync
- type PartialSync
- type PubKeyAddress
- type ScriptAddress
- type Store
- func (s *Store) ActiveAddresses() map[util.Address]WalletAddress
- func (s *Store) Address(a util.Address) (WalletAddress, error)
- func (s *Store) ChangeAddress(bs *BlockStamp) (util.Address, error)
- func (s *Store) ChangePassphrase(new []byte) error
- func (s *Store) CreateDate() int64
- func (s *Store) ExportWatchingWallet() (*Store, error)
- func (s *Store) ExtendActiveAddresses(n int) ([]util.Address, error)
- func (s *Store) ImportPrivateKey(wif *util.WIF, bs *BlockStamp) (util.Address, error)
- func (s *Store) ImportScript(script []byte, bs *BlockStamp) (util.Address, error)
- func (s *Store) IsLocked() bool
- func (s *Store) LastChainedAddress() util.Address
- func (s *Store) Lock() (err error)
- func (s *Store) MarkDirty()
- func (s *Store) Net() *netparams.Params
- func (s *Store) NewIterateRecentBlocks() *BlockIterator
- func (s *Store) NextChainedAddress(bs *BlockStamp) (util.Address, error)
- func (s *Store) ReadFrom(r io.Reader) (n int64, err error)
- func (s *Store) SetSyncStatus(a util.Address, ss SyncStatus) error
- func (s *Store) SetSyncedWith(bs *BlockStamp)
- func (s *Store) SortedActiveAddresses() []WalletAddress
- func (s *Store) SyncedTo() (hash *chainhash.Hash, height int32)
- func (s *Store) Unlock(passphrase []byte) error
- func (s *Store) WriteIfDirty() error
- func (s *Store) WriteTo(w io.Writer) (n int64, err error)
- type SyncStatus
- type Unsynced
- type WalletAddress
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.
type BlockStamp ¶
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.