def get_identity_shared_key(self, identity, curve, their_pubkey, index=0):
        """
        RPC call to fetch a SLIP-0017 shared ecdh key for the identity and counterparty public key.
        NOTE: this api takes an uncompressed public key

        Parameters
        ----------
        identity : str
            Identity string to format and sign. For example ssh://satoshi@bitcoin.org

        curve : str
            Name of curve to use - currently only 'nist256p1' is supported

        their_pubkey : 65-bytes
            The counterparty's uncompressed public key

        index : int, optional
            Index number (if require multiple keys/sigs per identity)
            Defaults to 0

        Returns
        -------
        32-bytes
            The shared ecdh key for the given identity and cpty public key
            Consistent with 'get_identity_pubkey' with 'key_type=slip-0017'
        """
        params = {'identity': identity, 'curve': curve, 'index': index,
                  'their_pubkey': their_pubkey}
        return self._jadeRpc('get_identity_shared_key', params)

        RPC call to fetch a SLIP-0017 shared ecdh key for the identity and counterparty public key.
        NOTE: this api takes an uncompressed public key

        Parameters
        ----------
        identity : str
            Identity string to format and sign. For example ssh://satoshi@bitcoin.org

        curve : str
            Name of curve to use - currently only 'nist256p1' is supported

        their_pubkey : 65-bytes
            The counterparty's uncompressed public key

        index : int, optional
            Index number (if require multiple keys/sigs per identity)
            Defaults to 0

        Returns
        -------
        32-bytes
            The shared ecdh key for the given identity and cpty public key
            Consistent with 'get_identity_pubkey' with 'key_type=slip-0017'
        
electrum/plugins/jade/jadepy/jade.py