Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/libs/iota-core/npm_a…
Browse files Browse the repository at this point in the history
…nd_yarn-9706462e92
  • Loading branch information
maratsh authored Aug 26, 2024
2 parents ee9ef9d + 796d3c9 commit 19f20e0
Show file tree
Hide file tree
Showing 1,115 changed files with 12,663 additions and 5,809 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": "*.json",
"parser": "jsonc-eslint-parser",
"rules": {}
},
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/nx-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ jobs:
- uses: nrwl/nx-set-shas@v3
# This line is needed for nx affected to work when CI is running on a PR
- run: git branch --track main origin/main
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

# - run: npx nx format:check
- run: npx nx affected -t build --parallel=3
- name: install python tools
run: |
pip install poetry
- run: npx nx affected -t build --parallel=1
66 changes: 48 additions & 18 deletions .github/workflows/nx-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ jobs:
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
contents: read
needs:
- security
contents: read
needs: ['security']
steps:
- name: Generate token from app token #https://github.com/tibdex/github-app-token
id: generate_token
Expand All @@ -51,43 +50,74 @@ jobs:
registry-url: 'https://registry.npmjs.org'
scope: '@affinidi-tdk'
- run: npm ci

# Generate tag/changelog with semantic release
# setting parallel higher than one might cause problems with locking git repo
- run: npx nx run-many -t semantic-release --parallel=false
name: semantic release
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: build
run: |
npx nx run-many -t build
publish:
concurrency: publish
runs-on: ubuntu-latest
environment: main
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
contents: read
needs: ['release']
steps:
- name: Generate token from app token #https://github.com/tibdex/github-app-token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.RELEASE_BOT_APP_ID }}
private_key: ${{ secrets.RELEASE_BOT_PKEY }}

- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}

- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
scope: '@affinidi-tdk'
- run: npm ci

- name: package
run: |
npx nx run-many -t package
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: install twine for pypi releases
- name: install python tools
run: |
pip install twine
pip install poetry
- name: Mint pypi token
id: mint
uses: tschm/[email protected]

# Publish to npm with new nx release publish functionality
- name: Set version for non-js client packages
run: npx nx run-many -t set-version

- name: build
run: |
npx nx run-many -t build
- name: package
run: |
npx nx run-many -t package
# Publish to npm,pypi with new nx release publish functionality
- run: |
npx nx release publish --verbose
name: release
name: publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} #publib-npm expects this
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
TWINE_USERNAME: '__token__'
TWINE_PASSWORD: ${{ steps.mint.outputs.api-token }}
POETRY_PYPI_TOKEN_PYPI: ${{ steps.mint.outputs.api-token }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} #publib-npm expects this
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
4 changes: 2 additions & 2 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh


npx --no-install commitlint --edit $1
52 changes: 37 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,56 @@
[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

The Affinidi Trust Development Kit (Affinidi TDK) is a modern interface that allows you to easily manage and integrate Affinidi services into your application. It minimises dependencies and enables developers seamless entry into the [Affinidi Trust Network (ATN)](https://www.affinidi.com/get-started).
The Affinidi Trust Development Kit (Affinidi TDK) is a modern interface that allows you to easily manage and integrate [Affinidi Elements](https://www.affinidi.com/product/affinidi-elements) and [Frameworks](https://www.affinidi.com/developer#lota-framework) into your application. It minimises dependencies and enables developers seamless entry into the [Affinidi Trust Network (ATN)](https://www.affinidi.com/get-started).

## How do I use Affinidi TDK?

The Affinidi TDK provides three type of modules:

- [Clients](clients), which offer methods to access Affinidi services like IAM, Verifier, Wallets, and Login configuation, among others.
- [Clients](clients), which offer methods to access Affinidi Elements services like Credential Issuance, Credential Verification, and Login Configurations, among others.
- [Packages](packages), which are commonly used utilities/helpers that are self-contained and composable.
- [Libraries](libs), which are high-level abstractions that combine logic and data to perform necessary business logic functionalities.

Each module has its own README that you can check to better understand how to integrate it into your application.

## Available modules

The Affinidi TDK offers the following modules and programming languages:
The Affinidi TDK offers the following modules and support to programming languages:



| | TypeScript | Python | Dart |
|----------- |-----------------------|-----------------------|----------------------|
|**Packages** | | | |
|[auth-provider](packages/auth-provider/) | 🟢 | 🟢 | 🔴 |
|[common](packages/common/) | 🟢 | 🟢 | 🔴 |
|**Packages** | | | |
|credential-issuance-client | [🟢 Link](clients/typescript/credential-issuance-client/) | [🟢 Link](clients/python/credential_issuance_client/) | [🟡 Link](clients/dart/credential_issuance_client/) |
|credential-verification-client | [🟢 Link](clients/typescript/credential-verification-client/) | [🟢 Link](clients/python/credential_verification_client/) | [🟡 Link](clients/dart/credential_verification_client/) |
|iam-client | [🟢 Link](clients/typescript/iam-client/) | [🟢 Link](clients/python/iam_client/) | [🟡 Link](clients/dart/iam_client/) |
|iota-client | [🟢 Link](clients/typescript/iota-client/) | [🟢 Link](clients/python/iota_client/) | [🟡 Link](clients/dart/iota_client/) |
|login-configuration-client | [🟢 Link](clients/typescript/login-configuration-client/) | [🟢 Link](clients/python/login_configuration_client/) | [🟡 Link](clients/dart/login_configuration_client/) |
|wallets-client | [🟢 Link](clients/typescript/wallets-client/) | [🟢 Link](clients/python/wallets_client/) | [🟡 Link](clients/dart/wallets_client/) |
|**Libraries** | | | |
|[iota-browser](libs/iota-browser/) | 🟢 | 🔴 | 🔴 |
|[iota-core](libs/iota-core/) | 🟢 | 🟢 | 🔴 |

<br />
🟢 Supported <br />
🟡 Experimental <br />
🔴 Not supported

| | Typescript | Python | Dart |
| ------------------------------------------------- | :------------------------------------------------: | :--------------------------------------------: | :------------------------------------------: |
| **Packages** |
| [auth-provider](packages/auth-provider/README.md) | 🟢 | 🟢 | 🔴 |
| **Clients** |
| wallets-client | [🟢 Link](clients/typescript/wallets-client/README.md) | [🟢 Link](clients/python/wallets_client/README.md) | [🟡 Link](clients/dart/wallets-client/README.md) |
| iam-client | [🟢 Link](clients/typescript/iam-client/README.md) | [🟢 Link](clients/python/iam_client/README.md) | [🟡 Link](clients/dart/iam_client/README.md) |
| credential-verification-client | [🟢 Link](clients/typescript/credential-verification-client/README.md) | [🟢 Link](clients/python/credential_verification_client/README.md) | [🟡 Link](clients/dart/credential_verification_client/README.md) |
| login-configation | [🟢 Link](clients/typescript/login-configuration/README.md) | [🟢 Link](clients/python/login_configuration/README.md) | [🟡 Link](clients/dart/login_configuration/README.md) |
## Documentation

🟢 Supported<br>
🟡 Experimental<br>
🔴 Not supported
Head over to our [Documentation site](https://docs.affinidi.com/dev-tools/affinidi-tdk) to know how to get started with Affinidi TDK.

Use [this document](https://docs.affinidi.com/dev-tools/affinidi-tdk/#working-with-the-affinidi-tdk) to learn more about how to work with Affinidi TDK, including generating the Authorisation Token and calling the methods.

To learn how to integrate Affinidi TDK and use the different modules into your application, you can explore the following:

- [Affinidi TDK Clients](https://docs.affinidi.com/dev-tools/affinidi-tdk/clients/)
- [Affinidi TDK Libraries](https://docs.affinidi.com/dev-tools/affinidi-tdk/libraries/)
- [Affinidi TDK Packages](https://docs.affinidi.com/dev-tools/affinidi-tdk/packages/)

## Support & feedback

Expand Down
4 changes: 3 additions & 1 deletion clients/dart/credential_issuance_client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
.dart_tool/
.packages
build/
pubspec.lock # Except for application packages

# Except for application packages
pubspec.lock

doc/api/

Expand Down
16 changes: 10 additions & 6 deletions clients/dart/credential_issuance_client/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ doc/CorsGetWellKnownOpenIdCredentialIssuerOK.md
doc/CreateCredentialInput.md
doc/CreateIssuanceConfig400Response.md
doc/CreateIssuanceConfigInput.md
doc/CreateIssuanceConfigInputCredentialSupportedInner.md
doc/CredentialIssuanceIdExistError.md
doc/CredentialOfferClaimedError.md
doc/CredentialOfferExpiredError.md
Expand All @@ -26,6 +25,7 @@ doc/CredentialResponseImmediate.md
doc/CredentialResponseImmediateCNonceExpiresIn.md
doc/CredentialResponseImmediateCredential.md
doc/CredentialSubjectNotValidError.md
doc/CredentialSupportedObject.md
doc/CredentialsApi.md
doc/DeferredCredentialInput.md
doc/GenerateCredentials400Response.md
Expand All @@ -38,7 +38,6 @@ doc/InvalidParameterError.md
doc/InvalidProofError.md
doc/IssuanceApi.md
doc/IssuanceConfigDto.md
doc/IssuanceConfigDtoCredentialSupportedInner.md
doc/IssuanceConfigListResponse.md
doc/IssuanceConfigMiniDto.md
doc/IssuanceStateResponse.md
Expand All @@ -54,10 +53,14 @@ doc/StartIssuanceInput.md
doc/StartIssuanceInputDataInner.md
doc/StartIssuanceInputDataInnerMetaData.md
doc/StartIssuanceResponse.md
doc/SupportedCredentialMetadata.md
doc/SupportedCredentialMetadataDisplayInner.md
doc/SupportedCredentialMetadataDisplayInnerLogo.md
doc/UpdateIssuanceConfigInput.md
doc/VcClaimedError.md
doc/WellKnownApi.md
doc/WellKnownOpenIdCredentialIssuerResponse.md
doc/WellKnownOpenIdCredentialIssuerResponseCredentialsSupportedInner.md
lib/api.dart
lib/api/configuration_api.dart
lib/api/credentials_api.dart
Expand All @@ -80,7 +83,6 @@ lib/model/cors_get_well_known_open_id_credential_issuer_ok.dart
lib/model/create_credential_input.dart
lib/model/create_issuance_config400_response.dart
lib/model/create_issuance_config_input.dart
lib/model/create_issuance_config_input_credential_supported_inner.dart
lib/model/credential_issuance_id_exist_error.dart
lib/model/credential_offer_claimed_error.dart
lib/model/credential_offer_expired_error.dart
Expand All @@ -95,6 +97,7 @@ lib/model/credential_response_immediate.dart
lib/model/credential_response_immediate_c_nonce_expires_in.dart
lib/model/credential_response_immediate_credential.dart
lib/model/credential_subject_not_valid_error.dart
lib/model/credential_supported_object.dart
lib/model/deferred_credential_input.dart
lib/model/generate_credentials400_response.dart
lib/model/get_credential_offer400_response.dart
Expand All @@ -105,7 +108,6 @@ lib/model/invalid_jwt_token_error.dart
lib/model/invalid_parameter_error.dart
lib/model/invalid_proof_error.dart
lib/model/issuance_config_dto.dart
lib/model/issuance_config_dto_credential_supported_inner.dart
lib/model/issuance_config_list_response.dart
lib/model/issuance_config_mini_dto.dart
lib/model/issuance_state_response.dart
Expand All @@ -120,9 +122,11 @@ lib/model/start_issuance_input.dart
lib/model/start_issuance_input_data_inner.dart
lib/model/start_issuance_input_data_inner_meta_data.dart
lib/model/start_issuance_response.dart
lib/model/supported_credential_metadata.dart
lib/model/supported_credential_metadata_display_inner.dart
lib/model/supported_credential_metadata_display_inner_logo.dart
lib/model/update_issuance_config_input.dart
lib/model/vc_claimed_error.dart
lib/model/well_known_open_id_credential_issuer_response.dart
lib/model/well_known_open_id_credential_issuer_response_credentials_supported_inner.dart
pubspec.yaml
test/credential_offer_claimed_error_test.dart
test/missing_holder_did_error_test.dart
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.2.0
7.8.0
12 changes: 8 additions & 4 deletions clients/dart/credential_issuance_client/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# affinidi_tdk_credential_issuance_client

Affinidi Credential Issuance Service Structure
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0.0
- Generator version: 7.8.0
- Build package: org.openapitools.codegen.languages.DartClientCodegen
For more information, please visit [https://github.com/affinidi/affinidi-tdk](https://github.com/affinidi/affinidi-tdk)

Expand All @@ -21,7 +22,7 @@ If this Dart package is published to Github, add the following dependency to you
```
dependencies:
affinidi_tdk_credential_issuance_client:
git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
git: https://github.com/affinidi.com/affinidi-tdk.git
```

### Local
Expand Down Expand Up @@ -90,7 +91,6 @@ All URIs are relative to *https://apse1.api.affinidi.io/cis*
- [CreateCredentialInput](doc//CreateCredentialInput.md)
- [CreateIssuanceConfig400Response](doc//CreateIssuanceConfig400Response.md)
- [CreateIssuanceConfigInput](doc//CreateIssuanceConfigInput.md)
- [CreateIssuanceConfigInputCredentialSupportedInner](doc//CreateIssuanceConfigInputCredentialSupportedInner.md)
- [CredentialIssuanceIdExistError](doc//CredentialIssuanceIdExistError.md)
- [CredentialOfferClaimedError](doc//CredentialOfferClaimedError.md)
- [CredentialOfferExpiredError](doc//CredentialOfferExpiredError.md)
Expand All @@ -105,6 +105,7 @@ All URIs are relative to *https://apse1.api.affinidi.io/cis*
- [CredentialResponseImmediateCNonceExpiresIn](doc//CredentialResponseImmediateCNonceExpiresIn.md)
- [CredentialResponseImmediateCredential](doc//CredentialResponseImmediateCredential.md)
- [CredentialSubjectNotValidError](doc//CredentialSubjectNotValidError.md)
- [CredentialSupportedObject](doc//CredentialSupportedObject.md)
- [DeferredCredentialInput](doc//DeferredCredentialInput.md)
- [GenerateCredentials400Response](doc//GenerateCredentials400Response.md)
- [GetCredentialOffer400Response](doc//GetCredentialOffer400Response.md)
Expand All @@ -115,7 +116,6 @@ All URIs are relative to *https://apse1.api.affinidi.io/cis*
- [InvalidParameterError](doc//InvalidParameterError.md)
- [InvalidProofError](doc//InvalidProofError.md)
- [IssuanceConfigDto](doc//IssuanceConfigDto.md)
- [IssuanceConfigDtoCredentialSupportedInner](doc//IssuanceConfigDtoCredentialSupportedInner.md)
- [IssuanceConfigListResponse](doc//IssuanceConfigListResponse.md)
- [IssuanceConfigMiniDto](doc//IssuanceConfigMiniDto.md)
- [IssuanceStateResponse](doc//IssuanceStateResponse.md)
Expand All @@ -130,9 +130,13 @@ All URIs are relative to *https://apse1.api.affinidi.io/cis*
- [StartIssuanceInputDataInner](doc//StartIssuanceInputDataInner.md)
- [StartIssuanceInputDataInnerMetaData](doc//StartIssuanceInputDataInnerMetaData.md)
- [StartIssuanceResponse](doc//StartIssuanceResponse.md)
- [SupportedCredentialMetadata](doc//SupportedCredentialMetadata.md)
- [SupportedCredentialMetadataDisplayInner](doc//SupportedCredentialMetadataDisplayInner.md)
- [SupportedCredentialMetadataDisplayInnerLogo](doc//SupportedCredentialMetadataDisplayInnerLogo.md)
- [UpdateIssuanceConfigInput](doc//UpdateIssuanceConfigInput.md)
- [VcClaimedError](doc//VcClaimedError.md)
- [WellKnownOpenIdCredentialIssuerResponse](doc//WellKnownOpenIdCredentialIssuerResponse.md)
- [WellKnownOpenIdCredentialIssuerResponseCredentialsSupportedInner](doc//WellKnownOpenIdCredentialIssuerResponseCredentialsSupportedInner.md)

## Documentation For Authorization

Expand Down
Loading

0 comments on commit 19f20e0

Please sign in to comment.