From f16beadc9e5477718334cfbc5033ece0a0dd9c87 Mon Sep 17 00:00:00 2001 From: spivachuk Date: Mon, 2 Oct 2017 19:28:02 +0300 Subject: [PATCH] INDY-830: Removed Evernym and Sovrin brands (#351) * INDY-830: Removed Evernym and Sovrin brands - Removed Evernym and Sovrin brands from code and documentation. TODO: - Remove Evernym and Sovrin brands from code related to node upgrade (where necessary). - Provide migration scripts for node and client. * Merge branch 'master' of https://github.com/spivachuk/sovrin-node into rebranding # Conflicts: # docs/Indy_Running_Locally.md * Updated indy-plenum-dev and indy-anoncreds-dev dependencies. * - Removed Evernym and Sovrin brands from code related to node upgrade. - Wrapped the user into a variable in ubuntu.dockerfile. - Corrected sovrin-environments URL in getting-started.md. - Removed an outdated reference to the build status from README.md. * Corrected the URL of the APT repository containing python3-charm-crypto and the key for this repository in ubuntu.dockerfile. * Rolled back an accidental method renaming. * INDY-830: Implemented node migration for rebranding sovrin to indy * INDY-830: Corrected migration script for rebranding sovrin to indy * INDY-830: Corrected versions in migration script name * INDY-830: Fixed a bug with use of "~" for referencing indy user home directory in a script being executed on behalf of root user * INDY-830: Fixed a bug with use of elements of os.listdir result as absolute paths * INDY-830: Updated indy-anoncreds dependency * - Added missed scripts to setup.py. - Made corresponding corrections in postinst_node. * - Added dependency from "at" deb package to "indy-node" deb package creation command. - Corrected restart_sovrin_node script (being used for rebranding upgrade). - Removed indy_node_control.service file from sources (now it is generated on the fly). * Corrected restart_sovrin_node script (being used for rebranding upgrade). * Corrected restart_sovrin_node script (being used for rebranding upgrade) once again. * Added starting atd service to restart_sovrin_node script (being used for rebranding upgrade). * INDY-830: Added logging to file for node control tool - Added logging to file in start_node_control_tool.py. - Made start_node_control_tool logic executable only if the script is run as an entry point. * Corrected complete_rebranding_upgrade script. * - Removed logging to file for node control tool (its log is accessible in systemd journal). - Renamed the script "start_node_control_tool.py" to "start_node_control_tool". * Removed hashbang from node_control_tool.py. * Perform renaming to fix diff. * Perform renaming to fix diff once again. * INDY-830: Wallet migration for rebranding - Implemented wallet migration for rebranding. - Extracted wallet raw updaters from Wallet class. * INDY-830: Removed redundant action from WalletRawUpdaterToVersion2 * Fixed a bug in WalletRawUpdaterToVersion1 made when extracting updaters from Wallet class. * INDY-830: Made wallet migrations more resilient * INDY-830: Test restoring wallet before rebranding - Added a test verifying restoration of a wallet with GST stuff before rebranding. - Renamed the module with the test verifying restoration of a wallet with GST stuff before renaming Link to Connection. - Updated Wallet class version in the test wallet file "tmp_wallet_restore_issue". - Removed the useless file "test.log". * INDY-830: Made a minor correction in WalletRawUpdaterToVersion2 * Made corrections after merge with changes from master. * Corrected the description of indy-node-control systemd service. * Made corrections after merge with changes from master. * Updated versions in the last migration script for the node. * Updated indy-plenum-dev dependency. --- .flake8 | 6 +- .travis.yml | 4 +- Jenkinsfile | 6 +- Jenkinsfile.cd | 6 +- Jenkinsfile.ci | 6 +- README.md | 4 +- .../__init__.py | 0 .../test/__init__.py | 0 .../test/client.py | 0 .../test/conftest.py | 2 +- .../test/constants.py | 0 .../test/test_remove_add_roles.py | 2 +- build-scripts/ubuntu-1604/build-indy-node.sh | 1 + build-scripts/ubuntu-1604/postinst_node | 85 +++---- build-scripts/ubuntu-1604/preinst_node | 4 +- ci/ubuntu.dockerfile | 27 +-- cluster-simulation.md | 24 +- data/migrations/README.md | 2 +- data/migrations/deb/1_0_96_to_1_0_97.py | 4 +- data/migrations/deb/1_1_144_to_1_1_145.py | 2 +- data/migrations/deb/1_1_150_to_1_1_151.py | 40 ++++ .../deb/disabled_1_0_97_to_1_0_96.py | 4 +- .../migrations/deb/helper_1_0_96_to_1_0_97.py | 6 +- data/sovrin_node_control.service | 17 -- docker-files/Dockerfile | 10 +- ...n-cli-image.sh => build-indy-cli-image.sh} | 18 +- .../{sovrin_config.py => indy_config.py} | 2 +- ...ing_Locally.md => Indy_Running_Locally.md} | 68 +++--- ...gents-in-sovrin.png => agents-in-indy.png} | Bin examples/simple_client.py | 6 +- examples/simple_node.py | 4 +- examples/upstart-example.conf | 6 +- getting-started.md | 136 +++++------ indy_client/__init__.py | 12 + .../agent/__init__.py | 0 {sovrin_client => indy_client}/agent/agent.py | 20 +- .../agent/agent_cli.py | 4 +- .../agent/agent_issuer.py | 8 +- .../agent/agent_net.py | 2 +- .../agent/agent_prover.py | 6 +- .../agent/agent_verifier.py | 6 +- .../agent/backend.py | 0 .../agent/caching.py | 2 +- .../agent/constants.py | 0 .../agent/endpoint.py | 0 .../agent/exception.py | 0 .../agent/helper.py | 4 +- .../agent/jsonpickle_util.py | 0 .../agent/msg_constants.py | 0 .../agent/run_agent.py | 6 +- .../agent/runnable_agent.py | 6 +- .../agent/walleted.py | 64 +++--- .../agent/walleted_agent.py | 26 +-- .../anon_creds/__init__.py | 0 .../anon_creds/constant.py | 0 .../anon_creds/indy_issuer.py | 14 +- .../anon_creds/indy_prover.py | 8 +- .../anon_creds/indy_public_repo.py | 8 +- .../anon_creds/indy_verifier.py | 8 +- .../cli/__init__.py | 0 {sovrin_client => indy_client}/cli/cli.py | 138 +++++------ {sovrin_client => indy_client}/cli/command.py | 48 ++-- .../cli/constants.py | 26 +-- .../cli/genesisTxns.py | 2 +- {sovrin_client => indy_client}/cli/helper.py | 2 +- .../client/__init__.py | 0 .../client/client.py | 10 +- .../client/lib/Cargo.lock | 0 .../client/lib/Cargo.toml | 0 .../client/lib/src/constants.rs | 0 .../client/lib/src/internal/mod.rs | 0 .../client/lib/src/lib.rs | 0 .../client/lib/src/strutil.rs | 0 .../client/lib/src/tests/mod.rs | 0 .../client/wallet/__init__.py | 0 .../client/wallet/attribute.py | 6 +- .../client/wallet/connection.py | 4 +- .../client/wallet/node.py | 4 +- .../client/wallet/pool_config.py | 6 +- .../client/wallet/trustAnchoring.py | 2 +- .../client/wallet/upgrade.py | 6 +- .../client/wallet/wallet.py | 214 ++++++++++++------ .../persistence/__init__.py | 0 .../persistence/client_req_rep_store.py | 0 .../persistence/client_req_rep_store_file.py | 2 +- .../persistence/client_txn_log.py | 2 +- .../script_helper.py | 6 +- .../test/__init__.py | 0 indy_client/test/__main__.py | 3 + .../test/agent/__init__.py | 0 .../test/agent/acme.py | 20 +- .../test/agent/base_agent.py | 16 +- .../test/agent/conftest.py | 34 +-- .../test/agent/faber.py | 16 +- .../test/agent/helper.py | 8 +- .../test/agent/messages.py | 6 +- .../test/agent/mock_backend_system.py | 2 +- .../test/agent/test_accept_invitation.py | 2 +- .../test/agent/test_anoncreds_agent.py | 2 +- .../test/agent/test_anoncreds_claim.py | 8 +- .../agent/test_anoncreds_claim_request.py | 8 +- .../test/agent/test_anoncreds_proof.py | 8 +- .../test_anoncreds_send_proof_request.py | 2 +- .../test/agent/test_connection.py | 2 +- .../test/agent/test_general_use_case.py | 16 +- .../test/agent/test_owner_identifiers.py | 2 +- .../test/agent/test_owner_request_handling.py | 0 .../test/agent/test_ping.py | 4 +- .../test/agent/test_startup_shutdown.py | 2 +- .../test/agent/test_walleted_agent.py | 4 +- .../test/agent/thrift.py | 14 +- .../test/anon_creds/__init__.py | 0 .../test/anon_creds/conftest.py | 0 .../test/anon_creds/test_anoncreds_usage.py | 14 +- .../test/anon_creds/test_public_repo.py | 6 +- .../test/cli/__init__.py | 0 .../test/cli/conftest.py | 56 ++--- .../test/cli/constants.py | 4 +- .../test/cli/helper.py | 28 +-- ...test_accept_invitation_base58_as_pubkey.py | 6 +- .../test/cli/test_add_genesis_transaction.py | 14 +- .../test/cli/test_agent_cli.py | 10 +- .../test/cli/test_agent_startup.py | 10 +- .../test/cli/test_agent_wallet_persistence.py | 14 +- .../test/cli/test_change_key.py | 0 .../test/cli/test_cli_exit.py | 2 +- .../test/cli/test_command_reg_ex.py | 26 +-- .../test/cli/test_connect_env.py | 26 +-- .../test/cli/test_merge_invitation.py | 6 +- .../test/cli/test_new_identifier.py | 0 .../test/cli/test_node.py | 2 +- .../test/cli/test_node_demotion.py | 4 +- .../test/cli/test_node_suspension.py | 4 +- .../test/cli/test_nym.py | 8 +- .../test/cli/test_nym_suspension.py | 4 +- .../test/cli/test_pool_config.py | 4 +- .../test/cli/test_pool_upgrade.py | 8 +- .../test/cli/test_pool_upgrade_validation.py | 6 +- .../test/cli/test_proof_request.py | 0 .../test_restore_wallet_before_rebranding.py | 18 ++ ...llet_before_renaming_link_to_connection.py | 2 +- .../test/cli/test_restore_wallet_from_mgl.py | 2 +- .../test/cli/test_save_and_restore_wallet.py | 4 +- .../test/cli/test_send_attrib_validation.py | 6 +- .../test/cli/test_send_claim_def.py | 4 +- .../test/cli/test_send_get_attr.py | 4 +- .../test/cli/test_send_get_claim_def.py | 4 +- .../test/cli/test_send_get_nym_validation.py | 8 +- .../test/cli/test_send_get_schema.py | 6 +- .../test/cli/test_send_node_validation.py | 6 +- .../test/cli/test_send_nym_validation.py | 6 +- .../test/cli/test_send_schema.py | 2 +- .../test/cli/test_show_proof_multi_claim.py | 6 +- .../test/cli/test_tutorial.py | 18 +- .../test/cli/test_tutorial_manual.py | 30 +-- .../test_z_accept_invitation_hex_as_pubkey.py | 6 +- indy_client/test/cli/tmp_wallet_restore_issue | 1 + indy_client/test/cli/wallet_before_rebranding | 1 + .../wallet_before_renaming_link_to_connection | 0 .../test/cli/wallet_from_minimal_go_live | 0 .../test/client/TestClient.py | 6 +- .../test/client/__init__.py | 0 .../test/client/wallet/test_link_obj.py | 2 +- .../test/conftest.py | 22 +- .../test/constants.py | 0 {sovrin_client => indy_client}/test/helper.py | 10 +- .../test/scripts/__init__.py | 0 .../test/scripts/test_reset_client.py | 6 +- .../test/state_proof/__init__.py | 0 .../test_state_proof_for_get_requests.py | 10 +- .../test/cli => indy_client/test}/test.log | 0 .../test/test_nym_attrib.py | 18 +- .../test/training/__init__.py | 0 .../test/training/getting_started.py | 36 +-- .../test/training/getting_started_future.py | 28 +-- .../training/test_getting_started_guide.py | 4 +- {sovrin_client => indy_client}/test/waits.py | 0 .../utils/__init__.py | 0 .../utils/user_scenarios.py | 8 +- {sovrin_common => indy_common}/__init__.py | 0 {sovrin_common => indy_common}/auth.py | 4 +- {sovrin_common => indy_common}/config.py | 6 +- {sovrin_common => indy_common}/config_util.py | 8 +- {sovrin_common => indy_common}/constants.py | 36 +-- indy_common/did_method.py | 5 + {sovrin_common => indy_common}/exceptions.py | 0 .../generates_request.py | 0 {sovrin_common => indy_common}/identity.py | 8 +- {sovrin_common => indy_common}/init_util.py | 2 +- indy_common/plugin_helper.py | 69 ++++++ .../pool/__init__.py | 0 {sovrin_common => indy_common}/pool/pool.py | 0 {sovrin_common => indy_common}/roles.py | 0 .../serialization.py | 0 {sovrin_common => indy_common}/setup_util.py | 4 +- .../state/__init__.py | 0 .../state/domain.py | 4 +- .../strict_types.py | 0 .../test/__init__.py | 0 indy_common/test/__main__.py | 3 + .../test/conftest.py | 6 +- {sovrin_common => indy_common}/test/helper.py | 0 .../test/test_roles.py | 4 +- .../test/test_strict_types.py | 2 +- indy_common/test/test_transactions.py | 58 +++++ .../test/test_util.py | 2 +- .../test/types/__init__.py | 0 .../test/types/test_attrib.py | 4 +- .../test/types/test_attrib_schema.py | 2 +- .../test/types/test_claim_def_get_schema.py | 2 +- .../test/types/test_claim_def_sub_schema.py | 2 +- .../test/types/test_discl_schema.py | 2 +- .../test/types/test_get_attrib_schema.py | 2 +- .../test/types/test_get_nym_schema.py | 2 +- .../test/types/test_get_schema_schema.py | 2 +- .../test/types/test_pool_config_schema.py | 2 +- .../test/types/test_pool_upg_schema.py | 2 +- .../test/types/test_schema_schema.py | 2 +- .../transactions.py | 2 +- {sovrin_common => indy_common}/txn_util.py | 2 +- {sovrin_common => indy_common}/types.py | 2 +- {sovrin_common => indy_common}/util.py | 0 {sovrin_node => indy_node}/__init__.py | 2 +- {sovrin_node => indy_node}/__metadata__.py | 2 +- .../persistence/__init__.py | 0 .../persistence/attribute_store.py | 0 .../persistence/idr_cache.py | 2 +- {sovrin_node => indy_node}/pool/__init__.py | 0 {sovrin_node => indy_node}/pool/local_pool.py | 16 +- {sovrin_node => indy_node}/server/__init__.py | 0 .../server/client_authn.py | 6 +- .../server/config_req_handler.py | 20 +- .../server/domain_req_handler.py | 14 +- {sovrin_node => indy_node}/server/node.py | 32 +-- .../server/node_authn.py | 0 .../server/pool_config.py | 2 +- .../server/pool_manager.py | 2 +- .../server/pool_req_handler.py | 6 +- .../server/upgrade_log.py | 0 {sovrin_node => indy_node}/server/upgrader.py | 6 +- .../server/validator_info_tool.py | 2 +- {sovrin_node => indy_node}/test/__init__.py | 0 indy_node/test/__main__.py | 3 + .../test/attrib_txn/__init__.py | 0 .../test_n_minus_f_pool_processes_attrib.py | 2 +- .../test/catchup/__init__.py | 0 .../test/catchup/conftest.py | 10 +- .../test_requests_post_multiple_new_nodes.py | 8 +- .../test_requests_post_new_node_catchup.py | 10 +- {sovrin_node => indy_node}/test/conftest.py | 12 +- .../test/did/__init__.py | 0 .../test/did/conftest.py | 6 +- {sovrin_node => indy_node}/test/did/helper.py | 8 +- .../did/test_did_with_abbreviated_verkey.py | 18 +- .../test/did/test_did_with_full_verkey.py | 18 +- .../test/did/test_did_with_no_verkey.py | 20 +- {sovrin_node => indy_node}/test/helper.py | 14 +- .../test/persistence/__init__.py | 0 .../test/persistence/test_idr_cache.py | 2 +- .../test/pool_config/__init__.py | 0 .../test/pool_config/conftest.py | 8 +- .../test/pool_config/helper.py | 8 +- .../test/pool_config/test_send_pool_config.py | 2 +- .../test_send_pool_config_only_trustee.py | 6 +- .../test/replay/__init__.py | 0 .../test_state_regenerated_from_ledger.py | 6 +- .../test_successive_batch_no_state_change.py | 4 +- .../test/state_proof/__init__.py | 0 .../test_state_proofs_for_get_requests.py | 12 +- .../test/suspension/__init__.py | 0 .../test/suspension/helper.py | 6 +- .../test/suspension/test_suspension.py | 6 +- .../test/upgrade/__init__.py | 0 .../test/upgrade/conftest.py | 8 +- .../test/upgrade/helper.py | 20 +- ...test_communication_with_control_service.py | 4 +- .../test/upgrade/test_migration_tool.py | 2 +- .../test/upgrade/test_migration_util.py | 2 +- .../test/upgrade/test_node_control_tool.py | 12 +- .../test/upgrade/test_node_upgrade.py | 12 +- .../upgrade/test_node_upgrade_unsuccessful.py | 6 +- .../test/upgrade/test_pool_upgrade.py | 4 +- .../test/upgrade/test_pool_upgrade_cancel.py | 6 +- .../test_pool_upgrade_lower_version.py | 6 +- .../test/upgrade/test_pool_upgrade_no_loop.py | 10 +- .../test_pool_upgrade_no_loop_force.py | 12 +- ...pool_upgrade_no_loop_force_unsuccessful.py | 10 +- .../test_pool_upgrade_no_loop_reinstall.py | 12 +- ..._upgrade_no_loop_reinstall_unsuccessful.py | 10 +- .../test_pool_upgrade_no_loop_unsuccessful.py | 8 +- .../test/upgrade/test_pool_upgrade_reject.py | 6 +- .../upgrade/test_pool_upgrade_same_version.py | 4 +- ...est_pool_upgrade_same_version_reinstall.py | 6 +- .../test_pool_upgrade_through_catchup.py | 14 +- .../test/upgrade/test_upgrade_log.py | 4 +- .../test/upgrade/test_upgrade_timeout.py | 2 +- .../test/upgrade/test_upgrader.py | 2 +- .../test/validator_info/__init__.py | 0 .../validator_info/test_validator_info.py | 6 +- {sovrin_node => indy_node}/test/waits.py | 0 {sovrin_node => indy_node}/utils/__init__.py | 0 .../utils/migration_tool.py | 4 +- .../utils/node_control_tool.py | 36 ++- .../utils/node_runner.py | 6 +- post-setup.py | 4 +- requirement.txt | 2 +- ...ovrin => acme-bob-connection-request.indy} | 0 ...sovrin => acme-job-application-no-pr.indy} | 0 ...ation.sovrin => acme-job-application.indy} | 0 ...vrin => faber-bob-connection-request.indy} | 0 ...aber-request.sovrin => faber-request.indy} | 0 ...rin => thrift-bob-connection-request.indy} | 0 ...on.sovrin => thrift-loan-application.indy} | 0 scripts/add_keys.py | 10 +- scripts/add_new_node | 4 +- scripts/change_node_ha | 2 +- scripts/clear_node.py | 6 +- .../complete_rebranding_upgrade_ubuntu1604.sh | 28 +++ ...e_sovrin_node.bat => delete_indy_node.bat} | 4 +- scripts/generate_indy_pool_transactions | 22 ++ scripts/generate_sovrin_pool_transactions | 22 -- scripts/get_keys | 2 +- scripts/git | 2 +- scripts/{sovrin => indy} | 22 +- ...{sovrin_api_load_gen => indy_api_load_gen} | 2 +- scripts/{init_sovrin_keys => init_indy_keys} | 2 +- ..._sovrin_node.bat => install_indy_node.bat} | 20 +- scripts/install_nssm.bat | 6 +- scripts/load.py | 8 +- scripts/load_test.py | 14 +- scripts/publish_to_pypi | 12 +- scripts/pull | 6 +- scripts/read_ledger | 4 +- scripts/reset_client | 10 +- scripts/restart_indy_node.bat | 5 + scripts/restart_indy_node_ubuntu1604.sh | 11 + scripts/restart_sovrin_node.bat | 5 - scripts/restart_sovrin_node_ubuntu1604.sh | 9 +- scripts/restart_upgrade_agent.bat | 2 +- scripts/run_pool.py | 4 +- scripts/running_locally/setupEnvironment.sh | 22 +- .../{start_sovrin_node => start_indy_node} | 4 +- scripts/start_node_control_tool | 22 ++ scripts/start_node_control_tool.py | 22 -- scripts/test_some_write_keys_others_read_them | 2 +- ...est_specific_tests_against_specific_env.py | 10 +- scripts/test_users_write_and_read_own_keys | 2 +- ..._sovrin_node.bat => upgrade_indy_node.bat} | 6 +- ...de_test.bat => upgrade_indy_node_test.bat} | 10 +- ...604.sh => upgrade_indy_node_ubuntu1604.sh} | 8 +- ...h => upgrade_indy_node_ubuntu1604_test.sh} | 8 +- scripts/validator-info | 13 +- setup.md | 88 +++---- setup.py | 46 ++-- sovrin_client/__init__.py | 12 - sovrin_client/test/__main__.py | 3 - .../test/cli/tmp_wallet_restore_issue | 1 - sovrin_client/test/test.log | 0 sovrin_common/did_method.py | 5 - sovrin_common/plugin_helper.py | 69 ------ sovrin_common/test/__main__.py | 3 - sovrin_common/test/test_transactions.py | 58 ----- sovrin_node/test/__main__.py | 3 - 363 files changed, 1756 insertions(+), 1606 deletions(-) rename acceptance/{sovrin_acceptance => indy_acceptance}/__init__.py (100%) rename acceptance/{sovrin_acceptance => indy_acceptance}/test/__init__.py (100%) rename acceptance/{sovrin_acceptance => indy_acceptance}/test/client.py (100%) rename acceptance/{sovrin_acceptance => indy_acceptance}/test/conftest.py (97%) rename acceptance/{sovrin_acceptance => indy_acceptance}/test/constants.py (100%) rename acceptance/{sovrin_acceptance => indy_acceptance}/test/test_remove_add_roles.py (99%) create mode 100644 data/migrations/deb/1_1_150_to_1_1_151.py delete mode 100644 data/sovrin_node_control.service rename docker-files/{build-sovrin-cli-image.sh => build-indy-cli-image.sh} (70%) rename docker-files/{sovrin_config.py => indy_config.py} (87%) rename docs/{Sovrin_Running_Locally.md => Indy_Running_Locally.md} (61%) rename docs/{agents-in-sovrin.png => agents-in-indy.png} (100%) create mode 100644 indy_client/__init__.py rename {sovrin_client => indy_client}/agent/__init__.py (100%) rename {sovrin_client => indy_client}/agent/agent.py (92%) rename {sovrin_client => indy_client}/agent/agent_cli.py (96%) rename {sovrin_client => indy_client}/agent/agent_issuer.py (91%) rename {sovrin_client => indy_client}/agent/agent_net.py (94%) rename {sovrin_client => indy_client}/agent/agent_prover.py (97%) rename {sovrin_client => indy_client}/agent/agent_verifier.py (95%) rename {sovrin_client => indy_client}/agent/backend.py (100%) rename {sovrin_client => indy_client}/agent/caching.py (93%) rename {sovrin_client => indy_client}/agent/constants.py (100%) rename {sovrin_client => indy_client}/agent/endpoint.py (100%) rename {sovrin_client => indy_client}/agent/exception.py (100%) rename {sovrin_client => indy_client}/agent/helper.py (95%) rename {sovrin_client => indy_client}/agent/jsonpickle_util.py (100%) rename {sovrin_client => indy_client}/agent/msg_constants.py (100%) rename {sovrin_client => indy_client}/agent/run_agent.py (93%) rename {sovrin_client => indy_client}/agent/runnable_agent.py (90%) rename {sovrin_client => indy_client}/agent/walleted.py (95%) rename {sovrin_client => indy_client}/agent/walleted_agent.py (88%) rename {sovrin_client => indy_client}/anon_creds/__init__.py (100%) rename {sovrin_client => indy_client}/anon_creds/constant.py (100%) rename sovrin_client/anon_creds/sovrin_issuer.py => indy_client/anon_creds/indy_issuer.py (80%) rename sovrin_client/anon_creds/sovrin_prover.py => indy_client/anon_creds/indy_prover.py (66%) rename sovrin_client/anon_creds/sovrin_public_repo.py => indy_client/anon_creds/indy_public_repo.py (97%) rename sovrin_client/anon_creds/sovrin_verifier.py => indy_client/anon_creds/indy_verifier.py (65%) rename {sovrin_client => indy_client}/cli/__init__.py (100%) rename {sovrin_client => indy_client}/cli/cli.py (95%) rename {sovrin_client => indy_client}/cli/command.py (89%) rename {sovrin_client => indy_client}/cli/constants.py (93%) rename {sovrin_client => indy_client}/cli/genesisTxns.py (92%) rename {sovrin_client => indy_client}/cli/helper.py (98%) rename {sovrin_client => indy_client}/client/__init__.py (100%) rename {sovrin_client => indy_client}/client/client.py (96%) rename {sovrin_client => indy_client}/client/lib/Cargo.lock (100%) rename {sovrin_client => indy_client}/client/lib/Cargo.toml (100%) rename {sovrin_client => indy_client}/client/lib/src/constants.rs (100%) rename {sovrin_client => indy_client}/client/lib/src/internal/mod.rs (100%) rename {sovrin_client => indy_client}/client/lib/src/lib.rs (100%) rename {sovrin_client => indy_client}/client/lib/src/strutil.rs (100%) rename {sovrin_client => indy_client}/client/lib/src/tests/mod.rs (100%) rename {sovrin_client => indy_client}/client/wallet/__init__.py (100%) rename {sovrin_client => indy_client}/client/wallet/attribute.py (95%) rename {sovrin_client => indy_client}/client/wallet/connection.py (98%) rename {sovrin_client => indy_client}/client/wallet/node.py (86%) rename {sovrin_client => indy_client}/client/wallet/pool_config.py (81%) rename {sovrin_client => indy_client}/client/wallet/trustAnchoring.py (96%) rename {sovrin_client => indy_client}/client/wallet/upgrade.py (89%) rename {sovrin_client => indy_client}/client/wallet/wallet.py (76%) rename {sovrin_client => indy_client}/persistence/__init__.py (100%) rename {sovrin_client => indy_client}/persistence/client_req_rep_store.py (100%) rename {sovrin_client => indy_client}/persistence/client_req_rep_store_file.py (96%) rename {sovrin_client => indy_client}/persistence/client_txn_log.py (93%) rename {sovrin_client => indy_client}/script_helper.py (85%) rename {sovrin_client => indy_client}/test/__init__.py (100%) create mode 100644 indy_client/test/__main__.py rename {sovrin_client => indy_client}/test/agent/__init__.py (100%) rename {sovrin_client => indy_client}/test/agent/acme.py (92%) rename {sovrin_client => indy_client}/test/agent/base_agent.py (94%) rename {sovrin_client => indy_client}/test/agent/conftest.py (91%) rename {sovrin_client => indy_client}/test/agent/faber.py (89%) rename {sovrin_client => indy_client}/test/agent/helper.py (90%) rename {sovrin_client => indy_client}/test/agent/messages.py (95%) rename {sovrin_client => indy_client}/test/agent/mock_backend_system.py (87%) rename {sovrin_client => indy_client}/test/agent/test_accept_invitation.py (96%) rename {sovrin_client => indy_client}/test/agent/test_anoncreds_agent.py (97%) rename {sovrin_client => indy_client}/test/agent/test_anoncreds_claim.py (91%) rename {sovrin_client => indy_client}/test/agent/test_anoncreds_claim_request.py (88%) rename {sovrin_client => indy_client}/test/agent/test_anoncreds_proof.py (91%) rename {sovrin_client => indy_client}/test/agent/test_anoncreds_send_proof_request.py (97%) rename {sovrin_client => indy_client}/test/agent/test_connection.py (66%) rename {sovrin_client => indy_client}/test/agent/test_general_use_case.py (94%) rename {sovrin_client => indy_client}/test/agent/test_owner_identifiers.py (88%) rename {sovrin_client => indy_client}/test/agent/test_owner_request_handling.py (100%) rename {sovrin_client => indy_client}/test/agent/test_ping.py (91%) rename {sovrin_client => indy_client}/test/agent/test_startup_shutdown.py (93%) rename {sovrin_client => indy_client}/test/agent/test_walleted_agent.py (60%) rename {sovrin_client => indy_client}/test/agent/thrift.py (83%) rename {sovrin_client => indy_client}/test/anon_creds/__init__.py (100%) rename {sovrin_client => indy_client}/test/anon_creds/conftest.py (100%) rename {sovrin_client => indy_client}/test/anon_creds/test_anoncreds_usage.py (83%) rename {sovrin_client => indy_client}/test/anon_creds/test_public_repo.py (97%) rename {sovrin_client => indy_client}/test/cli/__init__.py (100%) rename {sovrin_client => indy_client}/test/cli/conftest.py (96%) rename {sovrin_client => indy_client}/test/cli/constants.py (64%) rename {sovrin_client => indy_client}/test/cli/helper.py (95%) rename {sovrin_client => indy_client}/test/cli/test_accept_invitation_base58_as_pubkey.py (87%) rename {sovrin_client => indy_client}/test/cli/test_add_genesis_transaction.py (85%) rename {sovrin_client => indy_client}/test/cli/test_agent_cli.py (92%) rename {sovrin_client => indy_client}/test/cli/test_agent_startup.py (87%) rename {sovrin_client => indy_client}/test/cli/test_agent_wallet_persistence.py (88%) rename {sovrin_client => indy_client}/test/cli/test_change_key.py (100%) rename {sovrin_client => indy_client}/test/cli/test_cli_exit.py (94%) rename {sovrin_client => indy_client}/test/cli/test_command_reg_ex.py (97%) rename {sovrin_client => indy_client}/test/cli/test_connect_env.py (77%) rename {sovrin_client => indy_client}/test/cli/test_merge_invitation.py (95%) rename {sovrin_client => indy_client}/test/cli/test_new_identifier.py (100%) rename {sovrin_client => indy_client}/test/cli/test_node.py (97%) rename {sovrin_client => indy_client}/test/cli/test_node_demotion.py (92%) rename {sovrin_client => indy_client}/test/cli/test_node_suspension.py (96%) rename {sovrin_client => indy_client}/test/cli/test_nym.py (97%) rename {sovrin_client => indy_client}/test/cli/test_nym_suspension.py (97%) rename {sovrin_client => indy_client}/test/cli/test_pool_config.py (95%) rename {sovrin_client => indy_client}/test/cli/test_pool_upgrade.py (94%) rename {sovrin_client => indy_client}/test/cli/test_pool_upgrade_validation.py (82%) rename {sovrin_client => indy_client}/test/cli/test_proof_request.py (100%) create mode 100644 indy_client/test/cli/test_restore_wallet_before_rebranding.py rename sovrin_client/test/cli/test_restore_wallet_before_renaming.py => indy_client/test/cli/test_restore_wallet_before_renaming_link_to_connection.py (93%) rename {sovrin_client => indy_client}/test/cli/test_restore_wallet_from_mgl.py (92%) rename {sovrin_client => indy_client}/test/cli/test_save_and_restore_wallet.py (98%) rename {sovrin_client => indy_client}/test/cli/test_send_attrib_validation.py (99%) rename {sovrin_client => indy_client}/test/cli/test_send_claim_def.py (92%) rename {sovrin_client => indy_client}/test/cli/test_send_get_attr.py (95%) rename {sovrin_client => indy_client}/test/cli/test_send_get_claim_def.py (95%) rename {sovrin_client => indy_client}/test/cli/test_send_get_nym_validation.py (94%) rename {sovrin_client => indy_client}/test/cli/test_send_get_schema.py (94%) rename {sovrin_client => indy_client}/test/cli/test_send_node_validation.py (98%) rename {sovrin_client => indy_client}/test/cli/test_send_nym_validation.py (98%) rename {sovrin_client => indy_client}/test/cli/test_send_schema.py (87%) rename {sovrin_client => indy_client}/test/cli/test_show_proof_multi_claim.py (90%) rename {sovrin_client => indy_client}/test/cli/test_tutorial.py (98%) rename {sovrin_client => indy_client}/test/cli/test_tutorial_manual.py (91%) rename {sovrin_client => indy_client}/test/cli/test_z_accept_invitation_hex_as_pubkey.py (88%) create mode 100644 indy_client/test/cli/tmp_wallet_restore_issue create mode 100644 indy_client/test/cli/wallet_before_rebranding rename {sovrin_client => indy_client}/test/cli/wallet_before_renaming_link_to_connection (100%) rename {sovrin_client => indy_client}/test/cli/wallet_from_minimal_go_live (100%) rename {sovrin_client => indy_client}/test/client/TestClient.py (85%) rename {sovrin_client => indy_client}/test/client/__init__.py (100%) rename {sovrin_client => indy_client}/test/client/wallet/test_link_obj.py (71%) rename {sovrin_client => indy_client}/test/conftest.py (94%) rename {sovrin_client => indy_client}/test/constants.py (100%) rename {sovrin_client => indy_client}/test/helper.py (98%) rename {sovrin_client => indy_client}/test/scripts/__init__.py (100%) rename {sovrin_client => indy_client}/test/scripts/test_reset_client.py (88%) rename {sovrin_client => indy_client}/test/state_proof/__init__.py (100%) rename {sovrin_client => indy_client}/test/state_proof/test_state_proof_for_get_requests.py (93%) rename {sovrin_client/test/cli => indy_client/test}/test.log (100%) rename {sovrin_client => indy_client}/test/test_nym_attrib.py (97%) rename {sovrin_client => indy_client}/test/training/__init__.py (100%) rename {sovrin_client => indy_client}/test/training/getting_started.py (67%) rename {sovrin_client => indy_client}/test/training/getting_started_future.py (87%) rename {sovrin_client => indy_client}/test/training/test_getting_started_guide.py (97%) rename {sovrin_client => indy_client}/test/waits.py (100%) rename {sovrin_client => indy_client}/utils/__init__.py (100%) rename {sovrin_client => indy_client}/utils/user_scenarios.py (97%) rename {sovrin_common => indy_common}/__init__.py (100%) rename {sovrin_common => indy_common}/auth.py (96%) rename {sovrin_common => indy_common}/config.py (95%) rename {sovrin_common => indy_common}/config_util.py (81%) rename {sovrin_common => indy_common}/constants.py (75%) create mode 100644 indy_common/did_method.py rename {sovrin_common => indy_common}/exceptions.py (100%) rename {sovrin_common => indy_common}/generates_request.py (100%) rename {sovrin_common => indy_common}/identity.py (93%) rename {sovrin_common => indy_common}/init_util.py (91%) create mode 100644 indy_common/plugin_helper.py rename {sovrin_common => indy_common}/pool/__init__.py (100%) rename {sovrin_common => indy_common}/pool/pool.py (100%) rename {sovrin_common => indy_common}/roles.py (100%) rename {sovrin_common => indy_common}/serialization.py (100%) rename {sovrin_common => indy_common}/setup_util.py (95%) rename {sovrin_common => indy_common}/state/__init__.py (100%) rename {sovrin_common => indy_common}/state/domain.py (97%) rename {sovrin_common => indy_common}/strict_types.py (100%) rename {sovrin_common => indy_common}/test/__init__.py (100%) create mode 100644 indy_common/test/__main__.py rename {sovrin_common => indy_common}/test/conftest.py (85%) rename {sovrin_common => indy_common}/test/helper.py (100%) rename {sovrin_common => indy_common}/test/test_roles.py (90%) rename {sovrin_common => indy_common}/test/test_strict_types.py (95%) create mode 100644 indy_common/test/test_transactions.py rename {sovrin_common => indy_common}/test/test_util.py (90%) rename {sovrin_common => indy_common}/test/types/__init__.py (100%) rename {sovrin_common => indy_common}/test/types/test_attrib.py (97%) rename {sovrin_common => indy_common}/test/types/test_attrib_schema.py (93%) rename {sovrin_common => indy_common}/test/types/test_claim_def_get_schema.py (92%) rename {sovrin_common => indy_common}/test/types/test_claim_def_sub_schema.py (90%) rename {sovrin_common => indy_common}/test/types/test_discl_schema.py (92%) rename {sovrin_common => indy_common}/test/types/test_get_attrib_schema.py (92%) rename {sovrin_common => indy_common}/test/types/test_get_nym_schema.py (91%) rename {sovrin_common => indy_common}/test/types/test_get_schema_schema.py (93%) rename {sovrin_common => indy_common}/test/types/test_pool_config_schema.py (91%) rename {sovrin_common => indy_common}/test/types/test_pool_upg_schema.py (94%) rename {sovrin_common => indy_common}/test/types/test_schema_schema.py (94%) rename {sovrin_common => indy_common}/transactions.py (95%) rename {sovrin_common => indy_common}/txn_util.py (99%) rename {sovrin_common => indy_common}/types.py (99%) rename {sovrin_common => indy_common}/util.py (100%) rename {sovrin_node => indy_node}/__init__.py (66%) rename {sovrin_node => indy_node}/__metadata__.py (88%) rename {sovrin_node => indy_node}/persistence/__init__.py (100%) rename {sovrin_node => indy_node}/persistence/attribute_store.py (100%) rename {sovrin_node => indy_node}/persistence/idr_cache.py (99%) rename {sovrin_node => indy_node}/pool/__init__.py (100%) rename {sovrin_node => indy_node}/pool/local_pool.py (92%) rename {sovrin_node => indy_node}/server/__init__.py (100%) rename {sovrin_node => indy_node}/server/client_authn.py (89%) rename {sovrin_node => indy_node}/server/config_req_handler.py (89%) rename {sovrin_node => indy_node}/server/domain_req_handler.py (97%) rename {sovrin_node => indy_node}/server/node.py (95%) rename {sovrin_node => indy_node}/server/node_authn.py (100%) rename {sovrin_node => indy_node}/server/pool_config.py (94%) rename {sovrin_node => indy_node}/server/pool_manager.py (94%) rename {sovrin_node => indy_node}/server/pool_req_handler.py (94%) rename {sovrin_node => indy_node}/server/upgrade_log.py (100%) rename {sovrin_node => indy_node}/server/upgrader.py (99%) rename {sovrin_node => indy_node}/server/validator_info_tool.py (92%) rename {sovrin_node => indy_node}/test/__init__.py (100%) create mode 100644 indy_node/test/__main__.py rename {sovrin_node => indy_node}/test/attrib_txn/__init__.py (100%) rename {sovrin_node => indy_node}/test/attrib_txn/test_n_minus_f_pool_processes_attrib.py (96%) rename {sovrin_node => indy_node}/test/catchup/__init__.py (100%) rename {sovrin_node => indy_node}/test/catchup/conftest.py (70%) rename {sovrin_node => indy_node}/test/catchup/test_requests_post_multiple_new_nodes.py (89%) rename {sovrin_node => indy_node}/test/catchup/test_requests_post_new_node_catchup.py (95%) rename {sovrin_node => indy_node}/test/conftest.py (92%) rename {sovrin_node => indy_node}/test/did/__init__.py (100%) rename {sovrin_node => indy_node}/test/did/conftest.py (82%) rename {sovrin_node => indy_node}/test/did/helper.py (94%) rename {sovrin_node => indy_node}/test/did/test_did_with_abbreviated_verkey.py (87%) rename {sovrin_node => indy_node}/test/did/test_did_with_full_verkey.py (85%) rename {sovrin_node => indy_node}/test/did/test_did_with_no_verkey.py (85%) rename {sovrin_node => indy_node}/test/helper.py (97%) rename {sovrin_node => indy_node}/test/persistence/__init__.py (100%) rename {sovrin_node => indy_node}/test/persistence/test_idr_cache.py (96%) rename {sovrin_node => indy_node}/test/pool_config/__init__.py (100%) rename {sovrin_node => indy_node}/test/pool_config/conftest.py (78%) rename {sovrin_node => indy_node}/test/pool_config/helper.py (79%) rename {sovrin_node => indy_node}/test/pool_config/test_send_pool_config.py (94%) rename {sovrin_node => indy_node}/test/pool_config/test_send_pool_config_only_trustee.py (87%) rename {sovrin_node => indy_node}/test/replay/__init__.py (100%) rename {sovrin_node => indy_node}/test/replay/test_state_regenerated_from_ledger.py (94%) rename {sovrin_node => indy_node}/test/replay/test_successive_batch_no_state_change.py (98%) rename {sovrin_node => indy_node}/test/state_proof/__init__.py (100%) rename {sovrin_node => indy_node}/test/state_proof/test_state_proofs_for_get_requests.py (95%) rename {sovrin_node => indy_node}/test/suspension/__init__.py (100%) rename {sovrin_node => indy_node}/test/suspension/helper.py (94%) rename {sovrin_node => indy_node}/test/suspension/test_suspension.py (96%) rename {sovrin_node => indy_node}/test/upgrade/__init__.py (100%) rename {sovrin_node => indy_node}/test/upgrade/conftest.py (94%) rename {sovrin_node => indy_node}/test/upgrade/helper.py (91%) rename {sovrin_node => indy_node}/test/upgrade/test_communication_with_control_service.py (96%) rename {sovrin_node => indy_node}/test/upgrade/test_migration_tool.py (96%) rename {sovrin_node => indy_node}/test/upgrade/test_migration_util.py (98%) rename {sovrin_node => indy_node}/test/upgrade/test_node_control_tool.py (93%) rename {sovrin_node => indy_node}/test/upgrade/test_node_upgrade.py (69%) rename {sovrin_node => indy_node}/test/upgrade/test_node_upgrade_unsuccessful.py (80%) rename {sovrin_node => indy_node}/test/upgrade/test_pool_upgrade.py (94%) rename {sovrin_node => indy_node}/test/upgrade/test_pool_upgrade_cancel.py (87%) rename {sovrin_node => indy_node}/test/upgrade/test_pool_upgrade_lower_version.py (89%) rename {sovrin_node => indy_node}/test/upgrade/test_pool_upgrade_no_loop.py (76%) rename {sovrin_node => indy_node}/test/upgrade/test_pool_upgrade_no_loop_force.py (75%) rename {sovrin_node => indy_node}/test/upgrade/test_pool_upgrade_no_loop_force_unsuccessful.py (74%) rename {sovrin_node => indy_node}/test/upgrade/test_pool_upgrade_no_loop_reinstall.py (74%) rename {sovrin_node => indy_node}/test/upgrade/test_pool_upgrade_no_loop_reinstall_unsuccessful.py (74%) rename {sovrin_node => indy_node}/test/upgrade/test_pool_upgrade_no_loop_unsuccessful.py (78%) rename {sovrin_node => indy_node}/test/upgrade/test_pool_upgrade_reject.py (93%) rename {sovrin_node => indy_node}/test/upgrade/test_pool_upgrade_same_version.py (87%) rename {sovrin_node => indy_node}/test/upgrade/test_pool_upgrade_same_version_reinstall.py (82%) rename {sovrin_node => indy_node}/test/upgrade/test_pool_upgrade_through_catchup.py (91%) rename {sovrin_node => indy_node}/test/upgrade/test_upgrade_log.py (92%) rename {sovrin_node => indy_node}/test/upgrade/test_upgrade_timeout.py (96%) rename {sovrin_node => indy_node}/test/upgrade/test_upgrader.py (94%) rename {sovrin_node => indy_node}/test/validator_info/__init__.py (100%) rename {sovrin_node => indy_node}/test/validator_info/test_validator_info.py (96%) rename {sovrin_node => indy_node}/test/waits.py (100%) rename {sovrin_node => indy_node}/utils/__init__.py (100%) rename {sovrin_node => indy_node}/utils/migration_tool.py (98%) rename {sovrin_node => indy_node}/utils/node_control_tool.py (91%) rename {sovrin_node => indy_node}/utils/node_runner.py (87%) rename sample/{acme-bob-connection-request.sovrin => acme-bob-connection-request.indy} (100%) rename sample/{acme-job-application-no-pr.sovrin => acme-job-application-no-pr.indy} (100%) rename sample/{acme-job-application.sovrin => acme-job-application.indy} (100%) rename sample/{faber-bob-connection-request.sovrin => faber-bob-connection-request.indy} (100%) rename sample/{faber-request.sovrin => faber-request.indy} (100%) rename sample/{thrift-bob-connection-request.sovrin => thrift-bob-connection-request.indy} (100%) rename sample/{thrift-loan-application.sovrin => thrift-loan-application.indy} (100%) create mode 100644 scripts/complete_rebranding_upgrade_ubuntu1604.sh rename scripts/{delete_sovrin_node.bat => delete_indy_node.bat} (62%) create mode 100755 scripts/generate_indy_pool_transactions delete mode 100755 scripts/generate_sovrin_pool_transactions rename scripts/{sovrin => indy} (74%) rename scripts/{sovrin_api_load_gen => indy_api_load_gen} (85%) rename scripts/{init_sovrin_keys => init_indy_keys} (95%) rename scripts/{install_sovrin_node.bat => install_indy_node.bat} (59%) create mode 100644 scripts/restart_indy_node.bat create mode 100644 scripts/restart_indy_node_ubuntu1604.sh delete mode 100644 scripts/restart_sovrin_node.bat rename scripts/{start_sovrin_node => start_indy_node} (77%) create mode 100644 scripts/start_node_control_tool delete mode 100644 scripts/start_node_control_tool.py rename scripts/{upgrade_sovrin_node.bat => upgrade_indy_node.bat} (57%) rename scripts/{upgrade_sovrin_node_test.bat => upgrade_indy_node_test.bat} (52%) rename scripts/{upgrade_sovrin_node_ubuntu1604.sh => upgrade_indy_node_ubuntu1604.sh} (75%) rename scripts/{upgrade_sovrin_node_ubuntu1604_test.sh => upgrade_indy_node_ubuntu1604_test.sh} (75%) delete mode 100644 sovrin_client/__init__.py delete mode 100644 sovrin_client/test/__main__.py delete mode 100644 sovrin_client/test/cli/tmp_wallet_restore_issue delete mode 100644 sovrin_client/test/test.log delete mode 100644 sovrin_common/did_method.py delete mode 100644 sovrin_common/plugin_helper.py delete mode 100644 sovrin_common/test/__main__.py delete mode 100644 sovrin_common/test/test_transactions.py delete mode 100644 sovrin_node/test/__main__.py diff --git a/.flake8 b/.flake8 index bd807529c..f63d11b61 100644 --- a/.flake8 +++ b/.flake8 @@ -6,8 +6,8 @@ exclude = # have to skip because the file should be fixed setup.py, # lots unused import because of fixtures - sovrin_client/test, - sovrin_node/test, + indy_client/test, + indy_node/test, # config file - docker-files/sovrin_config.py + docker-files/indy_config.py max-complexity = 10 diff --git a/.travis.yml b/.travis.yml index c590c2568..c46e56af3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,10 +18,10 @@ before_install: install: - pip install -U -e . - - pip install -U sovrin-client + - pip install -U indy-client script: - - python -m sovrin_node.test + - python -m indy_node.test before_cache: - rm -f /opt/orientdb/log/* diff --git a/Jenkinsfile b/Jenkinsfile index c58e69cdb..7616f2a74 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ def nodeTestUbuntu = { testHelpers.install() echo 'Ubuntu Test: Test' - testHelpers.testRunner([resFile: "test-result-node.${NODE_NAME}.txt", testDir: 'sovrin_node']) + testHelpers.testRunner([resFile: "test-result-node.${NODE_NAME}.txt", testDir: 'indy_node']) //testHelpers.testJUnit(resFile: "test-result-node.${NODE_NAME}.xml") } } @@ -40,7 +40,7 @@ def clientTestUbuntu = { testHelpers.install() echo 'Ubuntu Test: Test' - testHelpers.testRunner([resFile: "test-result-client.${NODE_NAME}.txt", testDir: 'sovrin_client']) + testHelpers.testRunner([resFile: "test-result-client.${NODE_NAME}.txt", testDir: 'indy_client']) //testHelpers.testJUnit(resFile: "test-result-client.${NODE_NAME}.xml") } } @@ -63,7 +63,7 @@ def commonTestUbuntu = { testHelpers.install() echo 'Ubuntu Test: Test' - testHelpers.testJUnit([resFile: "test-result-common.${NODE_NAME}.xml", testDir: 'sovrin_common']) + testHelpers.testJUnit([resFile: "test-result-common.${NODE_NAME}.xml", testDir: 'indy_common']) } } finally { diff --git a/Jenkinsfile.cd b/Jenkinsfile.cd index c58e69cdb..7616f2a74 100644 --- a/Jenkinsfile.cd +++ b/Jenkinsfile.cd @@ -17,7 +17,7 @@ def nodeTestUbuntu = { testHelpers.install() echo 'Ubuntu Test: Test' - testHelpers.testRunner([resFile: "test-result-node.${NODE_NAME}.txt", testDir: 'sovrin_node']) + testHelpers.testRunner([resFile: "test-result-node.${NODE_NAME}.txt", testDir: 'indy_node']) //testHelpers.testJUnit(resFile: "test-result-node.${NODE_NAME}.xml") } } @@ -40,7 +40,7 @@ def clientTestUbuntu = { testHelpers.install() echo 'Ubuntu Test: Test' - testHelpers.testRunner([resFile: "test-result-client.${NODE_NAME}.txt", testDir: 'sovrin_client']) + testHelpers.testRunner([resFile: "test-result-client.${NODE_NAME}.txt", testDir: 'indy_client']) //testHelpers.testJUnit(resFile: "test-result-client.${NODE_NAME}.xml") } } @@ -63,7 +63,7 @@ def commonTestUbuntu = { testHelpers.install() echo 'Ubuntu Test: Test' - testHelpers.testJUnit([resFile: "test-result-common.${NODE_NAME}.xml", testDir: 'sovrin_common']) + testHelpers.testJUnit([resFile: "test-result-common.${NODE_NAME}.xml", testDir: 'indy_common']) } } finally { diff --git a/Jenkinsfile.ci b/Jenkinsfile.ci index 69110eefe..e7c4112bc 100644 --- a/Jenkinsfile.ci +++ b/Jenkinsfile.ci @@ -126,14 +126,14 @@ def tests = [ common: { python -> test( resFile: "test-result-common.${NODE_NAME}.xml", - testDir: 'sovrin_common', + testDir: 'indy_common', python: python ) }, client: { python -> test( resFile: "test-result-client.${NODE_NAME}.txt", - testDir: 'sovrin_client', + testDir: 'indy_client', python: python, useRunner: true ) @@ -141,7 +141,7 @@ def tests = [ node: { python -> test( resFile: "test-result-node.${NODE_NAME}.txt", - testDir: 'sovrin_node', + testDir: 'indy_node', python: python, useRunner: true ) diff --git a/README.md b/README.md index c30507424..00c187991 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ ## Indy Node -[![Build Status](https://jenkins.evernym.com/buildStatus/icon?job=Sovrin%20Node/master)](https://jenkins.evernym.com/view/Core/job/Sovrin%20Node/job/master/) - This codebase embodies all the functionality to run nodes--validators and/or observers that provide a [self-sovereign identity ecosystem](https://sovrin.org) on top of a distributed ledger. It is the core project for Indy; over time, all other indy-\* projects may @@ -11,7 +9,7 @@ collapse into this one, except for [indy-sdk](https://github.com/hyperledger/ind This code is independent from but commonly associated with [Sovrin](https://sovrin.org). Sovrin is a public utility for identity, built on top of this codebase. People who install sovrin packages (e.g., with -`sudo apt install sovrin-node`) get prepackaged genesis transactions that integrate a +`sudo apt install sovrin`) get prepackaged genesis transactions that integrate with an Indy validator pool using [Sovrin's governance and trust framework](https://sovrin.org/wp-content/uploads/2017/06/SovrinProvisionalTrustFramework2017-03-22.pdf). However, it is possible to use Indy Node with a different network, using whatever conventions a community chooses. diff --git a/acceptance/sovrin_acceptance/__init__.py b/acceptance/indy_acceptance/__init__.py similarity index 100% rename from acceptance/sovrin_acceptance/__init__.py rename to acceptance/indy_acceptance/__init__.py diff --git a/acceptance/sovrin_acceptance/test/__init__.py b/acceptance/indy_acceptance/test/__init__.py similarity index 100% rename from acceptance/sovrin_acceptance/test/__init__.py rename to acceptance/indy_acceptance/test/__init__.py diff --git a/acceptance/sovrin_acceptance/test/client.py b/acceptance/indy_acceptance/test/client.py similarity index 100% rename from acceptance/sovrin_acceptance/test/client.py rename to acceptance/indy_acceptance/test/client.py diff --git a/acceptance/sovrin_acceptance/test/conftest.py b/acceptance/indy_acceptance/test/conftest.py similarity index 97% rename from acceptance/sovrin_acceptance/test/conftest.py rename to acceptance/indy_acceptance/test/conftest.py index 8e6bb1413..50ca55ef6 100644 --- a/acceptance/sovrin_acceptance/test/conftest.py +++ b/acceptance/indy_acceptance/test/conftest.py @@ -5,7 +5,7 @@ import pytest from indy import pool, wallet -from sovrin_acceptance.test.client import Client +from indy_acceptance.test.client import Client @pytest.fixture diff --git a/acceptance/sovrin_acceptance/test/constants.py b/acceptance/indy_acceptance/test/constants.py similarity index 100% rename from acceptance/sovrin_acceptance/test/constants.py rename to acceptance/indy_acceptance/test/constants.py diff --git a/acceptance/sovrin_acceptance/test/test_remove_add_roles.py b/acceptance/indy_acceptance/test/test_remove_add_roles.py similarity index 99% rename from acceptance/sovrin_acceptance/test/test_remove_add_roles.py rename to acceptance/indy_acceptance/test/test_remove_add_roles.py index 99c864e47..6d7dd7b72 100644 --- a/acceptance/sovrin_acceptance/test/test_remove_add_roles.py +++ b/acceptance/indy_acceptance/test/test_remove_add_roles.py @@ -3,7 +3,7 @@ from indy.error import ErrorCode from pytest import raises -from sovrin_acceptance.test.constants import TRUSTEE_CODE, STEWARD_CODE,\ +from indy_acceptance.test.constants import TRUSTEE_CODE, STEWARD_CODE,\ TGB_CODE, TRUST_ANCHOR_CODE, NO_ROLE_CODE diff --git a/build-scripts/ubuntu-1604/build-indy-node.sh b/build-scripts/ubuntu-1604/build-indy-node.sh index b58f34869..4674e702f 100755 --- a/build-scripts/ubuntu-1604/build-indy-node.sh +++ b/build-scripts/ubuntu-1604/build-indy-node.sh @@ -25,6 +25,7 @@ fpm --input-type "python" \ --python-bin "/usr/bin/python3" \ --exclude "*.pyc" \ --exclude "*.pyo" \ + --depends at \ --no-python-fix-dependencies \ --maintainer "Hyperledger " \ --before-install "preinst_node" \ diff --git a/build-scripts/ubuntu-1604/postinst_node b/build-scripts/ubuntu-1604/postinst_node index 496cb301c..2e9fdadd4 100755 --- a/build-scripts/ubuntu-1604/postinst_node +++ b/build-scripts/ubuntu-1604/postinst_node @@ -2,21 +2,21 @@ # it should be fixed -# workaround when .sovrin become regular file -if [ -f /home/sovrin/.sovrin ]; then - rm /home/sovrin/.sovrin +# workaround when .indy become regular file +if [ -f /home/indy/.indy ]; then + rm /home/indy/.indy fi -mkdir -p /home/sovrin/.sovrin +mkdir -p /home/indy/.indy -# create sovrin config if not exists -if [ ! -f /home/sovrin/.sovrin/sovrin_config.py ]; then - touch /home/sovrin/.sovrin/sovrin_config.py +# create indy config if not exists +if [ ! -f /home/indy/.indy/indy_config.py ]; then + touch /home/indy/.indy/indy_config.py fi -chown -R sovrin:sovrin /home/sovrin/.sovrin +chown -R indy:indy /home/indy/.indy -# init_sovrin_node script -cat < /usr/local/bin/init_sovrin_node +# init_indy_node script +cat < /usr/local/bin/init_indy_node #!/bin/bash if [ \$# -lt 3 ]; then @@ -30,30 +30,30 @@ if [ \$# -lt 3 ]; then exit 1; fi -echo "NODE_NAME=\$1" > /home/sovrin/.sovrin/sovrin.env -echo "NODE_PORT=\$2" >> /home/sovrin/.sovrin/sovrin.env -echo "NODE_CLIENT_PORT=\$3" >> /home/sovrin/.sovrin/sovrin.env +echo "NODE_NAME=\$1" > /home/indy/.indy/indy.env +echo "NODE_PORT=\$2" >> /home/indy/.indy/indy.env +echo "NODE_CLIENT_PORT=\$3" >> /home/indy/.indy/indy.env if [ -z \$4 ]; then - init_sovrin_keys --name \$1 + init_indy_keys --name \$1 else - init_sovrin_keys --name \$1 --seed \$4 + init_indy_keys --name \$1 --seed \$4 fi EOF -chmod +x /usr/local/bin/init_sovrin_node +chmod +x /usr/local/bin/init_indy_node # add systemd script -cat < /etc/systemd/system/sovrin-node.service +cat < /etc/systemd/system/indy-node.service [Unit] -Description=Sovrin Node -Requires=sovrin-node-control.service +Description=Indy Node +Requires=indy-node-control.service [Service] -EnvironmentFile=/home/sovrin/.sovrin/sovrin.env -ExecStart=/usr/bin/env python3 -O /usr/local/bin/start_sovrin_node \${NODE_NAME} \${NODE_PORT} \${NODE_CLIENT_PORT} -User=sovrin -Group=sovrin +EnvironmentFile=/home/indy/.indy/indy.env +ExecStart=/usr/bin/env python3 -O /usr/local/bin/start_indy_node \${NODE_NAME} \${NODE_PORT} \${NODE_CLIENT_PORT} +User=indy +Group=indy Restart=on-failure RestartSec=10 StartLimitBurst=10 @@ -65,17 +65,17 @@ WantedBy=multi-user.target EOF -cat < /etc/systemd/system/sovrin-node-control.service +cat < /etc/systemd/system/indy-node-control.service [Unit] -Description=Service for upgrade existing Sovrin and another operations -#Requires=sovrin.service -#After=sovrin.service +Description=Service for upgrade of existing Indy Node and other operations +#Requires=indy.service +#After=indy.service After=network.target [Service] Type=simple -EnvironmentFile=/etc/sovrin/node_control.conf -ExecStart=/usr/bin/env python3 -O /usr/local/bin/start_node_control_tool.py \$TEST_MODE --hold-ext \$HOLD_EXT +EnvironmentFile=/etc/indy/node_control.conf +ExecStart=/usr/bin/env python3 -O /usr/local/bin/start_node_control_tool \$TEST_MODE --hold-ext \$HOLD_EXT Restart=on-failure RestartSec=10 StartLimitBurst=10 @@ -86,11 +86,11 @@ TimeoutSec=300 WantedBy=multi-user.target EOF -mkdir -p /etc/sovrin +mkdir -p /etc/indy -HOLD_EXT_ADDED=$(grep HOLD_EXT /etc/sovrin/node_control.conf) -if [ ! -f /etc/sovrin/node_control.conf ] || [ -z "${HOLD_EXT_ADDED}" ]; then - cat < /etc/sovrin/node_control.conf +HOLD_EXT_ADDED=$(grep HOLD_EXT /etc/indy/node_control.conf) +if [ ! -f /etc/indy/node_control.conf ] || [ -z "${HOLD_EXT_ADDED}" ]; then + cat < /etc/indy/node_control.conf # Uncomment this to run agent in test mode: #TEST_MODE=--test @@ -99,19 +99,24 @@ HOLD_EXT=\"\" EOF fi -mv /usr/local/bin/upgrade_sovrin_node_ubuntu1604.sh /usr/local/bin/upgrade_sovrin_node -mv /usr/local/bin/upgrade_sovrin_node_ubuntu1604_test.sh /usr/local/bin/upgrade_sovrin_node_test +mv /usr/local/bin/upgrade_indy_node_ubuntu1604.sh /usr/local/bin/upgrade_indy_node +mv /usr/local/bin/upgrade_indy_node_ubuntu1604_test.sh /usr/local/bin/upgrade_indy_node_test +mv /usr/local/bin/restart_indy_node_ubuntu1604.sh /usr/local/bin/restart_indy_node mv /usr/local/bin/restart_sovrin_node_ubuntu1604.sh /usr/local/bin/restart_sovrin_node +mv /usr/local/bin/complete_rebranding_upgrade_ubuntu1604.sh /usr/local/bin/complete_rebranding_upgrade -chmod +x /usr/local/bin/upgrade_sovrin_node -chmod +x /usr/local/bin/upgrade_sovrin_node_test +chmod +x /usr/local/bin/upgrade_indy_node +chmod +x /usr/local/bin/upgrade_indy_node_test +chmod +x /usr/local/bin/restart_indy_node chmod +x /usr/local/bin/restart_sovrin_node -chmod +x /usr/local/bin/start_node_control_tool.py +chmod +x /usr/local/bin/complete_rebranding_upgrade -rm -f /usr/local/bin/delete_sovrin_node.bat /usr/local/bin/upgrade_sovrin_node_test.bat /usr/local/bin/restart_sovrin_node.bat /usr/local/bin/install_nssm.bat /usr/local/bin/upgrade_sovrin_node.bat /usr/local/bin/install_sovrin_node.bat +rm -f /usr/local/bin/delete_indy_node.bat /usr/local/bin/upgrade_indy_node_test.bat \ + /usr/local/bin/restart_indy_node.bat /usr/local/bin/install_nssm.bat /usr/local/bin/upgrade_indy_node.bat \ + /usr/local/bin/install_indy_node.bat /usr/local/bin/restart_upgrade_agent.bat # disable stdout logging -echo "enableStdOutLogging=False" >> /home/sovrin/.sovrin/sovrin_config.py +echo "enableStdOutLogging=False" >> /home/indy/.indy/indy_config.py # Automatically added from template: diff --git a/build-scripts/ubuntu-1604/preinst_node b/build-scripts/ubuntu-1604/preinst_node index 12f2dae47..4e1addfb6 100755 --- a/build-scripts/ubuntu-1604/preinst_node +++ b/build-scripts/ubuntu-1604/preinst_node @@ -1,5 +1,5 @@ #!/bin/bash -if ! id -u sovrin > /dev/null 2>&1; then - useradd -r -m -s /bin/bash -U sovrin +if ! id -u indy > /dev/null 2>&1; then + useradd -r -m -s /bin/bash -U indy fi diff --git a/ci/ubuntu.dockerfile b/ci/ubuntu.dockerfile index 58ae0250e..7ef328910 100644 --- a/ci/ubuntu.dockerfile +++ b/ci/ubuntu.dockerfile @@ -2,6 +2,7 @@ FROM ubuntu:16.04 ARG uid=1000 +ARG user=indy # Install environment RUN apt-get update -y @@ -24,18 +25,18 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 RUN echo "deb https://repo.sovrin.org/deb xenial master" >> /etc/apt/sources.list RUN apt-get update -y RUN apt-get install -y \ - python3-charm-crypto -RUN apt-get update -y && apt-get install -y libindy-crypto=0.1.6 -RUN useradd -ms /bin/bash -u $uid sovrin -USER sovrin -RUN virtualenv -p python3.5 /home/sovrin/test -RUN cp -r /usr/local/lib/python3.5/dist-packages/Charm_Crypto-0.0.0.egg-info /home/sovrin/test/lib/python3.5/site-packages/Charm_Crypto-0.0.0.egg-info -RUN cp -r /usr/local/lib/python3.5/dist-packages/charm /home/sovrin/test/lib/python3.5/site-packages/charm -RUN mkdir /home/sovrin/.sovrin + python3-charm-crypto \ + libindy-crypto=0.1.6 +RUN useradd -ms /bin/bash -u $uid $user +USER $user +RUN virtualenv -p python3.5 /home/$user/test +RUN cp -r /usr/local/lib/python3.5/dist-packages/Charm_Crypto-0.0.0.egg-info /home/$user/test/lib/python3.5/site-packages/Charm_Crypto-0.0.0.egg-info +RUN cp -r /usr/local/lib/python3.5/dist-packages/charm /home/$user/test/lib/python3.5/site-packages/charm +RUN mkdir /home/$user/.$user USER root -RUN ln -sf /home/sovrin/test/bin/python /usr/local/bin/python -RUN ln -sf /home/sovrin/test/bin/pip /usr/local/bin/pip -USER sovrin +RUN ln -sf /home/$user/test/bin/python /usr/local/bin/python +RUN ln -sf /home/$user/test/bin/pip /usr/local/bin/pip +USER $user # TODO: Automate dependency collection RUN pip install jsonpickle \ ujson \ @@ -59,5 +60,5 @@ RUN pip install jsonpickle \ psutil \ intervaltree \ pytest-xdist -ENV PYTHONPATH $PYTHONPATH:/home/sovrin/test/bin -WORKDIR /home/sovrin \ No newline at end of file +ENV PYTHONPATH $PYTHONPATH:/home/$user/test/bin +WORKDIR /home/$user \ No newline at end of file diff --git a/cluster-simulation.md b/cluster-simulation.md index 7c5eaff38..20c75c489 100644 --- a/cluster-simulation.md +++ b/cluster-simulation.md @@ -1,19 +1,19 @@ -# Running a Simulation of a Sovrin Cluster and Agents -One way to run through the [Sovrin Getting Started Guide](getting-started.md) is to set up a simulation of a Sovrin Validator Cluster. This simulation resides in a single process on a single PC, but it sets up multiple asynchronous call-backs, one for each node being simulated. These call-backs are handled sequentially in an event loop. This gives the approximate performance of nultiple Sovrin Validator, Agent and CLI client nodes, but all running within a single process. These instructions will configure the simulation, leaving you at the end with a CLI command-line prompt that you can use to complete the Getting Started Guide. +# Running a Simulation of a Indy Cluster and Agents +One way to run through the [Indy Getting Started Guide](getting-started.md) is to set up a simulation of a Indy Validator Cluster. This simulation resides in a single process on a single PC, but it sets up multiple asynchronous call-backs, one for each node being simulated. These call-backs are handled sequentially in an event loop. This gives the approximate performance of nultiple Indy Validator, Agent and CLI client nodes, but all running within a single process. These instructions will configure the simulation, leaving you at the end with a CLI command-line prompt that you can use to complete the Getting Started Guide. -## Install the Sovrin Client Software +## Install the Indy Client Software ``` -$ pip install -U --no-cache-dir sovrin-client +$ pip install -U --no-cache-dir indy-client ``` If you get any error, check out the info about [prerequisites](https://docs.google.com/document/d/1CyggP4nNPyx4SELNZEc2FOeln6G0F22B37cAVtB_FBM/edit); there are a few dominoes you might have to line up. -The install puts some python modules on your system. Most importantly, it gives you a command - line interface(CLI) to Sovrin. We are going to use that CLI to explore what Sovrin can do. (Sovrin also has a programmatic API, but it is not yet fully formalized, and this version of the guide doesn’t document it. See the [Sovrin roadmap](https://github.com/sovrin-foundation/sovrin/wiki/Roadmap).) +The install puts some python modules on your system. Most importantly, it gives you a command - line interface(CLI) to Indy. We are going to use that CLI to explore what Indy can do. (Indy also has a programmatic API, but it is not yet fully formalized, and this version of the guide doesn’t document it. See the [Indy roadmap](https://github.com/hyperledger/indy/wiki/Roadmap).) ## Setup Environment -We will be doing this exercise in a Python Interactive Console. **_Sovrin must be run with Python 3._** So depending on your system setup, the next command could change. +We will be doing this exercise in a Python Interactive Console. **_Indy must be run with Python 3._** So depending on your system setup, the next command could change. To launch Python Interactive Console, type this command: @@ -29,10 +29,10 @@ $ python You now have a Python prompt. Using the prompt, only one import is required. This import will in turn import other modules and will provide helper functions for this exercise. Any function with the prefix 'demo' are defined in this import and are just functions to help with the exercise. ``` ->>> from sovrin_client.test.training.getting_started import * +>>> from indy_client.test.training.getting_started import * ``` -### Run the Sovrin Cluster Simulation +### Run the Indy Cluster Simulation Type this command: @@ -43,15 +43,15 @@ Type this command: This command will start up a local pool of validator "nodes". This can take a few mintues and will produce a lot of console output. This output contains the initial communication between 4 nodes. This output can be ignored for this exercise. -After starting up the local sovrin pool, three agents will be launched in virtual "nodes". During this this exercise we will be interacting +After starting up the local indy pool, three agents will be launched in virtual "nodes". During this this exercise we will be interacting with three agents, Faber Collage, Acme Corp and Thrift Bank. Again, launching these agents can take some time and a lot of output. After these tasks are complete, you should see an interactive prompt, like this: ``` -Sovrin - CLI version 1.17(c) 2016 Evernym, Inc. +Indy - CLI version 1.17(c) 2016 Evernym, Inc. Type 'help' for more information. -sovrin> +indy> ``` -You can now proceed with the Getting Started Guide, using this Sovrin client prompt. +You can now proceed with the Getting Started Guide, using this Indy client prompt. diff --git a/data/migrations/README.md b/data/migrations/README.md index c01e54d61..fac4b7a4c 100644 --- a/data/migrations/README.md +++ b/data/migrations/README.md @@ -1,4 +1,4 @@ -# Migrations for sovrin-node +# Migrations for indy-node / sovrin-node All migrations are python scripts with names satisfying the following rule: ``` diff --git a/data/migrations/deb/1_0_96_to_1_0_97.py b/data/migrations/deb/1_0_96_to_1_0_97.py index 59de005ef..3a628b082 100644 --- a/data/migrations/deb/1_0_96_to_1_0_97.py +++ b/data/migrations/deb/1_0_96_to_1_0_97.py @@ -4,8 +4,8 @@ from stp_core.common.log import getlogger -from sovrin_common.util import compose_cmd -from sovrin_node.utils.node_control_tool import NodeControlTool, TIMEOUT +from indy_common.util import compose_cmd +from indy_node.utils.node_control_tool import NodeControlTool, TIMEOUT logger = getlogger() diff --git a/data/migrations/deb/1_1_144_to_1_1_145.py b/data/migrations/deb/1_1_144_to_1_1_145.py index 17dc32fe4..fca97d410 100644 --- a/data/migrations/deb/1_1_144_to_1_1_145.py +++ b/data/migrations/deb/1_1_144_to_1_1_145.py @@ -1,7 +1,7 @@ import os import shutil -from sovrin_common.config_util import getConfig +from indy_common.config_util import getConfig from stp_core.common.log import getlogger config = getConfig() diff --git a/data/migrations/deb/1_1_150_to_1_1_151.py b/data/migrations/deb/1_1_150_to_1_1_151.py new file mode 100644 index 000000000..72ae55410 --- /dev/null +++ b/data/migrations/deb/1_1_150_to_1_1_151.py @@ -0,0 +1,40 @@ +import os +import shutil +import subprocess + +from indy_common.util import compose_cmd + + +def rename_if_exists(dir, old_name, new_name): + if os.path.exists(os.path.join(dir, old_name)): + os.rename(os.path.join(dir, old_name), + os.path.join(dir, new_name)) + + +def rename_request_files(requests_dir): + for relative_name in os.listdir(requests_dir): + absolute_name = os.path.join(requests_dir, relative_name) + if os.path.isfile(absolute_name) and absolute_name.endswith('.sovrin'): + os.rename(absolute_name, absolute_name[:-len('.sovrin')] + '.indy') + + +def migrate(): + source_dir = os.path.expanduser('/home/sovrin/.sovrin') + target_dir = os.path.expanduser('/home/indy/.indy') + + shutil.rmtree(target_dir) + shutil.copytree(source_dir, target_dir) + + rename_if_exists(target_dir, '.sovrin', '.indy') + rename_if_exists(target_dir, 'sovrin.env', 'indy.env') + rename_if_exists(target_dir, 'sovrin_config.py', 'indy_config.py') + + if os.path.isdir(os.path.join(target_dir, 'sample')): + rename_request_files(os.path.join(target_dir, 'sample')) + + subprocess.run(compose_cmd(['chown', '-R', 'indy:indy', target_dir]), + shell=True, + check=True) + + +migrate() diff --git a/data/migrations/deb/disabled_1_0_97_to_1_0_96.py b/data/migrations/deb/disabled_1_0_97_to_1_0_96.py index 6dca590a4..59673f6ea 100644 --- a/data/migrations/deb/disabled_1_0_97_to_1_0_96.py +++ b/data/migrations/deb/disabled_1_0_97_to_1_0_96.py @@ -12,8 +12,8 @@ from storage import store_utils from storage.chunked_file_store import ChunkedFileStore -from sovrin_common.config_util import getConfig -from sovrin_common.txn_util import getTxnOrderedFields +from indy_common.config_util import getConfig +from indy_common.txn_util import getTxnOrderedFields from stp_core.common.log import getlogger config = getConfig() diff --git a/data/migrations/deb/helper_1_0_96_to_1_0_97.py b/data/migrations/deb/helper_1_0_96_to_1_0_97.py index 3712e0241..73a81a712 100644 --- a/data/migrations/deb/helper_1_0_96_to_1_0_97.py +++ b/data/migrations/deb/helper_1_0_96_to_1_0_97.py @@ -15,9 +15,9 @@ from storage.chunked_file_store import ChunkedFileStore from stp_core.common.log import getlogger -from sovrin_common.config_util import getConfig -from sovrin_common.constants import SCHEMA, CLAIM_DEF -from sovrin_common.txn_util import getTxnOrderedFields +from indy_common.config_util import getConfig +from indy_common.constants import SCHEMA, CLAIM_DEF +from indy_common.txn_util import getTxnOrderedFields config = getConfig() logger = getlogger() diff --git a/data/sovrin_node_control.service b/data/sovrin_node_control.service deleted file mode 100644 index 665e9aae4..000000000 --- a/data/sovrin_node_control.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=Service for upgrade existing Sovrin and another operations -#Requires=sovrin.service -#After=sovrin.service -After=network.target - - -[Service] -Type=simple -EnvironmentFile=/etc/sovrin/node_control.conf -ExecStart=/usr/bin/node_control_tool.py $TEST_MODE -Restart=on-failure -TimeoutSec=300 - -[Install] -WantedBy=multi-user.target - diff --git a/docker-files/Dockerfile b/docker-files/Dockerfile index 84b8d18f0..ba33e8f09 100644 --- a/docker-files/Dockerfile +++ b/docker-files/Dockerfile @@ -6,8 +6,8 @@ MAINTAINER Andrey Zheregelya # It also starts CLI as entrypoint by default # And also contains tester script -ARG install_sovrin_common="pip3 install --no-cache-dir sovrin-common" -ARG install_sovrin_client="pip3 install --no-cache-dir sovrin-client" +ARG install_indy_common="pip3 install --no-cache-dir indy-common" +ARG install_indy_client="pip3 install --no-cache-dir indy-client" RUN apt-get update \ && apt-get install python3.5 libsodium18 libgmp3-dev flex bison libssl-dev bsdmainutils python3-pip -y \ @@ -24,7 +24,7 @@ RUN wget https://crypto.stanford.edu/pbc/files/pbc-0.5.14.tar.gz \ RUN pip3 install --upgrade pip wheel setuptools \ && pip3.5 install Charm-Crypto==0.43 \ - && $install_sovrin_common \ - && $install_sovrin_client + && $install_indy_common \ + && $install_indy_client -ENTRYPOINT ["sovrin"] +ENTRYPOINT ["indy"] diff --git a/docker-files/build-sovrin-cli-image.sh b/docker-files/build-indy-cli-image.sh similarity index 70% rename from docker-files/build-sovrin-cli-image.sh rename to docker-files/build-indy-cli-image.sh index fdad0fee1..a7bde12d0 100644 --- a/docker-files/build-sovrin-cli-image.sh +++ b/docker-files/build-indy-cli-image.sh @@ -2,7 +2,7 @@ # Let this helper script be here. But the main helper should be in special ci repo. -# Get parameter of current git repo to download sovrin code +# Get parameter of current git repo to download indy code function construct_repo_string() { local package_name="$1" @@ -13,18 +13,18 @@ function construct_repo_string() echo "$repo_string" } -package_name="sovrin-client" +package_name="indy-client" repo_string="git+$curr_url@$curr_commit#egg=$package_name" do_dev_version=0 -img_tag="sovrin-client-pub" +img_tag="indy-client-pub" folder='./' while getopts "dr:f:t:c:" opt; do case $opt in d) do_dev_version=1 - img_tag="sovrin-client-dev" + img_tag="indy-client-dev" ;; r) repo_string="$OPTARG" @@ -48,12 +48,12 @@ done shift $((OPTIND-1)) if [ $do_dev_version -eq 1 ] ; then - cd "$client_folder" && client_repo_string=$(construct_repo_string "sovrin_client") ; cd - - cd "$common_folder" && common_repo_string=$(construct_repo_string "sovrin_common") ; cd - + cd "$client_folder" && client_repo_string=$(construct_repo_string "indy_client") ; cd - + cd "$common_folder" && common_repo_string=$(construct_repo_string "indy_common") ; cd - - install_sovrin_client="pip3 install --no-cache-dir -e $client_repo_string" - install_sovrin_common="pip3 install --no-cache-dir -e $common_repo_string" - docker build -t "$img_tag" --build-arg install_sovrin="$install_sovrin_cmd" "$folder" + install_indy_client="pip3 install --no-cache-dir -e $client_repo_string" + install_indy_common="pip3 install --no-cache-dir -e $common_repo_string" + docker build -t "$img_tag" --build-arg install_indy="$install_indy_cmd" "$folder" else docker build -t "$img_tag" "$folder" fi diff --git a/docker-files/sovrin_config.py b/docker-files/indy_config.py similarity index 87% rename from docker-files/sovrin_config.py rename to docker-files/indy_config.py index 1e4e5ba5f..99b2822ca 100644 --- a/docker-files/sovrin_config.py +++ b/docker-files/indy_config.py @@ -1,5 +1,5 @@ OrientDB = { - "user": "sovrin", + "user": "indy", "password": "password", "startScript": "/opt/orientdb/bin/server.sh", "shutdownScript": "/opt/orientdb/bin/shutdown.sh" diff --git a/docs/Sovrin_Running_Locally.md b/docs/Indy_Running_Locally.md similarity index 61% rename from docs/Sovrin_Running_Locally.md rename to docs/Indy_Running_Locally.md index a824ee471..ae2a8e2f8 100644 --- a/docs/Sovrin_Running_Locally.md +++ b/docs/Indy_Running_Locally.md @@ -1,17 +1,17 @@ -# Sovrin – Running the Getting Started tutorial locally +# Indy – Running the Getting Started tutorial locally ## Overview Currently, out of the box, the [Getting Started](https://github.com/hyperledger/indy-node/blob/master/getting-started.md) tutorial uses externally running nodes and assumes that these are all up and running. However, being test nodes, sometimes they aren’t, or sometimes you just want to see everything flowing through in a local environment. -This guide describes the process of setting up a local 4 node cluster and attaching the 3 Agents required [use the Sovrin CLI](https://github.com/hyperledger/indy-node/blob/master/getting-started.md#using-the-sovrin-cli) and impersonate Alice. +This guide describes the process of setting up a local 4 node cluster and attaching the 3 Agents required [use the Indy CLI](https://github.com/hyperledger/indy-node/blob/master/getting-started.md#using-the-indy-cli) and impersonate Alice. -Note - I'm still trying to get my head around the details of Sovrin so there may be a few things I'm doing wrong or haven't yet understood! However this process is working nicely so far. +Note - I'm still trying to get my head around the details of Indy so there may be a few things I'm doing wrong or haven't yet understood! However this process is working nicely so far. ## Requirements -I’m assuming that you have Sovrin-node installed (I recommend installing this in an Ubuntu Virtual Machine if possible) – If not follow the [setup](https://github.com/hyperledger/indy-node/blob/master/setup.md) instructions. +I’m assuming that you have Indy-node installed (I recommend installing this in an Ubuntu Virtual Machine if possible) – If not follow the [setup](https://github.com/hyperledger/indy-node/blob/master/setup.md) instructions. Finally make sure that `pytest` module is installed (it is required to run test-related functionality like Faber, Acme and ThriftBank test agents): @@ -20,26 +20,26 @@ pip install pytest ``` ## Initial setup -In your home folder, create a Sovrin folder. In here we are going to put the scripts we will use to setup the environment. Then change into this folder. +In your home folder, create a Indy folder. In here we are going to put the scripts we will use to setup the environment. Then change into this folder. So first, we need to create our nodes. Create a script ```setupEnvironment.sh``` containing: ``` -# Remove .sovrin folder -rm -rf ~/.sovrin +# Remove .indy folder +rm -rf ~/.indy # Create nodes and generate initial transactions -generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 1 -generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 2 -generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 3 -generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 4 +generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 1 +generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 2 +generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 3 +generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 4 echo Environment setup complete ``` -This first clears out the ~/.sovrin folder (if it exists), creates 4 nodes and then generates all the necessary initial transactions and Stewards. +This first clears out the ~/.indy folder (if it exists), creates 4 nodes and then generates all the necessary initial transactions and Stewards. Make the script executable (chmod +x setupEnvironment.sh). @@ -53,25 +53,25 @@ At this point you are now ready to start the nodes. Open up 4 new terminal windows and in each one run one of the following commands (one in each window): ``` -start_sovrin_node Node1 9701 9702 -start_sovrin_node Node2 9703 9704 -start_sovrin_node Node3 9705 9706 -start_sovrin_node Node4 9707 9708 +start_indy_node Node1 9701 9702 +start_indy_node Node2 9703 9704 +start_indy_node Node3 9705 9706 +start_indy_node Node4 9707 9708 ``` This will start each node which should connect to each other, do their handshaking and will elect a master and backup. -At this point you have a nice 4 node Sovrin cluster running. +At this point you have a nice 4 node Indy cluster running. ## Attach Agents to the cluster Before we can connect the Faber, Acme and Thrift Agents to the cluster, we have to register (onboard) them with the cluster first. -To do this, we have to type the following commands using the Sovrin CLI tools started by typing ```sovrin```: +To do this, we have to type the following commands using the Indy CLI tools started by typing ```indy```: 1. Add the Steward key into the Keyring to assume the Steward role. Which is a trusted entity that was created earlier as part of the generate transactions process. Its key seed has been hardcoded into the test scripts at the moment so is pre-generated: ``` new key with seed 000000000000000000000000Steward1 ``` -2. Connect to the cluster as this Steward to the test Sovrin cluster we are running locally: +2. Connect to the cluster as this Steward to the test Indy cluster we are running locally: ``` connect test ``` @@ -96,18 +96,18 @@ send ATTRIB dest=H2aKRiDeq8aLZSydQMDbtf raw={"endpoint": {"ha": "127.0.0.1:7777" At this point we can start the Agents as follows, using separate sessions/windows (using [screen](https://www.gnu.org/software/screen/) for instance). ``` -python /usr/lib/python3.5/site-packages/sovrin_client/test/agent/faber.py --port 5555 -python /usr/lib/python3.5/site-packages/sovrin_client/test/agent/acme.py --port 6666 -python /usr/lib/python3.5/site-packages/sovrin_client/test/agent/thrift.py --port 7777 +python /usr/lib/python3.5/site-packages/indy_client/test/agent/faber.py --port 5555 +python /usr/lib/python3.5/site-packages/indy_client/test/agent/acme.py --port 6666 +python /usr/lib/python3.5/site-packages/indy_client/test/agent/thrift.py --port 7777 ``` -REM: you may have to change the path to your Python interpreter and the libraries according to your environment (i. e.: ```/bin/python3.5 ~/.virtualenvs/sovrin/lib/python3.5/site-packages/sovrin_client/test/agent/...```). +REM: you may have to change the path to your Python interpreter and the libraries according to your environment (i. e.: ```/bin/python3.5 ~/.virtualenvs/indy/lib/python3.5/site-packages/indy_client/test/agent/...```). -Each Agent should then start up, connect to our test Sovrin cluster, handshake and be accepted as a Trust Anchor. +Each Agent should then start up, connect to our test Indy cluster, handshake and be accepted as a Trust Anchor. ## Run Getting Started guide -At this point, you can follow the Getting Started guide from [Using Sovrin CLI](https://github.com/hyperledger/indy-node/blob/master/getting-started.md#using-the-sovrin-cli). -I recommend you use a seperate Sovrin CLI instance for this. +At this point, you can follow the Getting Started guide from [Using Indy CLI](https://github.com/hyperledger/indy-node/blob/master/getting-started.md#using-the-indy-cli). +I recommend you use a seperate Indy CLI instance for this. Here are the resulting commands ready to copy/paste: @@ -115,8 +115,8 @@ Here are the resulting commands ready to copy/paste: prompt Alice connect test -show sample/faber-invitation.sovrin -load sample/faber-invitation.sovrin +show sample/faber-invitation.indy +load sample/faber-invitation.indy sync faber show link faber accept invitation from faber @@ -125,8 +125,8 @@ show claim Transcript request claim Transcript show claim Transcript -show sample/acme-job-application.sovrin -load sample/acme-job-application.sovrin +show sample/acme-job-application.indy +load sample/acme-job-application.indy sync acme accept invitation from acme @@ -142,8 +142,8 @@ show link acme request claim Job-Certificate show claim Job-Certificate -show sample/thrift-loan-application.sovrin -load sample/thrift-loan-application.sovrin +show sample/thrift-loan-application.indy +load sample/thrift-loan-application.indy sync thrift accept invitation from thrift @@ -154,9 +154,9 @@ show proof request Loan-Application-KYC send proof Loan-Application-KYC to Thrift Bank ``` -# Resetting the Sovrin environment +# Resetting the Indy environment -If you wish to reset your Sovrin environment and recreate it again, you can remove your ```~/.sovrin``` folder. +If you wish to reset your Indy environment and recreate it again, you can remove your ```~/.indy``` folder. Then, when you want to re-create your environment from scratch, ensure that all the nodes and agents are stopped and just run the setupEnvironment.sh script. Then you can restart the Nodes, attach the agents and away you go again. diff --git a/docs/agents-in-sovrin.png b/docs/agents-in-indy.png similarity index 100% rename from docs/agents-in-sovrin.png rename to docs/agents-in-indy.png diff --git a/examples/simple_client.py b/examples/simple_client.py index d00388336..7e2a1196c 100644 --- a/examples/simple_client.py +++ b/examples/simple_client.py @@ -14,8 +14,8 @@ from stp_core.loop.looper import Looper from plenum.common.signer_simple import SimpleSigner -from sovrin_client.client.client import Client -from sovrin_common.constants import TXN_TYPE, NYM +from indy_client.client.client import Client +from indy_common.constants import TXN_TYPE, NYM def run_node(): @@ -45,7 +45,7 @@ def run_node(): client_address = ('0.0.0.0', 8000) - tmpdir = os.path.join(tempfile.gettempdir(), "sovrin_clients", + tmpdir = os.path.join(tempfile.gettempdir(), "indy_clients", clientName) client = Client(clientName, cliNodeReg, diff --git a/examples/simple_node.py b/examples/simple_node.py index 2cd300b4d..4a8da96b6 100755 --- a/examples/simple_node.py +++ b/examples/simple_node.py @@ -15,9 +15,9 @@ from stp_core.loop.looper import Looper from plenum.common.constants import NYM -from sovrin_common.constants import TRUST_ANCHOR +from indy_common.constants import TRUST_ANCHOR -from sovrin_node.server.node import Node +from indy_node.server.node import Node def run_node(): diff --git a/examples/upstart-example.conf b/examples/upstart-example.conf index eb6cb64e6..3b2f4f747 100644 --- a/examples/upstart-example.conf +++ b/examples/upstart-example.conf @@ -1,5 +1,5 @@ ######################################## -#### UPSTART SCRIPT FOR SOVRIN NODE #### +#### UPSTART SCRIPT FOR INDY NODE #### ######################################## #NOTE: This will work on systems running ubuntu 14.04 @@ -8,7 +8,7 @@ start on filesystem and started networking stop on shutdown author "Evernym, Inc. March 2016" -description "Upstart script for running a SOVRIN node" +description "Upstart script for running a INDY node" version "0.1" start on runlevel [2345] @@ -19,7 +19,7 @@ respawn limit 10 5 env PYTHON_HOME= env NODE_NAME= -env NAME=SOVRIN- +env NAME=INDY- env UID=root env GID=root env SCRIPT= diff --git a/getting-started.md b/getting-started.md index 76d4e47ef..5e82eb6b9 100644 --- a/getting-started.md +++ b/getting-started.md @@ -1,14 +1,14 @@ -# Getting Started with Sovrin +# Getting Started with Indy -## A Developer Guide from the Sovrin Foundation +## A Developer Guide from the Indy Foundation ![image alt text](banner.png) -* [Getting Started with Sovrin](#getting-started-with-sovrin) - * [What Sovrin Is, and Why it Matters](#what-sovrin-is-and-why-it-matters) +* [Getting Started with Indy](#getting-started-with-indy) + * [What Indy Is, and Why it Matters](#what-indy-is-and-why-it-matters) * [What We'll Cover](#what-well-cover) * [Alice Gets a Transcript](#alice-gets-a-transcript) - * [Install Sovrin](#install-sovrin) + * [Install Indy](#install-indy) * [Evaluate a Connection Request](#evaluate-a-connection-request) * [Accept a Connection Request](#accept-a-connection-request) * [Test Secure Interaction](#test-secure-interaction) @@ -19,21 +19,21 @@ * [Faber College Configures Transcripts](#faber-college-configures-transcripts) * [Acme Corp Defines a Job-Application](#acme-corp-defines-a-job-application) -## What Sovrin is, and Why it Matters +## What Indy is, and Why it Matters -Sovrin is a software ecosystem for private, secure, and powerful identity. It puts people — not the organizations that traditionally centralize identity — in charge of decisions about their own privacy and disclosure. This enables all kinds of rich innovation: connection contracts, revocation, novel payment workflows, asset and document management features, creative forms of escrow, curated reputation, integrations with other cool technologies, and so on. +Indy is a software ecosystem for private, secure, and powerful identity. It puts people — not the organizations that traditionally centralize identity — in charge of decisions about their own privacy and disclosure. This enables all kinds of rich innovation: connection contracts, revocation, novel payment workflows, asset and document management features, creative forms of escrow, curated reputation, integrations with other cool technologies, and so on. -Sovrin uses open-source, distributed ledger technology. These ledgers are a form of database that is provided cooperatively by a pool of participants, instead of by a giant database with a central admin. Data lives redundantly in many places, and it accrues in transactions orchestrated by many machines. Strong, industry-standard cryptography protects it. Best practices in key management and cybersecurity pervade its design. The result is a reliable, public source of truth under no single entity’s control, robust to system failure, resilient to hacking, and highly immune to subversion by hostile entities. +Indy uses open-source, distributed ledger technology. These ledgers are a form of database that is provided cooperatively by a pool of participants, instead of by a giant database with a central admin. Data lives redundantly in many places, and it accrues in transactions orchestrated by many machines. Strong, industry-standard cryptography protects it. Best practices in key management and cybersecurity pervade its design. The result is a reliable, public source of truth under no single entity’s control, robust to system failure, resilient to hacking, and highly immune to subversion by hostile entities. -If the cryptography and blockchain details feel mysterious, fear not: this guide will help introduce you to key concepts within Sovrin. You’re starting in the right place. +If the cryptography and blockchain details feel mysterious, fear not: this guide will help introduce you to key concepts within Indy. You’re starting in the right place. ## What We’ll Cover -Our goal is to introduce you to many of the concepts of Sovrin, and give you some idea of what happens behind the scenes to make it all work. +Our goal is to introduce you to many of the concepts of Indy, and give you some idea of what happens behind the scenes to make it all work. We are going to frame the exploration with a story. Alice, a graduate of the fictional Faber College, wants to apply for a job at the fictional company Acme Corp. As soon as she has the job, she wants to apply for a loan so she can buy a car. She would like to use her college transcript as proof of her education on the job application; once hired, Alice would like to use the fact of employment as evidence of her creditworthiness for the loan. -The sorts of identity and trust interactions required to pull this off are messy in the world today; they are slow, they violate privacy, and they are susceptible to fraud. We’ll show you how Sovrin is a quantum leap forward. +The sorts of identity and trust interactions required to pull this off are messy in the world today; they are slow, they violate privacy, and they are susceptible to fraud. We’ll show you how Indy is a quantum leap forward. Ready? @@ -41,40 +41,40 @@ Ready? As a graduate of Faber College, Alice receives an alumni newsletter where she learns that her alma mater is offering digital transcripts. She logs in to the college alumni website and requests her transcript by clicking **Get Transcript**. (Other ways to initiate this request might include scanning a QR code, downloading a transcript package from a published URL, etc.) -Faber College has done some prep work to offer this service to Alice. It has the role of **trust anchor** on Sovrin. A trust anchor is a person or organization that Sovrin already knows about, that is able to help bootstrap others. (It is *not* the same as what cybersecurity experts call a "trusted third party"; think of it more like a facilitator). Becoming a trust anchor is beyond the scope of this guide; for now, we’ll just assume that Faber College has jumped through some hoops and has the status. +Faber College has done some prep work to offer this service to Alice. It has the role of **trust anchor** on Indy. A trust anchor is a person or organization that Indy already knows about, that is able to help bootstrap others. (It is *not* the same as what cybersecurity experts call a "trusted third party"; think of it more like a facilitator). Becoming a trust anchor is beyond the scope of this guide; for now, we’ll just assume that Faber College has jumped through some hoops and has the status. -Alice doesn’t realize it yet, but in order to use this digital transcript she will need a new type of identity -- not the traditional identity that Faber College has built for her in its on-campus database, but a new and portable one that belongs to her, independent of all past and future relationships, that nobody can revoke or co-opt or correlate without her permission. This is a **_self-sovereign identity_** and it is the core feature for which Sovrin was named. +Alice doesn’t realize it yet, but in order to use this digital transcript she will need a new type of identity -- not the traditional identity that Faber College has built for her in its on-campus database, but a new and portable one that belongs to her, independent of all past and future relationships, that nobody can revoke or co-opt or correlate without her permission. This is a **_self-sovereign identity_** and it is the core feature for which Indy was named. -In normal contexts, managing a self - sovereign identity will require a tool such as a desktop or mobile application. It might be a standalone app, or it might leverage a third party service provider that Sovrin calls an **agency**. The Sovrin Foundation publishes reference versions of such tools. Faber College will have studied these requirements and will recommend a **_Sovrin app_** to Alice if she doesn’t already have one; this app will install as part of the workflow from the **Get Transcript** button. +In normal contexts, managing a self - sovereign identity will require a tool such as a desktop or mobile application. It might be a standalone app, or it might leverage a third party service provider that Indy calls an **agency**. The Indy Foundation publishes reference versions of such tools. Faber College will have studied these requirements and will recommend a **_Indy app_** to Alice if she doesn’t already have one; this app will install as part of the workflow from the **Get Transcript** button. -When Alice clicks **Get Transcript**, she will download a file that holds a Sovrin **connection request**. This connection request file, having a .sovrin extension and associated with her Sovrin app, will allow her to establish a secure channel of communication with another party in the Sovrin ecosystem -- Faber College. +When Alice clicks **Get Transcript**, she will download a file that holds a Indy **connection request**. This connection request file, having a .indy extension and associated with her Indy app, will allow her to establish a secure channel of communication with another party in the Indy ecosystem -- Faber College. So when Alice clicks **Get Transcript**, she will normally end up installing an app (if needed), launching it, and then being asked by the app whether she wants to accept a request to connect with Faber. For this guide, however, we’ll be using a command - line interface instead of an app, so we can see what happens behind the scenes. We will pretend to be a particularly curious and technically adventurous Alice… -## Install Sovrin -You can install a Sovrin test network in one of several ways: +## Install Indy +You can install a Indy test network in one of several ways: - **Automated VM Creation** [Create virtual machines](https://github.com/evernym/sovrin-environments/blob/master/vagrant/training/vb-multi-vm/TestSovrinClusterSetup.md) using VirtualBox and Vagrant. - - **Coming soon:** Use client side docker images to make it easy for you to play with Sovrin. + - **Coming soon:** Use client side docker images to make it easy for you to play with Indy. - **Also coming soon:** Create virtual machines in AWS. -To proceed past this point, you should have a test Sovrin Validator cluster running, either in separate nodes (VMs), or in simulation. You should also have Agent nodes (or a simulation) running with the "Faber College", "Acme Corp", and "Thrift Bank" Agents. You should also have a CLI client which gives you a command - line interface(CLI) to Sovrin. We are going to use that CLI to explore what Sovrin can do. (Sovrin also has a programmatic API, but it is not yet fully formalized, and this version of the guide doesn’t document it. +To proceed past this point, you should have a test Indy Validator cluster running, either in separate nodes (VMs), or in simulation. You should also have Agent nodes (or a simulation) running with the "Faber College", "Acme Corp", and "Thrift Bank" Agents. You should also have a CLI client which gives you a command - line interface(CLI) to Indy. We are going to use that CLI to explore what Indy can do. (Indy also has a programmatic API, but it is not yet fully formalized, and this version of the guide doesn’t document it. -## Using the Sovrin CLI -After completing the preceding, you should have a terminal with a Sovrin client CLI prompt: +## Using the Indy CLI +After completing the preceding, you should have a terminal with a Indy client CLI prompt: ``` -sovrin> +indy> ``` The CLI could play the role of multiple **identity owners** (a person like Alice, an organization like Faber College, or an IoT - style thing; these are often called "principals" in security circles). In this guide we will just be Alice but to keep things clear and explore functionality let's change the prompt: ``` -sovrin> prompt ALICE +indy> prompt ALICE ALICE> ``` Next, we will create a new empty wallet for Alice. Creating a new empty wallet basically resets the agent to a clean slate. Because this is the first time you're setting this up, this step is not actually necessary. If you're wanting to interact with other DIDs held by the agent then this does become necessary. @@ -90,7 +90,7 @@ The 'status' command gives general information about the state of the CLI. Alice ``` ALICE> status -Not connected to Sovrin network. Please connect first. +Not connected to Indy network. Please connect first. Usage: connect(test | live) @@ -99,10 +99,10 @@ Alice might also try the 'help' command to see a list of the other commands that ## Evaluate a Connection Request -To make this guide more convenient, the sovrin CLI package installs a sample Faber College invitation request in a file at //sample/faber-request.sovrin. We’re going to use this file as if it had been downloaded from Faber. (In normal usage, Alice’s Sovrin app would be doing a lot of these steps automatically.) +To make this guide more convenient, the indy CLI package installs a sample Faber College invitation request in a file at //sample/faber-request.indy. We’re going to use this file as if it had been downloaded from Faber. (In normal usage, Alice’s Indy app would be doing a lot of these steps automatically.) ``` -ALICE> show sample/faber-request.sovrin +ALICE> show sample/faber-request.indy { "connection-request": { "name": "Faber College", @@ -113,13 +113,13 @@ ALICE> show sample/faber-request.sovrin } Try Next: - load sample/faber-request.sovrin + load sample/faber-request.indy ``` -Alice sees a bunch of data that looks interesting but mysterious. She wants Sovrin to tell her if the connection request file is well formed and has something useful in it, so she uses the 'load' command: +Alice sees a bunch of data that looks interesting but mysterious. She wants Indy to tell her if the connection request file is well formed and has something useful in it, so she uses the 'load' command: ``` -ALICE> load sample/faber-request.sovrin +ALICE> load sample/faber-request.indy New wallet Default created Active wallet set to "Default" 1 connection request found for Faber College. @@ -136,14 +136,14 @@ This causes the client to parse and validate the file in addition to displaying ALICE> show connection Faber ``` -Unlike the 'show' command for files, this one asks Sovrin to show a connection. More details are exposed: +Unlike the 'show' command for files, this one asks Indy to show a connection. More details are exposed: ``` Expanding Faber to "Faber College" Connection (not yet accepted) Name: Faber College DID: not yet assigned - Trust anchor: Faber College (not yet written to Sovrin) + Trust anchor: Faber College (not yet written to Indy) Verification key: Signing key: Remote: FuN98eH2eZybECWkofW6A9BKJxxnTatBCopfUiNxo6ZB @@ -171,13 +171,13 @@ DID: not yet assigned ``` **DID** (**distributed identifier**) is an opaque, unique sequences of bits, (like UUIDs or GUIDs) that get generated when a user tries to accept the connection request. - That DID will be sent to Faber College, and used by Faber College to reference Alice in secure interactions. - Each connection request on Sovrin establishes a **pairwise relationship** when accepted. A pairwise relationship is a unique relationship between two identity owners (e.g., Faber and Alice). The relationship between them is not shareable with others; it is unique to those two parties in that each pairwise relationship uses different DIDs. (In other circles you may see this defined as two sets of data working in conjunction with each other to perform a specific function, such as in a "public" key and a "private" key working together. This is _not_ how it is defined within Sovrin.) Alice won’t use this DID with other relationships. By having independent pairwise relationships, Alice reduces the ability for others to correlate her activities across multiple interactions. + Each connection request on Indy establishes a **pairwise relationship** when accepted. A pairwise relationship is a unique relationship between two identity owners (e.g., Faber and Alice). The relationship between them is not shareable with others; it is unique to those two parties in that each pairwise relationship uses different DIDs. (In other circles you may see this defined as two sets of data working in conjunction with each other to perform a specific function, such as in a "public" key and a "private" key working together. This is _not_ how it is defined within Indy.) Alice won’t use this DID with other relationships. By having independent pairwise relationships, Alice reduces the ability for others to correlate her activities across multiple interactions. ``` -Trust anchor: Faber College(not yet written to Sovrin) +Trust anchor: Faber College(not yet written to Indy) ``` -This gives Alice a friendly name for the entity that will bootstrap the new pairwise relationship onto the Sovrin ecosystem. **Trust anchors** provide a way for DIDs to be added to Sovrin. They are generally organizations but can be persons as well. Faber College is a trust anchor, and if its connection request is accepted, will write Alice’s DID to Sovrin. +This gives Alice a friendly name for the entity that will bootstrap the new pairwise relationship onto the Indy ecosystem. **Trust anchors** provide a way for DIDs to be added to Indy. They are generally organizations but can be persons as well. Faber College is a trust anchor, and if its connection request is accepted, will write Alice’s DID to Indy. It is important to understand that this DID for Alice is not, in and of itself, the same thing as Alice’s self-sovereign identity. Rather, Alice’s identity will -- for her -- be the sum total of **_all_** of the pairwise relationships she has, and **_all_** the attributes knowable about those manifestations of her identity, across the full network. @@ -187,27 +187,27 @@ If Alice accepts this connection request, she will have a self-sovereign identit Verification key: ``` -Alice’s **verification key** allows Sovrin and Faber College to trust, in cryptographic operations, that interactions with Alice are authentically bound to her as sender or receiver. It is an [ asymmetric public key](https://en.wikipedia.org/wiki/Public-key_cryptography), in cryptographic terms, and the Sovrin CLI generated this value randomly when it loaded the connection request. +Alice’s **verification key** allows Indy and Faber College to trust, in cryptographic operations, that interactions with Alice are authentically bound to her as sender or receiver. It is an [ asymmetric public key](https://en.wikipedia.org/wiki/Public-key_cryptography), in cryptographic terms, and the Indy CLI generated this value randomly when it loaded the connection request. -The verification key is a 32 byte Ed25519 verification key. Ed25519 is a particular [elliptic curve](https://en.wikipedia.org/wiki/Elliptic_curve_cryptography), and is the default signature scheme for Sovrin. +The verification key is a 32 byte Ed25519 verification key. Ed25519 is a particular [elliptic curve](https://en.wikipedia.org/wiki/Elliptic_curve_cryptography), and is the default signature scheme for Indy. The verification key has a subtle relationship with the DID value a couple lines above it in the CLI output. There are three options possible for verification key associated with a DID: - **Empty.** There is no verkey (verification key) associated with a DID, and the DID is a **NCID** (non-cryptographic identifier). -In this case, the creator of the Sovrin identity record (the trust anchor) controls the DID, and no independent proof-of-existence is possible until either an Abbreviated or Full verkey is created. +In this case, the creator of the Indy identity record (the trust anchor) controls the DID, and no independent proof-of-existence is possible until either an Abbreviated or Full verkey is created. - **Abbreviated.** In this case, there is a verkey starting with a tilde '~' followed by 22 or 23 characters. The tilde indicates that the DID itself represents the first 16 bytes of the verkey and the string following the tilde represents the second 16 bytes of the verkey, both using base58Check encoding. - **Full.** In this case, there is a full 44 character verkey, representing a base58Check encoding of all 32 bytes of a Ed25519 verification key. In this guide, an Abbreviated key will be created and used by Alice (you'll notice the `~` prefix for the verification key later in the guide). -The key that Alice uses to interact with Faber can change if she revokes or rotates it, so accepting this connection request and activating this connection doesn’t lock Alice into permanent use of this key. [Key management events](https://en.wikipedia.org/wiki/Key_management) are discoverable in the Sovrin ledger by parties such as Faber College; we’ll touch on that later in the guide. +The key that Alice uses to interact with Faber can change if she revokes or rotates it, so accepting this connection request and activating this connection doesn’t lock Alice into permanent use of this key. [Key management events](https://en.wikipedia.org/wiki/Key_management) are discoverable in the Indy ledger by parties such as Faber College; we’ll touch on that later in the guide. ``` Signing key: < hidden > ``` -A different **signing key** is used by Alice to interact with each party on Sovrin (Faber College in this case). A signing key is an asymmetric private key, in cryptographic terms, and the Sovrin CLI also generated this value when it loaded the connection request. Alice will sign her messages to Faber College with this key, but she will never transmit the signing key anywhere. Because she signs with this key, Faber College can use the associated verification key and know it’s really dealing with Alice. +A different **signing key** is used by Alice to interact with each party on Indy (Faber College in this case). A signing key is an asymmetric private key, in cryptographic terms, and the Indy CLI also generated this value when it loaded the connection request. Alice will sign her messages to Faber College with this key, but she will never transmit the signing key anywhere. Because she signs with this key, Faber College can use the associated verification key and know it’s really dealing with Alice. It’s important that _this signing key is kept secret,_ as someone with this key can impersonate Alice. If this key is ever compromised, Alice can replace it with a new one using several methods not covered here. @@ -215,15 +215,15 @@ It’s important that _this signing key is kept secret,_ as someone with this ke Remote: FuN98eH2eZybECWkofW6A9BKJxxnTatBCopfUiNxo6ZB ``` -**Remote** is the unique DID Alice uses to reference Faber College. Faber College provided this value in the connection request. Alice can use it to look up Faber College’s verification key in the Sovrin Ledger to ensure interactions with Faber College are authentic. +**Remote** is the unique DID Alice uses to reference Faber College. Faber College provided this value in the connection request. Alice can use it to look up Faber College’s verification key in the Indy Ledger to ensure interactions with Faber College are authentic. ``` Remote Verification key: < unknown, waiting for sync > ``` -Communication from the remote can’t be confirmed unless we know its verification key. To know the true verification key of an DID, we have to query Sovrin. +Communication from the remote can’t be confirmed unless we know its verification key. To know the true verification key of an DID, we have to query Indy. -Different use cases require different levels of assurance as to how recently we’ve queried Sovrin for any key replacements. In this case we might be comfortable if we know that the key was synchronized in the last hour. But we can see that we’ve never synchronized this connection, so we don’t know what the verification key is at all. Until Alice connects to Sovrin, she won’t be able to trust communication from Faber College. +Different use cases require different levels of assurance as to how recently we’ve queried Indy for any key replacements. In this case we might be comfortable if we know that the key was synchronized in the last hour. But we can see that we’ve never synchronized this connection, so we don’t know what the verification key is at all. Until Alice connects to Indy, she won’t be able to trust communication from Faber College. ``` Remote endpoint: < unknown, waiting for sync > ``` @@ -242,7 +242,7 @@ Requests are signed by the remote. We have a signature, but we don’t yet know ``` Last synced: < this connection has not yet been synchronized > ``` -A connection stores when it was last synchronized with the Sovrin network, so we can tell how stale some of the information might be. Ultimately, values will be proved current when a transaction is committed to the ledger, so staleness isn’t dangerous -- but it makes Sovrin more efficient when identity owners work with up-to-date data. +A connection stores when it was last synchronized with the Indy network, so we can tell how stale some of the information might be. Ultimately, values will be proved current when a transaction is committed to the ledger, so staleness isn’t dangerous -- but it makes Indy more efficient when identity owners work with up-to-date data. ## Accept a Connection Request @@ -260,9 +260,9 @@ Usage: connect ``` -In order to accept a connection request, its origin must be proved. Just because a connection request says the sender is "Faber College" doesn’t make it so; the ease of forging email headers is a reminder of why we can’t just trust what a sender says. Syncing the connection with Sovrin will allow us to prove the association between Faber College’s identity and public key, but the CLI must be connected to the Sovrin network to sync -- and we haven’t connected yet. +In order to accept a connection request, its origin must be proved. Just because a connection request says the sender is "Faber College" doesn’t make it so; the ease of forging email headers is a reminder of why we can’t just trust what a sender says. Syncing the connection with Indy will allow us to prove the association between Faber College’s identity and public key, but the CLI must be connected to the Indy network to sync -- and we haven’t connected yet. -There are two Sovrin networks we might connect to. One is a test network, and the other is live (production). We’ll use the test network for the demo. +There are two Indy networks we might connect to. One is a test network, and the other is live (production). We’ll use the test network for the demo. ``` ALICE> connect test @@ -278,7 +278,7 @@ Expanding Faber to "Faber College" Request not yet verified. Connection not yet synchronized. Attempting to sync... -No key present in wallet for making request on Sovrin, so adding one +No key present in wallet for making request on Indy, so adding one Key created in wallet Default DID for key is E6HrMGPwGn4B3ASUu9xmWdAG1WqqpWPXtS9GU1BTXFmY Current DID set to E6HrMGPwGn4B3ASUu9xmWdAG1WqqpWPXtS9GU1BTXFmY @@ -294,17 +294,17 @@ Signature accepted. Response from Faber College (24.59 ms): Trust established. - DID created in Sovrin. + DID created in Indy. Available Claim(s): Transcript Synchronizing... - Confirmed DID written to Sovrin. + Confirmed DID written to Indy. Try Next: show claim "Transcript" request claim "Transcript" ``` -Accepting a connection request takes the nonce that Faber College provided, and signs it with the Alice’s signing key. It then securely transmits the signed data along with the DID and verification key to Faber College’s endpoint, which is discovered when the connection is synchronized. Faber College matches the provided nonce to the record of the nonce it sent to Alice, verifies the signature, then records Alice’s new pairwise DID in the Sovrin ledger. +Accepting a connection request takes the nonce that Faber College provided, and signs it with the Alice’s signing key. It then securely transmits the signed data along with the DID and verification key to Faber College’s endpoint, which is discovered when the connection is synchronized. Faber College matches the provided nonce to the record of the nonce it sent to Alice, verifies the signature, then records Alice’s new pairwise DID in the Indy ledger. Once the connection is accepted and synchronized, Alice inspects it again. @@ -332,11 +332,11 @@ Try Next: Notice now that the Last synced line is updated. -Alice can see now that the remote verification key and remote endpoint, as well as DID and verification key are updated, which allows her to communicate with Faber College. She can also see that the identity of the trust anchor was confirmed (from the Sovrin network), and that her connection request has been accepted. +Alice can see now that the remote verification key and remote endpoint, as well as DID and verification key are updated, which allows her to communicate with Faber College. She can also see that the identity of the trust anchor was confirmed (from the Indy network), and that her connection request has been accepted. ## Test Secure Interaction -At this point Alice is connected to Faber College and can interact in a secure way. The Sovrin CLI supports a ping command to test secure pairwise interactions. (This command is partly implemented today, and partly still a stub.) +At this point Alice is connected to Faber College and can interact in a secure way. The Indy CLI supports a ping command to test secure pairwise interactions. (This command is partly implemented today, and partly still a stub.) ``` ALICE@test> ping Faber @@ -361,13 +361,13 @@ Alice receives a successful response from Faber College. Here’s what happens b 6. Alice uses the verification key in the Faber College Connection to verify the Faber College digital signature. -She can trust the response from Faber College because (1) she connects to the current endpoint, (2) no replay - attack is possible, due to her random challenge, (3) she knows the verification key used to verify Faber College’s digital signature is the correct one because she just confirmed it on Sovrin. +She can trust the response from Faber College because (1) she connects to the current endpoint, (2) no replay - attack is possible, due to her random challenge, (3) she knows the verification key used to verify Faber College’s digital signature is the correct one because she just confirmed it on Indy. ## Inspect the Claim Notice that when Alice last showed the Faber connection, there was a new line: ```Available Claim(s): Transcript```. A **claim** is a piece of information about an identity -- a name, an age, a credit score… It is information claimed to be true. In this case, the claim is named, "Transcript". -Claims are offered by an **issuer**. An issuer may be any identity owner known to Sovrin and any issuer may issue a claim about any identity owner it can identify. The usefulness and reliability of a claim are tied to the reputation of the issuer with respect to the claim at hand. For Alice to self-issue a claim that she likes chocolate ice cream may be perfectly reasonable, but for her to self-issue a claim that she graduated from Faber College should not impress anyone. The value of this transcript is that it is provably issued by Faber College. Alice wants to use that claim. She asks for more information: +Claims are offered by an **issuer**. An issuer may be any identity owner known to Indy and any issuer may issue a claim about any identity owner it can identify. The usefulness and reliability of a claim are tied to the reputation of the issuer with respect to the claim at hand. For Alice to self-issue a claim that she likes chocolate ice cream may be perfectly reasonable, but for her to self-issue a claim that she graduated from Faber College should not impress anyone. The value of this transcript is that it is provably issued by Faber College. Alice wants to use that claim. She asks for more information: ``` ALICE@test> show claim Transcript @@ -418,10 +418,10 @@ Attributes: ## Apply for a Job -At some time in the future, Alice would like to work for Acme Corp. Normally she would browse to their website, where she would click on a hyperlink to apply for a job. Her browser would download a connection request which her Sovrin app would open; this would trigger a prompt to Alice, asking her to accept the connection with Acme Corp. Because we’re using a CLI, the interface is different, but the steps are the same. We do approximately the same things that we did when Alice was accepting Faber College’s connection request: +At some time in the future, Alice would like to work for Acme Corp. Normally she would browse to their website, where she would click on a hyperlink to apply for a job. Her browser would download a connection request which her Indy app would open; this would trigger a prompt to Alice, asking her to accept the connection with Acme Corp. Because we’re using a CLI, the interface is different, but the steps are the same. We do approximately the same things that we did when Alice was accepting Faber College’s connection request: ``` -ALICE@test> show sample/acme-job-application.sovrin +ALICE@test> show sample/acme-job-application.indy { "connection-request": { "name": "Acme Corp", @@ -446,16 +446,16 @@ ALICE@test> show sample/acme-job-application.sovrin } Try Next: - load sample/acme-job-application.sovrin + load sample/acme-job-application.indy ``` Notice that this connection request contains a **proof request**. A proof request is a request made by the party who needs verifiable proof of certain attributes that can be provided by other verified claims. (Some attributes can be marked so that they must be verified by other proven claims -- like a SSN -- and some attributes can be self-attested to -- like a nickname.) -In this case, Acme Corp is requesting that Alice provide a Job Application. The Job Application is a rich document type that has a schema defined on the Sovrin ledger; its particulars are outside the scope of this guide, but it will require a name, SSN, and degree, so it overlaps with the transcript we’ve already looked at. This becomes important below. +In this case, Acme Corp is requesting that Alice provide a Job Application. The Job Application is a rich document type that has a schema defined on the Indy ledger; its particulars are outside the scope of this guide, but it will require a name, SSN, and degree, so it overlaps with the transcript we’ve already looked at. This becomes important below. -Notice that the connection request also identifies an endpoint. This is different from our previous case, where an identity owner’s endpoint was discovered through lookup on the Sovrin ledger. Here, Acme has decided to short-circuit Sovrin and just directly publish its job application acceptor endpoint with each request. Sovrin supports this. Alice quickly works through the sequence of commands that establishes a new pairwise connection with Acme: +Notice that the connection request also identifies an endpoint. This is different from our previous case, where an identity owner’s endpoint was discovered through lookup on the Indy ledger. Here, Acme has decided to short-circuit Indy and just directly publish its job application acceptor endpoint with each request. Indy supports this. Alice quickly works through the sequence of commands that establishes a new pairwise connection with Acme: ``` -ALICE@test> load sample/acme-job-application.sovrin +ALICE@test> load sample/acme-job-application.indy 1 connection request found for Acme Corp. Creating Connection for Acme Corp. @@ -469,7 +469,7 @@ Expanding Acme to "Acme Corp" Connection (not yet accepted) Name: Acme Corp DID: not yet assigned - Trust anchor: Acme Corp (not yet written to Sovrin) + Trust anchor: Acme Corp (not yet written to Indy) Verification key: Signing key: Remote: CzkavE58zgX7rUMrzSinLr @@ -502,10 +502,10 @@ Signature accepted. Response from Acme Corp (14.81 ms): Trust established. - DID created in Sovrin. + DID created in Indy. Synchronizing... - Confirmed DID written to Sovrin. + Confirmed DID written to Indy. Try Next: show proof request "Job-Application" @@ -687,7 +687,7 @@ There is a disadvantage in this approach to data sharing though, -- it may discl Alice now loads Thrift Bank's loan application connection: ``` -ALICE@test> load sample/thrift-loan-application.sovrin +ALICE@test> load sample/thrift-loan-application.indy 1 connection request found for Thrift Bank. Creating Connection for Thrift Bank. @@ -716,10 +716,10 @@ Signature accepted. Response from Thrift Bank (1.59 ms): Trust established. - DID created in Sovrin. + DID created in Indy. Synchronizing... - Confirmed DID written to Sovrin. + Confirmed DID written to Indy. Try Next: show proof request "Loan-Application-Basic" @@ -813,7 +813,7 @@ Response from Thrift Bank (69.9 ms): ``` ## Explore the Code -Now that you've had a chance to see how Sovrin works from the outside, perhaps you'd like to see how it works underneath, from code? If so, please navigate to [Simulating Getting Started in an Event Loop](sovrin_client/test/training/test_getting_started_guide.py). +Now that you've had a chance to see how Indy works from the outside, perhaps you'd like to see how it works underneath, from code? If so, please navigate to [Simulating Getting Started in an Event Loop](indy_client/test/training/test_getting_started_guide.py). You may need to be signed into Github to view this link. # Appendix @@ -854,8 +854,8 @@ Submitted. A similar process is followed by Acme Corp. to define a Job Application. ``` -$ sovrin -sovrin> prompt +$ indy +indy> prompt acme acme> new schema name = "Job-Application" diff --git a/indy_client/__init__.py b/indy_client/__init__.py new file mode 100644 index 000000000..5d18c72a8 --- /dev/null +++ b/indy_client/__init__.py @@ -0,0 +1,12 @@ +import os +import indy_client + +from indy_client.agent.jsonpickle_util import setUpJsonpickle + +from indy_common.plugin_helper import writeAnonCredPlugin +BASE_DIR = os.path.join(os.path.expanduser("~"), ".indy") +writeAnonCredPlugin(BASE_DIR) + +# This is to setup anoncreds wallet related custom jsonpickle handlers to +# serialize/deserialize it properly +setUpJsonpickle() diff --git a/sovrin_client/agent/__init__.py b/indy_client/agent/__init__.py similarity index 100% rename from sovrin_client/agent/__init__.py rename to indy_client/agent/__init__.py diff --git a/sovrin_client/agent/agent.py b/indy_client/agent/agent.py similarity index 92% rename from sovrin_client/agent/agent.py rename to indy_client/agent/agent.py index 803f75de5..b6f230a75 100644 --- a/sovrin_client/agent/agent.py +++ b/indy_client/agent/agent.py @@ -8,14 +8,14 @@ from plenum.common.startable import Status from plenum.common.types import HA from plenum.common.util import randomString -from sovrin_client.agent.agent_net import AgentNet -from sovrin_client.client.client import Client -from sovrin_client.client.wallet.wallet import Wallet +from indy_client.agent.agent_net import AgentNet +from indy_client.client.client import Client +from indy_client.client.wallet.wallet import Wallet -from sovrin_common.config import agentLoggingLevel -from sovrin_common.config_util import getConfig -from sovrin_common.identity import Identity -from sovrin_common.strict_types import strict_types, decClassMethods +from indy_common.config import agentLoggingLevel +from indy_common.config_util import getConfig +from indy_common.identity import Identity +from indy_common.strict_types import strict_types, decClassMethods from stp_core.common.log import getlogger from stp_core.network.port_dispenser import genHa @@ -51,7 +51,7 @@ def __init__(self, self.config.baseDir) self.endpointArgs = endpointArgs - # Client used to connect to Sovrin and forward on owner's txns + # Client used to connect to Indy and forward on owner's txns self._client = client # type: Client # known identifiers of this agent's owner @@ -116,7 +116,7 @@ def onStopping(self, *args, **kwargs): def connect(self, network: str): """ - Uses the client to connect to Sovrin + Uses the client to connect to Indy :param network: (test|live) :return: """ @@ -125,7 +125,7 @@ def connect(self, network: str): def syncKeys(self): """ Iterates through ownerIdentifiers and ensures the keys are correct - according to Sovrin. Updates the updated + according to Indy. Updates the updated :return: """ raise NotImplementedError diff --git a/sovrin_client/agent/agent_cli.py b/indy_client/agent/agent_cli.py similarity index 96% rename from sovrin_client/agent/agent_cli.py rename to indy_client/agent/agent_cli.py index 77a2a3565..717079cd5 100644 --- a/sovrin_client/agent/agent_cli.py +++ b/indy_client/agent/agent_cli.py @@ -1,7 +1,7 @@ -from sovrin_client.cli.cli import SovrinCli +from indy_client.cli.cli import IndyCli -class AgentCli(SovrinCli): +class AgentCli(IndyCli): def __init__(self, name=None, agentCreator=None, *args, **kwargs): if name is not None: self.name = name diff --git a/sovrin_client/agent/agent_issuer.py b/indy_client/agent/agent_issuer.py similarity index 91% rename from sovrin_client/agent/agent_issuer.py rename to indy_client/agent/agent_issuer.py index bd9d3bb31..c841f45c6 100644 --- a/sovrin_client/agent/agent_issuer.py +++ b/indy_client/agent/agent_issuer.py @@ -4,12 +4,12 @@ from anoncreds.protocol.issuer import Issuer from anoncreds.protocol.types import ID from anoncreds.protocol.types import ClaimRequest -from sovrin_client.agent.constants import EVENT_NOTIFY_MSG, CLAIMS_LIST_FIELD -from sovrin_client.agent.msg_constants import CLAIM, CLAIM_REQ_FIELD, CLAIM_FIELD, \ +from indy_client.agent.constants import EVENT_NOTIFY_MSG, CLAIMS_LIST_FIELD +from indy_client.agent.msg_constants import CLAIM, CLAIM_REQ_FIELD, CLAIM_FIELD, \ AVAIL_CLAIM_LIST, REVOC_REG_SEQ_NO, SCHEMA_SEQ_NO, ISSUER_DID -from sovrin_common.identity import Identity +from indy_common.identity import Identity from plenum.common.constants import DATA -from sovrin_client.client.wallet.attribute import Attribute +from indy_client.client.wallet.attribute import Attribute class AgentIssuer: diff --git a/sovrin_client/agent/agent_net.py b/indy_client/agent/agent_net.py similarity index 94% rename from sovrin_client/agent/agent_net.py rename to indy_client/agent/agent_net.py index f2ef3f275..c2bf63ae7 100644 --- a/sovrin_client/agent/agent_net.py +++ b/indy_client/agent/agent_net.py @@ -1,4 +1,4 @@ -from sovrin_client.agent.endpoint import REndpoint, ZEndpoint +from indy_client.agent.endpoint import REndpoint, ZEndpoint class AgentNet: diff --git a/sovrin_client/agent/agent_prover.py b/indy_client/agent/agent_prover.py similarity index 97% rename from sovrin_client/agent/agent_prover.py rename to indy_client/agent/agent_prover.py index 12ccac52e..166bff3b3 100644 --- a/sovrin_client/agent/agent_prover.py +++ b/indy_client/agent/agent_prover.py @@ -9,11 +9,11 @@ from anoncreds.protocol.prover import Prover from anoncreds.protocol.types import SchemaKey, ID, Claims, ClaimAttributeValues, ProofRequest -from sovrin_client.agent.msg_constants import CLAIM_REQUEST, PROOF, CLAIM_FIELD, \ +from indy_client.agent.msg_constants import CLAIM_REQUEST, PROOF, CLAIM_FIELD, \ CLAIM_REQ_FIELD, PROOF_FIELD, \ REQ_AVAIL_CLAIMS, ISSUER_DID, SCHEMA_SEQ_NO, PROOF_REQUEST_FIELD -from sovrin_client.client.wallet.connection import Connection -from sovrin_common.exceptions import LinkNotReady +from indy_client.client.wallet.connection import Connection +from indy_common.exceptions import LinkNotReady class AgentProver: diff --git a/sovrin_client/agent/agent_verifier.py b/indy_client/agent/agent_verifier.py similarity index 95% rename from sovrin_client/agent/agent_verifier.py rename to indy_client/agent/agent_verifier.py index 8ecf32122..0d55998b1 100644 --- a/sovrin_client/agent/agent_verifier.py +++ b/indy_client/agent/agent_verifier.py @@ -7,10 +7,10 @@ from anoncreds.protocol.types import FullProof, ProofInfo, ID, AggregatedProof, RequestedProof from anoncreds.protocol.types import ProofRequest from anoncreds.protocol.verifier import Verifier -from sovrin_client.agent.msg_constants import PROOF_STATUS, PROOF_FIELD, PROOF_REQUEST, \ +from indy_client.agent.msg_constants import PROOF_STATUS, PROOF_FIELD, PROOF_REQUEST, \ PROOF_REQUEST_FIELD, ERR_NO_PROOF_REQUEST_SCHEMA_FOUND -from sovrin_client.client.wallet.connection import Connection -from sovrin_common.util import getNonceForProof +from indy_client.client.wallet.connection import Connection +from indy_common.util import getNonceForProof class AgentVerifier(Verifier): diff --git a/sovrin_client/agent/backend.py b/indy_client/agent/backend.py similarity index 100% rename from sovrin_client/agent/backend.py rename to indy_client/agent/backend.py diff --git a/sovrin_client/agent/caching.py b/indy_client/agent/caching.py similarity index 93% rename from sovrin_client/agent/caching.py rename to indy_client/agent/caching.py index 291f29dcb..35ceb04c0 100644 --- a/sovrin_client/agent/caching.py +++ b/indy_client/agent/caching.py @@ -1,5 +1,5 @@ from plenum.common.exceptions import NotConnectedToAny -from sovrin_common.identity import Identity +from indy_common.identity import Identity class Caching: diff --git a/sovrin_client/agent/constants.py b/indy_client/agent/constants.py similarity index 100% rename from sovrin_client/agent/constants.py rename to indy_client/agent/constants.py diff --git a/sovrin_client/agent/endpoint.py b/indy_client/agent/endpoint.py similarity index 100% rename from sovrin_client/agent/endpoint.py rename to indy_client/agent/endpoint.py diff --git a/sovrin_client/agent/exception.py b/indy_client/agent/exception.py similarity index 100% rename from sovrin_client/agent/exception.py rename to indy_client/agent/exception.py diff --git a/sovrin_client/agent/helper.py b/indy_client/agent/helper.py similarity index 95% rename from sovrin_client/agent/helper.py rename to indy_client/agent/helper.py index 956a5c01d..fc6d58be8 100644 --- a/sovrin_client/agent/helper.py +++ b/indy_client/agent/helper.py @@ -2,8 +2,8 @@ from plenum.common.signer_did import DidSigner from plenum.common.util import friendlyToRaw, rawToFriendly -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_common.config_util import getConfig +from indy_client.client.wallet.wallet import Wallet +from indy_common.config_util import getConfig from stp_core.crypto.util import ed25519PkToCurve25519 diff --git a/sovrin_client/agent/jsonpickle_util.py b/indy_client/agent/jsonpickle_util.py similarity index 100% rename from sovrin_client/agent/jsonpickle_util.py rename to indy_client/agent/jsonpickle_util.py diff --git a/sovrin_client/agent/msg_constants.py b/indy_client/agent/msg_constants.py similarity index 100% rename from sovrin_client/agent/msg_constants.py rename to indy_client/agent/msg_constants.py diff --git a/sovrin_client/agent/run_agent.py b/indy_client/agent/run_agent.py similarity index 93% rename from sovrin_client/agent/run_agent.py rename to indy_client/agent/run_agent.py index abcf6b7e1..53e941481 100644 --- a/sovrin_client/agent/run_agent.py +++ b/indy_client/agent/run_agent.py @@ -3,8 +3,8 @@ from plenum.common.exceptions import NoConsensusYet from stp_core.common.log import getlogger -from sovrin_client.agent.agent_cli import AgentCli -from sovrin_common.config_util import getConfig +from indy_client.agent.agent_cli import AgentCli +from indy_common.config_util import getConfig from stp_core.loop.looper import Looper @@ -16,7 +16,7 @@ async def runBootstrap(bootstrapFunc): await bootstrapFunc except TimeoutError as exc: raise NoConsensusYet("consensus is not yet achieved, " - "check if sovrin is running and " + "check if indy is running and " "client is able to connect to it") from exc diff --git a/sovrin_client/agent/runnable_agent.py b/indy_client/agent/runnable_agent.py similarity index 90% rename from sovrin_client/agent/runnable_agent.py rename to indy_client/agent/runnable_agent.py index e1947b590..1fe277ae3 100644 --- a/sovrin_client/agent/runnable_agent.py +++ b/indy_client/agent/runnable_agent.py @@ -1,11 +1,11 @@ import sys import argparse -from sovrin_client.agent.agent import Agent -from sovrin_client.agent.run_agent import runAgentCli, runAgent +from indy_client.agent.agent import Agent +from indy_client.agent.run_agent import runAgentCli, runAgent from stp_core.common.log import getlogger from plenum.common.util import getFormattedErrorMsg -from sovrin_common.config_util import getConfig +from indy_common.config_util import getConfig logger = getlogger() diff --git a/sovrin_client/agent/walleted.py b/indy_client/agent/walleted.py similarity index 95% rename from sovrin_client/agent/walleted.py rename to indy_client/agent/walleted.py index c7829ced2..1cbbfe1ba 100644 --- a/sovrin_client/agent/walleted.py +++ b/indy_client/agent/walleted.py @@ -24,30 +24,30 @@ from anoncreds.protocol.globals import TYPE_CL from anoncreds.protocol.types import AttribDef, ID, ProofRequest, AvailableClaim from plenum.common.exceptions import NotConnectedToAny -from sovrin_client.agent.agent_issuer import AgentIssuer -from sovrin_client.agent.backend import BackendSystem -from sovrin_client.agent.agent_prover import AgentProver -from sovrin_client.agent.agent_verifier import AgentVerifier -from sovrin_client.agent.constants import ALREADY_ACCEPTED_FIELD, CLAIMS_LIST_FIELD, \ +from indy_client.agent.agent_issuer import AgentIssuer +from indy_client.agent.backend import BackendSystem +from indy_client.agent.agent_prover import AgentProver +from indy_client.agent.agent_verifier import AgentVerifier +from indy_client.agent.constants import ALREADY_ACCEPTED_FIELD, CLAIMS_LIST_FIELD, \ REQ_MSG, PING, ERROR, EVENT, EVENT_NAME, EVENT_NOTIFY_MSG, \ EVENT_POST_ACCEPT_INVITE, PONG, EVENT_NOT_CONNECTED_TO_ANY_ENV -from sovrin_client.agent.exception import NonceNotFound, SignatureRejected -from sovrin_client.agent.helper import friendlyVerkeyToPubkey, rawVerkeyToPubkey -from sovrin_client.agent.msg_constants import ACCEPT_INVITE, CLAIM_REQUEST, \ +from indy_client.agent.exception import NonceNotFound, SignatureRejected +from indy_client.agent.helper import friendlyVerkeyToPubkey, rawVerkeyToPubkey +from indy_client.agent.msg_constants import ACCEPT_INVITE, CLAIM_REQUEST, \ PROOF, AVAIL_CLAIM_LIST, CLAIM, PROOF_STATUS, NEW_AVAILABLE_CLAIMS, \ REF_REQUEST_ID, REQ_AVAIL_CLAIMS, INVITE_ACCEPTED, PROOF_REQUEST -from sovrin_client.client.wallet.attribute import Attribute, LedgerStore -from sovrin_client.client.wallet.connection import Connection, constant -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_common.exceptions import ConnectionNotFound, ConnectionAlreadyExists, \ +from indy_client.client.wallet.attribute import Attribute, LedgerStore +from indy_client.client.wallet.connection import Connection, constant +from indy_client.client.wallet.wallet import Wallet +from indy_common.exceptions import ConnectionNotFound, ConnectionAlreadyExists, \ NotConnectedToNetwork, LinkNotReady, VerkeyNotFound, RemoteEndpointNotFound -from sovrin_common.identity import Identity -from sovrin_common.constants import ENDPOINT -from sovrin_common.util import ensureReqCompleted -from sovrin_common.config import agentLoggingLevel -from sovrin_common.exceptions import InvalidConnectionException +from indy_common.identity import Identity +from indy_common.constants import ENDPOINT +from indy_common.util import ensureReqCompleted +from indy_common.config import agentLoggingLevel +from indy_common.exceptions import InvalidConnectionException from plenum.common.constants import PUBKEY -from sovrin_common.util import getNonceForProof +from indy_common.util import getNonceForProof logger = getlogger() logger.setLevel(agentLoggingLevel) @@ -521,7 +521,7 @@ def _handleAcceptInviteResponse(self, msg): if alreadyAccepted: self.notifyMsgListener(" Already accepted.") else: - self.notifyMsgListener(" DID created in Sovrin.") + self.notifyMsgListener(" DID created in Indy.") li.connection_status = constant.CONNECTION_STATUS_ACCEPTED rcvdAvailableClaims = body[DATA][CLAIMS_LIST_FIELD] @@ -532,17 +532,17 @@ def _handleAcceptInviteResponse(self, msg): self.notifyMsgListener(" Available Claim(s): {}". format( ",".join([rc.get(NAME) for rc in rcvdAvailableClaims]))) try: - self._checkIfLinkIdentifierWrittenToSovrin( + self._checkIfLinkIdentifierWrittenToIndy( li, newAvailableClaims) except NotConnectedToAny: self.notifyEventListeners( EVENT_NOT_CONNECTED_TO_ANY_ENV, - msg="Cannot check if identifier is written to Sovrin.") + msg="Cannot check if identifier is written to Indy.") else: self.notifyMsgListener("No matching connection found") def getVerkeyForLink(self, link): - # TODO: Get latest verkey for this link's remote identifier from Sovrin + # TODO: Get latest verkey for this link's remote identifier from Indy if link.remoteVerkey: return link.remoteVerkey else: @@ -562,7 +562,7 @@ def verifySignature(self, msg: Dict[str, str]): identifier = msg.get(IDENTIFIER) msgWithoutSig = {k: v for k, v in msg.items() if k != f.SIG.nm} # TODO This assumes the current key is the cryptonym. This is a BAD - # ASSUMPTION!!! Sovrin needs to provide the current key. + # ASSUMPTION!!! Indy needs to provide the current key. ser = serialize_msg_for_signing(msgWithoutSig) signature = b58decode(signature.encode()) typ = msg.get(TYPE) @@ -577,7 +577,7 @@ def verifySignature(self, msg: Dict[str, str]): except (ConnectionNotFound, VerkeyNotFound): # This is for verification of `NOTIFY` events link = self.wallet.getConnectionBy(remote=identifier) - # TODO: If verkey is None, it should be fetched from Sovrin. + # TODO: If verkey is None, it should be fetched from Indy. # Assuming CID for now. verkey = link.remoteVerkey @@ -592,7 +592,7 @@ def verifySignature(self, msg: Dict[str, str]): def _getLinkByTarget(self, target) -> Connection: return self.wallet.getConnectionBy(remote=target) - def _checkIfLinkIdentifierWrittenToSovrin( + def _checkIfLinkIdentifierWrittenToIndy( self, li: Connection, availableClaims): req = self.getIdentity(li.localIdentifier) self.notifyMsgListener("\nSynchronizing...") @@ -601,12 +601,12 @@ def getNymReply(reply, err, availableClaims, li: Connection): if reply.get(DATA) and json.loads(reply[DATA])[TARGET_NYM] == \ li.localIdentifier: self.notifyMsgListener( - " Confirmed DID written to Sovrin.") + " Confirmed DID written to Indy.") self.notifyEventListeners( EVENT_POST_ACCEPT_INVITE, connection=li) else: self.notifyMsgListener( - " DID is not yet written to Sovrin") + " DID is not yet written to Indy") self.loop.call_later(.2, ensureReqCompleted, self.loop, req.key, self.client, getNymReply, (availableClaims, li)) @@ -673,7 +673,7 @@ def send_claims(reply=None, error=None): send_claims() logger.debug("already accepted, " "so directly sending available claims") - self.logger.info('Already added identifier [{}] in sovrin' + self.logger.info('Already added identifier [{}] in indy' .format(identifier)) # self.notifyToRemoteCaller(EVENT_NOTIFY_MSG, # " Already accepted", @@ -684,14 +684,14 @@ def send_claims(reply=None, error=None): "and then will send available claims") reqs = self.wallet.preparePending() # Assuming there was only one pending request - logger.debug("sending to sovrin {}".format(reqs[0])) + logger.debug("sending to indy {}".format(reqs[0])) # Need to think through # how to provide separate logging for each agent # anyhow this class should be implemented by each agent # so we might not even need to add it as a separate logic - self.logger.info('Creating identifier [{}] in sovrin' + self.logger.info('Creating identifier [{}] in indy' .format(identifier)) - self._sendToSovrinAndDo(reqs[0], clbk=send_claims) + self._sendToIndyAndDo(reqs[0], clbk=send_claims) # TODO: If I have the below exception thrown, somehow the # error msg which is sent in verifyAndGetLink is not being received @@ -709,7 +709,7 @@ def sendClaimList(self, link, alreadyAdded, sender, self.signAndSend(resp, link.localIdentifier, sender, origReqId=reqId) - def _sendToSovrinAndDo(self, req, clbk=None, *args, **kwargs): + def _sendToIndyAndDo(self, req, clbk=None, *args, **kwargs): self.client.submitReqs(req) ensureReqCompleted(self.loop, req.key, self.client, clbk, *args, **kwargs) diff --git a/sovrin_client/agent/walleted_agent.py b/indy_client/agent/walleted_agent.py similarity index 88% rename from sovrin_client/agent/walleted_agent.py rename to indy_client/agent/walleted_agent.py index 2d63064cc..6b8acbe42 100644 --- a/sovrin_client/agent/walleted_agent.py +++ b/indy_client/agent/walleted_agent.py @@ -4,15 +4,15 @@ from plenum.client.wallet import WalletStorageHelper from plenum.common.util import normalizedWalletFileName, getLastSavedWalletFileName, getWalletFilePath, \ updateWalletsBaseDirNameIfOutdated -from sovrin_client.agent.agent import Agent -from sovrin_client.agent.caching import Caching -from sovrin_client.agent.walleted import Walleted -from sovrin_client.anon_creds.sovrin_issuer import SovrinIssuer -from sovrin_client.anon_creds.sovrin_prover import SovrinProver -from sovrin_client.anon_creds.sovrin_verifier import SovrinVerifier -from sovrin_client.client.client import Client -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_common.config_util import getConfig +from indy_client.agent.agent import Agent +from indy_client.agent.caching import Caching +from indy_client.agent.walleted import Walleted +from indy_client.anon_creds.indy_issuer import IndyIssuer +from indy_client.anon_creds.indy_prover import IndyProver +from indy_client.anon_creds.indy_verifier import IndyVerifier +from indy_client.client.client import Client +from indy_client.client.wallet.wallet import Wallet +from indy_common.config_util import getConfig from anoncreds.protocol.repo.attributes_repo import AttributeRepoInMemory @@ -61,10 +61,10 @@ def __init__(self, self._restoreIssuerWallet() def _initIssuerProverVerifier(self): - self.issuer = SovrinIssuer(client=self.client, wallet=self._wallet, - attrRepo=self._attrRepo) - self.prover = SovrinProver(client=self.client, wallet=self._wallet) - self.verifier = SovrinVerifier(client=self.client, wallet=self._wallet) + self.issuer = IndyIssuer(client=self.client, wallet=self._wallet, + attrRepo=self._attrRepo) + self.prover = IndyProver(client=self.client, wallet=self._wallet) + self.verifier = IndyVerifier(client=self.client, wallet=self._wallet) @property def wallet(self): diff --git a/sovrin_client/anon_creds/__init__.py b/indy_client/anon_creds/__init__.py similarity index 100% rename from sovrin_client/anon_creds/__init__.py rename to indy_client/anon_creds/__init__.py diff --git a/sovrin_client/anon_creds/constant.py b/indy_client/anon_creds/constant.py similarity index 100% rename from sovrin_client/anon_creds/constant.py rename to indy_client/anon_creds/constant.py diff --git a/sovrin_client/anon_creds/sovrin_issuer.py b/indy_client/anon_creds/indy_issuer.py similarity index 80% rename from sovrin_client/anon_creds/sovrin_issuer.py rename to indy_client/anon_creds/indy_issuer.py index 2453fa432..a72bf2ff8 100644 --- a/sovrin_client/anon_creds/sovrin_issuer.py +++ b/indy_client/anon_creds/indy_issuer.py @@ -2,16 +2,16 @@ from anoncreds.protocol.repo.attributes_repo import AttributeRepo from anoncreds.protocol.repo.public_repo import PublicRepo from anoncreds.protocol.wallet.issuer_wallet import IssuerWalletInMemory -from sovrin_client.anon_creds.sovrin_public_repo import SovrinPublicRepo -from sovrin_client.client.wallet.wallet import Wallet +from indy_client.anon_creds.indy_public_repo import IndyPublicRepo +from indy_client.client.wallet.wallet import Wallet -class SovrinIssuer(Issuer): +class IndyIssuer(Issuer): def __init__(self, client, wallet: Wallet, attrRepo: AttributeRepo, publicRepo: PublicRepo = None): - publicRepo = publicRepo or SovrinPublicRepo(client=client, - wallet=wallet) - issuerWallet = SovrinIssuerWalletInMemory(wallet.name, publicRepo) + publicRepo = publicRepo or IndyPublicRepo(client=client, + wallet=wallet) + issuerWallet = IndyIssuerWalletInMemory(wallet.name, publicRepo) super().__init__(issuerWallet, attrRepo) @@ -30,7 +30,7 @@ def restorePersistedWallet(self, issuerWallet): self.wallet._repo.client = curRepoClient -class SovrinIssuerWalletInMemory(IssuerWalletInMemory): +class IndyIssuerWalletInMemory(IssuerWalletInMemory): def __init__(self, name, pubRepo): diff --git a/sovrin_client/anon_creds/sovrin_prover.py b/indy_client/anon_creds/indy_prover.py similarity index 66% rename from sovrin_client/anon_creds/sovrin_prover.py rename to indy_client/anon_creds/indy_prover.py index 28181074d..ee0881f5d 100644 --- a/sovrin_client/anon_creds/sovrin_prover.py +++ b/indy_client/anon_creds/indy_prover.py @@ -1,13 +1,13 @@ from anoncreds.protocol.prover import Prover from anoncreds.protocol.repo.public_repo import PublicRepo from anoncreds.protocol.wallet.prover_wallet import ProverWalletInMemory -from sovrin_client.anon_creds.sovrin_public_repo import SovrinPublicRepo -from sovrin_client.client.wallet.wallet import Wallet +from indy_client.anon_creds.indy_public_repo import IndyPublicRepo +from indy_client.client.wallet.wallet import Wallet -class SovrinProver(Prover): +class IndyProver(Prover): def __init__(self, client, wallet: Wallet, publicRepo: PublicRepo = None): - publicRepo = publicRepo or SovrinPublicRepo( + publicRepo = publicRepo or IndyPublicRepo( client=client, wallet=wallet) proverWallet = ProverWalletInMemory(wallet.name, publicRepo) super().__init__(proverWallet) diff --git a/sovrin_client/anon_creds/sovrin_public_repo.py b/indy_client/anon_creds/indy_public_repo.py similarity index 97% rename from sovrin_client/anon_creds/sovrin_public_repo.py rename to indy_client/anon_creds/indy_public_repo.py index 51b4d1352..6ce7fcf3c 100644 --- a/sovrin_client/anon_creds/sovrin_public_repo.py +++ b/indy_client/anon_creds/indy_public_repo.py @@ -10,15 +10,15 @@ from plenum.common.constants import TARGET_NYM, TXN_TYPE, DATA, NAME, \ VERSION, TYPE, ORIGIN, IDENTIFIER -from sovrin_common.constants import GET_SCHEMA, SCHEMA, ATTR_NAMES, \ +from indy_common.constants import GET_SCHEMA, SCHEMA, ATTR_NAMES, \ GET_CLAIM_DEF, REF, CLAIM_DEF, PRIMARY, REVOCATION, GET_TXNS from anoncreds.protocol.repo.public_repo import PublicRepo from anoncreds.protocol.types import Schema, ID, PublicKey, \ RevocationPublicKey, AccumulatorPublicKey, \ Accumulator, Tails, TimestampType -from sovrin_common.types import Request -from sovrin_common.constants import SIGNATURE_TYPE +from indy_common.types import Request +from indy_common.constants import SIGNATURE_TYPE def _ensureReqCompleted(reqKey, client, clbk): @@ -53,7 +53,7 @@ def _submitData(result, error): logger = getlogger() -class SovrinPublicRepo(PublicRepo): +class IndyPublicRepo(PublicRepo): def __init__(self, client, wallet): self.client = client self.wallet = wallet diff --git a/sovrin_client/anon_creds/sovrin_verifier.py b/indy_client/anon_creds/indy_verifier.py similarity index 65% rename from sovrin_client/anon_creds/sovrin_verifier.py rename to indy_client/anon_creds/indy_verifier.py index 334d26150..e8d028d69 100644 --- a/sovrin_client/anon_creds/sovrin_verifier.py +++ b/indy_client/anon_creds/indy_verifier.py @@ -3,13 +3,13 @@ from anoncreds.protocol.verifier import Verifier from anoncreds.protocol.wallet.wallet import WalletInMemory -from sovrin_client.anon_creds.sovrin_public_repo import SovrinPublicRepo -from sovrin_client.client.wallet.wallet import Wallet +from indy_client.anon_creds.indy_public_repo import IndyPublicRepo +from indy_client.client.wallet.wallet import Wallet -class SovrinVerifier(Verifier): +class IndyVerifier(Verifier): def __init__(self, client, wallet: Wallet, publicRepo: PublicRepo = None): - publicRepo = publicRepo or SovrinPublicRepo( + publicRepo = publicRepo or IndyPublicRepo( client=client, wallet=wallet) verifierWallet = WalletInMemory(wallet.defaultId, publicRepo) super().__init__(verifierWallet) diff --git a/sovrin_client/cli/__init__.py b/indy_client/cli/__init__.py similarity index 100% rename from sovrin_client/cli/__init__.py rename to indy_client/cli/__init__.py diff --git a/sovrin_client/cli/cli.py b/indy_client/cli/cli.py similarity index 95% rename from sovrin_client/cli/cli.py rename to indy_client/cli/cli.py index e309d8f73..5f1b0102c 100644 --- a/sovrin_client/cli/cli.py +++ b/indy_client/cli/cli.py @@ -35,11 +35,11 @@ from plenum.common.types import f from plenum.common.util import randomString, getWalletFilePath -from sovrin_client.agent.walleted_agent import WalletedAgent -from sovrin_client.agent.constants import EVENT_NOTIFY_MSG, EVENT_POST_ACCEPT_INVITE, \ +from indy_client.agent.walleted_agent import WalletedAgent +from indy_client.agent.constants import EVENT_NOTIFY_MSG, EVENT_POST_ACCEPT_INVITE, \ EVENT_NOT_CONNECTED_TO_ANY_ENV -from sovrin_client.agent.msg_constants import ERR_NO_PROOF_REQUEST_SCHEMA_FOUND -from sovrin_client.cli.command import acceptConnectionCmd, connectToCmd, \ +from indy_client.agent.msg_constants import ERR_NO_PROOF_REQUEST_SCHEMA_FOUND +from indy_client.cli.command import acceptConnectionCmd, connectToCmd, \ disconnectCmd, loadFileCmd, newDIDCmd, pingTargetCmd, reqClaimCmd, \ sendAttribCmd, sendProofCmd, sendGetNymCmd, sendClaimDefCmd, sendNodeCmd, \ sendGetAttrCmd, sendGetSchemaCmd, sendGetClaimDefCmd, \ @@ -47,35 +47,35 @@ listClaimsCmd, showFileCmd, showConnectionCmd, syncConnectionCmd, addGenesisTxnCmd, \ sendProofRequestCmd, showProofRequestCmd, reqAvailClaimsCmd, listConnectionsCmd, sendPoolConfigCmd, changeKeyCmd -from sovrin_client.cli.helper import getNewClientGrams, \ +from indy_client.cli.helper import getNewClientGrams, \ USAGE_TEXT, NEXT_COMMANDS_TO_TRY_TEXT -from sovrin_client.client.client import Client -from sovrin_client.client.wallet.attribute import Attribute, LedgerStore -from sovrin_client.client.wallet.connection import Connection -from sovrin_client.client.wallet.node import Node -from sovrin_client.client.wallet.upgrade import Upgrade -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_client.client.wallet.pool_config import PoolConfig -from sovrin_common.auth import Authoriser -from sovrin_common.config import ENVS -from sovrin_common.config_util import getConfig -from sovrin_common.exceptions import InvalidConnectionException, ConnectionAlreadyExists, \ +from indy_client.client.client import Client +from indy_client.client.wallet.attribute import Attribute, LedgerStore +from indy_client.client.wallet.connection import Connection +from indy_client.client.wallet.node import Node +from indy_client.client.wallet.upgrade import Upgrade +from indy_client.client.wallet.wallet import Wallet +from indy_client.client.wallet.pool_config import PoolConfig +from indy_common.auth import Authoriser +from indy_common.config import ENVS +from indy_common.config_util import getConfig +from indy_common.exceptions import InvalidConnectionException, ConnectionAlreadyExists, \ ConnectionNotFound, NotConnectedToNetwork -from sovrin_common.identity import Identity -from sovrin_common.constants import TARGET_NYM, ROLE, TXN_TYPE, NYM, REF, \ +from indy_common.identity import Identity +from indy_common.constants import TARGET_NYM, ROLE, TXN_TYPE, NYM, REF, \ ACTION, SHA256, TIMEOUT, SCHEDULE, GET_SCHEMA, \ START, JUSTIFICATION, NULL, WRITES, REINSTALL from stp_core.crypto.signer import Signer from stp_core.crypto.util import cleanSeed from stp_core.network.port_dispenser import genHa -from sovrin_common.roles import Roles -from sovrin_common.txn_util import getTxnOrderedFields -from sovrin_common.util import ensureReqCompleted, getIndex -from sovrin_node.__metadata__ import __version__ +from indy_common.roles import Roles +from indy_common.txn_util import getTxnOrderedFields +from indy_common.util import ensureReqCompleted, getIndex +from indy_node.__metadata__ import __version__ try: - nodeMod = importlib.import_module('sovrin_node.server.node') + nodeMod = importlib.import_module('indy_node.server.node') nodeClass = nodeMod.Node except ImportError: nodeClass = None @@ -83,7 +83,7 @@ """ Objective The plenum cli bootstraps client keys by just adding them to the nodes. -Sovrin needs the client nyms to be added as transactions first. +Indy needs the client nyms to be added as transactions first. I'm thinking maybe the cli needs to support something like this: new node all @@ -98,11 +98,11 @@ ("selfAttestedAttrs", Any)]) -class SovrinCli(PlenumCli): - name = 'sovrin' - properName = 'Sovrin' - fullName = 'Sovrin Identity platform' - githubUrl = 'https://github.com/sovrin-foundation/sovrin-common/tree/stable/data' +class IndyCli(PlenumCli): + name = 'indy' + properName = 'Indy' + fullName = 'Indy Identity platform' + githubUrl = 'https://github.com/hyperledger/indy-node' NodeClass = nodeClass ClientClass = Client @@ -225,7 +225,7 @@ def initializeGrammar(self): @property def actions(self): actions = super().actions - # Add more actions to base class for sovrin CLI + # Add more actions to base class for indy CLI if self._sendNymAction not in actions: actions.extend([self._sendNymAction, self._sendGetNymAction, @@ -389,7 +389,7 @@ def _printCannotSyncSinceNotConnectedEnvMessage(self): self._printConnectUsage() def _printNotConnectedEnvMessage(self, - prefix="Not connected to Sovrin network"): + prefix="Not connected to Indy network"): self.print("{}. Please connect first.".format(prefix)) self._printConnectUsage() @@ -785,7 +785,7 @@ def parseAttributeString(attrs): def _sendNymAction(self, matchedVars): if matchedVars.get('send_nym') == sendNymCmd.id: - if not self.canMakeSovrinRequest: + if not self.canMakeIndyRequest: return True nym = matchedVars.get('dest_id') role = self._getRole(matchedVars) @@ -801,7 +801,7 @@ def _sendGetNymAction(self, matchedVars): if matchedVars.get('send_get_nym') == sendGetNymCmd.id: if not self.hasAnyKey: return True - if not self.canMakeSovrinRequest: + if not self.canMakeIndyRequest: return True destId = matchedVars.get('dest_id') self._getNym(destId) @@ -809,7 +809,7 @@ def _sendGetNymAction(self, matchedVars): def _sendAttribAction(self, matchedVars): if matchedVars.get('send_attrib') == sendAttribCmd.id: - if not self.canMakeSovrinRequest: + if not self.canMakeIndyRequest: return True nym = matchedVars.get('dest_id') raw = matchedVars.get('raw') \ @@ -825,7 +825,7 @@ def _sendGetAttrAction(self, matchedVars): if matchedVars.get('send_get_attr') == sendGetAttrCmd.id: if not self.hasAnyKey: return True - if not self.canMakeSovrinRequest: + if not self.canMakeIndyRequest: return True nym = matchedVars.get('dest_id') raw = matchedVars.get('raw') \ @@ -839,7 +839,7 @@ def _sendGetAttrAction(self, matchedVars): def _sendGetSchemaAction(self, matchedVars): if matchedVars.get('send_get_schema') == sendGetSchemaCmd.id: - if not self.canMakeSovrinRequest: + if not self.canMakeIndyRequest: return True self.logger.debug("Processing GET_SCHEMA request") nym = matchedVars.get('dest_id') @@ -850,7 +850,7 @@ def _sendGetSchemaAction(self, matchedVars): def _sendGetClaimDefAction(self, matchedVars): if matchedVars.get('send_get_claim_def') == sendGetClaimDefCmd.id: - if not self.canMakeSovrinRequest: + if not self.canMakeIndyRequest: return True self.logger.debug("Processing GET_CLAIM_DEF request") seqNo = int(matchedVars.get('ref')) @@ -860,7 +860,7 @@ def _sendGetClaimDefAction(self, matchedVars): def _sendNodeAction(self, matchedVars): if matchedVars.get('send_node') == sendNodeCmd.id: - if not self.canMakeSovrinRequest: + if not self.canMakeIndyRequest: return True nym = matchedVars.get('dest_id') data = matchedVars.get('data').strip() @@ -873,7 +873,7 @@ def _sendNodeAction(self, matchedVars): def _sendPoolUpgAction(self, matchedVars): if matchedVars.get('send_pool_upg') == sendPoolUpgCmd.id: - if not self.canMakeSovrinRequest: + if not self.canMakeIndyRequest: return True name = matchedVars.get(NAME).strip() version = matchedVars.get(VERSION).strip() @@ -911,7 +911,7 @@ def _sendPoolUpgAction(self, matchedVars): def _sendPoolConfigAction(self, matchedVars): if matchedVars.get('send_pool_config') == sendPoolConfigCmd.id: - if not self.canMakeSovrinRequest: + if not self.canMakeIndyRequest: return True writes = matchedVars.get(WRITES, "False") writes = writes == "True" @@ -927,7 +927,7 @@ def _sendSchemaAction(self, matchedVars): return True async def _sendSchemaActionAsync(self, matchedVars): - if not self.canMakeSovrinRequest: + if not self.canMakeIndyRequest: return True schema = await self.agent.issuer.genSchema( @@ -936,7 +936,7 @@ async def _sendSchemaActionAsync(self, matchedVars): attrNames=[s.strip() for s in matchedVars.get(KEYS).split(",")]) self.print("The following schema is published " - "to the Sovrin distributed ledger\n", Token.BoldBlue, + "to the Indy distributed ledger\n", Token.BoldBlue, newline=False) self.print("{}".format(str(schema))) self.print("Sequence number is {}".format(schema.seqId), @@ -952,7 +952,7 @@ def _sendClaimDefAction(self, matchedVars): return True async def _sendClaimDefActionAsync(self, matchedVars): - if not self.canMakeSovrinRequest: + if not self.canMakeIndyRequest: return True reference = int(matchedVars.get(REF)) id = ID(schemaId=reference) @@ -964,7 +964,7 @@ async def _sendClaimDefActionAsync(self, matchedVars): return False self.print("The claim definition was published to the" - " Sovrin distributed ledger:\n", Token.BoldBlue, + " Indy distributed ledger:\n", Token.BoldBlue, newline=False) self.print("Sequence number is {}".format(pk[0].seqId), Token.BoldBlue) @@ -990,7 +990,7 @@ def _loadFile(self, matchedVars): self._printNotConnectedEnvMessage() else: givenFilePath = matchedVars.get('file_path') - filePath = SovrinCli._getFilePath(givenFilePath) + filePath = IndyCli._getFilePath(givenFilePath) try: # TODO: Shouldn't just be the wallet be involved in loading # a request. @@ -1083,7 +1083,7 @@ def _printUsagePostSync(self, connection): def _getTargetEndpoint(self, li, postSync): if not self.activeWallet.identifiers: - self.print("No key present in wallet for making request on Sovrin," + self.print("No key present in wallet for making request on Indy," " so adding one") self._newSigner(wallet=self.activeWallet) if self._isConnectedToAnyEnv(): @@ -1112,7 +1112,7 @@ def _getOneConnectionForFurtherProcessing(self, connectionName): return None li = self._getOneConnection( exactlyMatchedConnections, likelyMatchedConnections) - if SovrinCli.isNotMatching(connectionName, li.name): + if IndyCli.isNotMatching(connectionName, li.name): self.print('Expanding {} to "{}"'.format(connectionName, li.name)) return li @@ -1201,14 +1201,14 @@ def _isConnectedToAnyEnv(self): def _accept_request_connection(self, matchedVars): if matchedVars.get( 'accept_connection_request') == acceptConnectionCmd.id: - connectionName = SovrinCli.removeSpecialChars( + connectionName = IndyCli.removeSpecialChars( matchedVars.get('connection_name')) self._accept_connection_request(connectionName) return True def _pingTarget(self, matchedVars): if matchedVars.get('ping') == pingTargetCmd.id: - connectionName = SovrinCli.removeSpecialChars( + connectionName = IndyCli.removeSpecialChars( matchedVars.get('target_name')) li = self._getOneConnectionForFurtherProcessing(connectionName) if li: @@ -1222,14 +1222,14 @@ def _pingTarget(self, matchedVars): def _syncConnection(self, matchedVars): if matchedVars.get('sync_connection') == syncConnectionCmd.id: # TODO: Shouldn't we remove single quotes too? - connectionName = SovrinCli.removeSpecialChars( + connectionName = IndyCli.removeSpecialChars( matchedVars.get('connection_name')) self._sync_connection_request(connectionName) return True def _get_matching_requests_detail(self, connectionName): connection_requests = self._get_request_matching_connections( - SovrinCli.removeSpecialChars(connectionName)) + IndyCli.removeSpecialChars(connectionName)) exactlyMatchedConnections = connection_requests["exactlyMatched"] likelyMatchedConnections = connection_requests["likelyMatched"] @@ -1279,7 +1279,7 @@ def _showConnection(self, matchedVars): li = self._getOneConnection( exactlyMatchedConnections, likelyMatchedConnections) - if SovrinCli.isNotMatching(connectionName, li.name): + if IndyCli.isNotMatching(connectionName, li.name): self.print('Expanding {} to "{}"'.format( connectionName, li.name)) @@ -1400,14 +1400,14 @@ def _setAttr(self, matchedVars): def _reqClaim(self, matchedVars): if matchedVars.get('request_claim') == reqClaimCmd.id: - claimName = SovrinCli.removeSpecialChars( + claimName = IndyCli.removeSpecialChars( matchedVars.get('claim_name')) matchingConnection, ac = \ self._getOneConnectionAndAvailableClaim( claimName, printMsgs=False) if matchingConnection: name, version, origin = ac - if SovrinCli.isNotMatching(claimName, name): + if IndyCli.isNotMatching(claimName, name): self.print('Expanding {} to "{}"'.format( claimName, name)) self.print("Found claim {} in connection {}". @@ -1427,7 +1427,7 @@ def _reqClaim(self, matchedVars): def _change_current_key_req(self, matchedVars): if matchedVars.get('change_ckey') == changeKeyCmd.id: - if not self.canMakeSovrinRequest: + if not self.canMakeIndyRequest: return True seed = matchedVars.get('seed') self._change_current_key(seed=seed) @@ -1478,7 +1478,7 @@ def _createNewIdentifier(self, DID, seed, def _reqAvailClaims(self, matchedVars): if matchedVars.get('request_avail_claims') == reqAvailClaimsCmd.id: - connectionName = SovrinCli.removeSpecialChars( + connectionName = IndyCli.removeSpecialChars( matchedVars.get('connection_name')) li = self._getOneConnectionForFurtherProcessing(connectionName) if li: @@ -1496,9 +1496,9 @@ def _newDID(self, matchedVars): def _sendProof(self, matchedVars): if matchedVars.get('send_proof') == sendProofCmd.id: - proofName = SovrinCli.removeSpecialChars( + proofName = IndyCli.removeSpecialChars( matchedVars.get('proof_name').strip()) - connectionName = SovrinCli.removeSpecialChars( + connectionName = IndyCli.removeSpecialChars( matchedVars.get('connection_name').strip()) li, proofReq = self._findProofRequest(proofName, connectionName) @@ -1521,9 +1521,9 @@ def _sendProof(self, matchedVars): def _sendProofRequest(self, matchedVars): if matchedVars.get('send_proof_request') == 'send proof-request': - proofRequestName = SovrinCli.removeSpecialChars( + proofRequestName = IndyCli.removeSpecialChars( matchedVars.get('proof_request_name').strip()) - target = SovrinCli.removeSpecialChars( + target = IndyCli.removeSpecialChars( matchedVars.get('target').strip()) li = self._getOneConnectionForFurtherProcessing(target) @@ -1660,7 +1660,7 @@ async def _fulfillProofRequestByContext(self, c: Context): return True async def fulfillProofRequest(self, proofReqName): - proof_req_name = SovrinCli.removeSpecialChars(proofReqName) + proof_req_name = IndyCli.removeSpecialChars(proofReqName) matchingConnection, proofRequest = self._findProofRequest( proof_req_name) @@ -1699,7 +1699,7 @@ async def _fulfillAndShowConstructedProof(self, proof_request_name): def _showProofRequest(self, matchedVars): if matchedVars.get('show_proof_request') == showProofRequestCmd.id: - proof_request_name = SovrinCli.removeSpecialChars( + proof_request_name = IndyCli.removeSpecialChars( matchedVars.get('proof_request_name')) self.agent.loop.call_soon(asyncio.ensure_future, @@ -1709,7 +1709,7 @@ def _showProofRequest(self, matchedVars): def _showClaim(self, matchedVars): if matchedVars.get('show_claim') == showClaimCmd.id: - claimName = SovrinCli.removeSpecialChars( + claimName = IndyCli.removeSpecialChars( matchedVars.get('claim_name')) self.agent.loop.call_soon( asyncio.ensure_future, @@ -1719,7 +1719,7 @@ def _showClaim(self, matchedVars): def _listClaims(self, matchedVars): if matchedVars.get('list_claims') == listClaimsCmd.id: - connection_name = SovrinCli.removeSpecialChars( + connection_name = IndyCli.removeSpecialChars( matchedVars.get('connection_name')) li = self._getOneConnectionForFurtherProcessing(connection_name) @@ -1744,7 +1744,7 @@ def _printAvailClaims(self, connection): def _showFile(self, matchedVars): if matchedVars.get('show_file') == showFileCmd.id: givenFilePath = matchedVars.get('file_path') - filePath = SovrinCli._getFilePath(givenFilePath) + filePath = IndyCli._getFilePath(givenFilePath) if not filePath: self.print("Given file does not exist") self.printUsage(self._getShowFileUsage()) @@ -1928,9 +1928,9 @@ def getStatus(self): self._printNotConnectedEnvMessage() else: if self.activeClient.hasSufficientConnections: - msg = "Connected to {} Sovrin network".format(self.activeEnv) + msg = "Connected to {} Indy network".format(self.activeEnv) else: - msg = "Attempting connection to {} Sovrin network". \ + msg = "Attempting connection to {} Indy network". \ format(self.activeEnv) self.print(msg) @@ -1990,7 +1990,7 @@ def _ensureReqCompleted(self, reqKey, client, clbk=None, pargs=None, kwargs=kwargs, cond=cond) def addAlias(self, reply, err, client, alias, signer): - if not self.canMakeSovrinRequest: + if not self.canMakeIndyRequest: return True txnId = reply[TXN_ID] @@ -2113,7 +2113,7 @@ def cmdHandlerToCmdMappings(self): return mappings @property - def canMakeSovrinRequest(self): + def canMakeIndyRequest(self): if not self.hasAnyKey: return False if not self.activeEnv: diff --git a/sovrin_client/cli/command.py b/indy_client/cli/command.py similarity index 89% rename from sovrin_client/cli/command.py rename to indy_client/cli/command.py index ac8d630b2..63360aa3f 100644 --- a/sovrin_client/cli/command.py +++ b/indy_client/cli/command.py @@ -1,24 +1,24 @@ from plenum.cli.command import Command -from sovrin_common.roles import Roles -from sovrin_common.transactions import SovrinTransactions - -nymName = SovrinTransactions.NYM.name -getNymName = SovrinTransactions.GET_NYM.name -attribName = SovrinTransactions.ATTRIB.name -getAttrName = SovrinTransactions.GET_ATTR.name -nodeName = SovrinTransactions.NODE.name -schemaName = SovrinTransactions.SCHEMA.name -getSchemaName = SovrinTransactions.GET_SCHEMA.name -poolUpgradeName = SovrinTransactions.POOL_UPGRADE.name -claimDefName = SovrinTransactions.CLAIM_DEF.name -getClaimDefName = SovrinTransactions.GET_CLAIM_DEF.name -poolConfigName = SovrinTransactions.POOL_CONFIG.name -changeKeyName = SovrinTransactions.CHANGE_KEY.name +from indy_common.roles import Roles +from indy_common.transactions import IndyTransactions + +nymName = IndyTransactions.NYM.name +getNymName = IndyTransactions.GET_NYM.name +attribName = IndyTransactions.ATTRIB.name +getAttrName = IndyTransactions.GET_ATTR.name +nodeName = IndyTransactions.NODE.name +schemaName = IndyTransactions.SCHEMA.name +getSchemaName = IndyTransactions.GET_SCHEMA.name +poolUpgradeName = IndyTransactions.POOL_UPGRADE.name +claimDefName = IndyTransactions.CLAIM_DEF.name +getClaimDefName = IndyTransactions.GET_CLAIM_DEF.name +poolConfigName = IndyTransactions.POOL_CONFIG.name +changeKeyName = IndyTransactions.CHANGE_KEY.name sendNymCmd = Command( id="send {nym}".format( nym=nymName), - title="Adds given DID to sovrin", + title="Adds given DID to indy", usage="send {nym} dest= role= [verkey=]".format( nym=nymName), examples=[ @@ -31,7 +31,7 @@ sendGetNymCmd = Command( id="send {getNym}".format( getNym=getNymName), - title="Get NYM from sovrin", + title="Get NYM from indy", usage="send {getNym} dest=".format( getNym=getNymName), examples="send {getNym} dest=33A18XMqWqTzDpLHXLR5nT".format( @@ -47,7 +47,7 @@ sendGetAttrCmd = Command( id="send {getAttr}".format( getAttr=getAttrName), - title="Get ATTR from sovrin", + title="Get ATTR from indy", usage="send {getAttr} dest= raw=".format( getAttr=getAttrName), examples="send {getAttr} dest=33A18XMqWqTzDpLHXLR5nT raw=endpoint".format( @@ -59,7 +59,7 @@ title="Adds a node to the pool", usage="send {node} dest= data={{}}".format( node=nodeName), - note="Only Steward (must be already added on sovrin) can execute this command to add new node to the pool", + note="Only Steward (must be already added on indy) can execute this command to add new node to the pool", examples='send {node} dest=87Ys5T2eZfau4AATsBZAYvqwvD8XL5xYCHgg2o1ffjqg data={{"services":["VALIDATOR"], ' '"node_ip": "127.0.0.1", "node_port": 9711, "client_ip": "127.0.0.1", "client_port": 9712, ' '"alias": "Node101", "blskey": "00000000000000000000000000000000"}}'.format(node=nodeName)) @@ -86,7 +86,7 @@ sendSchemaCmd = Command( id="send {schema}".format( schema=schemaName), - title="Adds schema to sovrin", + title="Adds schema to indy", usage="send {schema} name= version= keys=".format( schema=schemaName), examples="send {schema} name=Degree version=1.0 keys=undergrad,last_name,first_name,birth_date,postgrad,expiry_date".format( @@ -95,7 +95,7 @@ sendGetSchemaCmd = Command( id="send {getSchema}".format( getSchema=getSchemaName), - title="Gets schema from sovrin", + title="Gets schema from indy", usage="send {getSchema} dest= name= version=".format( getSchema=getSchemaName), examples="send {getSchema} dest=33A18XMqWqTzDpLHXLR5nT name=Degree version=1.0".format( @@ -112,7 +112,7 @@ sendGetClaimDefCmd = Command( id="send {getClaimDef}".format( getClaimDef=getClaimDefName), - title="Gets claim definition from sovrin", + title="Gets claim definition from indy", usage="send {getClaimDef} ref= signature_type=".format( getClaimDef=getClaimDefName), examples="send {getClaimDef} ref=10 signature_type=CL".format( @@ -128,13 +128,13 @@ id="show", title="Shows content of given file", usage="show ", - examples="show sample/faber-request.sovrin") + examples="show sample/faber-request.indy") loadFileCmd = Command( id="load", title="Creates the connection", usage="load ", - examples="load sample/faber-request.sovrin") + examples="load sample/faber-request.indy") showConnectionCmd = Command( id="show connection", diff --git a/sovrin_client/cli/constants.py b/indy_client/cli/constants.py similarity index 93% rename from sovrin_client/cli/constants.py rename to indy_client/cli/constants.py index efe752c8e..b58c1fedb 100644 --- a/sovrin_client/cli/constants.py +++ b/indy_client/cli/constants.py @@ -1,7 +1,7 @@ from plenum.cli.constants import CLIENT_GRAMS_CLIENT_COMMAND_REG_EX, relist, \ CLI_CMDS, getPipedRegEx, CLIENT_GRAMS_USE_KEYPAIR_REG_EX -from sovrin_common.roles import Roles -from sovrin_common.transactions import SovrinTransactions +from indy_common.roles import Roles +from indy_common.transactions import IndyTransactions CLIENT_GRAMS_CLIENT_WITH_DID_FORMATTED_REG_EX = getPipedRegEx( CLIENT_GRAMS_CLIENT_COMMAND_REG_EX + @@ -21,7 +21,7 @@ TXN_NYM = "(\s* (?P<{{cmdName}}>{{cmd}}\s+{nym}) " \ "\s+ (?Pdest=) \s* (?P[A-Za-z0-9+=/]*)" \ "(\s+ (?Prole=) \s* (?P{trustee}|{tgb}|{trustAnchor}|{steward}|))?" \ - "(\s+ (?Pverkey=) \s* (?P[~A-Za-z0-9+=/]+))?)".format(nym=SovrinTransactions.NYM.name, + "(\s+ (?Pverkey=) \s* (?P[~A-Za-z0-9+=/]+))?)".format(nym=IndyTransactions.NYM.name, trustee=Roles.TRUSTEE.name, tgb=Roles.TGB.name, trustAnchor=Roles.TRUST_ANCHOR.name, @@ -39,42 +39,42 @@ GET_NYM_REG_EX = "(\s* (?Psend\s+{getNym}) " \ "\s+ (?Pdest=)\s*(?P[A-Za-z0-9+=/]+) \s*) ".format( - getNym=SovrinTransactions.GET_NYM.name) + getNym=IndyTransactions.GET_NYM.name) GET_ATTR_REG_EX = \ "(\s* (?Psend\s+{attrib}) " \ "\s+ dest=\s*(?P[A-Za-z0-9+=/]+) " \ "\s+ raw=(?P[A-Za-z0-9+=/]+) \s*) ".format( - attrib=SovrinTransactions.GET_ATTR.name) + attrib=IndyTransactions.GET_ATTR.name) ADD_ATTRIB_REG_EX = \ "(\s* (?Psend\s+{attrib}) " \ "\s+ dest=\s*(?P[A-Za-z0-9+=/]+) " \ "\s+ raw=(?P\{{\s*.*\}}) \s*) ".format( - attrib=SovrinTransactions.ATTRIB.name) + attrib=IndyTransactions.ATTRIB.name) SEND_SCHEMA_REG_EX = "(\s*(?Psend\s+{schema})" \ "\s+(?Pname=)\s*(?P[A-Za-z0-9-_]+)" \ "\s*(?Pversion=)\s*(?P[0-9.]+)" \ "\s+(?Pkeys=)\s*(?P[0-9a-zA-Z-_,\s]+)\s*)".format( - schema=SovrinTransactions.SCHEMA.name) + schema=IndyTransactions.SCHEMA.name) GET_SCHEMA_REG_EX = "(\s*(?Psend\s+{getSchema})" \ "\s+(?Pdest=) \s* (?P[A-Za-z0-9+=/]*)" \ "\s+(?Pname=)\s*(?P[A-Za-z0-9-_]+)" \ "\s*(?Pversion=)\s*(?P[0-9.]+)\s*)".format( - getSchema=SovrinTransactions.GET_SCHEMA.name) + getSchema=IndyTransactions.GET_SCHEMA.name) SEND_CLAIM_DEF_REG_EX = "(\s*(?Psend\s+{issKey})" \ "\s+(?Pref=)\s*(?P[0-9]+)\s*)"\ "\s*(?Psignature_type=)\s*(?P[A-Z0-9]+)" \ - .format(issKey=SovrinTransactions.CLAIM_DEF.name) + .format(issKey=IndyTransactions.CLAIM_DEF.name) GET_CLAIM_DEF_REG_EX = "(\s*(?Psend\s+{issKey})" \ "\s+(?Pref=)\s*(?P[0-9]+)\s*)"\ "\s*(?Psignature_type=)\s*(?P[A-Z0-9]+)" \ - .format(issKey=SovrinTransactions.GET_CLAIM_DEF.name) + .format(issKey=IndyTransactions.GET_CLAIM_DEF.name) ADD_ATTRS_PROVER_REG_EX = "(\s*(?Pattribute \s+ known \s+ to) " \ @@ -148,7 +148,7 @@ SEND_NODE_REG_EX = "(\s* (?Psend\s+{node}) " \ "\s+ dest=\s*(?P[A-Za-z0-9+/]+) " \ "\s+ data=(?P\{{\s*.*\}}) \s*) ".format( - node=SovrinTransactions.NODE.name) + node=IndyTransactions.NODE.name) SEND_POOL_UPG_REG_EX = "(\s*(?Psend\s+{poolUpgrade})" \ "\s+(?Pname=)\s*(?P[A-Za-z0-9-_]+)" \ @@ -160,7 +160,7 @@ "(\s+ (?Ptimeout=)\s*(?P[0-9+]+))?)" \ "(\s+ (?Pforce=)\s*(?PTrue|False))?" \ "(\s+ (?Preinstall=)\s*(?PTrue|False))?".format( - poolUpgrade=SovrinTransactions.POOL_UPGRADE.name) + poolUpgrade=IndyTransactions.POOL_UPGRADE.name) REQ_AVAIL_CLAIMS_REG_EX = '(\s*(?Prequest \s+ available \s+ claims \s+ from) ' \ @@ -170,7 +170,7 @@ SEND_POOL_CONFIG_REG_EX = "(\s*(?Psend\s+{poolConfig})" \ "\s+(?Pwrites=)\s*(?PTrue|False))" \ "(\s+(?Pforce=)\s*(?PTrue|False))?".format( - poolConfig=SovrinTransactions.POOL_CONFIG.name) + poolConfig=IndyTransactions.POOL_CONFIG.name) CHANGE_CURENT_KEY_REG_EX = "(\s*(?Pchange\s+current\s+key))" \ "(\s? with\s+seed\s+(?P[a-zA-Z0-9]+))?" diff --git a/sovrin_client/cli/genesisTxns.py b/indy_client/cli/genesisTxns.py similarity index 92% rename from sovrin_client/cli/genesisTxns.py rename to indy_client/cli/genesisTxns.py index 7aaa61c10..c99724529 100644 --- a/sovrin_client/cli/genesisTxns.py +++ b/indy_client/cli/genesisTxns.py @@ -1,7 +1,7 @@ from plenum.common.constants import STEWARD, TXN_ID from plenum.common.types import f -from sovrin_common.constants import TXN_TYPE, TARGET_NYM, ROLE, NYM, TRUST_ANCHOR +from indy_common.constants import TXN_TYPE, TARGET_NYM, ROLE, NYM, TRUST_ANCHOR STEWARD_SEED = b'steward seed used for signer....' TRUST_ANCHOR_SEED = b'sponsors are people too.........' diff --git a/sovrin_client/cli/helper.py b/indy_client/cli/helper.py similarity index 98% rename from sovrin_client/cli/helper.py rename to indy_client/cli/helper.py index e315374c6..9680e775d 100644 --- a/sovrin_client/cli/helper.py +++ b/indy_client/cli/helper.py @@ -1,4 +1,4 @@ -from sovrin_client.cli.constants import \ +from indy_client.cli.constants import \ CLIENT_GRAMS_CLIENT_WITH_DID_FORMATTED_REG_EX, \ CLIENT_GRAMS_CLIENT_ADD_FORMATTED_REG_EX, SEND_NYM_FORMATTED_REG_EX, \ GET_NYM_FORMATTED_REG_EX, \ diff --git a/sovrin_client/client/__init__.py b/indy_client/client/__init__.py similarity index 100% rename from sovrin_client/client/__init__.py rename to indy_client/client/__init__.py diff --git a/sovrin_client/client/client.py b/indy_client/client/client.py similarity index 96% rename from sovrin_client/client/client.py rename to indy_client/client/client.py index b9cba6fe0..cebeabbdc 100644 --- a/sovrin_client/client/client.py +++ b/indy_client/client/client.py @@ -20,15 +20,15 @@ from stp_raet.rstack import SimpleRStack from stp_zmq.simple_zstack import SimpleZStack -from sovrin_common.constants import TXN_TYPE, ATTRIB, DATA, GET_NYM, ROLE, \ +from indy_common.constants import TXN_TYPE, ATTRIB, DATA, GET_NYM, ROLE, \ NYM, GET_TXNS, LAST_TXN, TXNS, SCHEMA, CLAIM_DEF, SKEY, DISCLO, \ GET_ATTR, TRUST_ANCHOR, GET_CLAIM_DEF, GET_SCHEMA, SIGNATURE_TYPE, REF -from sovrin_client.persistence.client_req_rep_store_file import ClientReqRepStoreFile -from sovrin_client.persistence.client_txn_log import ClientTxnLog -from sovrin_common.config_util import getConfig +from indy_client.persistence.client_req_rep_store_file import ClientReqRepStoreFile +from indy_client.persistence.client_txn_log import ClientTxnLog +from indy_common.config_util import getConfig from stp_core.types import HA -from sovrin_common.state import domain +from indy_common.state import domain logger = getlogger() diff --git a/sovrin_client/client/lib/Cargo.lock b/indy_client/client/lib/Cargo.lock similarity index 100% rename from sovrin_client/client/lib/Cargo.lock rename to indy_client/client/lib/Cargo.lock diff --git a/sovrin_client/client/lib/Cargo.toml b/indy_client/client/lib/Cargo.toml similarity index 100% rename from sovrin_client/client/lib/Cargo.toml rename to indy_client/client/lib/Cargo.toml diff --git a/sovrin_client/client/lib/src/constants.rs b/indy_client/client/lib/src/constants.rs similarity index 100% rename from sovrin_client/client/lib/src/constants.rs rename to indy_client/client/lib/src/constants.rs diff --git a/sovrin_client/client/lib/src/internal/mod.rs b/indy_client/client/lib/src/internal/mod.rs similarity index 100% rename from sovrin_client/client/lib/src/internal/mod.rs rename to indy_client/client/lib/src/internal/mod.rs diff --git a/sovrin_client/client/lib/src/lib.rs b/indy_client/client/lib/src/lib.rs similarity index 100% rename from sovrin_client/client/lib/src/lib.rs rename to indy_client/client/lib/src/lib.rs diff --git a/sovrin_client/client/lib/src/strutil.rs b/indy_client/client/lib/src/strutil.rs similarity index 100% rename from sovrin_client/client/lib/src/strutil.rs rename to indy_client/client/lib/src/strutil.rs diff --git a/sovrin_client/client/lib/src/tests/mod.rs b/indy_client/client/lib/src/tests/mod.rs similarity index 100% rename from sovrin_client/client/lib/src/tests/mod.rs rename to indy_client/client/lib/src/tests/mod.rs diff --git a/sovrin_client/client/wallet/__init__.py b/indy_client/client/wallet/__init__.py similarity index 100% rename from sovrin_client/client/wallet/__init__.py rename to indy_client/client/wallet/__init__.py diff --git a/sovrin_client/client/wallet/attribute.py b/indy_client/client/wallet/attribute.py similarity index 95% rename from sovrin_client/client/wallet/attribute.py rename to indy_client/client/wallet/attribute.py index d801aa9b3..7ab2b8bdf 100644 --- a/sovrin_client/client/wallet/attribute.py +++ b/indy_client/client/wallet/attribute.py @@ -2,9 +2,9 @@ from typing import Optional, TypeVar from plenum.common.constants import TXN_TYPE, TARGET_NYM, RAW, ORIGIN -from sovrin_common.generates_request import GeneratesRequest -from sovrin_common.constants import ATTRIB, GET_ATTR -from sovrin_common.types import Request +from indy_common.generates_request import GeneratesRequest +from indy_common.constants import ATTRIB, GET_ATTR +from indy_common.types import Request from stp_core.types import Identifier Value = TypeVar('Value', str, dict) diff --git a/sovrin_client/client/wallet/connection.py b/indy_client/client/wallet/connection.py similarity index 98% rename from sovrin_client/client/wallet/connection.py rename to indy_client/client/wallet/connection.py index a6334e5aa..22991208e 100644 --- a/sovrin_client/client/wallet/connection.py +++ b/indy_client/client/wallet/connection.py @@ -6,7 +6,7 @@ from plenum.common.verifier import DidVerifier from anoncreds.protocol.types import AvailableClaim -from sovrin_common.exceptions import InvalidConnectionException, \ +from indy_common.exceptions import InvalidConnectionException, \ RemoteEndpointNotFound, NotFound @@ -97,7 +97,7 @@ def __str__(self): localIdr = self.localIdentifier if self.localIdentifier \ else constant.NOT_ASSIGNED trustAnchor = self.trustAnchor or "" - trustAnchorStatus = '(not yet written to Sovrin)' + trustAnchorStatus = '(not yet written to Indy)' if self.remoteVerkey is not None: if self.remoteIdentifier == self.remoteVerkey: remoteVerKey = constant.REMOTE_VER_KEY_SAME_AS_ID diff --git a/sovrin_client/client/wallet/node.py b/indy_client/client/wallet/node.py similarity index 86% rename from sovrin_client/client/wallet/node.py rename to indy_client/client/wallet/node.py index 809d89ab1..7e2c29024 100644 --- a/sovrin_client/client/wallet/node.py +++ b/indy_client/client/wallet/node.py @@ -1,6 +1,6 @@ from plenum.common.constants import TXN_TYPE, TARGET_NYM, NODE, DATA -from sovrin_common.generates_request import GeneratesRequest -from sovrin_common.types import Request +from indy_common.generates_request import GeneratesRequest +from indy_common.types import Request from stp_core.types import Identifier diff --git a/sovrin_client/client/wallet/pool_config.py b/indy_client/client/wallet/pool_config.py similarity index 81% rename from sovrin_client/client/wallet/pool_config.py rename to indy_client/client/wallet/pool_config.py index a6207f238..e57c2fae0 100644 --- a/sovrin_client/client/wallet/pool_config.py +++ b/indy_client/client/wallet/pool_config.py @@ -1,8 +1,8 @@ from stp_core.types import Identifier from plenum.common.constants import TXN_TYPE, FORCE -from sovrin_common.generates_request import GeneratesRequest -from sovrin_common.constants import POOL_CONFIG, WRITES -from sovrin_common.types import Request +from indy_common.generates_request import GeneratesRequest +from indy_common.constants import POOL_CONFIG, WRITES +from indy_common.types import Request class PoolConfig(GeneratesRequest): diff --git a/sovrin_client/client/wallet/trustAnchoring.py b/indy_client/client/wallet/trustAnchoring.py similarity index 96% rename from sovrin_client/client/wallet/trustAnchoring.py rename to indy_client/client/wallet/trustAnchoring.py index 20239e621..c3abc7d6c 100644 --- a/sovrin_client/client/wallet/trustAnchoring.py +++ b/indy_client/client/wallet/trustAnchoring.py @@ -1,5 +1,5 @@ -from sovrin_common.identity import Identity +from indy_common.identity import Identity from stp_core.types import Identifier diff --git a/sovrin_client/client/wallet/upgrade.py b/indy_client/client/wallet/upgrade.py similarity index 89% rename from sovrin_client/client/wallet/upgrade.py rename to indy_client/client/wallet/upgrade.py index 1fe2cc226..7f1ca6474 100644 --- a/sovrin_client/client/wallet/upgrade.py +++ b/indy_client/client/wallet/upgrade.py @@ -1,9 +1,9 @@ from stp_core.types import Identifier from plenum.common.constants import TXN_TYPE, NAME, VERSION, FORCE -from sovrin_common.generates_request import GeneratesRequest -from sovrin_common.constants import POOL_UPGRADE, ACTION, SCHEDULE, \ +from indy_common.generates_request import GeneratesRequest +from indy_common.constants import POOL_UPGRADE, ACTION, SCHEDULE, \ SHA256, TIMEOUT, START, JUSTIFICATION, REINSTALL -from sovrin_common.types import Request +from indy_common.types import Request class Upgrade(GeneratesRequest): diff --git a/sovrin_client/client/wallet/wallet.py b/indy_client/client/wallet/wallet.py similarity index 76% rename from sovrin_client/client/wallet/wallet.py rename to indy_client/client/wallet/wallet.py index 1fc197407..c00d8a258 100644 --- a/sovrin_client/client/wallet/wallet.py +++ b/indy_client/client/wallet/wallet.py @@ -17,18 +17,18 @@ IDENTIFIER, NYM, ROLE, VERKEY, NODE, NAME, VERSION, ORIGIN from plenum.common.types import f -from sovrin_client.client.wallet.attribute import Attribute, AttributeKey, \ +from indy_client.client.wallet.attribute import Attribute, AttributeKey, \ LedgerStore -from sovrin_client.client.wallet.connection import Connection -from sovrin_client.client.wallet.node import Node -from sovrin_client.client.wallet.trustAnchoring import TrustAnchoring -from sovrin_client.client.wallet.upgrade import Upgrade -from sovrin_client.client.wallet.pool_config import PoolConfig -from sovrin_common.did_method import DefaultDidMethods -from sovrin_common.exceptions import ConnectionNotFound -from sovrin_common.types import Request -from sovrin_common.identity import Identity -from sovrin_common.constants import ATTRIB, GET_TXNS, GET_ATTR, \ +from indy_client.client.wallet.connection import Connection +from indy_client.client.wallet.node import Node +from indy_client.client.wallet.trustAnchoring import TrustAnchoring +from indy_client.client.wallet.upgrade import Upgrade +from indy_client.client.wallet.pool_config import PoolConfig +from indy_common.did_method import DefaultDidMethods +from indy_common.exceptions import ConnectionNotFound +from indy_common.types import Request +from indy_common.identity import Identity +from indy_common.constants import ATTRIB, GET_TXNS, GET_ATTR, \ GET_NYM, POOL_UPGRADE, GET_SCHEMA, GET_CLAIM_DEF, REF, SIGNATURE_TYPE, POOL_CONFIG from stp_core.types import Identifier @@ -37,6 +37,115 @@ logger = getlogger() +def getClassVersionKeyBeforeRebranding(cls): + return getClassVersionKey(cls).replace('indy_client', 'sovrin_client') + + +class WalletRawUpdaterToVersion1: + + _LINK_FIELD_RENAMINGS = { + 'linkStatus': 'connection_status', + 'linkLastSynced': 'connection_last_synced', + 'linkLastSyncNo': 'connection_last_sync_no', + 'invitationNonce': 'request_nonce', + + # rule for the intermediate renaming state (MGL version) + 'connectionLastSynced': 'connection_last_synced' + } + + @classmethod + def _processLink(cls, link): + link[tags.OBJECT] = \ + 'sovrin_client.client.wallet.connection.Connection' + for key in link: + if key in cls._LINK_FIELD_RENAMINGS: + link[cls._LINK_FIELD_RENAMINGS[key]] = link.pop(key) + + @classmethod + def _traverseDict(cls, d): + if d.get(tags.OBJECT) == 'sovrin_client.client.wallet.link.Link': + cls._processLink(d) + + for key in d: + cls._traverseObject(d[key]) + + @classmethod + def _traverseList(cls, l): + for item in l: + cls._traverseObject(item) + + @classmethod + def _traverseObject(cls, v): + if isinstance(v, dict): + cls._traverseDict(v) + elif isinstance(v, list): + cls._traverseList(v) + + @classmethod + def update(cls, raw): + if '_links' in raw: + raw['_connections'] = raw.pop('_links') + + cls._traverseDict(raw) + + raw[getClassVersionKeyBeforeRebranding(Wallet)] = 1 + + +class WalletRawUpdaterToVersion2: + + @classmethod + def _processDidMethods(cls, didMethods): + if 'd' in didMethods: + d = didMethods['d'] + if isinstance(d, dict) and 'sovrin' in d: + d['indy'] = d.pop('sovrin') + + @classmethod + def _processDidMethod(cls, didMethod): + if 'name' in didMethod and isinstance(didMethod['name'], str): + didMethod['name'] = \ + didMethod['name'].replace('sovrin', 'indy') + if 'pattern' in didMethod and isinstance(didMethod['pattern'], str): + didMethod['pattern'] = \ + didMethod['pattern'].replace('sovrin', 'indy') + + @classmethod + def _traverseDict(cls, d): + if tags.OBJECT in d: + if d[tags.OBJECT] == 'plenum.common.did_method.DidMethods': + cls._processDidMethods(d) + if d[tags.OBJECT] == 'plenum.common.did_method.DidMethod': + cls._processDidMethod(d) + + if isinstance(d[tags.OBJECT], str): + d[tags.OBJECT] = \ + d[tags.OBJECT].replace('sovrin_common', 'indy_common') + d[tags.OBJECT] = \ + d[tags.OBJECT].replace('sovrin_client', 'indy_client') + + for key in d: + cls._traverseObject(d[key]) + + @classmethod + def _traverseList(cls, l): + for item in l: + cls._traverseObject(item) + + @classmethod + def _traverseObject(cls, v): + if isinstance(v, dict): + cls._traverseDict(v) + elif isinstance(v, list): + cls._traverseList(v) + + @classmethod + def update(cls, raw): + cls._traverseDict(raw) + + raw.pop(getClassVersionKeyBeforeRebranding(Wallet), None) + raw[getClassVersionKey(Wallet)] = 2 + + # TODO: Maybe we should have a thinner wallet which should not have # ProverWallet class Wallet(PWallet, TrustAnchoring): @@ -47,76 +156,35 @@ class Wallet(PWallet, TrustAnchoring): # inherited classes must be versioned by themselves using the same # mechanism, so modification of inherited classes structure does not require # increment of this class version. - # For each version increment a method must be introduced that performs - # a conversion of a raw representation (nested dictionaries/lists structure) - # to this version (including adding/update of the class version entry). - # The method performing conversion to the current version must be called - # if necessary from makeRawCompatible method. - # Internally the method performing conversion to the version X must - # call if necessary the method performing conversion to the version X - 1. - CLASS_VERSION = 1 + CLASS_VERSION = 2 + + RAW_UPDATERS = { + 1: WalletRawUpdaterToVersion1.update, + 2: WalletRawUpdaterToVersion2.update + } clientNotPresentMsg = "The wallet does not have a client associated with it" @staticmethod def makeRawCompatible(raw): """ - Converts a raw representation of a wallet from any previous version + Updates a raw representation of a wallet from any previous version to the current version. If the raw representation of the wallet is - of the current version then this method does nothing. + of the current version or higher then this method does nothing. - :param raw: the wallet's raw representation to convert + :param raw: the wallet's raw representation to update """ # At first, call makeRawCompatible method of base class(es) # if it contains such the method - rawClassVersion = raw.get(getClassVersionKey(Wallet), 0) - if rawClassVersion < 1: - Wallet.convertRawToVersion1(raw) - - @staticmethod - def convertRawToVersion1(raw): - - fieldRenamings = { - 'linkStatus': 'connection_status', - 'linkLastSynced': 'connection_last_synced', - 'linkLastSyncNo': 'connection_last_sync_no', - 'invitationNonce': 'request_nonce', - - # rule for the intermediate renaming state - 'connectionLastSynced': 'connection_last_synced' - } - - def renameConnectionFields(connection): - for key in connection: - if key in fieldRenamings: - connection[fieldRenamings[key]] = connection.pop(key) - - def processDict(d): - if d.get(tags.OBJECT) == 'sovrin_client.client.wallet.link.Link': - d[tags.OBJECT] = \ - 'sovrin_client.client.wallet.connection.Connection' - renameConnectionFields(d) - for key in d: - processValue(d[key]) - - def processList(l): - for item in l: - processValue(item) - - def processValue(v): - if isinstance(v, dict): - processDict(v) - elif isinstance(v, list): - processList(v) - - if '_links' in raw: - raw['_connections'] = raw.pop('_links') - processValue(raw) + rawClassVersion = raw.get(getClassVersionKey(Wallet)) + if rawClassVersion is None: + rawClassVersion = \ + raw.get(getClassVersionKeyBeforeRebranding(Wallet), 0) - # Add/update the class version entry - raw[getClassVersionKey(Wallet)] = 1 + for version in range(rawClassVersion, Wallet.CLASS_VERSION): + Wallet.RAW_UPDATERS[version + 1](raw) def __init__(self, name: str=None, @@ -207,7 +275,7 @@ def getMatchingConnectionsWithProofReq( def addAttribute(self, attrib: Attribute): """ - Used to create a new attribute on Sovrin + Used to create a new attribute on Indy :param attrib: attribute to add :return: number of pending txns """ @@ -219,7 +287,7 @@ def addAttribute(self, attrib: Attribute): def addNode(self, node: Node): """ - Used to add a new node on Sovrin + Used to add a new node on Indy :param node: Node :return: number of pending txns """ @@ -400,7 +468,7 @@ def getMatchingConnections(self, name: str) -> List[Connection]: # TODO: sender by default should be `self.defaultId` def requestAttribute(self, attrib: Attribute, sender): """ - Used to get a raw attribute from Sovrin + Used to get a raw attribute from Indy :param attrib: attribute to add :return: number of pending txns """ @@ -411,7 +479,7 @@ def requestAttribute(self, attrib: Attribute, sender): def requestSchema(self, nym, name, version, sender): """ - Used to get a schema from Sovrin + Used to get a schema from Indy :param nym: nym that schema is attached to :param name: name of schema :param version: version of schema @@ -428,7 +496,7 @@ def requestSchema(self, nym, name, version, sender): def requestClaimDef(self, seqNo, signature, sender): """ - Used to get a claim def from Sovrin + Used to get a claim def from Indy :param seqNo: reference number of schema :param signature: CL is only supported option currently :return: req object @@ -444,7 +512,7 @@ def requestClaimDef(self, seqNo, signature, sender): # TODO: sender by default should be `self.defaultId` def requestIdentity(self, identity: Identity, sender): - # Used to get a nym from Sovrin + # Used to get a nym from Indy self.knownIds[identity.identifier] = identity req = identity.getRequest(sender) if req: diff --git a/sovrin_client/persistence/__init__.py b/indy_client/persistence/__init__.py similarity index 100% rename from sovrin_client/persistence/__init__.py rename to indy_client/persistence/__init__.py diff --git a/sovrin_client/persistence/client_req_rep_store.py b/indy_client/persistence/client_req_rep_store.py similarity index 100% rename from sovrin_client/persistence/client_req_rep_store.py rename to indy_client/persistence/client_req_rep_store.py diff --git a/sovrin_client/persistence/client_req_rep_store_file.py b/indy_client/persistence/client_req_rep_store_file.py similarity index 96% rename from sovrin_client/persistence/client_req_rep_store_file.py rename to indy_client/persistence/client_req_rep_store_file.py index 98ab931e0..5376491e4 100644 --- a/sovrin_client/persistence/client_req_rep_store_file.py +++ b/indy_client/persistence/client_req_rep_store_file.py @@ -5,7 +5,7 @@ from plenum.persistence.client_req_rep_store_file import ClientReqRepStoreFile \ as PClientReqRepStoreFile -from sovrin_common.txn_util import getTxnOrderedFields +from indy_common.txn_util import getTxnOrderedFields class ClientReqRepStoreFile(PClientReqRepStoreFile): diff --git a/sovrin_client/persistence/client_txn_log.py b/indy_client/persistence/client_txn_log.py similarity index 93% rename from sovrin_client/persistence/client_txn_log.py rename to indy_client/persistence/client_txn_log.py index f28755f70..72622563e 100644 --- a/sovrin_client/persistence/client_txn_log.py +++ b/indy_client/persistence/client_txn_log.py @@ -4,7 +4,7 @@ from plenum.common.util import updateFieldsWithSeqNo from plenum.persistence.client_txn_log import ClientTxnLog as PClientTxnLog -from sovrin_common.txn_util import getTxnOrderedFields +from indy_common.txn_util import getTxnOrderedFields class ClientTxnLog(PClientTxnLog): diff --git a/sovrin_client/script_helper.py b/indy_client/script_helper.py similarity index 85% rename from sovrin_client/script_helper.py rename to indy_client/script_helper.py index e646b0f43..9cf2d68bb 100644 --- a/sovrin_client/script_helper.py +++ b/indy_client/script_helper.py @@ -5,20 +5,20 @@ keepFilesInClientReset = [ 'pool_transactions_sandbox', - 'sovrin_config.py', + 'indy_config.py', 'sample', 'pool_transactions_local', 'pool_transactions_live' ] -def performSovrinBaseDirCleanup(baseDir): +def performIndyBaseDirCleanup(baseDir): backupDir = None while True: backupDir = baseDir + "-" + randomString(6) if not os.path.exists(backupDir): shutil.copytree(baseDir, backupDir) - print("\nSovrin base directory {} backed up at: {}". + print("\nIndy base directory {} backed up at: {}". format(baseDir, backupDir)) break diff --git a/sovrin_client/test/__init__.py b/indy_client/test/__init__.py similarity index 100% rename from sovrin_client/test/__init__.py rename to indy_client/test/__init__.py diff --git a/indy_client/test/__main__.py b/indy_client/test/__main__.py new file mode 100644 index 000000000..ebd27b440 --- /dev/null +++ b/indy_client/test/__main__.py @@ -0,0 +1,3 @@ +from indy_client import test + +test.run() diff --git a/sovrin_client/test/agent/__init__.py b/indy_client/test/agent/__init__.py similarity index 100% rename from sovrin_client/test/agent/__init__.py rename to indy_client/test/agent/__init__.py diff --git a/sovrin_client/test/agent/acme.py b/indy_client/test/agent/acme.py similarity index 92% rename from sovrin_client/test/agent/acme.py rename to indy_client/test/agent/acme.py index 9fb480151..aa7e7056d 100644 --- a/sovrin_client/test/agent/acme.py +++ b/indy_client/test/agent/acme.py @@ -1,15 +1,15 @@ from plenum.common.signer_did import DidSigner -from sovrin_client.agent.helper import bootstrap_schema -from sovrin_client.client.wallet.wallet import Wallet +from indy_client.agent.helper import bootstrap_schema +from indy_client.client.wallet.wallet import Wallet from stp_core.common.log import getlogger -from sovrin_client.agent.runnable_agent import RunnableAgent -from sovrin_client.agent.agent import create_client -from sovrin_client.test.agent.mock_backend_system import MockBackendSystem - -from sovrin_client.agent.walleted_agent import WalletedAgent -from sovrin_client.test.constants import primes -from sovrin_client.test.agent.helper import buildAcmeWallet -from sovrin_client.test.client.TestClient import TestClient +from indy_client.agent.runnable_agent import RunnableAgent +from indy_client.agent.agent import create_client +from indy_client.test.agent.mock_backend_system import MockBackendSystem + +from indy_client.agent.walleted_agent import WalletedAgent +from indy_client.test.constants import primes +from indy_client.test.agent.helper import buildAcmeWallet +from indy_client.test.client.TestClient import TestClient from anoncreds.protocol.types import AttribType, AttribDef, ID diff --git a/sovrin_client/test/agent/base_agent.py b/indy_client/test/agent/base_agent.py similarity index 94% rename from sovrin_client/test/agent/base_agent.py rename to indy_client/test/agent/base_agent.py index 2d19f85d5..271109f5d 100644 --- a/sovrin_client/test/agent/base_agent.py +++ b/indy_client/test/agent/base_agent.py @@ -6,19 +6,19 @@ from plenum.cli.cli import Exit from stp_core.common.log import Logger, getlogger -from sovrin_client.agent.run_agent import runBootstrap +from indy_client.agent.run_agent import runBootstrap -from sovrin_client.test.agent.test_walleted_agent import TestWalletedAgent +from indy_client.test.agent.test_walleted_agent import TestWalletedAgent from plenum.common.constants import NAME, VERSION from anoncreds.protocol.types import ID -from sovrin_client.agent.exception import NonceNotFound -from sovrin_client.client.client import Client -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_client.test.constants import primes -from sovrin_common.config import agentLoggingLevel -from sovrin_common.config_util import getConfig +from indy_client.agent.exception import NonceNotFound +from indy_client.client.client import Client +from indy_client.client.wallet.wallet import Wallet +from indy_client.test.constants import primes +from indy_common.config import agentLoggingLevel +from indy_common.config_util import getConfig class BaseAgent(TestWalletedAgent): diff --git a/sovrin_client/test/agent/conftest.py b/indy_client/test/agent/conftest.py similarity index 91% rename from sovrin_client/test/agent/conftest.py rename to indy_client/test/agent/conftest.py index d00efa30c..7d60a7b7c 100644 --- a/sovrin_client/test/agent/conftest.py +++ b/indy_client/test/agent/conftest.py @@ -1,10 +1,10 @@ -from sovrin_client.test import waits +from indy_client.test import waits from plenum.common.signer_did import DidSigner -from sovrin_client.agent.endpoint import REndpoint -from sovrin_client.test.agent.test_walleted_agent import TestWalletedAgent -from sovrin_common.strict_types import strict_types +from indy_client.agent.endpoint import REndpoint +from indy_client.test.agent.test_walleted_agent import TestWalletedAgent +from indy_common.strict_types import strict_types from stp_core.network.port_dispenser import genHa @@ -28,20 +28,20 @@ from plenum.common.util import randomString from stp_core.loop.eventually import eventually from plenum.test.helper import assertFunc -from sovrin_client.agent.walleted_agent import WalletedAgent -from sovrin_client.client.wallet.attribute import Attribute, LedgerStore -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_common.constants import ENDPOINT, TRUST_ANCHOR -from sovrin_client.test.agent.acme import create_acme, bootstrap_acme -from sovrin_client.test.agent.faber import create_faber, bootstrap_faber -from sovrin_client.test.agent.helper import ensureAgentConnected, buildFaberWallet, \ +from indy_client.agent.walleted_agent import WalletedAgent +from indy_client.client.wallet.attribute import Attribute, LedgerStore +from indy_client.client.wallet.wallet import Wallet +from indy_common.constants import ENDPOINT, TRUST_ANCHOR +from indy_client.test.agent.acme import create_acme, bootstrap_acme +from indy_client.test.agent.faber import create_faber, bootstrap_faber +from indy_client.test.agent.helper import ensureAgentConnected, buildFaberWallet, \ buildAcmeWallet, buildThriftWallet, startAgent -from sovrin_client.test.agent.thrift import create_thrift -from sovrin_node.test.helper import addAttributeAndCheck -from sovrin_client.test.helper import createNym, TestClient +from indy_client.test.agent.thrift import create_thrift +from indy_node.test.helper import addAttributeAndCheck +from indy_client.test.helper import createNym, TestClient # noinspection PyUnresolvedReferences -from sovrin_node.test.conftest import nodeSet, updatedDomainTxnFile, \ +from indy_node.test.conftest import nodeSet, updatedDomainTxnFile, \ genesisTxns # noinspection PyUnresolvedReferences @@ -272,12 +272,12 @@ def aliceAcceptedFaber(faberIsRunning, faberNonceForAlice, faberAdded, @pytest.fixture(scope="module") def faber_request(): - return get_request_file('faber-request.sovrin') + return get_request_file('faber-request.indy') @pytest.fixture(scope="module") def acme_request(): - return get_request_file('acme-job-application.sovrin') + return get_request_file('acme-job-application.indy') @pytest.fixture(scope="module") diff --git a/sovrin_client/test/agent/faber.py b/indy_client/test/agent/faber.py similarity index 89% rename from sovrin_client/test/agent/faber.py rename to indy_client/test/agent/faber.py index 8e90b4b05..0d5297345 100644 --- a/sovrin_client/test/agent/faber.py +++ b/indy_client/test/agent/faber.py @@ -1,17 +1,17 @@ from anoncreds.protocol.exceptions import SchemaNotFoundError from plenum.common.signer_did import DidSigner -from sovrin_client.agent.helper import bootstrap_schema, buildAgentWallet -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_client.test.client.TestClient import TestClient -from sovrin_client.test.constants import primes +from indy_client.agent.helper import bootstrap_schema, buildAgentWallet +from indy_client.client.wallet.wallet import Wallet +from indy_client.test.client.TestClient import TestClient +from indy_client.test.constants import primes from stp_core.common.log import getlogger -from sovrin_client.agent.runnable_agent import RunnableAgent -from sovrin_client.agent.agent import create_client -from sovrin_client.test.agent.mock_backend_system import MockBackendSystem +from indy_client.agent.runnable_agent import RunnableAgent +from indy_client.agent.agent import create_client +from indy_client.test.agent.mock_backend_system import MockBackendSystem from anoncreds.protocol.types import AttribType, AttribDef, ID, SchemaKey -from sovrin_client.agent.walleted_agent import WalletedAgent +from indy_client.agent.walleted_agent import WalletedAgent logger = getlogger() diff --git a/sovrin_client/test/agent/helper.py b/indy_client/test/agent/helper.py similarity index 90% rename from sovrin_client/test/agent/helper.py rename to indy_client/test/agent/helper.py index 16a30d587..c4402d8d8 100644 --- a/sovrin_client/test/agent/helper.py +++ b/indy_client/test/agent/helper.py @@ -1,11 +1,11 @@ import argparse import sys -from sovrin_client.agent.helper import buildAgentWallet -from sovrin_client.test import waits +from indy_client.agent.helper import buildAgentWallet +from indy_client.test import waits from stp_core.loop.eventually import eventually -from sovrin_client.agent.run_agent import runAgent -from sovrin_common.config_util import getConfig +from indy_client.agent.run_agent import runAgent +from indy_common.config_util import getConfig config = getConfig() diff --git a/sovrin_client/test/agent/messages.py b/indy_client/test/agent/messages.py similarity index 95% rename from sovrin_client/test/agent/messages.py rename to indy_client/test/agent/messages.py index 931cbe869..bb8239aa0 100644 --- a/sovrin_client/test/agent/messages.py +++ b/indy_client/test/agent/messages.py @@ -1,7 +1,7 @@ from anoncreds.protocol.utils import crypto_int_to_str, isCryptoInteger, intToArrayBytes -def get_claim_request_libsovrin_msg(claim_req, schema_seq_no): +def get_claim_request_libindy_msg(claim_req, schema_seq_no): return ({ 'type': 'CLAIM_REQUEST', 'data': { @@ -17,7 +17,7 @@ def get_claim_request_libsovrin_msg(claim_req, schema_seq_no): }) -def get_claim_libsovrin_msg(signature, schema_seq_no): +def get_claim_libindy_msg(signature, schema_seq_no): return ({'type': 'CLAIM', 'refRequestId': 1498207862797639, 'data': { @@ -44,7 +44,7 @@ def get_claim_libsovrin_msg(signature, schema_seq_no): 'identifier': 'ULtgFQJe6bjiFbs7ke3NJD'}, ('Faber College', ('127.0.0.1', 6918))) -def get_proof_libsovrin_msg(link, proof_req, proof, uuid, schema_seq_no): +def get_proof_libindy_msg(link, proof_req, proof, uuid, schema_seq_no): eqProof = proof.proofs[str(uuid)].proof.primaryProof.eqProof return ({'type': 'PROOF', diff --git a/sovrin_client/test/agent/mock_backend_system.py b/indy_client/test/agent/mock_backend_system.py similarity index 87% rename from sovrin_client/test/agent/mock_backend_system.py rename to indy_client/test/agent/mock_backend_system.py index 9eff266ff..df1e20793 100644 --- a/sovrin_client/test/agent/mock_backend_system.py +++ b/indy_client/test/agent/mock_backend_system.py @@ -1,4 +1,4 @@ -from sovrin_client.agent.backend import BackendSystem +from indy_client.agent.backend import BackendSystem class MockBackendSystem(BackendSystem): diff --git a/sovrin_client/test/agent/test_accept_invitation.py b/indy_client/test/agent/test_accept_invitation.py similarity index 96% rename from sovrin_client/test/agent/test_accept_invitation.py rename to indy_client/test/agent/test_accept_invitation.py index fcf55b9b0..2daaf92e0 100644 --- a/sovrin_client/test/agent/test_accept_invitation.py +++ b/indy_client/test/agent/test_accept_invitation.py @@ -2,7 +2,7 @@ import pytest -from sovrin_client.test.agent.conftest import check_accept_request +from indy_client.test.agent.conftest import check_accept_request concerningLogLevels = [logging.WARNING, logging.ERROR, diff --git a/sovrin_client/test/agent/test_anoncreds_agent.py b/indy_client/test/agent/test_anoncreds_agent.py similarity index 97% rename from sovrin_client/test/agent/test_anoncreds_agent.py rename to indy_client/test/agent/test_anoncreds_agent.py index c35545a11..0deeecb39 100644 --- a/sovrin_client/test/agent/test_anoncreds_agent.py +++ b/indy_client/test/agent/test_anoncreds_agent.py @@ -1,4 +1,4 @@ -from sovrin_client.test import waits +from indy_client.test import waits from stp_core.loop.eventually import eventually diff --git a/sovrin_client/test/agent/test_anoncreds_claim.py b/indy_client/test/agent/test_anoncreds_claim.py similarity index 91% rename from sovrin_client/test/agent/test_anoncreds_claim.py rename to indy_client/test/agent/test_anoncreds_claim.py index 7186f2862..df1935fb8 100644 --- a/sovrin_client/test/agent/test_anoncreds_claim.py +++ b/indy_client/test/agent/test_anoncreds_claim.py @@ -1,10 +1,10 @@ -from sovrin_client.test import waits +from indy_client.test import waits from stp_core.loop.eventually import eventually from anoncreds.protocol.types import SchemaKey, ID -from sovrin_client.test.agent.messages import get_claim_libsovrin_msg +from indy_client.test.agent.messages import get_claim_libindy_msg -def test_claim_from_libsovrin_works( +def test_claim_from_libindy_works( aliceAgent, aliceAcceptedFaber, aliceAcceptedAcme, @@ -32,7 +32,7 @@ async def create_claim_and_send_to_prover(): attributes=attr) claim_signature, claim_attributes = await faberAgent.issuer.issueClaim(ID(schemaKey=schemaKey), claimReq) - msg = get_claim_libsovrin_msg(claim_signature, schema.seqId) + msg = get_claim_libindy_msg(claim_signature, schema.seqId) await aliceAgent.handleReqClaimResponse(msg) diff --git a/sovrin_client/test/agent/test_anoncreds_claim_request.py b/indy_client/test/agent/test_anoncreds_claim_request.py similarity index 88% rename from sovrin_client/test/agent/test_anoncreds_claim_request.py rename to indy_client/test/agent/test_anoncreds_claim_request.py index 90b790711..e7a97349d 100644 --- a/sovrin_client/test/agent/test_anoncreds_claim_request.py +++ b/indy_client/test/agent/test_anoncreds_claim_request.py @@ -1,10 +1,10 @@ -from sovrin_client.test import waits +from indy_client.test import waits from stp_core.loop.eventually import eventually from anoncreds.protocol.types import SchemaKey, ID -from sovrin_client.test.agent.messages import get_claim_request_libsovrin_msg +from indy_client.test.agent.messages import get_claim_request_libindy_msg -def test_claim_request_from_libsovrin_works( +def test_claim_request_from_libindy_works( aliceAgent, aliceAcceptedFaber, aliceAcceptedAcme, @@ -26,7 +26,7 @@ async def create_claim_init_data_and_send_msg(): assert claimReq - msg = get_claim_request_libsovrin_msg(claimReq, schema.seqId) + msg = get_claim_request_libindy_msg(claimReq, schema.seqId) aliceAgent.signAndSendToLink(msg=msg, linkName=faberLink.name) diff --git a/sovrin_client/test/agent/test_anoncreds_proof.py b/indy_client/test/agent/test_anoncreds_proof.py similarity index 91% rename from sovrin_client/test/agent/test_anoncreds_proof.py rename to indy_client/test/agent/test_anoncreds_proof.py index b758b4914..62f0f3767 100644 --- a/sovrin_client/test/agent/test_anoncreds_proof.py +++ b/indy_client/test/agent/test_anoncreds_proof.py @@ -1,10 +1,10 @@ -from sovrin_client.test import waits +from indy_client.test import waits from stp_core.loop.eventually import eventually from anoncreds.protocol.types import SchemaKey, ID, ProofRequest -from sovrin_client.test.agent.messages import get_proof_libsovrin_msg +from indy_client.test.agent.messages import get_proof_libindy_msg -def test_proof_from_libsovrin_works( +def test_proof_from_libindy_works( aliceAgent, aliceAcceptedFaber, aliceAcceptedAcme, @@ -40,7 +40,7 @@ async def create_proof(): proof = await aliceAgent.prover.presentProof(proofRequest) - msg = get_proof_libsovrin_msg( + msg = get_proof_libindy_msg( acme_link, acme_proof_req, proof, str(schema.seqId), schema.seqId) aliceAgent.signAndSendToLink(msg=msg, linkName=acme_link.name) diff --git a/sovrin_client/test/agent/test_anoncreds_send_proof_request.py b/indy_client/test/agent/test_anoncreds_send_proof_request.py similarity index 97% rename from sovrin_client/test/agent/test_anoncreds_send_proof_request.py rename to indy_client/test/agent/test_anoncreds_send_proof_request.py index 7e036d290..512576c79 100644 --- a/sovrin_client/test/agent/test_anoncreds_send_proof_request.py +++ b/indy_client/test/agent/test_anoncreds_send_proof_request.py @@ -1,4 +1,4 @@ -from sovrin_client.test import waits +from indy_client.test import waits from stp_core.loop.eventually import eventually from anoncreds.protocol.types import SchemaKey, ID diff --git a/sovrin_client/test/agent/test_connection.py b/indy_client/test/agent/test_connection.py similarity index 66% rename from sovrin_client/test/agent/test_connection.py rename to indy_client/test/agent/test_connection.py index 3c95df1ef..110b779fc 100644 --- a/sovrin_client/test/agent/test_connection.py +++ b/indy_client/test/agent/test_connection.py @@ -4,7 +4,7 @@ @pytest.mark.skip("SOV-564. Not yet implemented") def test_connect(): """ - Connect to the sovrin network and ensure we have the latest keys for all of + Connect to the indy network and ensure we have the latest keys for all of the owner's identifiers. """ raise NotImplementedError diff --git a/sovrin_client/test/agent/test_general_use_case.py b/indy_client/test/agent/test_general_use_case.py similarity index 94% rename from sovrin_client/test/agent/test_general_use_case.py rename to indy_client/test/agent/test_general_use_case.py index 9bb5c2357..15a402e23 100644 --- a/sovrin_client/test/agent/test_general_use_case.py +++ b/indy_client/test/agent/test_general_use_case.py @@ -1,17 +1,17 @@ import json -from sovrin_client.agent.walleted_agent import WalletedAgent -from sovrin_client.test.agent.mock_backend_system import MockBackendSystem +from indy_client.agent.walleted_agent import WalletedAgent +from indy_client.test.agent.mock_backend_system import MockBackendSystem import anoncreds.protocol.types -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_client.test.constants import primes -from sovrin_common.identity import Identity -from sovrin_common.constants import TRUST_ANCHOR -from sovrin_node.pool.local_pool import create_local_pool +from indy_client.client.wallet.wallet import Wallet +from indy_client.test.constants import primes +from indy_common.identity import Identity +from indy_common.constants import TRUST_ANCHOR +from indy_node.pool.local_pool import create_local_pool # noinspection PyUnresolvedReferences -from sovrin_node.test.conftest import tdir, conf, nodeSet, tconf, \ +from indy_node.test.conftest import tdir, conf, nodeSet, tconf, \ updatedPoolTxnData, updatedDomainTxnFile, txnPoolNodeSet, poolTxnData, \ dirName, tdirWithDomainTxns, tdirWithPoolTxns, \ domainTxnOrderedFields, genesisTxns, stewardWallet, poolTxnStewardData, \ diff --git a/sovrin_client/test/agent/test_owner_identifiers.py b/indy_client/test/agent/test_owner_identifiers.py similarity index 88% rename from sovrin_client/test/agent/test_owner_identifiers.py rename to indy_client/test/agent/test_owner_identifiers.py index 8bfa749ef..0d8a80684 100644 --- a/sovrin_client/test/agent/test_owner_identifiers.py +++ b/indy_client/test/agent/test_owner_identifiers.py @@ -22,7 +22,7 @@ def test_add_second_identifier(): @pytest.mark.skip("SOV-565. Not yet implemented") def test_sync_identifier_keys(): """ - Connect to the sovrin network and ensure we have the latest keys for all of + Connect to the indy network and ensure we have the latest keys for all of the owner's identifiers. """ raise NotImplementedError diff --git a/sovrin_client/test/agent/test_owner_request_handling.py b/indy_client/test/agent/test_owner_request_handling.py similarity index 100% rename from sovrin_client/test/agent/test_owner_request_handling.py rename to indy_client/test/agent/test_owner_request_handling.py diff --git a/sovrin_client/test/agent/test_ping.py b/indy_client/test/agent/test_ping.py similarity index 91% rename from sovrin_client/test/agent/test_ping.py rename to indy_client/test/agent/test_ping.py index 692f2d413..5c075be79 100644 --- a/sovrin_client/test/agent/test_ping.py +++ b/indy_client/test/agent/test_ping.py @@ -1,8 +1,8 @@ -from sovrin_client.test import waits +from indy_client.test import waits from stp_core.loop.eventually import eventually from plenum.test.testable import spy, SpyLog -from sovrin_client.agent.constants import PING, PONG +from indy_client.agent.constants import PING, PONG whitelist = ["is not connected - message will not be sent immediately.If this problem does not resolve itself - check your firewall settings"] diff --git a/sovrin_client/test/agent/test_startup_shutdown.py b/indy_client/test/agent/test_startup_shutdown.py similarity index 93% rename from sovrin_client/test/agent/test_startup_shutdown.py rename to indy_client/test/agent/test_startup_shutdown.py index 7c99161e5..c90204b18 100644 --- a/sovrin_client/test/agent/test_startup_shutdown.py +++ b/indy_client/test/agent/test_startup_shutdown.py @@ -1,7 +1,7 @@ from plenum.common.startable import Status from pytest import fixture -from sovrin_client.agent.agent import Agent +from indy_client.agent.agent import Agent @fixture(scope="module") diff --git a/sovrin_client/test/agent/test_walleted_agent.py b/indy_client/test/agent/test_walleted_agent.py similarity index 60% rename from sovrin_client/test/agent/test_walleted_agent.py rename to indy_client/test/agent/test_walleted_agent.py index 3d2cae817..06279cfe0 100644 --- a/sovrin_client/test/agent/test_walleted_agent.py +++ b/indy_client/test/agent/test_walleted_agent.py @@ -1,6 +1,6 @@ from plenum.test.testable import spyable -from sovrin_client.agent.walleted_agent import WalletedAgent -from sovrin_client.agent.runnable_agent import RunnableAgent +from indy_client.agent.walleted_agent import WalletedAgent +from indy_client.agent.runnable_agent import RunnableAgent # @spyable( diff --git a/sovrin_client/test/agent/thrift.py b/indy_client/test/agent/thrift.py similarity index 83% rename from sovrin_client/test/agent/thrift.py rename to indy_client/test/agent/thrift.py index 45ed30191..7727bcd3b 100644 --- a/sovrin_client/test/agent/thrift.py +++ b/indy_client/test/agent/thrift.py @@ -1,13 +1,13 @@ from plenum.common.signer_did import DidSigner -from sovrin_client.agent.constants import EVENT_NOTIFY_MSG -from sovrin_client.client.wallet.wallet import Wallet +from indy_client.agent.constants import EVENT_NOTIFY_MSG +from indy_client.client.wallet.wallet import Wallet from stp_core.common.log import getlogger -from sovrin_client.agent.runnable_agent import RunnableAgent -from sovrin_client.agent.agent import create_client +from indy_client.agent.runnable_agent import RunnableAgent +from indy_client.agent.agent import create_client -from sovrin_client.agent.walleted_agent import WalletedAgent -from sovrin_client.test.agent.helper import buildThriftWallet -from sovrin_client.test.client.TestClient import TestClient +from indy_client.agent.walleted_agent import WalletedAgent +from indy_client.test.agent.helper import buildThriftWallet +from indy_client.test.client.TestClient import TestClient logger = getlogger() diff --git a/sovrin_client/test/anon_creds/__init__.py b/indy_client/test/anon_creds/__init__.py similarity index 100% rename from sovrin_client/test/anon_creds/__init__.py rename to indy_client/test/anon_creds/__init__.py diff --git a/sovrin_client/test/anon_creds/conftest.py b/indy_client/test/anon_creds/conftest.py similarity index 100% rename from sovrin_client/test/anon_creds/conftest.py rename to indy_client/test/anon_creds/conftest.py diff --git a/sovrin_client/test/anon_creds/test_anoncreds_usage.py b/indy_client/test/anon_creds/test_anoncreds_usage.py similarity index 83% rename from sovrin_client/test/anon_creds/test_anoncreds_usage.py rename to indy_client/test/anon_creds/test_anoncreds_usage.py index 85e8f1b15..6084af6c3 100644 --- a/sovrin_client/test/anon_creds/test_anoncreds_usage.py +++ b/indy_client/test/anon_creds/test_anoncreds_usage.py @@ -2,10 +2,10 @@ from anoncreds.protocol.repo.attributes_repo import AttributeRepoInMemory from anoncreds.protocol.types import ID, PredicateGE, AttributeInfo, ProofRequest -from sovrin_client.anon_creds.sovrin_issuer import SovrinIssuer -from sovrin_client.anon_creds.sovrin_prover import SovrinProver -from sovrin_client.anon_creds.sovrin_verifier import SovrinVerifier -from sovrin_client.test.anon_creds.conftest import GVT +from indy_client.anon_creds.indy_issuer import IndyIssuer +from indy_client.anon_creds.indy_prover import IndyProver +from indy_client.anon_creds.indy_verifier import IndyVerifier +from indy_client.test.anon_creds.conftest import GVT @pytest.fixture(scope="module") @@ -15,17 +15,17 @@ def attrRepo(): @pytest.fixture(scope="module") def issuer(steward, stewardWallet, attrRepo): - return SovrinIssuer(steward, stewardWallet, attrRepo) + return IndyIssuer(steward, stewardWallet, attrRepo) @pytest.fixture(scope="module") def prover(userClientA, userWalletA): - return SovrinProver(userClientA, userWalletA) + return IndyProver(userClientA, userWalletA) @pytest.fixture(scope="module") def verifier(userClientB, userWalletB): - return SovrinVerifier(userClientB, userWalletB) + return IndyVerifier(userClientB, userWalletB) def testAnonCredsPrimaryOnly( diff --git a/sovrin_client/test/anon_creds/test_public_repo.py b/indy_client/test/anon_creds/test_public_repo.py similarity index 97% rename from sovrin_client/test/anon_creds/test_public_repo.py rename to indy_client/test/anon_creds/test_public_repo.py index 37877a83f..18c5672da 100644 --- a/sovrin_client/test/anon_creds/test_public_repo.py +++ b/indy_client/test/anon_creds/test_public_repo.py @@ -11,8 +11,8 @@ from plenum.common.util import randomString from stp_core.common.log import getlogger -from sovrin_client.anon_creds.sovrin_public_repo import SovrinPublicRepo -from sovrin_client.test.anon_creds.conftest import GVT +from indy_client.anon_creds.indy_public_repo import IndyPublicRepo +from indy_client.test.anon_creds.conftest import GVT from random import randint @@ -21,7 +21,7 @@ @pytest.fixture(scope="module") def publicRepo(steward, stewardWallet): - return SovrinPublicRepo(steward, stewardWallet) + return IndyPublicRepo(steward, stewardWallet) @pytest.fixture(scope="module") diff --git a/sovrin_client/test/cli/__init__.py b/indy_client/test/cli/__init__.py similarity index 100% rename from sovrin_client/test/cli/__init__.py rename to indy_client/test/cli/__init__.py diff --git a/sovrin_client/test/cli/conftest.py b/indy_client/test/cli/conftest.py similarity index 96% rename from sovrin_client/test/cli/conftest.py rename to indy_client/test/cli/conftest.py index 03ff9b234..614f6c461 100644 --- a/sovrin_client/test/cli/conftest.py +++ b/indy_client/test/cli/conftest.py @@ -6,10 +6,10 @@ import pytest from plenum.common.signer_did import DidSigner -from sovrin_client.test.agent.acme import ACME_ID, ACME_SEED -from sovrin_client.test.agent.acme import ACME_VERKEY -from sovrin_client.test.agent.faber import FABER_ID, FABER_VERKEY, FABER_SEED -from sovrin_client.test.agent.thrift import THRIFT_ID, THRIFT_VERKEY, THRIFT_SEED +from indy_client.test.agent.acme import ACME_ID, ACME_SEED +from indy_client.test.agent.acme import ACME_VERKEY +from indy_client.test.agent.faber import FABER_ID, FABER_VERKEY, FABER_SEED +from indy_client.test.agent.thrift import THRIFT_ID, THRIFT_VERKEY, THRIFT_SEED from stp_core.crypto.util import randomSeed from stp_core.network.port_dispenser import genHa @@ -26,12 +26,12 @@ from stp_core.loop.eventually import eventually from stp_core.common.log import getlogger from plenum.test.conftest import tdirWithPoolTxns, tdirWithDomainTxns -from sovrin_client.cli.helper import USAGE_TEXT, NEXT_COMMANDS_TO_TRY_TEXT -from sovrin_client.test.helper import createNym, buildStewardClient -from sovrin_common.constants import ENDPOINT, TRUST_ANCHOR -from sovrin_common.roles import Roles -from sovrin_common.test.conftest import poolTxnTrusteeNames -from sovrin_common.test.conftest import domainTxnOrderedFields +from indy_client.cli.helper import USAGE_TEXT, NEXT_COMMANDS_TO_TRY_TEXT +from indy_client.test.helper import createNym, buildStewardClient +from indy_common.constants import ENDPOINT, TRUST_ANCHOR +from indy_common.roles import Roles +from indy_common.test.conftest import poolTxnTrusteeNames +from indy_common.test.conftest import domainTxnOrderedFields from plenum.common.keygen_utils import initNodeKeysForBothStacks, init_bls_keys # plenum.common.util.loggingConfigured = False @@ -40,10 +40,10 @@ from plenum.test.cli.helper import newKeyPair, waitAllNodesStarted, \ doByCtx -from sovrin_common.config_util import getConfig -from sovrin_client.test.cli.helper import ensureNodesCreated, get_connection_request, \ +from indy_common.config_util import getConfig +from indy_client.test.cli.helper import ensureNodesCreated, get_connection_request, \ getPoolTxnData, newCLI, getCliBuilder, P, prompt_is, addAgent, doSendNodeCmd, addNym -from sovrin_client.test.agent.conftest import faberIsRunning as runningFaber, \ +from indy_client.test.agent.conftest import faberIsRunning as runningFaber, \ acmeIsRunning as runningAcme, thriftIsRunning as runningThrift, emptyLooper,\ faberWallet, acmeWallet, thriftWallet, agentIpAddress, \ faberAgentPort, acmeAgentPort, thriftAgentPort, faberAgent, acmeAgent, \ @@ -55,7 +55,7 @@ @pytest.yield_fixture(scope="session") def cliTempLogger(): - file_name = "sovrin_cli_test.log" + file_name = "indy_cli_test.log" file_path = os.path.join(tempfile.tempdir, file_name) with open(file_path, 'w') as f: pass @@ -128,8 +128,8 @@ def susanMap(): def faberMap(agentIpAddress, faberAgentPort): ha = "{}:{}".format(agentIpAddress, faberAgentPort) return {'inviter': 'Faber College', - 'invite': "sample/faber-request.sovrin", - 'invite-not-exists': "sample/faber-request.sovrin.not.exists", + 'invite': "sample/faber-request.indy", + 'invite-not-exists': "sample/faber-request.indy.not.exists", 'inviter-not-exists': "non-existing-inviter", 'seed': FABER_SEED.decode(), "remote": FABER_ID, @@ -151,9 +151,9 @@ def acmeMap(agentIpAddress, acmeAgentPort): ENDPOINT: ha, "endpointAttr": json.dumps({ENDPOINT: {'ha': ha}}), "invalidEndpointAttr": json.dumps({ENDPOINT: {'ha': '127.0.0.1: 11'}}), - 'invite': 'sample/acme-job-application.sovrin', - 'invite-no-pr': 'sample/acme-job-application-no-pr.sovrin', - 'invite-not-exists': 'sample/acme-job-application.sovrin.not.exists', + 'invite': 'sample/acme-job-application.indy', + 'invite-no-pr': 'sample/acme-job-application-no-pr.indy', + 'invite-not-exists': 'sample/acme-job-application.indy.not.exists', 'inviter-not-exists': 'non-existing-inviter', 'seed': ACME_SEED.decode(), "remote": ACME_ID, @@ -177,8 +177,8 @@ def acmeMap(agentIpAddress, acmeAgentPort): def thriftMap(agentIpAddress, thriftAgentPort): ha = "{}:{}".format(agentIpAddress, thriftAgentPort) return {'inviter': 'Thrift Bank', - 'invite': "sample/thrift-loan-application.sovrin", - 'invite-not-exists': "sample/thrift-loan-application.sovrin.not.exists", + 'invite': "sample/thrift-loan-application.indy", + 'invite-not-exists': "sample/thrift-loan-application.indy.not.exists", 'inviter-not-exists': "non-existing-inviter", 'seed': THRIFT_SEED.decode(), "remote": THRIFT_ID, @@ -276,7 +276,7 @@ def connectUsage(usageLine): @pytest.fixture(scope="module") def notConnectedStatus(connectUsage): - return ['Not connected to Sovrin network. Please connect first.', ''] +\ + return ['Not connected to Indy network. Please connect first.', ''] +\ connectUsage +\ ['', ''] @@ -311,9 +311,9 @@ def unsyncedInviteAcceptedWhenNotConnected(availableClaims): return [ "Response from {inviter}", "Trust established.", - "DID created in Sovrin." + "DID created in Indy." ] + availableClaims + [ - "Cannot check if DID is written to Sovrin." + "Cannot check if DID is written to Indy." ] @@ -322,9 +322,9 @@ def syncedInviteAcceptedOutWithoutClaims(): return [ "Signature accepted.", "Trust established.", - "DID created in Sovrin.", + "DID created in Indy.", "Synchronizing...", - "Confirmed DID written to Sovrin." + "Confirmed DID written to Indy." ] @@ -346,7 +346,7 @@ def unsycedAcceptedInviteWithoutClaimOut(syncedInviteAcceptedOutWithoutClaims): "Attempting to sync...", "Synchronizing...", ] + syncedInviteAcceptedOutWithoutClaims + \ - ["Confirmed DID written to Sovrin."] + ["Confirmed DID written to Indy."] @pytest.fixture(scope="module") @@ -831,7 +831,7 @@ def showConnectionOut(nextCommandsToTryUsageLine, connectionNotYetSynced): return [ " Name: {inviter}", " DID: not yet assigned", - " Trust anchor: {inviter} (not yet written to Sovrin)", + " Trust anchor: {inviter} (not yet written to Indy)", " Verification key: ", " Signing key: ", " Remote: {remote}", diff --git a/sovrin_client/test/cli/constants.py b/indy_client/test/cli/constants.py similarity index 64% rename from sovrin_client/test/cli/constants.py rename to indy_client/test/cli/constants.py index 9110f9a8c..fbda30638 100644 --- a/sovrin_client/test/cli/constants.py +++ b/indy_client/test/cli/constants.py @@ -2,10 +2,10 @@ NODE_REQUEST_COMPLETED = "Node request completed" NODE_REQUEST_FAILED = "Node request failed" SCHEMA_ADDED = [ - 'The following schema is published to the Sovrin distributed ledger', + 'The following schema is published to the Indy distributed ledger', 'Sequence number is'] CLAIM_DEF_ADDED = [ - 'The claim definition was published to the Sovrin distributed ledger', + 'The claim definition was published to the Indy distributed ledger', 'Sequence number is'] INVALID_SYNTAX = "Invalid syntax" ERROR = 'Error:' diff --git a/sovrin_client/test/cli/helper.py b/indy_client/test/cli/helper.py similarity index 95% rename from sovrin_client/test/cli/helper.py rename to indy_client/test/cli/helper.py index f5530ccdd..22ad76e21 100644 --- a/sovrin_client/test/cli/helper.py +++ b/indy_client/test/cli/helper.py @@ -27,20 +27,20 @@ waitAllNodesStarted, newCLI as newPlenumCLI from plenum.test.helper import initDirWithGenesisTxns from plenum.test.testable import spyable -from sovrin_client.cli.cli import SovrinCli -from sovrin_client.client.wallet.connection import Connection -from sovrin_common.constants import Environment +from indy_client.cli.cli import IndyCli +from indy_client.client.wallet.connection import Connection +from indy_common.constants import Environment from stp_core.network.port_dispenser import genHa -from sovrin_common.constants import NYM -from sovrin_client.test.client.TestClient import TestClient -from sovrin_common.txn_util import getTxnOrderedFields -from sovrin_common.roles import Roles +from indy_common.constants import NYM +from indy_client.test.client.TestClient import TestClient +from indy_common.txn_util import getTxnOrderedFields +from indy_common.roles import Roles logger = getlogger() -@spyable(methods=[SovrinCli.print, SovrinCli.printTokens]) -class TestCLI(SovrinCli, TestCliCore): +@spyable(methods=[IndyCli.print, IndyCli.printTokens]) +class TestCLI(IndyCli, TestCliCore): pass # def __init__(self, *args, **kwargs): # super().__init__(*args, **kwargs) @@ -118,7 +118,7 @@ def ensureNodesCreated(cli, nodeNames): def getFileLines(path, caller_file=None): - filePath = SovrinCli._getFilePath(path, caller_file) + filePath = IndyCli._getFilePath(path, caller_file) with open(filePath, 'r') as fin: lines = fin.read().splitlines() return lines @@ -241,7 +241,7 @@ def newCLI(looper, tdir, subDirectory=None, conf=None, poolDir=None, conf.ENVS[pool.name].poolLedger, conf.ENVS[pool.name].domainLedger ) - from sovrin_node.test.helper import TestNode + from indy_node.test.helper import TestNode new_cli = newPlenumCLI( looper, tempDir, @@ -253,7 +253,7 @@ def newCLI(looper, tdir, subDirectory=None, conf=None, poolDir=None, logFileName=logFileName, name=name, agentCreator=True) - if isinstance(new_cli, SovrinCli) and agent is not None: + if isinstance(new_cli, IndyCli) and agent is not None: new_cli.agent = agent return new_cli @@ -373,7 +373,7 @@ def newKey(be, do, userCli, seed=None): def getAgentCliHelpString(): - return """Sovrin-CLI, a simple command-line interface for a Sovrin Identity platform. + return """Indy-CLI, a simple command-line interface for a Indy Identity platform. Commands: help - Shows this or specific help message for given command Usage: @@ -461,7 +461,7 @@ def compare(old, new): (unpersistedWallet.walletId, restoredWallet.walletId), (unpersistedWallet._repo.wallet.name, restoredWallet._repo.wallet.name), - # from sovrin-issuer-wallet-in-memory + # from indy-issuer-wallet-in-memory (unpersistedWallet.availableClaimsToAll, restoredWallet.availableClaimsToAll), (unpersistedWallet.availableClaimsByNonce, diff --git a/sovrin_client/test/cli/test_accept_invitation_base58_as_pubkey.py b/indy_client/test/cli/test_accept_invitation_base58_as_pubkey.py similarity index 87% rename from sovrin_client/test/cli/test_accept_invitation_base58_as_pubkey.py rename to indy_client/test/cli/test_accept_invitation_base58_as_pubkey.py index dbfe7c86d..8fbb945c2 100644 --- a/sovrin_client/test/cli/test_accept_invitation_base58_as_pubkey.py +++ b/indy_client/test/cli/test_accept_invitation_base58_as_pubkey.py @@ -5,17 +5,17 @@ from plenum.common.constants import PUBKEY # noinspection PyUnresolvedReferences -from sovrin_client.test.cli.conftest \ +from indy_client.test.cli.conftest \ import faberMap as faberMapWithoutEndpointPubkey # noinspection PyUnresolvedReferences -from sovrin_client.test.cli.test_tutorial import alice_accepted_faber_request, \ +from indy_client.test.cli.test_tutorial import alice_accepted_faber_request, \ aliceCli, preRequisite, faberCli, acmeCli, thriftCli, faberWithEndpointAdded, acmeWithEndpointAdded, \ thriftWithEndpointAdded, walletCreatedForTestEnv, \ faberInviteSyncedWithEndpoint, faberInviteSyncedWithoutEndpoint, \ faberInviteLoadedByAlice, accept_request, preRequisite -from sovrin_common.constants import ENDPOINT +from indy_common.constants import ENDPOINT @pytest.fixture(scope="module") diff --git a/sovrin_client/test/cli/test_add_genesis_transaction.py b/indy_client/test/cli/test_add_genesis_transaction.py similarity index 85% rename from sovrin_client/test/cli/test_add_genesis_transaction.py rename to indy_client/test/cli/test_add_genesis_transaction.py index 557e3712e..01a8b9f1f 100644 --- a/sovrin_client/test/cli/test_add_genesis_transaction.py +++ b/indy_client/test/cli/test_add_genesis_transaction.py @@ -3,10 +3,10 @@ from plenum.common.constants import VERKEY, DATA, NODE, TYPE from plenum.test.cli.helper import checkCmdValid -from sovrin_common.constants import NYM -from sovrin_common.constants import TARGET_NYM, ROLE -from sovrin_common.roles import Roles -from sovrin_common.transactions import SovrinTransactions +from indy_common.constants import NYM +from indy_common.constants import TARGET_NYM, ROLE +from indy_common.roles import Roles +from indy_common.transactions import IndyTransactions def executeAndCheckGenTxn(cli, cmd, typ, nym, role=None, data=None): @@ -32,7 +32,7 @@ def executeAndCheckGenTxn(cli, cmd, typ, nym, role=None, data=None): def prepareCmdAndCheckGenTxn( - cli, typ: SovrinTransactions, nym, role=None, data=None): + cli, typ: IndyTransactions, nym, role=None, data=None): cmd = "add genesis transaction {} dest={}".format(typ.name, nym) if role: cmd += " role={}".format(role) @@ -44,14 +44,14 @@ def prepareCmdAndCheckGenTxn( def testAddGenTxnBasic(cli): nym = "2ru5PcgeQzxF7QZYwQgDkG2K13PRqyigVw99zMYg8eML" role = None - typ = SovrinTransactions.NYM + typ = IndyTransactions.NYM prepareCmdAndCheckGenTxn(cli, typ, nym, role) def testAddGenTxnWithRole(cli): nym = "2ru5PcgeQzxF7QZYwQgDkG2K13PRqyigVw99zMYg8eML" role = Roles.STEWARD.name - typ = SovrinTransactions.NYM + typ = IndyTransactions.NYM prepareCmdAndCheckGenTxn(cli, typ, nym, role) diff --git a/sovrin_client/test/cli/test_agent_cli.py b/indy_client/test/cli/test_agent_cli.py similarity index 92% rename from sovrin_client/test/cli/test_agent_cli.py rename to indy_client/test/cli/test_agent_cli.py index a84262a40..eee32aa4d 100644 --- a/sovrin_client/test/cli/test_agent_cli.py +++ b/indy_client/test/cli/test_agent_cli.py @@ -4,11 +4,11 @@ from plenum.test.cli.helper import TestCliCore from plenum.test.testable import spyable -from sovrin_client.agent.agent_cli import AgentCli -from sovrin_client.test.agent.acme import create_acme, bootstrap_acme -from sovrin_client.test.agent.helper import buildAcmeWallet -from sovrin_client.test.cli.helper import getCliBuilder, getAgentCliHelpString -from sovrin_client.test.cli.test_tutorial import acmeWithEndpointAdded,\ +from indy_client.agent.agent_cli import AgentCli +from indy_client.test.agent.acme import create_acme, bootstrap_acme +from indy_client.test.agent.helper import buildAcmeWallet +from indy_client.test.cli.helper import getCliBuilder, getAgentCliHelpString +from indy_client.test.cli.test_tutorial import acmeWithEndpointAdded,\ connectIfNotAlreadyConnected, faberCli, acmeCli, thriftCli diff --git a/sovrin_client/test/cli/test_agent_startup.py b/indy_client/test/cli/test_agent_startup.py similarity index 87% rename from sovrin_client/test/cli/test_agent_startup.py rename to indy_client/test/cli/test_agent_startup.py index dbba5ea76..969cb4720 100644 --- a/sovrin_client/test/cli/test_agent_startup.py +++ b/indy_client/test/cli/test_agent_startup.py @@ -1,7 +1,7 @@ import pytest # it is fixture - do not remove -from sovrin_client.test.cli.conftest import acmeAddedByPhil as agentAddedBySponsor +from indy_client.test.cli.conftest import acmeAddedByPhil as agentAddedBySponsor from plenum.common.exceptions import OperationError, NoConsensusYet @@ -10,11 +10,11 @@ from plenum.common.types import HA from plenum.common.util import randomString from stp_core.network.util import checkPortAvailable -from sovrin_client.test.agent.conftest import startAgent +from indy_client.test.agent.conftest import startAgent -from sovrin_client.test.agent.acme import create_acme as createAgent -from sovrin_client.test.agent.acme import bootstrap_acme as bootstrap_agent -from sovrin_client.test.agent.helper import buildAcmeWallet as agentWallet +from indy_client.test.agent.acme import create_acme as createAgent +from indy_client.test.agent.acme import bootstrap_acme as bootstrap_agent +from indy_client.test.agent.helper import buildAcmeWallet as agentWallet agentPort = genHa()[1] diff --git a/sovrin_client/test/cli/test_agent_wallet_persistence.py b/indy_client/test/cli/test_agent_wallet_persistence.py similarity index 88% rename from sovrin_client/test/cli/test_agent_wallet_persistence.py rename to indy_client/test/cli/test_agent_wallet_persistence.py index e6fc01d13..bbe7f5a88 100644 --- a/sovrin_client/test/cli/test_agent_wallet_persistence.py +++ b/indy_client/test/cli/test_agent_wallet_persistence.py @@ -5,15 +5,15 @@ from plenum.common.util import randomString, normalizedWalletFileName from plenum.test.conftest import tdirWithPoolTxns -from sovrin_client.agent.agent import createAgent -from sovrin_client.test.agent.conftest import emptyLooper, startAgent +from indy_client.agent.agent import createAgent +from indy_client.test.agent.conftest import emptyLooper, startAgent -from sovrin_client.test.agent.acme import create_acme as createAcmeAgent, AcmeAgent -from sovrin_client.test.agent.helper import buildAcmeWallet as agentWallet -from sovrin_client.test.cli.conftest \ +from indy_client.test.agent.acme import create_acme as createAcmeAgent, AcmeAgent +from indy_client.test.agent.helper import buildAcmeWallet as agentWallet +from indy_client.test.cli.conftest \ import acmeAddedByPhil as agentAddedBySponsor -from sovrin_client.test.cli.helper import compareAgentIssuerWallet -from sovrin_client.test.client.TestClient import TestClient +from indy_client.test.cli.helper import compareAgentIssuerWallet +from indy_client.test.client.TestClient import TestClient from stp_core.network.port_dispenser import genHa agentPort = genHa()[1] diff --git a/sovrin_client/test/cli/test_change_key.py b/indy_client/test/cli/test_change_key.py similarity index 100% rename from sovrin_client/test/cli/test_change_key.py rename to indy_client/test/cli/test_change_key.py diff --git a/sovrin_client/test/cli/test_cli_exit.py b/indy_client/test/cli/test_cli_exit.py similarity index 94% rename from sovrin_client/test/cli/test_cli_exit.py rename to indy_client/test/cli/test_cli_exit.py index 1f7a82a9d..6b8104f6b 100644 --- a/sovrin_client/test/cli/test_cli_exit.py +++ b/indy_client/test/cli/test_cli_exit.py @@ -1,6 +1,6 @@ import pytest -from sovrin_client.test.cli.test_tutorial import prompt_is +from indy_client.test.cli.test_tutorial import prompt_is from stp_core.loop.eventually import eventually from plenum.cli.cli import Exit diff --git a/sovrin_client/test/cli/test_command_reg_ex.py b/indy_client/test/cli/test_command_reg_ex.py similarity index 97% rename from sovrin_client/test/cli/test_command_reg_ex.py rename to indy_client/test/cli/test_command_reg_ex.py index f3d38eb6d..b98f0cc78 100644 --- a/sovrin_client/test/cli/test_command_reg_ex.py +++ b/indy_client/test/cli/test_command_reg_ex.py @@ -5,9 +5,9 @@ from plenum.test.cli.test_command_reg_ex import getMatchedVariables from prompt_toolkit.contrib.regular_languages.compiler import compile -from sovrin_client.cli.helper import getNewClientGrams -from sovrin_common.constants import REF -from sovrin_common.roles import Roles +from indy_client.cli.helper import getNewClientGrams +from indy_common.constants import REF +from indy_common.roles import Roles @pytest.fixture("module") @@ -130,7 +130,7 @@ def testAddAttrProverRegEx(grammar): def testSendClaimDefRegEx(grammar): matchedVars = getMatchedVariables( grammar, "send CLAIM_DEF ref=15 signature_type=CL") - from sovrin_common.constants import SIGNATURE_TYPE + from indy_common.constants import SIGNATURE_TYPE assertCliTokens(matchedVars, { "send_claim_def": "send CLAIM_DEF", REF: "15", SIGNATURE_TYPE: "CL"}) @@ -138,33 +138,33 @@ def testSendClaimDefRegEx(grammar): def test_send_get_claim_def_regex(grammar): matchedVars = getMatchedVariables( grammar, "send GET_CLAIM_DEF ref=15 signature_type=CL") - from sovrin_common.constants import SIGNATURE_TYPE + from indy_common.constants import SIGNATURE_TYPE assertCliTokens(matchedVars, { "send_get_claim_def": "send GET_CLAIM_DEF", REF: "15", SIGNATURE_TYPE: "CL"}) def testShowFileCommandRegEx(grammar): matchedVars = getMatchedVariables(grammar, - "show sample/faber-request.sovrin") + "show sample/faber-request.indy") assertCliTokens(matchedVars, { - "show_file": "show", "file_path": "sample/faber-request.sovrin"}) + "show_file": "show", "file_path": "sample/faber-request.indy"}) matchedVars = getMatchedVariables(grammar, - "show sample/faber-request.sovrin ") + "show sample/faber-request.indy ") assertCliTokens(matchedVars, { - "show_file": "show", "file_path": "sample/faber-request.sovrin"}) + "show_file": "show", "file_path": "sample/faber-request.indy"}) def testLoadFileCommandRegEx(grammar): matchedVars = getMatchedVariables(grammar, - "load sample/faber-request.sovrin") + "load sample/faber-request.indy") assertCliTokens(matchedVars, { - "load_file": "load", "file_path": "sample/faber-request.sovrin"}) + "load_file": "load", "file_path": "sample/faber-request.indy"}) matchedVars = getMatchedVariables(grammar, - "load sample/faber-request.sovrin ") + "load sample/faber-request.indy ") assertCliTokens(matchedVars, { - "load_file": "load", "file_path": "sample/faber-request.sovrin"}) + "load_file": "load", "file_path": "sample/faber-request.indy"}) def testShowLinkRegEx(grammar): diff --git a/sovrin_client/test/cli/test_connect_env.py b/indy_client/test/cli/test_connect_env.py similarity index 77% rename from sovrin_client/test/cli/test_connect_env.py rename to indy_client/test/cli/test_connect_env.py index 257271ec3..7d18a6f25 100644 --- a/sovrin_client/test/cli/test_connect_env.py +++ b/indy_client/test/cli/test_connect_env.py @@ -1,9 +1,9 @@ import pytest -from sovrin_client.test import waits +from indy_client.test import waits from stp_core.loop.eventually import eventually -from sovrin_client.test.cli.helper import checkConnectedToEnv, prompt_is +from indy_client.test.cli.helper import checkConnectedToEnv, prompt_is @pytest.fixture(scope="module") @@ -13,17 +13,17 @@ def alice(aliceCLI): def test_disconnect_when_not_connected(alice, be, do): be(alice) - do(None, expect=prompt_is("sovrin")) + do(None, expect=prompt_is("indy")) do('disconnect', within=1, expect=['Not connected to any environment.']) - do(None, expect=prompt_is("sovrin")) + do(None, expect=prompt_is("indy")) @pytest.fixture(scope="module") def alice_connected(alice, be, do, poolNodesCreated): be(alice) - do(None, expect=prompt_is("sovrin")) + do(None, expect=prompt_is("indy")) do('connect test', within=5, expect=["Connected to test"]) - do(None, expect=prompt_is("sovrin@test")) + do(None, expect=prompt_is("indy@test")) def test_connect_to_test(alice_connected): @@ -33,12 +33,12 @@ def test_connect_to_test(alice_connected): @pytest.fixture(scope="module") def alice_disconnected(alice, be, do, alice_connected): be(alice) - do(None, expect=prompt_is("sovrin@test")) + do(None, expect=prompt_is("indy@test")) do('disconnect', within=1, expect=[ 'Disconnecting from test ...', 'Disconnected from test' ]) - do(None, expect=prompt_is("sovrin")) + do(None, expect=prompt_is("indy")) def test_disconnect_when_connected(do, be, alice_disconnected): @@ -64,7 +64,7 @@ def testConnectEnv(poolNodesCreated, looper, notConnectedStatus): looper.run(eventually(checkConnectedToEnv, poolCLI, retryWait=1, timeout=timeout)) poolCLI.enterCmd("status") - assert "Connected to test Sovrin network" == poolCLI.lastCmdOutput + assert "Connected to test Indy network" == poolCLI.lastCmdOutput def testCreateMultiPoolNodes(multiPoolNodesCreated): @@ -83,10 +83,10 @@ def pool2(multiPoolNodesCreated): def test_connect_to_different_pools(do, be, cliForMultiNodePools): be(cliForMultiNodePools) - do(None, expect=prompt_is("sovrin")) + do(None, expect=prompt_is("indy")) do('connect pool1', within=5, expect=["Connected to pool1"]) - do(None, expect=prompt_is("sovrin@pool1")) + do(None, expect=prompt_is("indy@pool1")) do('connect pool2', within=5, expect=["Connected to pool2"]) - do(None, expect=prompt_is("sovrin@pool2")) + do(None, expect=prompt_is("indy@pool2")) do('connect pool1', within=5, expect=["Connected to pool1"]) - do(None, expect=prompt_is("sovrin@pool1")) + do(None, expect=prompt_is("indy@pool1")) diff --git a/sovrin_client/test/cli/test_merge_invitation.py b/indy_client/test/cli/test_merge_invitation.py similarity index 95% rename from sovrin_client/test/cli/test_merge_invitation.py rename to indy_client/test/cli/test_merge_invitation.py index ff3f93af2..57f7b6bdb 100644 --- a/sovrin_client/test/cli/test_merge_invitation.py +++ b/indy_client/test/cli/test_merge_invitation.py @@ -1,6 +1,6 @@ -from sovrin_client.client.wallet.connection import Connection -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_client.agent.walleted_agent import WalletedAgent +from indy_client.client.wallet.connection import Connection +from indy_client.client.wallet.wallet import Wallet +from indy_client.agent.walleted_agent import WalletedAgent from plenum.common.constants import NAME, VERSION, ATTRIBUTES, VERIFIABLE_ATTRIBUTES, NONCE diff --git a/sovrin_client/test/cli/test_new_identifier.py b/indy_client/test/cli/test_new_identifier.py similarity index 100% rename from sovrin_client/test/cli/test_new_identifier.py rename to indy_client/test/cli/test_new_identifier.py diff --git a/sovrin_client/test/cli/test_node.py b/indy_client/test/cli/test_node.py similarity index 97% rename from sovrin_client/test/cli/test_node.py rename to indy_client/test/cli/test_node.py index 4a273b80a..2572e0dd4 100644 --- a/sovrin_client/test/cli/test_node.py +++ b/indy_client/test/cli/test_node.py @@ -4,7 +4,7 @@ from plenum.test.cli.helper import exitFromCli from stp_core.network.port_dispenser import genHa -from sovrin_client.test.cli.helper import doSendNodeCmd +from indy_client.test.cli.helper import doSendNodeCmd def testAddNewNode(newNodeAdded): diff --git a/sovrin_client/test/cli/test_node_demotion.py b/indy_client/test/cli/test_node_demotion.py similarity index 92% rename from sovrin_client/test/cli/test_node_demotion.py rename to indy_client/test/cli/test_node_demotion.py index 315b09d73..6f8968e84 100644 --- a/sovrin_client/test/cli/test_node_demotion.py +++ b/indy_client/test/cli/test_node_demotion.py @@ -1,9 +1,9 @@ import pytest from plenum.common.signer_did import DidSigner from stp_core.crypto.util import randomSeed -from sovrin_client.test.cli.helper import addAgent +from indy_client.test.cli.helper import addAgent from plenum.common.constants import SERVICES, VALIDATOR, TARGET_NYM, DATA -from sovrin_client.test.cli.constants import NODE_REQUEST_COMPLETED, NODE_REQUEST_FAILED +from indy_client.test.cli.constants import NODE_REQUEST_COMPLETED, NODE_REQUEST_FAILED def ensurePoolIsOperable(be, do, cli): diff --git a/sovrin_client/test/cli/test_node_suspension.py b/indy_client/test/cli/test_node_suspension.py similarity index 96% rename from sovrin_client/test/cli/test_node_suspension.py rename to indy_client/test/cli/test_node_suspension.py index 70fbc6159..0c30a1b18 100644 --- a/sovrin_client/test/cli/test_node_suspension.py +++ b/indy_client/test/cli/test_node_suspension.py @@ -1,10 +1,10 @@ from plenum.common.constants import SERVICES, VALIDATOR, TARGET_NYM, DATA -from sovrin_common.roles import Roles +from indy_common.roles import Roles from stp_core.network.port_dispenser import genHa import pytest -from sovrin_client.test.cli.helper import doSendNodeCmd +from indy_client.test.cli.helper import doSendNodeCmd def testSuspendNode(be, do, trusteeCli, newNodeAdded): diff --git a/sovrin_client/test/cli/test_nym.py b/indy_client/test/cli/test_nym.py similarity index 97% rename from sovrin_client/test/cli/test_nym.py rename to indy_client/test/cli/test_nym.py index 07bbba77c..8194f0135 100644 --- a/sovrin_client/test/cli/test_nym.py +++ b/indy_client/test/cli/test_nym.py @@ -1,12 +1,12 @@ import pytest from plenum.common.signer_did import DidSigner from plenum.common.signer_simple import SimpleSigner -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_client.test.cli.helper import prompt_is, addNym, ensureConnectedToTestEnv, createUuidIdentifier, \ +from indy_client.client.wallet.wallet import Wallet +from indy_client.test.cli.helper import prompt_is, addNym, ensureConnectedToTestEnv, createUuidIdentifier, \ createHalfKeyIdentifierAndAbbrevVerkey -from sovrin_common.roles import Roles +from indy_common.roles import Roles from plenum.common.constants import TARGET_NYM -from sovrin_node.test.did.conftest import wallet, abbrevVerkey +from indy_node.test.did.conftest import wallet, abbrevVerkey TRUST_ANCHOR_SEED = b'TRUST0NO0ONE00000000000000000000' diff --git a/sovrin_client/test/cli/test_nym_suspension.py b/indy_client/test/cli/test_nym_suspension.py similarity index 97% rename from sovrin_client/test/cli/test_nym_suspension.py rename to indy_client/test/cli/test_nym_suspension.py index 96bdec2b7..814f79f6d 100644 --- a/sovrin_client/test/cli/test_nym_suspension.py +++ b/indy_client/test/cli/test_nym_suspension.py @@ -5,8 +5,8 @@ from plenum.common.signer_did import DidSigner from plenum.common.signer_simple import SimpleSigner -from sovrin_client.test.cli.conftest import nymAddedOut -from sovrin_common.roles import Roles +from indy_client.test.cli.conftest import nymAddedOut +from indy_common.roles import Roles def id_and_seed(): diff --git a/sovrin_client/test/cli/test_pool_config.py b/indy_client/test/cli/test_pool_config.py similarity index 95% rename from sovrin_client/test/cli/test_pool_config.py rename to indy_client/test/cli/test_pool_config.py index 6a5f6518c..7d8bc76b3 100644 --- a/sovrin_client/test/cli/test_pool_config.py +++ b/indy_client/test/cli/test_pool_config.py @@ -1,7 +1,7 @@ import pytest -from sovrin_node.test.upgrade.conftest import validUpgrade -from sovrin_client.test.cli.constants import INVALID_SYNTAX +from indy_node.test.upgrade.conftest import validUpgrade +from indy_client.test.cli.constants import INVALID_SYNTAX from plenum.common.constants import VERSION diff --git a/sovrin_client/test/cli/test_pool_upgrade.py b/indy_client/test/cli/test_pool_upgrade.py similarity index 94% rename from sovrin_client/test/cli/test_pool_upgrade.py rename to indy_client/test/cli/test_pool_upgrade.py index 1275d2b7c..063234741 100644 --- a/sovrin_client/test/cli/test_pool_upgrade.py +++ b/indy_client/test/cli/test_pool_upgrade.py @@ -2,13 +2,13 @@ import pytest -from sovrin_node.test import waits +from indy_node.test import waits from stp_core.loop.eventually import eventually from plenum.common.constants import VERSION -from sovrin_common.constants import ACTION, CANCEL, JUSTIFICATION -from sovrin_node.test.upgrade.helper import checkUpgradeScheduled, \ +from indy_common.constants import ACTION, CANCEL, JUSTIFICATION +from indy_node.test.upgrade.helper import checkUpgradeScheduled, \ checkNoUpgradeScheduled -from sovrin_node.test.upgrade.conftest import validUpgrade, validUpgradeExpForceFalse, validUpgradeExpForceTrue +from indy_node.test.upgrade.conftest import validUpgrade, validUpgradeExpForceFalse, validUpgradeExpForceTrue def send_upgrade_cmd(do, expect, upgrade_data): diff --git a/sovrin_client/test/cli/test_pool_upgrade_validation.py b/indy_client/test/cli/test_pool_upgrade_validation.py similarity index 82% rename from sovrin_client/test/cli/test_pool_upgrade_validation.py rename to indy_client/test/cli/test_pool_upgrade_validation.py index c8e5a8296..05bbc7621 100644 --- a/sovrin_client/test/cli/test_pool_upgrade_validation.py +++ b/indy_client/test/cli/test_pool_upgrade_validation.py @@ -1,9 +1,9 @@ import pytest -from sovrin_node.test.upgrade.conftest import validUpgrade -from sovrin_client.test.cli.constants import INVALID_SYNTAX +from indy_node.test.upgrade.conftest import validUpgrade +from indy_client.test.cli.constants import INVALID_SYNTAX from plenum.common.util import randomString -from sovrin_common.constants import JUSTIFICATION, JUSTIFICATION_MAX_SIZE +from indy_common.constants import JUSTIFICATION, JUSTIFICATION_MAX_SIZE def testPoolUpgradeHasInvalidSyntaxIfJustificationIsEmpty( diff --git a/sovrin_client/test/cli/test_proof_request.py b/indy_client/test/cli/test_proof_request.py similarity index 100% rename from sovrin_client/test/cli/test_proof_request.py rename to indy_client/test/cli/test_proof_request.py diff --git a/indy_client/test/cli/test_restore_wallet_before_rebranding.py b/indy_client/test/cli/test_restore_wallet_before_rebranding.py new file mode 100644 index 000000000..c4a007850 --- /dev/null +++ b/indy_client/test/cli/test_restore_wallet_before_rebranding.py @@ -0,0 +1,18 @@ +import os +import shutil + +from plenum.cli.constants import NO_ENV +from plenum.common.util import createDirIfNotExists +from indy_client.client.wallet.wallet import Wallet + + +def testRestoreWalletBeforeRebranding(aliceCLI): + fileName = "wallet_before_rebranding" + curPath = os.path.dirname(os.path.realpath(__file__)) + walletFilePath = os.path.join(curPath, fileName) + noEnvKeyringsDir = os.path.join(aliceCLI.getWalletsBaseDir(), NO_ENV) + createDirIfNotExists(noEnvKeyringsDir) + shutil.copy2(walletFilePath, noEnvKeyringsDir) + targetWalletFilePath = os.path.join(noEnvKeyringsDir, fileName) + restored = aliceCLI.restoreWalletByPath(targetWalletFilePath) + assert restored and isinstance(aliceCLI.activeWallet, Wallet) diff --git a/sovrin_client/test/cli/test_restore_wallet_before_renaming.py b/indy_client/test/cli/test_restore_wallet_before_renaming_link_to_connection.py similarity index 93% rename from sovrin_client/test/cli/test_restore_wallet_before_renaming.py rename to indy_client/test/cli/test_restore_wallet_before_renaming_link_to_connection.py index e126fb4f0..5bf403414 100644 --- a/sovrin_client/test/cli/test_restore_wallet_before_renaming.py +++ b/indy_client/test/cli/test_restore_wallet_before_renaming_link_to_connection.py @@ -3,7 +3,7 @@ from plenum.cli.constants import NO_ENV from plenum.common.util import createDirIfNotExists -from sovrin_client.client.wallet.wallet import Wallet +from indy_client.client.wallet.wallet import Wallet def testRestoreWalletBeforeRenamingLinkToConnection(aliceCLI): diff --git a/sovrin_client/test/cli/test_restore_wallet_from_mgl.py b/indy_client/test/cli/test_restore_wallet_from_mgl.py similarity index 92% rename from sovrin_client/test/cli/test_restore_wallet_from_mgl.py rename to indy_client/test/cli/test_restore_wallet_from_mgl.py index 203c3486f..3213bdc8b 100644 --- a/sovrin_client/test/cli/test_restore_wallet_from_mgl.py +++ b/indy_client/test/cli/test_restore_wallet_from_mgl.py @@ -3,7 +3,7 @@ from plenum.cli.constants import NO_ENV from plenum.common.util import createDirIfNotExists -from sovrin_client.client.wallet.wallet import Wallet +from indy_client.client.wallet.wallet import Wallet def testRestoreWalletFromMinimalGoLive(aliceCLI): diff --git a/sovrin_client/test/cli/test_save_and_restore_wallet.py b/indy_client/test/cli/test_save_and_restore_wallet.py similarity index 98% rename from sovrin_client/test/cli/test_save_and_restore_wallet.py rename to indy_client/test/cli/test_save_and_restore_wallet.py index 4621b0e30..23d2135ea 100644 --- a/sovrin_client/test/cli/test_save_and_restore_wallet.py +++ b/indy_client/test/cli/test_save_and_restore_wallet.py @@ -12,8 +12,8 @@ createAndAssertNewCreation, createAndAssertNewKeyringCreation, \ useAndAssertKeyring, exitFromCli, restartCliAndAssert -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_client.test.cli.helper import prompt_is +from indy_client.client.wallet.wallet import Wallet +from indy_client.test.cli.helper import prompt_is def performExit(do): diff --git a/sovrin_client/test/cli/test_send_attrib_validation.py b/indy_client/test/cli/test_send_attrib_validation.py similarity index 99% rename from sovrin_client/test/cli/test_send_attrib_validation.py rename to indy_client/test/cli/test_send_attrib_validation.py index e2839fc0a..af25abb79 100644 --- a/sovrin_client/test/cli/test_send_attrib_validation.py +++ b/indy_client/test/cli/test_send_attrib_validation.py @@ -9,9 +9,9 @@ from plenum.common.util import rawToFriendly, friendlyToRaw from stp_core.crypto.util import randomSeed -from sovrin_client.test.cli.conftest import trusteeCli -from sovrin_client.test.cli.constants import ERROR, INVALID_SYNTAX -from sovrin_client.test.cli.helper import addNym, newKey, \ +from indy_client.test.cli.conftest import trusteeCli +from indy_client.test.cli.constants import ERROR, INVALID_SYNTAX +from indy_client.test.cli.helper import addNym, newKey, \ createUuidIdentifier, createCryptonym, createHalfKeyIdentifierAndAbbrevVerkey ATTRIBUTE_ADDED = 'Attribute added for nym {dest}' diff --git a/sovrin_client/test/cli/test_send_claim_def.py b/indy_client/test/cli/test_send_claim_def.py similarity index 92% rename from sovrin_client/test/cli/test_send_claim_def.py rename to indy_client/test/cli/test_send_claim_def.py index b83745e58..e8cd8e247 100644 --- a/sovrin_client/test/cli/test_send_claim_def.py +++ b/indy_client/test/cli/test_send_claim_def.py @@ -1,5 +1,5 @@ -from sovrin_client.test.cli.constants import SCHEMA_ADDED, CLAIM_DEF_ADDED -from sovrin_client.test.cli.helper import getSeqNoFromCliOutput +from indy_client.test.cli.constants import SCHEMA_ADDED, CLAIM_DEF_ADDED +from indy_client.test.cli.helper import getSeqNoFromCliOutput def testSendClaimDefSucceedsIfRefIsSeqNoOfSchemaTxn( diff --git a/sovrin_client/test/cli/test_send_get_attr.py b/indy_client/test/cli/test_send_get_attr.py similarity index 95% rename from sovrin_client/test/cli/test_send_get_attr.py rename to indy_client/test/cli/test_send_get_attr.py index 0377c891e..123aa43dd 100644 --- a/sovrin_client/test/cli/test_send_get_attr.py +++ b/indy_client/test/cli/test_send_get_attr.py @@ -1,8 +1,8 @@ import pytest import json -from sovrin_client.test.cli.constants import INVALID_SYNTAX -from sovrin_client.test.cli.helper import createUuidIdentifier, addNym +from indy_client.test.cli.constants import INVALID_SYNTAX +from indy_client.test.cli.helper import createUuidIdentifier, addNym attrib_name = 'dateOfBirth' diff --git a/sovrin_client/test/cli/test_send_get_claim_def.py b/indy_client/test/cli/test_send_get_claim_def.py similarity index 95% rename from sovrin_client/test/cli/test_send_get_claim_def.py rename to indy_client/test/cli/test_send_get_claim_def.py index cc2115c30..6cec86528 100644 --- a/sovrin_client/test/cli/test_send_get_claim_def.py +++ b/indy_client/test/cli/test_send_get_claim_def.py @@ -1,6 +1,6 @@ import pytest -from sovrin_node.test.did.conftest import wallet -from sovrin_client.test.cli.constants import INVALID_SYNTAX, SCHEMA_ADDED, \ +from indy_node.test.did.conftest import wallet +from indy_client.test.cli.constants import INVALID_SYNTAX, SCHEMA_ADDED, \ CLAIM_DEF_ADDED CLAIM_DEF_FOUND = ['Found claim def', 'attrib1', 'attrib2', 'attrib3'] diff --git a/sovrin_client/test/cli/test_send_get_nym_validation.py b/indy_client/test/cli/test_send_get_nym_validation.py similarity index 94% rename from sovrin_client/test/cli/test_send_get_nym_validation.py rename to indy_client/test/cli/test_send_get_nym_validation.py index ec5cd5a3c..bcee942d7 100644 --- a/sovrin_client/test/cli/test_send_get_nym_validation.py +++ b/indy_client/test/cli/test_send_get_nym_validation.py @@ -3,11 +3,11 @@ import pytest from plenum.common.util import friendlyToRaw -from sovrin_client.test.cli.constants import INVALID_SYNTAX -from sovrin_common.roles import Roles -from sovrin_client.test.cli.helper import createUuidIdentifier, addNym, \ +from indy_client.test.cli.constants import INVALID_SYNTAX +from indy_client.test.cli.helper import createUuidIdentifier, addNym, \ createHalfKeyIdentifierAndAbbrevVerkey, createCryptonym -from sovrin_node.test.helper import check_str_is_base58_compatible +from indy_common.roles import Roles +from indy_node.test.helper import check_str_is_base58_compatible CURRENT_VERKEY_FOR_NYM = 'Current verkey for NYM {dest} is {verkey}' CURRENT_VERKEY_FOR_NYM_WITH_ROLE = 'Current verkey for NYM {dest} is {verkey} with role {role}' diff --git a/sovrin_client/test/cli/test_send_get_schema.py b/indy_client/test/cli/test_send_get_schema.py similarity index 94% rename from sovrin_client/test/cli/test_send_get_schema.py rename to indy_client/test/cli/test_send_get_schema.py index a1f1800f6..ff13843de 100644 --- a/sovrin_client/test/cli/test_send_get_schema.py +++ b/indy_client/test/cli/test_send_get_schema.py @@ -1,7 +1,7 @@ import pytest -from sovrin_client.test.cli.constants import INVALID_SYNTAX, SCHEMA_ADDED -from sovrin_client.test.cli.helper import createUuidIdentifier -from sovrin_node.test.did.conftest import wallet +from indy_client.test.cli.constants import INVALID_SYNTAX, SCHEMA_ADDED +from indy_client.test.cli.helper import createUuidIdentifier +from indy_node.test.did.conftest import wallet SCHEMA_FOUND = ['Found schema', 'Degree', diff --git a/sovrin_client/test/cli/test_send_node_validation.py b/indy_client/test/cli/test_send_node_validation.py similarity index 98% rename from sovrin_client/test/cli/test_send_node_validation.py rename to indy_client/test/cli/test_send_node_validation.py index 8d36711df..878ac8a66 100644 --- a/sovrin_client/test/cli/test_send_node_validation.py +++ b/indy_client/test/cli/test_send_node_validation.py @@ -7,11 +7,11 @@ ALIAS, SERVICES, VALIDATOR from plenum.common.signer_simple import SimpleSigner from plenum.common.util import cryptonymToHex, randomString -from sovrin_client.test.cli.conftest import newStewardCli as getNewStewardCli, \ +from indy_client.test.cli.conftest import newStewardCli as getNewStewardCli, \ newStewardVals as getNewStewardVals, newNodeVals as getNewNodeVals -from sovrin_client.test.cli.constants import CONNECTED_TO_TEST, \ +from indy_client.test.cli.constants import CONNECTED_TO_TEST, \ NODE_REQUEST_COMPLETED, NODE_REQUEST_FAILED, INVALID_SYNTAX -from sovrin_client.test.cli.helper import addAgent +from indy_client.test.cli.helper import addAgent NYM_ADDED = "Nym {remote} added" diff --git a/sovrin_client/test/cli/test_send_nym_validation.py b/indy_client/test/cli/test_send_nym_validation.py similarity index 98% rename from sovrin_client/test/cli/test_send_nym_validation.py rename to indy_client/test/cli/test_send_nym_validation.py index c4bec091d..ccec12791 100644 --- a/sovrin_client/test/cli/test_send_nym_validation.py +++ b/indy_client/test/cli/test_send_nym_validation.py @@ -3,11 +3,11 @@ from plenum.common.util import rawToFriendly, friendlyToHexStr, friendlyToHex, \ hexToFriendly -from sovrin_client.test.cli.constants import ERROR, INVALID_SYNTAX -from sovrin_client.test.cli.helper import createUuidIdentifier, \ +from indy_client.test.cli.constants import ERROR, INVALID_SYNTAX +from indy_client.test.cli.helper import createUuidIdentifier, \ createHalfKeyIdentifierAndAbbrevVerkey, createUuidIdentifierAndFullVerkey, \ createCryptonym -from sovrin_common.roles import Roles +from indy_common.roles import Roles NYM_ADDED = 'Nym {dest} added' diff --git a/sovrin_client/test/cli/test_send_schema.py b/indy_client/test/cli/test_send_schema.py similarity index 87% rename from sovrin_client/test/cli/test_send_schema.py rename to indy_client/test/cli/test_send_schema.py index e30ee785f..b1d84eddf 100644 --- a/sovrin_client/test/cli/test_send_schema.py +++ b/indy_client/test/cli/test_send_schema.py @@ -1,4 +1,4 @@ -from sovrin_client.test.cli.constants import SCHEMA_ADDED +from indy_client.test.cli.constants import SCHEMA_ADDED def testSendSchemaMultipleAttribs(be, do, poolNodesStarted, trusteeCli): diff --git a/sovrin_client/test/cli/test_show_proof_multi_claim.py b/indy_client/test/cli/test_show_proof_multi_claim.py similarity index 90% rename from sovrin_client/test/cli/test_show_proof_multi_claim.py rename to indy_client/test/cli/test_show_proof_multi_claim.py index 649b1663a..f62f588d6 100644 --- a/sovrin_client/test/cli/test_show_proof_multi_claim.py +++ b/indy_client/test/cli/test_show_proof_multi_claim.py @@ -2,8 +2,8 @@ import pytest -from sovrin_client.cli.cli import SovrinCli -from sovrin_client.client.wallet.connection import Connection +from indy_client.cli.cli import IndyCli +from indy_client.client.wallet.connection import Connection @pytest.fixture() @@ -45,7 +45,7 @@ def proofRequestAttrs(): def test_showProofOnlyUsedAttributesAreHighlighted( claimsUsedForProof, proofRequestAttrs): - actualConstructionToPrint = SovrinCli._printClaimsUsedInProofConstruction( + actualConstructionToPrint = IndyCli._printClaimsUsedInProofConstruction( claimsUsedForProof, proofRequestAttrs ) diff --git a/sovrin_client/test/cli/test_tutorial.py b/indy_client/test/cli/test_tutorial.py similarity index 98% rename from sovrin_client/test/cli/test_tutorial.py rename to indy_client/test/cli/test_tutorial.py index f36e8b327..194ce3234 100644 --- a/sovrin_client/test/cli/test_tutorial.py +++ b/indy_client/test/cli/test_tutorial.py @@ -2,16 +2,16 @@ import pytest -from sovrin_client.test import waits +from indy_client.test import waits from stp_core.loop.eventually import eventually from plenum.test.cli.helper import exitFromCli, \ createAndAssertNewKeyringCreation -from sovrin_common.exceptions import InvalidConnectionException -from sovrin_common.constants import ENDPOINT +from indy_common.exceptions import InvalidConnectionException +from indy_common.constants import ENDPOINT from plenum.common.signer_did import DidSigner -from sovrin_client.client.wallet.connection import Connection, constant -from sovrin_client.test.cli.helper import getFileLines, prompt_is, doubleBraces, \ +from indy_client.client.wallet.connection import Connection, constant +from indy_client.test.cli.helper import getFileLines, prompt_is, doubleBraces, \ getTotalConnections, getTotalSchemas, getTotalClaimsRcvd, getTotalAvailableClaims, \ newKey, ensureConnectedToTestEnv @@ -424,7 +424,7 @@ def accept_request(be, do, userCli, agentMap, expect): expect=expect, not_expect=[ "Observer threw an exception", - "DID is not yet written to Sovrin"] + "DID is not yet written to Indy"] ) li = userCli.agent.wallet.getConnectionBy(nonce=agentMap['nonce']) assert li @@ -1049,7 +1049,7 @@ def testBobReqAvailClaimsFromAgents( # When new user/cli requests available claims from Faber, # Transcript claim should be send as available claims bob_faber_map = dict(faberMap) - bob_faber_map.update({'invite': 'sample/faber-bob-connection-request.sovrin', + bob_faber_map.update({'invite': 'sample/faber-bob-connection-request.indy', 'nonce': '710b78be79f29fc81335abaa4ee1c5e8'}) assertReqAvailClaims(be, do, userCli, bob_faber_map, connectedToTest, loadInviteOut, syncedInviteAcceptedWithClaimsOut) @@ -1060,7 +1060,7 @@ def testBobReqAvailClaimsFromAgents( # proof request and it is verified. bob_acme_map = dict(acmeMap) bob_acme_map.update({"claims": "No available claims found", - 'invite': 'sample/acme-bob-connection-request.sovrin', + 'invite': 'sample/acme-bob-connection-request.indy', 'nonce': '810b78be79f29fc81335abaa4ee1c5e8'}) assertReqAvailClaims(be, do, userCli, bob_acme_map, connectedToTest, loadInviteOut, unsycedAcceptedInviteWithoutClaimOut) @@ -1069,7 +1069,7 @@ def testBobReqAvailClaimsFromAgents( # No claims should be sent as available claims. bob_thrift_map = dict(thriftMap) bob_thrift_map.update({"claims": "No available claims found", - 'invite': 'sample/thrift-bob-connection-request.sovrin', + 'invite': 'sample/thrift-bob-connection-request.indy', 'nonce': 'ousezru20ic4yz3j074trcgthwlsnfsef'}) assertReqAvailClaims(be, do, userCli, bob_thrift_map, connectedToTest, loadInviteOut, unsycedAcceptedInviteWithoutClaimOut) diff --git a/sovrin_client/test/cli/test_tutorial_manual.py b/indy_client/test/cli/test_tutorial_manual.py similarity index 91% rename from sovrin_client/test/cli/test_tutorial_manual.py rename to indy_client/test/cli/test_tutorial_manual.py index 77e41a114..a2d8e8c66 100644 --- a/sovrin_client/test/cli/test_tutorial_manual.py +++ b/indy_client/test/cli/test_tutorial_manual.py @@ -5,23 +5,23 @@ from plenum.common.constants import PUBKEY from anoncreds.protocol.types import SchemaKey, ID -from sovrin_client.test import waits -from sovrin_client.test.agent.faber import create_faber, bootstrap_faber, FABER_ID, FABER_VERKEY +from indy_client.test import waits +from indy_client.test.agent.faber import create_faber, bootstrap_faber, FABER_ID, FABER_VERKEY from stp_core.loop.eventually import eventually -from sovrin_common.roles import Roles -from sovrin_client.agent.walleted_agent import WalletedAgent -from sovrin_client.agent.runnable_agent import RunnableAgent -from sovrin_common.constants import ENDPOINT +from indy_common.roles import Roles +from indy_client.agent.walleted_agent import WalletedAgent +from indy_client.agent.runnable_agent import RunnableAgent +from indy_common.constants import ENDPOINT -from sovrin_client.test.agent.acme import create_acme, bootstrap_acme, ACME_ID, ACME_VERKEY -from sovrin_client.test.agent.helper import buildFaberWallet, buildAcmeWallet, \ +from indy_client.test.agent.acme import create_acme, bootstrap_acme, ACME_ID, ACME_VERKEY +from indy_client.test.agent.helper import buildFaberWallet, buildAcmeWallet, \ buildThriftWallet -from sovrin_client.test.agent.thrift import create_thrift, bootstrap_thrift, THRIFT_ID, THRIFT_VERKEY -from sovrin_client.test.cli.conftest import faberMap, acmeMap, \ +from indy_client.test.agent.thrift import create_thrift, bootstrap_thrift, THRIFT_ID, THRIFT_VERKEY +from indy_client.test.cli.conftest import faberMap, acmeMap, \ thriftMap -from sovrin_client.test.cli.helper import newCLI -from sovrin_client.test.cli.test_tutorial import syncInvite, accept_request, \ +from indy_client.test.cli.helper import newCLI +from indy_client.test.cli.test_tutorial import syncInvite, accept_request, \ aliceRequestedTranscriptClaim, jobApplicationProofSent, \ jobCertClaimRequested, bankBasicProofSent, bankKYCProofSent, \ setPromptAndKeyring @@ -187,7 +187,7 @@ async def getClaim(schemaId): setPromptAndKeyring(do, name, newKeyringOut, userMap) do('connect test', within=3, expect=connectedToTest) # Accept faber - do('load sample/faber-request.sovrin') + do('load sample/faber-request.indy') syncInvite(be, do, userCLI, syncConnectionOutWithEndpoint, fMap) do('show connection faber') accept_request(be, do, userCLI, fMap, @@ -210,7 +210,7 @@ async def getClaim(schemaId): assert userCLI.looper.run(getClaim(faberSchemaId)) # Accept acme - do('load sample/acme-job-application.sovrin') + do('load sample/acme-job-application.indy') syncInvite(be, do, userCLI, syncConnectionOutWithEndpoint, aMap) accept_request(be, do, userCLI, aMap, syncedInviteAcceptedOutWithoutClaims) @@ -238,7 +238,7 @@ async def getClaim(schemaId): assert userCLI.looper.run(getClaim(acmeSchemaId)) # Accept thrift - do('load sample/thrift-loan-application.sovrin') + do('load sample/thrift-loan-application.indy') accept_request(be, do, userCLI, tMap, syncedInviteAcceptedOutWithoutClaims) # Send proofs diff --git a/sovrin_client/test/cli/test_z_accept_invitation_hex_as_pubkey.py b/indy_client/test/cli/test_z_accept_invitation_hex_as_pubkey.py similarity index 88% rename from sovrin_client/test/cli/test_z_accept_invitation_hex_as_pubkey.py rename to indy_client/test/cli/test_z_accept_invitation_hex_as_pubkey.py index 8e52c9a8e..86671f3cd 100644 --- a/sovrin_client/test/cli/test_z_accept_invitation_hex_as_pubkey.py +++ b/indy_client/test/cli/test_z_accept_invitation_hex_as_pubkey.py @@ -7,17 +7,17 @@ from plenum.common.util import cryptonymToHex # noinspection PyUnresolvedReferences -from sovrin_client.test.cli.conftest \ +from indy_client.test.cli.conftest \ import faberMap as faberMapWithoutEndpointPubkey # noinspection PyUnresolvedReferences -from sovrin_client.test.cli.test_tutorial import alice_accepted_faber_request, \ +from indy_client.test.cli.test_tutorial import alice_accepted_faber_request, \ aliceCli, preRequisite, faberCli, acmeCli, thriftCli, faberWithEndpointAdded, acmeWithEndpointAdded, \ thriftWithEndpointAdded, walletCreatedForTestEnv, \ faberInviteSyncedWithEndpoint, faberInviteSyncedWithoutEndpoint, \ faberInviteLoadedByAlice, accept_request -from sovrin_common.constants import ENDPOINT +from indy_common.constants import ENDPOINT @pytest.fixture(scope="module") diff --git a/indy_client/test/cli/tmp_wallet_restore_issue b/indy_client/test/cli/tmp_wallet_restore_issue new file mode 100644 index 000000000..b9eeece4c --- /dev/null +++ b/indy_client/test/cli/tmp_wallet_restore_issue @@ -0,0 +1 @@ +{"didMethods": {"py/object": "plenum.common.did_method.DidMethods", "default": {"py/id": 61}, "d": {"indy": {"py/object": "plenum.common.did_method.DidMethod", "name": "indy", "signerConstructor": {"py/type": "plenum.common.signer_did.DidSigner"}, "pattern": "did:indy:"}}}, "_nodes": {}, "_pending": {"py/reduce": [{"py/type": "collections.deque"}, {"py/tuple": [[]]}, null, null, null]}, "defaultId": "CzkavE58zgX7rUMrzSinLr", "_upgrades": {}, "_name": "Default", "aliasesToIds": {}, "_trustAnchored": {"ULtgFQJe6bjiFbs7ke3NJD": {"py/object": "indy_common.identity.Identity", "identity": {"py/object": "plenum.common.signer_did.DidIdentity", "abbreviated": true, "_identifier": "ULtgFQJe6bjiFbs7ke3NJD", "_verkey": "5kh3FB4H3NKq7tUDqeqHc1"}, "last_synced": null, "seqNo": null, "trustAnchor": null, "_role": "101"}, "CzkavE58zgX7rUMrzSinLr": {"py/object": "indy_common.identity.Identity", "identity": {"py/object": "plenum.common.signer_did.DidIdentity", "abbreviated": true, "_identifier": "CzkavE58zgX7rUMrzSinLr", "_verkey": "WjXEvZ9xj4Tz9sLtzf7HVP"}, "last_synced": null, "seqNo": null, "trustAnchor": null, "_role": "101"}}, "_pconfigs": {}, "py/object": "indy_client.client.wallet.wallet.Wallet", "ids": {"ULtgFQJe6bjiFbs7ke3NJD": {"py/object": "plenum.client.wallet.IdData", "py/newargs": {"py/tuple": [{"py/object": "plenum.common.signer_did.DidSigner", "sk": {"py/id": 75}, "naclSigner": {"py/object": "stp_core.crypto.nacl_wrappers.Signer", "verhex": {"py/b64": "ZGQ2ZGI4ZWI5MWNmZGNlNTBmMWE0ODhkOTUzMzI1ZGEyNjdlMzYyMzE5N2EwN2Q0MTQ4YjI1ZjM3\nZWZjMjg3ZQ==\n"}, "keyhex": {"py/b64": "NDY2MTYyNjU3MjMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAz\nMDMwMzAzMA==\n"}, "key": {"py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"py/object": "stp_core.crypto.nacl_wrappers.VerifyKey", "_key": {"py/b64": "3W2465HP3OUPGkiNlTMl2iZ+NiMZegfUFIsl8378KH4=\n"}}, "_signing_key": {"py/b64": "RmFiZXIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDDdbbjrkc/c5Q8aSI2VMyXaJn42Ixl6B9QU\niyXzfvwofg==\n"}, "_seed": {"py/b64": "RmFiZXIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}}, "verraw": {"py/b64": "3W2465HP3OUPGkiNlTMl2iZ+NiMZegfUFIsl8378KH4=\n"}, "keyraw": {"py/b64": "RmFiZXIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}}, "_identifier": "ULtgFQJe6bjiFbs7ke3NJD", "_alias": null, "abbreviated": true, "seed": {"py/b64": "RmFiZXIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}, "_verkey": "5kh3FB4H3NKq7tUDqeqHc1"}, 1502387001630568]}, "py/seq": [{"py/id": 73}, 1502387001630568]}, "Th7MpTaRZVRYnPiabds81Y": {"py/object": "plenum.client.wallet.IdData", "py/newargs": {"py/tuple": [{"py/object": "plenum.common.signer_did.DidSigner", "sk": {"py/id": 70}, "naclSigner": {"py/object": "stp_core.crypto.nacl_wrappers.Signer", "verhex": {"py/b64": "ZDgyNzQ2NThkMjNiYzJlNDE5NGQxMjMyZmZmNzBlMmIzNDRiYWY2MjEwNjdlYjZhYTkyYjJmY2Vm\nMGM5NGU4ZA==\n"}, "keyhex": {"py/b64": "MzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwNTM3NDY1Nzc2\nMTcyNjQzMQ==\n"}, "key": {"py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"py/object": "stp_core.crypto.nacl_wrappers.VerifyKey", "_key": {"py/b64": "2CdGWNI7wuQZTRIy//cOKzRLr2IQZ+tqqSsvzvDJTo0=\n"}}, "_signing_key": {"py/b64": "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwU3Rld2FyZDHYJ0ZY0jvC5BlNEjL/9w4rNEuvYhBn62qp\nKy/O8MlOjQ==\n"}, "_seed": {"py/b64": "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwU3Rld2FyZDE=\n"}}, "verraw": {"py/b64": "2CdGWNI7wuQZTRIy//cOKzRLr2IQZ+tqqSsvzvDJTo0=\n"}, "keyraw": {"py/b64": "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwU3Rld2FyZDE=\n"}}, "_identifier": "Th7MpTaRZVRYnPiabds81Y", "_alias": null, "abbreviated": true, "seed": {"py/b64": "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwU3Rld2FyZDE=\n"}, "_verkey": "7TYfekw4GUagBnBVCqPjiC"}, 1502385714960301]}, "py/seq": [{"py/id": 68}, 1502385714960301]}, "CzkavE58zgX7rUMrzSinLr": {"py/object": "plenum.client.wallet.IdData", "py/newargs": {"py/tuple": [{"py/object": "plenum.common.signer_did.DidSigner", "sk": {"py/id": 65}, "naclSigner": {"py/object": "stp_core.crypto.nacl_wrappers.Signer", "verhex": {"py/b64": "NjEyNGM3YmQxZmVjYzVkYmI4ZDYyODNkOTljYThjYWJmMGM4ZTU0NDkwMzE1NTM4OTI5NmJhNmE3\nMjYxYTJkZQ==\n"}, "keyhex": {"py/b64": "NDE2MzZkNjUzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAz\nMDMwMzAzMA==\n"}, "key": {"py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"py/object": "stp_core.crypto.nacl_wrappers.VerifyKey", "_key": {"py/b64": "YSTHvR/sxdu41ig9mcqMq/DI5USQMVU4kpa6anJhot4=\n"}}, "_signing_key": {"py/b64": "QWNtZTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBhJMe9H+zF27jWKD2Zyoyr8MjlRJAxVTiS\nlrpqcmGi3g==\n"}, "_seed": {"py/b64": "QWNtZTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}}, "verraw": {"py/b64": "YSTHvR/sxdu41ig9mcqMq/DI5USQMVU4kpa6anJhot4=\n"}, "keyraw": {"py/b64": "QWNtZTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}}, "_identifier": "CzkavE58zgX7rUMrzSinLr", "_alias": null, "abbreviated": true, "seed": {"py/b64": "QWNtZTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}, "_verkey": "WjXEvZ9xj4Tz9sLtzf7HVP"}, 1502387801276699]}, "py/seq": [{"py/id": 63}, 1502387801276699]}}, "_attributes": {"json://{\"py/tuple\": [\"73563\", \"CzkavE58zgX7rUMrzSinLr\", \"CzkavE58zgX7rUMrzSinLr\"]}": {"py/object": "indy_client.client.wallet.attribute.Attribute", "value": "{\"endpoint\": {\"ha\": \"127.0.0.1:6666\"}}", "origin": "CzkavE58zgX7rUMrzSinLr", "encKey": null, "name": "73563", "seqNo": null, "dest": "CzkavE58zgX7rUMrzSinLr", "ledgerStore": {"py/id": 2}}, "json://{\"py/tuple\": [\"endpoint\", null, \"CzkavE58zgX7rUMrzSinLr\"]}": {"py/object": "indy_client.client.wallet.attribute.Attribute", "value": null, "origin": null, "encKey": null, "name": "endpoint", "seqNo": null, "dest": "CzkavE58zgX7rUMrzSinLr", "ledgerStore": {"py/id": 2}}, "json://{\"py/tuple\": [\"endpoint\", null, \"ULtgFQJe6bjiFbs7ke3NJD\"]}": {"py/object": "indy_client.client.wallet.attribute.Attribute", "value": null, "origin": null, "encKey": null, "name": "endpoint", "seqNo": null, "dest": "ULtgFQJe6bjiFbs7ke3NJD", "ledgerStore": {"py/id": 2}}, "json://{\"py/tuple\": [\"a0641\", \"CzkavE58zgX7rUMrzSinLr\", \"ULtgFQJe6bjiFbs7ke3NJD\"]}": {"py/object": "indy_client.client.wallet.attribute.Attribute", "value": "{\"endpoint\": {\"ha\": \"127.0.0.1:5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}", "origin": "CzkavE58zgX7rUMrzSinLr", "encKey": null, "name": "a0641", "seqNo": null, "dest": "ULtgFQJe6bjiFbs7ke3NJD", "ledgerStore": {"py/id": 2}}, "json://{\"py/tuple\": [\"45884\", \"ULtgFQJe6bjiFbs7ke3NJD\", \"ULtgFQJe6bjiFbs7ke3NJD\"]}": {"py/object": "indy_client.client.wallet.attribute.Attribute", "value": "{\"endpoint\": {\"ha\": \"10.0.0.202:5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}", "origin": "ULtgFQJe6bjiFbs7ke3NJD", "encKey": null, "name": "45884", "seqNo": null, "dest": "ULtgFQJe6bjiFbs7ke3NJD", "ledgerStore": {"py/object": "indy_client.client.wallet.attribute.LedgerStore", "py/enumvalue": 4}}, "json://{\"py/tuple\": [\"917b5\", \"CzkavE58zgX7rUMrzSinLr\", \"CzkavE58zgX7rUMrzSinLr\"]}": {"py/object": "indy_client.client.wallet.attribute.Attribute", "value": "{\"endpoint\": {\"ha\": \"10.0.0.203:6666\"}}", "origin": "CzkavE58zgX7rUMrzSinLr", "encKey": null, "name": "917b5", "seqNo": null, "dest": "CzkavE58zgX7rUMrzSinLr", "ledgerStore": {"py/id": 2}}, "json://{\"py/tuple\": [\"4f3d1\", \"ULtgFQJe6bjiFbs7ke3NJD\", \"ULtgFQJe6bjiFbs7ke3NJD\"]}": {"py/object": "indy_client.client.wallet.attribute.Attribute", "value": "{\"endpoint\": {\"ha\": \"127.0.0.1:5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}", "origin": "ULtgFQJe6bjiFbs7ke3NJD", "encKey": null, "name": "4f3d1", "seqNo": null, "dest": "ULtgFQJe6bjiFbs7ke3NJD", "ledgerStore": {"py/id": 2}}, "json://{\"py/tuple\": [\"881bb\", \"CzkavE58zgX7rUMrzSinLr\", \"CzkavE58zgX7rUMrzSinLr\"]}": {"py/object": "indy_client.client.wallet.attribute.Attribute", "value": "{\"endpoint\": {\"ha\": \"127.0.0.1:6666\", \"pubkey\": \"C5eqjU7NMVMGGfGfx2ub- vX5H9X346bQt5qeziVAo3naQ\"}}", "origin": "CzkavE58zgX7rUMrzSinLr", "encKey": null, "name": "881bb", "seqNo": null, "dest": "CzkavE58zgX7rUMrzSinLr", "ledgerStore": {"py/id": 2}}, "json://{\"py/tuple\": [\"6db7a\", \"CzkavE58zgX7rUMrzSinLr\", \"CzkavE58zgX7rUMrzSinLr\"]}": {"py/object": "indy_client.client.wallet.attribute.Attribute", "value": "{\"endpoint\": {\"ha\": \"10.0.0.203:6666\", \"pubkey\": \"C5eqjU7NMVMGGfGfx2ub- vX5H9X346bQt5qeziVAo3naQ\"}}", "origin": "CzkavE58zgX7rUMrzSinLr", "encKey": null, "name": "6db7a", "seqNo": null, "dest": "CzkavE58zgX7rUMrzSinLr", "ledgerStore": {"py/id": 2}}}, "idsToSigners": {"ULtgFQJe6bjiFbs7ke3NJD": {"py/id": 73}, "JYeHd6Zn3zFo1UbNVBd6U1": {"py/object": "plenum.common.signer_did.DidSigner", "sk": {"py/id": 79}, "naclSigner": {"py/object": "stp_core.crypto.nacl_wrappers.Signer", "verhex": {"py/b64": "OGUxNjY0OGM3Y2IzYWMxNDMzNTc2MmM1YzVhYTkwZDJkM2I1ODY2NGExOTkyNGM2YWUzNmM1ODQ1\nZDE1MTg4OA==\n"}, "keyhex": {"py/b64": "ZTFlZmRjYzRmNmJkN2M4ZjhmMTc2MGFiNTkwY2EzMjllNGJjYTYzNTU4M2E5ZDg5NjRkNDljNTJh\nYTRhM2Y4ZA==\n"}, "key": {"py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"py/object": "stp_core.crypto.nacl_wrappers.VerifyKey", "_key": {"py/b64": "jhZkjHyzrBQzV2LFxaqQ0tO1hmShmSTGrjbFhF0VGIg=\n"}}, "_signing_key": {"py/b64": "4e/cxPa9fI+PF2CrWQyjKeS8pjVYOp2JZNScUqpKP42OFmSMfLOsFDNXYsXFqpDS07WGZKGZJMau\nNsWEXRUYiA==\n"}, "_seed": {"py/b64": "4e/cxPa9fI+PF2CrWQyjKeS8pjVYOp2JZNScUqpKP40=\n"}}, "verraw": {"py/b64": "jhZkjHyzrBQzV2LFxaqQ0tO1hmShmSTGrjbFhF0VGIg=\n"}, "keyraw": {"py/b64": "4e/cxPa9fI+PF2CrWQyjKeS8pjVYOp2JZNScUqpKP40=\n"}}, "_identifier": "JYeHd6Zn3zFo1UbNVBd6U1", "_alias": null, "abbreviated": true, "seed": {"py/b64": "4e/cxPa9fI+PF2CrWQyjKeS8pjVYOp2JZNScUqpKP40=\n"}, "_verkey": "T9HBHeNSXBXZCBB8GrgjFm"}, "Th7MpTaRZVRYnPiabds81Y": {"py/id": 68}, "Siga5PyLFTZdpupPUXogjt": {"py/object": "plenum.common.signer_did.DidSigner", "sk": {"py/id": 83}, "naclSigner": {"py/object": "stp_core.crypto.nacl_wrappers.Signer", "verhex": {"py/b64": "ZDA0NjU4ZGNhMDQ4MjYyNjQ0MmNhZGFiYzZjZWNlMjM0ODc2YTY0MzhkNzBlNWIzNGQ4MTlmZmFj\nODY2MmVlZA==\n"}, "keyhex": {"py/b64": "YWJlZmEzOGNmYjVkYmYzMjljNTZjMjI4YmEzNjAzMzZjNmY2YWJjZWE0MjZlMDFlMTVkZTNiZGU1\nNjUzYjUxMQ==\n"}, "key": {"py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"py/object": "stp_core.crypto.nacl_wrappers.VerifyKey", "_key": {"py/b64": "0EZY3KBIJiZELK2rxs7OI0h2pkONcOWzTYGf+shmLu0=\n"}}, "_signing_key": {"py/b64": "q++jjPtdvzKcVsIoujYDNsb2q86kJuAeFd473lZTtRHQRljcoEgmJkQsravGzs4jSHamQ41w5bNN\ngZ/6yGYu7Q==\n"}, "_seed": {"py/b64": "q++jjPtdvzKcVsIoujYDNsb2q86kJuAeFd473lZTtRE=\n"}}, "verraw": {"py/b64": "0EZY3KBIJiZELK2rxs7OI0h2pkONcOWzTYGf+shmLu0=\n"}, "keyraw": {"py/b64": "q++jjPtdvzKcVsIoujYDNsb2q86kJuAeFd473lZTtRE=\n"}}, "_identifier": "Siga5PyLFTZdpupPUXogjt", "_alias": null, "abbreviated": true, "seed": {"py/b64": "q++jjPtdvzKcVsIoujYDNsb2q86kJuAeFd473lZTtRE=\n"}, "_verkey": "9wzQSoSNbLwRcNz9JkBFME"}, "CzkavE58zgX7rUMrzSinLr": {"py/id": 63}}, "_prepared": {"json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502387001630568]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "cfbec5716f611b627475f6a9ab69415630a3244a535f9cadd4fe196705bb3e09", "reqId": 1502387001630568, "signature": "SC1JYwuXnpruhGefBZKCyBvCESmAP9vx8SfUWPPmoR1NH2LDHQYj5XV78zBMCEFAXwuZdHmkpEH6Lu35kuxzMCZ", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "104", "raw": "endpoint", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["endpoint", null, "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502385870898879]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "f2c1c5733913f633e7fc58d5b2ec52859979149cdd06e10b578d162c01d25862", "reqId": 1502385870898879, "signature": "5A2BxVk8EowuBT9TKYKWhck9Ng3Bk7Cwo8ego36aWEc4NNx5hNeXwzu37q1FhvmJwZ6fDrRnKvepjCQHXLAL1DbN", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "100", "raw": "{\"endpoint\": {\"ha\": \"127.0.0.1:5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}", "dest": "ULtgFQJe6bjiFbs7ke3NJD"}}}, {"py/tuple": ["4f3d1", "ULtgFQJe6bjiFbs7ke3NJD", "ULtgFQJe6bjiFbs7ke3NJD"]}]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1502387071423304]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "45d33c68b9aa557d7b1300656905a446d9e1924e51f55a07e125396202024e37", "reqId": 1502387071423304, "signature": "2dZMNC37ihe7EXjVxk6s1FENZ6Qr15i6TTk9vyT4kEsYig1D3QQLACrgz88vFwoaiycameMseateEEFPhxvFiarZ", "identifier": "CzkavE58zgX7rUMrzSinLr", "operation": {"type": "105", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, null]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386049567645]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "079b8ed2360cc6a2c686587a613f8c1109b1941154bcee5fcece4ad2464d7f40", "reqId": 1502386049567645, "signature": "2RNPTPq3K2rNb4MFmoYJEza3n7tmLaz696nRxEegASoyYdJDKNGvCAJLCCFYJvAxAh7Y66duQ7fX2byZWE3EWZAc", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "104", "raw": "endpoint", "dest": "ULtgFQJe6bjiFbs7ke3NJD"}}}, {"py/tuple": ["endpoint", null, "ULtgFQJe6bjiFbs7ke3NJD"]}]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1502387057277920]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "1cefcc959335319b7f9c5527e5f4dcbb49a7456ebed2c24fd33cc06ab045bbcb", "reqId": 1502387057277920, "signature": "2yzWAuxduX6dQfw1nJFafU6XTeFYDXqWnxyNrdfFM8cammiz4P6YpoKbWbq7kDVA22FS1Hz13DfLdJ5PEnXJZehs", "identifier": "CzkavE58zgX7rUMrzSinLr", "operation": {"type": "100", "raw": "{\"endpoint\": {\"ha\": \"10.0.0.203:6666\"}}", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["917b5", "CzkavE58zgX7rUMrzSinLr", "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1502385848758045]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "6d45682720c304d825573cd6b9c60bc47d95eda3a70987a4fc410bd6afeadc44", "reqId": 1502385848758045, "signature": "3NLdp4qD15N2CetMjGtrmpQWDKx6ycVVaRtLZ3gKMmzLzxBujvsqQutA7yts74pJPtRodaEPy2w5FvpS7yBzNsr", "identifier": "CzkavE58zgX7rUMrzSinLr", "operation": {"type": "100", "raw": "{\"endpoint\": {\"ha\": \"127.0.0.1:5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}", "dest": "ULtgFQJe6bjiFbs7ke3NJD"}}}, {"py/tuple": ["a0641", "CzkavE58zgX7rUMrzSinLr", "ULtgFQJe6bjiFbs7ke3NJD"]}]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1502387071424365]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "0036694829240ca13b5a9108c2f16fe60213c30f054c9b335b35b95d14dec31c", "reqId": 1502387071424365, "signature": "4bf8VGMVGq6JtWeFXdvD4NhdAMseuZdxnvvxw6QaodiGKA54yRxfShbDG9ff2xrDUQHCPJ1PuYMwPmDanx1gpSoB", "identifier": "CzkavE58zgX7rUMrzSinLr", "operation": {"type": "104", "raw": "endpoint", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["endpoint", null, "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386144574978]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "ca879f3ce42853d26300fae03dc39a5c27cc3e14e8f1578418729de3d19bcf4b", "reqId": 1502386144574978, "signature": "2u2C32ww9GkdBj78haTzKLvgaU4PqJ2N8VYmmoALSpZT5pTgvaGjgFniRPHd1DSwv8MVyt4vX8m26SgL1zDJVJVY", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "104", "raw": "endpoint", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["endpoint", null, "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"Th7MpTaRZVRYnPiabds81Y\", 1502385611413187]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "949dd184333687d9e81d853dc0d981bfc87f56a1757fd4556e2ad2983573f0ea", "reqId": 1502385611413187, "signature": "5vpkHbSFdCJrRbFXe6sAKW8S1zB2QXqisp56gdFsPXRMrx7bD8Z5Q8yLpjcyszTsDePqy1JELgGHAvwZEPU8KvR4", "identifier": "Th7MpTaRZVRYnPiabds81Y", "operation": {"role": "101", "type": "1", "dest": "ULtgFQJe6bjiFbs7ke3NJD", "verkey": "~5kh3FB4H3NKq7tUDqeqHc1"}}}, "ULtgFQJe6bjiFbs7ke3NJD"]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1502385732035030]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "52c6dbfc7fdf04bddf4e6b0bb43d7316edcb2fc820eaab4c2cada0fe34b310da", "reqId": 1502385732035030, "signature": "4RyhbLSRPpahFjk5pthh3tM3de49G2fz77oP42VyRp4DWwMHWbXrRkD6SYVxGGgYaaa8Ep8xhMEQ2QgvDNmHkaDm", "identifier": "CzkavE58zgX7rUMrzSinLr", "operation": {"type": "100", "raw": "{\"endpoint\": {\"ha\": \"10.0.0.203:6666\", \"pubkey\": \"C5eqjU7NMVMGGfGfx2ub- vX5H9X346bQt5qeziVAo3naQ\"}}", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["6db7a", "CzkavE58zgX7rUMrzSinLr", "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386097385267]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "0e116050b139e82912740bca170ac8b550a211c34f9bfc52ddd82bdf8a10460d", "reqId": 1502386097385267, "signature": "3GBVvm55r21RhdYYJS1FYKE67yxo9Dokiv4XePh2DTpfETKRKqi3Lap8BiZUcicwVFKi4RTYZi9sfC75iLuNvFWe", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "108", "origin": "ULtgFQJe6bjiFbs7ke3NJD", "ref": 15, "signature_type": "CL"}}}, null]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386050220665]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "d3f84e2352faca0109598e86e8eb74d5fe4039939b88980a00af24bd26e95cab", "reqId": 1502386050220665, "signature": "3bqWZafGMZY384S5Zi2ugEpamTWamezPfLtHVBW7DH6Hgntpd1KTuLjmLoJLw8nh3f6kUV2w2NAgLuQn5ZEceMvP", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "105", "dest": "JYeHd6Zn3zFo1UbNVBd6U1"}}}, null]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502385681114223]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "c5c275f4963b859d3ca5f84e15e8f09b7bf7ec1fe7e615131daace478b8dee3e", "reqId": 1502385681114223, "signature": "38jKR2T4pQ7ckYqKriuZF2gGoxbr928FCZtMDns5zNVX35DNWFZ3EWNX7pBSiQKa58928oTq4sFFe5h5v6qojAW1", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "100", "raw": "{\"endpoint\": {\"ha\": \"10.0.0.202:5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}", "dest": "ULtgFQJe6bjiFbs7ke3NJD"}}}, {"py/tuple": ["45884", "ULtgFQJe6bjiFbs7ke3NJD", "ULtgFQJe6bjiFbs7ke3NJD"]}]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1502385835239707]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "4bc95d41076677bbfd40407bba1d8ddb69818a79d6a9a24aa57daf0d06ed3770", "reqId": 1502385835239707, "signature": "5R1sAupQwqoee5muMmmud94KWgLvkqkPHxRKj7jPu4VQ5pDCZuvPPpXJXYYSNrtgsDvFurXGg9Jj82S8hEM1H6YH", "identifier": "CzkavE58zgX7rUMrzSinLr", "operation": {"type": "100", "raw": "{\"endpoint\": {\"ha\": \"127.0.0.1:6666\", \"pubkey\": \"C5eqjU7NMVMGGfGfx2ub- vX5H9X346bQt5qeziVAo3naQ\"}}", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["881bb", "CzkavE58zgX7rUMrzSinLr", "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386188150095]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "0e98ffb463973aa6873ca2cbb21b724b7c3711e30dc3f0177c42285ec022763e", "reqId": 1502386188150095, "signature": "3wB4HxjzsPhA74yv4Df4SZBdQYX7s8dAkhyKbdgWSfoMxyQo6tyFPmaHLb3AcE3r7rcngvLdQy9WbTQhxj3HYhBC", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "104", "raw": "endpoint", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["endpoint", null, "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502385899839362]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "e6b83a2dae024a32b5f3c057d3e3f2357291b8fc0e4dae481907c2a9f5e6d1d7", "reqId": 1502385899839362, "signature": "SySAHLvfYw9epanGaKhWsYGWNx7UJ99LTsum4izbgwPxLiMQkS6NhjDMfWMfeoD96rewiP22WJBRkSe2DyfvbPU", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "104", "raw": "endpoint", "dest": "ULtgFQJe6bjiFbs7ke3NJD"}}}, {"py/tuple": ["endpoint", null, "ULtgFQJe6bjiFbs7ke3NJD"]}]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386144573959]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "73a605a704302242669e58cd2f28f58176ab2ed51783f8b3fcb6a06b2fa94fae", "reqId": 1502386144573959, "signature": "3Jz114XGYzyiSMXijXf9j8ttoZh3CsmbjMVwQj2KfFRuVjHosCBsVoPWeJtJfn4gK5MbpmScpyTu4VVFD2qNscWf", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "105", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, null]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386085472327]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "cd0692a09506d71387a4f034887e6ef266dc7cf45591f2b9ed3885589ee7d689", "reqId": 1502386085472327, "signature": "5j57ZRTFhD23fS3dHtYxEvUhK7HzA5UVrbmSszgt2JCw2Dyg228fTaiEtqPDgo7ybdKxXkGjyTfzQPe7c5wVgW9G", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "107", "dest": "ULtgFQJe6bjiFbs7ke3NJD", "data": {"name": "Transcript", "version": "1.2"}}}}, null]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502387001627354]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "adcffa4444661aaa7e0a35653126b616a1941fae3bc66e8fcafa663144a42d18", "reqId": 1502387001627354, "signature": "ybsbW5JHKn9JGKgbGeKEajUhAnCHMixEWuk9E9YUD7r8xgC5EaDaRhpuASSeyfFoymY65Gbmd3qcCNYuk7VuSrA", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "105", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, null]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386049566532]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "3a7bc6b517611dcfdf704b6903ddabec3507d4ecc272d328493b108ed04bde00", "reqId": 1502386049566532, "signature": "4ghzAiyLavPqsrEr6bYUZMyg87xYtHZ38vQHZrDU3CnJVTXBx9VXRM2qLsPwD8mEN86pMVAT3KdVaD2NJt8VhvgV", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "105", "dest": "ULtgFQJe6bjiFbs7ke3NJD"}}}, null]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1502387801276699]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "39ee07b502bd4d3c6f32b6d2beab3795e4312690514dd57288a3bac7358d82c4", "reqId": 1502387801276699, "signature": "2ByXW61ND5bxZDF9nV593ZoYWmShj7Ld1qYCyEJ6jthoE1BqDcuerUSqc4y1NCPuQy23BUGbT1BvRmPt9EVJfugW", "identifier": "CzkavE58zgX7rUMrzSinLr", "operation": {"type": "100", "raw": "{\"endpoint\": {\"ha\": \"127.0.0.1:6666\"}}", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["73563", "CzkavE58zgX7rUMrzSinLr", "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"Th7MpTaRZVRYnPiabds81Y\", 1502385714960301]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "eaea017f0c21a8ff39a880853922748895a8495e61b4a51822a73dff7831c028", "reqId": 1502385714960301, "signature": "5AJvDyr6N4enKP31cyXyojoph1KstDGw9VkfNvGdHyY8b4ruEDHE8LU7JEvwxjwLyEVcEcu7j4QMnykjuF63PqA7", "identifier": "Th7MpTaRZVRYnPiabds81Y", "operation": {"role": "101", "type": "1", "dest": "CzkavE58zgX7rUMrzSinLr", "verkey": "~WjXEvZ9xj4Tz9sLtzf7HVP"}}}, "CzkavE58zgX7rUMrzSinLr"]}, "json://{\"py/tuple\": [\"Th7MpTaRZVRYnPiabds81Y\", 1502385655248947]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "d1095621d406da7a2e95d744b8ba4016db73b75e3fe0faaf4a5fa82b94e065f2", "reqId": 1502385655248947, "signature": "3pY9d3kPfaf9g4L7WoeJ7L7eKQ86SRfzJfGfy4yZKn41WXHwvFdtAsGM7ne96GKUtbfJVknvbeCDo6AHxYX9j5Qm", "identifier": "Th7MpTaRZVRYnPiabds81Y", "operation": {"role": "101", "type": "1", "dest": "ULtgFQJe6bjiFbs7ke3NJD", "verkey": "~5kh3FB4H3NKq7tUDqeqHc1"}}}, "ULtgFQJe6bjiFbs7ke3NJD"]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502385695560631]}": {"py/tuple": [{"py/object": "indy_common.types.Request", "py/state": {"digest": "74b080a5afc1beff66f42a87af9c4fcd032f863197c74883e7d302a8b0f18852", "reqId": 1502385695560631, "signature": "4myAj7GnGrUqb9WKtMbTD19rNvX1ToXZmWv4K7MZQP63DdYYzvW9b5n6mzYKnkdnUUQvPvdkweuUBVTJSMdy6bup", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"role": "101", "type": "1", "dest": "CzkavE58zgX7rUMrzSinLr", "verkey": "~WjXEvZ9xj4Tz9sLtzf7HVP"}}}, "CzkavE58zgX7rUMrzSinLr"]}}, "_connections": {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["Faber College", {"proofRequests": [], "internalId": null, "remoteEndPoint": {"py/tuple": ["127.0.0.1", 5555]}, "request_nonce": "b1134a647eb818069c089e7694f63e6d", "name": "Faber College", "connection_status": "Accepted", "trustAnchor": "Faber College", "verifiedClaimProofs": [], "py/object": "indy_client.client.wallet.connection.Connection", "connection_last_sync_no": null, "localIdentifier": "JYeHd6Zn3zFo1UbNVBd6U1", "localVerkey": "~T9HBHeNSXBXZCBB8GrgjFm", "remotePubkey": "5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z", "availableClaims": [{"py/object": "anoncreds.protocol.types.AvailableClaim", "py/newargs": {"py/tuple": ["Transcript", "1.2", "ULtgFQJe6bjiFbs7ke3NJD"]}, "py/seq": ["Transcript", "1.2", "ULtgFQJe6bjiFbs7ke3NJD"]}], "connection_last_synced": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+EIChQbHQvKxQ=="]]}, "_remoteVerkey": "~5kh3FB4H3NKq7tUDqeqHc1", "remoteIdentifier": "ULtgFQJe6bjiFbs7ke3NJD"}]}, {"py/tuple": ["Acme Corp", {"proofRequests": [{"py/object": "anoncreds.protocol.types.ProofRequest", "attributes": {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["first_name", "string"]}, {"py/tuple": ["last_name", "string"]}, {"py/tuple": ["phone_number", "string"]}, {"py/tuple": ["degree", "Bachelor of Science, Marketing"]}, {"py/tuple": ["status", "graduated"]}, {"py/tuple": ["ssn", "123-45-6789"]}]}]}, "ts": null, "version": "0.2", "verifiableAttributes": {"777fb1af-a7a0-4f0c-81b8-9e09a8068d16": {"py/object": "anoncreds.protocol.types.AttributeInfo", "py/newargs": {"py/tuple": ["status", null, null]}, "py/seq": ["status", null, null]}, "d5743fcc-d287-4176-a634-3b721d962ea5": {"py/object": "anoncreds.protocol.types.AttributeInfo", "py/newargs": {"py/tuple": ["ssn", null, null]}, "py/seq": ["ssn", null, null]}, "4de5205f-720f-49f0-8397-0576875d904b": {"py/object": "anoncreds.protocol.types.AttributeInfo", "py/newargs": {"py/tuple": ["degree", null, null]}, "py/seq": ["degree", null, null]}}, "nonce": 1871218719015472932666560146158750511756, "seqNo": null, "name": "Job-Application", "predicates": {}, "fulfilledByClaims": [{"py/tuple": [{"py/id": 12}, {"py/id": 14}, {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["student_name", "Alice Garcia"]}, {"py/tuple": ["ssn", "123-45-6789"]}, {"py/tuple": ["degree", "Bachelor of Science, Marketing"]}, {"py/tuple": ["year", "2015"]}, {"py/tuple": ["status", "graduated"]}]}]}]}], "selfAttestedAttrs": {}}], "internalId": null, "remoteEndPoint": {"py/tuple": ["10.0.0.203", 6666]}, "request_nonce": "57fbf9dc8c8e6acde33de98c6d747b28c", "name": "Acme Corp", "connection_status": null, "trustAnchor": "Acme Corp", "verifiedClaimProofs": [], "py/object": "indy_client.client.wallet.connection.Connection", "connection_last_sync_no": null, "localIdentifier": "Siga5PyLFTZdpupPUXogjt", "localVerkey": "~9wzQSoSNbLwRcNz9JkBFME", "remotePubkey": "C5eqjU7NMVMGGfGfx2ubvX5H9X346bQt5qeziVAo3naQ", "availableClaims": [], "connection_last_synced": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+EIChQsHwmWIA=="]]}, "_remoteVerkey": "~WjXEvZ9xj4Tz9sLtzf7HVP", "remoteIdentifier": "CzkavE58zgX7rUMrzSinLr"}]}]}]}, "replyHandler": {}, "knownIds": {"ULtgFQJe6bjiFbs7ke3NJD": {"py/object": "indy_common.identity.Identity", "identity": {"py/object": "plenum.common.signer_did.DidIdentity", "abbreviated": null, "_identifier": "ULtgFQJe6bjiFbs7ke3NJD", "_verkey": null}, "last_synced": null, "seqNo": null, "trustAnchor": null, "_role": null}, "JYeHd6Zn3zFo1UbNVBd6U1": {"py/object": "indy_common.identity.Identity", "identity": {"py/object": "plenum.common.signer_did.DidIdentity", "abbreviated": null, "_identifier": "JYeHd6Zn3zFo1UbNVBd6U1", "_verkey": null}, "last_synced": null, "seqNo": null, "trustAnchor": null, "_role": null}, "CzkavE58zgX7rUMrzSinLr": {"py/object": "indy_common.identity.Identity", "identity": {"py/object": "plenum.common.signer_did.DidIdentity", "abbreviated": null, "_identifier": "CzkavE58zgX7rUMrzSinLr", "_verkey": null}, "last_synced": null, "seqNo": null, "trustAnchor": null, "_role": null}}, "lastKnownSeqs": {}, "env": "no-env", "classver/indy_client.client.wallet.wallet.Wallet": 2} \ No newline at end of file diff --git a/indy_client/test/cli/wallet_before_rebranding b/indy_client/test/cli/wallet_before_rebranding new file mode 100644 index 000000000..84ef2b7f4 --- /dev/null +++ b/indy_client/test/cli/wallet_before_rebranding @@ -0,0 +1 @@ +{"_connections": {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["Faber College", {"verifiedClaimProofs": [], "internalId": null, "availableClaims": [{"py/newargs": {"py/tuple": ["Transcript", "1.2", "ULtgFQJe6bjiFbs7ke3NJD"]}, "py/object": "anoncreds.protocol.types.AvailableClaim", "py/seq": ["Transcript", "1.2", "ULtgFQJe6bjiFbs7ke3NJD"]}], "localVerkey": "~B8szPF41YG76ePciYUvG3W", "connection_last_sync_no": null, "connection_last_synced": {"__reduce__": [{"py/type": "datetime.datetime"}, ["B+EIHRAEKgP3/g=="]], "py/object": "datetime.datetime"}, "proofRequests": [], "py/object": "sovrin_client.client.wallet.connection.Connection", "localIdentifier": "BJWY59pnbdGrThaxgbpaWY", "trustAnchor": "Faber College", "request_nonce": "b1134a647eb818069c089e7694f63e6d", "connection_status": "Accepted", "_remoteVerkey": "~5kh3FB4H3NKq7tUDqeqHc1", "remotePubkey": "5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z", "remoteIdentifier": "ULtgFQJe6bjiFbs7ke3NJD", "name": "Faber College", "remoteEndPoint": {"py/tuple": ["127.0.0.1", 5555]}}]}, {"py/tuple": ["Acme Corp", {"verifiedClaimProofs": [], "internalId": null, "availableClaims": [{"py/newargs": {"py/tuple": ["Job-Certificate", "0.2", "CzkavE58zgX7rUMrzSinLr"]}, "py/object": "anoncreds.protocol.types.AvailableClaim", "py/seq": ["Job-Certificate", "0.2", "CzkavE58zgX7rUMrzSinLr"]}], "localVerkey": "~VKF8RPxwwEM7BxkipZX83j", "connection_last_sync_no": null, "connection_last_synced": {"__reduce__": [{"py/type": "datetime.datetime"}, ["B+EIHRAHGw6Pbw=="]], "py/object": "datetime.datetime"}, "proofRequests": [{"selfAttestedAttrs": {"first_name": "Alice", "phone_number": "123-456-7890", "last_name": "Garcia"}, "nonce": 1871218719015472932666560146158750511756, "verifiableAttributes": {"4d646508-d49b-4a09-9809-7250d45cc2da": {"py/newargs": {"py/tuple": ["ssn", null, null]}, "py/object": "anoncreds.protocol.types.AttributeInfo", "py/seq": ["ssn", null, null]}, "aba32489-62cc-40f5-b733-7ab9bbcc46aa": {"py/newargs": {"py/tuple": ["status", null, null]}, "py/object": "anoncreds.protocol.types.AttributeInfo", "py/seq": ["status", null, null]}, "330a3131-c0ce-4766-bdee-b7a7560e0f89": {"py/newargs": {"py/tuple": ["degree", null, null]}, "py/object": "anoncreds.protocol.types.AttributeInfo", "py/seq": ["degree", null, null]}}, "predicates": {}, "ts": null, "fulfilledByClaims": [{"py/tuple": [{"py/id": 9}, {"py/id": 11}, {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["student_name", "Alice Garcia"]}, {"py/tuple": ["ssn", "123-45-6789"]}, {"py/tuple": ["degree", "Bachelor of Science, Marketing"]}, {"py/tuple": ["year", "2015"]}, {"py/tuple": ["status", "graduated"]}]}]}]}], "attributes": {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["first_name", "Alice"]}, {"py/tuple": ["last_name", "Garcia"]}, {"py/tuple": ["phone_number", "123-456-7890"]}, {"py/tuple": ["degree", "Bachelor of Science, Marketing"]}, {"py/tuple": ["status", "graduated"]}, {"py/tuple": ["ssn", "123-45-6789"]}]}]}, "py/object": "anoncreds.protocol.types.ProofRequest", "seqNo": null, "name": "Job-Application", "version": "0.2"}], "py/object": "sovrin_client.client.wallet.connection.Connection", "localIdentifier": "PE83fLnVVSihiq39bhD3gk", "trustAnchor": "Acme Corp", "request_nonce": "57fbf9dc8c8e6acde33de98c6d747b28c", "connection_status": "Accepted", "_remoteVerkey": "~WjXEvZ9xj4Tz9sLtzf7HVP", "remotePubkey": "C5eqjU7NMVMGGfGfx2ubvX5H9X346bQt5qeziVAo3naQ", "remoteIdentifier": "CzkavE58zgX7rUMrzSinLr", "name": "Acme Corp", "remoteEndPoint": {"py/tuple": ["127.0.0.1", 6666]}}]}, {"py/tuple": ["Thrift Bank", {"verifiedClaimProofs": [], "internalId": null, "availableClaims": [], "localVerkey": "~91MMTTVbqNdRQJ9uv7Hijt", "connection_last_sync_no": null, "connection_last_synced": {"__reduce__": [{"py/type": "datetime.datetime"}, ["B+EIHRAMIwh5WQ=="]], "py/object": "datetime.datetime"}, "proofRequests": [{"selfAttestedAttrs": {}, "nonce": 2551783452857349859593309361022286934668, "verifiableAttributes": {"c02eb394-df6e-4aa4-991a-c8479a7ac726": {"py/newargs": {"py/tuple": ["employee_status", null, null]}, "py/object": "anoncreds.protocol.types.AttributeInfo", "py/seq": ["employee_status", null, null]}, "ac32a218-3ad6-46f5-835b-a1e3a3523b46": {"py/newargs": {"py/tuple": ["salary_bracket", null, null]}, "py/object": "anoncreds.protocol.types.AttributeInfo", "py/seq": ["salary_bracket", null, null]}}, "predicates": {}, "ts": null, "fulfilledByClaims": [{"py/tuple": [{"py/id": 15}, {"py/id": 17}, {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["first_name", "Alice"]}, {"py/tuple": ["last_name", "Garcia"]}, {"py/tuple": ["employee_status", "Permanent"]}, {"py/tuple": ["experience", "3 years"]}, {"py/tuple": ["salary_bracket", "between $50,000 to $100,000"]}]}]}]}], "attributes": {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["salary_bracket", "between $50,000 to $100,000"]}, {"py/tuple": ["employee_status", "Permanent"]}]}]}, "py/object": "anoncreds.protocol.types.ProofRequest", "seqNo": null, "name": "Loan-Application-Basic", "version": "0.1"}, {"selfAttestedAttrs": {}, "nonce": 2551783452857349859593309361022286934668, "verifiableAttributes": {"31bd9935-a886-4814-b437-849c80368506": {"py/newargs": {"py/tuple": ["last_name", null, null]}, "py/object": "anoncreds.protocol.types.AttributeInfo", "py/seq": ["last_name", null, null]}, "a45a8fed-1695-4e95-a46b-a1ab44a88ad2": {"py/newargs": {"py/tuple": ["ssn", null, null]}, "py/object": "anoncreds.protocol.types.AttributeInfo", "py/seq": ["ssn", null, null]}, "0f25477f-88ed-4e93-a463-1ed2071d4ba3": {"py/newargs": {"py/tuple": ["first_name", null, null]}, "py/object": "anoncreds.protocol.types.AttributeInfo", "py/seq": ["first_name", null, null]}}, "predicates": {}, "ts": null, "fulfilledByClaims": [{"py/tuple": [{"py/id": 9}, {"py/id": 11}, {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["student_name", "Alice Garcia"]}, {"py/tuple": ["ssn", "123-45-6789"]}, {"py/tuple": ["degree", "Bachelor of Science, Marketing"]}, {"py/tuple": ["year", "2015"]}, {"py/tuple": ["status", "graduated"]}]}]}]}, {"py/tuple": [{"py/id": 15}, {"py/id": 17}, {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["first_name", "Alice"]}, {"py/tuple": ["last_name", "Garcia"]}, {"py/tuple": ["employee_status", "Permanent"]}, {"py/tuple": ["experience", "3 years"]}, {"py/tuple": ["salary_bracket", "between $50,000 to $100,000"]}]}]}]}], "attributes": {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["first_name", "Alice"]}, {"py/tuple": ["last_name", "Garcia"]}, {"py/tuple": ["ssn", "123-45-6789"]}]}]}, "py/object": "anoncreds.protocol.types.ProofRequest", "seqNo": null, "name": "Loan-Application-KYC", "version": "0.1"}, {"selfAttestedAttrs": {}, "nonce": 2551783452857349859593309361022286934668, "verifiableAttributes": {"8327f28c-0194-45df-9472-196d173ee493": {"py/newargs": {"py/tuple": ["first_name", null, null]}, "py/object": "anoncreds.protocol.types.AttributeInfo", "py/seq": ["first_name", null, null]}, "f58f77fa-894f-4a47-8aaa-7d586394e16c": {"py/newargs": {"py/tuple": ["last_name", null, null]}, "py/object": "anoncreds.protocol.types.AttributeInfo", "py/seq": ["last_name", null, null]}}, "predicates": {}, "ts": null, "fulfilledByClaims": [], "attributes": {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["first_name", "string"]}, {"py/tuple": ["last_name", "string"]}]}]}, "py/object": "anoncreds.protocol.types.ProofRequest", "seqNo": null, "name": "Name-Proof", "version": "0.1"}], "py/object": "sovrin_client.client.wallet.connection.Connection", "localIdentifier": "DbMzrC2CsumhvkRkjj3RMA", "trustAnchor": "Thrift Bank", "request_nonce": "77fbf9dc8c8e6acde33de98c6d747b28c", "connection_status": "Accepted", "_remoteVerkey": "~3sphzTb2itL2mwSeJ1Ji28", "remotePubkey": "AGBjYvyM3SFnoiDGAEzkSLHvqyzVkXeMZfKDvdpEsC2x", "remoteIdentifier": "H2aKRiDeq8aLZSydQMDbtf", "name": "Thrift Bank", "remoteEndPoint": {"py/tuple": ["127.0.0.1", 7777]}}]}]}]}, "_pending": {"py/reduce": [{"py/type": "collections.deque"}, {"py/tuple": [[]]}, null, null, null]}, "_trustAnchored": {"H2aKRiDeq8aLZSydQMDbtf": {"identity": {"_identifier": "H2aKRiDeq8aLZSydQMDbtf", "abbreviated": true, "py/object": "plenum.common.signer_did.DidIdentity", "_verkey": "3sphzTb2itL2mwSeJ1Ji28"}, "last_synced": null, "_role": "101", "py/object": "sovrin_common.identity.Identity", "seqNo": 11, "trustAnchor": null}, "CzkavE58zgX7rUMrzSinLr": {"identity": {"_identifier": "CzkavE58zgX7rUMrzSinLr", "abbreviated": true, "py/object": "plenum.common.signer_did.DidIdentity", "_verkey": "WjXEvZ9xj4Tz9sLtzf7HVP"}, "last_synced": null, "_role": "101", "py/object": "sovrin_common.identity.Identity", "seqNo": 9, "trustAnchor": null}, "ULtgFQJe6bjiFbs7ke3NJD": {"identity": {"_identifier": "ULtgFQJe6bjiFbs7ke3NJD", "abbreviated": true, "py/object": "plenum.common.signer_did.DidIdentity", "_verkey": "5kh3FB4H3NKq7tUDqeqHc1"}, "last_synced": null, "_role": "101", "py/object": "sovrin_common.identity.Identity", "seqNo": 7, "trustAnchor": null}}, "didMethods": {"default": {"py/id": 80}, "d": {"sovrin": {"pattern": "did:sovrin:", "py/object": "plenum.common.did_method.DidMethod", "name": "sovrin", "signerConstructor": {"py/type": "plenum.common.signer_did.DidSigner"}}}, "py/object": "plenum.common.did_method.DidMethods"}, "env": "no-env", "classver/sovrin_client.client.wallet.wallet.Wallet": 1, "_attributes": {"json://{\"py/tuple\": [\"endpoint\", null, \"CzkavE58zgX7rUMrzSinLr\"]}": {"value": null, "dest": "CzkavE58zgX7rUMrzSinLr", "encKey": null, "ledgerStore": {"py/id": 2}, "py/object": "sovrin_client.client.wallet.attribute.Attribute", "seqNo": null, "name": "endpoint", "origin": null}, "json://{\"py/tuple\": [\"aeff8\", \"H2aKRiDeq8aLZSydQMDbtf\", \"H2aKRiDeq8aLZSydQMDbtf\"]}": {"value": "{\"endpoint\": {\"ha\": \"127.0.0.1:7777\", \"pubkey\": \"AGBjYvyM3SFnoiDGAEzkSLHvqyzVkXeMZfKDvdpEsC2x\"}}", "dest": "H2aKRiDeq8aLZSydQMDbtf", "encKey": null, "ledgerStore": {"py/id": 2}, "py/object": "sovrin_client.client.wallet.attribute.Attribute", "seqNo": 12, "name": "aeff8", "origin": "H2aKRiDeq8aLZSydQMDbtf"}, "json://{\"py/tuple\": [\"66b17\", \"ULtgFQJe6bjiFbs7ke3NJD\", \"ULtgFQJe6bjiFbs7ke3NJD\"]}": {"value": "{\"endpoint\": {\"ha\": \"127.0.0.1:5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}", "dest": "ULtgFQJe6bjiFbs7ke3NJD", "encKey": null, "ledgerStore": {"py/id": 2}, "py/object": "sovrin_client.client.wallet.attribute.Attribute", "seqNo": 8, "name": "66b17", "origin": "ULtgFQJe6bjiFbs7ke3NJD"}, "json://{\"py/tuple\": [\"endpoint\", null, \"H2aKRiDeq8aLZSydQMDbtf\"]}": {"value": null, "dest": "H2aKRiDeq8aLZSydQMDbtf", "encKey": null, "ledgerStore": {"py/id": 2}, "py/object": "sovrin_client.client.wallet.attribute.Attribute", "seqNo": null, "name": "endpoint", "origin": null}, "json://{\"py/tuple\": [\"07867\", \"CzkavE58zgX7rUMrzSinLr\", \"CzkavE58zgX7rUMrzSinLr\"]}": {"value": "{\"endpoint\": {\"ha\": \"127.0.0.1:6666\", \"pubkey\": \"C5eqjU7NMVMGGfGfx2ubvX5H9X346bQt5qeziVAo3naQ\"}}", "dest": "CzkavE58zgX7rUMrzSinLr", "encKey": null, "ledgerStore": {"py/enumvalue": 4, "py/object": "sovrin_client.client.wallet.attribute.LedgerStore"}, "py/object": "sovrin_client.client.wallet.attribute.Attribute", "seqNo": 10, "name": "07867", "origin": "CzkavE58zgX7rUMrzSinLr"}, "json://{\"py/tuple\": [\"endpoint\", null, \"ULtgFQJe6bjiFbs7ke3NJD\"]}": {"value": null, "dest": "ULtgFQJe6bjiFbs7ke3NJD", "encKey": null, "ledgerStore": {"py/id": 2}, "py/object": "sovrin_client.client.wallet.attribute.Attribute", "seqNo": null, "name": "endpoint", "origin": null}}, "aliasesToIds": {}, "idsToSigners": {"BJWY59pnbdGrThaxgbpaWY": {"abbreviated": true, "seed": {"py/b64": "th1xDu+RHRGP7+dsGlDkZkGjK/Idt0/QWZwDMUmWfO4=\n"}, "naclSigner": {"keyhex": {"py/b64": "YjYxZDcxMGVlZjkxMWQxMThmZWZlNzZjMWE1MGU0NjY0MWEzMmJmMjFkYjc0ZmQwNTk5YzAzMzE0\nOTk2N2NlZQ==\n"}, "verraw": {"py/b64": "U207k69qxO8wGLhTTK2HbVIVBCygOEuuXrBpvLgCKsU=\n"}, "verhex": {"py/b64": "NTM2ZDNiOTNhZjZhYzRlZjMwMThiODUzNGNhZDg3NmQ1MjE1MDQyY2EwMzg0YmFlNWViMDY5YmNi\nODAyMmFjNQ==\n"}, "keyraw": {"py/b64": "th1xDu+RHRGP7+dsGlDkZkGjK/Idt0/QWZwDMUmWfO4=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.Signer", "key": {"_signing_key": {"py/b64": "th1xDu+RHRGP7+dsGlDkZkGjK/Idt0/QWZwDMUmWfO5TbTuTr2rE7zAYuFNMrYdtUhUELKA4S65e\nsGm8uAIqxQ==\n"}, "_seed": {"py/b64": "th1xDu+RHRGP7+dsGlDkZkGjK/Idt0/QWZwDMUmWfO4=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"_key": {"py/b64": "U207k69qxO8wGLhTTK2HbVIVBCygOEuuXrBpvLgCKsU=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.VerifyKey"}}}, "_identifier": "BJWY59pnbdGrThaxgbpaWY", "_alias": null, "py/object": "plenum.common.signer_did.DidSigner", "_verkey": "B8szPF41YG76ePciYUvG3W", "sk": {"py/id": 103}}, "H2aKRiDeq8aLZSydQMDbtf": {"py/id": 87}, "PE83fLnVVSihiq39bhD3gk": {"abbreviated": true, "seed": {"py/b64": "BVoiFg4P8/334xSgcVafdHim/stDcuZZ6uYIUr7vpAI=\n"}, "naclSigner": {"keyhex": {"py/b64": "MDU1YTIyMTYwZTBmZjNmZGY3ZTMxNGEwNzE1NjlmNzQ3OGE2ZmVjYjQzNzJlNjU5ZWFlNjA4NTJi\nZWVmYTQwMg==\n"}, "verraw": {"py/b64": "s/4PzBQBVe6WYvm8ZEff6eVL+hw4zk3rrxmD6hP5zmo=\n"}, "verhex": {"py/b64": "YjNmZTBmY2MxNDAxNTVlZTk2NjJmOWJjNjQ0N2RmZTllNTRiZmExYzM4Y2U0ZGViYWYxOTgzZWEx\nM2Y5Y2U2YQ==\n"}, "keyraw": {"py/b64": "BVoiFg4P8/334xSgcVafdHim/stDcuZZ6uYIUr7vpAI=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.Signer", "key": {"_signing_key": {"py/b64": "BVoiFg4P8/334xSgcVafdHim/stDcuZZ6uYIUr7vpAKz/g/MFAFV7pZi+bxkR9/p5Uv6HDjOTeuv\nGYPqE/nOag==\n"}, "_seed": {"py/b64": "BVoiFg4P8/334xSgcVafdHim/stDcuZZ6uYIUr7vpAI=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"_key": {"py/b64": "s/4PzBQBVe6WYvm8ZEff6eVL+hw4zk3rrxmD6hP5zmo=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.VerifyKey"}}}, "_identifier": "PE83fLnVVSihiq39bhD3gk", "_alias": null, "py/object": "plenum.common.signer_did.DidSigner", "_verkey": "VKF8RPxwwEM7BxkipZX83j", "sk": {"py/id": 111}}, "ULtgFQJe6bjiFbs7ke3NJD": {"py/id": 97}, "CzkavE58zgX7rUMrzSinLr": {"py/id": 82}, "DbMzrC2CsumhvkRkjj3RMA": {"abbreviated": true, "seed": {"py/b64": "7akoSfANDCiGx9yKH/H9S4V8Lj0MMM7myzZ15lpada0=\n"}, "naclSigner": {"keyhex": {"py/b64": "ZWRhOTI4NDlmMDBkMGMyODg2YzdkYzhhMWZmMWZkNGI4NTdjMmUzZDBjMzBjZWU2Y2IzNjc1ZTY1\nYTVhNzVhZA==\n"}, "verraw": {"py/b64": "ZfnkZvCT3+Rn1l5J/FJa4UDVpu4zvDL9RiyiLQogf3s=\n"}, "verhex": {"py/b64": "NjVmOWU0NjZmMDkzZGZlNDY3ZDY1ZTQ5ZmM1MjVhZTE0MGQ1YTZlZTMzYmMzMmZkNDYyY2EyMmQw\nYTIwN2Y3Yg==\n"}, "keyraw": {"py/b64": "7akoSfANDCiGx9yKH/H9S4V8Lj0MMM7myzZ15lpada0=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.Signer", "key": {"_signing_key": {"py/b64": "7akoSfANDCiGx9yKH/H9S4V8Lj0MMM7myzZ15lpada1l+eRm8JPf5GfWXkn8UlrhQNWm7jO8Mv1G\nLKItCiB/ew==\n"}, "_seed": {"py/b64": "7akoSfANDCiGx9yKH/H9S4V8Lj0MMM7myzZ15lpada0=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"_key": {"py/b64": "ZfnkZvCT3+Rn1l5J/FJa4UDVpu4zvDL9RiyiLQogf3s=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.VerifyKey"}}}, "_identifier": "DbMzrC2CsumhvkRkjj3RMA", "_alias": null, "py/object": "plenum.common.signer_did.DidSigner", "_verkey": "91MMTTVbqNdRQJ9uv7Hijt", "sk": {"py/id": 107}}, "Th7MpTaRZVRYnPiabds81Y": {"py/id": 92}}, "_name": "Default", "py/object": "sovrin_client.client.wallet.wallet.Wallet", "_upgrades": {}, "_nodes": {}, "_prepared": {"json://{\"py/tuple\": [\"H2aKRiDeq8aLZSydQMDbtf\", 1504011883590259]}": {"py/tuple": [{"py/state": {"operation": {"dest": "BJWY59pnbdGrThaxgbpaWY", "type": "105"}, "signature": "364whYUWxD7ujejo4C5tcxXwD5gV9BsdrAEckzy3ucHuSpiSqGXgf28swPY33YsSTbr8ynXYBGFGdCWQ3dYL5n3K", "reqId": 1504011883590259, "identifier": "H2aKRiDeq8aLZSydQMDbtf", "digest": "fc76ffe6a9961de24b7c04bbced7d325a105fc9293745ede561ad45bc002b37e"}, "py/object": "sovrin_common.types.Request"}, null]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1504010350751398]}": {"py/tuple": [{"py/state": {"operation": {"dest": "CzkavE58zgX7rUMrzSinLr", "type": "100", "raw": "{\"endpoint\": {\"ha\": \"127.0.0.1:6666\", \"pubkey\": \"C5eqjU7NMVMGGfGfx2ubvX5H9X346bQt5qeziVAo3naQ\"}}"}, "signature": "3qPia5g6BGx8vypLNtwWQRUmKvwa75ortax8gpeyYWSW91hZyjSavqKPJDUGkpTosFmBPtUhTnRyxihkujX2vLtw", "reqId": 1504010350751398, "identifier": "CzkavE58zgX7rUMrzSinLr", "digest": "4efe29e01a1d5759709f1568b17ca323a3adce3767a523ad943f1635d2324856"}, "py/object": "sovrin_common.types.Request"}, {"py/tuple": ["07867", "CzkavE58zgX7rUMrzSinLr", "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"H2aKRiDeq8aLZSydQMDbtf\", 1504012188740538]}": {"py/tuple": [{"py/state": {"operation": {"dest": "CzkavE58zgX7rUMrzSinLr", "type": "107", "data": {"version": "0.2", "name": "Job-Certificate"}}, "signature": "2nCUmiFiW8PNnFTKj6bBofZTZ14uw7WGoBcnqY7fCfG882MHLH76X2YaWGTWKDU5hZxHPXPtyWFdCKCjy9nQfkaA", "reqId": 1504012188740538, "identifier": "H2aKRiDeq8aLZSydQMDbtf", "digest": "dfbfb8166a324fd9bd61ccbccb7c872827af6407415760ff1cca2b674ad535a1"}, "py/object": "sovrin_common.types.Request"}, null]}, "json://{\"py/tuple\": [\"Th7MpTaRZVRYnPiabds81Y\", 1504010398619692]}": {"py/tuple": [{"py/state": {"operation": {"role": "101", "verkey": "~3sphzTb2itL2mwSeJ1Ji28", "dest": "H2aKRiDeq8aLZSydQMDbtf", "type": "1"}, "signature": "3yKXjwJ5r3GgZBzEQ1NZyB5TJz7A7UYTrbpiDmSoy5qirWoZ3fBuezN2T4HGB3XHQDCSDJC9ziacSHGsTubyxLza", "reqId": 1504010398619692, "identifier": "Th7MpTaRZVRYnPiabds81Y", "digest": "e0808960a3543e452f83435dd142c67084763f272640388d3dd37294fd29a041"}, "py/object": "sovrin_common.types.Request"}, "H2aKRiDeq8aLZSydQMDbtf"]}, "json://{\"py/tuple\": [\"H2aKRiDeq8aLZSydQMDbtf\", 1504012048933581]}": {"py/tuple": [{"py/state": {"operation": {"dest": "PE83fLnVVSihiq39bhD3gk", "type": "105"}, "signature": "58CmzefeGey3ofK6jrRMVbwtWbjG13F5kbdqnw54We5g2z7o4D191HPH4kDW28PgpmHoKS6oWuCBfq3JCZD3xWZ4", "reqId": 1504012048933581, "identifier": "H2aKRiDeq8aLZSydQMDbtf", "digest": "8012bd04271496c7a06c83910089fb11fde11689a5ef86ebc3a35d25c9bcdaca"}, "py/object": "sovrin_common.types.Request"}, null]}, "json://{\"py/tuple\": [\"Th7MpTaRZVRYnPiabds81Y\", 1504010181315940]}": {"py/tuple": [{"py/state": {"operation": {"role": "101", "verkey": "~5kh3FB4H3NKq7tUDqeqHc1", "dest": "ULtgFQJe6bjiFbs7ke3NJD", "type": "1"}, "signature": "54SEC4pE41BYDyweHPcRRMtsaHttqJkSuGPxiTxy8eVK8KmvHFFzevkZ4HvAB4hAi9w7mdBXsofpZfNFeSDW8DdA", "reqId": 1504010181315940, "identifier": "Th7MpTaRZVRYnPiabds81Y", "digest": "f6bcf8b6d9a272bd7bf5d1787f37f3aa3ced590c00fdbf589b74a43552c7fe15"}, "py/object": "sovrin_common.types.Request"}, "ULtgFQJe6bjiFbs7ke3NJD"]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1504010242889826]}": {"py/tuple": [{"py/state": {"operation": {"dest": "ULtgFQJe6bjiFbs7ke3NJD", "type": "100", "raw": "{\"endpoint\": {\"ha\": \"127.0.0.1:5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}"}, "signature": "2rJA57ukRizRu3SSQRE6mdrV7o4s3gTRDdFRn7ov3cTVtU6bidkboVG2hGRE9SECSpFyTe231yXEibio4MPxQ8k3", "reqId": 1504010242889826, "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "digest": "85c79438fab5bece84b69325ae55bced2cd1dddab99ce5c3153db78740c18c28"}, "py/object": "sovrin_common.types.Request"}, {"py/tuple": ["66b17", "ULtgFQJe6bjiFbs7ke3NJD", "ULtgFQJe6bjiFbs7ke3NJD"]}]}, "json://{\"py/tuple\": [\"H2aKRiDeq8aLZSydQMDbtf\", 1504011967739666]}": {"py/tuple": [{"py/state": {"operation": {"type": "108", "signature_type": "CL", "origin": "ULtgFQJe6bjiFbs7ke3NJD", "ref": 13}, "signature": "4kr5ayEMn8Wc1S1tfEcfJqpNr14u4MFzZmsjZhPnXDYD8RqdretNoVHr8U7AGDgufjZgNpF3WGWY5KGag8kCACdb", "reqId": 1504011967739666, "identifier": "H2aKRiDeq8aLZSydQMDbtf", "digest": "427f12c8d3f30bbda02c09aa900f27c3d1bd657bd5f58078dc90c690e513ac89"}, "py/object": "sovrin_common.types.Request"}, null]}, "json://{\"py/tuple\": [\"H2aKRiDeq8aLZSydQMDbtf\", 1504012356595162]}": {"py/tuple": [{"py/state": {"operation": {"dest": "DbMzrC2CsumhvkRkjj3RMA", "type": "105"}, "signature": "4n2ZQXHrGPpzHQsEcHA8V3j1Tw5TF5aj1wm6m41tMBTLC1RXyhnFyF1BoAdRA9vZPXmMFhTWuSPD6V6UJuQ6vmwX", "reqId": 1504012356595162, "identifier": "H2aKRiDeq8aLZSydQMDbtf", "digest": "58bbbb186978c505de3c63b212f4af925ab9076e2d4d7f1af054c0764fa85400"}, "py/object": "sovrin_common.types.Request"}, null]}, "json://{\"py/tuple\": [\"Th7MpTaRZVRYnPiabds81Y\", 1504010285363587]}": {"py/tuple": [{"py/state": {"operation": {"role": "101", "verkey": "~WjXEvZ9xj4Tz9sLtzf7HVP", "dest": "CzkavE58zgX7rUMrzSinLr", "type": "1"}, "signature": "3UGgq7JWkfQEuLb9qrpjKk4cBL5gB2Xn4EivZLvwJ2ELvX4ksTPbDWBRpjcYVcnPNA9wwHxrfLhHssJrLQrGYEoe", "reqId": 1504010285363587, "identifier": "Th7MpTaRZVRYnPiabds81Y", "digest": "8be02e03b138f7039b8909feb4a34a7f5efea85c14033dac8631dbfe7db6ccba"}, "py/object": "sovrin_common.types.Request"}, "CzkavE58zgX7rUMrzSinLr"]}, "json://{\"py/tuple\": [\"H2aKRiDeq8aLZSydQMDbtf\", 1504011945667203]}": {"py/tuple": [{"py/state": {"operation": {"dest": "ULtgFQJe6bjiFbs7ke3NJD", "type": "107", "data": {"version": "1.2", "name": "Transcript"}}, "signature": "R4XW9CPcUdmPzK7e8vSA7KpWiX9BkTFPkMmQeDKMP3AySd45ScnaCKwwC51ZRd3BneZrBjkGUpqaZSzj39rgroL", "reqId": 1504011945667203, "identifier": "H2aKRiDeq8aLZSydQMDbtf", "digest": "24e1192a567f91a910f76105057fc37b1cd965cb6cfb69fcb7bbc7dcacbc1dd0"}, "py/object": "sovrin_common.types.Request"}, null]}, "json://{\"py/tuple\": [\"H2aKRiDeq8aLZSydQMDbtf\", 1504012047713360]}": {"py/tuple": [{"py/state": {"operation": {"dest": "CzkavE58zgX7rUMrzSinLr", "type": "105"}, "signature": "5iXwQDBQYQv7SUeJ2oeFuV7W9ryqVhVTxWYGPHKHz1GiTuLh8sNcn91iXHmB9Wsa4QbKC85tFQyacwqmr2T6Jb2A", "reqId": 1504012047713360, "identifier": "H2aKRiDeq8aLZSydQMDbtf", "digest": "aafdc7c965e5bc06e2861e11aaf2289b1a02c1272070a51cafc97a091ec584e6"}, "py/object": "sovrin_common.types.Request"}, null]}, "json://{\"py/tuple\": [\"H2aKRiDeq8aLZSydQMDbtf\", 1504012355315102]}": {"py/tuple": [{"py/state": {"operation": {"dest": "H2aKRiDeq8aLZSydQMDbtf", "type": "105"}, "signature": "5BsGV8Bt8P1jbaJmMfU24oXJQmxHQpCpp8JGem9Ge6k7ZmdXRB4qtWZS4qjqXQN8QmaUf7Dn6G8FobNv3jyfZQbr", "reqId": 1504012355315102, "identifier": "H2aKRiDeq8aLZSydQMDbtf", "digest": "7beaccec295b7457d7450a7ed2ce1f994e25ac82afa994c85d9d9a3c047a88c8"}, "py/object": "sovrin_common.types.Request"}, null]}, "json://{\"py/tuple\": [\"H2aKRiDeq8aLZSydQMDbtf\", 1504011882040323]}": {"py/tuple": [{"py/state": {"operation": {"dest": "ULtgFQJe6bjiFbs7ke3NJD", "type": "105"}, "signature": "2ErcvN45rsVV1YDMnoForoKA3iKvPCL7oLhnNToKEtPE5gvD2GL5Uwrh3GBWwX1Hk484MFQUkn4aoJjecQgo7wNw", "reqId": 1504011882040323, "identifier": "H2aKRiDeq8aLZSydQMDbtf", "digest": "15b7ec7667e1978c4fb0c3062f826d6eafb28eb370cf9f57f4159808990898e9"}, "py/object": "sovrin_common.types.Request"}, null]}, "json://{\"py/tuple\": [\"H2aKRiDeq8aLZSydQMDbtf\", 1504012047714732]}": {"py/tuple": [{"py/state": {"operation": {"dest": "CzkavE58zgX7rUMrzSinLr", "type": "104", "raw": "endpoint"}, "signature": "eQPkA7m2NJBTiuYfXtEEqWS8Tg6Zy2ByNQkmK6u3BKjC6wumimCquBEg5sq6yqWos3KbAEvvJ66ZtAjH2P8Dxgh", "reqId": 1504012047714732, "identifier": "H2aKRiDeq8aLZSydQMDbtf", "digest": "8b445a2bc31d4ad2eac3e73a8750fa943085d3f9d606bb93db8b2afa73930878"}, "py/object": "sovrin_common.types.Request"}, {"py/tuple": ["endpoint", null, "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"H2aKRiDeq8aLZSydQMDbtf\", 1504012355316429]}": {"py/tuple": [{"py/state": {"operation": {"dest": "H2aKRiDeq8aLZSydQMDbtf", "type": "104", "raw": "endpoint"}, "signature": "3tyqA7ut7UTVU8TGWNHWDd7PT6fa7Qj2HkBe4t4Q5daRwTmQz4fhubaVGsLzPTz5SpHa3pwUvkm57qUTfCeLh2aX", "reqId": 1504012355316429, "identifier": "H2aKRiDeq8aLZSydQMDbtf", "digest": "7ecf3b0fbb7726a355e54ecb527a3faf23e0a2d2433ea3cbec23e35e26b4ff3f"}, "py/object": "sovrin_common.types.Request"}, {"py/tuple": ["endpoint", null, "H2aKRiDeq8aLZSydQMDbtf"]}]}, "json://{\"py/tuple\": [\"H2aKRiDeq8aLZSydQMDbtf\", 1504012207718128]}": {"py/tuple": [{"py/state": {"operation": {"type": "108", "signature_type": "CL", "origin": "CzkavE58zgX7rUMrzSinLr", "ref": 15}, "signature": "2G2dwnMHAo2DcbKmsPyoCmmYrqEeyEkyAMW3BG7ABRytCXbUJGuQazJpju32FDczAXei78VHD1UKNkNUZnkQ69of", "reqId": 1504012207718128, "identifier": "H2aKRiDeq8aLZSydQMDbtf", "digest": "c5cdb9d2bfb2f9da143238099f482708ae17c342f0ba05cad8eb90c2f9ad80b5"}, "py/object": "sovrin_common.types.Request"}, null]}, "json://{\"py/tuple\": [\"H2aKRiDeq8aLZSydQMDbtf\", 1504011882042186]}": {"py/tuple": [{"py/state": {"operation": {"dest": "ULtgFQJe6bjiFbs7ke3NJD", "type": "104", "raw": "endpoint"}, "signature": "5q2PR8fTvXFcotCn1KQdRw5geixyncGe4YKtpHdJhaRNPJy6mND1X7pm4gX4garStMes2tAJ5P818TKZCzjQz1HD", "reqId": 1504011882042186, "identifier": "H2aKRiDeq8aLZSydQMDbtf", "digest": "906b1b51ff7641001c057fecf3c4fe7b0663cc93f82f8bb2819fcafe68a06e8a"}, "py/object": "sovrin_common.types.Request"}, {"py/tuple": ["endpoint", null, "ULtgFQJe6bjiFbs7ke3NJD"]}]}, "json://{\"py/tuple\": [\"H2aKRiDeq8aLZSydQMDbtf\", 1504010486440323]}": {"py/tuple": [{"py/state": {"operation": {"dest": "H2aKRiDeq8aLZSydQMDbtf", "type": "100", "raw": "{\"endpoint\": {\"ha\": \"127.0.0.1:7777\", \"pubkey\": \"AGBjYvyM3SFnoiDGAEzkSLHvqyzVkXeMZfKDvdpEsC2x\"}}"}, "signature": "3YfkBsc7CqwpWBLcADCk4czcfkgbXvxYSCkRNrVbQhystCpmYU5XUC96o3sHzg5AxdZhFCc14SQwCwkK9yKK926a", "reqId": 1504010486440323, "identifier": "H2aKRiDeq8aLZSydQMDbtf", "digest": "0165abda3ba23da73fe2a1a969be08ab90949018be247a26c565ed4a32dcbd39"}, "py/object": "sovrin_common.types.Request"}, {"py/tuple": ["aeff8", "H2aKRiDeq8aLZSydQMDbtf", "H2aKRiDeq8aLZSydQMDbtf"]}]}}, "ids": {"H2aKRiDeq8aLZSydQMDbtf": {"py/newargs": {"py/tuple": [{"abbreviated": true, "seed": {"py/b64": "VGhyaWZ0MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}, "naclSigner": {"keyhex": {"py/b64": "NTQ2ODcyNjk2Njc0MzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAz\nMDMwMzAzMA==\n"}, "verraw": {"py/b64": "gcp+vfaMWkvmGXYQd3uE/BdK3btf/TR+8xuqhvOYDw0=\n"}, "verhex": {"py/b64": "ODFjYTdlYmRmNjhjNWE0YmU2MTk3NjEwNzc3Yjg0ZmMxNzRhZGRiYjVmZmQzNDdlZjMxYmFhODZm\nMzk4MGYwZA==\n"}, "keyraw": {"py/b64": "VGhyaWZ0MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.Signer", "key": {"_signing_key": {"py/b64": "VGhyaWZ0MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDCByn699oxaS+YZdhB3e4T8F0rdu1/9NH7z\nG6qG85gPDQ==\n"}, "_seed": {"py/b64": "VGhyaWZ0MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"_key": {"py/b64": "gcp+vfaMWkvmGXYQd3uE/BdK3btf/TR+8xuqhvOYDw0=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.VerifyKey"}}}, "_identifier": "H2aKRiDeq8aLZSydQMDbtf", "_alias": null, "py/object": "plenum.common.signer_did.DidSigner", "_verkey": "3sphzTb2itL2mwSeJ1Ji28", "sk": {"py/id": 89}}, 1504012356595162]}, "py/object": "plenum.client.wallet.IdData", "py/seq": [{"py/id": 87}, 1504012356595162]}, "CzkavE58zgX7rUMrzSinLr": {"py/newargs": {"py/tuple": [{"abbreviated": true, "seed": {"py/b64": "QWNtZTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}, "naclSigner": {"keyhex": {"py/b64": "NDE2MzZkNjUzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAz\nMDMwMzAzMA==\n"}, "verraw": {"py/b64": "YSTHvR/sxdu41ig9mcqMq/DI5USQMVU4kpa6anJhot4=\n"}, "verhex": {"py/b64": "NjEyNGM3YmQxZmVjYzVkYmI4ZDYyODNkOTljYThjYWJmMGM4ZTU0NDkwMzE1NTM4OTI5NmJhNmE3\nMjYxYTJkZQ==\n"}, "keyraw": {"py/b64": "QWNtZTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.Signer", "key": {"_signing_key": {"py/b64": "QWNtZTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBhJMe9H+zF27jWKD2Zyoyr8MjlRJAxVTiS\nlrpqcmGi3g==\n"}, "_seed": {"py/b64": "QWNtZTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"_key": {"py/b64": "YSTHvR/sxdu41ig9mcqMq/DI5USQMVU4kpa6anJhot4=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.VerifyKey"}}}, "_identifier": "CzkavE58zgX7rUMrzSinLr", "_alias": null, "py/object": "plenum.common.signer_did.DidSigner", "_verkey": "WjXEvZ9xj4Tz9sLtzf7HVP", "sk": {"py/id": 84}}, 1504010350751398]}, "py/object": "plenum.client.wallet.IdData", "py/seq": [{"py/id": 82}, 1504010350751398]}, "Th7MpTaRZVRYnPiabds81Y": {"py/newargs": {"py/tuple": [{"abbreviated": true, "seed": {"py/b64": "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwU3Rld2FyZDE=\n"}, "naclSigner": {"keyhex": {"py/b64": "MzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwNTM3NDY1Nzc2\nMTcyNjQzMQ==\n"}, "verraw": {"py/b64": "2CdGWNI7wuQZTRIy//cOKzRLr2IQZ+tqqSsvzvDJTo0=\n"}, "verhex": {"py/b64": "ZDgyNzQ2NThkMjNiYzJlNDE5NGQxMjMyZmZmNzBlMmIzNDRiYWY2MjEwNjdlYjZhYTkyYjJmY2Vm\nMGM5NGU4ZA==\n"}, "keyraw": {"py/b64": "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwU3Rld2FyZDE=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.Signer", "key": {"_signing_key": {"py/b64": "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwU3Rld2FyZDHYJ0ZY0jvC5BlNEjL/9w4rNEuvYhBn62qp\nKy/O8MlOjQ==\n"}, "_seed": {"py/b64": "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwU3Rld2FyZDE=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"_key": {"py/b64": "2CdGWNI7wuQZTRIy//cOKzRLr2IQZ+tqqSsvzvDJTo0=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.VerifyKey"}}}, "_identifier": "Th7MpTaRZVRYnPiabds81Y", "_alias": null, "py/object": "plenum.common.signer_did.DidSigner", "_verkey": "7TYfekw4GUagBnBVCqPjiC", "sk": {"py/id": 94}}, 1504010398619692]}, "py/object": "plenum.client.wallet.IdData", "py/seq": [{"py/id": 92}, 1504010398619692]}, "ULtgFQJe6bjiFbs7ke3NJD": {"py/newargs": {"py/tuple": [{"abbreviated": true, "seed": {"py/b64": "RmFiZXIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}, "naclSigner": {"keyhex": {"py/b64": "NDY2MTYyNjU3MjMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAz\nMDMwMzAzMA==\n"}, "verraw": {"py/b64": "3W2465HP3OUPGkiNlTMl2iZ+NiMZegfUFIsl8378KH4=\n"}, "verhex": {"py/b64": "ZGQ2ZGI4ZWI5MWNmZGNlNTBmMWE0ODhkOTUzMzI1ZGEyNjdlMzYyMzE5N2EwN2Q0MTQ4YjI1ZjM3\nZWZjMjg3ZQ==\n"}, "keyraw": {"py/b64": "RmFiZXIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.Signer", "key": {"_signing_key": {"py/b64": "RmFiZXIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDDdbbjrkc/c5Q8aSI2VMyXaJn42Ixl6B9QU\niyXzfvwofg==\n"}, "_seed": {"py/b64": "RmFiZXIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"_key": {"py/b64": "3W2465HP3OUPGkiNlTMl2iZ+NiMZegfUFIsl8378KH4=\n"}, "py/object": "stp_core.crypto.nacl_wrappers.VerifyKey"}}}, "_identifier": "ULtgFQJe6bjiFbs7ke3NJD", "_alias": null, "py/object": "plenum.common.signer_did.DidSigner", "_verkey": "5kh3FB4H3NKq7tUDqeqHc1", "sk": {"py/id": 99}}, 1504010242889826]}, "py/object": "plenum.client.wallet.IdData", "py/seq": [{"py/id": 97}, 1504010242889826]}}, "lastKnownSeqs": {}, "defaultId": "H2aKRiDeq8aLZSydQMDbtf", "knownIds": {"BJWY59pnbdGrThaxgbpaWY": {"identity": {"_identifier": "BJWY59pnbdGrThaxgbpaWY", "abbreviated": null, "py/object": "plenum.common.signer_did.DidIdentity", "_verkey": null}, "last_synced": null, "_role": null, "py/object": "sovrin_common.identity.Identity", "seqNo": null, "trustAnchor": null}, "H2aKRiDeq8aLZSydQMDbtf": {"identity": {"_identifier": "H2aKRiDeq8aLZSydQMDbtf", "abbreviated": null, "py/object": "plenum.common.signer_did.DidIdentity", "_verkey": null}, "last_synced": null, "_role": null, "py/object": "sovrin_common.identity.Identity", "seqNo": null, "trustAnchor": null}, "PE83fLnVVSihiq39bhD3gk": {"identity": {"_identifier": "PE83fLnVVSihiq39bhD3gk", "abbreviated": null, "py/object": "plenum.common.signer_did.DidIdentity", "_verkey": null}, "last_synced": null, "_role": null, "py/object": "sovrin_common.identity.Identity", "seqNo": null, "trustAnchor": null}, "ULtgFQJe6bjiFbs7ke3NJD": {"identity": {"_identifier": "ULtgFQJe6bjiFbs7ke3NJD", "abbreviated": null, "py/object": "plenum.common.signer_did.DidIdentity", "_verkey": null}, "last_synced": null, "_role": null, "py/object": "sovrin_common.identity.Identity", "seqNo": null, "trustAnchor": null}, "CzkavE58zgX7rUMrzSinLr": {"identity": {"_identifier": "CzkavE58zgX7rUMrzSinLr", "abbreviated": null, "py/object": "plenum.common.signer_did.DidIdentity", "_verkey": null}, "last_synced": null, "_role": null, "py/object": "sovrin_common.identity.Identity", "seqNo": null, "trustAnchor": null}, "DbMzrC2CsumhvkRkjj3RMA": {"identity": {"_identifier": "DbMzrC2CsumhvkRkjj3RMA", "abbreviated": null, "py/object": "plenum.common.signer_did.DidIdentity", "_verkey": null}, "last_synced": null, "_role": null, "py/object": "sovrin_common.identity.Identity", "seqNo": null, "trustAnchor": null}}, "replyHandler": {}} \ No newline at end of file diff --git a/sovrin_client/test/cli/wallet_before_renaming_link_to_connection b/indy_client/test/cli/wallet_before_renaming_link_to_connection similarity index 100% rename from sovrin_client/test/cli/wallet_before_renaming_link_to_connection rename to indy_client/test/cli/wallet_before_renaming_link_to_connection diff --git a/sovrin_client/test/cli/wallet_from_minimal_go_live b/indy_client/test/cli/wallet_from_minimal_go_live similarity index 100% rename from sovrin_client/test/cli/wallet_from_minimal_go_live rename to indy_client/test/cli/wallet_from_minimal_go_live diff --git a/sovrin_client/test/client/TestClient.py b/indy_client/test/client/TestClient.py similarity index 85% rename from sovrin_client/test/client/TestClient.py rename to indy_client/test/client/TestClient.py index c568ccf91..3f71f893a 100644 --- a/sovrin_client/test/client/TestClient.py +++ b/indy_client/test/client/TestClient.py @@ -1,10 +1,10 @@ from plenum.test.test_stack import StackedTester, TestStack from plenum.test.testable import spyable -from sovrin_client.client.client import Client +from indy_client.client.client import Client -from sovrin_common.test.helper import TempStorage +from indy_common.test.helper import TempStorage -from sovrin_common.config_util import getConfig +from indy_common.config_util import getConfig from stp_core.common.log import getlogger logger = getlogger() diff --git a/sovrin_client/test/client/__init__.py b/indy_client/test/client/__init__.py similarity index 100% rename from sovrin_client/test/client/__init__.py rename to indy_client/test/client/__init__.py diff --git a/sovrin_client/test/client/wallet/test_link_obj.py b/indy_client/test/client/wallet/test_link_obj.py similarity index 71% rename from sovrin_client/test/client/wallet/test_link_obj.py rename to indy_client/test/client/wallet/test_link_obj.py index e08d456f8..370c624f2 100644 --- a/sovrin_client/test/client/wallet/test_link_obj.py +++ b/indy_client/test/client/wallet/test_link_obj.py @@ -1,5 +1,5 @@ import pytest -from sovrin_client.client.wallet.connection import Connection +from indy_client.client.wallet.connection import Connection @pytest.mark.skip(reason='INDY-105') diff --git a/sovrin_client/test/conftest.py b/indy_client/test/conftest.py similarity index 94% rename from sovrin_client/test/conftest.py rename to indy_client/test/conftest.py index a74ab816d..c30b8f292 100644 --- a/sovrin_client/test/conftest.py +++ b/indy_client/test/conftest.py @@ -10,11 +10,11 @@ from stp_core.common.log import Logger from stp_core.loop.eventually import eventually -from sovrin_client.test.constants import primes +from indy_client.test.constants import primes import warnings from copy import deepcopy -from sovrin_common import strict_types +from indy_common import strict_types # typecheck during tests from stp_core.network.port_dispenser import genHa @@ -26,13 +26,13 @@ from plenum.common.signer_simple import SimpleSigner from plenum.common.constants import VERKEY, ALIAS, STEWARD, TXN_ID, TRUSTEE, TYPE -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_common.constants import NYM, TRUST_ANCHOR -from sovrin_common.constants import TXN_TYPE, TARGET_NYM, ROLE -from sovrin_client.test.cli.helper import newCLI, addTrusteeTxnsToGenesis, addTxnToGenesisFile -from sovrin_node.test.helper import makePendingTxnsRequest, buildStewardClient, \ +from indy_client.client.wallet.wallet import Wallet +from indy_common.constants import NYM, TRUST_ANCHOR +from indy_common.constants import TXN_TYPE, TARGET_NYM, ROLE +from indy_client.test.cli.helper import newCLI, addTrusteeTxnsToGenesis, addTxnToGenesisFile +from indy_node.test.helper import makePendingTxnsRequest, buildStewardClient, \ TestNode -from sovrin_client.test.helper import addRole, \ +from indy_client.test.helper import addRole, \ genTestClient, TestClient, createNym # noinspection PyUnresolvedReferences @@ -45,7 +45,7 @@ warncheck, warnfilters as plenum_warnfilters, setResourceLimits # noinspection PyUnresolvedReferences -from sovrin_common.test.conftest import conf, tconf, poolTxnTrusteeNames, \ +from indy_common.test.conftest import conf, tconf, poolTxnTrusteeNames, \ domainTxnOrderedFields, looper Logger.setLogLevel(logging.DEBUG) @@ -110,8 +110,8 @@ def trusteeWallet(trusteeData): return wallet -# TODO: This fixture is present in sovrin_node too, it should be -# sovrin_common's conftest. +# TODO: This fixture is present in indy_node too, it should be +# indy_common's conftest. @pytest.fixture(scope="module") # TODO devin def trustee(nodeSet, looper, tdir, up, trusteeWallet): diff --git a/sovrin_client/test/constants.py b/indy_client/test/constants.py similarity index 100% rename from sovrin_client/test/constants.py rename to indy_client/test/constants.py diff --git a/sovrin_client/test/helper.py b/indy_client/test/helper.py similarity index 98% rename from sovrin_client/test/helper.py rename to indy_client/test/helper.py index 406f132f8..7804a8a23 100644 --- a/sovrin_client/test/helper.py +++ b/indy_client/test/helper.py @@ -9,7 +9,7 @@ from plenum.common.util import randomString from plenum.test import waits -from sovrin_client.test.client.TestClient import TestClient +from indy_client.test.client.TestClient import TestClient from stp_core.common.log import getlogger from plenum.common.signer_did import DidSigner @@ -21,11 +21,11 @@ from plenum.test.test_client import genTestClient as genPlenumTestClient, \ genTestClientProvider as genPlenumTestClientProvider -from sovrin_common.identity import Identity -from sovrin_common.constants import NULL +from indy_common.identity import Identity +from indy_common.constants import NULL -from sovrin_client.client.wallet.upgrade import Upgrade -from sovrin_client.client.wallet.wallet import Wallet +from indy_client.client.wallet.upgrade import Upgrade +from indy_client.client.wallet.wallet import Wallet logger = getlogger() diff --git a/sovrin_client/test/scripts/__init__.py b/indy_client/test/scripts/__init__.py similarity index 100% rename from sovrin_client/test/scripts/__init__.py rename to indy_client/test/scripts/__init__.py diff --git a/sovrin_client/test/scripts/test_reset_client.py b/indy_client/test/scripts/test_reset_client.py similarity index 88% rename from sovrin_client/test/scripts/test_reset_client.py rename to indy_client/test/scripts/test_reset_client.py index b6cb218e9..18323a88b 100644 --- a/sovrin_client/test/scripts/test_reset_client.py +++ b/indy_client/test/scripts/test_reset_client.py @@ -1,9 +1,9 @@ import os from plenum.common.util import randomString -from sovrin_client.script_helper import performSovrinBaseDirCleanup, \ +from indy_client.script_helper import performIndyBaseDirCleanup, \ keepFilesInClientReset -from sovrin_client.test.cli.conftest import aliceCLI, CliBuilder, cliTempLogger +from indy_client.test.cli.conftest import aliceCLI, CliBuilder, cliTempLogger def createRandomDirsAndFiles(baseDir): @@ -46,7 +46,7 @@ def testResetClient(tconf, aliceCLI): newDirs, newFiels = createRandomDirsAndFiles(tconf.baseDir) beforeCleanupDirs, beforeCleanupFiles = getCurrentDirAndFiles( tconf.baseDir) - backupDir = performSovrinBaseDirCleanup(tconf.baseDir) + backupDir = performIndyBaseDirCleanup(tconf.baseDir) afterCleanupDirs, afterCleanupFiles = getCurrentDirAndFiles(tconf.baseDir) backedupDirs, backedupFiles = getCurrentDirAndFiles(backupDir) for name in os.listdir(tconf.baseDir): diff --git a/sovrin_client/test/state_proof/__init__.py b/indy_client/test/state_proof/__init__.py similarity index 100% rename from sovrin_client/test/state_proof/__init__.py rename to indy_client/test/state_proof/__init__.py diff --git a/sovrin_client/test/state_proof/test_state_proof_for_get_requests.py b/indy_client/test/state_proof/test_state_proof_for_get_requests.py similarity index 93% rename from sovrin_client/test/state_proof/test_state_proof_for_get_requests.py rename to indy_client/test/state_proof/test_state_proof_for_get_requests.py index ea0bbbbcf..5b8df4109 100644 --- a/sovrin_client/test/state_proof/test_state_proof_for_get_requests.py +++ b/indy_client/test/state_proof/test_state_proof_for_get_requests.py @@ -6,15 +6,15 @@ TXN_TIME, NYM from plenum.common.types import f -from sovrin_common.constants import GET_ATTR, GET_NYM +from indy_common.constants import GET_ATTR, GET_NYM from plenum.test.helper import waitForSufficientRepliesForRequests, \ getRepliesFromClientInbox # Fixtures, do not remove -from sovrin_common.serialization import attrib_raw_data_serializer -from sovrin_node.test.helper import addAttributeAndCheck -from sovrin_client.client.wallet.attribute import Attribute, LedgerStore -from sovrin_client.test.test_nym_attrib import \ +from indy_common.serialization import attrib_raw_data_serializer +from indy_node.test.helper import addAttributeAndCheck +from indy_client.client.wallet.attribute import Attribute, LedgerStore +from indy_client.test.test_nym_attrib import \ addedRawAttribute, attributeName, attributeValue, attributeData diff --git a/sovrin_client/test/cli/test.log b/indy_client/test/test.log similarity index 100% rename from sovrin_client/test/cli/test.log rename to indy_client/test/test.log diff --git a/sovrin_client/test/test_nym_attrib.py b/indy_client/test/test_nym_attrib.py similarity index 97% rename from sovrin_client/test/test_nym_attrib.py rename to indy_client/test/test_nym_attrib.py index 9fd7df5d1..6f5e88785 100644 --- a/sovrin_client/test/test_nym_attrib.py +++ b/indy_client/test/test_nym_attrib.py @@ -13,16 +13,16 @@ from plenum.common.types import f from plenum.common.util import adict from plenum.test import waits -from sovrin_client.client.client import Client -from sovrin_client.client.wallet.attribute import Attribute, LedgerStore -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_client.test.helper import checkNacks, submitAndCheckRejects, \ +from indy_client.client.client import Client +from indy_client.client.wallet.attribute import Attribute, LedgerStore +from indy_client.client.wallet.wallet import Wallet +from indy_client.test.helper import checkNacks, submitAndCheckRejects, \ genTestClient, createNym, checkRejects, addRole, submit, submitAndCheckAccepts, makePendingTxnsRequest -from sovrin_common.constants import SKEY -from sovrin_common.identity import Identity -from sovrin_common.txn_util import ATTRIB, TRUST_ANCHOR -from sovrin_common.util import getSymmetricallyEncryptedVal -from sovrin_node.test.helper import submitAndCheck, \ +from indy_common.constants import SKEY +from indy_common.identity import Identity +from indy_common.txn_util import ATTRIB, TRUST_ANCHOR +from indy_common.util import getSymmetricallyEncryptedVal +from indy_node.test.helper import submitAndCheck, \ makeAttribRequest, makeGetNymRequest, addAttributeAndCheck, TestNode, \ getAttribute from stp_core.common.log import getlogger diff --git a/sovrin_client/test/training/__init__.py b/indy_client/test/training/__init__.py similarity index 100% rename from sovrin_client/test/training/__init__.py rename to indy_client/test/training/__init__.py diff --git a/sovrin_client/test/training/getting_started.py b/indy_client/test/training/getting_started.py similarity index 67% rename from sovrin_client/test/training/getting_started.py rename to indy_client/test/training/getting_started.py index deea86b30..07b96bbb1 100644 --- a/sovrin_client/test/training/getting_started.py +++ b/indy_client/test/training/getting_started.py @@ -1,32 +1,32 @@ import sys try: - from sovrin_client import * + from indy_client import * except ImportError as e: - print("Sovrin Client is required for this guild, " - "see doc for installing Sovrin Client.", file=sys.stderr) + print("Indy Client is required for this guild, " + "see doc for installing Indy Client.", file=sys.stderr) print(str(e), file=sys.stderr) sys.exit(-1) try: - from sovrin_node import * + from indy_node import * except ImportError as e: - print("Sovrin Node is required for this guild, " - "see doc for installing Sovrin Node.", file=sys.stderr) + print("Indy Node is required for this guild, " + "see doc for installing Indy Node.", file=sys.stderr) print(str(e), file=sys.stderr) sys.exit(-1) -from sovrin_client.test.agent.acme import create_acme, bootstrap_acme -from sovrin_client.test.agent.faber import create_faber, bootstrap_faber -from sovrin_client.test.agent.thrift import create_thrift, bootstrap_thrift -from sovrin_common.constants import TRUST_ANCHOR -from sovrin_common.identity import Identity +from indy_client.test.agent.acme import create_acme, bootstrap_acme +from indy_client.test.agent.faber import create_faber, bootstrap_faber +from indy_client.test.agent.thrift import create_thrift, bootstrap_thrift +from indy_common.constants import TRUST_ANCHOR +from indy_common.identity import Identity -from sovrin_common.config_util import getConfig +from indy_common.config_util import getConfig from plenum.common.plugin_helper import loadPlugins -from sovrin_client.cli.cli import SovrinCli -from sovrin_node.pool.local_pool import create_local_pool +from indy_client.cli.cli import IndyCli +from indy_node.pool.local_pool import create_local_pool config = getConfig() @@ -79,10 +79,10 @@ def main(): curDir = os.getcwd() logFilePath = os.path.join(curDir, config.logFilePath) - cli = SovrinCli(looper=pool, - basedirpath=pool.base_dir, - logFileName=logFilePath, - withNode=False) + cli = IndyCli(looper=pool, + basedirpath=pool.base_dir, + logFileName=logFilePath, + withNode=False) pool.run(cli.shell()) diff --git a/sovrin_client/test/training/getting_started_future.py b/indy_client/test/training/getting_started_future.py similarity index 87% rename from sovrin_client/test/training/getting_started_future.py rename to indy_client/test/training/getting_started_future.py index a11a06a85..c51bec8f1 100644 --- a/sovrin_client/test/training/getting_started_future.py +++ b/indy_client/test/training/getting_started_future.py @@ -4,33 +4,33 @@ from stp_core.loop.eventually import eventually try: - from sovrin_client import * + from indy_client import * except ImportError as e: - print("Sovrin Client is required for this guild, " - "see doc for installing Sovrin Client.", file=sys.stderr) + print("Indy Client is required for this guild, " + "see doc for installing Indy Client.", file=sys.stderr) print(str(e), file=sys.stderr) sys.exit(-1) try: - from sovrin_node import * + from indy_node import * except ImportError as e: - print("Sovrin Node is required for this guild, " - "see doc for installing Sovrin Node.", file=sys.stderr) + print("Indy Node is required for this guild, " + "see doc for installing Indy Node.", file=sys.stderr) print(str(e), file=sys.stderr) sys.exit(-1) -from sovrin_client.test.agent.acme import create_acme, bootstrap_acme, ACME_VERKEY, ACME_ID -from sovrin_client.test.agent.faber import create_faber, bootstrap_faber, FABER_VERKEY, FABER_ID -from sovrin_client.test.agent.thrift import create_thrift, bootstrap_thrift, THRIFT_VERKEY, THRIFT_ID -from sovrin_common.constants import TRUST_ANCHOR -from sovrin_common.identity import Identity +from indy_client.test.agent.acme import create_acme, bootstrap_acme, ACME_VERKEY, ACME_ID +from indy_client.test.agent.faber import create_faber, bootstrap_faber, FABER_VERKEY, FABER_ID +from indy_client.test.agent.thrift import create_thrift, bootstrap_thrift, THRIFT_VERKEY, THRIFT_ID +from indy_common.constants import TRUST_ANCHOR +from indy_common.identity import Identity # noinspection PyUnresolvedReferences -from sovrin_node.pool.local_pool import create_local_pool +from indy_node.pool.local_pool import create_local_pool # noinspection PyUnresolvedReferences -from sovrin_client.agent.walleted_agent import WalletedAgent +from indy_client.agent.walleted_agent import WalletedAgent # noinspection PyUnresolvedReferences -from sovrin_client.client.wallet.wallet import Wallet +from indy_client.client.wallet.wallet import Wallet # noinspection PyUnresolvedReferences from logging import Formatter diff --git a/sovrin_client/test/training/test_getting_started_guide.py b/indy_client/test/training/test_getting_started_guide.py similarity index 97% rename from sovrin_client/test/training/test_getting_started_guide.py rename to indy_client/test/training/test_getting_started_guide.py index 002a448be..1914aa987 100644 --- a/sovrin_client/test/training/test_getting_started_guide.py +++ b/indy_client/test/training/test_getting_started_guide.py @@ -1,9 +1,9 @@ import pytest -from sovrin_client.test.training.getting_started_future import * +from indy_client.test.training.getting_started_future import * # noinspection PyUnresolvedReferences -from sovrin_node.test.conftest import tconf +from indy_node.test.conftest import tconf def getting_started(base_dir=None): diff --git a/sovrin_client/test/waits.py b/indy_client/test/waits.py similarity index 100% rename from sovrin_client/test/waits.py rename to indy_client/test/waits.py diff --git a/sovrin_client/utils/__init__.py b/indy_client/utils/__init__.py similarity index 100% rename from sovrin_client/utils/__init__.py rename to indy_client/utils/__init__.py diff --git a/sovrin_client/utils/user_scenarios.py b/indy_client/utils/user_scenarios.py similarity index 97% rename from sovrin_client/utils/user_scenarios.py rename to indy_client/utils/user_scenarios.py index ef458ecd5..41f114df4 100644 --- a/sovrin_client/utils/user_scenarios.py +++ b/indy_client/utils/user_scenarios.py @@ -13,10 +13,10 @@ from plenum.common.constants import TXN_TYPE, TARGET_NYM, VERKEY, DATA from plenum.common.signer_simple import SimpleSigner -from sovrin_client.client.client import Client -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_common.constants import NYM, GET_NYM -from sovrin_common.config_util import getConfig +from indy_client.client.client import Client +from indy_client.client.wallet.wallet import Wallet +from indy_common.constants import NYM, GET_NYM +from indy_common.config_util import getConfig logger = getlogger() diff --git a/sovrin_common/__init__.py b/indy_common/__init__.py similarity index 100% rename from sovrin_common/__init__.py rename to indy_common/__init__.py diff --git a/sovrin_common/auth.py b/indy_common/auth.py similarity index 96% rename from sovrin_common/auth.py rename to indy_common/auth.py index ee93ca6bd..bcd1c6241 100644 --- a/sovrin_common/auth.py +++ b/indy_common/auth.py @@ -1,7 +1,7 @@ from plenum.common.constants import TRUSTEE, STEWARD, NODE from stp_core.common.log import getlogger -from sovrin_common.constants import OWNER, POOL_UPGRADE, TGB, TRUST_ANCHOR, NYM, POOL_CONFIG -from sovrin_common.roles import Roles +from indy_common.constants import OWNER, POOL_UPGRADE, TGB, TRUST_ANCHOR, NYM, POOL_CONFIG +from indy_common.roles import Roles logger = getlogger() diff --git a/sovrin_common/config.py b/indy_common/config.py similarity index 95% rename from sovrin_common/config.py rename to indy_common/config.py index ec9cea50b..1bd068c03 100644 --- a/sovrin_common/config.py +++ b/indy_common/config.py @@ -5,7 +5,7 @@ from plenum.common.constants import ClientBootStrategy, HS_LEVELDB, KeyValueStorageType from plenum.config import pool_transactions_file_base, domain_transactions_file_base -from sovrin_common.constants import Environment +from indy_common.constants import Environment nodeReg = OrderedDict([ ('Alpha', ('127.0.0.1', 9701)), @@ -21,7 +21,7 @@ ('DeltaC', ('127.0.0.1', 9708)) ]) -baseDir = "~/.sovrin" +baseDir = "~/.indy" ENVS = { "test": Environment(pool_transactions_file_base + "_sandbox", @@ -65,7 +65,7 @@ PluginsToLoad = [] -# TODO: This should be in sovrin_node's config +# TODO: This should be in indy_node's config # File that stores the version of the Node ran the last time it started. (It # might be incorrect sometimes if Node failed to update the file and crashed) diff --git a/sovrin_common/config_util.py b/indy_common/config_util.py similarity index 81% rename from sovrin_common/config_util.py rename to indy_common/config_util.py index 410a8e932..6e6376309 100644 --- a/sovrin_common/config_util.py +++ b/indy_common/config_util.py @@ -24,13 +24,13 @@ def getConfig(homeDir=None): global CONFIG if not CONFIG: plenumConfig = PlenumConfig(homeDir) - sovrinConfig = import_module("sovrin_common.config") + indyConfig = import_module("indy_common.config") refConfig = plenumConfig - refConfig.__dict__.update(sovrinConfig.__dict__) + refConfig.__dict__.update(indyConfig.__dict__) try: homeDir = os.path.expanduser(homeDir or "~") - configDir = os.path.join(homeDir, ".sovrin") - config = getInstalledConfig(configDir, "sovrin_config.py") + configDir = os.path.join(homeDir, ".indy") + config = getInstalledConfig(configDir, "indy_config.py") refConfig.__dict__.update(config.__dict__) except FileNotFoundError: pass diff --git a/sovrin_common/constants.py b/indy_common/constants.py similarity index 75% rename from sovrin_common/constants.py rename to indy_common/constants.py index cc31b006a..5ff12dc4c 100644 --- a/sovrin_common/constants.py +++ b/indy_common/constants.py @@ -2,8 +2,8 @@ from plenum.common.constants import TXN_TYPE, TARGET_NYM, ORIGIN, DATA, RAW, \ ENC, HASH, NAME, VERSION, TYPE, POOL_TXN_TYPES, ALIAS, VERKEY, FORCE -from sovrin_common.roles import Roles -from sovrin_common.transactions import SovrinTransactions +from indy_common.roles import Roles +from indy_common.transactions import IndyTransactions Environment = NamedTuple("Environment", [ ("poolLedger", str), @@ -78,22 +78,22 @@ TGB = Roles.TGB.value # client transaction types -NODE = SovrinTransactions.NODE.value -NYM = SovrinTransactions.NYM.value -ATTRIB = SovrinTransactions.ATTRIB.value -SCHEMA = SovrinTransactions.SCHEMA.value -CLAIM_DEF = SovrinTransactions.CLAIM_DEF.value -DISCLO = SovrinTransactions.DISCLO.value -GET_ATTR = SovrinTransactions.GET_ATTR.value -GET_NYM = SovrinTransactions.GET_NYM.value -GET_TXNS = SovrinTransactions.GET_TXNS.value -GET_SCHEMA = SovrinTransactions.GET_SCHEMA.value -GET_CLAIM_DEF = SovrinTransactions.GET_CLAIM_DEF.value - -POOL_UPGRADE = SovrinTransactions.POOL_UPGRADE.value -NODE_UPGRADE = SovrinTransactions.NODE_UPGRADE.value - -POOL_CONFIG = SovrinTransactions.POOL_CONFIG.value +NODE = IndyTransactions.NODE.value +NYM = IndyTransactions.NYM.value +ATTRIB = IndyTransactions.ATTRIB.value +SCHEMA = IndyTransactions.SCHEMA.value +CLAIM_DEF = IndyTransactions.CLAIM_DEF.value +DISCLO = IndyTransactions.DISCLO.value +GET_ATTR = IndyTransactions.GET_ATTR.value +GET_NYM = IndyTransactions.GET_NYM.value +GET_TXNS = IndyTransactions.GET_TXNS.value +GET_SCHEMA = IndyTransactions.GET_SCHEMA.value +GET_CLAIM_DEF = IndyTransactions.GET_CLAIM_DEF.value + +POOL_UPGRADE = IndyTransactions.POOL_UPGRADE.value +NODE_UPGRADE = IndyTransactions.NODE_UPGRADE.value + +POOL_CONFIG = IndyTransactions.POOL_CONFIG.value openTxns = (GET_NYM, GET_ATTR, GET_SCHEMA, GET_CLAIM_DEF, GET_TXNS) diff --git a/indy_common/did_method.py b/indy_common/did_method.py new file mode 100644 index 000000000..e9756aefe --- /dev/null +++ b/indy_common/did_method.py @@ -0,0 +1,5 @@ +from plenum.common.did_method import DidMethod +from plenum.common.did_method import DidMethods + +IndyDidMethod = DidMethod('indy', 'did:indy:') +DefaultDidMethods = DidMethods(IndyDidMethod) diff --git a/sovrin_common/exceptions.py b/indy_common/exceptions.py similarity index 100% rename from sovrin_common/exceptions.py rename to indy_common/exceptions.py diff --git a/sovrin_common/generates_request.py b/indy_common/generates_request.py similarity index 100% rename from sovrin_common/generates_request.py rename to indy_common/generates_request.py diff --git a/sovrin_common/identity.py b/indy_common/identity.py similarity index 93% rename from sovrin_common/identity.py rename to indy_common/identity.py index 74ede9792..03a96a169 100644 --- a/sovrin_common/identity.py +++ b/indy_common/identity.py @@ -1,11 +1,11 @@ from plenum.common.constants import TARGET_NYM, TXN_TYPE, NYM, ROLE, VERKEY from plenum.common.signer_did import DidIdentity from stp_core.types import Identifier -from sovrin_common.auth import Authoriser +from indy_common.auth import Authoriser -from sovrin_common.generates_request import GeneratesRequest -from sovrin_common.constants import GET_NYM, NULL -from sovrin_common.types import Request +from indy_common.generates_request import GeneratesRequest +from indy_common.constants import GET_NYM, NULL +from indy_common.types import Request class Identity(GeneratesRequest): diff --git a/sovrin_common/init_util.py b/indy_common/init_util.py similarity index 91% rename from sovrin_common/init_util.py rename to indy_common/init_util.py index 95d29f680..158d99062 100644 --- a/sovrin_common/init_util.py +++ b/indy_common/init_util.py @@ -1,6 +1,6 @@ from plenum.common.init_util import initialize_node_environment as \ p_initialize_node_environment, cleanup_environment -from sovrin_common.config_util import getConfig +from indy_common.config_util import getConfig def initialize_node_environment(name, base_dir, sigseed=None, diff --git a/indy_common/plugin_helper.py b/indy_common/plugin_helper.py new file mode 100644 index 000000000..456bee8c2 --- /dev/null +++ b/indy_common/plugin_helper.py @@ -0,0 +1,69 @@ +import os + +from indy_common.config_util import getConfig + + +def writeAnonCredPlugin(baseDir, reloadTestModules: bool=False): + config = getConfig() + pluginsPath = os.path.expanduser(os.path.join(baseDir, config.PluginsDir)) + + if not os.path.exists(pluginsPath): + os.makedirs(pluginsPath) + + initFile = pluginsPath + "/__init__.py" + with open(initFile, "a"): + pass + + anonPluginFilePath = pluginsPath + "/anoncreds.py" + anonPluginContent = "" \ + "import importlib\n" \ + "\n" \ + "import anoncreds.protocol.issuer\n" \ + "import anoncreds.protocol.verifier\n" \ + "import anoncreds.protocol.prover\n" \ + "\n" \ + "import indy_client.anon_creds.issuer\n" \ + "import indy_client.anon_creds.verifier\n"\ + "import indy_client.anon_creds.prover\n" \ + "\n" \ + "Name = \"Anon creds\"\n" \ + "Version = 1.1\n" \ + "IndyVersion = 1.1\n" \ + "\n" \ + "indy_client.anon_creds.issuer.Credential = anoncreds.protocol.types.Credential\n" \ + "indy_client.anon_creds.issuer.AttribType = anoncreds.protocol.types.AttribType\n" \ + "indy_client.anon_creds.issuer.AttribDef = anoncreds.protocol.types.AttribDef\n" \ + "indy_client.anon_creds.issuer.Attribs = anoncreds.protocol.types.Attribs\n" \ + "indy_client.anon_creds.issuer.AttrRepo = anoncreds.protocol.attribute_repo.AttrRepo\n" \ + "indy_client.anon_creds.issuer.InMemoryAttrRepo = anoncreds.protocol.attribute_repo.InMemoryAttrRepo\n" \ + "indy_client.anon_creds.issuer.Issuer = anoncreds.protocol.issuer.Issuer\n" \ + "indy_client.anon_creds.prover.Prover = anoncreds.protocol.prover.Prover\n" \ + "indy_client.anon_creds.verifier.Verifier = anoncreds.protocol.verifier.Verifier\n" \ + "indy_client.anon_creds.proof_builder.ProofBuilder = anoncreds.protocol.proof_builder.ProofBuilder\n" \ + "indy_client.anon_creds.proof_builder.Proof = anoncreds.protocol.types.Proof\n" \ + "indy_client.anon_creds.cred_def.CredDef = anoncreds.protocol.credential_definition.CredentialDefinition\n" \ + + modules_to_reload = ["indy_client.cli.cli"] + test_modules_to_reload = [ + "indy_client.test.helper", "indy_client.test.cli.helper", + "indy_client.test.anon_creds.conftest", + "indy_client.test.anon_creds.test_anon_creds", + # "indy_client.test.anon_creds.anon_creds_demo" + ] + + if reloadTestModules: + modules_to_reload.extend(test_modules_to_reload) + + reload_module_code = \ + "reload_modules = " + str(modules_to_reload) + "\n" \ + "for m in reload_modules:\n" \ + " try:\n" \ + " module_obj = importlib.import_module(m)\n" \ + " importlib.reload(module_obj)\n" \ + " except AttributeError as ae:\n" \ + " print(\"Plugin loading failed: module {}, detail: {}\".format(m, str(ae)))\n" \ + "\n" + + anonPluginContent += reload_module_code + with open(anonPluginFilePath, "w") as f: + f.write(anonPluginContent) diff --git a/sovrin_common/pool/__init__.py b/indy_common/pool/__init__.py similarity index 100% rename from sovrin_common/pool/__init__.py rename to indy_common/pool/__init__.py diff --git a/sovrin_common/pool/pool.py b/indy_common/pool/pool.py similarity index 100% rename from sovrin_common/pool/pool.py rename to indy_common/pool/pool.py diff --git a/sovrin_common/roles.py b/indy_common/roles.py similarity index 100% rename from sovrin_common/roles.py rename to indy_common/roles.py diff --git a/sovrin_common/serialization.py b/indy_common/serialization.py similarity index 100% rename from sovrin_common/serialization.py rename to indy_common/serialization.py diff --git a/sovrin_common/setup_util.py b/indy_common/setup_util.py similarity index 95% rename from sovrin_common/setup_util.py rename to indy_common/setup_util.py index 4d43a1f89..ff79558d9 100644 --- a/sovrin_common/setup_util.py +++ b/indy_common/setup_util.py @@ -5,7 +5,7 @@ from ledger.genesis_txn.genesis_txn_file_util import genesis_txn_file -from sovrin_common.constants import Environment +from indy_common.constants import Environment class Setup: @@ -62,7 +62,7 @@ def setupSampleInvites(self): sdir = os.path.dirname(sample.__file__) sidir = os.path.join(self.base_dir, "sample") os.makedirs(sidir, exist_ok=True) - files = glob.iglob(os.path.join(sdir, "*.sovrin")) + files = glob.iglob(os.path.join(sdir, "*.indy")) for file in files: if os.path.isfile(file): shutil.copy2(file, sidir) diff --git a/sovrin_common/state/__init__.py b/indy_common/state/__init__.py similarity index 100% rename from sovrin_common/state/__init__.py rename to indy_common/state/__init__.py diff --git a/sovrin_common/state/domain.py b/indy_common/state/domain.py similarity index 97% rename from sovrin_common/state/domain.py rename to indy_common/state/domain.py index bbdafe444..4f4717301 100644 --- a/sovrin_common/state/domain.py +++ b/indy_common/state/domain.py @@ -3,8 +3,8 @@ from common.serializers.serialization import domain_state_serializer from plenum.common.constants import RAW, ENC, HASH, TXN_TIME, TXN_TYPE, TARGET_NYM, DATA, NAME, VERSION from plenum.common.types import f -from sovrin_common.serialization import attrib_raw_data_serializer -from sovrin_common.constants import ATTRIB, GET_ATTR, REF, SIGNATURE_TYPE +from indy_common.serialization import attrib_raw_data_serializer +from indy_common.constants import ATTRIB, GET_ATTR, REF, SIGNATURE_TYPE MARKER_ATTR = "\01" MARKER_SCHEMA = "\02" diff --git a/sovrin_common/strict_types.py b/indy_common/strict_types.py similarity index 100% rename from sovrin_common/strict_types.py rename to indy_common/strict_types.py diff --git a/sovrin_common/test/__init__.py b/indy_common/test/__init__.py similarity index 100% rename from sovrin_common/test/__init__.py rename to indy_common/test/__init__.py diff --git a/indy_common/test/__main__.py b/indy_common/test/__main__.py new file mode 100644 index 000000000..926bf5428 --- /dev/null +++ b/indy_common/test/__main__.py @@ -0,0 +1,3 @@ +from indy_common import test + +test.run() diff --git a/sovrin_common/test/conftest.py b/indy_common/test/conftest.py similarity index 85% rename from sovrin_common/test/conftest.py rename to indy_common/test/conftest.py index 584fac1c8..c77272cec 100644 --- a/sovrin_common/test/conftest.py +++ b/indy_common/test/conftest.py @@ -1,9 +1,9 @@ import pytest import logging -from sovrin_common import strict_types -from sovrin_common.config_util import getConfig -from sovrin_common.txn_util import getTxnOrderedFields +from indy_common import strict_types +from indy_common.config_util import getConfig +from indy_common.txn_util import getTxnOrderedFields from stp_core.common.log import getlogger # typecheck during tests diff --git a/sovrin_common/test/helper.py b/indy_common/test/helper.py similarity index 100% rename from sovrin_common/test/helper.py rename to indy_common/test/helper.py diff --git a/sovrin_common/test/test_roles.py b/indy_common/test/test_roles.py similarity index 90% rename from sovrin_common/test/test_roles.py rename to indy_common/test/test_roles.py index 105256b73..7b97da1e4 100644 --- a/sovrin_common/test/test_roles.py +++ b/indy_common/test/test_roles.py @@ -1,6 +1,6 @@ from plenum.common.constants import STEWARD, TRUSTEE -from sovrin_common.constants import TGB, TRUST_ANCHOR -from sovrin_common.roles import Roles +from indy_common.constants import TGB, TRUST_ANCHOR +from indy_common.roles import Roles def testRolesAreEncoded(): diff --git a/sovrin_common/test/test_strict_types.py b/indy_common/test/test_strict_types.py similarity index 95% rename from sovrin_common/test/test_strict_types.py rename to indy_common/test/test_strict_types.py index f80dbc60a..0044a0303 100644 --- a/sovrin_common/test/test_strict_types.py +++ b/indy_common/test/test_strict_types.py @@ -1,7 +1,7 @@ import pytest import typing -from sovrin_common.strict_types import strict_types, decClassMethods +from indy_common.strict_types import strict_types, decClassMethods @strict_types() diff --git a/indy_common/test/test_transactions.py b/indy_common/test/test_transactions.py new file mode 100644 index 000000000..6c1c0f669 --- /dev/null +++ b/indy_common/test/test_transactions.py @@ -0,0 +1,58 @@ +from indy_common.constants import NYM, NODE, ATTRIB, SCHEMA, CLAIM_DEF, DISCLO, GET_ATTR, GET_NYM, GET_TXNS, \ + GET_SCHEMA, GET_CLAIM_DEF, POOL_UPGRADE, NODE_UPGRADE, POOL_CONFIG +from indy_common.transactions import IndyTransactions + + +def testTransactionsAreEncoded(): + assert NODE == "0" + assert NYM == "1" + assert GET_TXNS == "3" + assert ATTRIB == "100" + assert SCHEMA == "101" + assert CLAIM_DEF == "102" + assert DISCLO == "103" + assert GET_ATTR == "104" + assert GET_NYM == "105" + assert GET_SCHEMA == "107" + assert GET_CLAIM_DEF == "108" + assert POOL_UPGRADE == "109" + assert NODE_UPGRADE == "110" + assert POOL_CONFIG == "111" + + +def testTransactionEnumDecoded(): + assert IndyTransactions.NODE.name == "NODE" + assert IndyTransactions.NYM.name == "NYM" + + assert IndyTransactions.ATTRIB.name == "ATTRIB" + assert IndyTransactions.SCHEMA.name == "SCHEMA" + assert IndyTransactions.CLAIM_DEF.name == "CLAIM_DEF" + + assert IndyTransactions.DISCLO.name == "DISCLO" + assert IndyTransactions.GET_ATTR.name == "GET_ATTR" + assert IndyTransactions.GET_NYM.name == "GET_NYM" + assert IndyTransactions.GET_TXNS.name == "GET_TXNS" + assert IndyTransactions.GET_SCHEMA.name == "GET_SCHEMA" + assert IndyTransactions.GET_CLAIM_DEF.name == "GET_CLAIM_DEF" + assert IndyTransactions.POOL_UPGRADE.name == "POOL_UPGRADE" + assert IndyTransactions.NODE_UPGRADE.name == "NODE_UPGRADE" + assert IndyTransactions.POOL_CONFIG.name == "POOL_CONFIG" + + +def testTransactionEnumEncoded(): + assert IndyTransactions.NODE.value == "0" + assert IndyTransactions.NYM.value == "1" + assert IndyTransactions.GET_TXNS.value == "3" + + assert IndyTransactions.ATTRIB.value == "100" + assert IndyTransactions.SCHEMA.value == "101" + assert IndyTransactions.CLAIM_DEF.value == "102" + + assert IndyTransactions.DISCLO.value == "103" + assert IndyTransactions.GET_ATTR.value == "104" + assert IndyTransactions.GET_NYM.value == "105" + assert IndyTransactions.GET_SCHEMA.value == "107" + assert IndyTransactions.GET_CLAIM_DEF.value == "108" + assert IndyTransactions.POOL_UPGRADE.value == "109" + assert IndyTransactions.NODE_UPGRADE.value == "110" + assert IndyTransactions.POOL_CONFIG.value == "111" diff --git a/sovrin_common/test/test_util.py b/indy_common/test/test_util.py similarity index 90% rename from sovrin_common/test/test_util.py rename to indy_common/test/test_util.py index 8cae685b5..73f2b55d9 100644 --- a/sovrin_common/test/test_util.py +++ b/indy_common/test/test_util.py @@ -1,5 +1,5 @@ from operator import itemgetter -from sovrin_common.util import getIndex +from indy_common.util import getIndex def test_getIndex(): diff --git a/sovrin_common/test/types/__init__.py b/indy_common/test/types/__init__.py similarity index 100% rename from sovrin_common/test/types/__init__.py rename to indy_common/test/types/__init__.py diff --git a/sovrin_common/test/types/test_attrib.py b/indy_common/test/types/test_attrib.py similarity index 97% rename from sovrin_common/test/types/test_attrib.py rename to indy_common/test/types/test_attrib.py index e5d075b8d..31e2134f3 100644 --- a/sovrin_common/test/types/test_attrib.py +++ b/indy_common/test/types/test_attrib.py @@ -2,12 +2,12 @@ import pytest from plenum.common.constants import TARGET_NYM, RAW, ENC, HASH -from sovrin_common.constants import TXN_TYPE, allOpKeys, ATTRIB, GET_ATTR, \ +from indy_common.constants import TXN_TYPE, allOpKeys, ATTRIB, GET_ATTR, \ DATA, GET_NYM, reqOpKeys, GET_TXNS, GET_SCHEMA, GET_CLAIM_DEF, ACTION, \ NODE_UPGRADE, COMPLETE, FAIL, CONFIG_LEDGER_ID, POOL_UPGRADE, POOL_CONFIG, \ IN_PROGRESS, DISCLO, ATTR_NAMES, REVOCATION, SCHEMA, ENDPOINT, CLAIM_DEF, REF, SIGNATURE_TYPE, SCHEDULE, SHA256, \ TIMEOUT, JUSTIFICATION, JUSTIFICATION_MAX_SIZE, REINSTALL, WRITES -from sovrin_common.types import ClientAttribOperation +from indy_common.types import ClientAttribOperation validator = ClientAttribOperation() diff --git a/sovrin_common/test/types/test_attrib_schema.py b/indy_common/test/types/test_attrib_schema.py similarity index 93% rename from sovrin_common/test/types/test_attrib_schema.py rename to indy_common/test/types/test_attrib_schema.py index 5ffac2710..dfd4a25e2 100644 --- a/sovrin_common/test/types/test_attrib_schema.py +++ b/indy_common/test/types/test_attrib_schema.py @@ -1,5 +1,5 @@ import pytest -from sovrin_common.types import ClientAttribOperation +from indy_common.types import ClientAttribOperation from collections import OrderedDict from plenum.common.messages.fields import ConstantField, LimitedLengthStringField, IdentifierField, JsonField diff --git a/sovrin_common/test/types/test_claim_def_get_schema.py b/indy_common/test/types/test_claim_def_get_schema.py similarity index 92% rename from sovrin_common/test/types/test_claim_def_get_schema.py rename to indy_common/test/types/test_claim_def_get_schema.py index 3252d488a..8e2e2b126 100644 --- a/sovrin_common/test/types/test_claim_def_get_schema.py +++ b/indy_common/test/types/test_claim_def_get_schema.py @@ -1,5 +1,5 @@ import pytest -from sovrin_common.types import ClientClaimDefGetOperation +from indy_common.types import ClientClaimDefGetOperation from collections import OrderedDict from plenum.common.messages.fields import ConstantField, LimitedLengthStringField, TxnSeqNoField diff --git a/sovrin_common/test/types/test_claim_def_sub_schema.py b/indy_common/test/types/test_claim_def_sub_schema.py similarity index 90% rename from sovrin_common/test/types/test_claim_def_sub_schema.py rename to indy_common/test/types/test_claim_def_sub_schema.py index cf04ac063..7c195bb1d 100644 --- a/sovrin_common/test/types/test_claim_def_sub_schema.py +++ b/indy_common/test/types/test_claim_def_sub_schema.py @@ -1,5 +1,5 @@ import pytest -from sovrin_common.types import ClientClaimDefSubmitOperation, ClaimDefField +from indy_common.types import ClientClaimDefSubmitOperation, ClaimDefField from collections import OrderedDict from plenum.common.messages.fields import ConstantField, LimitedLengthStringField, TxnSeqNoField diff --git a/sovrin_common/test/types/test_discl_schema.py b/indy_common/test/types/test_discl_schema.py similarity index 92% rename from sovrin_common/test/types/test_discl_schema.py rename to indy_common/test/types/test_discl_schema.py index 136982aef..03cebea22 100644 --- a/sovrin_common/test/types/test_discl_schema.py +++ b/indy_common/test/types/test_discl_schema.py @@ -1,5 +1,5 @@ import pytest -from sovrin_common.types import ClientDiscloOperation +from indy_common.types import ClientDiscloOperation from collections import OrderedDict from plenum.common.messages.fields import ConstantField, LimitedLengthStringField, IdentifierField diff --git a/sovrin_common/test/types/test_get_attrib_schema.py b/indy_common/test/types/test_get_attrib_schema.py similarity index 92% rename from sovrin_common/test/types/test_get_attrib_schema.py rename to indy_common/test/types/test_get_attrib_schema.py index 75f327b59..dc0390bf2 100644 --- a/sovrin_common/test/types/test_get_attrib_schema.py +++ b/indy_common/test/types/test_get_attrib_schema.py @@ -1,5 +1,5 @@ import pytest -from sovrin_common.types import ClientGetAttribOperation +from indy_common.types import ClientGetAttribOperation from collections import OrderedDict from plenum.common.messages.fields import ConstantField, LimitedLengthStringField, IdentifierField diff --git a/sovrin_common/test/types/test_get_nym_schema.py b/indy_common/test/types/test_get_nym_schema.py similarity index 91% rename from sovrin_common/test/types/test_get_nym_schema.py rename to indy_common/test/types/test_get_nym_schema.py index e92e7067d..fba4698d2 100644 --- a/sovrin_common/test/types/test_get_nym_schema.py +++ b/indy_common/test/types/test_get_nym_schema.py @@ -1,5 +1,5 @@ import pytest -from sovrin_common.types import ClientGetNymOperation +from indy_common.types import ClientGetNymOperation from collections import OrderedDict from plenum.common.messages.fields import ConstantField, IdentifierField diff --git a/sovrin_common/test/types/test_get_schema_schema.py b/indy_common/test/types/test_get_schema_schema.py similarity index 93% rename from sovrin_common/test/types/test_get_schema_schema.py rename to indy_common/test/types/test_get_schema_schema.py index e08282ee7..989988135 100644 --- a/sovrin_common/test/types/test_get_schema_schema.py +++ b/indy_common/test/types/test_get_schema_schema.py @@ -1,5 +1,5 @@ import pytest -from sovrin_common.types import SchemaField, ClientGetSchemaOperation, GetSchemaField +from indy_common.types import SchemaField, ClientGetSchemaOperation, GetSchemaField from collections import OrderedDict from plenum.common.messages.fields import ConstantField, IdentifierField, VersionField, LimitedLengthStringField diff --git a/sovrin_common/test/types/test_pool_config_schema.py b/indy_common/test/types/test_pool_config_schema.py similarity index 91% rename from sovrin_common/test/types/test_pool_config_schema.py rename to indy_common/test/types/test_pool_config_schema.py index c2d8e6866..a8a1dc394 100644 --- a/sovrin_common/test/types/test_pool_config_schema.py +++ b/indy_common/test/types/test_pool_config_schema.py @@ -1,5 +1,5 @@ import pytest -from sovrin_common.types import ClientPoolConfigOperation +from indy_common.types import ClientPoolConfigOperation from collections import OrderedDict from plenum.common.messages.fields import ConstantField, BooleanField diff --git a/sovrin_common/test/types/test_pool_upg_schema.py b/indy_common/test/types/test_pool_upg_schema.py similarity index 94% rename from sovrin_common/test/types/test_pool_upg_schema.py rename to indy_common/test/types/test_pool_upg_schema.py index dca627f9f..540ca792b 100644 --- a/sovrin_common/test/types/test_pool_upg_schema.py +++ b/indy_common/test/types/test_pool_upg_schema.py @@ -1,5 +1,5 @@ import pytest -from sovrin_common.types import ClientPoolUpgradeOperation +from indy_common.types import ClientPoolUpgradeOperation from collections import OrderedDict from plenum.common.messages.fields import ConstantField, ChooseField, VersionField, MapField, Sha256HexField, \ NonNegativeNumberField, LimitedLengthStringField, BooleanField diff --git a/sovrin_common/test/types/test_schema_schema.py b/indy_common/test/types/test_schema_schema.py similarity index 94% rename from sovrin_common/test/types/test_schema_schema.py rename to indy_common/test/types/test_schema_schema.py index aebbae167..24c0e331c 100644 --- a/sovrin_common/test/types/test_schema_schema.py +++ b/indy_common/test/types/test_schema_schema.py @@ -1,5 +1,5 @@ import pytest -from sovrin_common.types import ClientSchemaOperation, SchemaField +from indy_common.types import ClientSchemaOperation, SchemaField from collections import OrderedDict from plenum.common.messages.fields import ConstantField, VersionField, IterableField, LimitedLengthStringField diff --git a/sovrin_common/transactions.py b/indy_common/transactions.py similarity index 95% rename from sovrin_common/transactions.py rename to indy_common/transactions.py index f118c53bf..e8631eb73 100644 --- a/sovrin_common/transactions.py +++ b/indy_common/transactions.py @@ -3,7 +3,7 @@ from plenum.common.transactions import PlenumTransactions -class SovrinTransactions(Enum): +class IndyTransactions(Enum): # These numeric constants CANNOT be changed once they have been used, # because that would break backwards compatibility with the ledger # Also the numeric constants CANNOT collide with transactions in plenum diff --git a/sovrin_common/txn_util.py b/indy_common/txn_util.py similarity index 99% rename from sovrin_common/txn_util.py rename to indy_common/txn_util.py index 2a97fb9cf..86ff6c560 100644 --- a/sovrin_common/txn_util.py +++ b/indy_common/txn_util.py @@ -5,7 +5,7 @@ DATA, ENC, RAW, HASH, ALIAS, TXN_ID, TRUSTEE, STEWARD, \ TXN_TIME, VERKEY from plenum.common.types import f -from sovrin_common.constants import NYM, ATTRIB, GET_ATTR, \ +from indy_common.constants import NYM, ATTRIB, GET_ATTR, \ ROLE, REF, TRUST_ANCHOR, SIGNATURE_TYPE diff --git a/sovrin_common/types.py b/indy_common/types.py similarity index 99% rename from sovrin_common/types.py rename to indy_common/types.py index c7def5c2d..2e60e2912 100644 --- a/sovrin_common/types.py +++ b/indy_common/types.py @@ -19,7 +19,7 @@ from plenum.config import JSON_FIELD_LIMIT, NAME_FIELD_LIMIT, DATA_FIELD_LIMIT, NONCE_FIELD_LIMIT, ORIGIN_FIELD_LIMIT, \ ENC_FIELD_LIMIT, RAW_FIELD_LIMIT, SIGNATURE_TYPE_FIELD_LIMIT, HASH_FIELD_LIMIT -from sovrin_common.constants import TXN_TYPE, allOpKeys, ATTRIB, GET_ATTR, \ +from indy_common.constants import TXN_TYPE, allOpKeys, ATTRIB, GET_ATTR, \ DATA, GET_NYM, reqOpKeys, GET_TXNS, GET_SCHEMA, GET_CLAIM_DEF, ACTION, \ NODE_UPGRADE, COMPLETE, FAIL, CONFIG_LEDGER_ID, POOL_UPGRADE, POOL_CONFIG, \ IN_PROGRESS, DISCLO, ATTR_NAMES, REVOCATION, SCHEMA, ENDPOINT, CLAIM_DEF, REF, SIGNATURE_TYPE, SCHEDULE, SHA256, \ diff --git a/sovrin_common/util.py b/indy_common/util.py similarity index 100% rename from sovrin_common/util.py rename to indy_common/util.py diff --git a/sovrin_node/__init__.py b/indy_node/__init__.py similarity index 66% rename from sovrin_node/__init__.py rename to indy_node/__init__.py index ef39d90bf..c75e33547 100644 --- a/sovrin_node/__init__.py +++ b/indy_node/__init__.py @@ -1,3 +1,3 @@ -import sovrin_node +import indy_node from .__metadata__ import * # noqa diff --git a/sovrin_node/__metadata__.py b/indy_node/__metadata__.py similarity index 88% rename from sovrin_node/__metadata__.py rename to indy_node/__metadata__.py index 7408f3767..290a74776 100644 --- a/sovrin_node/__metadata__.py +++ b/indy_node/__metadata__.py @@ -1,5 +1,5 @@ """ -sovrin-node package metadata +indy-node package metadata """ __version_info__ = (1, 1) __version__ = '.'.join(map(str, __version_info__)) diff --git a/sovrin_node/persistence/__init__.py b/indy_node/persistence/__init__.py similarity index 100% rename from sovrin_node/persistence/__init__.py rename to indy_node/persistence/__init__.py diff --git a/sovrin_node/persistence/attribute_store.py b/indy_node/persistence/attribute_store.py similarity index 100% rename from sovrin_node/persistence/attribute_store.py rename to indy_node/persistence/attribute_store.py diff --git a/sovrin_node/persistence/idr_cache.py b/indy_node/persistence/idr_cache.py similarity index 99% rename from sovrin_node/persistence/idr_cache.py rename to indy_node/persistence/idr_cache.py index c10c86c91..82c9f7d55 100644 --- a/sovrin_node/persistence/idr_cache.py +++ b/indy_node/persistence/idr_cache.py @@ -5,7 +5,7 @@ from plenum.common.types import f from storage.kv_store import KeyValueStorage -from sovrin_common.constants import ROLE, TGB, TRUST_ANCHOR +from indy_common.constants import ROLE, TGB, TRUST_ANCHOR from stp_core.common.log import getlogger logger = getlogger() diff --git a/sovrin_node/pool/__init__.py b/indy_node/pool/__init__.py similarity index 100% rename from sovrin_node/pool/__init__.py rename to indy_node/pool/__init__.py diff --git a/sovrin_node/pool/local_pool.py b/indy_node/pool/local_pool.py similarity index 92% rename from sovrin_node/pool/local_pool.py rename to indy_node/pool/local_pool.py index 82cd3413d..80dbe3e2a 100644 --- a/sovrin_node/pool/local_pool.py +++ b/indy_node/pool/local_pool.py @@ -6,14 +6,14 @@ from plenum.common.member.steward import Steward from plenum.common.test_network_setup import TestNetworkSetup from plenum.common.util import adict, randomString -from sovrin_client.agent.walleted_agent import WalletedAgent -from sovrin_client.client.client import Client -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_common.config_util import getConfig -from sovrin_common.init_util import initialize_node_environment -from sovrin_common.pool.pool import Pool -from sovrin_common.txn_util import getTxnOrderedFields -from sovrin_node.server.node import Node +from indy_client.agent.walleted_agent import WalletedAgent +from indy_client.client.client import Client +from indy_client.client.wallet.wallet import Wallet +from indy_common.config_util import getConfig +from indy_common.init_util import initialize_node_environment +from indy_common.pool.pool import Pool +from indy_common.txn_util import getTxnOrderedFields +from indy_node.server.node import Node from stp_core.crypto.util import randomSeed from stp_core.loop.looper import Looper diff --git a/sovrin_node/server/__init__.py b/indy_node/server/__init__.py similarity index 100% rename from sovrin_node/server/__init__.py rename to indy_node/server/__init__.py diff --git a/sovrin_node/server/client_authn.py b/indy_node/server/client_authn.py similarity index 89% rename from sovrin_node/server/client_authn.py rename to indy_node/server/client_authn.py index c5cd8063c..2c004e993 100644 --- a/sovrin_node/server/client_authn.py +++ b/indy_node/server/client_authn.py @@ -6,9 +6,9 @@ from plenum.common.constants import TXN_TYPE, RAW, ENC, HASH, VERKEY from plenum.server.client_authn import NaclAuthNr -from sovrin_common.constants import ATTRIB -from sovrin_node.persistence.idr_cache import IdrCache -# from sovrin_node.persistence.state_tree_store import StateTreeStore +from indy_common.constants import ATTRIB +from indy_node.persistence.idr_cache import IdrCache +# from indy_node.persistence.state_tree_store import StateTreeStore class TxnBasedAuthNr(NaclAuthNr): diff --git a/sovrin_node/server/config_req_handler.py b/indy_node/server/config_req_handler.py similarity index 89% rename from sovrin_node/server/config_req_handler.py rename to indy_node/server/config_req_handler.py index 1502540ac..6d5c9402d 100644 --- a/sovrin_node/server/config_req_handler.py +++ b/indy_node/server/config_req_handler.py @@ -5,14 +5,14 @@ from plenum.common.txn_util import reqToTxn from plenum.server.req_handler import RequestHandler from plenum.common.constants import TXN_TYPE, NAME, VERSION, FORCE -from sovrin_common.auth import Authoriser -from sovrin_common.constants import POOL_UPGRADE, START, CANCEL, SCHEDULE, ACTION, POOL_CONFIG -from sovrin_common.roles import Roles -from sovrin_common.transactions import SovrinTransactions -from sovrin_common.types import Request -from sovrin_node.persistence.idr_cache import IdrCache -from sovrin_node.server.upgrader import Upgrader -from sovrin_node.server.pool_config import PoolConfig +from indy_common.auth import Authoriser +from indy_common.constants import POOL_UPGRADE, START, CANCEL, SCHEDULE, ACTION, POOL_CONFIG +from indy_common.roles import Roles +from indy_common.transactions import IndyTransactions +from indy_common.types import Request +from indy_node.persistence.idr_cache import IdrCache +from indy_node.server.upgrader import Upgrader +from indy_node.server.pool_config import PoolConfig class ConfigReqHandler(RequestHandler): @@ -67,7 +67,7 @@ def validate(self, req: Request, config=None): req.reqId, "Nym {} not added to the ledger yet".format(origin)) if typ == POOL_UPGRADE: - trname = SovrinTransactions.POOL_UPGRADE.name + trname = IndyTransactions.POOL_UPGRADE.name action = operation.get(ACTION) # TODO: Some validation needed for making sure name and version # present @@ -88,7 +88,7 @@ def validate(self, req: Request, config=None): "Upgrade '{}' is already scheduled".format( req.operation.get(NAME))) elif typ == POOL_CONFIG: - trname = SovrinTransactions.POOL_CONFIG.name + trname = IndyTransactions.POOL_CONFIG.name action = None status = None diff --git a/sovrin_node/server/domain_req_handler.py b/indy_node/server/domain_req_handler.py similarity index 97% rename from sovrin_node/server/domain_req_handler.py rename to indy_node/server/domain_req_handler.py index 6a6fad2b1..dcdbd16d0 100644 --- a/sovrin_node/server/domain_req_handler.py +++ b/indy_node/server/domain_req_handler.py @@ -15,15 +15,15 @@ STATE_PROOF, ROOT_HASH, MULTI_SIGNATURE, PROOF_NODES, TXN_TIME from plenum.common.types import f from plenum.server.domain_req_handler import DomainRequestHandler as PHandler -from sovrin_common.auth import Authoriser -from sovrin_common.constants import NYM, ROLE, ATTRIB, SCHEMA, CLAIM_DEF, REF, \ +from indy_common.auth import Authoriser +from indy_common.constants import NYM, ROLE, ATTRIB, SCHEMA, CLAIM_DEF, REF, \ SIGNATURE_TYPE -from sovrin_common.roles import Roles -from sovrin_common.serialization import attrib_raw_data_serializer -from sovrin_common.types import Request +from indy_common.roles import Roles +from indy_common.serialization import attrib_raw_data_serializer +from indy_common.types import Request from stp_core.common.log import getlogger -from sovrin_node.persistence.idr_cache import IdrCache -from sovrin_common.state import domain +from indy_node.persistence.idr_cache import IdrCache +from indy_common.state import domain logger = getlogger() diff --git a/sovrin_node/server/node.py b/indy_node/server/node.py similarity index 95% rename from sovrin_node/server/node.py rename to indy_node/server/node.py index 8318a91fd..df5ccdbee 100644 --- a/sovrin_node/server/node.py +++ b/indy_node/server/node.py @@ -3,7 +3,7 @@ from ledger.compact_merkle_tree import CompactMerkleTree from ledger.genesis_txn.genesis_txn_initiator_from_file import GenesisTxnInitiatorFromFile from plenum.persistence.leveldb_hash_store import LevelDbHashStore -from sovrin_node.server.validator_info_tool import ValidatorNodeInfoTool +from indy_node.server.validator_info_tool import ValidatorNodeInfoTool from state.pruning_state import PruningState from plenum.common.constants import VERSION, \ @@ -16,24 +16,24 @@ from plenum.common.messages.node_messages import Reply, PrePrepare from plenum.persistence.storage import initStorage, initKeyValueStorage from plenum.server.node import Node as PlenumNode -from sovrin_common.config_util import getConfig -from sovrin_common.constants import TXN_TYPE, allOpKeys, ATTRIB, GET_ATTR, \ +from indy_common.config_util import getConfig +from indy_common.constants import TXN_TYPE, allOpKeys, ATTRIB, GET_ATTR, \ DATA, GET_NYM, reqOpKeys, GET_TXNS, GET_SCHEMA, GET_CLAIM_DEF, ACTION, \ NODE_UPGRADE, COMPLETE, FAIL, CONFIG_LEDGER_ID, POOL_UPGRADE, POOL_CONFIG,\ IN_PROGRESS -from sovrin_common.constants import openTxns, \ +from indy_common.constants import openTxns, \ validTxnTypes, IDENTITY_TXN_TYPES, CONFIG_TXN_TYPES -from sovrin_common.txn_util import getTxnOrderedFields -from sovrin_common.types import Request, SafeRequest -from sovrin_node.persistence.attribute_store import AttributeStore -from sovrin_node.persistence.idr_cache import IdrCache -from sovrin_node.server.client_authn import TxnBasedAuthNr -from sovrin_node.server.config_req_handler import ConfigReqHandler -from sovrin_node.server.domain_req_handler import DomainReqHandler -from sovrin_node.server.node_authn import NodeAuthNr -from sovrin_node.server.pool_manager import HasPoolManager -from sovrin_node.server.upgrader import Upgrader -from sovrin_node.server.pool_config import PoolConfig +from indy_common.txn_util import getTxnOrderedFields +from indy_common.types import Request, SafeRequest +from indy_node.persistence.attribute_store import AttributeStore +from indy_node.persistence.idr_cache import IdrCache +from indy_node.server.client_authn import TxnBasedAuthNr +from indy_node.server.config_req_handler import ConfigReqHandler +from indy_node.server.domain_req_handler import DomainReqHandler +from indy_node.server.node_authn import NodeAuthNr +from indy_node.server.pool_manager import HasPoolManager +from indy_node.server.upgrader import Upgrader +from indy_node.server.pool_config import PoolConfig from stp_core.common.log import getlogger @@ -41,7 +41,7 @@ class Node(PlenumNode, HasPoolManager): - keygenScript = "init_sovrin_keys" + keygenScript = "init_indy_keys" _client_request_class = SafeRequest _info_tool_class = ValidatorNodeInfoTool ledger_ids = PlenumNode.ledger_ids + [CONFIG_LEDGER_ID] diff --git a/sovrin_node/server/node_authn.py b/indy_node/server/node_authn.py similarity index 100% rename from sovrin_node/server/node_authn.py rename to indy_node/server/node_authn.py diff --git a/sovrin_node/server/pool_config.py b/indy_node/server/pool_config.py similarity index 94% rename from sovrin_node/server/pool_config.py rename to indy_node/server/pool_config.py index cac3bdc0b..b0d00d4e2 100644 --- a/sovrin_node/server/pool_config.py +++ b/indy_node/server/pool_config.py @@ -1,5 +1,5 @@ from plenum.common.constants import TXN_TYPE -from sovrin_common.constants import POOL_CONFIG, WRITES +from indy_common.constants import POOL_CONFIG, WRITES from stp_core.common.log import getlogger diff --git a/sovrin_node/server/pool_manager.py b/indy_node/server/pool_manager.py similarity index 94% rename from sovrin_node/server/pool_manager.py rename to indy_node/server/pool_manager.py index 8c8578956..d5c332709 100644 --- a/sovrin_node/server/pool_manager.py +++ b/indy_node/server/pool_manager.py @@ -1,7 +1,7 @@ from plenum.common.constants import POOL_LEDGER_ID, DOMAIN_LEDGER_ID from plenum.server.pool_manager import HasPoolManager as PHasPoolManager, \ TxnPoolManager as PTxnPoolManager -from sovrin_node.server.pool_req_handler import PoolRequestHandler +from indy_node.server.pool_req_handler import PoolRequestHandler class HasPoolManager(PHasPoolManager): diff --git a/sovrin_node/server/pool_req_handler.py b/indy_node/server/pool_req_handler.py similarity index 94% rename from sovrin_node/server/pool_req_handler.py rename to indy_node/server/pool_req_handler.py index 6b9c205d5..30c157ddc 100644 --- a/sovrin_node/server/pool_req_handler.py +++ b/indy_node/server/pool_req_handler.py @@ -5,9 +5,9 @@ from plenum.common.ledger import Ledger from plenum.server.pool_req_handler import PoolRequestHandler as PHandler -from sovrin_common.auth import Authoriser -from sovrin_common.constants import NODE -from sovrin_node.persistence.idr_cache import IdrCache +from indy_common.auth import Authoriser +from indy_common.constants import NODE +from indy_node.persistence.idr_cache import IdrCache from state.state import State diff --git a/sovrin_node/server/upgrade_log.py b/indy_node/server/upgrade_log.py similarity index 100% rename from sovrin_node/server/upgrade_log.py rename to indy_node/server/upgrade_log.py diff --git a/sovrin_node/server/upgrader.py b/indy_node/server/upgrader.py similarity index 99% rename from sovrin_node/server/upgrader.py rename to indy_node/server/upgrader.py index 6fb936431..a5aa54690 100644 --- a/sovrin_node/server/upgrader.py +++ b/indy_node/server/upgrader.py @@ -11,9 +11,9 @@ from plenum.common.constants import TXN_TYPE, VERSION, DATA, IDENTIFIER from plenum.common.types import f from plenum.server.has_action_queue import HasActionQueue -from sovrin_common.constants import ACTION, POOL_UPGRADE, START, SCHEDULE, \ +from indy_common.constants import ACTION, POOL_UPGRADE, START, SCHEDULE, \ CANCEL, JUSTIFICATION, TIMEOUT, REINSTALL, NODE_UPGRADE, IN_PROGRESS, FORCE -from sovrin_node.server.upgrade_log import UpgradeLog +from indy_node.server.upgrade_log import UpgradeLog from plenum.server import notifier_plugin_manager from ledger.util import F import asyncio @@ -27,7 +27,7 @@ class Upgrader(HasActionQueue): @staticmethod def getVersion(): - from sovrin_node.__metadata__ import __version__ + from indy_node.__metadata__ import __version__ return __version__ @staticmethod diff --git a/sovrin_node/server/validator_info_tool.py b/indy_node/server/validator_info_tool.py similarity index 92% rename from sovrin_node/server/validator_info_tool.py rename to indy_node/server/validator_info_tool.py index 19e962d7a..31dfd7166 100644 --- a/sovrin_node/server/validator_info_tool.py +++ b/indy_node/server/validator_info_tool.py @@ -1,6 +1,6 @@ import importlib -from sovrin_node.__metadata__ import __version__ as node_pgk_version +from indy_node.__metadata__ import __version__ as node_pgk_version from plenum.server.validator_info_tool import none_on_fail, \ ValidatorNodeInfoTool as PlenumValidatorNodeInfoTool diff --git a/sovrin_node/test/__init__.py b/indy_node/test/__init__.py similarity index 100% rename from sovrin_node/test/__init__.py rename to indy_node/test/__init__.py diff --git a/indy_node/test/__main__.py b/indy_node/test/__main__.py new file mode 100644 index 000000000..9c26ececc --- /dev/null +++ b/indy_node/test/__main__.py @@ -0,0 +1,3 @@ +from indy_node import test + +test.run() diff --git a/sovrin_node/test/attrib_txn/__init__.py b/indy_node/test/attrib_txn/__init__.py similarity index 100% rename from sovrin_node/test/attrib_txn/__init__.py rename to indy_node/test/attrib_txn/__init__.py diff --git a/sovrin_node/test/attrib_txn/test_n_minus_f_pool_processes_attrib.py b/indy_node/test/attrib_txn/test_n_minus_f_pool_processes_attrib.py similarity index 96% rename from sovrin_node/test/attrib_txn/test_n_minus_f_pool_processes_attrib.py rename to indy_node/test/attrib_txn/test_n_minus_f_pool_processes_attrib.py index 64c3c553d..5d75ae747 100644 --- a/sovrin_node/test/attrib_txn/test_n_minus_f_pool_processes_attrib.py +++ b/indy_node/test/attrib_txn/test_n_minus_f_pool_processes_attrib.py @@ -1,5 +1,5 @@ from plenum.test.test_node import ensure_node_disconnected, getNonPrimaryReplicas -from sovrin_node.test.helper import addRawAttribute +from indy_node.test.helper import addRawAttribute def test_n_minus_f_pool_processes_attrib(looper, nodeSet, up, diff --git a/sovrin_node/test/catchup/__init__.py b/indy_node/test/catchup/__init__.py similarity index 100% rename from sovrin_node/test/catchup/__init__.py rename to indy_node/test/catchup/__init__.py diff --git a/sovrin_node/test/catchup/conftest.py b/indy_node/test/catchup/conftest.py similarity index 70% rename from sovrin_node/test/catchup/conftest.py rename to indy_node/test/catchup/conftest.py index a4c4408c0..e14733527 100644 --- a/sovrin_node/test/catchup/conftest.py +++ b/indy_node/test/catchup/conftest.py @@ -1,7 +1,7 @@ import pytest -from sovrin_client.test.helper import getClientAddedWithRole -from sovrin_node.test.did.helper import updateSovrinIdrWithVerkey +from indy_client.test.helper import getClientAddedWithRole +from indy_node.test.did.helper import updateIndyIdrWithVerkey @pytest.fixture(scope="module") @@ -11,11 +11,11 @@ def some_transactions_done(looper, nodeSet, tdirWithPoolTxns, trustee, trustee, trusteeWallet, 'some_name', addVerkey=False) new_idr = new_w.defaultId - updateSovrinIdrWithVerkey(looper, trusteeWallet, trustee, - new_idr, new_w.getVerkey(new_idr)) + updateIndyIdrWithVerkey(looper, trusteeWallet, trustee, + new_idr, new_w.getVerkey(new_idr)) # TODO: Since empty verkey and absence of verkey are stored in the ledger # in the same manner, this fails during catchup since the nodes that # processed the transaction saw verkey as `''` but while deserialising the # ledger they cannot differentiate between None and empty string. - # updateSovrinIdrWithVerkey(looper, new_w, new_c, + # updateIndyIdrWithVerkey(looper, new_w, new_c, # new_idr, '') diff --git a/sovrin_node/test/catchup/test_requests_post_multiple_new_nodes.py b/indy_node/test/catchup/test_requests_post_multiple_new_nodes.py similarity index 89% rename from sovrin_node/test/catchup/test_requests_post_multiple_new_nodes.py rename to indy_node/test/catchup/test_requests_post_multiple_new_nodes.py index 15cb1fb34..b337464e1 100644 --- a/sovrin_node/test/catchup/test_requests_post_multiple_new_nodes.py +++ b/indy_node/test/catchup/test_requests_post_multiple_new_nodes.py @@ -1,9 +1,9 @@ from plenum.common.util import randomString from plenum.test.node_catchup.helper import waitNodeDataEquality -from sovrin_client.test.client import TestClient -from sovrin_client.test.helper import getClientAddedWithRole -from sovrin_node.test.conftest import nodeThetaAdded -from sovrin_node.test.helper import TestNode +from indy_client.test.client import TestClient +from indy_client.test.helper import getClientAddedWithRole +from indy_node.test.conftest import nodeThetaAdded +from indy_node.test.helper import TestNode def test_requests_post_multiple_new_nodes( diff --git a/sovrin_node/test/catchup/test_requests_post_new_node_catchup.py b/indy_node/test/catchup/test_requests_post_new_node_catchup.py similarity index 95% rename from sovrin_node/test/catchup/test_requests_post_new_node_catchup.py rename to indy_node/test/catchup/test_requests_post_new_node_catchup.py index e4d5ac530..8dc6e096b 100644 --- a/sovrin_node/test/catchup/test_requests_post_new_node_catchup.py +++ b/indy_node/test/catchup/test_requests_post_new_node_catchup.py @@ -5,11 +5,11 @@ from plenum.test.node_catchup.helper import checkNodeDataForEquality, \ waitNodeDataEquality from plenum.test.test_node import ensure_node_disconnected, checkNodesConnected -from sovrin_client.test.client.TestClient import TestClient -from sovrin_client.test.helper import getClientAddedWithRole -from sovrin_common.constants import TRUST_ANCHOR -from sovrin_node.test.conftest import nodeThetaAdded -from sovrin_node.test.helper import TestNode, addRawAttribute, getAttribute +from indy_client.test.client.TestClient import TestClient +from indy_client.test.helper import getClientAddedWithRole +from indy_common.constants import TRUST_ANCHOR +from indy_node.test.conftest import nodeThetaAdded +from indy_node.test.helper import TestNode, addRawAttribute, getAttribute def test_new_node_catchup_update_projection(looper, tdirWithPoolTxns, diff --git a/sovrin_node/test/conftest.py b/indy_node/test/conftest.py similarity index 92% rename from sovrin_node/test/conftest.py rename to indy_node/test/conftest.py index 7b9ccd5c7..981ae80ac 100644 --- a/sovrin_node/test/conftest.py +++ b/indy_node/test/conftest.py @@ -12,8 +12,8 @@ from stp_core.loop.eventually import eventually from stp_core.network.port_dispenser import genHa -from sovrin_client.client.wallet.node import Node -from sovrin_common import strict_types +from indy_client.client.wallet.node import Node +from indy_common import strict_types # typecheck during tests strict_types.defaultShouldCheck = True @@ -25,10 +25,10 @@ from plenum.common.constants import NODE_IP, NODE_PORT, CLIENT_IP, CLIENT_PORT, \ ALIAS, SERVICES, VALIDATOR, STEWARD, BLS_KEY -from sovrin_client.test.helper import getClientAddedWithRole +from indy_client.test.helper import getClientAddedWithRole # noinspection PyUnresolvedReferences -from sovrin_client.test.conftest import trustAnchorWallet, \ +from indy_client.test.conftest import trustAnchorWallet, \ trustAnchor, tdirWithDomainTxnsUpdated, updatedDomainTxnFile, \ stewardWallet, steward, genesisTxns, testClientClass, \ addedTrustAnchor, userWalletB, nodeSet, testNodeClass, updatedPoolTxnData, \ @@ -44,7 +44,7 @@ warnfilters as plenum_warnfilters # noinspection PyUnresolvedReferences -from sovrin_common.test.conftest import conf, tconf, poolTxnTrusteeNames, \ +from indy_common.test.conftest import conf, tconf, poolTxnTrusteeNames, \ domainTxnOrderedFields, looper, setTestLogLevel Logger.setLogLevel(logging.NOTSET) @@ -57,7 +57,7 @@ def _(): warnings.filterwarnings( 'ignore', category=DeprecationWarning, - module='sovrin_common\.persistence\.identity_graph', + module='indy_common\.persistence\.identity_graph', message="The 'warn' method is deprecated") warnings.filterwarnings( 'ignore', category=ResourceWarning, message='unclosed transport') diff --git a/sovrin_node/test/did/__init__.py b/indy_node/test/did/__init__.py similarity index 100% rename from sovrin_node/test/did/__init__.py rename to indy_node/test/did/__init__.py diff --git a/sovrin_node/test/did/conftest.py b/indy_node/test/did/conftest.py similarity index 82% rename from sovrin_node/test/did/conftest.py rename to indy_node/test/did/conftest.py index 2bd2542e7..af715b222 100644 --- a/sovrin_node/test/did/conftest.py +++ b/indy_node/test/did/conftest.py @@ -1,9 +1,9 @@ import base58 import pytest -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_node.test.helper import makePendingTxnsRequest -from sovrin_client.test.helper import genTestClient +from indy_client.client.wallet.wallet import Wallet +from indy_node.test.helper import makePendingTxnsRequest +from indy_client.test.helper import genTestClient pf = pytest.fixture(scope='module') diff --git a/sovrin_node/test/did/helper.py b/indy_node/test/did/helper.py similarity index 94% rename from sovrin_node/test/did/helper.py rename to indy_node/test/did/helper.py index b2d1cd8d1..9aad11e1f 100644 --- a/sovrin_node/test/did/helper.py +++ b/indy_node/test/did/helper.py @@ -5,7 +5,7 @@ from plenum.test.helper import assertEquality from plenum.test import waits as plenumWaits -from sovrin_common.identity import Identity +from indy_common.identity import Identity MsgForSigning = {'sender': 'Mario', 'msg': 'Lorem ipsum'} @@ -39,7 +39,7 @@ def updateWalletIdrWithFullVerkeySigner(wallet, idr, signer): checkFullVerkeySize(wallet.getVerkey(idr)) -def updateSovrinIdrWithVerkey( +def updateIndyIdrWithVerkey( looper, senderWallet, senderClient, idr, fullKey): idy = Identity(identifier=idr, verkey=fullKey) senderWallet.updateTrustAnchoredIdentity(idy) @@ -55,8 +55,8 @@ def chk(): looper.run(eventually(chk, retryWait=1, timeout=timeout)) -def fetchFullVerkeyFromSovrin(looper, senderWallet, senderClient, - ownerWallet, idr): +def fetchFullVerkeyFromIndy(looper, senderWallet, senderClient, + ownerWallet, idr): identity = Identity(identifier=idr) req = senderWallet.requestIdentity(identity, sender=senderWallet.defaultId) senderClient.submitReqs(req) diff --git a/sovrin_node/test/did/test_did_with_abbreviated_verkey.py b/indy_node/test/did/test_did_with_abbreviated_verkey.py similarity index 87% rename from sovrin_node/test/did/test_did_with_abbreviated_verkey.py rename to indy_node/test/did/test_did_with_abbreviated_verkey.py index 0bb5d961e..fbf0a0b83 100644 --- a/sovrin_node/test/did/test_did_with_abbreviated_verkey.py +++ b/indy_node/test/did/test_did_with_abbreviated_verkey.py @@ -16,13 +16,13 @@ from plenum.test.helper import assertLength, assertEquality from plenum.test import waits as plenumWaits -from sovrin_common.identity import Identity -from sovrin_node.test.did.conftest import pf -from sovrin_node.test.did.helper import chkVerifyForRetrievedIdentity, \ - updateWalletIdrWithFullKeySigner, updateSovrinIdrWithVerkey, \ - fetchFullVerkeyFromSovrin, checkAbbrVerkeySize, checkDidSize, \ +from indy_common.identity import Identity +from indy_node.test.did.conftest import pf +from indy_node.test.did.helper import chkVerifyForRetrievedIdentity, \ + updateWalletIdrWithFullKeySigner, updateIndyIdrWithVerkey, \ + fetchFullVerkeyFromIndy, checkAbbrVerkeySize, checkDidSize, \ updateWalletIdrWithFullVerkeySigner -from sovrin_client.test.helper import createNym +from indy_client.test.helper import createNym @pf @@ -62,7 +62,7 @@ def didUpdatedWithFullVerkey(didAddedWithAbbrvVerkey, looper, trustAnchor, trustAnchorWallet, abbrevIdr, newFullKey, newFullKeySigner, wallet, client): """{ type: NYM, dest: , verkey: }""" - updateSovrinIdrWithVerkey(looper, wallet, client, abbrevIdr, newFullKey) + updateIndyIdrWithVerkey(looper, wallet, client, abbrevIdr, newFullKey) updateWalletIdrWithFullVerkeySigner(wallet, abbrevIdr, newFullKeySigner) @@ -75,8 +75,8 @@ def newVerkeyFetched( abbrevIdr, wallet): """{ type: GET_NYM, dest: }""" - fetchFullVerkeyFromSovrin(looper, trustAnchorWallet, trustAnchor, wallet, - abbrevIdr) + fetchFullVerkeyFromIndy(looper, trustAnchorWallet, trustAnchor, wallet, + abbrevIdr) def testNewIdentifierInWalletIsDid(abbrevIdr): diff --git a/sovrin_node/test/did/test_did_with_full_verkey.py b/indy_node/test/did/test_did_with_full_verkey.py similarity index 85% rename from sovrin_node/test/did/test_did_with_full_verkey.py rename to indy_node/test/did/test_did_with_full_verkey.py index 8d0460f26..9fd277981 100644 --- a/sovrin_node/test/did/test_did_with_full_verkey.py +++ b/indy_node/test/did/test_did_with_full_verkey.py @@ -15,13 +15,13 @@ from plenum.common.signer_did import DidSigner from plenum.test import waits as plenumWaits -from sovrin_common.identity import Identity -from sovrin_node.test.did.conftest import pf -from sovrin_node.test.did.helper import chkVerifyForRetrievedIdentity, \ - updateSovrinIdrWithVerkey, \ - fetchFullVerkeyFromSovrin, checkFullVerkeySize, \ +from indy_common.identity import Identity +from indy_node.test.did.conftest import pf +from indy_node.test.did.helper import chkVerifyForRetrievedIdentity, \ + updateIndyIdrWithVerkey, \ + fetchFullVerkeyFromIndy, checkFullVerkeySize, \ updateWalletIdrWithFullVerkeySigner -from sovrin_client.test.helper import createNym +from indy_client.test.helper import createNym @pf @@ -53,7 +53,7 @@ def didUpdatedWithFullVerkey(didAddedWithFullVerkey, looper, trustAnchor, trustAnchorWallet, fullKeyIdr, newFullKey, newFullKeySigner, wallet, client): """{ type: NYM, dest: , verkey: }""" - updateSovrinIdrWithVerkey(looper, wallet, client, fullKeyIdr, newFullKey) + updateIndyIdrWithVerkey(looper, wallet, client, fullKeyIdr, newFullKey) updateWalletIdrWithFullVerkeySigner(wallet, fullKeyIdr, newFullKeySigner) @@ -61,8 +61,8 @@ def didUpdatedWithFullVerkey(didAddedWithFullVerkey, looper, trustAnchor, def newVerkeyFetched(didAddedWithFullVerkey, looper, trustAnchor, trustAnchorWallet, fullKeyIdr, wallet): """{ type: GET_NYM, dest: }""" - fetchFullVerkeyFromSovrin(looper, trustAnchorWallet, trustAnchor, wallet, - fullKeyIdr) + fetchFullVerkeyFromIndy(looper, trustAnchorWallet, trustAnchor, wallet, + fullKeyIdr) def testAddDidWithVerkey(didAddedWithFullVerkey): diff --git a/sovrin_node/test/did/test_did_with_no_verkey.py b/indy_node/test/did/test_did_with_no_verkey.py similarity index 85% rename from sovrin_node/test/did/test_did_with_no_verkey.py rename to indy_node/test/did/test_did_with_no_verkey.py index 15c5d7a25..1357e9324 100644 --- a/sovrin_node/test/did/test_did_with_no_verkey.py +++ b/indy_node/test/did/test_did_with_no_verkey.py @@ -17,10 +17,10 @@ Update just a portion of a DID object DID forms tests - Allow for identifiers that have the ‘did:sovrin:’ prefix - did:sovrin:<16 byte, base58> + Allow for identifiers that have the ‘did:indy:’ prefix + did:indy:<16 byte, base58> Don’t store the prefix - Allow for identifiers that omit the ‘did:sovrin:’ prefix + Allow for identifiers that omit the ‘did:indy:’ prefix <16 byte, base58> Allow for legacy cryptonyms Test that a 32-byte identifier is assumed to be a cryptonym, and the first 16 bytes are the identifier, and the last 16 bytes are the abbreviated verkey, and it is stored that way @@ -29,11 +29,11 @@ from stp_core.loop.eventually import eventually -from sovrin_common.identity import Identity -from sovrin_node.test.did.conftest import pf -from sovrin_node.test.did.helper import chkVerifyForRetrievedIdentity, \ - updateSovrinIdrWithVerkey -from sovrin_client.test.helper import createNym +from indy_common.identity import Identity +from indy_node.test.did.conftest import pf +from indy_node.test.did.helper import chkVerifyForRetrievedIdentity, \ + updateIndyIdrWithVerkey +from indy_client.test.helper import createNym from plenum.test import waits as plenumWaits @@ -54,8 +54,8 @@ def didAddedWithoutVerkey( def didUpdatedWithVerkey(didAddedWithoutVerkey, looper, trustAnchor, trustAnchorWallet, noKeyIdr, wallet): """{ type: NYM, dest: , verkey: }""" - updateSovrinIdrWithVerkey(looper, trustAnchorWallet, trustAnchor, - noKeyIdr, wallet.getVerkey(noKeyIdr)) + updateIndyIdrWithVerkey(looper, trustAnchorWallet, trustAnchor, + noKeyIdr, wallet.getVerkey(noKeyIdr)) @pf diff --git a/sovrin_node/test/helper.py b/indy_node/test/helper.py similarity index 97% rename from sovrin_node/test/helper.py rename to indy_node/test/helper.py index aaeaf4143..b806ec8f6 100644 --- a/sovrin_node/test/helper.py +++ b/indy_node/test/helper.py @@ -15,13 +15,13 @@ from plenum.test.test_node import checkNodesConnected from plenum.test.testable import spyable from plenum.test import waits as plenumWaits, waits -from sovrin_client.client.wallet.attribute import LedgerStore, Attribute -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_client.test.helper import genTestClient, genTestClientProvider -from sovrin_common.constants import ATTRIB, TARGET_NYM, TXN_TYPE, GET_NYM -from sovrin_common.test.helper import TempStorage -from sovrin_node.server.node import Node -from sovrin_node.server.upgrader import Upgrader +from indy_client.client.wallet.attribute import LedgerStore, Attribute +from indy_client.client.wallet.wallet import Wallet +from indy_client.test.helper import genTestClient, genTestClientProvider +from indy_common.constants import ATTRIB, TARGET_NYM, TXN_TYPE, GET_NYM +from indy_common.test.helper import TempStorage +from indy_node.server.node import Node +from indy_node.server.upgrader import Upgrader from stp_core.loop.eventually import eventually from stp_core.loop.looper import Looper diff --git a/sovrin_node/test/persistence/__init__.py b/indy_node/test/persistence/__init__.py similarity index 100% rename from sovrin_node/test/persistence/__init__.py rename to indy_node/test/persistence/__init__.py diff --git a/sovrin_node/test/persistence/test_idr_cache.py b/indy_node/test/persistence/test_idr_cache.py similarity index 96% rename from sovrin_node/test/persistence/test_idr_cache.py rename to indy_node/test/persistence/test_idr_cache.py index 91139eca8..1580fe850 100644 --- a/sovrin_node/test/persistence/test_idr_cache.py +++ b/indy_node/test/persistence/test_idr_cache.py @@ -1,7 +1,7 @@ import pytest from plenum.common.util import get_utc_epoch from storage.kv_in_memory import KeyValueStorageInMemory -from sovrin_node.persistence.idr_cache import IdrCache +from indy_node.persistence.idr_cache import IdrCache identifier = "fake_identifier" committed_items = (0, # seq_no diff --git a/sovrin_node/test/pool_config/__init__.py b/indy_node/test/pool_config/__init__.py similarity index 100% rename from sovrin_node/test/pool_config/__init__.py rename to indy_node/test/pool_config/__init__.py diff --git a/sovrin_node/test/pool_config/conftest.py b/indy_node/test/pool_config/conftest.py similarity index 78% rename from sovrin_node/test/pool_config/conftest.py rename to indy_node/test/pool_config/conftest.py index 9d21e96c0..77c9453c2 100644 --- a/sovrin_node/test/pool_config/conftest.py +++ b/indy_node/test/pool_config/conftest.py @@ -2,10 +2,10 @@ from plenum.common.constants import STEWARD -from sovrin_common.constants import START, FORCE -from sovrin_node.test import waits -from sovrin_node.test.pool_config.helper import ensurePoolConfigSent -from sovrin_client.test.helper import getClientAddedWithRole +from indy_common.constants import START, FORCE +from indy_node.test import waits +from indy_node.test.pool_config.helper import ensurePoolConfigSent +from indy_client.test.helper import getClientAddedWithRole from stp_core.loop.eventually import eventually diff --git a/sovrin_node/test/pool_config/helper.py b/indy_node/test/pool_config/helper.py similarity index 79% rename from sovrin_node/test/pool_config/helper.py rename to indy_node/test/pool_config/helper.py index d5e003224..5c53dc5ac 100644 --- a/sovrin_node/test/pool_config/helper.py +++ b/indy_node/test/pool_config/helper.py @@ -1,10 +1,10 @@ from stp_core.loop.eventually import eventually from plenum.test.helper import waitForSufficientRepliesForRequests from plenum.test import waits as plenumWaits -from sovrin_client.client.wallet.pool_config import PoolConfig as WPoolConfig -from sovrin_node.server.pool_config import PoolConfig as SPoolConfig -from sovrin_node.utils.node_control_tool import NodeControlTool -from sovrin_common.config_util import getConfig +from indy_client.client.wallet.pool_config import PoolConfig as WPoolConfig +from indy_node.server.pool_config import PoolConfig as SPoolConfig +from indy_node.utils.node_control_tool import NodeControlTool +from indy_common.config_util import getConfig config = getConfig() diff --git a/sovrin_node/test/pool_config/test_send_pool_config.py b/indy_node/test/pool_config/test_send_pool_config.py similarity index 94% rename from sovrin_node/test/pool_config/test_send_pool_config.py rename to indy_node/test/pool_config/test_send_pool_config.py index ed5f86218..3b7ad8fa0 100644 --- a/sovrin_node/test/pool_config/test_send_pool_config.py +++ b/indy_node/test/pool_config/test_send_pool_config.py @@ -1,5 +1,5 @@ import pytest -from sovrin_node.test.pool_config.helper import ensurePoolConfigSent, checkPoolConfigWritableSet, sendPoolConfig +from indy_node.test.pool_config.helper import ensurePoolConfigSent, checkPoolConfigWritableSet, sendPoolConfig from stp_core.loop.eventually import eventually from plenum.test.pool_transactions.helper import disconnect_node_and_ensure_disconnected diff --git a/sovrin_node/test/pool_config/test_send_pool_config_only_trustee.py b/indy_node/test/pool_config/test_send_pool_config_only_trustee.py similarity index 87% rename from sovrin_node/test/pool_config/test_send_pool_config_only_trustee.py rename to indy_node/test/pool_config/test_send_pool_config_only_trustee.py index 3cba5a465..cc5da0ec8 100644 --- a/sovrin_node/test/pool_config/test_send_pool_config_only_trustee.py +++ b/indy_node/test/pool_config/test_send_pool_config_only_trustee.py @@ -1,7 +1,7 @@ -from sovrin_client.test.helper import getClientAddedWithRole -from sovrin_client.test.helper import checkRejects, checkNacks +from indy_client.test.helper import getClientAddedWithRole +from indy_client.test.helper import checkRejects, checkNacks from stp_core.loop.eventually import eventually -from sovrin_node.test.pool_config.helper import ensurePoolConfigSent, checkPoolConfigWritableSet, sendPoolConfig +from indy_node.test.pool_config.helper import ensurePoolConfigSent, checkPoolConfigWritableSet, sendPoolConfig from plenum.common.constants import STEWARD diff --git a/sovrin_node/test/replay/__init__.py b/indy_node/test/replay/__init__.py similarity index 100% rename from sovrin_node/test/replay/__init__.py rename to indy_node/test/replay/__init__.py diff --git a/sovrin_node/test/replay/test_state_regenerated_from_ledger.py b/indy_node/test/replay/test_state_regenerated_from_ledger.py similarity index 94% rename from sovrin_node/test/replay/test_state_regenerated_from_ledger.py rename to indy_node/test/replay/test_state_regenerated_from_ledger.py index 0d899f0c7..6964cf901 100644 --- a/sovrin_node/test/replay/test_state_regenerated_from_ledger.py +++ b/indy_node/test/replay/test_state_regenerated_from_ledger.py @@ -5,9 +5,9 @@ from plenum.test.node_catchup.helper import ensure_all_nodes_have_same_data, \ waitNodeDataEquality from plenum.test.test_node import checkNodesConnected, ensure_node_disconnected -from sovrin_client.test.helper import getClientAddedWithRole -from sovrin_common.constants import TRUST_ANCHOR -from sovrin_node.test.helper import addRawAttribute, TestNode +from indy_client.test.helper import getClientAddedWithRole +from indy_common.constants import TRUST_ANCHOR +from indy_node.test.helper import addRawAttribute, TestNode TestRunningTimeLimitSec = 200 diff --git a/sovrin_node/test/replay/test_successive_batch_no_state_change.py b/indy_node/test/replay/test_successive_batch_no_state_change.py similarity index 98% rename from sovrin_node/test/replay/test_successive_batch_no_state_change.py rename to indy_node/test/replay/test_successive_batch_no_state_change.py index 958300963..c53658dac 100644 --- a/sovrin_node/test/replay/test_successive_batch_no_state_change.py +++ b/indy_node/test/replay/test_successive_batch_no_state_change.py @@ -11,8 +11,8 @@ from plenum.test.helper import waitForSufficientRepliesForRequests from plenum.test.node_catchup.helper import waitNodeDataEquality from plenum.test.test_node import getPrimaryReplica -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_common.identity import Identity +from indy_client.client.wallet.wallet import Wallet +from indy_common.identity import Identity from stp_core.loop.eventually import eventually diff --git a/sovrin_node/test/state_proof/__init__.py b/indy_node/test/state_proof/__init__.py similarity index 100% rename from sovrin_node/test/state_proof/__init__.py rename to indy_node/test/state_proof/__init__.py diff --git a/sovrin_node/test/state_proof/test_state_proofs_for_get_requests.py b/indy_node/test/state_proof/test_state_proofs_for_get_requests.py similarity index 95% rename from sovrin_node/test/state_proof/test_state_proofs_for_get_requests.py rename to indy_node/test/state_proof/test_state_proofs_for_get_requests.py index ed07792cf..2bb30e443 100644 --- a/sovrin_node/test/state_proof/test_state_proofs_for_get_requests.py +++ b/indy_node/test/state_proof/test_state_proofs_for_get_requests.py @@ -11,15 +11,15 @@ IDENTIFIER, NAME, VERSION, ROLE, VERKEY, KeyValueStorageType, \ STATE_PROOF, ROOT_HASH, MULTI_SIGNATURE, PROOF_NODES, TXN_TIME from plenum.common.types import f -from sovrin_common.constants import \ +from indy_common.constants import \ ATTRIB, REF, SIGNATURE_TYPE, CLAIM_DEF, SCHEMA -from sovrin_common.types import Request -from sovrin_node.persistence.attribute_store import AttributeStore -from sovrin_node.persistence.idr_cache import IdrCache -from sovrin_node.server.domain_req_handler import DomainReqHandler +from indy_common.types import Request +from indy_node.persistence.attribute_store import AttributeStore +from indy_node.persistence.idr_cache import IdrCache +from indy_node.server.domain_req_handler import DomainReqHandler from state.pruning_state import PruningState from storage.kv_in_memory import KeyValueStorageInMemory -from sovrin_common.state import domain +from indy_common.state import domain @pytest.fixture() diff --git a/sovrin_node/test/suspension/__init__.py b/indy_node/test/suspension/__init__.py similarity index 100% rename from sovrin_node/test/suspension/__init__.py rename to indy_node/test/suspension/__init__.py diff --git a/sovrin_node/test/suspension/helper.py b/indy_node/test/suspension/helper.py similarity index 94% rename from sovrin_node/test/suspension/helper.py rename to indy_node/test/suspension/helper.py index 315dd31ee..06c8e4420 100644 --- a/sovrin_node/test/suspension/helper.py +++ b/indy_node/test/suspension/helper.py @@ -1,7 +1,7 @@ from plenum.test import waits -from sovrin_client.test.helper import checkRejects, checkNacks -from sovrin_common.constants import NULL -from sovrin_common.identity import Identity +from indy_client.test.helper import checkRejects, checkNacks +from indy_common.constants import NULL +from indy_common.identity import Identity from stp_core.loop.eventually import eventually diff --git a/sovrin_node/test/suspension/test_suspension.py b/indy_node/test/suspension/test_suspension.py similarity index 96% rename from sovrin_node/test/suspension/test_suspension.py rename to indy_node/test/suspension/test_suspension.py index acf9ccb51..ea1929f54 100644 --- a/sovrin_node/test/suspension/test_suspension.py +++ b/indy_node/test/suspension/test_suspension.py @@ -1,7 +1,7 @@ import pytest from plenum.common.signer_did import DidSigner -from sovrin_node.test.suspension.helper import sendChangeVerkey, checkIdentityRequestFailed, \ +from indy_node.test.suspension.helper import sendChangeVerkey, checkIdentityRequestFailed, \ checkIdentityRequestSucceed, sendSuspendRole, changeVerkey, suspendRole from stp_core.loop.eventually import eventually from stp_core.common.log import getlogger @@ -10,9 +10,9 @@ from plenum.test.pool_transactions.helper import suspendNode from plenum.test.pool_transactions.test_suspend_node import \ checkNodeNotInNodeReg -from sovrin_client.test.helper import addRole, \ +from indy_client.test.helper import addRole, \ getClientAddedWithRole -from sovrin_common.constants import TGB, TRUST_ANCHOR +from indy_common.constants import TGB, TRUST_ANCHOR whitelist = ['Observer threw an exception', 'while verifying message'] diff --git a/sovrin_node/test/upgrade/__init__.py b/indy_node/test/upgrade/__init__.py similarity index 100% rename from sovrin_node/test/upgrade/__init__.py rename to indy_node/test/upgrade/__init__.py diff --git a/sovrin_node/test/upgrade/conftest.py b/indy_node/test/upgrade/conftest.py similarity index 94% rename from sovrin_node/test/upgrade/conftest.py rename to indy_node/test/upgrade/conftest.py index 7e395d446..943269ee2 100644 --- a/sovrin_node/test/upgrade/conftest.py +++ b/indy_node/test/upgrade/conftest.py @@ -3,11 +3,11 @@ import dateutil.tz import pytest from plenum.common.constants import VERSION, STEWARD -from sovrin_client.test.helper import getClientAddedWithRole +from indy_client.test.helper import getClientAddedWithRole -from sovrin_common.constants import START, FORCE -from sovrin_node.test import waits -from sovrin_node.test.upgrade.helper import bumpedVersion, ensureUpgradeSent, \ +from indy_common.constants import START, FORCE +from indy_node.test import waits +from indy_node.test.upgrade.helper import bumpedVersion, ensureUpgradeSent, \ checkUpgradeScheduled, bumpVersion from stp_core.loop.eventually import eventually diff --git a/sovrin_node/test/upgrade/helper.py b/indy_node/test/upgrade/helper.py similarity index 91% rename from sovrin_node/test/upgrade/helper.py rename to indy_node/test/upgrade/helper.py index 5d8049bbb..386ae4a67 100644 --- a/sovrin_node/test/upgrade/helper.py +++ b/indy_node/test/upgrade/helper.py @@ -4,12 +4,12 @@ from plenum.test import waits as plenumWaits from plenum.common.types import f from plenum.common.constants import TXN_TYPE, DATA -from sovrin_common.constants import NODE_UPGRADE, ACTION -from sovrin_client.client.wallet.upgrade import Upgrade -from sovrin_node.server.upgrader import Upgrader -from sovrin_node.server.upgrade_log import UpgradeLog -from sovrin_node.utils.node_control_tool import NodeControlTool -from sovrin_common.config_util import getConfig +from indy_common.constants import NODE_UPGRADE, ACTION +from indy_client.client.wallet.upgrade import Upgrade +from indy_node.server.upgrader import Upgrader +from indy_node.server.upgrade_log import UpgradeLog +from indy_node.utils.node_control_tool import NodeControlTool +from indy_common.config_util import getConfig from datetime import datetime from typing import List, Tuple import dateutil.tz @@ -99,10 +99,10 @@ def nodeControlGeneralMonkeypatching(tool, monkeypatch, tdir, stdout): ret.returncode = 0 ret.stdout = stdout tool.base_dir = tdir - tool.sovrin_dir = os.path.join(tool.base_dir, '.sovrin') - tool.tmp_dir = os.path.join(tool.base_dir, '.sovrin_tmp') - if not os.path.exists(tool.sovrin_dir): - os.mkdir(tool.sovrin_dir) + tool.indy_dir = os.path.join(tool.base_dir, '.indy') + tool.tmp_dir = os.path.join(tool.base_dir, '.indy_tmp') + if not os.path.exists(tool.indy_dir): + os.mkdir(tool.indy_dir) if not os.path.exists(tool.tmp_dir): os.mkdir(tool.tmp_dir) monkeypatch.setattr(subprocess, 'run', lambda *x, **y: ret) diff --git a/sovrin_node/test/upgrade/test_communication_with_control_service.py b/indy_node/test/upgrade/test_communication_with_control_service.py similarity index 96% rename from sovrin_node/test/upgrade/test_communication_with_control_service.py rename to indy_node/test/upgrade/test_communication_with_control_service.py index dab97a493..581e27b71 100644 --- a/sovrin_node/test/upgrade/test_communication_with_control_service.py +++ b/indy_node/test/upgrade/test_communication_with_control_service.py @@ -1,6 +1,6 @@ import asyncio import time -from sovrin_node.server.upgrader import Upgrader, UpgradeMessage +from indy_node.server.upgrader import Upgrader, UpgradeMessage from stp_core.loop.eventually import eventuallySoon @@ -51,7 +51,7 @@ def testScheduleNodeUpgrade(nodeSet): control service, schedules upgrade for near future and then checks that service received notification. """ - from sovrin_common.config_util import getConfig + from indy_common.config_util import getConfig config = getConfig() loop = asyncio.get_event_loop() server, indicator = loop.run_until_complete( diff --git a/sovrin_node/test/upgrade/test_migration_tool.py b/indy_node/test/upgrade/test_migration_tool.py similarity index 96% rename from sovrin_node/test/upgrade/test_migration_tool.py rename to indy_node/test/upgrade/test_migration_tool.py index 1798886e8..ff22206f0 100644 --- a/sovrin_node/test/upgrade/test_migration_tool.py +++ b/indy_node/test/upgrade/test_migration_tool.py @@ -1,4 +1,4 @@ -import sovrin_node.utils.migration_tool as migration_tool +import indy_node.utils.migration_tool as migration_tool import time import pytest from timeout_decorator import TimeoutError diff --git a/sovrin_node/test/upgrade/test_migration_util.py b/indy_node/test/upgrade/test_migration_util.py similarity index 98% rename from sovrin_node/test/upgrade/test_migration_util.py rename to indy_node/test/upgrade/test_migration_util.py index 423c833fb..fca91537c 100644 --- a/sovrin_node/test/upgrade/test_migration_util.py +++ b/indy_node/test/upgrade/test_migration_util.py @@ -1,4 +1,4 @@ -from sovrin_node.utils.migration_tool import _get_relevant_migrations +from indy_node.utils.migration_tool import _get_relevant_migrations def comparator_relevant_migration_script( diff --git a/sovrin_node/test/upgrade/test_node_control_tool.py b/indy_node/test/upgrade/test_node_control_tool.py similarity index 93% rename from sovrin_node/test/upgrade/test_node_control_tool.py rename to indy_node/test/upgrade/test_node_control_tool.py index 1b0096c7c..8ec7dec6e 100644 --- a/sovrin_node/test/upgrade/test_node_control_tool.py +++ b/indy_node/test/upgrade/test_node_control_tool.py @@ -5,9 +5,9 @@ import shutil from stp_core.loop.eventually import eventually -from sovrin_node.test.upgrade.helper import NodeControlToolExecutor as NCT, composeUpgradeMessage, sendUpgradeMessage, nodeControlGeneralMonkeypatching -from sovrin_node.server.upgrader import Upgrader -from sovrin_node.utils.node_control_tool import NodeControlTool +from indy_node.test.upgrade.helper import NodeControlToolExecutor as NCT, composeUpgradeMessage, sendUpgradeMessage, nodeControlGeneralMonkeypatching +from indy_node.server.upgrader import Upgrader +from indy_node.utils.node_control_tool import NodeControlTool from plenum.test.helper import randomText @@ -172,7 +172,7 @@ def testRestoreBackup(tool, version): def mockMigrate(tool, *args): monkeypatch.setattr(tool, '_migrate', lambda *args: None) - with open(os.path.join(tool.sovrin_dir, testFile), 'w') as f: + with open(os.path.join(tool.indy_dir, testFile), 'w') as f: f.write(new_text) raise Exception('test') @@ -189,11 +189,11 @@ def checkBackupRestored(tool): nct = NCT(transform=transform) try: - with open(os.path.join(nct.tool.sovrin_dir, testFile), 'w') as f: + with open(os.path.join(nct.tool.indy_dir, testFile), 'w') as f: f.write(original_text) sendUpgradeMessage(msg) looper.run(eventually(checkBackupRestored, nct.tool)) - with open(os.path.join(nct.tool.sovrin_dir, testFile)) as f: + with open(os.path.join(nct.tool.indy_dir, testFile)) as f: assert original_text == f.read() finally: clean_dir(nct.tool.base_dir) diff --git a/sovrin_node/test/upgrade/test_node_upgrade.py b/indy_node/test/upgrade/test_node_upgrade.py similarity index 69% rename from sovrin_node/test/upgrade/test_node_upgrade.py rename to indy_node/test/upgrade/test_node_upgrade.py index ebdb6b0d0..fe578f1f6 100644 --- a/sovrin_node/test/upgrade/test_node_upgrade.py +++ b/indy_node/test/upgrade/test_node_upgrade.py @@ -1,9 +1,9 @@ import pytest -import sovrin_node +import indy_node from stp_core.loop.eventually import eventually -from sovrin_common.constants import IN_PROGRESS, COMPLETE -from sovrin_node.test.upgrade.helper import populate_log_with_upgrade_events, check_node_set_acknowledges_upgrade +from indy_common.constants import IN_PROGRESS, COMPLETE +from indy_node.test.upgrade.helper import populate_log_with_upgrade_events, check_node_set_acknowledges_upgrade from plenum.test import waits as plenumWaits @@ -19,14 +19,14 @@ def tdirWithPoolTxns(tdirWithPoolTxns, poolTxnNodeNames, tconf): tdirWithPoolTxns, poolTxnNodeNames, tconf, - sovrin_node.__metadata__.__version__) + indy_node.__metadata__.__version__) return tdirWithPoolTxns def testNodeDetectsUpgradeDone(looper, nodeSet): def check(): for node in nodeSet: - assert node.upgrader.lastUpgradeEventInfo[2] == sovrin_node.__metadata__.__version__ + assert node.upgrader.lastUpgradeEventInfo[2] == indy_node.__metadata__.__version__ timeout = plenumWaits.expectedTransactionExecutionTime(len(nodeSet)) looper.run(eventually(check, retryWait=1, timeout=timeout)) @@ -35,4 +35,4 @@ def check(): def testSendNodeUpgradeToAllNodes(looper, nodeSet, nodeIds): check_node_set_acknowledges_upgrade( looper, nodeSet, nodeIds, [ - IN_PROGRESS, COMPLETE], sovrin_node.__metadata__.__version__) + IN_PROGRESS, COMPLETE], indy_node.__metadata__.__version__) diff --git a/sovrin_node/test/upgrade/test_node_upgrade_unsuccessful.py b/indy_node/test/upgrade/test_node_upgrade_unsuccessful.py similarity index 80% rename from sovrin_node/test/upgrade/test_node_upgrade_unsuccessful.py rename to indy_node/test/upgrade/test_node_upgrade_unsuccessful.py index 74a6c438e..3787d028d 100644 --- a/sovrin_node/test/upgrade/test_node_upgrade_unsuccessful.py +++ b/indy_node/test/upgrade/test_node_upgrade_unsuccessful.py @@ -1,9 +1,9 @@ import pytest -from sovrin_common.constants import IN_PROGRESS, FAIL -from sovrin_node.test.upgrade.helper import populate_log_with_upgrade_events, check_node_set_acknowledges_upgrade, \ +from indy_common.constants import IN_PROGRESS, FAIL +from indy_node.test.upgrade.helper import populate_log_with_upgrade_events, check_node_set_acknowledges_upgrade, \ bumpedVersion -from sovrin_node.server.upgrade_log import UpgradeLog +from indy_node.server.upgrade_log import UpgradeLog INVALID_VERSION = bumpedVersion() diff --git a/sovrin_node/test/upgrade/test_pool_upgrade.py b/indy_node/test/upgrade/test_pool_upgrade.py similarity index 94% rename from sovrin_node/test/upgrade/test_pool_upgrade.py rename to indy_node/test/upgrade/test_pool_upgrade.py index e075e44aa..6f9585cb4 100644 --- a/sovrin_node/test/upgrade/test_pool_upgrade.py +++ b/indy_node/test/upgrade/test_pool_upgrade.py @@ -1,7 +1,7 @@ from plenum.common.constants import VERSION from plenum.test.test_node import checkNodesConnected, ensureElectionsDone -from sovrin_node.test import waits -from sovrin_node.test.upgrade.helper import checkUpgradeScheduled, sendUpgrade, bumpVersion +from indy_node.test import waits +from indy_node.test.upgrade.helper import checkUpgradeScheduled, sendUpgrade, bumpVersion from stp_core.loop.eventually import eventually whitelist = ['Failed to upgrade node'] diff --git a/sovrin_node/test/upgrade/test_pool_upgrade_cancel.py b/indy_node/test/upgrade/test_pool_upgrade_cancel.py similarity index 87% rename from sovrin_node/test/upgrade/test_pool_upgrade_cancel.py rename to indy_node/test/upgrade/test_pool_upgrade_cancel.py index af900d204..659f4fd34 100644 --- a/sovrin_node/test/upgrade/test_pool_upgrade_cancel.py +++ b/indy_node/test/upgrade/test_pool_upgrade_cancel.py @@ -1,10 +1,10 @@ from copy import deepcopy from plenum.test import waits as plenumWaits -from sovrin_common.constants import CANCEL, \ +from indy_common.constants import CANCEL, \ ACTION, SCHEDULE, JUSTIFICATION -from sovrin_node.test import waits -from sovrin_node.test.upgrade.helper import sendUpgrade, \ +from indy_node.test import waits +from indy_node.test.upgrade.helper import sendUpgrade, \ checkNoUpgradeScheduled from stp_core.loop.eventually import eventually diff --git a/sovrin_node/test/upgrade/test_pool_upgrade_lower_version.py b/indy_node/test/upgrade/test_pool_upgrade_lower_version.py similarity index 89% rename from sovrin_node/test/upgrade/test_pool_upgrade_lower_version.py rename to indy_node/test/upgrade/test_pool_upgrade_lower_version.py index 8b02fc4cb..fdfed92b1 100644 --- a/sovrin_node/test/upgrade/test_pool_upgrade_lower_version.py +++ b/indy_node/test/upgrade/test_pool_upgrade_lower_version.py @@ -2,13 +2,13 @@ import pytest -from sovrin_node.test import waits +from indy_node.test import waits from stp_core.loop.eventually import eventually from plenum.common.constants import VERSION, NAME from plenum.common.util import randomString -from sovrin_common.constants import SHA256, ACTION, CANCEL -from sovrin_node.test.upgrade.helper import bumpVersion, checkUpgradeScheduled, \ +from indy_common.constants import SHA256, ACTION, CANCEL +from indy_node.test.upgrade.helper import bumpVersion, checkUpgradeScheduled, \ ensureUpgradeSent diff --git a/sovrin_node/test/upgrade/test_pool_upgrade_no_loop.py b/indy_node/test/upgrade/test_pool_upgrade_no_loop.py similarity index 76% rename from sovrin_node/test/upgrade/test_pool_upgrade_no_loop.py rename to indy_node/test/upgrade/test_pool_upgrade_no_loop.py index 2f81fb601..9b566059c 100644 --- a/sovrin_node/test/upgrade/test_pool_upgrade_no_loop.py +++ b/indy_node/test/upgrade/test_pool_upgrade_no_loop.py @@ -2,14 +2,14 @@ import pytest -from sovrin_node.test import waits +from indy_node.test import waits from stp_core.loop.eventually import eventually from plenum.common.constants import VERSION -from sovrin_node.test.upgrade.helper import bumpedVersion, checkUpgradeScheduled, \ +from indy_node.test.upgrade.helper import bumpedVersion, checkUpgradeScheduled, \ ensureUpgradeSent, check_no_loop -from sovrin_node.server.upgrade_log import UpgradeLog -import sovrin_node +from indy_node.server.upgrade_log import UpgradeLog +import indy_node def test_upgrade_does_not_get_into_loop(looper, tconf, nodeSet, @@ -30,5 +30,5 @@ def test_upgrade_does_not_get_into_loop(looper, tconf, nodeSet, timeout=waits.expectedUpgradeScheduled())) # here we make nodes think they have upgraded successfully - monkeypatch.setattr(sovrin_node.__metadata__, '__version__', new_version) + monkeypatch.setattr(indy_node.__metadata__, '__version__', new_version) check_no_loop(nodeSet, UpgradeLog.UPGRADE_SUCCEEDED) diff --git a/sovrin_node/test/upgrade/test_pool_upgrade_no_loop_force.py b/indy_node/test/upgrade/test_pool_upgrade_no_loop_force.py similarity index 75% rename from sovrin_node/test/upgrade/test_pool_upgrade_no_loop_force.py rename to indy_node/test/upgrade/test_pool_upgrade_no_loop_force.py index 8b1c6d0cd..a427303f8 100644 --- a/sovrin_node/test/upgrade/test_pool_upgrade_no_loop_force.py +++ b/indy_node/test/upgrade/test_pool_upgrade_no_loop_force.py @@ -2,15 +2,15 @@ import pytest -from sovrin_node.test import waits +from indy_node.test import waits from stp_core.loop.eventually import eventually from plenum.common.constants import VERSION -from sovrin_common.constants import FORCE +from indy_common.constants import FORCE -from sovrin_node.test.upgrade.helper import bumpedVersion, checkUpgradeScheduled, \ +from indy_node.test.upgrade.helper import bumpedVersion, checkUpgradeScheduled, \ ensureUpgradeSent, check_no_loop -from sovrin_node.server.upgrade_log import UpgradeLog -import sovrin_node +from indy_node.server.upgrade_log import UpgradeLog +import indy_node whitelist = ['Failed to upgrade node'] @@ -34,5 +34,5 @@ def test_upgrade_does_not_get_into_loop_force(looper, tconf, nodeSet, timeout=waits.expectedUpgradeScheduled())) # here we make nodes think they have upgraded successfully - monkeypatch.setattr(sovrin_node.__metadata__, '__version__', new_version) + monkeypatch.setattr(indy_node.__metadata__, '__version__', new_version) check_no_loop(nodeSet, UpgradeLog.UPGRADE_SUCCEEDED) diff --git a/sovrin_node/test/upgrade/test_pool_upgrade_no_loop_force_unsuccessful.py b/indy_node/test/upgrade/test_pool_upgrade_no_loop_force_unsuccessful.py similarity index 74% rename from sovrin_node/test/upgrade/test_pool_upgrade_no_loop_force_unsuccessful.py rename to indy_node/test/upgrade/test_pool_upgrade_no_loop_force_unsuccessful.py index 862a99ac2..7bd4392f3 100644 --- a/sovrin_node/test/upgrade/test_pool_upgrade_no_loop_force_unsuccessful.py +++ b/indy_node/test/upgrade/test_pool_upgrade_no_loop_force_unsuccessful.py @@ -2,14 +2,14 @@ import pytest -from sovrin_node.test import waits +from indy_node.test import waits from stp_core.loop.eventually import eventually from plenum.common.constants import VERSION -from sovrin_common.constants import FORCE +from indy_common.constants import FORCE -from sovrin_node.test.upgrade.helper import bumpedVersion, checkUpgradeScheduled, \ +from indy_node.test.upgrade.helper import bumpedVersion, checkUpgradeScheduled, \ ensureUpgradeSent, check_no_loop -from sovrin_node.server.upgrade_log import UpgradeLog +from indy_node.server.upgrade_log import UpgradeLog whitelist = ['Failed to upgrade node'] @@ -31,6 +31,6 @@ def test_upgrade_does_not_get_into_loop_force_if_failed( retryWait=1, timeout=waits.expectedUpgradeScheduled())) - # we have not patched sovrin_node version so nodes think the upgrade had + # we have not patched indy_node version so nodes think the upgrade had # failed check_no_loop(nodeSet, UpgradeLog.UPGRADE_FAILED) diff --git a/sovrin_node/test/upgrade/test_pool_upgrade_no_loop_reinstall.py b/indy_node/test/upgrade/test_pool_upgrade_no_loop_reinstall.py similarity index 74% rename from sovrin_node/test/upgrade/test_pool_upgrade_no_loop_reinstall.py rename to indy_node/test/upgrade/test_pool_upgrade_no_loop_reinstall.py index a58500a10..ec1594997 100644 --- a/sovrin_node/test/upgrade/test_pool_upgrade_no_loop_reinstall.py +++ b/indy_node/test/upgrade/test_pool_upgrade_no_loop_reinstall.py @@ -2,15 +2,15 @@ import pytest -from sovrin_node.test import waits +from indy_node.test import waits from stp_core.loop.eventually import eventually from plenum.common.constants import VERSION -from sovrin_common.constants import REINSTALL +from indy_common.constants import REINSTALL -from sovrin_node.test.upgrade.helper import bumpedVersion, checkUpgradeScheduled, \ +from indy_node.test.upgrade.helper import bumpedVersion, checkUpgradeScheduled, \ ensureUpgradeSent, check_no_loop -from sovrin_node.server.upgrade_log import UpgradeLog -import sovrin_node +from indy_node.server.upgrade_log import UpgradeLog +import indy_node def test_upgrade_does_not_get_into_loop_if_reinstall( @@ -37,5 +37,5 @@ def test_upgrade_does_not_get_into_loop_if_reinstall( timeout=waits.expectedUpgradeScheduled())) # here we make nodes think they have upgraded successfully - monkeypatch.setattr(sovrin_node.__metadata__, '__version__', new_version) + monkeypatch.setattr(indy_node.__metadata__, '__version__', new_version) check_no_loop(nodeSet, UpgradeLog.UPGRADE_SUCCEEDED) diff --git a/sovrin_node/test/upgrade/test_pool_upgrade_no_loop_reinstall_unsuccessful.py b/indy_node/test/upgrade/test_pool_upgrade_no_loop_reinstall_unsuccessful.py similarity index 74% rename from sovrin_node/test/upgrade/test_pool_upgrade_no_loop_reinstall_unsuccessful.py rename to indy_node/test/upgrade/test_pool_upgrade_no_loop_reinstall_unsuccessful.py index f7866ba05..19c333baa 100644 --- a/sovrin_node/test/upgrade/test_pool_upgrade_no_loop_reinstall_unsuccessful.py +++ b/indy_node/test/upgrade/test_pool_upgrade_no_loop_reinstall_unsuccessful.py @@ -2,14 +2,14 @@ import pytest -from sovrin_node.test import waits +from indy_node.test import waits from stp_core.loop.eventually import eventually from plenum.common.constants import VERSION -from sovrin_common.constants import REINSTALL +from indy_common.constants import REINSTALL -from sovrin_node.test.upgrade.helper import bumpedVersion, checkUpgradeScheduled, \ +from indy_node.test.upgrade.helper import bumpedVersion, checkUpgradeScheduled, \ ensureUpgradeSent, check_no_loop -from sovrin_node.server.upgrade_log import UpgradeLog +from indy_node.server.upgrade_log import UpgradeLog whitelist = ['Failed to upgrade node'] @@ -31,6 +31,6 @@ def test_upgrade_does_not_get_into_loop_if_reinstall_and_failed( retryWait=1, timeout=waits.expectedUpgradeScheduled())) - # we have not patched sovrin_node version so nodes think the upgrade had + # we have not patched indy_node version so nodes think the upgrade had # failed check_no_loop(nodeSet, UpgradeLog.UPGRADE_FAILED) diff --git a/sovrin_node/test/upgrade/test_pool_upgrade_no_loop_unsuccessful.py b/indy_node/test/upgrade/test_pool_upgrade_no_loop_unsuccessful.py similarity index 78% rename from sovrin_node/test/upgrade/test_pool_upgrade_no_loop_unsuccessful.py rename to indy_node/test/upgrade/test_pool_upgrade_no_loop_unsuccessful.py index 23b225a49..389530d3a 100644 --- a/sovrin_node/test/upgrade/test_pool_upgrade_no_loop_unsuccessful.py +++ b/indy_node/test/upgrade/test_pool_upgrade_no_loop_unsuccessful.py @@ -2,13 +2,13 @@ import pytest -from sovrin_node.test import waits +from indy_node.test import waits from stp_core.loop.eventually import eventually from plenum.common.constants import VERSION -from sovrin_node.test.upgrade.helper import bumpedVersion, checkUpgradeScheduled, \ +from indy_node.test.upgrade.helper import bumpedVersion, checkUpgradeScheduled, \ ensureUpgradeSent, check_no_loop -from sovrin_node.server.upgrade_log import UpgradeLog +from indy_node.server.upgrade_log import UpgradeLog whitelist = ['Failed to upgrade node'] @@ -30,6 +30,6 @@ def test_upgrade_does_not_get_into_loop_if_failed(looper, tconf, nodeSet, retryWait=1, timeout=waits.expectedUpgradeScheduled())) - # we have not patched sovrin_node version so nodes think the upgrade had + # we have not patched indy_node version so nodes think the upgrade had # failed check_no_loop(nodeSet, UpgradeLog.UPGRADE_FAILED) diff --git a/sovrin_node/test/upgrade/test_pool_upgrade_reject.py b/indy_node/test/upgrade/test_pool_upgrade_reject.py similarity index 93% rename from sovrin_node/test/upgrade/test_pool_upgrade_reject.py rename to indy_node/test/upgrade/test_pool_upgrade_reject.py index e726eb029..fa3179463 100644 --- a/sovrin_node/test/upgrade/test_pool_upgrade_reject.py +++ b/indy_node/test/upgrade/test_pool_upgrade_reject.py @@ -2,10 +2,10 @@ from plenum.common.constants import NAME, VERSION from plenum.test import waits as plenumWaits -from sovrin_client.test.helper import checkRejects, checkNacks -from sovrin_common.constants import CANCEL, \ +from indy_client.test.helper import checkRejects, checkNacks +from indy_common.constants import CANCEL, \ ACTION -from sovrin_node.test.upgrade.helper import sendUpgrade, ensureUpgradeSent, \ +from indy_node.test.upgrade.helper import sendUpgrade, ensureUpgradeSent, \ bumpedVersion from stp_core.loop.eventually import eventually diff --git a/sovrin_node/test/upgrade/test_pool_upgrade_same_version.py b/indy_node/test/upgrade/test_pool_upgrade_same_version.py similarity index 87% rename from sovrin_node/test/upgrade/test_pool_upgrade_same_version.py rename to indy_node/test/upgrade/test_pool_upgrade_same_version.py index 570887be1..912db380b 100644 --- a/sovrin_node/test/upgrade/test_pool_upgrade_same_version.py +++ b/indy_node/test/upgrade/test_pool_upgrade_same_version.py @@ -2,11 +2,11 @@ import pytest -from sovrin_node.test import waits +from indy_node.test import waits from stp_core.loop.eventually import eventually from plenum.common.constants import VERSION -from sovrin_node.test.upgrade.helper import codeVersion, checkUpgradeScheduled, \ +from indy_node.test.upgrade.helper import codeVersion, checkUpgradeScheduled, \ ensureUpgradeSent diff --git a/sovrin_node/test/upgrade/test_pool_upgrade_same_version_reinstall.py b/indy_node/test/upgrade/test_pool_upgrade_same_version_reinstall.py similarity index 82% rename from sovrin_node/test/upgrade/test_pool_upgrade_same_version_reinstall.py rename to indy_node/test/upgrade/test_pool_upgrade_same_version_reinstall.py index 834b15452..1cbdaf842 100644 --- a/sovrin_node/test/upgrade/test_pool_upgrade_same_version_reinstall.py +++ b/indy_node/test/upgrade/test_pool_upgrade_same_version_reinstall.py @@ -2,13 +2,13 @@ import pytest -from sovrin_node.test import waits +from indy_node.test import waits from stp_core.loop.eventually import eventually from plenum.common.constants import VERSION -from sovrin_node.test.upgrade.helper import codeVersion, checkUpgradeScheduled, \ +from indy_node.test.upgrade.helper import codeVersion, checkUpgradeScheduled, \ ensureUpgradeSent -from sovrin_common.constants import REINSTALL +from indy_common.constants import REINSTALL def test_do_upgrade_to_the_same_version_if_reinstall(looper, tconf, nodeSet, diff --git a/sovrin_node/test/upgrade/test_pool_upgrade_through_catchup.py b/indy_node/test/upgrade/test_pool_upgrade_through_catchup.py similarity index 91% rename from sovrin_node/test/upgrade/test_pool_upgrade_through_catchup.py rename to indy_node/test/upgrade/test_pool_upgrade_through_catchup.py index d212a6e7c..7f33966d3 100644 --- a/sovrin_node/test/upgrade/test_pool_upgrade_through_catchup.py +++ b/indy_node/test/upgrade/test_pool_upgrade_through_catchup.py @@ -1,18 +1,18 @@ import pytest from copy import deepcopy -from sovrin_node.test import waits +from indy_node.test import waits from stp_core.loop.eventually import eventually from plenum.common.constants import VERSION, NAME from plenum.common.util import randomString from plenum.test.test_node import checkNodesConnected -from sovrin_common.constants import SHA256, CANCEL, ACTION -from sovrin_common.test.conftest import tconf -from sovrin_client.test.conftest import testNodeClass -from sovrin_client.test.conftest import testClientClass +from indy_common.constants import SHA256, CANCEL, ACTION +from indy_common.test.conftest import tconf +from indy_client.test.conftest import testNodeClass +from indy_client.test.conftest import testClientClass from plenum.test.conftest import allPluginsPath -from sovrin_node.test.helper import TestNode -from sovrin_node.test.upgrade.helper import bumpVersion, sendUpgrade, \ +from indy_node.test.helper import TestNode +from indy_node.test.upgrade.helper import bumpVersion, sendUpgrade, \ ensureUpgradeSent, checkUpgradeScheduled, get_valid_code_hash from plenum.test import waits as plenumWaits diff --git a/sovrin_node/test/upgrade/test_upgrade_log.py b/indy_node/test/upgrade/test_upgrade_log.py similarity index 92% rename from sovrin_node/test/upgrade/test_upgrade_log.py rename to indy_node/test/upgrade/test_upgrade_log.py index 5a025863b..54bd34c35 100644 --- a/sovrin_node/test/upgrade/test_upgrade_log.py +++ b/indy_node/test/upgrade/test_upgrade_log.py @@ -1,10 +1,10 @@ -from sovrin_node.server.upgrade_log import UpgradeLog +from indy_node.server.upgrade_log import UpgradeLog from datetime import datetime import os from os import path -tmpDir = "/tmp/sovrin/" +tmpDir = "/tmp/indy/" tmpFileName = "upgrade_log_test_file" diff --git a/sovrin_node/test/upgrade/test_upgrade_timeout.py b/indy_node/test/upgrade/test_upgrade_timeout.py similarity index 96% rename from sovrin_node/test/upgrade/test_upgrade_timeout.py rename to indy_node/test/upgrade/test_upgrade_timeout.py index 900a57e81..e7e12d725 100644 --- a/sovrin_node/test/upgrade/test_upgrade_timeout.py +++ b/indy_node/test/upgrade/test_upgrade_timeout.py @@ -1,6 +1,6 @@ import pytest from stp_core.loop.eventually import eventually -from sovrin_node.server.upgrader import Upgrader +from indy_node.server.upgrader import Upgrader import functools whitelist = [ diff --git a/sovrin_node/test/upgrade/test_upgrader.py b/indy_node/test/upgrade/test_upgrader.py similarity index 94% rename from sovrin_node/test/upgrade/test_upgrader.py rename to indy_node/test/upgrade/test_upgrader.py index 543ad3fc2..51830eaa9 100644 --- a/sovrin_node/test/upgrade/test_upgrader.py +++ b/indy_node/test/upgrade/test_upgrader.py @@ -1,5 +1,5 @@ # Some unit tests for upgrader -from sovrin_node.server.upgrader import Upgrader +from indy_node.server.upgrader import Upgrader def comparator_test(lower_versrion, higher_version): diff --git a/sovrin_node/test/validator_info/__init__.py b/indy_node/test/validator_info/__init__.py similarity index 100% rename from sovrin_node/test/validator_info/__init__.py rename to indy_node/test/validator_info/__init__.py diff --git a/sovrin_node/test/validator_info/test_validator_info.py b/indy_node/test/validator_info/test_validator_info.py similarity index 96% rename from sovrin_node/test/validator_info/test_validator_info.py rename to indy_node/test/validator_info/test_validator_info.py index 417ac0637..98e05c2a2 100644 --- a/sovrin_node/test/validator_info/test_validator_info.py +++ b/indy_node/test/validator_info/test_validator_info.py @@ -13,10 +13,10 @@ from plenum.test.validator_info.test_validator_info import patched_dump_info_period, \ info_path, info, load_info, load_latest_info, node # qa -from sovrin_common.constants import TXN_TYPE, DATA, GET_NYM, GET_ATTR, GET_SCHEMA, GET_CLAIM_DEF, REF, SIGNATURE_TYPE +from indy_common.constants import TXN_TYPE, DATA, GET_NYM, GET_ATTR, GET_SCHEMA, GET_CLAIM_DEF, REF, SIGNATURE_TYPE -from sovrin_client.client.wallet.attribute import Attribute -from sovrin_node.__metadata__ import __version__ as node_pgk_version +from indy_client.client.wallet.attribute import Attribute +from indy_node.__metadata__ import __version__ as node_pgk_version TEST_NODE_NAME = 'Alpha' diff --git a/sovrin_node/test/waits.py b/indy_node/test/waits.py similarity index 100% rename from sovrin_node/test/waits.py rename to indy_node/test/waits.py diff --git a/sovrin_node/utils/__init__.py b/indy_node/utils/__init__.py similarity index 100% rename from sovrin_node/utils/__init__.py rename to indy_node/utils/__init__.py diff --git a/sovrin_node/utils/migration_tool.py b/indy_node/utils/migration_tool.py similarity index 98% rename from sovrin_node/utils/migration_tool.py rename to indy_node/utils/migration_tool.py index acc4c7e65..4ca5a0ff7 100644 --- a/sovrin_node/utils/migration_tool.py +++ b/indy_node/utils/migration_tool.py @@ -11,8 +11,8 @@ from stp_core.common.log import getlogger -from sovrin_common.util import compose_cmd -from sovrin_node.server.upgrader import Upgrader +from indy_common.util import compose_cmd +from indy_node.server.upgrader import Upgrader SCRIPT_PREFIX = Path('data', 'migrations') PLATFORM_PREFIX = { diff --git a/sovrin_node/utils/node_control_tool.py b/indy_node/utils/node_control_tool.py similarity index 91% rename from sovrin_node/utils/node_control_tool.py rename to indy_node/utils/node_control_tool.py index e7d1d3e40..739925bd8 100644 --- a/sovrin_node/utils/node_control_tool.py +++ b/indy_node/utils/node_control_tool.py @@ -1,5 +1,3 @@ -#!/usr/bin/python3 - import os import re import select @@ -10,21 +8,21 @@ from stp_core.common.log import getlogger -from sovrin_common.config_util import getConfig -from sovrin_common.util import compose_cmd -from sovrin_node.server.upgrader import Upgrader -from sovrin_node.utils.migration_tool import migrate +from indy_common.config_util import getConfig +from indy_common.util import compose_cmd +from indy_node.server.upgrader import Upgrader +from indy_node.utils.migration_tool import migrate logger = getlogger() TIMEOUT = 300 -BASE_DIR = '/home/sovrin/' +BASE_DIR = '/home/indy/' BACKUP_FORMAT = 'zip' DEPS = ['indy-plenum', 'indy-anoncreds'] CONFIG = getConfig() FILES_TO_PRESERVE = [CONFIG.lastRunVersionFile, CONFIG.nextVersionFile, CONFIG.upgradeLogFile, CONFIG.lastVersionFilePath] -BACKUP_NAME_PREFIX = 'sovrin_backup_' +BACKUP_NAME_PREFIX = 'indy_backup_' BACKUP_NUM = 10 PACKAGES_TO_HOLD = 'indy-anoncreds indy-plenum indy-node' @@ -46,8 +44,8 @@ def __init__( self.test_mode = test_mode self.timeout = timeout self.base_dir = base_dir - self.sovrin_dir = os.path.join(self.base_dir, '.sovrin') - self.tmp_dir = os.path.join(self.base_dir, '.sovrin_tmp') + self.indy_dir = os.path.join(self.base_dir, '.indy') + self.tmp_dir = os.path.join(self.base_dir, '.indy_tmp') self.backup_format = backup_format self.deps = deps self.files_to_preserve = files_to_preserve @@ -159,15 +157,15 @@ def _get_deps_list(self, package): return ret def _call_upgrade_script(self, version): - logger.info('Upgrading sovrin node to version {}, test_mode {}'.format( + logger.info('Upgrading indy node to version {}, test_mode {}'.format( version, int(self.test_mode))) deps = self._get_deps_list('indy-node={}'.format(version)) deps = '"{}"'.format(deps) - cmd_file = 'upgrade_sovrin_node' + cmd_file = 'upgrade_indy_node' if self.test_mode: - cmd_file = 'upgrade_sovrin_node_test' + cmd_file = 'upgrade_indy_node_test' ret = subprocess.run( compose_cmd([cmd_file, deps]), shell=True, @@ -180,9 +178,9 @@ def _call_upgrade_script(self, version): raise Exception(msg) def _call_restart_node_script(self): - logger.info('Restarting sovrin') + logger.info('Restarting indy') ret = subprocess.run( - compose_cmd(['restart_sovrin_node']), + compose_cmd(['restart_indy_node']), shell=True, timeout=self.timeout) if ret.returncode != 0: @@ -200,23 +198,23 @@ def _backup_name_ext(self, version): def _create_backup(self, version): logger.debug('Creating backup for {}'.format(version)) shutil.make_archive(self._backup_name(version), - self.backup_format, self.sovrin_dir) + self.backup_format, self.indy_dir) def _restore_from_backup(self, version): logger.debug('Restoring from backup for {}'.format(version)) for file_path in self.files_to_preserve: try: - shutil.copy2(os.path.join(self.sovrin_dir, file_path), + shutil.copy2(os.path.join(self.indy_dir, file_path), os.path.join(self.tmp_dir, file_path)) except IOError as e: logger.warning( 'Copying {} failed due to {}'.format(file_path, e)) shutil.unpack_archive(self._backup_name_ext( - version), self.sovrin_dir, self.backup_format) + version), self.indy_dir, self.backup_format) for file_path in self.files_to_preserve: try: shutil.copy2(os.path.join(self.tmp_dir, file_path), - os.path.join(self.sovrin_dir, file_path)) + os.path.join(self.indy_dir, file_path)) except IOError as e: logger.warning( 'Copying {} failed due to {}'.format(file_path, e)) diff --git a/sovrin_node/utils/node_runner.py b/indy_node/utils/node_runner.py similarity index 87% rename from sovrin_node/utils/node_runner.py rename to indy_node/utils/node_runner.py index ae8a33dec..cfe7644c0 100644 --- a/sovrin_node/utils/node_runner.py +++ b/indy_node/utils/node_runner.py @@ -17,11 +17,11 @@ def run_node(config, name, node_port, client_port): logger.setLevel(config.logLevel) logger.debug("You can find logs in {}".format(logFileName)) - vars = [var for var in os.environ.keys() if var.startswith("SOVRIN")] - logger.debug("Sovrin related env vars: {}".format(vars)) + vars = [var for var in os.environ.keys() if var.startswith("INDY")] + logger.debug("Indy related env vars: {}".format(vars)) from stp_core.loop.looper import Looper - from sovrin_node.server.node import Node + from indy_node.server.node import Node with Looper(debug=config.LOOPER_DEBUG) as looper: node = Node(name, nodeRegistry=None, basedirpath=config.baseDir, ha=node_ha, cliha=client_ha) diff --git a/post-setup.py b/post-setup.py index 53156fc06..38c2911cf 100644 --- a/post-setup.py +++ b/post-setup.py @@ -1,9 +1,9 @@ import os import shutil -from sovrin_common.setup_util import Setup +from indy_common.setup_util import Setup -BASE_DIR = os.path.join(os.path.expanduser("~"), ".sovrin") +BASE_DIR = os.path.join(os.path.expanduser("~"), ".indy") Setup(BASE_DIR).setupCommon() Setup(BASE_DIR).setupNode() Setup(BASE_DIR).setupClient() diff --git a/requirement.txt b/requirement.txt index eb3cd485a..461b2063d 100644 --- a/requirement.txt +++ b/requirement.txt @@ -1 +1 @@ -sovrin-client \ No newline at end of file +indy-client \ No newline at end of file diff --git a/sample/acme-bob-connection-request.sovrin b/sample/acme-bob-connection-request.indy similarity index 100% rename from sample/acme-bob-connection-request.sovrin rename to sample/acme-bob-connection-request.indy diff --git a/sample/acme-job-application-no-pr.sovrin b/sample/acme-job-application-no-pr.indy similarity index 100% rename from sample/acme-job-application-no-pr.sovrin rename to sample/acme-job-application-no-pr.indy diff --git a/sample/acme-job-application.sovrin b/sample/acme-job-application.indy similarity index 100% rename from sample/acme-job-application.sovrin rename to sample/acme-job-application.indy diff --git a/sample/faber-bob-connection-request.sovrin b/sample/faber-bob-connection-request.indy similarity index 100% rename from sample/faber-bob-connection-request.sovrin rename to sample/faber-bob-connection-request.indy diff --git a/sample/faber-request.sovrin b/sample/faber-request.indy similarity index 100% rename from sample/faber-request.sovrin rename to sample/faber-request.indy diff --git a/sample/thrift-bob-connection-request.sovrin b/sample/thrift-bob-connection-request.indy similarity index 100% rename from sample/thrift-bob-connection-request.sovrin rename to sample/thrift-bob-connection-request.indy diff --git a/sample/thrift-loan-application.sovrin b/sample/thrift-loan-application.indy similarity index 100% rename from sample/thrift-loan-application.sovrin rename to sample/thrift-loan-application.indy diff --git a/scripts/add_keys.py b/scripts/add_keys.py index 4113177be..0efeaac9b 100644 --- a/scripts/add_keys.py +++ b/scripts/add_keys.py @@ -15,10 +15,10 @@ from stp_core.common.log import getlogger from plenum.test.helper import eventually, eventuallyAll -from sovrin_common.config_util import getConfig -from sovrin_common.constants import TRUST_ANCHOR -from sovrin_client.client.client import Client -from sovrin_client.client.wallet.wallet import Wallet +from indy_common.config_util import getConfig +from indy_common.constants import TRUST_ANCHOR +from indy_client.client.client import Client +from indy_client.client.wallet.wallet import Wallet logger = getlogger() @@ -102,7 +102,7 @@ async def ensureConnectedToNodes(client): def addNyms(): with Looper(debug=getConfig().LOOPER_DEBUG) as looper: - from sovrin_client.test.helper import createNym + from indy_client.test.helper import createNym # Starting clients print("Spawning client") diff --git a/scripts/add_new_node b/scripts/add_new_node index 71c7c3927..bda2bd8af 100644 --- a/scripts/add_new_node +++ b/scripts/add_new_node @@ -3,8 +3,8 @@ from stp_core.loop.looper import Looper from plenum.common.signer_simple import SimpleSigner -from sovrin_client.client.client import Client -from sovrin_common.config_util import getConfig +from indy_client.client.client import Client +from indy_common.config_util import getConfig # TODO: This code is obsolete, moreover we have a CLI command for this. diff --git a/scripts/change_node_ha b/scripts/change_node_ha index 5c7805ab4..d204a00a1 100644 --- a/scripts/change_node_ha +++ b/scripts/change_node_ha @@ -8,7 +8,7 @@ from plenum.common.util import getMaxFailures from stp_core.loop.eventually import eventually from plenum.test.helper import checkSufficientRepliesRecvd -from sovrin_common.config_util import getConfig +from indy_common.config_util import getConfig # Below is an example script command line parameters to be passed to test it. diff --git a/scripts/clear_node.py b/scripts/clear_node.py index 1d5ea8c1e..a4a37f669 100755 --- a/scripts/clear_node.py +++ b/scripts/clear_node.py @@ -11,7 +11,7 @@ def pathList(*paths): TARGET_DIRS = pathList( - "~/.sovrin", + "~/.indy", "~/.plenum" ) @@ -24,9 +24,9 @@ def pathList(*paths): ) WHITE_LIST = pathList( - "~/.sovrin/sovrin_config.py", + "~/.indy/indy_config.py", "~/.plenum/plenum_config.py", - "~/.sovrin/.*log" + "~/.indy/.*log" ).union(pathList(*{d + p for d in TARGET_DIRS for p in PATHS_TO_CLEAR})) diff --git a/scripts/complete_rebranding_upgrade_ubuntu1604.sh b/scripts/complete_rebranding_upgrade_ubuntu1604.sh new file mode 100644 index 000000000..5d424d32a --- /dev/null +++ b/scripts/complete_rebranding_upgrade_ubuntu1604.sh @@ -0,0 +1,28 @@ +#!/bin/bash -x + +# This script is intended to be used by rebranding upgrade + +systemctl stop sovrin-node-control + +NODE_SERVICE_ENABLEMENT_STATUS=$(systemctl is-enabled sovrin-node.service) + +systemctl disable sovrin-node.service +rm /etc/systemd/system/sovrin-node.service + +# Just in case disable sovrin-node-control service (it might be enabled accidentally) +# Normally it was a dependency of sovrin-node service which was the only one enabled +systemctl disable sovrin-node-control.service + +rm /etc/systemd/system/sovrin-node-control.service + +systemctl daemon-reload +systemctl reset-failed + +echo "Starting indy-node" +systemctl start indy-node +# indy-node-control is also started because indy-node requires it + +if [ $NODE_SERVICE_ENABLEMENT_STATUS != "disabled" ]; then + echo "Enable indy-node.service" + systemctl enable indy-node.service +fi diff --git a/scripts/delete_sovrin_node.bat b/scripts/delete_indy_node.bat similarity index 62% rename from scripts/delete_sovrin_node.bat rename to scripts/delete_indy_node.bat index 7e4f58997..f94f5c091 100644 --- a/scripts/delete_sovrin_node.bat +++ b/scripts/delete_indy_node.bat @@ -1,6 +1,6 @@ @echo off echo "Deleting service for agent" -sc delete "SovrinNodeUpgradeAgent" +sc delete "IndyNodeUpgradeAgent" echo "Deleting service for node" -sc delete "SovrinNode" +sc delete "IndyNode" echo "Please reboot" \ No newline at end of file diff --git a/scripts/generate_indy_pool_transactions b/scripts/generate_indy_pool_transactions new file mode 100755 index 000000000..ab5d125d7 --- /dev/null +++ b/scripts/generate_indy_pool_transactions @@ -0,0 +1,22 @@ +#! /usr/bin/env python3 + +from plenum.common.test_network_setup import TestNetworkSetup + +from indy_common.config_util import getConfig +from indy_common.txn_util import getTxnOrderedFields + +config = getConfig() +portsStart = 9700 +nodeParamsFileName = 'indy.env' + + +if __name__ == "__main__": + TestNetworkSetup.bootstrapTestNodes(config, portsStart, nodeParamsFileName, + getTxnOrderedFields()) + + +# Usages: +# generate_indy_pool_transactions --nodes=1 --clients=1 --nodeNum=1 +# generate_indy_pool_transactions --nodes=4 --clients=1 --nodeNum=1 --envName=live +# generate_indy_pool_transactions --nodes=4 --clients=1 --nodeNum=1 +# --envName=live --appendToLedgers diff --git a/scripts/generate_sovrin_pool_transactions b/scripts/generate_sovrin_pool_transactions deleted file mode 100755 index a309f8561..000000000 --- a/scripts/generate_sovrin_pool_transactions +++ /dev/null @@ -1,22 +0,0 @@ -#! /usr/bin/env python3 - -from plenum.common.test_network_setup import TestNetworkSetup - -from sovrin_common.config_util import getConfig -from sovrin_common.txn_util import getTxnOrderedFields - -config = getConfig() -portsStart = 9700 -nodeParamsFileName = 'sovrin.env' - - -if __name__ == "__main__": - TestNetworkSetup.bootstrapTestNodes(config, portsStart, nodeParamsFileName, - getTxnOrderedFields()) - - -# Usages: -# generate_sovrin_pool_transactions --nodes=1 --clients=1 --nodeNum=1 -# generate_sovrin_pool_transactions --nodes=4 --clients=1 --nodeNum=1 --envName=live -# generate_sovrin_pool_transactions --nodes=4 --clients=1 --nodeNum=1 -# --envName=live --appendToLedgers diff --git a/scripts/get_keys b/scripts/get_keys index 60825dad5..b7af75433 100644 --- a/scripts/get_keys +++ b/scripts/get_keys @@ -26,7 +26,7 @@ if len(sys.argv) < 2: NODE_OR_CLIENT_NAME = sys.argv.pop(1) CURRENT_LOGGED_IN_USER = getLoggedInUser() -path = "/home/{}/.sovrin/{}/role/local/role.json".\ +path = "/home/{}/.indy/{}/role/local/role.json".\ format(CURRENT_LOGGED_IN_USER, NODE_OR_CLIENT_NAME) diff --git a/scripts/git b/scripts/git index 960b4472d..d651dacd9 100644 --- a/scripts/git +++ b/scripts/git @@ -1,7 +1,7 @@ #!/usr/bin/env bash # set -e -dirs=( "sovrin-common" "sovrin-client" "sovrin-node" "plenum" "anoncreds" "ledger" ) +dirs=( "indy-common" "indy-client" "indy-node" "plenum" "anoncreds" "ledger" ) # quiet pushd pushd() { diff --git a/scripts/sovrin b/scripts/indy similarity index 74% rename from scripts/sovrin rename to scripts/indy index 584f8d2ca..88f11b1d5 100755 --- a/scripts/sovrin +++ b/scripts/indy @@ -1,15 +1,15 @@ #! /usr/bin/env python3 """ -Convenience script for calling the sovrin command line interface (CLI). For now, -the CLI is designed for experimenting with the Sovrin Identity platform, and not +Convenience script for calling the indy command line interface (CLI). For now, +the CLI is designed for experimenting with the Indy Identity platform, and not for creating a live consensus pool. For that, it's as simple as defining a node registry, creating a looper, creating a node, and running it. -$ sovrin +$ indy or supply a command to be executed first -$ sovrin "new nodes all" +$ indy "new nodes all" """ @@ -20,7 +20,7 @@ import sys # NOTE: Loading of plugin should happen as early as possible # So put all other required imports after loadPlugins function call below from plenum.common.plugin_helper import loadPlugins -from sovrin_common.config_util import getConfig +from indy_common.config_util import getConfig logging.root.handlers = [] logger = logging.getLogger() @@ -34,7 +34,7 @@ if not os.path.exists(baseDir): loadPlugins(baseDir) # NOTE: Put all regular imports below (not related to loadplugin) -from sovrin_client.cli.cli import SovrinCli +from indy_client.cli.cli import IndyCli from stp_core.loop.looper import Looper @@ -47,11 +47,11 @@ def run_cli(): with Looper(debug=config.LOOPER_DEBUG) as looper: curDir = os.getcwd() logFilePath = os.path.join(curDir, config.logFilePath) - cli = SovrinCli(looper=looper, - basedirpath=baseDir, - logFileName=logFilePath, - withNode=withNode - ) + cli = IndyCli(looper=looper, + basedirpath=baseDir, + logFileName=logFilePath, + withNode=withNode + ) looper.run(cli.shell(*commands)) diff --git a/scripts/sovrin_api_load_gen b/scripts/indy_api_load_gen similarity index 85% rename from scripts/sovrin_api_load_gen rename to scripts/indy_api_load_gen index 1f2838a3c..be5ed3ed8 100644 --- a/scripts/sovrin_api_load_gen +++ b/scripts/indy_api_load_gen @@ -1,7 +1,7 @@ #! /usr/bin/env python3 -# Sends requests to Sovrin Client REST wrapper running on 127.0.0.1:4300 +# Sends requests to Indy Client REST wrapper running on 127.0.0.1:4300 import os import sys diff --git a/scripts/init_sovrin_keys b/scripts/init_indy_keys similarity index 95% rename from scripts/init_sovrin_keys rename to scripts/init_indy_keys index a6f4e39ed..d414490b0 100755 --- a/scripts/init_sovrin_keys +++ b/scripts/init_indy_keys @@ -7,7 +7,7 @@ from plenum.common.keygen_utils import initNodeKeysForBothStacks from plenum.common.constants import CLIENT_STACK_SUFFIX from plenum.common.util import randomString -from sovrin_common.config_util import getConfig +from indy_common.config_util import getConfig config = getConfig() keepDir = config.baseDir diff --git a/scripts/install_sovrin_node.bat b/scripts/install_indy_node.bat similarity index 59% rename from scripts/install_sovrin_node.bat rename to scripts/install_indy_node.bat index 35b565590..22c639672 100644 --- a/scripts/install_sovrin_node.bat +++ b/scripts/install_indy_node.bat @@ -31,8 +31,8 @@ IF NOT DEFINED PASSWORD ( exit /B 1 ) IF DEFINED RUN_MODE ( - echo "RUN_MODE argument is %RUN_MODE%. Setting environment variable SOVRIN_NODE_PACKAGE_POSTFIX to %RUN_MODE%" - SETX /m SOVRIN_NODE_PACKAGE_POSTFIX %RUN_MODE% + echo "RUN_MODE argument is %RUN_MODE%. Setting environment variable INDY_NODE_PACKAGE_POSTFIX to %RUN_MODE%" + SETX /m INDY_NODE_PACKAGE_POSTFIX %RUN_MODE% ) IF DEFINED TEST_MODE ( echo "TEST_MODE argument is %TEST_MODE%. Setting environment variable TEST_MODE to %TEST_MODE%" @@ -43,13 +43,13 @@ FOR /f %%p in ('where python') do SET PYTHONPATH=%%p SET CURR_DIR=%~dp0 echo "Creating service for agent" -nssm install SovrinNodeUpgradeAgent "%PYTHONPATH%" -nssm set SovrinNodeUpgradeAgent AppDirectory %CURR_DIR% -nssm set SovrinNodeUpgradeAgent AppParameters "%CURR_DIR%node_control_tool.py %TEST_MODE%" +nssm install IndyNodeUpgradeAgent "%PYTHONPATH%" +nssm set IndyNodeUpgradeAgent AppDirectory %CURR_DIR% +nssm set IndyNodeUpgradeAgent AppParameters "%CURR_DIR%node_control_tool.py %TEST_MODE%" echo "Creating service for node" -nssm install SovrinNode "%PYTHONPATH%" -nssm set SovrinNode AppDirectory %CURR_DIR% -nssm set SovrinNode AppParameters "%CURR_DIR%start_sovrin_node %NODE_NAME% %NODE_PORT% %CLI_PORT%" -nssm set SovrinNode ObjectName ".\%USER%" "%PASSWORD%" +nssm install IndyNode "%PYTHONPATH%" +nssm set IndyNode AppDirectory %CURR_DIR% +nssm set IndyNode AppParameters "%CURR_DIR%start_indy_node %NODE_NAME% %NODE_PORT% %CLI_PORT%" +nssm set IndyNode ObjectName ".\%USER%" "%PASSWORD%" echo "Creating agent restart task" -SchTasks /Create /TN RestartSovrinNodeUpgradeAgent /TR "%CURR_DIR%restart_upgrade_agent.bat" /SC ONSTART /F \ No newline at end of file +SchTasks /Create /TN RestartIndyNodeUpgradeAgent /TR "%CURR_DIR%restart_upgrade_agent.bat" /SC ONSTART /F \ No newline at end of file diff --git a/scripts/install_nssm.bat b/scripts/install_nssm.bat index 10be607fb..0837d396d 100644 --- a/scripts/install_nssm.bat +++ b/scripts/install_nssm.bat @@ -1,12 +1,12 @@ @echo off echo "Installing nssm" -copy /y C:\Users\sovrin\.sovrin\nssm_original.exe C:\Users\sovrin\.sovrin\nssm.exe +copy /y C:\Users\indy\.indy\nssm_original.exe C:\Users\indy\.indy\nssm.exe SET Key="HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" FOR /f "skip=2 tokens=3*" %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PATH') DO ( IF [%%b]==[] ( - SETX /m PATH "%%~a;%USERPROFILE%\.sovrin" + SETX /m PATH "%%~a;%USERPROFILE%\.indy" ) ELSE ( - SETX /m PATH "%%~a %%~b;%USERPROFILE%\.sovrin" + SETX /m PATH "%%~a %%~b;%USERPROFILE%\.indy" ) ) \ No newline at end of file diff --git a/scripts/load.py b/scripts/load.py index aba20e705..3b14e2dc8 100644 --- a/scripts/load.py +++ b/scripts/load.py @@ -2,14 +2,14 @@ from time import perf_counter from plenum.common.signer_did import DidSigner -from sovrin_client.client.client import Client -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_common.identity import Identity +from indy_client.client.client import Client +from indy_client.client.wallet.wallet import Wallet +from indy_common.identity import Identity from stp_core.common.log import getlogger, Logger from stp_core.network.port_dispenser import genHa, HA from stp_core.loop.looper import Looper from plenum.test.helper import waitForSufficientRepliesForRequests -from sovrin_common.config_util import getConfig +from indy_common.config_util import getConfig numReqs = 100 splits = 1 diff --git a/scripts/load_test.py b/scripts/load_test.py index 15eebef18..4c93eadd2 100644 --- a/scripts/load_test.py +++ b/scripts/load_test.py @@ -28,13 +28,13 @@ from plenum.test.test_client import \ getAcksFromInbox, getNacksFromInbox, getRepliesFromInbox -from sovrin_common.constants import ATTRIB, GET_ATTR -from sovrin_common.config_util import getConfig -from sovrin_client.client.wallet.attribute import Attribute, LedgerStore -from sovrin_client.client.wallet.wallet import Wallet -from sovrin_client.client.client import Client -from sovrin_common.identity import Identity -from sovrin_common.constants import GET_NYM +from indy_common.constants import ATTRIB, GET_ATTR +from indy_common.config_util import getConfig +from indy_client.client.wallet.attribute import Attribute, LedgerStore +from indy_client.client.wallet.wallet import Wallet +from indy_client.client.client import Client +from indy_common.identity import Identity +from indy_common.constants import GET_NYM logger = getlogger() diff --git a/scripts/publish_to_pypi b/scripts/publish_to_pypi index 5b1484468..32fd7b732 100644 --- a/scripts/publish_to_pypi +++ b/scripts/publish_to_pypi @@ -4,9 +4,9 @@ BACK="$(tput cub1)" echo -e "\nWhich repos:" echo -e " 0. All following repos" -echo -e " 1. sovrin-common" -echo -e " 2. sovrin-client" -echo -e " 3. sovrin-node" +echo -e " 1. indy-common" +echo -e " 2. indy-client" +echo -e " 3. indy-node" echo -e " 4. plenum" echo -e " 5. ledger" echo -e " 6. anoncreds" @@ -58,11 +58,11 @@ do repoName="" if [ $repo -eq "1" ]; then - repoName="sovrin-common" + repoName="indy-common" elif [ $repo -eq "2" ]; then - repoName="sovrin-client" + repoName="indy-client" elif [ $repo -eq "3" ]; then - repoName="sovrin-node" + repoName="indy-node" elif [ $repo -eq "4" ]; then repoName="plenum" elif [ $repo -eq 5 ]; then diff --git a/scripts/pull b/scripts/pull index 5563f42ed..7ffe87672 100644 --- a/scripts/pull +++ b/scripts/pull @@ -33,8 +33,8 @@ def main(): print('repo: {}'.format(repo)) remote = repo.remotes['origin'] remote - edir = getDirInPath('evernym') - print('evernym directory: {}'.format(edir)) + edir = getDirInPath('indy-node') + print('indy-node directory: {}'.format(edir)) if __name__ == '__main__': @@ -45,7 +45,7 @@ if __name__ == '__main__': # GACTION=pull # -# pushd ../sovrin-priv +# pushd ../indy-priv # pwd # git $GACTION # diff --git a/scripts/read_ledger b/scripts/read_ledger index 275cd7aff..101322965 100755 --- a/scripts/read_ledger +++ b/scripts/read_ledger @@ -13,7 +13,7 @@ from ledger.compact_merkle_tree import CompactMerkleTree from plenum.common.ledger import Ledger from plenum.persistence.leveldb_hash_store import LevelDbHashStore -from sovrin_common.config_util import getConfig +from indy_common.config_util import getConfig logging.root.handlers = [] logger = logging.getLogger() @@ -57,7 +57,7 @@ def get_ledger_dir(node_name, client_name): ledger_data_dir = os.path.join(base_dir, data_dir) if not os.path.exists(ledger_data_dir): # TODO: find a better way - ledger_data_dir = os.path.join('/home/sovrin/.sovrin', data_dir) + ledger_data_dir = os.path.join('/home/indy/.indy', data_dir) if not os.path.exists(ledger_data_dir): logger.error( "Can not find the directory with the ledger: {}".format(ledger_data_dir)) diff --git a/scripts/reset_client b/scripts/reset_client index 355476bad..f4d28519b 100644 --- a/scripts/reset_client +++ b/scripts/reset_client @@ -2,13 +2,13 @@ import os -from sovrin_client.script_helper import performSovrinBaseDirCleanup -from sovrin_common.config_util import getConfig +from indy_client.script_helper import performIndyBaseDirCleanup +from indy_common.config_util import getConfig config = getConfig() baseDir = os.path.expanduser(config.baseDir) -print("\nIMPORTANT: This will clean up sovrin base directory: {}".format(baseDir)) +print("\nIMPORTANT: This will clean up indy base directory: {}".format(baseDir)) userAnswer = "no" validAns = "YeS" try: @@ -18,7 +18,7 @@ except KeyboardInterrupt: pass if userAnswer == validAns: - performSovrinBaseDirCleanup(baseDir) - print("\nSovrin base directory cleaned up.\n") + performIndyBaseDirCleanup(baseDir) + print("\nIndy base directory cleaned up.\n") else: print("\nOk, no cleanup performed.\n") diff --git a/scripts/restart_indy_node.bat b/scripts/restart_indy_node.bat new file mode 100644 index 000000000..ec1451367 --- /dev/null +++ b/scripts/restart_indy_node.bat @@ -0,0 +1,5 @@ +@echo off + +echo "Restarting node and agent" +nssm start IndyNode +schtasks /run /TN "RestartIndyNodeUpgradeAgent" \ No newline at end of file diff --git a/scripts/restart_indy_node_ubuntu1604.sh b/scripts/restart_indy_node_ubuntu1604.sh new file mode 100644 index 000000000..5845d6061 --- /dev/null +++ b/scripts/restart_indy_node_ubuntu1604.sh @@ -0,0 +1,11 @@ +#!/bin/bash -x + +# Upgrade may change service files +systemctl daemon-reload +systemctl reset-failed + +echo "Starting indy-node" +systemctl start indy-node + +echo "Restarting agent" +systemctl restart indy-node-control diff --git a/scripts/restart_sovrin_node.bat b/scripts/restart_sovrin_node.bat deleted file mode 100644 index ca7e297f6..000000000 --- a/scripts/restart_sovrin_node.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off - -echo "Restarting node and agent" -nssm start SovrinNode -schtasks /run /TN "RestartSovrinNodeUpgradeAgent" \ No newline at end of file diff --git a/scripts/restart_sovrin_node_ubuntu1604.sh b/scripts/restart_sovrin_node_ubuntu1604.sh index 547b231ca..0800b7ca9 100644 --- a/scripts/restart_sovrin_node_ubuntu1604.sh +++ b/scripts/restart_sovrin_node_ubuntu1604.sh @@ -1,9 +1,6 @@ #!/bin/bash -x -# Upgrade may change service files -systemctl daemon-reload -echo "Starting sovrin-node" -systemctl start sovrin-node +# This script is intended to be used by rebranding upgrade -echo "Restarting agent" -systemctl restart sovrin-node-control +systemctl start atd +at -f /usr/local/bin/complete_rebranding_upgrade now diff --git a/scripts/restart_upgrade_agent.bat b/scripts/restart_upgrade_agent.bat index 1f5c30743..c9edf377b 100644 --- a/scripts/restart_upgrade_agent.bat +++ b/scripts/restart_upgrade_agent.bat @@ -1,2 +1,2 @@ timeout /t 30 /nobreak -nssm restart SovrinNodeUpgradeAgent \ No newline at end of file +nssm restart IndyNodeUpgradeAgent \ No newline at end of file diff --git a/scripts/run_pool.py b/scripts/run_pool.py index f1d10360c..962f8d8ef 100644 --- a/scripts/run_pool.py +++ b/scripts/run_pool.py @@ -3,8 +3,8 @@ import sys -from sovrin_common.config_util import getConfig -from sovrin_node.utils.node_runner import run_node +from indy_common.config_util import getConfig +from indy_node.utils.node_runner import run_node config = getConfig() diff --git a/scripts/running_locally/setupEnvironment.sh b/scripts/running_locally/setupEnvironment.sh index f1fa8a00f..d76fba7ad 100755 --- a/scripts/running_locally/setupEnvironment.sh +++ b/scripts/running_locally/setupEnvironment.sh @@ -1,22 +1,22 @@ -# This script can be used when following the Sovrin_Running_Locally guide +# This script can be used when following the Indy_Running_Locally guide stty sane -# Remove .sovrin folder -rm -rf ~/.sovrin +# Remove .indy folder +rm -rf ~/.indy # Create nodes and generate initial transactions -generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 1 -generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 2 -generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 3 -generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 4 +generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 1 +generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 2 +generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 3 +generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 4 echo Environment setup complete echo echo "The nodes can be started using :" echo -echo "start_sovrin_node Node1 9701 9702" -echo "start_sovrin_node Node2 9703 9704" -echo "start_sovrin_node Node3 9705 9706" -echo "start_sovrin_node Node4 9707 9708" +echo "start_indy_node Node1 9701 9702" +echo "start_indy_node Node2 9703 9704" +echo "start_indy_node Node3 9705 9706" +echo "start_indy_node Node4 9707 9708" echo diff --git a/scripts/start_sovrin_node b/scripts/start_indy_node similarity index 77% rename from scripts/start_sovrin_node rename to scripts/start_indy_node index 498c91c0c..596b66109 100755 --- a/scripts/start_sovrin_node +++ b/scripts/start_indy_node @@ -3,8 +3,8 @@ import sys -from sovrin_node.utils.node_runner import run_node -from sovrin_common.config_util import getConfig +from indy_node.utils.node_runner import run_node +from indy_common.config_util import getConfig config = getConfig() diff --git a/scripts/start_node_control_tool b/scripts/start_node_control_tool new file mode 100644 index 000000000..c26c8891d --- /dev/null +++ b/scripts/start_node_control_tool @@ -0,0 +1,22 @@ +#! /usr/bin/env python3 + +import argparse + +from indy_node.utils.node_control_tool import NodeControlTool + +if __name__ == "__main__": + # Parse command line arguments + parser = argparse.ArgumentParser() + parser.add_argument("-t", "--test", help="runs in special Test mode", + action="store_true") + parser.add_argument( + "--hold-ext", + type=str, + help="list of additional packages to disable auto upgrade for" + " (Linux only)", + default="") + args = parser.parse_args() + + nodeControlTool = NodeControlTool(test_mode=args.test, + hold_ext=args.hold_ext) + nodeControlTool.start() diff --git a/scripts/start_node_control_tool.py b/scripts/start_node_control_tool.py deleted file mode 100644 index 1d5378be1..000000000 --- a/scripts/start_node_control_tool.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/python3 - -import argparse -from sovrin_node.utils.node_control_tool import NodeControlTool - - -# Parse command line arguments -test_mode = False -parser = argparse.ArgumentParser() -parser.add_argument("-t", "--test", help="runs in special Test mode", - action="store_true") -parser.add_argument( - "--hold-ext", - type=str, - help="list of additional packages to disable auto upgrade for (Linux only)", - default='') -args = parser.parse_args() -if args.test: - test_mode = True - -nodeControlTool = NodeControlTool(test_mode=test_mode, hold_ext=args.hold_ext) -nodeControlTool.start() diff --git a/scripts/test_some_write_keys_others_read_them b/scripts/test_some_write_keys_others_read_them index e72e87b23..c6c1fac20 100644 --- a/scripts/test_some_write_keys_others_read_them +++ b/scripts/test_some_write_keys_others_read_them @@ -26,7 +26,7 @@ from datetime import datetime from stp_core.common.log import getlogger -from sovrin_client.utils.user_scenarios import generateNymsData, \ +from indy_client.utils.user_scenarios import generateNymsData, \ NymsCreationScenario, KeyRotationScenario, ForeignKeysReadScenario STEWARD1_SEED = b"000000000000000000000000Steward1" diff --git a/scripts/test_specific_tests_against_specific_env.py b/scripts/test_specific_tests_against_specific_env.py index f0608b6ba..b82a70db2 100644 --- a/scripts/test_specific_tests_against_specific_env.py +++ b/scripts/test_specific_tests_against_specific_env.py @@ -4,11 +4,11 @@ # import os # import shutil # -# import sovrin_client.test.cli.test_tutorial as testTutorialMod -# import sovrin_client.test.cli.conftest as cliConftestMod +# import indy_client.test.cli.test_tutorial as testTutorialMod +# import indy_client.test.cli.conftest as cliConftestMod # # curDirPath = os.path.dirname(os.path.abspath(__file__)) -# pathForPoolTxnFile = '/home/rkalaria/.sovrin/pool_transactions_sandbox' +# pathForPoolTxnFile = '/home/rkalaria/.indy/pool_transactions_sandbox' # # # # default/common monkeypatching required for any env @@ -80,7 +80,7 @@ # # # define env specific test config # sandboxConfig = { -# "poolTxnFilePath": "/home/rkalaria/.sovrin/pool_transactions_sandbox", +# "poolTxnFilePath": "/home/rkalaria/.indy/pool_transactions_sandbox", # "testModulePaths": { # 'cli/test_tutorial.py': tutorialMonkeyPatching # }, @@ -110,7 +110,7 @@ # exitCodes = {} # for testModName, testMonkeyPatchFunc in testModulePaths.items(): # testModulePath = os.path.join( -# curDirPath, '../sovrin_client/test', testModName) +# curDirPath, '../indy_client/test', testModName) # if testMonkeyPatchFunc: # testMonkeyPatchFunc(econf, monkeypatch) # exitCodes[testModName] = pytest.main(['-s', testModulePath]) diff --git a/scripts/test_users_write_and_read_own_keys b/scripts/test_users_write_and_read_own_keys index bcb82384d..11fd28904 100644 --- a/scripts/test_users_write_and_read_own_keys +++ b/scripts/test_users_write_and_read_own_keys @@ -24,7 +24,7 @@ from datetime import datetime from stp_core.common.log import getlogger -from sovrin_client.utils.user_scenarios import generateNymsData, \ +from indy_client.utils.user_scenarios import generateNymsData, \ NymsCreationScenario, KeyRotationAndReadScenario STEWARD1_SEED = b"000000000000000000000000Steward1" diff --git a/scripts/upgrade_sovrin_node.bat b/scripts/upgrade_indy_node.bat similarity index 57% rename from scripts/upgrade_sovrin_node.bat rename to scripts/upgrade_indy_node.bat index f6ff21d4b..bb68b72d1 100644 --- a/scripts/upgrade_sovrin_node.bat +++ b/scripts/upgrade_indy_node.bat @@ -7,10 +7,10 @@ IF NOT DEFINED VERS ( ) echo "Stopping node" -nssm stop SovrinNode +nssm stop IndyNode -echo "Run sovrin upgrade to version %VERS%" -pip install --upgrade --no-cache-dir sovrin-node%SOVRIN_NODE_PACKAGE_POSTFIX%=="%VERS%" +echo "Run indy upgrade to version %VERS%" +pip install --upgrade --no-cache-dir indy-node%INDY_NODE_PACKAGE_POSTFIX%=="%VERS%" SET RET=%ERRORLEVEL% IF NOT "%RET%"=="0" ( echo "Upgrade to version %VERS% failed %RET%" diff --git a/scripts/upgrade_sovrin_node_test.bat b/scripts/upgrade_indy_node_test.bat similarity index 52% rename from scripts/upgrade_sovrin_node_test.bat rename to scripts/upgrade_indy_node_test.bat index 57c268132..51102a4e8 100644 --- a/scripts/upgrade_sovrin_node_test.bat +++ b/scripts/upgrade_indy_node_test.bat @@ -7,15 +7,15 @@ IF NOT DEFINED VERS ( ) echo "Stopping node" -nssm stop SovrinNode +nssm stop IndyNode -echo "Run sovrin upgrade to version %VERS%" -pip install --upgrade --no-cache-dir sovrin-node%SOVRIN_NODE_PACKAGE_POSTFIX%=="%VERS%" +echo "Run indy upgrade to version %VERS%" +pip install --upgrade --no-cache-dir indy-node%INDY_NODE_PACKAGE_POSTFIX%=="%VERS%" SET RET=%ERRORLEVEL% IF NOT "%RET%"=="0" ( echo "Upgrade to version %VERS% failed %RET%" ) echo "Restarting node and agent" -nssm start SovrinNode -schtasks /run /TN "RestartSovrinNodeUpgradeAgent" \ No newline at end of file +nssm start IndyNode +schtasks /run /TN "RestartIndyNodeUpgradeAgent" \ No newline at end of file diff --git a/scripts/upgrade_sovrin_node_ubuntu1604.sh b/scripts/upgrade_indy_node_ubuntu1604.sh similarity index 75% rename from scripts/upgrade_sovrin_node_ubuntu1604.sh rename to scripts/upgrade_indy_node_ubuntu1604.sh index f3e52baf0..00b952bff 100755 --- a/scripts/upgrade_sovrin_node_ubuntu1604.sh +++ b/scripts/upgrade_indy_node_ubuntu1604.sh @@ -5,7 +5,7 @@ if [ -z "$deps" ] ; then exit 1 fi -echo "Try to donwload sovrin version $deps" +echo "Try to donwload indy version $deps" apt-get -y update && apt-get --download-only -y --allow-downgrades --allow-change-held-packages install $deps ret=$? if [ $ret -ne 0 ] ; then @@ -13,10 +13,10 @@ if [ $ret -ne 0 ] ; then exit 1 fi -echo "Stop sovrin-node" -systemctl stop sovrin-node +echo "Stop indy-node" +systemctl stop indy-node -echo "Run sovrin upgrade to $deps" +echo "Run indy upgrade to $deps" apt-get -y --allow-downgrades --allow-change-held-packages --reinstall install $deps ret=$? if [ $ret -ne 0 ] ; then diff --git a/scripts/upgrade_sovrin_node_ubuntu1604_test.sh b/scripts/upgrade_indy_node_ubuntu1604_test.sh similarity index 75% rename from scripts/upgrade_sovrin_node_ubuntu1604_test.sh rename to scripts/upgrade_indy_node_ubuntu1604_test.sh index f3e52baf0..00b952bff 100755 --- a/scripts/upgrade_sovrin_node_ubuntu1604_test.sh +++ b/scripts/upgrade_indy_node_ubuntu1604_test.sh @@ -5,7 +5,7 @@ if [ -z "$deps" ] ; then exit 1 fi -echo "Try to donwload sovrin version $deps" +echo "Try to donwload indy version $deps" apt-get -y update && apt-get --download-only -y --allow-downgrades --allow-change-held-packages install $deps ret=$? if [ $ret -ne 0 ] ; then @@ -13,10 +13,10 @@ if [ $ret -ne 0 ] ; then exit 1 fi -echo "Stop sovrin-node" -systemctl stop sovrin-node +echo "Stop indy-node" +systemctl stop indy-node -echo "Run sovrin upgrade to $deps" +echo "Run indy upgrade to $deps" apt-get -y --allow-downgrades --allow-change-held-packages --reinstall install $deps ret=$? if [ $ret -ne 0 ] ; then diff --git a/scripts/validator-info b/scripts/validator-info index 0d9d34ca1..2805a229a 100755 --- a/scripts/validator-info +++ b/scripts/validator-info @@ -16,7 +16,7 @@ from collections import OrderedDict from glob import glob import re -from sovrin_common.config_util import getConfig +from indy_common.config_util import getConfig from stp_core.common.log import Logger from stp_core.common.log import getlogger @@ -323,9 +323,8 @@ class SoftwareStats(BaseStats): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - # TODO should be fixed after packages renamings pkgMappings = { - 'indy-node': 'sovrin_node' + 'indy-node': 'indy_node' } for pkgName, obj in self.items(): @@ -352,7 +351,7 @@ class ValidatorStats(BaseStats): @staticmethod def get_process_state(): ret = subprocess.check_output( - 'systemctl is-failed sovrin-node; exit 0', + 'systemctl is-failed indy-node; exit 0', stderr=subprocess.STDOUT, shell=True ) ret = ret.decode().strip() @@ -362,7 +361,7 @@ class ValidatorStats(BaseStats): return 'running' else: logger.info( - "Non-expected output for sovrin-node " + "Non-expected output for indy-node " "is-failed state: {}".format(ret) ) return None @@ -370,7 +369,7 @@ class ValidatorStats(BaseStats): @staticmethod def get_enabled_state(): ret = subprocess.check_output( - 'systemctl is-enabled sovrin-node; exit 0', + 'systemctl is-enabled indy-node; exit 0', stderr=subprocess.STDOUT, shell=True ) ret = ret.decode().strip() @@ -380,7 +379,7 @@ class ValidatorStats(BaseStats): return False else: logger.info( - "Non-expected output for sovrin-node " + "Non-expected output for indy-node " "is-enabled state: {}".format(ret) ) return None diff --git a/setup.md b/setup.md index 1e77867fe..4423cab7d 100644 --- a/setup.md +++ b/setup.md @@ -1,11 +1,11 @@ -# Sovrin -- identity for all +# Indy -- identity for all -Sovrin Identity Network public/permissioned distributed ledger +Indy Identity Network public/permissioned distributed ledger ### Setup Instructions #### Run common setup instructions -Follow instructions mentioned here [Common Setup Instructions](https://github.com/sovrin-foundation/sovrin-common/blob/master/setup.md) +Follow instructions mentioned here [Common Setup Instructions](https://github.com/hyperledger-archives/indy-common/blob/master/setup.md) As indy-node depends on [indy-crypto](https://github.com/hyperledger/indy-crypto), it also needs to be installed: @@ -17,8 +17,8 @@ apt-get update -y && apt-get install -y libindy-crypto ### Run tests [Optional] -As sovrin-node tests needs sovrin-client which depends on Charm-Crypto, we need to install it. -Follow instructions mentioned here [Charm-Crypto Setup Instructions](https://github.com/sovrin-foundation/sovrin-common/blob/master/setup.md) +As indy-node tests needs indy-client which depends on Charm-Crypto, we need to install it. +Follow instructions mentioned here [Charm-Crypto Setup Instructions](https://github.com/hyperledger-archives/indy-common/blob/master/setup.md) To run the tests, download the source by cloning this repo. Navigate to the root directory of the source and install required packages by @@ -32,10 +32,10 @@ Run test by python setup.py pytest ``` -### Installing Sovrin node -Sovrin node can be installed using pip by +### Installing Indy node +Indy node can be installed using pip by ``` -pip install -U --no-cache-dir sovrin-node +pip install -U --no-cache-dir indy-node ``` ### Start Nodes @@ -43,49 +43,49 @@ pip install -U --no-cache-dir sovrin-node #### Initializing Keep To run a node you need to generate its keys. The keys are stored on a disk in files in the location called `keep`. The following generates keys for a node named `Alpha` in the keep. -The keep for node `Alpha` is located at `~/.sovrin/Alpha`. +The keep for node `Alpha` is located at `~/.indy/Alpha`. ``` -init_sovrin_keys --name Alpha [--seed 111111111111111111111111111Alpha] [--force] +init_indy_keys --name Alpha [--seed 111111111111111111111111111Alpha] [--force] ``` #### Running Node ``` -start_sovrin_node Alpha 9701 9702 +start_indy_node Alpha 9701 9702 ``` The node uses a separate UDP channels for communicating with nodes and clients. The first port number is for the node-to-node communication channel and the second is for node-to-client communication channel. -#### Running a Sovrin test cluster. -If you want to try out a Sovrin cluster of a few nodes with the nodes running on your local machine or different remote machines, -then you can use the script called, `generate_sovrin_pool_transactions`. Eg. If you want to run 4 nodes on you local machine and have +#### Running a Indy test cluster. +If you want to try out a Indy cluster of a few nodes with the nodes running on your local machine or different remote machines, +then you can use the script called, `generate_indy_pool_transactions`. Eg. If you want to run 4 nodes on you local machine and have 5 clients bootstrapped so they can make write requests to the nodes, this is what you do. ``` -~$ generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 1 +~$ generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 1 This node with name Node1 will use ports 9701 and 9702 for nodestack and clientstack respectively -~$ generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 2 +~$ generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 2 This node with name Node2 will use ports 9703 and 9704 for nodestack and clientstack respectively -~$ generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 3 +~$ generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 3 This node with name Node3 will use ports 9705 and 9706 for nodestack and clientstack respectively -~$ generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 4 +~$ generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 4 his node with name Node4 will use ports 9707 and 9708 for nodestack and clientstack respectively ``` Now you can run the 4 nodes as ``` -start_sovrin_node Node1 9701 9702 +start_indy_node Node1 9701 9702 ``` ``` -start_sovrin_node Node2 9703 9704 +start_indy_node Node2 9703 9704 ``` ``` -start_sovrin_node Node3 9705 9706 +start_indy_node Node3 9705 9706 ``` ``` -start_sovrin_node Node4 9707 9708 +start_indy_node Node4 9707 9708 ``` These 4 commands created keys for 4 nodes `Node1`, `Node2`, `Node3` and `Node4`, @@ -102,38 +102,38 @@ Now lets say you want to run 4 nodes on 4 different machines as For this On machine with IP 191.177.76.26 you will run ``` -~$ generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 1 --ips '191.177.76.26,22.185.194.102,247.81.153.79,93.125.199.45' +~$ generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 1 --ips '191.177.76.26,22.185.194.102,247.81.153.79,93.125.199.45' This node with name Node1 will use ports 9701 and 9702 for nodestack and clientstack respectively ``` On machine with IP 22.185.194.102 you will run ``` -~$ generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 2 --ips '191.177.76.26,22.185.194.102,247.81.153.79,93.125.199.45' +~$ generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 2 --ips '191.177.76.26,22.185.194.102,247.81.153.79,93.125.199.45' This node with name Node2 will use ports 9703 and 9704 for nodestack and clientstack respectively ``` On machine with IP 247.81.153.79 you will run ``` -~$ generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 3 --ips '191.177.76.26,22.185.194.102,247.81.153.79,93.125.199.45' +~$ generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 3 --ips '191.177.76.26,22.185.194.102,247.81.153.79,93.125.199.45' This node with name Node3 will use ports 9705 and 9706 for nodestack and clientstack respectively ``` On machine with IP 93.125.199.45 you will run ``` -~$ generate_sovrin_pool_transactions --nodes 4 --clients 5 --nodeNum 4 --ips '191.177.76.26,22.185.194.102,247.81.153.79,93.125.199.45' +~$ generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 4 --ips '191.177.76.26,22.185.194.102,247.81.153.79,93.125.199.45' This node with name Node4 will use ports 9707 and 9708 for nodestack and clientstack respectively ``` -# Sovrin Client +# Indy Client -Sovrin Client to interact with Sovrin Network (public/permissioned distributed ledger) +Indy Client to interact with Indy Network (public/permissioned distributed ledger) ### Setup Instructions #### Run common setup instructions -Follow instructions mentioned here [Common Setup Instructions](https://github.com/sovrin-foundation/sovrin-common/blob/master/setup.md) +Follow instructions mentioned here [Common Setup Instructions](https://github.com/hyperledger-archives/indy-common/blob/master/setup.md) -Follow instructions mentioned here [Charm-Crypto Setup Instructions](https://github.com/sovrin-foundation/sovrin-common/blob/master/setup.md) +Follow instructions mentioned here [Charm-Crypto Setup Instructions](https://github.com/hyperledger-archives/indy-common/blob/master/setup.md) As indy-node depends on [indy-crypto](https://github.com/hyperledger/indy-crypto), it also needs to be installed: @@ -145,7 +145,7 @@ apt-get update -y && apt-get install -y libindy-crypto ### Run tests [Optional] -Note: The tests create Sovrin nodes (dont worry, all nodes are created in the same process) . +Note: The tests create Indy nodes (dont worry, all nodes are created in the same process) . To run the tests, download the source by cloning this repo. Navigate to the root directory of the source and install required packages by @@ -159,41 +159,41 @@ python setup.py pytest ``` -### Installing Sovrin client +### Installing Indy client ``` -pip install -U --no-cache-dir sovrin-client +pip install -U --no-cache-dir indy-client ``` -Note. The tests create Sovrin nodes (dont worry, all nodes are created in the same process). +Note. The tests create Indy nodes (dont worry, all nodes are created in the same process). #### Configuration -### Start Sovrin client CLI (command line interface) -Once installed, you can play with the command-line interface by running Sovrin from a terminal. +### Start Indy client CLI (command line interface) +Once installed, you can play with the command-line interface by running Indy from a terminal. Note: For Windows, we recommended using either [cmder](http://cmder.net/) or [conemu](https://conemu.github.io/). ``` -sovrin +indy ``` -# Sovrin Common +# Indy Common -Common utility functions for other Sovrin repos (like sovrin-client, sovrin-node etc) +Common utility functions for other Indy repos (like indy-client, indy-node etc) ### Charm-Crypto Setup Instructions -Sovrin-client requires anonymous credentials library which requires a cryptographic library. +Indy-client requires anonymous credentials library which requires a cryptographic library. The default configuration includes an example that uses Charm-Crypto framework. -The steps to install charm-crypto are mentioned in our [Anonymous Credentials](https://github.com/evernym/anoncreds) repository. +The steps to install charm-crypto are mentioned in our [Anonymous Credentials](https://github.com/hyperledger/indy-anoncreds) repository. You just have to run `setup-charm.sh` script. It will require sudo privileges on the system. -### Common Setup Instructions (sovrin-client or sovrin-node) +### Common Setup Instructions (indy-client or indy-node) As of Oct 3, these setup instructions are validated at a beta level. We are aware of a few cases where you might hit roadblocks, depending @@ -201,9 +201,9 @@ on what type of development environment you have. In particular, we think you will have a bumpy ride on windows. We are working on improving these instructions. -Developers should explore the [Getting Started Guide](getting-started.md) to learn how Sovrin works. +Developers should explore the [Getting Started Guide](getting-started.md) to learn how Indy works. -The Sovrin codebase makes extensive use of coroutines and the async/await keywords in +The Indy codebase makes extensive use of coroutines and the async/await keywords in Python, and as such, requires Python version 3.5.0 or later. Plenum also depends on libsodium, an awesome crypto library. These need to be installed separately. Read below to see how. diff --git a/setup.py b/setup.py index 186447043..0553375ea 100644 --- a/setup.py +++ b/setup.py @@ -30,14 +30,14 @@ SETUP_DIRNAME = os.path.abspath(SETUP_DIRNAME) -METADATA = os.path.join(SETUP_DIRNAME, 'sovrin_node', '__metadata__.py') +METADATA = os.path.join(SETUP_DIRNAME, 'indy_node', '__metadata__.py') # Load the metadata using exec() so we don't trigger an import of # ioflo.__init__ exec(compile(open(METADATA).read(), METADATA, 'exec')) -BASE_DIR = os.path.join(os.path.expanduser("~"), ".sovrin") -SAMPLE_DIR = os.path.join(BASE_DIR, ".sovrin") -CONFIG_FILE = os.path.join(BASE_DIR, "sovrin_config.py") +BASE_DIR = os.path.join(os.path.expanduser("~"), ".indy") +SAMPLE_DIR = os.path.join(BASE_DIR, ".indy") +CONFIG_FILE = os.path.join(BASE_DIR, "indy_config.py") for path in [BASE_DIR, SAMPLE_DIR]: if not os.path.exists(path): @@ -47,7 +47,7 @@ with open(CONFIG_FILE, 'w') as f: msg = "# Here you can create config entries according to your " \ "needs.\n " \ - "# For help, refer config.py in the sovrin package.\n " \ + "# For help, refer config.py in the indy package.\n " \ "# Any entry you add here would override that from config " \ "example\n" f.write(msg) @@ -72,45 +72,47 @@ def run(self): setup( name='indy-node-dev', version=__version__, - description='Sovrin node', + description='Indy node', url='https://github.com/hyperledger/indy-node', author=__author__, author_email='hyperledger-indy@lists.hyperledger.org', license=__license__, - keywords='Sovrin Node', + keywords='Indy Node', packages=find_packages(exclude=['docs', 'docs*']) + [ 'data'], package_data={ '': ['*.txt', '*.md', '*.rst', '*.json', '*.conf', '*.html', - '*.css', '*.ico', '*.png', 'LICENSE', 'LEGAL', '*.sovrin']}, + '*.css', '*.ico', '*.png', 'LICENSE', 'LEGAL', '*.indy']}, include_package_data=True, data_files=[( (BASE_DIR, ['data/nssm_original.exe']) )], - install_requires=['indy-plenum-dev==1.1.137', - 'indy-anoncreds-dev==1.0.25', + install_requires=['indy-plenum-dev==1.1.138', + 'indy-anoncreds-dev==1.0.32', 'python-dateutil', 'timeout-decorator'], setup_requires=['pytest-runner'], tests_require=['pytest', 'pytest-xdist'], - scripts=['scripts/sovrin', + scripts=['scripts/indy', 'scripts/change_node_ha', 'scripts/add_new_node', 'scripts/reset_client', - 'scripts/start_sovrin_node', - 'scripts/start_node_control_tool.py', + 'scripts/start_indy_node', + 'scripts/start_node_control_tool', 'scripts/clear_node.py', 'scripts/get_keys', - 'scripts/generate_sovrin_pool_transactions', - 'scripts/init_sovrin_keys', - 'scripts/upgrade_sovrin_node_ubuntu1604.sh', - 'scripts/upgrade_sovrin_node_ubuntu1604_test.sh', - 'scripts/upgrade_sovrin_node.bat', - 'scripts/upgrade_sovrin_node_test.bat', + 'scripts/generate_indy_pool_transactions', + 'scripts/init_indy_keys', + 'scripts/upgrade_indy_node_ubuntu1604.sh', + 'scripts/upgrade_indy_node_ubuntu1604_test.sh', + 'scripts/upgrade_indy_node.bat', + 'scripts/upgrade_indy_node_test.bat', + 'scripts/restart_indy_node_ubuntu1604.sh', + 'scripts/restart_indy_node.bat', 'scripts/restart_sovrin_node_ubuntu1604.sh', - 'scripts/restart_sovrin_node.bat', - 'scripts/install_sovrin_node.bat', - 'scripts/delete_sovrin_node.bat', + 'scripts/complete_rebranding_upgrade_ubuntu1604.sh', + 'scripts/install_indy_node.bat', + 'scripts/delete_indy_node.bat', 'scripts/restart_upgrade_agent.bat', 'scripts/install_nssm.bat', 'scripts/read_ledger', diff --git a/sovrin_client/__init__.py b/sovrin_client/__init__.py deleted file mode 100644 index 0eaed4562..000000000 --- a/sovrin_client/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -import os -import sovrin_client - -from sovrin_client.agent.jsonpickle_util import setUpJsonpickle - -from sovrin_common.plugin_helper import writeAnonCredPlugin -BASE_DIR = os.path.join(os.path.expanduser("~"), ".sovrin") -writeAnonCredPlugin(BASE_DIR) - -# This is to setup anoncreds wallet related custom jsonpickle handlers to -# serialize/deserialize it properly -setUpJsonpickle() diff --git a/sovrin_client/test/__main__.py b/sovrin_client/test/__main__.py deleted file mode 100644 index 3a2525742..000000000 --- a/sovrin_client/test/__main__.py +++ /dev/null @@ -1,3 +0,0 @@ -from sovrin_client import test - -test.run() diff --git a/sovrin_client/test/cli/tmp_wallet_restore_issue b/sovrin_client/test/cli/tmp_wallet_restore_issue deleted file mode 100644 index 97ebdb045..000000000 --- a/sovrin_client/test/cli/tmp_wallet_restore_issue +++ /dev/null @@ -1 +0,0 @@ -{"didMethods": {"py/object": "plenum.common.did_method.DidMethods", "default": {"py/id": 61}, "d": {"sovrin": {"py/object": "plenum.common.did_method.DidMethod", "name": "sovrin", "signerConstructor": {"py/type": "plenum.common.signer_did.DidSigner"}, "pattern": "did:sovrin:"}}}, "_nodes": {}, "_pending": {"py/reduce": [{"py/type": "collections.deque"}, {"py/tuple": [[]]}, null, null, null]}, "defaultId": "CzkavE58zgX7rUMrzSinLr", "_upgrades": {}, "_name": "Default", "aliasesToIds": {}, "_trustAnchored": {"ULtgFQJe6bjiFbs7ke3NJD": {"py/object": "sovrin_common.identity.Identity", "identity": {"py/object": "plenum.common.signer_did.DidIdentity", "abbreviated": true, "_identifier": "ULtgFQJe6bjiFbs7ke3NJD", "_verkey": "5kh3FB4H3NKq7tUDqeqHc1"}, "last_synced": null, "seqNo": null, "trustAnchor": null, "_role": "101"}, "CzkavE58zgX7rUMrzSinLr": {"py/object": "sovrin_common.identity.Identity", "identity": {"py/object": "plenum.common.signer_did.DidIdentity", "abbreviated": true, "_identifier": "CzkavE58zgX7rUMrzSinLr", "_verkey": "WjXEvZ9xj4Tz9sLtzf7HVP"}, "last_synced": null, "seqNo": null, "trustAnchor": null, "_role": "101"}}, "_pconfigs": {}, "py/object": "sovrin_client.client.wallet.wallet.Wallet", "ids": {"ULtgFQJe6bjiFbs7ke3NJD": {"py/object": "plenum.client.wallet.IdData", "py/newargs": {"py/tuple": [{"py/object": "plenum.common.signer_did.DidSigner", "sk": {"py/id": 75}, "naclSigner": {"py/object": "stp_core.crypto.nacl_wrappers.Signer", "verhex": {"py/b64": "ZGQ2ZGI4ZWI5MWNmZGNlNTBmMWE0ODhkOTUzMzI1ZGEyNjdlMzYyMzE5N2EwN2Q0MTQ4YjI1ZjM3\nZWZjMjg3ZQ==\n"}, "keyhex": {"py/b64": "NDY2MTYyNjU3MjMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAz\nMDMwMzAzMA==\n"}, "key": {"py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"py/object": "stp_core.crypto.nacl_wrappers.VerifyKey", "_key": {"py/b64": "3W2465HP3OUPGkiNlTMl2iZ+NiMZegfUFIsl8378KH4=\n"}}, "_signing_key": {"py/b64": "RmFiZXIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDDdbbjrkc/c5Q8aSI2VMyXaJn42Ixl6B9QU\niyXzfvwofg==\n"}, "_seed": {"py/b64": "RmFiZXIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}}, "verraw": {"py/b64": "3W2465HP3OUPGkiNlTMl2iZ+NiMZegfUFIsl8378KH4=\n"}, "keyraw": {"py/b64": "RmFiZXIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}}, "_identifier": "ULtgFQJe6bjiFbs7ke3NJD", "_alias": null, "abbreviated": true, "seed": {"py/b64": "RmFiZXIwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}, "_verkey": "5kh3FB4H3NKq7tUDqeqHc1"}, 1502387001630568]}, "py/seq": [{"py/id": 73}, 1502387001630568]}, "Th7MpTaRZVRYnPiabds81Y": {"py/object": "plenum.client.wallet.IdData", "py/newargs": {"py/tuple": [{"py/object": "plenum.common.signer_did.DidSigner", "sk": {"py/id": 70}, "naclSigner": {"py/object": "stp_core.crypto.nacl_wrappers.Signer", "verhex": {"py/b64": "ZDgyNzQ2NThkMjNiYzJlNDE5NGQxMjMyZmZmNzBlMmIzNDRiYWY2MjEwNjdlYjZhYTkyYjJmY2Vm\nMGM5NGU4ZA==\n"}, "keyhex": {"py/b64": "MzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwNTM3NDY1Nzc2\nMTcyNjQzMQ==\n"}, "key": {"py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"py/object": "stp_core.crypto.nacl_wrappers.VerifyKey", "_key": {"py/b64": "2CdGWNI7wuQZTRIy//cOKzRLr2IQZ+tqqSsvzvDJTo0=\n"}}, "_signing_key": {"py/b64": "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwU3Rld2FyZDHYJ0ZY0jvC5BlNEjL/9w4rNEuvYhBn62qp\nKy/O8MlOjQ==\n"}, "_seed": {"py/b64": "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwU3Rld2FyZDE=\n"}}, "verraw": {"py/b64": "2CdGWNI7wuQZTRIy//cOKzRLr2IQZ+tqqSsvzvDJTo0=\n"}, "keyraw": {"py/b64": "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwU3Rld2FyZDE=\n"}}, "_identifier": "Th7MpTaRZVRYnPiabds81Y", "_alias": null, "abbreviated": true, "seed": {"py/b64": "MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwU3Rld2FyZDE=\n"}, "_verkey": "7TYfekw4GUagBnBVCqPjiC"}, 1502385714960301]}, "py/seq": [{"py/id": 68}, 1502385714960301]}, "CzkavE58zgX7rUMrzSinLr": {"py/object": "plenum.client.wallet.IdData", "py/newargs": {"py/tuple": [{"py/object": "plenum.common.signer_did.DidSigner", "sk": {"py/id": 65}, "naclSigner": {"py/object": "stp_core.crypto.nacl_wrappers.Signer", "verhex": {"py/b64": "NjEyNGM3YmQxZmVjYzVkYmI4ZDYyODNkOTljYThjYWJmMGM4ZTU0NDkwMzE1NTM4OTI5NmJhNmE3\nMjYxYTJkZQ==\n"}, "keyhex": {"py/b64": "NDE2MzZkNjUzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAzMDMwMzAz\nMDMwMzAzMA==\n"}, "key": {"py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"py/object": "stp_core.crypto.nacl_wrappers.VerifyKey", "_key": {"py/b64": "YSTHvR/sxdu41ig9mcqMq/DI5USQMVU4kpa6anJhot4=\n"}}, "_signing_key": {"py/b64": "QWNtZTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBhJMe9H+zF27jWKD2Zyoyr8MjlRJAxVTiS\nlrpqcmGi3g==\n"}, "_seed": {"py/b64": "QWNtZTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}}, "verraw": {"py/b64": "YSTHvR/sxdu41ig9mcqMq/DI5USQMVU4kpa6anJhot4=\n"}, "keyraw": {"py/b64": "QWNtZTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}}, "_identifier": "CzkavE58zgX7rUMrzSinLr", "_alias": null, "abbreviated": true, "seed": {"py/b64": "QWNtZTAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA=\n"}, "_verkey": "WjXEvZ9xj4Tz9sLtzf7HVP"}, 1502387801276699]}, "py/seq": [{"py/id": 63}, 1502387801276699]}}, "_attributes": {"json://{\"py/tuple\": [\"73563\", \"CzkavE58zgX7rUMrzSinLr\", \"CzkavE58zgX7rUMrzSinLr\"]}": {"py/object": "sovrin_client.client.wallet.attribute.Attribute", "value": "{\"endpoint\": {\"ha\": \"127.0.0.1:6666\"}}", "origin": "CzkavE58zgX7rUMrzSinLr", "encKey": null, "name": "73563", "seqNo": null, "dest": "CzkavE58zgX7rUMrzSinLr", "ledgerStore": {"py/id": 2}}, "json://{\"py/tuple\": [\"endpoint\", null, \"CzkavE58zgX7rUMrzSinLr\"]}": {"py/object": "sovrin_client.client.wallet.attribute.Attribute", "value": null, "origin": null, "encKey": null, "name": "endpoint", "seqNo": null, "dest": "CzkavE58zgX7rUMrzSinLr", "ledgerStore": {"py/id": 2}}, "json://{\"py/tuple\": [\"endpoint\", null, \"ULtgFQJe6bjiFbs7ke3NJD\"]}": {"py/object": "sovrin_client.client.wallet.attribute.Attribute", "value": null, "origin": null, "encKey": null, "name": "endpoint", "seqNo": null, "dest": "ULtgFQJe6bjiFbs7ke3NJD", "ledgerStore": {"py/id": 2}}, "json://{\"py/tuple\": [\"a0641\", \"CzkavE58zgX7rUMrzSinLr\", \"ULtgFQJe6bjiFbs7ke3NJD\"]}": {"py/object": "sovrin_client.client.wallet.attribute.Attribute", "value": "{\"endpoint\": {\"ha\": \"127.0.0.1:5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}", "origin": "CzkavE58zgX7rUMrzSinLr", "encKey": null, "name": "a0641", "seqNo": null, "dest": "ULtgFQJe6bjiFbs7ke3NJD", "ledgerStore": {"py/id": 2}}, "json://{\"py/tuple\": [\"45884\", \"ULtgFQJe6bjiFbs7ke3NJD\", \"ULtgFQJe6bjiFbs7ke3NJD\"]}": {"py/object": "sovrin_client.client.wallet.attribute.Attribute", "value": "{\"endpoint\": {\"ha\": \"10.0.0.202:5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}", "origin": "ULtgFQJe6bjiFbs7ke3NJD", "encKey": null, "name": "45884", "seqNo": null, "dest": "ULtgFQJe6bjiFbs7ke3NJD", "ledgerStore": {"py/object": "sovrin_client.client.wallet.attribute.LedgerStore", "py/enumvalue": 4}}, "json://{\"py/tuple\": [\"917b5\", \"CzkavE58zgX7rUMrzSinLr\", \"CzkavE58zgX7rUMrzSinLr\"]}": {"py/object": "sovrin_client.client.wallet.attribute.Attribute", "value": "{\"endpoint\": {\"ha\": \"10.0.0.203:6666\"}}", "origin": "CzkavE58zgX7rUMrzSinLr", "encKey": null, "name": "917b5", "seqNo": null, "dest": "CzkavE58zgX7rUMrzSinLr", "ledgerStore": {"py/id": 2}}, "json://{\"py/tuple\": [\"4f3d1\", \"ULtgFQJe6bjiFbs7ke3NJD\", \"ULtgFQJe6bjiFbs7ke3NJD\"]}": {"py/object": "sovrin_client.client.wallet.attribute.Attribute", "value": "{\"endpoint\": {\"ha\": \"127.0.0.1:5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}", "origin": "ULtgFQJe6bjiFbs7ke3NJD", "encKey": null, "name": "4f3d1", "seqNo": null, "dest": "ULtgFQJe6bjiFbs7ke3NJD", "ledgerStore": {"py/id": 2}}, "json://{\"py/tuple\": [\"881bb\", \"CzkavE58zgX7rUMrzSinLr\", \"CzkavE58zgX7rUMrzSinLr\"]}": {"py/object": "sovrin_client.client.wallet.attribute.Attribute", "value": "{\"endpoint\": {\"ha\": \"127.0.0.1:6666\", \"pubkey\": \"C5eqjU7NMVMGGfGfx2ub- vX5H9X346bQt5qeziVAo3naQ\"}}", "origin": "CzkavE58zgX7rUMrzSinLr", "encKey": null, "name": "881bb", "seqNo": null, "dest": "CzkavE58zgX7rUMrzSinLr", "ledgerStore": {"py/id": 2}}, "json://{\"py/tuple\": [\"6db7a\", \"CzkavE58zgX7rUMrzSinLr\", \"CzkavE58zgX7rUMrzSinLr\"]}": {"py/object": "sovrin_client.client.wallet.attribute.Attribute", "value": "{\"endpoint\": {\"ha\": \"10.0.0.203:6666\", \"pubkey\": \"C5eqjU7NMVMGGfGfx2ub- vX5H9X346bQt5qeziVAo3naQ\"}}", "origin": "CzkavE58zgX7rUMrzSinLr", "encKey": null, "name": "6db7a", "seqNo": null, "dest": "CzkavE58zgX7rUMrzSinLr", "ledgerStore": {"py/id": 2}}}, "idsToSigners": {"ULtgFQJe6bjiFbs7ke3NJD": {"py/id": 73}, "JYeHd6Zn3zFo1UbNVBd6U1": {"py/object": "plenum.common.signer_did.DidSigner", "sk": {"py/id": 79}, "naclSigner": {"py/object": "stp_core.crypto.nacl_wrappers.Signer", "verhex": {"py/b64": "OGUxNjY0OGM3Y2IzYWMxNDMzNTc2MmM1YzVhYTkwZDJkM2I1ODY2NGExOTkyNGM2YWUzNmM1ODQ1\nZDE1MTg4OA==\n"}, "keyhex": {"py/b64": "ZTFlZmRjYzRmNmJkN2M4ZjhmMTc2MGFiNTkwY2EzMjllNGJjYTYzNTU4M2E5ZDg5NjRkNDljNTJh\nYTRhM2Y4ZA==\n"}, "key": {"py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"py/object": "stp_core.crypto.nacl_wrappers.VerifyKey", "_key": {"py/b64": "jhZkjHyzrBQzV2LFxaqQ0tO1hmShmSTGrjbFhF0VGIg=\n"}}, "_signing_key": {"py/b64": "4e/cxPa9fI+PF2CrWQyjKeS8pjVYOp2JZNScUqpKP42OFmSMfLOsFDNXYsXFqpDS07WGZKGZJMau\nNsWEXRUYiA==\n"}, "_seed": {"py/b64": "4e/cxPa9fI+PF2CrWQyjKeS8pjVYOp2JZNScUqpKP40=\n"}}, "verraw": {"py/b64": "jhZkjHyzrBQzV2LFxaqQ0tO1hmShmSTGrjbFhF0VGIg=\n"}, "keyraw": {"py/b64": "4e/cxPa9fI+PF2CrWQyjKeS8pjVYOp2JZNScUqpKP40=\n"}}, "_identifier": "JYeHd6Zn3zFo1UbNVBd6U1", "_alias": null, "abbreviated": true, "seed": {"py/b64": "4e/cxPa9fI+PF2CrWQyjKeS8pjVYOp2JZNScUqpKP40=\n"}, "_verkey": "T9HBHeNSXBXZCBB8GrgjFm"}, "Th7MpTaRZVRYnPiabds81Y": {"py/id": 68}, "Siga5PyLFTZdpupPUXogjt": {"py/object": "plenum.common.signer_did.DidSigner", "sk": {"py/id": 83}, "naclSigner": {"py/object": "stp_core.crypto.nacl_wrappers.Signer", "verhex": {"py/b64": "ZDA0NjU4ZGNhMDQ4MjYyNjQ0MmNhZGFiYzZjZWNlMjM0ODc2YTY0MzhkNzBlNWIzNGQ4MTlmZmFj\nODY2MmVlZA==\n"}, "keyhex": {"py/b64": "YWJlZmEzOGNmYjVkYmYzMjljNTZjMjI4YmEzNjAzMzZjNmY2YWJjZWE0MjZlMDFlMTVkZTNiZGU1\nNjUzYjUxMQ==\n"}, "key": {"py/object": "stp_core.crypto.nacl_wrappers.SigningKey", "verify_key": {"py/object": "stp_core.crypto.nacl_wrappers.VerifyKey", "_key": {"py/b64": "0EZY3KBIJiZELK2rxs7OI0h2pkONcOWzTYGf+shmLu0=\n"}}, "_signing_key": {"py/b64": "q++jjPtdvzKcVsIoujYDNsb2q86kJuAeFd473lZTtRHQRljcoEgmJkQsravGzs4jSHamQ41w5bNN\ngZ/6yGYu7Q==\n"}, "_seed": {"py/b64": "q++jjPtdvzKcVsIoujYDNsb2q86kJuAeFd473lZTtRE=\n"}}, "verraw": {"py/b64": "0EZY3KBIJiZELK2rxs7OI0h2pkONcOWzTYGf+shmLu0=\n"}, "keyraw": {"py/b64": "q++jjPtdvzKcVsIoujYDNsb2q86kJuAeFd473lZTtRE=\n"}}, "_identifier": "Siga5PyLFTZdpupPUXogjt", "_alias": null, "abbreviated": true, "seed": {"py/b64": "q++jjPtdvzKcVsIoujYDNsb2q86kJuAeFd473lZTtRE=\n"}, "_verkey": "9wzQSoSNbLwRcNz9JkBFME"}, "CzkavE58zgX7rUMrzSinLr": {"py/id": 63}}, "_prepared": {"json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502387001630568]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "cfbec5716f611b627475f6a9ab69415630a3244a535f9cadd4fe196705bb3e09", "reqId": 1502387001630568, "signature": "SC1JYwuXnpruhGefBZKCyBvCESmAP9vx8SfUWPPmoR1NH2LDHQYj5XV78zBMCEFAXwuZdHmkpEH6Lu35kuxzMCZ", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "104", "raw": "endpoint", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["endpoint", null, "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502385870898879]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "f2c1c5733913f633e7fc58d5b2ec52859979149cdd06e10b578d162c01d25862", "reqId": 1502385870898879, "signature": "5A2BxVk8EowuBT9TKYKWhck9Ng3Bk7Cwo8ego36aWEc4NNx5hNeXwzu37q1FhvmJwZ6fDrRnKvepjCQHXLAL1DbN", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "100", "raw": "{\"endpoint\": {\"ha\": \"127.0.0.1:5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}", "dest": "ULtgFQJe6bjiFbs7ke3NJD"}}}, {"py/tuple": ["4f3d1", "ULtgFQJe6bjiFbs7ke3NJD", "ULtgFQJe6bjiFbs7ke3NJD"]}]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1502387071423304]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "45d33c68b9aa557d7b1300656905a446d9e1924e51f55a07e125396202024e37", "reqId": 1502387071423304, "signature": "2dZMNC37ihe7EXjVxk6s1FENZ6Qr15i6TTk9vyT4kEsYig1D3QQLACrgz88vFwoaiycameMseateEEFPhxvFiarZ", "identifier": "CzkavE58zgX7rUMrzSinLr", "operation": {"type": "105", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, null]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386049567645]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "079b8ed2360cc6a2c686587a613f8c1109b1941154bcee5fcece4ad2464d7f40", "reqId": 1502386049567645, "signature": "2RNPTPq3K2rNb4MFmoYJEza3n7tmLaz696nRxEegASoyYdJDKNGvCAJLCCFYJvAxAh7Y66duQ7fX2byZWE3EWZAc", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "104", "raw": "endpoint", "dest": "ULtgFQJe6bjiFbs7ke3NJD"}}}, {"py/tuple": ["endpoint", null, "ULtgFQJe6bjiFbs7ke3NJD"]}]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1502387057277920]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "1cefcc959335319b7f9c5527e5f4dcbb49a7456ebed2c24fd33cc06ab045bbcb", "reqId": 1502387057277920, "signature": "2yzWAuxduX6dQfw1nJFafU6XTeFYDXqWnxyNrdfFM8cammiz4P6YpoKbWbq7kDVA22FS1Hz13DfLdJ5PEnXJZehs", "identifier": "CzkavE58zgX7rUMrzSinLr", "operation": {"type": "100", "raw": "{\"endpoint\": {\"ha\": \"10.0.0.203:6666\"}}", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["917b5", "CzkavE58zgX7rUMrzSinLr", "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1502385848758045]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "6d45682720c304d825573cd6b9c60bc47d95eda3a70987a4fc410bd6afeadc44", "reqId": 1502385848758045, "signature": "3NLdp4qD15N2CetMjGtrmpQWDKx6ycVVaRtLZ3gKMmzLzxBujvsqQutA7yts74pJPtRodaEPy2w5FvpS7yBzNsr", "identifier": "CzkavE58zgX7rUMrzSinLr", "operation": {"type": "100", "raw": "{\"endpoint\": {\"ha\": \"127.0.0.1:5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}", "dest": "ULtgFQJe6bjiFbs7ke3NJD"}}}, {"py/tuple": ["a0641", "CzkavE58zgX7rUMrzSinLr", "ULtgFQJe6bjiFbs7ke3NJD"]}]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1502387071424365]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "0036694829240ca13b5a9108c2f16fe60213c30f054c9b335b35b95d14dec31c", "reqId": 1502387071424365, "signature": "4bf8VGMVGq6JtWeFXdvD4NhdAMseuZdxnvvxw6QaodiGKA54yRxfShbDG9ff2xrDUQHCPJ1PuYMwPmDanx1gpSoB", "identifier": "CzkavE58zgX7rUMrzSinLr", "operation": {"type": "104", "raw": "endpoint", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["endpoint", null, "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386144574978]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "ca879f3ce42853d26300fae03dc39a5c27cc3e14e8f1578418729de3d19bcf4b", "reqId": 1502386144574978, "signature": "2u2C32ww9GkdBj78haTzKLvgaU4PqJ2N8VYmmoALSpZT5pTgvaGjgFniRPHd1DSwv8MVyt4vX8m26SgL1zDJVJVY", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "104", "raw": "endpoint", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["endpoint", null, "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"Th7MpTaRZVRYnPiabds81Y\", 1502385611413187]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "949dd184333687d9e81d853dc0d981bfc87f56a1757fd4556e2ad2983573f0ea", "reqId": 1502385611413187, "signature": "5vpkHbSFdCJrRbFXe6sAKW8S1zB2QXqisp56gdFsPXRMrx7bD8Z5Q8yLpjcyszTsDePqy1JELgGHAvwZEPU8KvR4", "identifier": "Th7MpTaRZVRYnPiabds81Y", "operation": {"role": "101", "type": "1", "dest": "ULtgFQJe6bjiFbs7ke3NJD", "verkey": "~5kh3FB4H3NKq7tUDqeqHc1"}}}, "ULtgFQJe6bjiFbs7ke3NJD"]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1502385732035030]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "52c6dbfc7fdf04bddf4e6b0bb43d7316edcb2fc820eaab4c2cada0fe34b310da", "reqId": 1502385732035030, "signature": "4RyhbLSRPpahFjk5pthh3tM3de49G2fz77oP42VyRp4DWwMHWbXrRkD6SYVxGGgYaaa8Ep8xhMEQ2QgvDNmHkaDm", "identifier": "CzkavE58zgX7rUMrzSinLr", "operation": {"type": "100", "raw": "{\"endpoint\": {\"ha\": \"10.0.0.203:6666\", \"pubkey\": \"C5eqjU7NMVMGGfGfx2ub- vX5H9X346bQt5qeziVAo3naQ\"}}", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["6db7a", "CzkavE58zgX7rUMrzSinLr", "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386097385267]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "0e116050b139e82912740bca170ac8b550a211c34f9bfc52ddd82bdf8a10460d", "reqId": 1502386097385267, "signature": "3GBVvm55r21RhdYYJS1FYKE67yxo9Dokiv4XePh2DTpfETKRKqi3Lap8BiZUcicwVFKi4RTYZi9sfC75iLuNvFWe", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "108", "origin": "ULtgFQJe6bjiFbs7ke3NJD", "ref": 15, "signature_type": "CL"}}}, null]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386050220665]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "d3f84e2352faca0109598e86e8eb74d5fe4039939b88980a00af24bd26e95cab", "reqId": 1502386050220665, "signature": "3bqWZafGMZY384S5Zi2ugEpamTWamezPfLtHVBW7DH6Hgntpd1KTuLjmLoJLw8nh3f6kUV2w2NAgLuQn5ZEceMvP", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "105", "dest": "JYeHd6Zn3zFo1UbNVBd6U1"}}}, null]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502385681114223]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "c5c275f4963b859d3ca5f84e15e8f09b7bf7ec1fe7e615131daace478b8dee3e", "reqId": 1502385681114223, "signature": "38jKR2T4pQ7ckYqKriuZF2gGoxbr928FCZtMDns5zNVX35DNWFZ3EWNX7pBSiQKa58928oTq4sFFe5h5v6qojAW1", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "100", "raw": "{\"endpoint\": {\"ha\": \"10.0.0.202:5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}", "dest": "ULtgFQJe6bjiFbs7ke3NJD"}}}, {"py/tuple": ["45884", "ULtgFQJe6bjiFbs7ke3NJD", "ULtgFQJe6bjiFbs7ke3NJD"]}]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1502385835239707]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "4bc95d41076677bbfd40407bba1d8ddb69818a79d6a9a24aa57daf0d06ed3770", "reqId": 1502385835239707, "signature": "5R1sAupQwqoee5muMmmud94KWgLvkqkPHxRKj7jPu4VQ5pDCZuvPPpXJXYYSNrtgsDvFurXGg9Jj82S8hEM1H6YH", "identifier": "CzkavE58zgX7rUMrzSinLr", "operation": {"type": "100", "raw": "{\"endpoint\": {\"ha\": \"127.0.0.1:6666\", \"pubkey\": \"C5eqjU7NMVMGGfGfx2ub- vX5H9X346bQt5qeziVAo3naQ\"}}", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["881bb", "CzkavE58zgX7rUMrzSinLr", "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386188150095]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "0e98ffb463973aa6873ca2cbb21b724b7c3711e30dc3f0177c42285ec022763e", "reqId": 1502386188150095, "signature": "3wB4HxjzsPhA74yv4Df4SZBdQYX7s8dAkhyKbdgWSfoMxyQo6tyFPmaHLb3AcE3r7rcngvLdQy9WbTQhxj3HYhBC", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "104", "raw": "endpoint", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["endpoint", null, "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502385899839362]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "e6b83a2dae024a32b5f3c057d3e3f2357291b8fc0e4dae481907c2a9f5e6d1d7", "reqId": 1502385899839362, "signature": "SySAHLvfYw9epanGaKhWsYGWNx7UJ99LTsum4izbgwPxLiMQkS6NhjDMfWMfeoD96rewiP22WJBRkSe2DyfvbPU", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "104", "raw": "endpoint", "dest": "ULtgFQJe6bjiFbs7ke3NJD"}}}, {"py/tuple": ["endpoint", null, "ULtgFQJe6bjiFbs7ke3NJD"]}]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386144573959]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "73a605a704302242669e58cd2f28f58176ab2ed51783f8b3fcb6a06b2fa94fae", "reqId": 1502386144573959, "signature": "3Jz114XGYzyiSMXijXf9j8ttoZh3CsmbjMVwQj2KfFRuVjHosCBsVoPWeJtJfn4gK5MbpmScpyTu4VVFD2qNscWf", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "105", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, null]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386085472327]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "cd0692a09506d71387a4f034887e6ef266dc7cf45591f2b9ed3885589ee7d689", "reqId": 1502386085472327, "signature": "5j57ZRTFhD23fS3dHtYxEvUhK7HzA5UVrbmSszgt2JCw2Dyg228fTaiEtqPDgo7ybdKxXkGjyTfzQPe7c5wVgW9G", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "107", "dest": "ULtgFQJe6bjiFbs7ke3NJD", "data": {"name": "Transcript", "version": "1.2"}}}}, null]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502387001627354]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "adcffa4444661aaa7e0a35653126b616a1941fae3bc66e8fcafa663144a42d18", "reqId": 1502387001627354, "signature": "ybsbW5JHKn9JGKgbGeKEajUhAnCHMixEWuk9E9YUD7r8xgC5EaDaRhpuASSeyfFoymY65Gbmd3qcCNYuk7VuSrA", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "105", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, null]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502386049566532]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "3a7bc6b517611dcfdf704b6903ddabec3507d4ecc272d328493b108ed04bde00", "reqId": 1502386049566532, "signature": "4ghzAiyLavPqsrEr6bYUZMyg87xYtHZ38vQHZrDU3CnJVTXBx9VXRM2qLsPwD8mEN86pMVAT3KdVaD2NJt8VhvgV", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"type": "105", "dest": "ULtgFQJe6bjiFbs7ke3NJD"}}}, null]}, "json://{\"py/tuple\": [\"CzkavE58zgX7rUMrzSinLr\", 1502387801276699]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "39ee07b502bd4d3c6f32b6d2beab3795e4312690514dd57288a3bac7358d82c4", "reqId": 1502387801276699, "signature": "2ByXW61ND5bxZDF9nV593ZoYWmShj7Ld1qYCyEJ6jthoE1BqDcuerUSqc4y1NCPuQy23BUGbT1BvRmPt9EVJfugW", "identifier": "CzkavE58zgX7rUMrzSinLr", "operation": {"type": "100", "raw": "{\"endpoint\": {\"ha\": \"127.0.0.1:6666\"}}", "dest": "CzkavE58zgX7rUMrzSinLr"}}}, {"py/tuple": ["73563", "CzkavE58zgX7rUMrzSinLr", "CzkavE58zgX7rUMrzSinLr"]}]}, "json://{\"py/tuple\": [\"Th7MpTaRZVRYnPiabds81Y\", 1502385714960301]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "eaea017f0c21a8ff39a880853922748895a8495e61b4a51822a73dff7831c028", "reqId": 1502385714960301, "signature": "5AJvDyr6N4enKP31cyXyojoph1KstDGw9VkfNvGdHyY8b4ruEDHE8LU7JEvwxjwLyEVcEcu7j4QMnykjuF63PqA7", "identifier": "Th7MpTaRZVRYnPiabds81Y", "operation": {"role": "101", "type": "1", "dest": "CzkavE58zgX7rUMrzSinLr", "verkey": "~WjXEvZ9xj4Tz9sLtzf7HVP"}}}, "CzkavE58zgX7rUMrzSinLr"]}, "json://{\"py/tuple\": [\"Th7MpTaRZVRYnPiabds81Y\", 1502385655248947]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "d1095621d406da7a2e95d744b8ba4016db73b75e3fe0faaf4a5fa82b94e065f2", "reqId": 1502385655248947, "signature": "3pY9d3kPfaf9g4L7WoeJ7L7eKQ86SRfzJfGfy4yZKn41WXHwvFdtAsGM7ne96GKUtbfJVknvbeCDo6AHxYX9j5Qm", "identifier": "Th7MpTaRZVRYnPiabds81Y", "operation": {"role": "101", "type": "1", "dest": "ULtgFQJe6bjiFbs7ke3NJD", "verkey": "~5kh3FB4H3NKq7tUDqeqHc1"}}}, "ULtgFQJe6bjiFbs7ke3NJD"]}, "json://{\"py/tuple\": [\"ULtgFQJe6bjiFbs7ke3NJD\", 1502385695560631]}": {"py/tuple": [{"py/object": "sovrin_common.types.Request", "py/state": {"digest": "74b080a5afc1beff66f42a87af9c4fcd032f863197c74883e7d302a8b0f18852", "reqId": 1502385695560631, "signature": "4myAj7GnGrUqb9WKtMbTD19rNvX1ToXZmWv4K7MZQP63DdYYzvW9b5n6mzYKnkdnUUQvPvdkweuUBVTJSMdy6bup", "identifier": "ULtgFQJe6bjiFbs7ke3NJD", "operation": {"role": "101", "type": "1", "dest": "CzkavE58zgX7rUMrzSinLr", "verkey": "~WjXEvZ9xj4Tz9sLtzf7HVP"}}}, "CzkavE58zgX7rUMrzSinLr"]}}, "_connections": {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["Faber College", {"proofRequests": [], "internalId": null, "remoteEndPoint": {"py/tuple": ["127.0.0.1", 5555]}, "request_nonce": "b1134a647eb818069c089e7694f63e6d", "name": "Faber College", "connection_status": "Accepted", "trustAnchor": "Faber College", "verifiedClaimProofs": [], "py/object": "sovrin_client.client.wallet.connection.Connection", "connection_last_sync_no": null, "localIdentifier": "JYeHd6Zn3zFo1UbNVBd6U1", "localVerkey": "~T9HBHeNSXBXZCBB8GrgjFm", "remotePubkey": "5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z", "availableClaims": [{"py/object": "anoncreds.protocol.types.AvailableClaim", "py/newargs": {"py/tuple": ["Transcript", "1.2", "ULtgFQJe6bjiFbs7ke3NJD"]}, "py/seq": ["Transcript", "1.2", "ULtgFQJe6bjiFbs7ke3NJD"]}], "connection_last_synced": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+EIChQbHQvKxQ=="]]}, "_remoteVerkey": "~5kh3FB4H3NKq7tUDqeqHc1", "remoteIdentifier": "ULtgFQJe6bjiFbs7ke3NJD"}]}, {"py/tuple": ["Acme Corp", {"proofRequests": [{"py/object": "anoncreds.protocol.types.ProofRequest", "attributes": {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["first_name", "string"]}, {"py/tuple": ["last_name", "string"]}, {"py/tuple": ["phone_number", "string"]}, {"py/tuple": ["degree", "Bachelor of Science, Marketing"]}, {"py/tuple": ["status", "graduated"]}, {"py/tuple": ["ssn", "123-45-6789"]}]}]}, "ts": null, "version": "0.2", "verifiableAttributes": {"777fb1af-a7a0-4f0c-81b8-9e09a8068d16": {"py/object": "anoncreds.protocol.types.AttributeInfo", "py/newargs": {"py/tuple": ["status", null, null]}, "py/seq": ["status", null, null]}, "d5743fcc-d287-4176-a634-3b721d962ea5": {"py/object": "anoncreds.protocol.types.AttributeInfo", "py/newargs": {"py/tuple": ["ssn", null, null]}, "py/seq": ["ssn", null, null]}, "4de5205f-720f-49f0-8397-0576875d904b": {"py/object": "anoncreds.protocol.types.AttributeInfo", "py/newargs": {"py/tuple": ["degree", null, null]}, "py/seq": ["degree", null, null]}}, "nonce": 1871218719015472932666560146158750511756, "seqNo": null, "name": "Job-Application", "predicates": {}, "fulfilledByClaims": [{"py/tuple": [{"py/id": 12}, {"py/id": 14}, {"py/reduce": [{"py/type": "collections.OrderedDict"}, {"py/tuple": []}, null, null, {"py/tuple": [{"py/tuple": ["student_name", "Alice Garcia"]}, {"py/tuple": ["ssn", "123-45-6789"]}, {"py/tuple": ["degree", "Bachelor of Science, Marketing"]}, {"py/tuple": ["year", "2015"]}, {"py/tuple": ["status", "graduated"]}]}]}]}], "selfAttestedAttrs": {}}], "internalId": null, "remoteEndPoint": {"py/tuple": ["10.0.0.203", 6666]}, "request_nonce": "57fbf9dc8c8e6acde33de98c6d747b28c", "name": "Acme Corp", "connection_status": null, "trustAnchor": "Acme Corp", "verifiedClaimProofs": [], "py/object": "sovrin_client.client.wallet.connection.Connection", "connection_last_sync_no": null, "localIdentifier": "Siga5PyLFTZdpupPUXogjt", "localVerkey": "~9wzQSoSNbLwRcNz9JkBFME", "remotePubkey": "C5eqjU7NMVMGGfGfx2ubvX5H9X346bQt5qeziVAo3naQ", "availableClaims": [], "connection_last_synced": {"py/object": "datetime.datetime", "__reduce__": [{"py/type": "datetime.datetime"}, ["B+EIChQsHwmWIA=="]]}, "_remoteVerkey": "~WjXEvZ9xj4Tz9sLtzf7HVP", "remoteIdentifier": "CzkavE58zgX7rUMrzSinLr"}]}]}]}, "replyHandler": {}, "knownIds": {"ULtgFQJe6bjiFbs7ke3NJD": {"py/object": "sovrin_common.identity.Identity", "identity": {"py/object": "plenum.common.signer_did.DidIdentity", "abbreviated": null, "_identifier": "ULtgFQJe6bjiFbs7ke3NJD", "_verkey": null}, "last_synced": null, "seqNo": null, "trustAnchor": null, "_role": null}, "JYeHd6Zn3zFo1UbNVBd6U1": {"py/object": "sovrin_common.identity.Identity", "identity": {"py/object": "plenum.common.signer_did.DidIdentity", "abbreviated": null, "_identifier": "JYeHd6Zn3zFo1UbNVBd6U1", "_verkey": null}, "last_synced": null, "seqNo": null, "trustAnchor": null, "_role": null}, "CzkavE58zgX7rUMrzSinLr": {"py/object": "sovrin_common.identity.Identity", "identity": {"py/object": "plenum.common.signer_did.DidIdentity", "abbreviated": null, "_identifier": "CzkavE58zgX7rUMrzSinLr", "_verkey": null}, "last_synced": null, "seqNo": null, "trustAnchor": null, "_role": null}}, "lastKnownSeqs": {}, "env": "no-env", "classver/sovrin_client.client.wallet.wallet.Wallet": 1} \ No newline at end of file diff --git a/sovrin_client/test/test.log b/sovrin_client/test/test.log deleted file mode 100644 index e69de29bb..000000000 diff --git a/sovrin_common/did_method.py b/sovrin_common/did_method.py deleted file mode 100644 index 4382467a7..000000000 --- a/sovrin_common/did_method.py +++ /dev/null @@ -1,5 +0,0 @@ -from plenum.common.did_method import DidMethod -from plenum.common.did_method import DidMethods - -SovrinDidMethod = DidMethod('sovrin', 'did:sovrin:') -DefaultDidMethods = DidMethods(SovrinDidMethod) diff --git a/sovrin_common/plugin_helper.py b/sovrin_common/plugin_helper.py deleted file mode 100644 index 1d386d7df..000000000 --- a/sovrin_common/plugin_helper.py +++ /dev/null @@ -1,69 +0,0 @@ -import os - -from sovrin_common.config_util import getConfig - - -def writeAnonCredPlugin(baseDir, reloadTestModules: bool=False): - config = getConfig() - pluginsPath = os.path.expanduser(os.path.join(baseDir, config.PluginsDir)) - - if not os.path.exists(pluginsPath): - os.makedirs(pluginsPath) - - initFile = pluginsPath + "/__init__.py" - with open(initFile, "a"): - pass - - anonPluginFilePath = pluginsPath + "/anoncreds.py" - anonPluginContent = "" \ - "import importlib\n" \ - "\n" \ - "import anoncreds.protocol.issuer\n" \ - "import anoncreds.protocol.verifier\n" \ - "import anoncreds.protocol.prover\n" \ - "\n" \ - "import sovrin_client.anon_creds.issuer\n" \ - "import sovrin_client.anon_creds.verifier\n"\ - "import sovrin_client.anon_creds.prover\n" \ - "\n" \ - "Name = \"Anon creds\"\n" \ - "Version = 1.1\n" \ - "SovrinVersion = 1.1\n" \ - "\n" \ - "sovrin_client.anon_creds.issuer.Credential = anoncreds.protocol.types.Credential\n" \ - "sovrin_client.anon_creds.issuer.AttribType = anoncreds.protocol.types.AttribType\n" \ - "sovrin_client.anon_creds.issuer.AttribDef = anoncreds.protocol.types.AttribDef\n" \ - "sovrin_client.anon_creds.issuer.Attribs = anoncreds.protocol.types.Attribs\n" \ - "sovrin_client.anon_creds.issuer.AttrRepo = anoncreds.protocol.attribute_repo.AttrRepo\n" \ - "sovrin_client.anon_creds.issuer.InMemoryAttrRepo = anoncreds.protocol.attribute_repo.InMemoryAttrRepo\n" \ - "sovrin_client.anon_creds.issuer.Issuer = anoncreds.protocol.issuer.Issuer\n" \ - "sovrin_client.anon_creds.prover.Prover = anoncreds.protocol.prover.Prover\n" \ - "sovrin_client.anon_creds.verifier.Verifier = anoncreds.protocol.verifier.Verifier\n" \ - "sovrin_client.anon_creds.proof_builder.ProofBuilder = anoncreds.protocol.proof_builder.ProofBuilder\n" \ - "sovrin_client.anon_creds.proof_builder.Proof = anoncreds.protocol.types.Proof\n" \ - "sovrin_client.anon_creds.cred_def.CredDef = anoncreds.protocol.credential_definition.CredentialDefinition\n" \ - - modules_to_reload = ["sovrin_client.cli.cli"] - test_modules_to_reload = [ - "sovrin_client.test.helper", "sovrin_client.test.cli.helper", - "sovrin_client.test.anon_creds.conftest", - "sovrin_client.test.anon_creds.test_anon_creds", - # "sovrin_client.test.anon_creds.anon_creds_demo" - ] - - if reloadTestModules: - modules_to_reload.extend(test_modules_to_reload) - - reload_module_code = \ - "reload_modules = " + str(modules_to_reload) + "\n" \ - "for m in reload_modules:\n" \ - " try:\n" \ - " module_obj = importlib.import_module(m)\n" \ - " importlib.reload(module_obj)\n" \ - " except AttributeError as ae:\n" \ - " print(\"Plugin loading failed: module {}, detail: {}\".format(m, str(ae)))\n" \ - "\n" - - anonPluginContent += reload_module_code - with open(anonPluginFilePath, "w") as f: - f.write(anonPluginContent) diff --git a/sovrin_common/test/__main__.py b/sovrin_common/test/__main__.py deleted file mode 100644 index bd792ce72..000000000 --- a/sovrin_common/test/__main__.py +++ /dev/null @@ -1,3 +0,0 @@ -from sovrin_common import test - -test.run() diff --git a/sovrin_common/test/test_transactions.py b/sovrin_common/test/test_transactions.py deleted file mode 100644 index b1d911e22..000000000 --- a/sovrin_common/test/test_transactions.py +++ /dev/null @@ -1,58 +0,0 @@ -from sovrin_common.constants import NYM, NODE, ATTRIB, SCHEMA, CLAIM_DEF, DISCLO, GET_ATTR, GET_NYM, GET_TXNS, \ - GET_SCHEMA, GET_CLAIM_DEF, POOL_UPGRADE, NODE_UPGRADE, POOL_CONFIG -from sovrin_common.transactions import SovrinTransactions - - -def testTransactionsAreEncoded(): - assert NODE == "0" - assert NYM == "1" - assert GET_TXNS == "3" - assert ATTRIB == "100" - assert SCHEMA == "101" - assert CLAIM_DEF == "102" - assert DISCLO == "103" - assert GET_ATTR == "104" - assert GET_NYM == "105" - assert GET_SCHEMA == "107" - assert GET_CLAIM_DEF == "108" - assert POOL_UPGRADE == "109" - assert NODE_UPGRADE == "110" - assert POOL_CONFIG == "111" - - -def testTransactionEnumDecoded(): - assert SovrinTransactions.NODE.name == "NODE" - assert SovrinTransactions.NYM.name == "NYM" - - assert SovrinTransactions.ATTRIB.name == "ATTRIB" - assert SovrinTransactions.SCHEMA.name == "SCHEMA" - assert SovrinTransactions.CLAIM_DEF.name == "CLAIM_DEF" - - assert SovrinTransactions.DISCLO.name == "DISCLO" - assert SovrinTransactions.GET_ATTR.name == "GET_ATTR" - assert SovrinTransactions.GET_NYM.name == "GET_NYM" - assert SovrinTransactions.GET_TXNS.name == "GET_TXNS" - assert SovrinTransactions.GET_SCHEMA.name == "GET_SCHEMA" - assert SovrinTransactions.GET_CLAIM_DEF.name == "GET_CLAIM_DEF" - assert SovrinTransactions.POOL_UPGRADE.name == "POOL_UPGRADE" - assert SovrinTransactions.NODE_UPGRADE.name == "NODE_UPGRADE" - assert SovrinTransactions.POOL_CONFIG.name == "POOL_CONFIG" - - -def testTransactionEnumEncoded(): - assert SovrinTransactions.NODE.value == "0" - assert SovrinTransactions.NYM.value == "1" - assert SovrinTransactions.GET_TXNS.value == "3" - - assert SovrinTransactions.ATTRIB.value == "100" - assert SovrinTransactions.SCHEMA.value == "101" - assert SovrinTransactions.CLAIM_DEF.value == "102" - - assert SovrinTransactions.DISCLO.value == "103" - assert SovrinTransactions.GET_ATTR.value == "104" - assert SovrinTransactions.GET_NYM.value == "105" - assert SovrinTransactions.GET_SCHEMA.value == "107" - assert SovrinTransactions.GET_CLAIM_DEF.value == "108" - assert SovrinTransactions.POOL_UPGRADE.value == "109" - assert SovrinTransactions.NODE_UPGRADE.value == "110" - assert SovrinTransactions.POOL_CONFIG.value == "111" diff --git a/sovrin_node/test/__main__.py b/sovrin_node/test/__main__.py deleted file mode 100644 index cc9ae7ce9..000000000 --- a/sovrin_node/test/__main__.py +++ /dev/null @@ -1,3 +0,0 @@ -from sovrin_node import test - -test.run()