def config(): """Get Connection parameters from env or command line args.""" parser = argparse.ArgumentParser() parser.add_argument("--endpoint", **environ_or_required("ARIES_ENDPOINT")) parser.add_argument("--their-verkey", **environ_or_required("ARIES_ENDPOINT_KEY")) parser.add_argument("--my-verkey", **environ_or_required("ARIES_MY_PUBLIC_KEY")) parser.add_argument("--my-sigkey", **environ_or_required("ARIES_MY_PRIVATE_KEY")) parser.add_argument("--port", default=os.environ.get("PORT", 3000)) args = parser.parse_args() return ( Keys(args.my_verkey, args.my_sigkey), Target(endpoint=args.endpoint, their_vk=args.their_verkey), args, )
def bob_keys(): """Bob's keys.""" return Keys(*crypto.create_keypair())
def alice_keys(): """Alice's keys.""" return Keys(*crypto.create_keypair())
def test_keys(): """Generate keys for test end of connection.""" yield Keys(*crypto.create_keypair())
def example_keys(): """Generate keys for example end of connection.""" yield Keys(*crypto.create_keypair())
def alice_keys(): """Generate alice's keys.""" yield Keys(*crypto.create_keypair())
def bob_keys(): """Generate bob's keys.""" yield Keys(*crypto.create_keypair())
def generate_test_info(seed=None): """Generate connection information from seed.""" test_keys = Keys(*crypto.create_keypair(seed)) test_did = crypto.bytes_to_b58(test_keys.verkey[:16]) return ConnectionInfo(test_keys, test_did)