Skip to content

Commit

Permalink
feat(cactus-plugin-ledger-connector-aries): add new connector plugin
Browse files Browse the repository at this point in the history
- Add new plugin for connecting with aries agents and indy ledger.
- Currently it supports only connecting to other aries agents and verifying
    proofs.
- Add integration tests in `cactus-test-plugin-ledger-connector-aries`.
- Update `cactus-example-discounted-asset-trade` to use the connector instead
    of plain aries agent.

Depends on #2946

Signed-off-by: Michal Bajer <[email protected]>
  • Loading branch information
outSH committed Jan 23, 2024
1 parent f4373a9 commit 3f46946
Show file tree
Hide file tree
Showing 50 changed files with 5,339 additions and 211 deletions.
100 changes: 68 additions & 32 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
compute_changed_packages:
outputs:
cmd-api-server-changed: ${{ steps.changes.outputs.cmd-api-server-changed }}
plugin-ledger-connector-aries-changed: ${{ steps.changes.outputs.plugin-ledger-connector-aries-changed }}
plugin-ledger-connector-besu-changed: ${{ steps.changes.outputs.plugin-ledger-connector-besu-changed }}
plugin-ledger-connector-corda-changed: ${{ steps.changes.outputs.plugin-ledger-connector-corda-changed }}
plugin-ledger-connector-fabric-changed: ${{ steps.changes.outputs.plugin-ledger-connector-fabric-changed }}
Expand Down Expand Up @@ -48,6 +49,14 @@ jobs:
- './packages/cactus-plugin-keychain-vault/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
# - './.github/workflows/ci.yaml'

plugin-ledger-connector-aries-changed:
- './packages/cactus-plugin-ledger-connector-aries/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
- './packages/cactus-common/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
- './packages/cactus-core/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
- './packages/cactus-core-api/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
- './packages/cactus-test-tooling/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
# - './.github/workflows/ci.yaml'

plugin-ledger-connector-besu-changed:
- './packages/cactus-plugin-ledger-connector-besu/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
- './packages/cactus-test-plugin-ledger-connector-besu/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
Expand All @@ -57,7 +66,7 @@ jobs:
- './packages/cactus-test-tooling/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
- './packages/cactus-plugin-keychain-memory/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
# - './.github/workflows/ci.yaml''

plugin-ledger-connector-corda-changed:
- './packages/cactus-plugin-ledger-connector-corda/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
- './packages/cactus-common/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
Expand All @@ -84,7 +93,7 @@ jobs:
- './packages/cactus-test-geth-ledger/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
- './packages/cactus-plugin-keychain-memory/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
# - './.github/workflows/ci.yaml'

plugin-ledger-connector-iroha2-changed:
- './packages/cactus-plugin-ledger-connector-iroha2/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
- './packages/cactus-common/**!(*.md|*.css|*.html|*.jpg|*.jpeg|*.png)'
Expand Down Expand Up @@ -347,7 +356,7 @@ jobs:
- run: ./tools/ci.sh
cactus-cmd-api-server:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.cmd-api-server-changed == 'true'
Expand Down Expand Up @@ -884,6 +893,33 @@ jobs:
node-version: ${{ env.NODEJS_VERSION }}
- uses: actions/[email protected]

- id: yarn-cache
name: Restore Yarn Cache
uses: actions/[email protected]
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
path: ./.yarn/
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: ./tools/ci.sh
cactus-plugin-ledger-connector-aries:
continue-on-error: false
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-aries-changed == 'true'
env:
FULL_BUILD_DISABLED: true
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-aries/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: false
TAPE_TEST_RUNNER_DISABLED: true
runs-on: ubuntu-20.04
steps:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/[email protected]
with:
node-version: ${{ env.NODEJS_VERSION }}
- uses: actions/[email protected]
- id: yarn-cache
name: Restore Yarn Cache
uses: actions/[email protected]
Expand All @@ -895,7 +931,7 @@ jobs:
- run: ./tools/ci.sh
cactus-plugin-ledger-connector-besu:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-besu-changed == 'true'
Expand Down Expand Up @@ -925,7 +961,7 @@ jobs:
- run: ./tools/ci.sh
cactus-plugin-ledger-connector-corda:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-corda-changed == 'true'
Expand Down Expand Up @@ -955,7 +991,7 @@ jobs:
- run: ./tools/ci.sh

plugin-ledger-connector-fabric-0:
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
Expand Down Expand Up @@ -988,7 +1024,7 @@ jobs:
- run: ./tools/ci.sh

plugin-ledger-connector-fabric-1:
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
Expand Down Expand Up @@ -1022,7 +1058,7 @@ jobs:

plugin-ledger-connector-fabric-2:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
Expand Down Expand Up @@ -1054,7 +1090,7 @@ jobs:
- run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts

plugin-ledger-connector-fabric-3:
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
Expand Down Expand Up @@ -1088,7 +1124,7 @@ jobs:

plugin-ledger-connector-fabric-4:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
Expand Down Expand Up @@ -1121,7 +1157,7 @@ jobs:

plugin-ledger-connector-fabric-5:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
Expand Down Expand Up @@ -1154,7 +1190,7 @@ jobs:

plugin-ledger-connector-fabric-6:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
Expand Down Expand Up @@ -1187,7 +1223,7 @@ jobs:

plugin-ledger-connector-fabric-7:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
Expand Down Expand Up @@ -1220,7 +1256,7 @@ jobs:

plugin-ledger-connector-fabric-8:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
Expand Down Expand Up @@ -1253,7 +1289,7 @@ jobs:

plugin-ledger-connector-fabric-9:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
Expand Down Expand Up @@ -1285,7 +1321,7 @@ jobs:
- run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/obtain-profiles.test.ts

plugin-ledger-connector-fabric-10:
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
Expand Down Expand Up @@ -1319,7 +1355,7 @@ jobs:

plugin-ledger-connector-fabric-11:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
Expand Down Expand Up @@ -1352,7 +1388,7 @@ jobs:

plugin-ledger-connector-fabric-12:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
Expand Down Expand Up @@ -1438,7 +1474,7 @@ jobs:
- run: ./tools/ci.sh
cactus-plugin-ledger-connector-iroha2:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-iroha2-changed == 'true'
Expand Down Expand Up @@ -1466,7 +1502,7 @@ jobs:
- run: ./tools/ci.sh
cactus-plugin-ledger-connector-ethereum:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-ethereum-changed == 'true'
Expand All @@ -1493,7 +1529,7 @@ jobs:
- run: ./tools/ci.sh
cactus-plugin-ledger-connector-quorum:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-quorum-changed == 'true'
Expand Down Expand Up @@ -1705,7 +1741,7 @@ jobs:
- run: ./tools/ci.sh
cactus-test-cmd-api-server:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.cmd-api-server-changed == 'true'
Expand Down Expand Up @@ -1845,7 +1881,7 @@ jobs:
- run: ./tools/ci.sh
cactus-test-plugin-ledger-connector-besu:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
Expand Down Expand Up @@ -1875,7 +1911,7 @@ jobs:
- run: ./tools/ci.sh
cactus-test-plugin-ledger-connector-quorum:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-quorum-changed == 'true'
Expand Down Expand Up @@ -1930,7 +1966,7 @@ jobs:
- run: ./tools/ci.sh
cactus-test-tooling:
continue-on-error: false
needs:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.test-tooling-changed == 'true'
Expand Down Expand Up @@ -2000,7 +2036,7 @@ jobs:
severity: 'CRITICAL,HIGH'
ghcr-cmd-api-server:
runs-on: ubuntu-20.04
needs:
needs:
- compute_changed_packages
if: needs.compute_changed_packages.outputs.cmd-api-server-changed == 'true'
steps:
Expand All @@ -2017,7 +2053,7 @@ jobs:
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
ghcr-connector-besu:
needs:
needs:
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-besu-changed == 'true'
runs-on: ubuntu-20.04
Expand All @@ -2036,7 +2072,7 @@ jobs:
severity: 'CRITICAL,HIGH'
ghcr-connector-corda-server:
runs-on: ubuntu-20.04
needs:
needs:
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-corda-changed == 'true'

Expand All @@ -2055,7 +2091,7 @@ jobs:
severity: 'CRITICAL,HIGH'
ghcr-connector-fabric:
runs-on: ubuntu-20.04
needs:
needs:
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'

Expand All @@ -2074,7 +2110,7 @@ jobs:
severity: 'CRITICAL,HIGH'
ghcr-corda-all-in-one:
runs-on: ubuntu-20.04
needs:
needs:
- compute_changed_packages
if: needs.compute_changed_packages.outputs.ghcr-corda-all-in-one-changed == 'true'
steps:
Expand All @@ -2098,7 +2134,7 @@ jobs:
run: DOCKER_BUILDKIT=1 docker build ./tools/docker/corda-all-in-one/corda-v4_8-flowdb/
ghcr-corda-all-in-one-obligation:
runs-on: ubuntu-20.04
needs:
needs:
- compute_changed_packages
if: needs.compute_changed_packages.outputs.ghcr-corda-all-in-one-obligation-changed == 'true'
steps:
Expand All @@ -2116,7 +2152,7 @@ jobs:
severity: 'CRITICAL,HIGH'
ghcr-dev-container-vscode:
runs-on: ubuntu-20.04
needs:
needs:
- compute_changed_packages
if: needs.compute_changed_packages.outputs.ghcr-dev-container-vscode-changed == 'true'
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@
"@hyperledger/anoncreds-nodejs": "0.2.0-dev.4",
"@hyperledger/aries-askar-nodejs": "0.2.0-dev.1",
"@hyperledger/indy-vdr-nodejs": "0.2.0-dev.3",
"axios": "1.5.1",
"axios": "1.6.0",
"inquirer": "8.2.6",
"loglevel": "1.8.1"
},
"devDependencies": {
"@aries-framework/anoncreds": "0.5.0-alpha.58",
"@aries-framework/anoncreds-rs": "0.5.0-alpha.58",
"@aries-framework/askar": "0.5.0-alpha.58",
"@aries-framework/core": "0.5.0-alpha.58",
"@aries-framework/indy-sdk": "0.5.0-alpha.58",
"@aries-framework/indy-vdr": "0.5.0-alpha.58",
"@aries-framework/node": "0.5.0-alpha.58",
"@aries-framework/anoncreds": "0.5.0-alpha.71",
"@aries-framework/anoncreds-rs": "0.5.0-alpha.71",
"@aries-framework/askar": "0.5.0-alpha.71",
"@aries-framework/core": "0.5.0-alpha.71",
"@aries-framework/indy-sdk": "0.5.0-alpha.71",
"@aries-framework/indy-vdr": "0.5.0-alpha.71",
"@aries-framework/node": "0.5.0-alpha.71",
"@types/inquirer": "8.2.6"
},
"engines": {
Expand Down
Loading

0 comments on commit 3f46946

Please sign in to comment.