Lengkap

Validation for Bitcoin Cash and Monero in Perl 5

Given a XMR or BCH address, I need a function that takes that address as input and returns true if the address is valid or false if it is not.

Simple regex would *not* work, I need offline crypto validation. I don't need to know if the address have ever been used or created. I don't need to know if the address has funds in it.

If you need to use Perl libraries, ideally if they are included as a package in Debian 9/10 that's ok. Compiling libraries from CPAN is to be avoided. Digest::Keccak is available.

Skeleton of the program would be:

----

#!/usr/bin/perl

use strict;

use warnings;

sub is_valid_xmr { ... }

sub is_valid_bch { ... }

my $valid_xmr = "44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A";

my $invalid_xmr = "44ABFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A";

# cashaddr

my $valid_bch = "qrm73ws0e4hq0u890v33u7smcd3qjy7yaspz9v42qh";

my $invalid_bch = "qrm73ws0e4hq1u890v33u7smcd3qjy7yaspz9v42qh";

# Will print "Valid XMR address"

if (is_valid_xmr($valid_xmr)) { print "Valid XMR address"; } else { print "Invalid XMR address"; }

# Will print "Invalid XMR address"

if (is_valid_xmr($invalid_xmr)) { print "Valid XMR address"; } else { print "Invalid XMR address"; }

# Will print "Valid BCH address"

if (is_valid_bch($valid_bch)) { print "Valid BCH address"; } else { print "Invalid BCH address"; }

# Will print "Invalid BCH address"

if (is_valid_bch($invalid_bch)) { print "Valid BCH address"; } else { print "Invalid BCH address"; }

Kemahiran: Perl, Kejuruteraan Perisian, Bitcoin, Linux

Lihat lagi: work flash given simple example, simple php empty field form validation, bitcoin cash mining pool list, best bitcoin cash pool, best bitcoin cash mining pool, bitcoin cash pools, bitcoin cash pool distribution, bitcoin cash miner, bitcoin cash pool list, bitcoin cash fork, localbitcoins bitcoin cash, bitcoin transaction generator v1.5 download, buy bitcoin cash with credit card, acheter bitcoin cash, bitcoin cash mining calculator, bitcoin cash js, insight api bitcoin cash, bitpay insight bitcoin cash, bitcoin cash price chart, bitcoin cash to usd

Tentang Majikan:
( 1 ulasan ) Trieste, Italy

ID Projek: #23577866

Dianugerahkan kepada:

vsafron

Hi, I have a pure Perl script (no libs) which verify BCH address format accordingly current BCH address spec. See the output below including your samples. XMR validation works for standard XMR (95-char) addresses only. Lagi

€40 EUR dalam 7 hari
(17 Ulasan)
4.2

6 pekerja bebas membida secara purata €24 untuk pekerjaan ini

sshyam24

Hello, Hope you are doing great today, First of all, thank you for the wonderful opportunity. I would love to further discussion this project and your exact requirement, I am a pride of my work on being professional Lagi

€39 EUR dalam sehari
(8 Ulasan)
4.0
turanskiserhii02

Hello, I have gone through the brief details mentioned on the job. I have done multiple jobs with Javascript, React,Angular,node.js, WordPresss,Python, laravel, Software Architecture which are the skills required to ge Lagi

€19 EUR dalam 7 hari
(2 Ulasan)
2.3
rodrigosalonga

Hi, Do you need a community marketing manager for your project? I have 3 years of experience doing multiple tasks on an ICO and Crypto Exchange Platform project. Below are some of the services that I can offer you. Lagi

€19 EUR dalam 7 hari
(0 Ulasan)
0.0
nesterovkliment3

Its so interesting for me, Let me know yr detail and fix it ASAP. Thanks for your attention. Have a good time.

€19 EUR dalam 7 hari
(0 Ulasan)
0.0
umagon

Hi there, I can validate bch and xmr addresses using python, not perl. As far as bch addresses are concerned I will assume it has a bitcoincash: prefix, since it's necessary for hashing the checksum. I will also use op Lagi

€8 EUR dalam sehari
(1 Ulasan)
0.0