Verify Address in Pseudo Code
Input Address = 1PZoWjye1Xa1e1NSNYmKuxEJYGvcnJro7p
Decoded Address = decodeToBase58(Input Address)
Note: Decoded Address now represents 6069343702728890138051083510044608105707838933778380636955
Hex Encoded Address = encodeToHex(Decoded Address)
Note: Hex Encoded Address now represents F786E7A97DAFC50A6E5E82BF454847069D958B12F340431B
Encoded Address = append
00 to the prefix of
Hex Encoded Address
Note: Encoded Address now represents 00F786E7A97DAFC50A6E5E82BF454847069D958B12F340431B
Encoded Address = remove the last 8 characters
Note: Encoded Address now represents 00F786E7A97DAFC50A6E5E82BF454847069D958B12
Encoded Address = hexToBinary(Encoded Address)
Note: Encoded Address now represents 11110100010101001000010001110000011010011101100101011000000000000000
Hashed Address = sha256(sha256(Encoded Address))
Note: Hashed Address now represents F340431BECBFAC4FD36D44C506BC092B500114EBA14FA75DCF7551AC61496A67
if Input Address contains any of the following characters 0 O I l
Address is not valid
if Input Address string length is greater than 34
address_valid = false;
if input_address first character is not a number 1
address_valid = false;
return address_valid