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(height) → {Number}

Calculate confirmations.

Parameters:
Name Type Description
height Number
Source:
Returns:
Type
Number

getFee() → {AmountValue}

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

Source:
Returns:
Type
AmountValue

getJSON(networkopt, nullable, heightopt) → {Object}

Convert details to a more json-friendly object.

Parameters:
Name Type Attributes Description
network Network | NetworkType <optional>
<nullable>
height Number <optional>
Source:
Returns:
Type
Object

getRate(fee) → {Rate}

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

Parameters:
Name Type Description
fee AmountValue
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