public static function sortMultisigKeys(array $pubKeys) {
        $result = array_values($pubKeys);
        usort($result, function (PublicKeyInterface $a, PublicKeyInterface $b) {
            $av = $a->getHex();
            $bv = $b->getHex();
            return $av == $bv ? 0 : $av > $bv ? 1 : -1;
        });

        return $result;
    }