Input.expandInput constructor

Input.expandInput(Uint8List scriptSig)

Implementation

factory Input.expandInput(Uint8List scriptSig) {
  if (_isP2PKHInput(scriptSig) == false) {
    return new Input(prevOutScript: scriptSig);
  }
  P2PKH p2pkh = new P2PKH(data: new P2PKHData(input: scriptSig));
  return new Input(
    prevOutScript: p2pkh.data.output,
    pubkeys: [p2pkh.data.pubkey],
    signatures: [p2pkh.data.signature]);
}