========= CLI Guide ========= Overview -------- This guide is an example of NuCypher's decentralized network allowing Alice to share a secret with Bob using the NuCypher Network via the ``nucypher`` CLI. It is analogous to the ``python`` example in :doc:`getting_started`. .. note:: While the example provided uses Ethereum mainnet, these steps can be followed for the Goerli Testnet with updated `geth` (``~/.ethereum/goerli/geth.ipc``) and `seed` uri (``https://gemini.nucypher.network:9151``). To better understand the commands and their options, use the ``--help`` option. Initialize Alice and Bob ------------------------ .. code:: (nucypher)$ nucypher alice init --provider (nucypher)$ nucypher bob init --provider Replace ```` with a valid node web3 node provider string, for example: - ``ipc:///home//.ethereum/geth.ipc`` - IPC Socket-based JSON-RPC server - ``https://`` - HTTP(S)-based JSON-RPC server - ``ws://:8080`` - Websocket-based JSON-RPC server Get Bob's Public Keys --------------------- .. code:: (nucypher)$ nucypher bob public-keys Output: .. code:: bob_encrypting_key ...... 0202a6be8e400acdd50db42f8b4c62241b61461a08462731efc064b86d63c7cf6f bob_verifying_key ...... 02ce770f45fecbbee0630129cce0da4fffc0c4276093bdb3f83ecf1ed824e2696c Alice Grants Access To Secret ----------------------------- .. code:: (nucypher)$ nucypher alice grant \ > --bob-verifying-key 02ce770f45fecbbee0630129cce0da4fffc0c4276093bdb3f83ecf1ed824e2696c \ > --bob-encrypting-key 0202a6be8e400acdd50db42f8b4c62241b61461a08462731efc064b86d63c7cf6f \ > --label