Added missing base58 encoding function