There is a code on this link (https://tezos.stackexchange.com/a/5908/8795) that decodes a packed address using code that is taken from PyTezos .
I am trying to achieve the same using smartpy inside a contract . Here is the link of smartpy code that I have been working on, https://smartpy.io/ide?cid=QmRhrsKfaBmEvogNKcN86CNTxr8Sdcy81YbG82XKMrSDBn&k=044736497db8cdf491c7
But I got stuck at last part , base58.b58encode_check(encoding + v).decode() (this is kept on todo of smartpy code). basically I am stuck on the part where the byte is being sent to b58encode_check function and then the result is being decoded.
I am trying to decode only those address that starts from tz1, tz2, tz3, tz4 and KT1 .
Can anyone helps me complete this code ? Any idea would work too ?