Constructor
new Balance(account)
Create a balance.
Parameters:
Name | Type | Description |
---|---|---|
account |
Number |
- Source:
Methods
applyTo(balance)
Apply delta.
Parameters:
Name | Type | Description |
---|---|---|
balance |
Balance |
- Source:
format()
Inspect balance.
Parameters:
Type | Description |
---|---|
String |
- Source:
getJSON(minimalopt) → {Object}
Convert balance to a more json-friendly object.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
minimal |
Boolean |
<optional> |
false |
- Source:
Returns:
- Type
- Object
getSize() → {Number}
Calculate size.
- Source:
Returns:
- Type
- Number
(private) read(data) → {Balance}
Inject properties from serialized data.
Parameters:
Name | Type | Description |
---|---|---|
data |
Buffer |
- Source:
Returns:
- Type
- Balance
write() → {Buffer}
Serialize balance.
- Source:
Returns:
- Type
- Buffer