def get_shared_nonce(self, script, their_pubkey, include_pubkey=False, multisig_name=None):
        """
        RPC call to get the shared secret to unblind a tx, given the receiving script and
        the pubkey of the sender (sometimes called "blinding nonce" in Liquid).
        Optionally fetch the hw signer's public blinding key also.

        Parameters
        ----------
        script : bytes
            The script for which the blinding nonce is required.

        their_pubkey : 33-bytes
            The counterparty public key.

        include_pubkey : bool, optional
            Whether to also return the wallet's public blinding key.
            Defaults to False.

        multisig_name : str, optional
            The name of any registered multisig wallet for which to fetch the blinding nonce.
            Defaults to None

        Returns
        -------
        1. include_pubkey is False
        33-bytes
            Public blinding nonce for the passed script and counterparty public key.

        2. include_pubkey is True
        dict
            Contains keys:
            shared_nonce - 32-bytes, public blinding nonce for the passed script as above.
            blinding_key - 33-bytes, public blinding key for the passed script.
        """
        params = {'script': script, 'their_pubkey': their_pubkey,
                  'include_pubkey': include_pubkey, 'multisig_name': multisig_name}
        return self._jadeRpc('get_shared_nonce', params)

        RPC call to get the shared secret to unblind a tx, given the receiving script and
        the pubkey of the sender (sometimes called "blinding nonce" in Liquid).
        Optionally fetch the hw signer's public blinding key also.

        Parameters
        ----------
        script : bytes
            The script for which the blinding nonce is required.

        their_pubkey : 33-bytes
            The counterparty public key.

        include_pubkey : bool, optional
            Whether to also return the wallet's public blinding key.
            Defaults to False.

        multisig_name : str, optional
            The name of any registered multisig wallet for which to fetch the blinding nonce.
            Defaults to None

        Returns
        -------
        1. include_pubkey is False
        33-bytes
            Public blinding nonce for the passed script and counterparty public key.

        2. include_pubkey is True
        dict
            Contains keys:
            shared_nonce - 32-bytes, public blinding nonce for the passed script as above.
            blinding_key - 33-bytes, public blinding key for the passed script.
        
electrum/plugins/jade/jadepy/jade.py