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

Identity.rs v2.0 Resolver #1377

Open
wants to merge 23 commits into
base: identity2-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b7853fb
Resolver trait and CompoundResolver macro
UMR1352 Jun 11, 2024
0114b35
invert Resolver type parameters
UMR1352 Jun 11, 2024
88a538e
associated type Target instead of type parameter T
UMR1352 Jun 11, 2024
bfd5d59
fix type issue in #[resolver(..)] annotation, support for multiple re…
UMR1352 Jun 12, 2024
29d29b7
Pin and bump `bls12_381_plus` dependency (#1378)
wulfraem Jun 12, 2024
9c1eab4
fix syntax in documentation link (#1372)
UMR1352 Jun 12, 2024
e1e2542
Release v1.3.1 (#1379)
github-actions[bot] Jun 12, 2024
5671118
resolver integration
UMR1352 Jun 13, 2024
2af02da
chore(grpc): enhance domain grpc services (#1381)
itsyaasir Jun 21, 2024
bb13b38
Make base64 encoding target independent in `KeyIdMemStore` in wasm bi…
wulfraem Jun 27, 2024
b290625
Hotfix wasm-v1.3.1 (#1389)
eike-hass Jun 28, 2024
c704062
run cypress in docker (#1390)
eike-hass Jul 12, 2024
2ebacb8
fix sandbox teardown (#1401)
eike-hass Aug 28, 2024
13f9987
Reenable legacy Firefox CDP support (#1403)
eike-hass Aug 30, 2024
842f483
Add feature to support custom `now_utc` implementations (#1397)
frederikrothenberger Sep 2, 2024
b355b47
Make `bls12_381_plus` dependency more flexible again (#1393)
wulfraem Sep 2, 2024
84f1b7e
Mark `js-sys` as optional for identity_core (#1405)
frederikrothenberger Sep 4, 2024
02a0857
Add support for `did:jwk` resolution (#1404)
UMR1352 Sep 5, 2024
deecc7e
Linked Verifiable Presentations (#1398)
daniel-mader Sep 5, 2024
ba36609
Add WASM bindings for EcDSA JWS Verifier (#1396)
UMR1352 Sep 5, 2024
a0c7b06
Use Typedoc for Wasm API docs (#1399)
eike-hass Sep 10, 2024
13acb23
Remove dependency on `identity_core` default features (#1408)
frederikrothenberger Sep 13, 2024
d7c2cd9
Merge branch 'main' into identity2/resolver
UMR1352 Sep 16, 2024
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
2 changes: 1 addition & 1 deletion .github/actions/iota-sandbox/tear-down/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ runs:
shell: bash
run: |
cd iota-sandbox/sandbox
docker-compose down
docker compose down
cd ../..
sudo rm -rf iota-sandbox
2 changes: 1 addition & 1 deletion .github/actions/publish/publish-wasm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
registry-url: 'https://registry.npmjs.org'

- name: Download bindings/wasm artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ${{ inputs.input-artifact-name }}
path: bindings/wasm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-grpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
context: .
file: bindings/grpc/Dockerfile
push: false
labels: iotaledger/identity-grpc:latest
tags: iotaledger/identity-grpc:latest
113 changes: 106 additions & 7 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,18 @@ jobs:
run: cargo clean

# Build the library, tests, and examples without running them to avoid recompilation in the run tests step
- name: Build with all features
run: cargo build --workspace --tests --examples --all-features --release
- name: Build with default features
run: cargo build --workspace --tests --examples --release

- name: Start iota sandbox
if: matrix.os == 'ubuntu-latest'
uses: './.github/actions/iota-sandbox/setup'

- name: Run tests
run: cargo test --workspace --all-features --release
- name: Run tests excluding `custom_time` feature
run: cargo test --workspace --release

- name: Run tests with `custom_time` feature
run: cargo test --test custom_time --features="custom_time"

- name: Run Rust examples
# run examples only on ubuntu for now
Expand All @@ -157,7 +160,7 @@ jobs:
- name: Tear down iota sandbox
if: matrix.os == 'ubuntu-latest' && always()
uses: './.github/actions/iota-sandbox/tear-down'

- name: Stop sccache
uses: './.github/actions/rust/sccache/stop-sccache'
with:
Expand Down Expand Up @@ -195,7 +198,7 @@ jobs:
working-directory: bindings/wasm

- name: Download bindings/wasm artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: identity-wasm-bindings-build
path: bindings/wasm
Expand All @@ -204,9 +207,105 @@ jobs:
uses: './.github/actions/iota-sandbox/setup'

- name: Run Wasm examples
run: npm run test:examples
run: npm run test:readme && npm run test:node
working-directory: bindings/wasm

- name: Tear down iota sandbox
if: always()
uses: './.github/actions/iota-sandbox/tear-down'

test-wasm-firefox:
needs: build-wasm
if: ${{ needs.check-for-run-condition.outputs.should-run == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
include:
- os: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x

- name: Install JS dependencies
run: npm ci
working-directory: bindings/wasm

- name: Download bindings/wasm artifacts
uses: actions/download-artifact@v4
with:
name: identity-wasm-bindings-build
path: bindings/wasm

- name: Start iota sandbox
uses: './.github/actions/iota-sandbox/setup'

- name: Build Docker image
uses: docker/build-push-action@v6.2.0
with:
context: bindings/wasm/
file: bindings/wasm/cypress/Dockerfile
push: false
tags: cypress-test:latest
load: true

- name: Run cypress
run: docker run --network host cypress-test test:browser:parallel:firefox

- name: Tear down iota sandbox
if: always()
uses: './.github/actions/iota-sandbox/tear-down'

test-wasm-chrome:
needs: build-wasm
if: ${{ needs.check-for-run-condition.outputs.should-run == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
include:
- os: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x

- name: Install JS dependencies
run: npm ci
working-directory: bindings/wasm

- name: Download bindings/wasm artifacts
uses: actions/download-artifact@v4
with:
name: identity-wasm-bindings-build
path: bindings/wasm

- name: Start iota sandbox
uses: './.github/actions/iota-sandbox/setup'

- name: Build Docker image
uses: docker/build-push-action@v6.2.0
with:
context: bindings/wasm/
file: bindings/wasm/cypress/Dockerfile
push: false
tags: cypress-test:latest
load: true

- name: Run cypress
run: docker run --network host cypress-test test:browser:parallel:chrome

- name: Tear down iota sandbox
if: always()
uses: './.github/actions/iota-sandbox/tear-down'
3 changes: 2 additions & 1 deletion .github/workflows/shared-build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ jobs:
os: ${{matrix.os}}

- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.output-artifact-name }}
path: |
bindings/wasm/node
bindings/wasm/web
bindings/wasm/examples/dist
bindings/wasm/docs
if-no-files-found: error
retention-days: 1
51 changes: 51 additions & 0 deletions .github/workflows/upload-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and upload API docs

on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Version to publish docs under (e.g. `v1.2.3-dev.1`)'
required: true

permissions:
actions: 'write'

jobs:
build-wasm:
# owner/repository of workflow has to be static, see https://git.luolix.topmunity/t/env-variables-in-uses/17466
uses: iotaledger/identity.rs/.github/workflows/shared-build-wasm.yml@main
with:
run-unit-tests: false
ref: ${{ inputs.ref }}
output-artifact-name: identity-docs

upload-docs:
runs-on: ubuntu-latest
needs: build-wasm
steps:
- uses: actions/download-artifact@v4
with:
name: identity-docs
- name: Get release version
id: get_release_version
run: |
if [ "${{ github.event_name }}" = "release" ]; then
INPUT_VERSION="${{ github.ref }}"
else
INPUT_VERSION="${{ github.event.inputs.version }}"
fi
VERSION=$(echo $INPUT_VERSION | sed -e 's/.*v\([0-9]*\.[0-9]*\).*/\1/')
echo VERSION=$VERSION >> $GITHUB_OUTPUT
- name: Compress generated docs
run: |
tar czvf wasm.tar.gz docs/*

- name: Upload docs to AWS S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_IOTA_WIKI }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_IOTA_WIKI }}
AWS_DEFAULT_REGION: "eu-central-1"
run: |
aws s3 cp wasm.tar.gz s3://files.iota.org/iota-wiki/iota-identity/${{ steps.get_release_version.outputs.VERSION }}/ --acl public-read
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ index.html
*.hodl.*

!/bindings/wasm/static/index.html

docs
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
# Changelog

## [v1.3.1](https://github.com/iotaledger/identity.rs/tree/v1.3.1) (2024-06-12)

[Full Changelog](https://github.com/iotaledger/identity.rs/compare/v1.3.0...v1.3.1)

### Patch

- Pin and bump `bls12_381_plus` dependency [\#1378](https://github.com/iotaledger/identity.rs/pull/1378)

# Changelog

## [v1.3.0](https://github.com/iotaledger/identity.rs/tree/v1.3.0) (2024-05-28)

[Full Changelog](https://github.com/iotaledger/identity.rs/compare/v1.2.0...v1.3.0)

### Added
- Add ZK BBS+-based selectively disclosable credentials (JPT) [\#1355](https://github.com/iotaledger/identity.rs/pull/1355)

- Add ZK BBS+-based selectively disclosable credentials \(JPT\) [\#1355](https://github.com/iotaledger/identity.rs/pull/1355)
- Add EcDSA verifier [\#1353](https://github.com/iotaledger/identity.rs/pull/1353)

### Patch
- Support for specification-compliant verification method type `JsonWebKey2020` [\#1367](https://github.com/iotaledger/identity.rs/pull/1367)

- Support for specification-compliant verification method type `JsonWebKey2020` [\#1367](https://github.com/iotaledger/identity.rs/pull/1367)

## [v1.2.0](https://github.com/iotaledger/identity.rs/tree/v1.2.0) (2024-03-27)

Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ members = [
"identity_ecdsa_verifier",
"identity_eddsa_verifier",
"examples",
"compound_resolver",
]

exclude = ["bindings/wasm", "bindings/grpc"]

[workspace.dependencies]
bls12_381_plus = { version = "0.8.17" }
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
thiserror = { version = "1.0", default-features = false }
strum = { version = "0.25", default-features = false, features = ["std", "derive"] }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ If you want to include IOTA Identity in your project, simply add it as a depende

```toml
[dependencies]
identity_iota = { version = "1.3.0" }
identity_iota = { version = "1.3.1" }
```

To try out the [examples](https://github.com/iotaledger/identity.rs/blob/HEAD/examples), you can also do this:
Expand Down Expand Up @@ -88,7 +88,7 @@ version = "1.0.0"
edition = "2021"

[dependencies]
identity_iota = { version = "1.3.0", features = ["memstore"] }
identity_iota = { version = "1.3.1", features = ["memstore"] }
iota-sdk = { version = "1.0.2", default-features = true, features = ["tls", "client", "stronghold"] }
tokio = { version = "1", features = ["full"] }
anyhow = "1.0.62"
Expand Down
Loading