script property
SVScript?
script
Returns the number of satoshis this input is spending. Sets the number of satoshis this input is spending.
NOTE: A transaction input must spend all the satoshis from a UTXO; change TransactionOutputs must be generated as needed, and the difference between satoshis "consumed" by and input and those "locked" by the spending transaction's outputs goes to the miner as a fee reward. Returns the scriptSig (Input Script / Unlocking Script)
Implementation
// BigInt get satoshis => _spendingAmount == null ? BigInt.zero : _spendingAmount!;
/// Sets the number of satoshis this input is spending.
///
/// *NOTE:* A transaction input *must* spend all the satoshis from a UTXO;
/// change [TransactionOutput]s must be generated as needed, and the difference
/// between satoshis "consumed" by and input and those "locked" by the
/// spending transaction's outputs goes to the miner as a fee reward.
// set satoshis(BigInt value) {
// _spendingAmount = value;
// }
/// Returns the scriptSig (Input Script / Unlocking Script)
SVScript? get script => _unlockingScriptBuilder?.getScriptSig();
Set the script that represents the parent transaction's output (UTXO)
Implementation
set script(SVScript? script) {
if (script == null) {
_unlockingScriptBuilder?.parse(SVScript());
}else{
_unlockingScriptBuilder?.parse(script);
}
}