def sign_identity(self, identity, curve, challenge, index=0):
        """
        RPC call to authenticate the given identity through a challenge.
        Supports RFC6979.
        Returns the signature and the associated SLIP-0013 pubkey
        NOTE: this api returns 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

        challenge : bytes
            Challenge bytes to sign

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

        Returns
        -------
        dict
            Contains keys:
            pubkey - 65-bytes, the uncompressed SLIP-0013 public key, consistent with
            'get_identity_pubkey' with 'key_type=slip-0013'
            signature - 65-bytes, RFC6979 deterministic signature, prefixed with 0x00
        """
        params = {'identity': identity, 'curve': curve, 'index': index, 'challenge': challenge}
        return self._jadeRpc('sign_identity', params)

        RPC call to authenticate the given identity through a challenge.
        Supports RFC6979.
        Returns the signature and the associated SLIP-0013 pubkey
        NOTE: this api returns 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

        challenge : bytes
            Challenge bytes to sign

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

        Returns
        -------
        dict
            Contains keys:
            pubkey - 65-bytes, the uncompressed SLIP-0013 public key, consistent with
            'get_identity_pubkey' with 'key_type=slip-0013'
            signature - 65-bytes, RFC6979 deterministic signature, prefixed with 0x00
        
electrum/plugins/jade/jadepy/jade.py