BEGIN { if (-e $ENV{SITE}.'/lib') { use lib $ENV{SITE}.'/lib'; } } use seed qw(getsalt); seed::setseed(0x1245356); use encode qw(decode_base58f encode_base58f); use CAStore qw(cashash CASWrite); printf "v16: %s\n",unpack'H*',decode_base58f('TxG4cMYVXUM4T8GdwCyauYe4UkKYWnrkFsZVxe3KRfg'); printf "v58: %s\n",encode_base58f(pack'H*','0d347435dc89c141487f8ec816d71bdc05341b52f40b53fb6bd8469885bcee57'); printf "v58: %s\n",encode_base58f(pack'H*','0d34000000000000000000000000000000000000000000000000000000000000'); printf "len: %d\n",length('TxG4cMYVXUM4T8GdwCyauYe4UkKYWnrkFsZVxe3KRfg'); my $type = 'Txi'; my $salt = &getsalt(); printf "type: %s\n",$type; my ($addr,$pow) = cashash('SHA256','~',$salt,$type,5); printf "addr16: f%s\n",unpack'H*',$addr; printf "addr58: %s\n",encode_base58f($addr); $addr = CASWrite('CAStore',undef,$salt,$type,5); printf "addr: %s\n",$addr; exit $?; 1;