diff --git a/clients/py/README.md b/clients/py/README.md index c9f1bdfa..acbe1477 100644 --- a/clients/py/README.md +++ b/clients/py/README.md @@ -15,7 +15,7 @@ from web3 import Web3 from sapphirepy import sapphire # Setup your Web3 provider with a signing account. -w3 = Web3(Web3.HTTPProvider('http://localhost:8545')) +w3 = Web3(Web3.HTTPProvider(sapphire.NETWORKS['sapphire-localnet'])) w3.middleware_onion.add(construct_sign_and_send_raw_middleware(account)) # Finally, wrap the provider to add Sapphire end-to-end encryption. diff --git a/clients/py/sapphirepy/sapphire.py b/clients/py/sapphirepy/sapphire.py index fa62a5e5..eaa0a5e6 100644 --- a/clients/py/sapphirepy/sapphire.py +++ b/clients/py/sapphirepy/sapphire.py @@ -7,6 +7,12 @@ from .envelope import TransactionCipher +NETWORKS = { + "sapphire": "https://sapphire.oasis.io", + "sapphire-testnet": "https://testnet.sapphire.oasis.io", + "sapphire-localnet": "http://localhost:8545", +} + # Should transactions which deploy contracts be encrypted? ENCRYPT_DEPLOYS = False