Bitcoin-Crypto
view release on metacpan or search on metacpan
ex/tx/multisig_redeem.pl view on Meta::CPAN
525354555657585960616263646566676869707172# signatures), the transaction is ready
$tx
->verify;
say
$tx
->
dump
;
say
to_format [
hex
=>
$tx
->to_serialized];
__END__
=head1 P2MS redeem transaction example
This transaction redeems coins locked in P2WSH output produced in
C<tx/multisig_create.pl> example. The exact redeem script must be provided and
two out of three private keys must be used to sign.
Signing requires providing C<redeem_script> argument with the script object, as
well as C<multisig> argument in format C<[$this_signature, $total_signatures]>.
Both private keys are used to sign the same C<signing_index>, but with
different C<multisig> argument.
This code was used to produce testnet transaction:
( run in 1.015 second using v1.01-cache-2.11-cpan-55f5a4728d2 )