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;
    }
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;
    }
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 ; }
sort public keys for multisig script

@param PublicKeyInterface[] $pubKeys
@return PublicKeyInterface[]
sort public keys for multisig script