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

Add mediator and simple client implementation #977

Merged
merged 78 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
1ca8468
Mediator oob invitation poc
nain-F49FF806 Sep 27, 2023
066cfbf
catch panics
nain-F49FF806 Sep 27, 2023
9b3f954
Take endpoint root address from environment variable
nain-F49FF806 Sep 27, 2023
ab1ca13
Add readme with instructions
nain-F49FF806 Sep 27, 2023
3ee2b5f
Add simple client implementation
nain-F49FF806 Sep 27, 2023
0108c99
Add binary (functional) crate for client
nain-F49FF806 Sep 27, 2023
11fe11f
docs: update mediator/README.md
nain-F49FF806 Sep 27, 2023
0877882
util fixes
nain-F49FF806 Sep 27, 2023
eef2113
Implement client TUI
nain-F49FF806 Sep 27, 2023
0713b97
Add tui client to readme
nain-F49FF806 Sep 27, 2023
0b78a30
Move main binary crate to dedicated file under ./bin
nain-F49FF806 Sep 27, 2023
98bfe70
feat(mediator-client): better error handling, pack message before sen…
nain-F49FF806 Sep 27, 2023
59cf62f
feat(mediator): respond to connection request
nain-F49FF806 Sep 27, 2023
f55ce39
feat(mediator): simplify result passing
nain-F49FF806 Sep 27, 2023
6f5996f
feat(mediator-client): complete connection
nain-F49FF806 Sep 27, 2023
35aa32e
feat(mediator): construct agent in main binary crate itself
nain-F49FF806 Sep 27, 2023
3d3cfd7
Clippy fixes
nain-F49FF806 Sep 27, 2023
2cb5aed
chore: cargo +nightly fmt
nain-F49FF806 Sep 27, 2023
c951359
feat(mediator): Use UnpackMessage struct newly defined in aries
nain-F49FF806 Sep 27, 2023
b60b5de
build(deps): add xum-test-server (containing mediator service utils) …
nain-F49FF806 Sep 27, 2023
52ecd88
feat(agent): add dependency on storage aka persistence
nain-F49FF806 Sep 27, 2023
9e86d85
feat(agent): Make agent not generic.
nain-F49FF806 Sep 27, 2023
c83c99f
feat(mediator): persistance poc.
nain-F49FF806 Sep 28, 2023
6ffa1ba
chore(agent): Synchronize with changers in aries-vcx
nain-F49FF806 Oct 4, 2023
5c24d58
chore(lint): cargo +nightly fmt
nain-F49FF806 Oct 4, 2023
75bb097
feat(mediator-client): add functions to save contact info
nain-F49FF806 Oct 4, 2023
5b0c0a9
chore(refactor): move tui.rs
nain-F49FF806 Oct 5, 2023
b1a4a40
feat(agent-client): Add function to list saved accounts
nain-F49FF806 Oct 5, 2023
40b6c67
feat(client-tui): Add ui to list contacts.
nain-F49FF806 Oct 6, 2023
2611560
chore: Use generic agent as we now need explicit wallet type in some …
nain-F49FF806 Oct 6, 2023
bca6679
chore: cargo +nightly fmt
nain-F49FF806 Oct 6, 2023
696d251
Add json endpoint for oob invite. and make existing one flexible
nain-F49FF806 Oct 9, 2023
4036be1
tests(mediator-oob): Add tests for mediator server oob endpoints
nain-F49FF806 Oct 9, 2023
7c3cd45
feat(mediator-client): Implement complete connection flow in agent, a…
nain-F49FF806 Oct 9, 2023
1807345
chore(mediator-client): debloat
nain-F49FF806 Oct 9, 2023
18613ee
feat(mediator-coord): Update agent struct (generic vs type erasure) a…
nain-F49FF806 Oct 12, 2023
d63ff8b
feat(mediator-coord): fixes and improvements while adding tests
nain-F49FF806 Oct 12, 2023
298650a
feat(mediator-coord): respond with routing key in mediator grant message
nain-F49FF806 Oct 12, 2023
88951c6
chore: improve test slightly - assert expected data received.
nain-F49FF806 Oct 12, 2023
67b5279
chore: cargo +nightly fmt
nain-F49FF806 Oct 12, 2023
25bf892
suggestions from pr review
nain-F49FF806 Oct 12, 2023
4af6127
build(deps): update to regular sqlx in sync with transition in aries-vcx
nain-F49FF806 Oct 12, 2023
4687914
ci: Add mediator ci/testing to aries-vcx
nain-F49FF806 Oct 12, 2023
142abd9
ci: Add mediator ci/testing to aries-vcx
nain-F49FF806 Oct 12, 2023
5960f1c
ci(mediator): test ci on single branch only first.
nain-F49FF806 Oct 12, 2023
296684b
ci: update mediator.pr.yml
nain-F49FF806 Oct 12, 2023
608a646
chore: fix typo in github ci file
nain-F49FF806 Oct 12, 2023
f810a9e
chore: cargo clippy fixes
nain-F49FF806 Oct 12, 2023
293478d
fix: add missing migrations (for mysql database)
nain-F49FF806 Oct 12, 2023
04fe2e3
chore: cargo +nightly fmt
nain-F49FF806 Oct 12, 2023
b01ac46
chore & fix: clippy, run binary along with tests
nain-F49FF806 Oct 12, 2023
e3a5952
feat(mediator-coord): support all mediation-coord methods.
nain-F49FF806 Oct 13, 2023
240ea69
refactor(mediator): step1: separate concerns,explicit pathname
nain-F49FF806 Oct 18, 2023
271df64
chore: cargo +nightly fmt
nain-F49FF806 Oct 18, 2023
fde73dc
refactor(mediator): move to different subdirectory
nain-F49FF806 Oct 19, 2023
8395967
refactor: regular target dir
nain-F49FF806 Oct 19, 2023
38df22b
refactor(mediator): conditional compilation of client tui.
nain-F49FF806 Oct 19, 2023
8386049
chore: delete Cargo.lock
nain-F49FF806 Oct 19, 2023
77fdaec
refactor: move client features behind feature flags
nain-F49FF806 Oct 19, 2023
ca77ca0
cargo +nightly fmt
nain-F49FF806 Oct 19, 2023
f7a459f
refactor: inline mediation code (including mediator persistence)
nain-F49FF806 Oct 19, 2023
45842ec
cargo +nightly fmt
nain-F49FF806 Oct 19, 2023
7e6f468
clippy fixes
nain-F49FF806 Oct 19, 2023
b11bd27
cargo +nightly fmt inlined package
nain-F49FF806 Oct 19, 2023
05cea28
refactor: comment out unimplemented features
nain-F49FF806 Oct 19, 2023
70c36e1
refactor: move didcomm+protocol handlers to separate layer
nain-F49FF806 Oct 19, 2023
ed87eba
chore: small cleanup changes.
nain-F49FF806 Oct 19, 2023
a02c1fe
ci(mediator): ci fixes and other fixes
nain-F49FF806 Oct 19, 2023
4e2f09a
chore(mediator-client): cleanup agent client code
nain-F49FF806 Oct 19, 2023
8a7a45b
docs: Update readme, and client endpoint
nain-F49FF806 Oct 19, 2023
7d351cf
build(deps): update version number after refactor
nain-F49FF806 Oct 19, 2023
7474032
ci: update sqlx database migrations path
nain-F49FF806 Oct 19, 2023
03053f3
test: separate repeated pieces of code into own functions
nain-F49FF806 Oct 19, 2023
2b4cc37
chore: cargo clipy --tests
nain-F49FF806 Oct 19, 2023
fbc0987
refactor: rename AgentMaker -> AgentBuilder
nain-F49FF806 Oct 20, 2023
df49c68
refactor(mediator-client): move to separate package
nain-F49FF806 Oct 20, 2023
e020eba
refactor(mediator-client-tui): move to separate package
nain-F49FF806 Oct 20, 2023
23fd9fa
Merge branch 'main' into nain/mediator-client
Patrik-Stas Oct 24, 2023
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
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ jobs:
rust-toolchain-version: ${{ env.RUST_TOOLCHAIN_VERSON }}
skip-docker-setup: true
- name: "Run workspace unit tests"
run: RUST_TEST_THREADS=1 cargo test --workspace --lib --exclude aries-vcx-agent --exclude libvdrtools --exclude wallet_migrator
run: RUST_TEST_THREADS=1 cargo test --workspace --lib --exclude aries-vcx-agent --exclude libvdrtools --exclude wallet_migrator --exclude mediator

test-integration-aries-vcx:
needs: workflow-setup
Expand Down Expand Up @@ -402,6 +402,8 @@ jobs:
- name: "Run integration tests"
run: (cd agents/node/vcxagent-core && AGENCY_URL=http://localhost:8080 npm run test:integration)



##########################################################################################
############################ NPMJS PUBLISHING #######################################

Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/mediator.pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI mediator

on:
push:
branches:
- main
pull_request:
branches:
- "**"
paths:
Patrik-Stas marked this conversation as resolved.
Show resolved Hide resolved
- 'agents/rust/mediator/**'

env:
DOCKER_BUILDKIT: 1
MAIN_BRANCH: main
URL_DOCKER_REGISTRY: ghcr.io
DOCKER_IMAGE_AGENCY: ghcr.io/absaoss/vcxagencynode/vcxagency-node:2.6.0
DOCKER_IMAGE_POOL: ghcr.io/hyperledger/aries-vcx/indy_pool_localhost:1.15.0

DOCKER_REPO_LOCAL_VDRPROXY: vdrproxy

RUST_TOOLCHAIN_VERSON: 1.70.0
NODE_VERSION: 18.x

jobs:

test-integration-mediator:
runs-on: ubuntu-22.04
services:
mysql:
image: mysql:latest
env:
MYSQL_DATABASE: mediator-persistence.mysql
MYSQL_USER: admin
MYSQL_PASSWORD: github.ci.password.no.prod
MYSQL_ROOT_PASSWORD: github.ci.password.no.prod
ports:
- '3326:3306'
env:
MYSQL_URL: mysql://admin:github.ci.password.no.prod@localhost:3326/mediator-persistence.mysql
steps:
- name: "Git checkout"
uses: actions/checkout@v3
- name: "Setup rust testing environment"
uses: ./.github/actions/setup-testing-rust
with:
rust-toolchain-version: ${{ env.RUST_TOOLCHAIN_VERSON }}
skip-docker-setup: true
skip-vdrproxy-setup: true
- name: Install prerequisites (sqlx)
# uses: Swatinem/rust-cache@v2
run: cargo install sqlx-cli
- name: Setup database
run: DATABASE_URL=${MYSQL_URL} sqlx migrate run --source agents/rust/mediator/mediation/migrations
- name: "Run mediator integration tests"
run: cargo run --bin mediator & sleep 5 && cargo test --verbose --package mediator -- --nocapture;
Loading
Loading