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

Proxy client #1

Open
wants to merge 142 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
ee17368
Integrated txn_signature into indy-vdr
Jan 3, 2023
c6f1608
Added base64 and base58 inside the package
Jan 3, 2023
7e98584
Removed features from indy-utils
Jan 4, 2023
247c24f
Merge branch 'main' into integrate-indy-utils
berendsliedrecht Jan 5, 2023
fab0535
Proxy client
mirgee May 10, 2023
c2d585c
chore: remove old nodejs wrapper
May 22, 2023
8730c1e
feat: react native 0.71.x and Expo support (#186)
berendsliedrecht May 25, 2023
8a670cb
build(android): use custom cross images
May 25, 2023
9630047
Merge branch 'main' into remove-old-nodejs
berendsliedrecht May 25, 2023
44cdb90
Merge branch 'main' into use-custom-images
berendsliedrecht May 25, 2023
8a74d01
build(android): use custom cross images
May 25, 2023
bbe1eed
Merge pull request #189 from blu3beri/use-custom-images
berendsliedrecht May 25, 2023
7d02c4c
chore: update version
May 25, 2023
628bf66
Merge pull request #190 from blu3beri/update-version
berendsliedrecht May 26, 2023
86395e3
build(js): use local network (#192)
berendsliedrecht May 27, 2023
47719c2
fix(rn): android works with JSC and Hermes (#194)
berendsliedrecht Jun 1, 2023
724b570
chore: update version
Jun 1, 2023
33c5b4b
Merge pull request #195 from blu3beri/update-version
berendsliedrecht Jun 1, 2023
43aa575
chore(js): update to stable version (#196)
berendsliedrecht Jun 2, 2023
472af94
Merge branch 'main' into remove-old-nodejs
TimoGlastra Jun 4, 2023
e211fd3
build(deps): bump semver from 5.7.1 to 5.7.2 in /wrappers/javascript
dependabot[bot] Jul 11, 2023
36fcede
Merge pull request #197 from hyperledger/dependabot/npm_and_yarn/wrap…
swcurran Jul 11, 2023
58ffd4e
Merge branch 'main' into remove-old-nodejs
andrewwhitehead Jul 19, 2023
28874fa
Merge pull request #188 from blu3beri/remove-old-nodejs
andrewwhitehead Jul 19, 2023
76c5d7d
did:indy resolver
domwoe Feb 21, 2022
a9a14d7
new nym request
domwoe Feb 21, 2022
72dd984
do not add resolver in legacy mode
domwoe Feb 21, 2022
d03fc82
sync with IDunion/indy-did-resolver
domwoe Mar 8, 2022
2695ed8
renaming Value to SJsonValue
domwoe Mar 8, 2022
e9de63c
invert feature flag logic: legacy -> did_indy
domwoe Mar 8, 2022
08494bb
format
domwoe Mar 8, 2022
6482b99
small fix in test dependencies
domwoe Mar 8, 2022
40815b5
nym and get_nym + proxy. No wrappers
domwoe Mar 8, 2022
57e8aba
adapt python wrapper
domwoe Mar 8, 2022
0e7dd06
remove feature
domwoe Mar 8, 2022
470ab1a
minimal changes to go wrapper
domwoe Mar 8, 2022
5dc2ff8
test build
domwoe Mar 8, 2022
89642d1
format
domwoe Mar 8, 2022
f134fc8
fix nym builder in tests and try to fix go wrapper
domwoe Mar 8, 2022
2a5ff3d
another attempt to fix go wrapper
domwoe Mar 8, 2022
cb0c404
not working due to lifetimes
domwoe Mar 11, 2022
55d819c
run tests
domwoe Mar 11, 2022
266df85
ffi resolver working for single request
domwoe Mar 14, 2022
e3a95ab
optional parameters in get_nym
domwoe Mar 15, 2022
c109868
started clean up of ffi resolver
domwoe Mar 15, 2022
a20a7b3
remove chrono dependency and use time-rs instead
domwoe Mar 15, 2022
6450e16
simplifying module imports
domwoe Mar 15, 2022
a240037
format
domwoe Mar 15, 2022
e9c3e01
ffi without fetching legacy endpoint working
domwoe Mar 15, 2022
8779928
fix query params in proxy
domwoe Mar 15, 2022
bc932c9
format..
domwoe Mar 15, 2022
63c4464
remove some unecessary code
domwoe Mar 15, 2022
4116426
removed unecessary enum
domwoe Mar 15, 2022
fb07bb2
add self-certification version. Try to fix wrappers
domwoe Mar 15, 2022
63f441f
fix integration tests
domwoe Mar 15, 2022
d00e14c
fmt
domwoe Mar 15, 2022
bd121f0
nym with diddoc_Content integration test
domwoe Mar 15, 2022
8523d33
refactor
domwoe Mar 23, 2022
ba9de5e
add comments to go wrapper
domwoe Mar 23, 2022
3d61429
multiple ledger support for proxy. Refresh not implemented
domwoe Mar 23, 2022
340291d
add selfCertificationVersion to didDocumentMetadata
domwoe Mar 15, 2022
1c366df
refresh
domwoe Mar 23, 2022
6646748
fmt
domwoe Mar 23, 2022
e21aaec
add get nym query parameters in readme
domwoe Mar 24, 2022
9947990
Python wrapper with multi-ledger resolver
domwoe Mar 24, 2022
c45d4e8
small cleanups
domwoe Mar 24, 2022
d508777
add a few more comments
domwoe Mar 24, 2022
ccf115f
remove print statement
domwoe Mar 24, 2022
096444c
handle legacy endpoints on wrapper layer
domwoe Mar 25, 2022
692b473
disable enforcement of diddoc_content validation
domwoe Mar 25, 2022
d225ddf
implement some of the clippy suggestions
domwoe Mar 28, 2022
3e35b95
formatting
domwoe Mar 28, 2022
2f46877
fix did with query parameters
domwoe Mar 30, 2022
11e7d5c
Get attrib with optional seq_no and timestamp
domwoe Mar 30, 2022
8d73760
update local_nodes_pool attrib tests
domwoe Apr 1, 2022
c4ac1d7
self-certification tests. Some uncommented because of indy-utils gene…
domwoe Mar 29, 2022
5e8e3f9
small fixes
domwoe Mar 29, 2022
d9ec0a7
remove debug loglevel
domwoe Apr 1, 2022
62e752d
attempt to harden resolver test
domwoe Apr 1, 2022
22a6705
fmt
domwoe Apr 1, 2022
cda296e
fix readme for indy-vdr-proxy
domwoe Apr 12, 2022
886c628
Correctly use the networks folder of the repository
c2bo Oct 25, 2022
b5c1103
fix verkey expansion
c2bo Oct 25, 2022
bcd9830
clean up features; remove chrono dependency
andrewwhitehead Jan 12, 2023
98d9f22
clean up warnings
andrewwhitehead Feb 23, 2023
0a6e385
remove did_indy feature flag
andrewwhitehead Feb 23, 2023
26d7564
adjust header files for indy_vdr_build_nym_request parameters
andrewwhitehead Feb 23, 2023
6357a55
python wrapper cleanups for resolver
andrewwhitehead Feb 23, 2023
d632f29
fix merge issues
andrewwhitehead Feb 23, 2023
04faad5
fix formatting, warnings on indy-vdr-proxy
andrewwhitehead Feb 24, 2023
f21a882
update JS wrapper calls to indy_vdr_build_nym_request
andrewwhitehead Feb 24, 2023
9361851
use percent-encoding instead of urlencoding (already in dependencies)…
andrewwhitehead Feb 28, 2023
d790feb
quick fix for ffi bindings
c2bo Mar 1, 2023
f6e0df3
remove did-indy node container and re-use the existing node-container…
c2bo Mar 2, 2023
f81c868
add small bash script to create / remove the pool for local testing
c2bo Mar 2, 2023
ad8308d
use bash script for the local pool tests in the github actions
c2bo Mar 2, 2023
45ead4b
(python) add defaults for new optional parameters
andrewwhitehead Mar 7, 2023
5169e7e
Add support for config flag transactions
c2bo Mar 27, 2023
73500e1
fix merge issues
andrewwhitehead Mar 30, 2023
6b90fc1
restrict time crate version
andrewwhitehead Jul 19, 2023
673f825
fix default value for seqNo in GetNymRequest
andrewwhitehead Jul 19, 2023
8992332
move test script
andrewwhitehead Jul 27, 2023
944cd33
misc cleanups
andrewwhitehead Jul 27, 2023
3117753
enable tests
andrewwhitehead Jul 27, 2023
2979752
update dependencies
andrewwhitehead Jul 27, 2023
b6336fc
vendored openssl
andrewwhitehead Jul 27, 2023
e56e1f2
clean up warnings
andrewwhitehead Jul 27, 2023
950d6a0
fix build error on windows
andrewwhitehead Jul 27, 2023
ac121e8
adjust versionId test
andrewwhitehead Jul 27, 2023
100657f
Merge remote-tracking branch 'berendt/integrate-indy-utils' into did-…
andrewwhitehead Aug 4, 2023
1994640
update base64 dependency
andrewwhitehead Aug 4, 2023
37d95f7
update to indy-utils 0.6, indy-data-types 0.6.1
andrewwhitehead Aug 4, 2023
84b859c
fix warnings
andrewwhitehead Aug 4, 2023
0b08324
Merge branch 'main' into feature/indy-vdr-proxy-client
mirgee Aug 8, 2023
06082b8
Merge pull request #166 from hyperledger/did-indy-merge
andrewwhitehead Aug 8, 2023
bd7c05b
switch to indy-blssignatures
andrewwhitehead Aug 8, 2023
00d67f8
no need to alias base64 crate
andrewwhitehead Aug 8, 2023
014ae7a
move unit test
andrewwhitehead Aug 8, 2023
b279653
remove unused tests
andrewwhitehead Aug 8, 2023
9a5fb16
fix warning
andrewwhitehead Aug 8, 2023
458045f
Merge branch 'main' into feature/indy-vdr-proxy-client
andrewwhitehead Aug 9, 2023
ec234af
fix string formatting
andrewwhitehead Aug 9, 2023
c720238
add test of bls signature validation on state proof
andrewwhitehead Aug 9, 2023
c246ef8
Merge pull request #200 from andrewwhitehead/upd/bls-signatures
andrewwhitehead Aug 9, 2023
5be5cab
Bump word-wrap from 1.2.3 to 1.2.5 in /wrappers/javascript
dependabot[bot] Aug 9, 2023
8f81e1f
add enums for ledger role, ledger role update action
andrewwhitehead Aug 9, 2023
bc28c82
fix tests
andrewwhitehead Aug 9, 2023
a1ec4c4
Merge pull request #201 from hyperledger/dependabot/npm_and_yarn/wrap…
swcurran Aug 9, 2023
b938843
update JS dependencies
andrewwhitehead Aug 10, 2023
7f55d80
fix lint errors
andrewwhitehead Aug 9, 2023
619291c
Change arguments order in calling indy_vdr_build_get_attrib_request a…
Aug 10, 2023
f04ecc6
make submitterDid as optional at buildGetAcceptanceMechanismsRequest …
Aug 10, 2023
045a01e
Merge branch 'main' into upd/ledger-role-enum
swcurran Aug 10, 2023
d24bee8
Merge pull request #203 from andrewwhitehead/upd/js-deps
andrewwhitehead Aug 10, 2023
224fbb6
Merge branch 'main' into upd/ledger-role-enum
swcurran Aug 10, 2023
77cb8d0
Merge pull request #202 from andrewwhitehead/upd/ledger-role-enum
andrewwhitehead Aug 10, 2023
8f5cc46
Merge branch 'main' into main
andrewwhitehead Aug 10, 2023
07d3188
Merge pull request #205 from mrlunin/main
andrewwhitehead Aug 10, 2023
5a29221
Merge branch 'main' into buildGetAcceptanceMechanismsRequest-make-sub…
andrewwhitehead Aug 10, 2023
1142b89
Merge pull request #207 from mrlunin/buildGetAcceptanceMechanismsRequ…
andrewwhitehead Aug 10, 2023
a71ab40
Merge branch 'main' into feature/indy-vdr-proxy-client
mirgee Aug 10, 2023
c978eb1
Fix build
mirgee Aug 10, 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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.git
target
github
82 changes: 54 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "Indy-VDR"

env:
RUST_VERSION: "1.63.0"
RUST_VERSION: "1.65.0"
CROSS_VERSION: "0.2.4"

on:
Expand All @@ -24,6 +24,10 @@ on:
default: false
type: boolean

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
checks:
name: Run checks
Expand Down Expand Up @@ -54,7 +58,7 @@ jobs:
- name: Cargo fmt
run: cargo fmt --all -- --check

- if: "runner.os == 'Linux'"
- if: ${{ runner.os == 'Linux' }}
name: Pre-install cross
run: |
cargo install --bins --git https://github.com/rust-embedded/cross --tag v${{ env.CROSS_VERSION }} cross
Expand Down Expand Up @@ -83,13 +87,15 @@ jobs:

- name: Run local node pool
run: |
docker build -f ci/indy-pool.dockerfile -t test_pool --build-arg pool_ip=10.0.0.2 ci
docker network create --subnet=10.0.0.0/8 indy-sdk-network
docker run -d --name indy_pool -p 9701-9708:9701-9708 --net=indy-sdk-network test_pool
./ci/test.sh up

- name: Run tests
run: cargo test --manifest-path libindy_vdr/Cargo.toml --features local_nodes_pool

- name: Stop local node pool
run: |
./ci/test.sh down

build-release:
name: Build library
needs: [checks]
Expand Down Expand Up @@ -136,17 +142,22 @@ jobs:
shared-key: deps
save-if: false

- name: Build
shell: sh
- if: ${{ matrix.use_cross }}
name: Build (cross)
run: |
if [ -n "${{ matrix.use_cross }}" ]; then
cargo install --bins --git https://github.com/rust-embedded/cross --tag v${{ env.CROSS_VERSION }} cross
cross build --lib --release --target ${{ matrix.target }}
elif [ "${{ matrix.architecture }}" == "darwin-universal" ]; then
./build-universal.sh
else
cargo build --lib --release --target ${{ matrix.target }}
fi
cargo install --bins --git https://github.com/rust-embedded/cross --tag v${{ env.CROSS_VERSION }} cross
cross build --lib --release --target ${{ matrix.target }}

- if: ${{ !matrix.use_cross && matrix.architecture == 'darwin-universal' }}
name: Build (mac)
run: ./build-universal.sh

# Requires using the default shell on Windows, otherwise it will complain:
# "This perl implementation doesn't produce Windows like paths"
- if: ${{ !matrix.use_cross && matrix.architecture != 'darwin-universal' }}
name: Build (standard)
run: |
cargo build --lib --release --target ${{ matrix.target }}

- name: Upload library artifacts
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -243,6 +254,15 @@ jobs:
- name: Check types
run: yarn check-types

- name: Run local node pool
run: |
cd ../../
docker build -f ci/indy-pool.dockerfile -t test_pool --build-arg pool_ip=10.0.0.2 ci
docker network create --subnet=10.0.0.0/8 indy-sdk-network
docker run -d --name indy_pool -p 9701-9708:9701-9708 --net=indy-sdk-network test_pool
cd wrappers/javascript
docker exec $(docker ps -aqf "ancestor=test_pool") cat /var/lib/indy/sandbox/pool_transactions_genesis >> genesis.txn

- name: Run tests
env:
# binary is downloaded to root of repository
Expand Down Expand Up @@ -283,16 +303,14 @@ jobs:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
# First version with support for cdylib: https://github.com/rust-lang/rust/pull/100636
toolchain: "1.65.0"
toolchain: ${{ env.RUST_VERSION }}
targets: ${{ matrix.target }}

# Not useful unless the toolchain version matches the default
# - name: Cache cargo resources
# uses: Swatinem/rust-cache@v2
# with:
# shared-key: deps
# save-if: false
- name: Cache cargo resources
uses: Swatinem/rust-cache@v2
with:
shared-key: deps
save-if: false

- name: Build
run: |
Expand All @@ -302,7 +320,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: library-${{ matrix.target}}
path: target/${{ matrix.target }}/release/libindy_vdr.dylib
path: target/${{ matrix.target }}/release/libindy_vdr.a

create-ios-xcframework:
name: Create iOS xcframework
Expand All @@ -313,7 +331,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Fetch dynamic libraries
- name: Fetch static libraries
uses: actions/download-artifact@v3

- run: >
Expand All @@ -337,6 +355,9 @@ jobs:
build-android:
name: Build library (Android)
needs: [checks]
env:
RUST_VERSION: "1.64.0" # Overriding the rust version here for lower NDK support

runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -352,6 +373,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Build
run: |
cargo install --bins --git https://github.com/rust-embedded/cross --tag v${{ env.CROSS_VERSION }} cross
Expand Down Expand Up @@ -402,7 +428,7 @@ jobs:
if: |
(github.event_name == 'release' ||
(github.event_name == 'workflow_dispatch' &&
github.event.inputs.publish == 'true'))
github.event.inputs.publish-binaries == 'true'))

steps:
- name: Fetch Android libraries
Expand Down Expand Up @@ -483,14 +509,14 @@ jobs:
- name: Test python package
# FIXME cross platform test the python package
# maybe use the cross docker image?
if: "matrix.architecture != 'linux-aarch64'"
if: ${{ matrix.architecture != 'linux-aarch64' }}
shell: sh
run: |
pip install dist/*
python -m demo.test
working-directory: wrappers/python

- if: "runner.os == 'Linux'"
- if: ${{ runner.os == 'Linux' }}
name: Audit wheel
run: |
auditwheel show wrappers/python/dist/* | tee auditwheel.log
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ coverage
*.tgz
*.so
.npmrc
github
**/networks
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ resolver = "2"
members = [
"libindy_vdr",
"indy-vdr-proxy",
"indy-vdr-proxy-client",
]

[profile.release]
Expand Down
8 changes: 4 additions & 4 deletions Cross.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ image = "ghcr.io/rust-cross/manylinux2014-cross:aarch64"
image = "ghcr.io/rust-cross/manylinux2014-cross:x86_64"

[target.x86_64-linux-android]
image = "ghcr.io/cross-rs/x86_64-linux-android:main"
image = "ghcr.io/hyperledger/aries-builder-images/cross/x86_64-linux-android:main"

[target.i686-linux-android]
image = "ghcr.io/cross-rs/i686-linux-android:main"
image = "ghcr.io/hyperledger/aries-builder-images/cross/i686-linux-android:main"

[target.aarch64-linux-android]
image = "ghcr.io/cross-rs/aarch64-linux-android:main"
image = "ghcr.io/hyperledger/aries-builder-images/cross/aarch64-linux-android:main"

[target.armv7-linux-androideabi]
image = "ghcr.io/cross-rs/armv7-linux-androideabi:main"
image = "ghcr.io/hyperledger/aries-builder-images/cross/armv7-linux-androideabi:main"
58 changes: 40 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,49 @@ At a later stage it should be possible to install a precompiled 'wheel' package

## Proxy Server

The `indy-vdr-proxy` executable can be used to provide a simple REST API for interacting with the ledger. Command line options can be inspected by running `indy-vdr-proxy --help`.
The `indy-vdr-proxy` executable can be used to provide a simple REST API for interacting with one or more Indy ledgers. Command line options can be inspected by running `indy-vdr-proxy --help`.

Responses can be formatted in either HTML or JSON formats. HTML formatting is selected when the `text/html` content type is requested according to the Accept header (as sent by web browsers) or the request query string is set to `?html`. JSON formatting is selected otherwise, and may be explitly selected by using the query string `?raw`. For most ledger requests, JSON responses include information regarding which nodes were contacted is returned in the `X-Requests` header.
To start the proxy server for a single ledger use the following command:
```
indy-vdr-proxy -p <PORT> (-g <OPTIONAL_PATH_TO_GENESIS_FILE>)
```

To start the proxy server with the standard configuration of indy ledgers use the following command:
`indy-vdr-proxy -p <PORT> -- --multiple-ledgers`
This will get the ledger configuration from `https://github.com/IDunion/indy-did-networks`

Sending prepared requests to the ledger is performed by delivering a POST request to the `/submit` endpoint, where the body of the request is the JSON-formatted payload. Additional endpoints are provided as shortcuts for ledger read transactions:

- `/` The root path shows basic status information about the server and the ledger pool
- `/genesis` Return the current set of genesis transactions
- `/taa` Fetch the current ledger Transaction Author Agreement
- `/aml` Fetch the current ledger Acceptance Methods List (for the TAA)
- `/nym/{DID}` Fetch the NYM transaction associated with a DID
- `/attrib/{DID}/endpoint` Fetch the registered endpoint for a DID
- `/schema/{SCHEMA_ID}` Fetch a schema by its identifier
- `/cred_def/{CRED_DEF_ID}` Fetch a credential definition by its identifier
- `/rev_reg/{REV_REG_ID}` Fetch a revocation registry by its identifier
- `/rev_reg_def/{REV_REG_ID}` Fetch a revocation registry definition by its registry identifier
- `/rev_reg_delta/{REV_REG_ID}` Fetch a revocation registry delta by its registry identifier
- `/auth` Fetch all AUTH rules for the ledger
- `/auth/{TXN_TYPE}/{ADD|EDIT}` Fetch the AUTH rule for a specific transaction type and action
- `/txn/{SUBLEDGER}/{SEQ_NO}` Fetch a specific transaction by subledger identifier (0-2, or one of `pool`, `domain`, or `config`) and sequence number.
A custom ledger configuration can be provided either by specificing a Github repo or a local folder:
```
indy-vdr-proxy -p <PORT> -g <GITHUB_URL or PATH_TO_FOLDER> -- --multiple-ledgers
```
The structure needs to be as follows `<NAMESPACE>/OPTIONAL<SUB_NAMESPACE>/pool_transactions_genesis.json`, e.g. `/sovrin/staging/pool_transactions_genesis.json`

Responses can be formatted in either HTML or JSON formats. HTML formatting is selected when the `text/html` content type is requested according to the Accept header (as sent by web browsers) or the request query string is set to `?html`. JSON formatting is selected otherwise, and may be explitly selected by using the query string `?raw`. For most ledger requests, JSON responses include information regarding which nodes were contacted is returned in the `X-Requests` header.

Sending prepared requests to the ledger is performed by delivering a POST request to the `{LEDGER}/submit` endpoint, where the body of the request is the JSON-formatted payload. Additional endpoints are provided as shortcuts for ledger read transactions:
- `/` Return configured ledgers
- `{LEDGER}/` Basic status information about the server and the ledger pool
- `{LEDGER}/genesis` Return the current set of genesis transactions
- `{LEDGER}/taa` Fetch the current ledger Transaction Author Agreement
- `{LEDGER}/aml` Fetch the current ledger Acceptance Methods List (for the TAA)
- `{LEDGER}/nym/{DID}` Fetch the NYM transaction associated with an unqualified DID. Can be used with `timestamp` or `seq_no` query parameters to fetch specific versions
- `{LEDGER}/attrib/{DID}/endpoint` Fetch the registered endpoint for an unqualified DID
- `{LEDGER}/schema/{SCHEMA_ID}` Fetch a schema by its identifier
- `{LEDGER}/cred_def/{CRED_DEF_ID}` Fetch a credential definition by its identifier
- `{LEDGER}/rev_reg/{REV_REG_ID}` Fetch a revocation registry by its identifier
- `{LEDGER}/rev_reg_def/{REV_REG_ID}` Fetch a revocation registry definition by its registry identifier
- `{LEDGER}/rev_reg_delta/{REV_REG_ID}` Fetch a revocation registry delta by its registry identifier
- `{LEDGER}/auth` Fetch all AUTH rules for the ledger
- `{LEDGER}/auth/{TXN_TYPE}/{ADD|EDIT}` Fetch the AUTH rule for a specific transaction type and action
- `{LEDGER}/txn/{SUBLEDGER}/{SEQ_NO}` Fetch a specific transaction by subledger identifier (0-2, or one of `pool`, `domain`, or `config`) and sequence number.

If the proxy server is used with a single ledger, the `{LEDGER}` part of the path must be omitted.

### DID:Indy Resolver

Indy VDR contains a DID Resolver to resolve DIDs and dereference DID Urls to ledger objects from configured ledgers according to the [did:indy specification](https://hyperledger.github.io/indy-did-method/).

`GET /1.0/identifiers/{DID or DID_URL}`
## Connecting to a Ledger

Whether using the library or the proxy server, you will need a `genesis.txn` file containing the set of pool genesis transactions. You can run a local pool in Docker using [VON-Network](https://github.com/bcgov/von-network) or follow the [Indy-SDK instructions](https://github.com/hyperledger/indy-sdk#how-to-start-local-nodes-pool-with-docker).
Expand Down
23 changes: 12 additions & 11 deletions build-xcframework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,25 @@
set -eo pipefail

# Check if lipo and xcodebuild exist
if [ -z `command -v lipo` ] || [ -z `command -v xcodebuild` ]
if [ -z `command -v lipo` ] || [ -z `command -v xcodebuild` ] || [ -z `command -v sed` ]

then
echo "!!! lipo or xcodebuild could not be found !!!"
echo "!!! lipo, xcodebuild or sed could not be found !!!"
help
fi

NAME="indy_vdr"
BUNDLE_NAME="indy-vdr"
VERSION=$(cargo generate-lockfile && cargo pkgid indy-vdr | sed -e "s/^.*[#@]//")
echo $VERSION
BUNDLE_IDENTIFIER="org.hyperledger.$NAME"
LIBRARY_NAME="lib$NAME.dylib"
BUNDLE_IDENTIFIER="org.hyperledger.$BUNDLE_NAME"
LIBRARY_NAME="lib$NAME.a"
XC_FRAMEWORK_NAME="$NAME.xcframework"
FRAMEWORK_LIBRARY_NAME=$NAME
FRAMEWORK_NAME="$FRAMEWORK_LIBRARY_NAME.framework"
HEADER_NAME="lib$NAME.h"
OUT_PATH="out"
MIN_IOS_VERSION="12.0"

# Setting some default paths
AARCH64_APPLE_IOS_PATH="./target/aarch64-apple-ios/release"
Expand All @@ -33,9 +36,9 @@ Help() {
echo " - xcodebuild"
echo "To build an xcframework with underlying Frameworks"
echo "the following can be passed in as positional arguments"
echo " 1. Path to the aarch64-apple-ios directory where the $LIBRARY is stored"
echo " 2. Path to the aarch64-apple-ios-sim directory where the $LIBRARY is stored"
echo " 3. Path to the x86_64-apple-ios directory where the $LIBRARY is stored"
echo " 1. Path to the aarch64-apple-ios directory where the $LIBRARY_NAME is stored"
echo " 2. Path to the aarch64-apple-ios-sim directory where the $LIBRARY_NAME is stored"
echo " 3. Path to the x86_64-apple-ios directory where the $LIBRARY_NAME is stored"
echo " 4. Path to the header file, excluding the header"
echo "Make sure to add the 'release' section of the path for a"
echo "release build."
Expand Down Expand Up @@ -156,6 +159,8 @@ cat <<EOT >> Info.plist
<string>$VERSION</string>
<key>NSPrincipalClass</key>
<string></string>
<key>MinimumOSVersion</key>
<string>$MIN_IOS_VERSION</string>
</dict>
</plist>
EOT
Expand All @@ -179,8 +184,4 @@ xcodebuild -create-xcframework \
echo "cleaning up..."
rm -rf $FRAMEWORK_NAME real sim

echo "Fixing the identifiers of the dylib..."
install_name_tool -id @rpath/$NAME.framework/$FRAMEWORK_LIBRARY_NAME $XC_FRAMEWORK_NAME/ios-arm64/$FRAMEWORK_NAME/$FRAMEWORK_LIBRARY_NAME
install_name_tool -id @rpath/$NAME.framework/$FRAMEWORK_LIBRARY_NAME $XC_FRAMEWORK_NAME/ios-arm64_x86_64-simulator/$FRAMEWORK_NAME/$FRAMEWORK_LIBRARY_NAME

echo "Framework written to $OUT_PATH/$XC_FRAMEWORK_NAME"
Loading