Home Reference Source
public class | source

MiniBlockchainAccountantTreeNode

Extends:

common/trees/radix-tree/merkle-tree/Interface-Merkle-Radix-Tree-Node~InterfaceMerkleRadixTreeNode → MiniBlockchainAccountantTreeNode

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

hash: {"sha256": *}

public
public
public

value: *

Method Summary

Public Methods
public

deserializeNodeData(buffer: *, offset: *, includeEdges: *, includeHashes: *): *

public

getAccountantTreeList(list: *, bIncludeMiningReward: boolean, excludeEmpty: boolean, countOnly: *): *

public

getAddress(): *

public

getBalance(tokenId: *): number

public
public
public

isLeaf(): *

public
public

serializeNodeData(includeEdges: *, includeHashes: *): *

public

updateBalanceToken(value: *, tokenId: *): {"tokenId": *, "amount": *}

public

validateTreeNode(validateMerkleTree: *): boolean

Private Methods
private
private

_serializeBalance(balance: *): *

private

Public Constructors

public constructor() source

Public Members

public balances: * source

public hash: {"sha256": *} source

public nonce: number source

public total: number source

public value: * source

Public Methods

public deserializeNodeData(buffer: *, offset: *, includeEdges: *, includeHashes: *): * source

Params:

NameTypeAttributeDescription
buffer *
offset *
includeEdges *
includeHashes *

Return:

*

public getAccountantTreeList(list: *, bIncludeMiningReward: boolean, excludeEmpty: boolean, countOnly: *): * source

Params:

NameTypeAttributeDescription
list *
bIncludeMiningReward boolean
  • optional
  • default: false
excludeEmpty boolean
  • optional
  • default: true
countOnly *
  • optional
  • default: undefined

Return:

*

public getAddress(): * source

Return:

*

public getBalance(tokenId: *): number source

Params:

NameTypeAttributeDescription
tokenId *

Return:

number

public getBalances(): * source

Return:

*

public hasBalances(): boolean source

Return:

boolean

public isLeaf(): * source

Return:

*

public isLeafBasedOnParents(): boolean source

Return:

boolean

public serializeNodeData(includeEdges: *, includeHashes: *): * source

Params:

NameTypeAttributeDescription
includeEdges *
includeHashes *

Return:

*

public updateBalanceToken(value: *, tokenId: *): {"tokenId": *, "amount": *} source

Params:

NameTypeAttributeDescription
value *
tokenId *

Return:

{"tokenId": *, "amount": *}

public validateTreeNode(validateMerkleTree: *): boolean source

Params:

NameTypeAttributeDescription
validateMerkleTree *

Return:

boolean

Private Methods

private _deleteBalancesEmpty(): boolean source

Return:

boolean

private _serializeBalance(balance: *): * source

Params:

NameTypeAttributeDescription
balance *

Return:

*

private _serializeBalanceWEBDToken(balance: *): * source

Params:

NameTypeAttributeDescription
balance *

Return:

*