How to use the nucypher.characters.lawful.Ursula function in nucypher

To help you get started, we’ve selected a few nucypher examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github drbh / ncipfs / ncipfs.py View on Github external
except Exception as e: # should be more specific ConnectionRefusedError, NewConnectionError, MaxRetryError not sure
            print("Automatic Mode A Public Gateway will be used as a fallback")
            self.ipfs_gateway_api = ipfsapi.connect('https://ipfs.infura.io', 5001)


        # SEEDNODE_URL = self.nucypher_network
        POLICY_FILENAME = "policy-metadata.json"

        # # FOR LOCAL RUNNING NET
        # self.ursula = Ursula.from_seed_and_stake_info(
        #     seed_uri=SEEDNODE_URL,
        #     federated_only=True,
        #     minimum_stake=0
        # )

        self.ursula =urs = Ursula.from_teacher_uri(
            teacher_uri=self.nucypher_network,
            federated_only=True,
            min_stake=0
        )
        return True