Bitcoin-Crypto

 view release on metacpan or  search on metacpan

ex/tx/multisig_redeem.pl  view on Meta::CPAN

52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# 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 )