NAME
Bitcoin::Crypto::Transaction::Flags - Consensus flags
SYNOPSIS
use Bitcoin::Crypto::Transaction::Flags;
# full set of flags
my $all_flags = Bitcoin::Crypto::Transaction::Flags->new;
# disable some flags (those not passed are active)
my $some_flags = Bitcoin::Crypto::Transaction::Flags->new(
strict_signatures => !!0,
);
# use flags in transaction verification
$transaction->verify(flags => $some_flags);
DESCRIPTION
This is a class that represents a set of consensus rules used in transaction verification and associated systems. Each attribute of this class represents a single rule.
By default, all implemented consensus rules are active. As Bitcoin and this module progress, more rules may be added all enabled by default on arrival. Since Bitcoin is extended through softforks (implemented in a backward-compatible manner), this should rarely pose a problem with Bitcoin::Crypto code. If you want to be extra sure, see "new_empty".
INTERFACE
Attributes
p2sh
Available in the constructor.
Whether P2SH verification defined in BIP16 should be used.
writer: set_p2sh
strict_signatures
Available in the constructor.
Whether strict DER signature verification defined in BIP66 should be used.
writer: set_strict_signatures
checklocktimeverify
Available in the constructor.
Whether OP_CHECKLOCKTIMEVERIFY opcode defined in BIP65 should be used.
writer: set_checklocktimeverify
checksequenceverify
Available in the constructor.
Whether OP_CHECKSEQUENCEVERIFY opcode defined in BIP112 should be used.
writer: set_checksequenceverify
nulldummy
Available in the constructor.
Whether OP_CHECKMULTISIG nulldummy verification defined in BIP147 should be used.
writer: set_nulldummy
segwit
Available in the constructor.
Whether segwit-specific verification defined in BIP141 should be used.
writer: set_segwit
taproot
Available in the constructor.
Whether taproot-specific verification defined in BIP341 should be used.
writer: set_taproot
Methods
new
$object = $class->new(%args)
This is a standard Moo constructor, which can be used to create the object. It takes arguments specified in "Attributes".
Returns a class instance.
new_empty
$object = $class->new_empty(%args)
Same as "new", but assumes all flags unspecified in %args are disabled.