Class: ContractState

ContractState(network)

new ContractState(network)

Parameters:
Name Type Description
network Network
Source:

Members

bids :BufferMap.<BufferSet>

Type:
  • BufferMap.<BufferSet>
Source:

opens :BufferMap.<BufferSet>

Type:
  • BufferMap.<BufferSet>
Source:

refs :BufferMap.<Number>

Type:
  • BufferMap.<Number>
Source:

reveals :BufferMap.<BufferSet>

Type:
  • BufferMap.<BufferSet>
Source:

updates :BufferMap.<BufferSet>

Type:
  • BufferMap.<BufferSet>
Source:

Methods

addBid(nameHash, hash) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
hash Hash
Source:
Returns:
Type
ContractState

addMap(map, nameHash, hash) → {ContractState}

Parameters:
Name Type Description
map BufferMap.<BufferSet>
nameHash Hash
hash Hash
Source:
Returns:
Type
ContractState

addName(nameHash) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
Source:
Returns:
Type
ContractState

addOpen(nameHash, hash) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
hash Hash
Source:
Returns:
Type
ContractState

addReveal(nameHash, hash) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
hash Hash
Source:
Returns:
Type
ContractState

addUpdate(nameHash, hash) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
hash Hash
Source:
Returns:
Type
ContractState

dereference(nameHash) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
Source:
Returns:
Type
ContractState

handleBidding(nameHash, items) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
items BufferSet
Source:
Returns:
Type
ContractState

handleClosed(nameHash, items) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
items BufferSet
Source:
Returns:
Type
ContractState

handleExpired(nameHash, items) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
items BufferSet
Source:
Returns:
Type
ContractState

handleOpen(nameHash, items) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
items BufferSet
Source:
Returns:
Type
ContractState

handleReveal(nameHash, items) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
items BufferSet
Source:
Returns:
Type
ContractState

hasName(nameHash) → {Boolean}

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

hasNames(tx) → {Boolean}

Parameters:
Name Type Description
tx TX
Source:
Returns:
Type
Boolean

invalidate(height, hardened) → {BufferSet}

Invalidate transactions in the mempool.

Parameters:
Name Type Description
height Number
hardened Boolean
Source:
Returns:
  • list of invalidated tx hashes.
Type
BufferSet

merge(view) → {ContractState}

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

reference(nameHash) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
Source:
Returns:
Type
ContractState

removeBid(nameHash, hash) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
hash Hash
Source:
Returns:
Type
ContractState

removeMap(map, nameHash, hash) → {ContractState}

Parameters:
Name Type Description
map BufferMap.<BufferSet>
nameHash Hash
hash Hash
Source:
Returns:
Type
ContractState

removeName(nameHash) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
Source:
Returns:
Type
ContractState

removeOpen(nameHash, hash) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
hash Hash
Source:
Returns:
Type
ContractState

removeReveal(nameHash, hash) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
hash Hash
Source:
Returns:
Type
ContractState

removeUpdate(nameHash, hash) → {ContractState}

Parameters:
Name Type Description
nameHash Hash
hash Hash
Source:
Returns:
Type
ContractState

toSet(map, nameHash, items) → {ContractState}

Parameters:
Name Type Description
map BufferMap.<BufferSet>
nameHash Hash
items BufferSet
Source:
Returns:
Type
ContractState

track(tx, view) → {ContractState}

Parameters:
Name Type Description
tx TX
view CoinView
Source:
Returns:
Type
ContractState

untrack(tx) → {ContractState}

Parameters:
Name Type Description
tx TX
Source:
Returns:
Type
ContractState