Class: WalletCoinView

wallet.WalletCoinView()

Wallet Coin View Represents a wallet, coin viewpoint: a snapshot of Coins objects and the HD paths for their associated keys.

Constructor

new WalletCoinView()

Create a wallet coin view.

Properties:
Name Type Description
map Object
paths Object
undo UndoCoins
Source:

Methods

(static) fromCoinView(view) → {WalletCoinView}

Instantiate wallet coin view from coin view.

Parameters:
Name Type Description
view CoinView
Source:
Returns:
Type
WalletCoinView

addPath(prevout, path) → {Path|null}

Add an HD path to the collection.

Parameters:
Name Type Description
prevout Outpoint
path Path
Source:
Returns:
Type
Path | null

addPaths(hash, path) → {Paths|null}

Add paths to the collection.

Parameters:
Name Type Description
hash Hash
path Paths
Source:
Returns:
Type
Paths | null

ensurePaths(hash) → {Coins}

Ensure existence of paths object in the collection.

Parameters:
Name Type Description
hash Hash
Source:
Returns:
Type
Coins

(private) fromCoinView(view)

Inject properties from coin view object.

Parameters:
Name Type Description
view CoinView
Source:

getPath(prevout) → {Path|null}

Get an HD path by prevout.

Parameters:
Name Type Description
prevout Outpoint
Source:
Returns:
Type
Path | null

getPathFor(input) → {Path|null}

Get a single path by input.

Parameters:
Name Type Description
input Input
Source:
Returns:
Type
Path | null

getPaths(hash) → {Paths}

Get paths.

Parameters:
Name Type Description
hash Hash
Source:
Returns:

paths

Type
Paths

hasPath(prevout) → {Boolean}

Test whether the view has a path by prevout.

Parameters:
Name Type Description
prevout Outpoint
Source:
Returns:
Type
Boolean

hasPaths(hash) → {Boolean}

Test whether the view has a paths entry.

Parameters:
Name Type Description
hash Hash
Source:
Returns:
Type
Boolean

removePath(prevout) → {Path|null}

Remove an HD path.

Parameters:
Name Type Description
prevout Outpoint
Source:
Returns:
Type
Path | null

removePaths(paths) → {Paths|null}

Remove paths from the collection.

Parameters:
Name Type Description
paths Paths
Source:
Returns:
Type
Paths | null