This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v5.38; | |
use Bitcoin::Crypto qw(btc_transaction btc_utxo btc_prv); | |
use Bitcoin::Crypto::Util qw(to_format); | |
my $tx = btc_transaction->new; | |
btc_utxo->extract([hex => '010000000001025c86bc8650181835c3853d685cf11f6fa42a8eb9e59cb25b2de64ae33ccdb9e00000000000ffffffffeb42cef4d898b0c1d93dd0aca91ef140ba2df35d5b722a18b2d88d3c255278de0000000000ffffffff021027000000000000160014dbabdc8a9a03e3e7268e7e87f99f1af235e7bebb4594000000000000160014df212a4c455f96199371a616ee30f9cd1b55c0b402483045022100e14daab47feff38dca3acbd04eb0036a1c64efdd3c5bd34c6a06a3612543422102201816503f77b3595fc7d829bbfd82282d9bc5b37bb7771070d0f7d74381fa8ccd0121037e01f2929a9219a7862fc25848a85df69b6a8ef49b7edbebfa64a095e136897d024730440220017703b6a4b0f6cc7799b0b7cae24f1a65188d0f40c28bb118b5c56de6f050ba022029f2e64ab5a6e9b04c07ac56bd46b07068d9ffe2b41fa6ff8f958d7dfa09be0c012103f97e2a442ed2bd4cb01fbf7c2ee8d0bd30dac47478671fb3a3bbef23ca57c71000000000']); | |
$tx->add_input( | |
utxo => [[hex => 'a40c8709df98bcdc33619c937730bb15bace2133cff233730601bae352751f38'], 0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package T1 { | |
use Moo; | |
has 'f1' => ( | |
is => 'ro' | |
); | |
} | |
package TMoose { | |
use Moose; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v5.12; | |
use warnings; | |
use autodie; | |
use File::Copy qw(move); | |
# spaces.pl path/to/dir spaces_num | |
my $dir = shift; | |
my $spaces = shift() // 4; | |
my $spaces_str = ' ' x $spaces; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Only here for historic reasons. Use instead: https://metacpan.org/dist/App-Bitcoin-PaperWallet/view/bin/paper-wallet | |
use v5.24; | |
use warnings; | |
use utf8; | |
use Text::QRCode; | |
use Bitcoin::Crypto qw(btc_extprv); | |
use List::Util qw(pairs); | |
use Digest::SHA qw(sha256); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v5.20; | |
use warnings; | |
use Bitcoin::Crypto qw(btc_prv); | |
my $wif = 'KzTvd4uwnyRsFyoyTUWicxvP1HVQhTfsNLGVeyZSD6eajpTYvaRk'; | |
my $private_key = btc_prv->from_wif($wif); | |
my $message = 'I own this Bitcoin address! ' . $private_key->get_public_key->get_legacy_address; | |
my $signature = $private_key->sign_message($message); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v5.20; | |
use warnings; | |
use Bitcoin::Crypto qw(btc_prv); | |
use Math::BigInt; | |
# generated on https://learnmeabitcoin.com/technical/wif | |
my $wif = 'KzTvd4uwnyRsFyoyTUWicxvP1HVQhTfsNLGVeyZSD6eajpTYvaRk'; | |
my $private_key = btc_prv->from_wif($wif); |