Class: Details

wallet~Details(wtx, block)

Transaction Details

Constructor

new Details(wtx, block)

Create transaction details.

Parameters:
Name Type Description
wtx TXRecord
block BlockMeta
Source:

Methods

getDepth() → {Number}

Calculate confirmations.

Source:
Returns:
Type
Number

getFee() → {Amount}

Calculate fee. Only works if wallet owns all inputs. Returns 0 otherwise.

Source:
Returns:
Type
Amount

getRate(fee) → {Rate}

Calculate fee rate. Only works if wallet owns all inputs. Returns 0 otherwise.

Parameters:
Name Type Description
fee Amount
Source:
Returns:
Type
Rate

(private) init()

Initialize transaction details.

Source:

setInput(i, path, coin)

Add necessary info to input member.

Parameters:
Name Type Description
i Number
path Path
coin Coin
Source:

setOutput(i, path)

Add necessary info to output member.

Parameters:
Name Type Description
i Number
path Path
Source:

toJSON() → {Object}

Convert details to a more json-friendly object.

Source:
Returns:
Type
Object