Input constructor
Input({})
Implementation
Input(
{this.hash,
this.index,
this.script,
this.sequence,
this.value,
this.prevOutScript,
this.pubkeys,
this.signatures,
this.witness,
this.prevOutType}) {
this.hasWitness = false; // Default value
if (this.hash != null && !isHash256bit(this.hash!))
throw new ArgumentError('Invalid input hash');
if (this.index != null && !isUint(this.index!, 32))
throw new ArgumentError('Invalid input index');
if (this.sequence != null && !isUint(this.sequence!, 32))
throw new ArgumentError('Invalid input sequence');
if (this.value != null && !isShatoshi(this.value!))
throw ArgumentError('Invalid ouput value');
}