private static bool VASPIsRegistered(
            VASPCredentialsRefAndHash vaspCredentialsRefAndHash)
        {
            var(@ref, hash) = vaspCredentialsRefAndHash;

            return(!(VASPCredentialsRef.IsEmpty(@ref) && VASPCredentialsHash.IsEmpty(hash)));
        }
        public override async Task <VASPCredentialsRefAndHash> GetCredentialsRefAndHashAsync(
            VASPId vaspId,
            ConfirmationLevel minimalConfirmationLevel = default)
        {
            var vaspCredentialsRefAndHash = await base.GetCredentialsRefAndHashAsync(vaspId, minimalConfirmationLevel);

            var(@ref, hash) = vaspCredentialsRefAndHash;

            if (VASPCredentialsRef.IsEmpty(@ref) != VASPCredentialsHash.IsEmpty(hash))
            {
                throw new Exception("Smart contract returned an unexpected combination of VASP credentials reference and hash.");
            }

            return(vaspCredentialsRefAndHash);
        }