Constructor
new ClaimEntry(options)
Create a claim entry.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object |
- Source:
Methods
(static) fromClaim(claim, data, height) → {ClaimEntry}
Create a mempool entry from a claim.
Parameters:
Name | Type | Description |
---|---|---|
claim |
Claim | |
data |
Object | |
height |
Number | Entry height. |
- Source:
Returns:
- Type
- ClaimEntry
(private) fromClaim(claim, data, height)
Inject properties from claim.
Parameters:
Name | Type | Description |
---|---|---|
claim |
Claim | |
data |
Object | |
height |
Number |
- Source:
(private) fromOptions(options)
Inject properties from options object.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object |
- Source:
getFee() → {Amount}
Get fee.
- Source:
Returns:
- Type
- Amount
getRate() → {Rate}
Calculate fee rate.
- Source:
Returns:
- Type
- Rate
getSize() → {Number}
Get entry serialization size.
- Source:
Returns:
- Type
- Number
memUsage() → {Number}
Calculate the memory usage of a claim.
- Source:
Returns:
Usage in bytes.
- Type
- Number
(private) read(data) → {ClaimEntry}
Inject properties from serialized data.
Parameters:
Name | Type | Description |
---|---|---|
data |
Buffer |
- Source:
Returns:
- Type
- ClaimEntry
write() → {Buffer}
Serialize entry to a buffer.
- Source:
Returns:
- Type
- Buffer