Constructor
new UndoCoins()
Create undo coins.
Properties:
Name | Type | Description |
---|---|---|
items |
Array.<UndoCoin> |
- Source:
Methods
(static) fromRaw(data) → {UndoCoins}
Instantiate undo coins from serialized data.
Parameters:
Name | Type | Description |
---|---|---|
data |
Buffer |
- Source:
Returns:
- Type
- UndoCoins
apply(view, prevout)
Re-apply undo coins to a view, effectively unspending them.
Parameters:
Name | Type | Description |
---|---|---|
view |
CoinView | |
prevout |
Outpoint |
- Source:
commit() → {Buffer}
Render the undo coins.
- Source:
Returns:
- Type
- Buffer
(private) fromRaw(data) → {UndoCoins}
Inject properties from serialized data.
Parameters:
Name | Type | Description |
---|---|---|
data |
Buffer |
- Source:
Returns:
- Type
- UndoCoins
getSize() → {Number}
Calculate undo coins size.
- Source:
Returns:
- Type
- Number
isEmpty() → {Boolean}
Test whether the undo coins have any members.
- Source:
Returns:
- Type
- Boolean
push(coin) → {Number}
Push coin entry onto undo coin array.
Parameters:
Name | Type | Description |
---|---|---|
coin |
CoinEntry |
- Source:
Returns:
- Type
- Number
toRaw() → {Buffer}
Serialize all undo coins.
- Source:
Returns:
- Type
- Buffer