new SighashCalculator()
- Description:
Unified sighash calculator
- Source:
Methods
(static) calculate(tx, inputIndex, prevout, sighashTypeopt, optionsopt) → {Buffer}
- Description:
Calculate sighash based on input type
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
tx |
Object | Transaction object |
||
inputIndex |
number | Input index |
||
prevout |
Object | Previous output info |
||
sighashType |
number |
<optional> |
0x01
|
Sighash type |
options |
Object |
<optional> |
{}
|
Additional options |
Returns:
32-byte sighash
- Type
- Buffer