Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance aries_vcx crate readme #1043

Merged
merged 3 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
sudo apt-get install -y libsodium-dev libssl-dev libzmq3-dev
- name: "Verify clippy across the entire workspace with default features"
run: |
cargo clippy -p aries-vcx --features legacy_proof --features ${{ matrix.backend }} --no-default-features
cargo clippy -p aries_vcx --features legacy_proof --features ${{ matrix.backend }} --no-default-features
env:
RUSTFLAGS: -D warnings

Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
run: |
RUSTFLAGS='-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' \
RUSTDOCFLAGS='-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' \
RUST_TEST_THREADS=1 CARGO_INCREMENTAL=0 TEST_POOL_IP=127.0.0.1 cargo test --package aries-vcx -F vdrtools_wallet credx -- --ignored;
RUST_TEST_THREADS=1 CARGO_INCREMENTAL=0 TEST_POOL_IP=127.0.0.1 cargo test --package aries_vcx -F vdrtools_wallet credx -- --ignored;

mkdir -p /tmp/artifacts/coverage
grcov ./target/debug/ -s . -t lcov --llvm --branch --ignore-not-existing -o /tmp/artifacts/coverage/coverage.lcov
Expand Down Expand Up @@ -294,7 +294,7 @@ jobs:
uses: ./.github/actions/setup-testing-rust
with:
rust-toolchain-version: ${{ env.RUST_TOOLCHAIN_VERSON }}
- name: "Run aries-vcx tests: mysql_test"
- name: "Run aries_vcx tests: mysql_test"
run: RUST_TEST_THREADS=1 cargo test --manifest-path="aries_vcx/Cargo.toml" test_mysql -- --include-ignored;

test-integration-aries-vcx-vdrproxy:
Expand All @@ -318,7 +318,7 @@ jobs:
with:
rust-toolchain-version: ${{ env.RUST_TOOLCHAIN_VERSON }}
skip-vdrproxy-setup: false
- name: "Run aries-vcx tests: vdrproxy_test"
- name: "Run aries_vcx tests: vdrproxy_test"
run: RUST_TEST_THREADS=1 cargo test --manifest-path="aries_vcx/Cargo.toml" -F vdr_proxy_ledger credx -- --ignored
- name: "Collect docker logs on failure"
if: failure()
Expand Down
44 changes: 22 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion agents/rust/aries-vcx-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition.workspace = true

[dependencies]
serde = "1.0.145"
aries-vcx = { path = "../../../aries_vcx" }
aries_vcx = { path = "../../../aries_vcx" }
aries_vcx_core = { path = "../../../aries_vcx_core", features = ["credx", "vdrtools_wallet"] }
shared_vcx = { path = "../../../shared_vcx" }
async-trait = "0.1.64"
Expand Down
2 changes: 1 addition & 1 deletion agents/rust/mediator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ client = []

[dependencies]
anyhow = "1.0.75"
aries-vcx = { path = "../../../aries_vcx" }
aries_vcx = { path = "../../../aries_vcx" }
aries_vcx_core = { path = "../../../aries_vcx_core", features = [
"vdrtools_wallet",
] }
Expand Down
2 changes: 1 addition & 1 deletion aries_vcx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]

name = "aries-vcx"
name = "aries_vcx"
version.workspace = true
authors.workspace = true
license.workspace = true
Expand Down
45 changes: 19 additions & 26 deletions aries_vcx/README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,31 @@
# aries-vcx
`aries-vcx` is more of a "library" rather than "framework". We strive to be not too
opinionated and simply provide building blocks for whatever you want to build.

You can use `aries-vcx` to build both end-user products (mobile wallets in role of credential
holder and prover) or server (typically in role of issuer, verifier).

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.

## `aries-vcx` components
Additionally, the following crates may be consumed independently of `aries-vcx`:
- [messages](../messages) - crate for building and parsing Aries messages
- [diddoc](../diddoc) - crate to work with DIDDocs

### Deprecation notice: Message mediation
Aries-vcx contains built-in support for message mediation which is useful for mobile use cases. However,
this feature (implemented via `MediatedConnection`) is now deprecated as it is tied to mediator
implementation [vcxagency-node](https://github.com/AbsaOSS/vcxagencynode) which does not implement
Aries [pick-up protocol](https://github.com/hyperledger/aries-rfcs/tree/main/features/0685-pickup-v2).
# `aries_vcx` crate
Provides basic tools to build didcomm/aries enabled application in Rust. This can include native mobile apps, or
webservers for VC issuance/verification, didcomm mediator service etc.

#### What this crate can do for you
- Create encrypted wallet.
- Read/write from/to Indy ledger.
- Establish didcomm connections and exchange messages.
- Create and process Aries messages to drive Aries protocols (especially for VC issuance and presentation).

#### What does crate does NOT DO for you
- Provide message outbounds - `aries_vcx` helps you to create correct response & encrypt it, but you have to take care
of sending it to the right place.
- Automatic inbound processing - you have to take care of receiving messages and passing them to `aries_vcx` for processing.
You need to keep track of your ongoing aries "conversations" and match incoming messages (typically based on message thread id).

# Getting started
To use `aries-vcx` in your project, you need to add GitHub dependency to your `Cargo.toml`, and best
To use `aries_vcx` in your project, you need to add GitHub dependency to your `Cargo.toml`, and best
define a version through a `tag`:
```toml
aries-vcx = { tag = "0.61.0", git = "https://github.com/hyperledger/aries-vcx" }
```
It's also advisable to follow these [instructions](TUTORIAL.md) to check your environment is properly configured.

# Projects built with aries-vcx
- [aries-vcx-agent](../agents/rust/aries-vcx-agent) - sample agent with local persistence. Used for cross-compatibility testing with other aries implementations.
- [unifii_aries_vcx](../uniffi_aries_vcx) - wrapper around `aries-vcx` to generate Swift and Kotlin wrappers for mobile use-cases
- [mediator](../agents/rust/mediator) - Message mediator web service, useful for mobile device to receive messages while the device is offline.
- [unifii_aries_vcx](../uniffi_aries_vcx) - Mobile wrapper to autogenerate Swift and Kotlin wrappers. Also comes with sample native mobile app.
- [aries-vcx-agent](../agents/rust/aries-vcx-agent) - Sample agent framework adding persistence and message matching on top of `aries_vcx`. Used for cross-compatibility testing with other aries implementations.

## 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)
Expand Down
2 changes: 1 addition & 1 deletion did_resolver_sov/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ thiserror = "1.0.40"
url = "2.3.1"

[dev-dependencies]
aries-vcx = { path = "../aries_vcx" }
aries_vcx = { path = "../aries_vcx" }
tokio = { version = "1.27.0", default-features = false, features = ["macros", "rt"] }
uuid = "1.3.1"
test_utils = {path = "../tools/test_utils", features = ["vdrtools_wallet"] }
2 changes: 1 addition & 1 deletion libvcx_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ serde = "1.0.97"
serde_json = "1.0.40"
serde_derive = "1.0.97"
futures = { version = "0.3", default-features = false }
aries-vcx = { path = "../aries_vcx", features = ["credx", "vdrtools_wallet"] }
aries_vcx = { path = "../aries_vcx", features = ["credx", "vdrtools_wallet"] }
aries_vcx_core = { path = "../aries_vcx_core" }
diddoc_legacy = { path = "../diddoc_legacy" }
thiserror = "1.0.37"
Expand Down
2 changes: 1 addition & 1 deletion uniffi_aries_vcx/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ path = "uniffi-bindgen.rs"

[dependencies]
uniffi = { version = "0.23.0", features = ["cli"] }
aries-vcx = { path = "../../aries_vcx", features = [
aries_vcx = { path = "../../aries_vcx", features = [
"vdrtools_wallet",
"credx",
] }
Expand Down
Loading