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

Reorganize crates #1059

Merged
merged 5 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .github/actions/build-napi/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
with:
node-version: ${{ inputs.node-version }}
cache: npm
cache-dependency-path: ${{ github.workspace }}/wrappers/vcx-napi-rs/package-lock.json
cache-dependency-path: ${{ github.workspace }}/aries/wrappers/vcx-napi-rs/package-lock.json
- name: Install
uses: actions-rs/toolchain@v1
if: ${{ !inputs.docker }}
Expand All @@ -43,7 +43,7 @@ runs:
key: ${{ inputs.target }}-cargo-registry
- name: Install dependencies
run: npm install
working-directory: ${{ github.workspace }}/wrappers/vcx-napi-rs
working-directory: ${{ github.workspace }}/aries/wrappers/vcx-napi-rs
shell: bash
- name: Build in docker
uses: addnab/docker-run-action@v3
Expand All @@ -55,11 +55,11 @@ runs:
- name: Build
run: ${{ inputs.build }}
if: ${{ !inputs.docker }}
working-directory: ${{ github.workspace }}/wrappers/vcx-napi-rs
working-directory: ${{ github.workspace }}/aries/wrappers/vcx-napi-rs
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: bindings-${{ inputs.target }}
path: ${{ github.workspace }}/wrappers/vcx-napi-rs/*.node
path: ${{ github.workspace }}/aries/wrappers/vcx-napi-rs/*.node
if-no-files-found: error
10 changes: 5 additions & 5 deletions .github/actions/publish-napi/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ runs:
with:
node-version: ${{ inputs.node-version }}
cache: npm
cache-dependency-path: ${{ github.workspace }}/wrappers/vcx-napi-rs/package-lock.json
cache-dependency-path: ${{ github.workspace }}/aries/wrappers/vcx-napi-rs/package-lock.json
- name: Install dependencies
run: npm install
working-directory: ${{ github.workspace }}/wrappers/vcx-napi-rs
working-directory: ${{ github.workspace }}/aries/wrappers/vcx-napi-rs
shell: bash
- name: Download napi artifacts
uses: actions/download-artifact@v3
with:
path: ${{ github.workspace }}/wrappers/vcx-napi-rs/artifacts
path: ${{ github.workspace }}/aries/wrappers/vcx-napi-rs/artifacts
- name: Move artifacts
run: |
find . -type d -not -path \*\*/artifacts/bindings-\* -path \*\*/artifacts/\*\* -mindepth 2 -maxdepth 2 -exec rm -rf {} \+
ls -R artifacts
npm run artifacts
working-directory: ${{ github.workspace }}/wrappers/vcx-napi-rs
working-directory: ${{ github.workspace }}/aries/wrappers/vcx-napi-rs
shell: bash
- name: Publish
run: |
Expand All @@ -45,7 +45,7 @@ runs:
else
echo "New version was not defined, skipping release."
fi
working-directory: ${{ github.workspace }}/wrappers/vcx-napi-rs
working-directory: ${{ github.workspace }}/aries/wrappers/vcx-napi-rs
shell: bash
env:
NPMJS_TOKEN: ${{ inputs.npmjs-token }}
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/setup-testing-nodejs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ runs:
docker-compose -f ./.github/ci/agency/docker-compose.yml up -d
- name: "Build binding module"
shell: bash
run: (cd wrappers/vcx-napi-rs && npm install && npm run build:napi:debug)
run: (cd aries/wrappers/vcx-napi-rs && npm install && npm run build:napi:debug)
- name: "Transpile TS wrapper"
shell: bash
run: (cd wrappers/node && npm install && npm run compile)
run: (cd aries/wrappers/node && npm install && npm run compile)
- name: "Check wrappers"
shell: bash
run: |
ls -lah wrappers/vcx-napi-rs
ls -lah wrappers/node
ls -lah aries/wrappers/vcx-napi-rs
ls -lah aries/wrappers/node
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ jobs:
rust-toolchain-version: ${{ env.RUST_TOOLCHAIN_VERSON }}
- name: "Run libvcx_core integration tests"
run: |
RUST_TEST_THREADS=1 cargo test --manifest-path="libvcx_core/Cargo.toml" -- --include-ignored;
RUST_TEST_THREADS=1 cargo test --manifest-path="aries/legacy/libvcx_core/Cargo.toml" -- --include-ignored;

test-integration-did-crate:
needs: workflow-setup
Expand Down Expand Up @@ -372,7 +372,7 @@ jobs:
rust-toolchain-version: ${{ env.RUST_TOOLCHAIN_VERSON }}
node-version: ${{ matrix.node-version }}
- name: "Run wrapper integration tests"
run: (cd wrappers/node && npm run test:integration)
run: (cd aries/wrappers/node && npm run test:integration)
- name: "Install vcxagent-core dependencies"
run: (cd aries/agents/node/vcxagent-core && npm install)
- name: "Run demo"
Expand Down Expand Up @@ -406,7 +406,7 @@ jobs:
run: |
if [[ "$PUBLISH_VERSION" ]]
then
NPMJS_TOKEN=${{ secrets.NPMJS_TOKEN }} PUBLISH_VERSION=${{ env.PUBLISH_VERSION }} ./wrappers/node/publish.sh
NPMJS_TOKEN=${{ secrets.NPMJS_TOKEN }} PUBLISH_VERSION=${{ env.PUBLISH_VERSION }} ./aries/wrappers/node/publish.sh
else
echo "New version was not defined, skipping release."
fi
Expand Down Expand Up @@ -460,7 +460,7 @@ jobs:
env
unset CC
unset CXX
cd wrappers/vcx-napi-rs
cd aries/wrappers/vcx-napi-rs
npm run build:napi
strip *.node
- host: macos-latest
Expand Down
18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ resolver = "2"

members = [
"aries_vcx",
"libvcx_core",
"agency_client",
"libvdrtools",
"aries/legacy/libvcx_core",
"aries/legacy/agency_client",
"aries/legacy/libvdrtools",
"messages_macros",
"messages",
"shared_vcx",
"diddoc_legacy",
"aries/shared_vcx",
"aries/legacy/diddoc_legacy",
"aries/agents/rust/mediator",
"aries/agents/rust/mediator/client-tui",
"agents/rust/aries-vcx-agent",
"wrappers/vcx-napi-rs",
"aries/agents/rust/aries-vcx-agent",
"aries/wrappers/vcx-napi-rs",
"aries_vcx_core",
"uniffi_aries_vcx/core",
"did_doc",
Expand All @@ -25,9 +25,9 @@ members = [
"did_resolver_registry",
"did_resolver_sov",
"did_resolver_web",
"public_key",
"aries/public_key",
"indy_ledger_response_parser",
"wallet_migrator",
"tools/wallet_migrator",
"tools/simple_message_relay",
"tools/test_utils",
"tools/libvcx_logger",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The repository contains a set of crates to build [Aries](https://github.com/hype
- [`aries_vcx`](aries_vcx) - Library implementing DIDComm protocols, with focus on verifiable credential issuance and verification.
- [`messages`](messages) - Library for building and parsing Aries messages.
- `aries_vcx_core` - Interfaces for interaction with ledgers, wallets and credentials.
- [`agents`](agents/rust) - Aries agents built on top of `aries_vcx`.
- [`agents`](aries/agents/rust) - Aries agents built on top of `aries_vcx`.

## General components
- `did_parser` - Building and parsing [DIDs](https://w3c.github.io/did-core/).
Expand Down
2 changes: 1 addition & 1 deletion aries/agents/node/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ typings/
# End of https://www.gitignore.io/api/node


**/storage-*/
vcxagent-core/storage-proofs/

**/test/tmp
4 changes: 2 additions & 2 deletions aries/agents/node/vcxagent-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"test:integration:connection": "jest --forceExit --env=node --runInBand test/connection.spec.js"
},
"dependencies": {
"@hyperledger/node-vcx-wrapper": "file:../../../../wrappers/node",
"@hyperledger/node-vcx-wrapper": "file:../../../wrappers/node",
"axios": "^1.6.0",
"ffi-napi": "^4.0.3",
"fs-extra": "^4.0.3",
Expand All @@ -68,4 +68,4 @@
"standard": "^16.0.4",
"winston": "^3.3.3"
}
}
}
2 changes: 1 addition & 1 deletion aries/agents/node/vcxagent-core/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ VCX Agent Core is implementation of simple agent with persistent file storage. I

# Try it
1. First step is to compile and `aries-vcx` and make it available on your system. Follow [instructions](../../../libvcx).
2. You need to have mediator agent compatible with `aries-vcx`. See more [info](../../../README.md).
2. You need to have mediator agent compatible with `aries-vcx`. See more [info](../../../../README.md).
3. Run `npm run demo`. This will run sample scenario where Alice and Faber
- establish connection,
- Faber issues a credential to Alice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ edition.workspace = true

[dependencies]
serde = "1.0.145"
aries_vcx = { path = "../../../aries_vcx" }
aries_vcx_core = { path = "../../../aries_vcx_core", features = [
aries_vcx = { path = "../../../../aries_vcx" }
aries_vcx_core = { path = "../../../../aries_vcx_core", features = [
"credx",
"vdrtools_wallet",
] }
Expand Down
2 changes: 1 addition & 1 deletion aries/agents/rust/mediator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ aries_vcx_core = { path = "../../../../aries_vcx_core", features = [
async-trait = "0.1.73"
axum = "0.6"
axum-macros = "0.3.8"
diddoc_legacy = { path = "../../../../diddoc_legacy" }
diddoc_legacy = { path = "../../../../aries/legacy/diddoc_legacy" }
dotenvy = "0.15"
env_logger = "0.10.0"
fast_qr = { version = "0.10.2", features = ["svg"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ url = { version = "2.3", features = ["serde"] }
uuid = { version = "0.8", default-features = false, features = ["v4"]}
thiserror = "1.0.37"
async-trait = "0.1.73"
shared_vcx = { path = "../shared_vcx" }
shared_vcx = { path = "../../shared_vcx" }
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ serde_json = "1.0.40"
serde_derive = "1.0.97"
url = { version = "2.3", features = ["serde"] }
thiserror = "1.0.37"
shared_vcx = { path = "../shared_vcx" }
shared_vcx = { path = "../../shared_vcx" }

[dev-dependencies]
serde_json = "1.0.91"
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions libvcx_core/Cargo.toml → aries/legacy/libvcx_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ 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_core = { path = "../aries_vcx_core" }
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"
uuid = { version = "1.4.1", default-features = false, features = ["v4"] }
agency_client = { path = "../agency_client" }
async-trait = "0.1.61"
url = "2.3.1"
wallet_migrator = { path = "../wallet_migrator" }
shared_vcx = { path = "../shared_vcx" }
wallet_migrator = { path = "../../../tools/wallet_migrator" }
shared_vcx = { path = "../../shared_vcx" }

[dev-dependencies]
test_utils = {path = "../tools/test_utils" }
test_utils = {path = "../../../tools/test_utils" }
tokio = { version = "1.20", features = [ "rt", "macros" ] }
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ serde_derive = "1"
lazy_static = "1"
zeroize = "1"
regex = "1"
indy-api-types = { path = "./indy-api-types"}
indy-utils = { path = "./indy-utils"}
indy-wallet = { path = "./indy-wallet"}
indy-api-types = { path = "indy-api-types" }
indy-utils = { path = "indy-utils" }
indy-wallet = { path = "indy-wallet" }
futures = { version = "0.3", default-features = false, features = [ "executor", "alloc", "thread-pool" ] }
ursa = { version = "0.3.7", optional = true, default-features = false, features = ["cl_native"] }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ randombytes_sodium = []
base64 = {version = "0.21"}
dirs = "5"
failure = "0.1"
indy-api-types = { path = "../indy-api-types"}
indy-api-types = { path = "../indy-api-types" }
lazy_static = "1"
libc = "0.2"
log = "0.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async-trait = "0.1"
byteorder = "1"
futures = { version = "0.3", default-features = false, features = [ "alloc" ] }
indy-api-types = { path = "../indy-api-types" }
indy-utils = { path = "../indy-utils"}
indy-utils = { path = "../indy-utils" }
libc = "0.2"
log = "0.4"
rmp-serde = "1"
Expand Down
File renamed without changes.
File renamed without changes.
Patrik-Stas marked this conversation as resolved.
Show resolved Hide resolved
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Patrik-Stas marked this conversation as resolved.
Show resolved Hide resolved
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Development
# Development
FROM libindy
ARG uid=1000
RUN useradd -ms /bin/bash -u $uid node

WORKDIR vcx/wrappers/node
WORKDIR vcx/aries/wrappers/node
# Assumes we are in the ./vcx directory
RUN npm i [email protected]
COPY vcx/libvcx/target/debian/*.deb .
RUN dpkg -i *.deb
USER node
USER node
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export PATH=${PATH}:$(pwd)/vcx/ci/scripts
OUTPUTDIR=output
DIR=vcx/wrappers/node
DIR=vcx/aries/wrappers/node
CURDIR=$(pwd)
cd $DIR
npm i
Expand Down
4 changes: 2 additions & 2 deletions wrappers/node/ci/test.sh → aries/wrappers/node/ci/test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
cd vcx/wrappers/node/
cd vcx/aries/wrappers/node/
npm i
npm run lint
npm run compile
npm test
npm run test-logging
npm run test-logging
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ crate-type = ["cdylib"]
doctest = false

[dependencies]
libvcx_core = { path = "../../libvcx_core" }
wallet_migrator = { path = "../../wallet_migrator" }
libvcx_core = { path = "../../legacy/libvcx_core" }
wallet_migrator = { path = "../../../tools/wallet_migrator" }
log = "0.4.16"
napi = { version = "2.10.14", default-features = false, features = [ "async" ] }
napi-derive = { version = "2.10.1" }
uuid = { version = "1.5.0", default-features = false, features = ["v4"] }
chrono = "0.4.23"
libvcx_logger = { path = "../../tools/libvcx_logger" }
libvcx_logger = { path = "../../../tools/libvcx_logger" }

[build-dependencies]
napi-build = "2.0.1"
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading