From d1c0fd328ef4b302314307aeabd8aa0b6b4ba263 Mon Sep 17 00:00:00 2001 From: Allain Magyar Date: Fri, 11 Jul 2025 13:26:59 -0300 Subject: [PATCH 1/4] chore: refactor whole gradle build Signed-off-by: Allain Magyar --- .editorconfig | 2 +- .github/ISSUE_TEMPLATE.md | 5 - .github/ISSUE_TEMPLATE/1-bug-report.yaml | 39 +- .github/ISSUE_TEMPLATE/2-feature-request.yaml | 5 +- .github/workflows/release-documentation.yml | 7 +- .github/workflows/release.yml | 106 +- .gitignore | 2 + .gitleaks.toml | 2881 ----------------- .markdown-link-check.json | 19 - .markdownlint.json | 3 - .mega-linter.yml | 21 - .releaserc.yml | 44 - .secretlintignore | 0 .../contents.xcworkspacedata | 7 - ApolloLibrary.podspec | 6 +- BUILDING.md | 134 + CHANGELOG.md | 465 --- CONTRIBUTING.md | 16 +- Package.swift | 6 +- README.md | 189 +- apollo/build.gradle.kts | 504 +-- apollo/docs/Base64.md | 22 +- apollo/docs/SecureRandom.md | 22 +- .../identus/apollo/base64/Base64.kt | 2 +- .../apollo/securerandom/SecureRandom.kt | 26 +- .../nativeInterop/cinterop/IOHKCryptoKit.def | 8 +- .../cinterop/IOHKSecureRandomGeneration.def | 8 +- bip32-ed25519/build.gradle.kts | 518 +-- build.gradle.kts | 210 +- gradle.properties | 21 +- gradle/libs.versions.toml | 17 +- gradle/wrapper/gradle-wrapper.jar | Bin 43705 -> 43764 bytes gradlew | 4 +- gradlew.bat | 4 +- iOSLibs/IOHKAES/IOHKAES.podspec | 2 +- .../IOHKAES/IOHKAES.xcodeproj/project.pbxproj | 8 +- iOSLibs/IOHKCryptoKit/IOHKCryptoKit.podspec | 2 +- iOSLibs/IOHKRSA/IOHKRSA.podspec | 2 +- .../IOHKRSA/IOHKRSA.xcodeproj/project.pbxproj | 8 +- iOSLibs/IOHKRSA/IOHKRSA/IOHKRSA.swift | 2 +- .../IOHKRSA/IOHKRSATests/IOHKRSATests.swift | 2 +- .../IOHKSecureRandomGeneration.podspec | 2 +- .../project.pbxproj | 8 +- iOSLibs/build.gradle.kts | 44 +- package.json | 26 - scripts/install-rust-packages.sh | 2 +- secp256k1-kmp/build.gradle.kts | 140 +- secp256k1-kmp/native/build-ios.sh | 5 +- secp256k1-kmp/native/build.gradle.kts | 79 +- secp256k1-kmp/native/xconfigure.sh | 14 +- settings.gradle.kts | 9 +- 51 files changed, 859 insertions(+), 4819 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md delete mode 100644 .gitleaks.toml delete mode 100644 .markdown-link-check.json delete mode 100644 .markdownlint.json delete mode 100644 .mega-linter.yml delete mode 100644 .releaserc.yml delete mode 100644 .secretlintignore delete mode 100644 .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 BUILDING.md delete mode 100644 CHANGELOG.md delete mode 100644 package.json diff --git a/.editorconfig b/.editorconfig index bd1514675..2904482ce 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,7 +1,7 @@ root = true [*.{kt,kts}] -ktlint_code_style = ktlint_official +ktlint_code_style = intellij_idea ktlint_standard_no_semi = disabled ktlint_standard_trailing-comma-on-call-site = disabled ktlint_standard_trailing-comma-on-declaration-site = disabled diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 4c4fb04e1..000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,5 +0,0 @@ -To submit a new issue, please, use one of the following templates: - -https://github.com/input-output-hk/atala-prism-didcomm-kmm/issues/new/choose - -Thank you! \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.yaml b/.github/ISSUE_TEMPLATE/1-bug-report.yaml index 4426d6344..5139940c0 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/1-bug-report.yaml @@ -1,36 +1,25 @@ --- -name: Bug Report -description: Report a bug in Apollo - +name: 'Bug Report' +description: 'Report a bug in Apollo' +title: '[BUG]' +labels: ['bug'] body: - - type: dropdown - id: is-regression + - type: markdown attributes: - label: Is this a regression? - options: - - 'Yes' - - 'No' - validations: - required: true - + value: | + Thanks for taking the time to report a bug! - type: textarea id: description attributes: label: Description + description: Also tell us, what did you expect to happen? validations: required: true - - type: textarea - id: exception-or-error + - type: input + id: version attributes: - label: Please provide the exception or error you saw - - - type: textarea - id: environment - attributes: - label: Please provide the environment you discovered this bug in - - - type: textarea - id: other - attributes: - label: Anything else? + label: Version + description: Which version you are using? + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.yaml b/.github/ISSUE_TEMPLATE/2-feature-request.yaml index 89ff55be0..b58adf148 100644 --- a/.github/ISSUE_TEMPLATE/2-feature-request.yaml +++ b/.github/ISSUE_TEMPLATE/2-feature-request.yaml @@ -1,7 +1,8 @@ --- name: 'Feature Request' -description: Suggest a new feature for Apollo - +description: 'Suggest a new feature for Apollo' +title: '[FEATURE]' +labels: ['feature'] body: - type: textarea id: proposed-feature diff --git a/.github/workflows/release-documentation.yml b/.github/workflows/release-documentation.yml index 7a56e8950..7b52f97eb 100644 --- a/.github/workflows/release-documentation.yml +++ b/.github/workflows/release-documentation.yml @@ -13,9 +13,6 @@ env: on: workflow_dispatch: - push: - branches: - - main jobs: build: @@ -97,7 +94,7 @@ jobs: rustup target add x86_64-apple-darwin rustup target add aarch64-unknown-linux-gnu rustup target add x86_64-unknown-linux-gnu - + - name: "Install rust toolchain (Macos)" if: matrix.os-type == 'macos' @@ -108,7 +105,7 @@ jobs: - name: "Dokka Documentation Generation" run: | - ./gradlew dokkaHtml + ./gradlew :apollo:dokkaHtml --no-configuration-cache - name: "Push" uses: s0/git-publish-subdir-action@develop diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e9b34e39..ca7c29824 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,6 +30,11 @@ jobs: unified_release: name: Unified Release (Swift/Maven/npm) runs-on: macos-latest + env: + ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.HYP_BOT_GPG_PRIVATE }} + ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.HYP_BOT_GPG_PASSWORD }} + ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }} + ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} steps: - name: Checkout specified branch @@ -37,8 +42,9 @@ jobs: with: submodules: recursive fetch-depth: 0 - ref: ${{ github.event.inputs.branch }} - token: ${{ secrets.IDENTUS_CI }} + + - name: Validate Gradle Wrapper + uses: gradle/actions/wrapper-validation@v4 - name: Install Java uses: actions/setup-java@v4 @@ -46,16 +52,10 @@ jobs: java-version: '17' distribution: zulu - - name: Setup Homebrew & Dependencies - run: | - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - brew install autoconf automake libtool rustup gpg - brew tap messense/macos-cross-toolchains - brew install --overwrite x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu - - - name: Clean Python Symlinks + - name: Install Dependencies run: | - rm -f '/usr/local/bin/2to3' '/usr/local/bin/python3' '/usr/local/bin/python3-config' + brew install messense/macos-cross-toolchains/aarch64-unknown-linux-gnu + brew install autoconf automake x86_64-unknown-linux-gnu - name: Install Rust Targets run: | @@ -68,96 +68,80 @@ jobs: aarch64-unknown-linux-gnu \ x86_64-unknown-linux-gnu - - name: Setup Xcode - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: '16.2' + # - name: Setup Xcode + # uses: maxim-lobanov/setup-xcode@v1 + # with: + # xcode-version: '16.2' - name: Install wasm-pack run: cargo install wasm-pack + - name: Setup node + if: ${{ inputs.release_ts }} + uses: actions/setup-node@v4 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org' + - name: Update gradle.properties with new version run: | sed -i '' 's/^version = *.*.*/version = ${{ github.event.inputs.version }}/' gradle.properties - name: Update yarn - run: | - ./gradlew kotlinUpgradeYarnLock - - - name: Configure Gradle and GPG for Publishing - if: ${{ inputs.release_maven }} - env: - SIGNING_KEY: ${{ secrets.HYP_BOT_GPG_PRIVATE }} - MAVEN_CENTRAL_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_CENTRAL_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - SIGNING_KEY_ID: ${{ secrets.HYP_BOT_GPG_KEY_ID }} - SIGNING_KEY_PASSWORD: ${{ secrets.HYP_BOT_GPG_PASSWORD }} - run: | - echo "$SIGNING_KEY" > ${HOME}/secring.gpg - echo "mavenCentralUsername=${MAVEN_CENTRAL_USERNAME}" >> gradle.properties - echo "mavenCentralPassword=${MAVEN_CENTRAL_PASSWORD}" >> gradle.properties - echo "signing.password=${SIGNING_KEY_PASSWORD}" >> gradle.properties - echo "signing.secretKeyRingFile=${HOME}/secring.gpg" >> gradle.properties - echo "=== gradle.properties content ===" - cat gradle.properties + run: ./gradlew kotlinUpgradeYarnLock - name: Build Kotlin Multiplatform Swift Artifacts if: ${{ inputs.release_swift }} - run: | - ./gradlew :apollo:createSwiftPackage + run: ./gradlew :apollo:createSwiftPackage --no-configuration-cache - name: Build Kotlin Multiplatform Maven Artifacts if: ${{ inputs.release_maven }} - run: | - ./gradlew publishToMavenLocal + run: ./gradlew publishToMavenLocal --no-configuration-cache - name: Build Kotlin Multiplatform NPM Artifacts if: ${{ inputs.release_ts }} - run: | - ./gradlew :apollo:assembleJsPackage + run: ./gradlew :apollo:assembleJsPackage - name: Prepare Swift XCFramework if: ${{ inputs.release_swift }} run: | cd ./apollo/build/packages/ApolloSwift - zip -r Apollo.xcframework.zip Apollo.xcframework + zip -r ApolloLibrary.xcframework.zip ApolloLibrary.xcframework cd ${{ github.workspace }} - checksum=$(swift package compute-checksum ./apollo/build/packages/ApolloSwift/Apollo.xcframework.zip) + checksum=$(swift package compute-checksum ./apollo/build/packages/ApolloSwift/ApolloLibrary.xcframework.zip) sed -i.bak \ -e "s/checksum:.*/checksum: \"$checksum\"/" \ - -e "s|download/.*/Apollo.xcframework.zip|download/v${{ github.event.inputs.version }}/Apollo.xcframework.zip|" \ + -e "s|download/.*/ApolloLibrary.xcframework.zip|download/v${{ github.event.inputs.version }}/ApolloLibrary.xcframework.zip|" \ Package.swift - - name: Publish JVM & Android to Maven Central - if: ${{ inputs.release_maven }} + - name: Prepare CocoaPods Specification + if: ${{ inputs.release_swift }} run: | - ./gradlew publishAllPublicationsToMavenCentralRepository -Pversion=${{ github.event.inputs.version }} + sed -i.bak \ + -e "s|download/.*/ApolloLibrary.xcframework.zip|download/v${{ github.event.inputs.version }}/ApolloLibrary.xcframework.zip|" \ + -e "s|spec.version *= *'.*'|spec.version = '${{ github.event.inputs.version }}'|" \ + ApolloLibrary.podspec - - name: Publish TypeScript package to npm - if: ${{ inputs.release_ts }} - uses: actions/setup-node@v4 - with: - node-version: '20' - registry-url: 'https://registry.npmjs.org' + - name: Publish JVM & Android to Maven Central + if: ${{ inputs.release_maven }} + env: + ORG_GRADLE_PROJECT_autoRelease: true + run: ./gradlew publishToMavenCentral --no-configuration-cache - - name: npm publish + - name: NPM publish if: ${{ inputs.release_ts }} - run: | - ./gradlew :apollo:publishJsPackageToNpmjsRegistry + run: ./gradlew :apollo:publishJsPackageToNpmjsRegistry env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Commit updated files and tag the release uses: stefanzweifel/git-auto-commit-action@v5 + if: ${{ inputs.release_swift }} with: commit_message: | chore(release): v${{ github.event.inputs.version }} tagging_message: v${{ github.event.inputs.version }} - file_pattern: | - Package.swift - package.json - CHANGELOG.md - gradle.properties + file_pattern: Package.swift ApolloLibrary.podspec gradle.properties - name: Create GitHub Release uses: softprops/action-gh-release@v2 @@ -165,6 +149,6 @@ jobs: with: tag_name: v${{ github.event.inputs.version }} files: | - ./apollo/build/packages/ApolloSwift/Apollo.xcframework.zip + ./apollo/build/packages/ApolloSwift/ApolloLibrary.xcframework.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index e162930d0..b02c48141 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,5 @@ JSLibs/iohk-crypto/node_modules node_modules/ /.kotlin /secp256k1-kmp/native/secp256k1 +.swiftpm +.vscode diff --git a/.gitleaks.toml b/.gitleaks.toml deleted file mode 100644 index c5824f221..000000000 --- a/.gitleaks.toml +++ /dev/null @@ -1,2881 +0,0 @@ -# This file has been auto-generated. Do not edit manually. -# If you would like to contribute new rules, please use -# cmd/generate/config/main.go and follow the contributing guidelines -# at https://github.com/zricethezav/gitleaks/blob/master/CONTRIBUTING.md - -# This is the default gitleaks configuration file. -# Rules and allowlists are defined within this file. -# Rules instruct gitleaks on what should be considered a secret. -# Allowlists instruct gitleaks on what is allowed, i.e. not a secret. - -title = "gitleaks config" - -[allowlist] -description = "global allow lists" -# Old commits that dont were reviewed and dont provide any secret published -commits = [ - "4227c2c7612f2f209438746185751419f9e52efc", - "8c25089bb50caa22eb0dca700203907b03a95932", - "da099bd8ef28f323839730a7aa2dd333e0b0a553", -] -paths = [ - '''gitleaks.toml''', - '''(.*?)(jpg|gif|doc|docx|zip|xls|pdf|bin|svg|socket|vsidx|v2|suo|wsuo|.dll|pdb|exe)$''', - '''(go.mod|go.sum)$''', - '''gradle.lockfile''', - '''node_modules''', - '''package-lock.json''', - '''pnpm-lock.yaml''', - '''Database.refactorlog''', - '''vendor''', - '''(?i).*(\/commonTest\/|\/androidTest\/|\/iosTest\/|\/jvmTest\/|\/jsTest\/).*''', # We use private keys data to test the cryptographic methods -] - -[[rules]] -description = "Adafruit API Key" -id = "adafruit-api-key" -regex = '''(?i)(?:adafruit)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "adafruit", -] - -[[rules]] -description = "Adobe Client ID (OAuth Web)" -id = "adobe-client-id" -regex = '''(?i)(?:adobe)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "adobe", -] - -[[rules]] -description = "Adobe Client Secret" -id = "adobe-client-secret" -regex = '''(?i)\b((p8e-)(?i)[a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "p8e-", -] - -[[rules]] -description = "Age secret key" -id = "age secret key" -regex = '''AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}''' -keywords = [ - "age-secret-key-1", -] - -[[rules]] -description = "Airtable API Key" -id = "airtable-api-key" -regex = '''(?i)(?:airtable)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{17})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "airtable", -] - -[[rules]] -description = "Algolia API Key" -id = "algolia-api-key" -regex = '''(?i)(?:algolia)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "algolia", -] - -[[rules]] -description = "Alibaba AccessKey ID" -id = "alibaba-access-key-id" -regex = '''(?i)\b((LTAI)(?i)[a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "ltai", -] - -[[rules]] -description = "Alibaba Secret Key" -id = "alibaba-secret-key" -regex = '''(?i)(?:alibaba)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "alibaba", -] - -[[rules]] -description = "Asana Client ID" -id = "asana-client-id" -regex = '''(?i)(?:asana)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "asana", -] - -[[rules]] -description = "Asana Client Secret" -id = "asana-client-secret" -regex = '''(?i)(?:asana)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "asana", -] - -[[rules]] -description = "Atlassian API token" -id = "atlassian-api-token" -regex = '''(?i)(?:atlassian|confluence|jira)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "atlassian","confluence","jira", -] - -[[rules]] -description = "Authress Service Client Access Key" -id = "authress-service-client-access-key" -regex = '''(?i)\b((?:sc|ext|scauth|authress)_[a-z0-9]{5,30}\.[a-z0-9]{4,6}\.acc_[a-z0-9-]{10,32}\.[a-z0-9+/_=-]{30,120})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "sc_","ext_","scauth_","authress_", -] - -[[rules]] -description = "AWS" -id = "aws-access-token" -regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}''' -keywords = [ - "akia","agpa","aida","aroa","aipa","anpa","anva","asia", -] - -[[rules]] -description = "Beamer API token" -id = "beamer-api-token" -regex = '''(?i)(?:beamer)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(b_[a-z0-9=_\-]{44})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "beamer", -] - -[[rules]] -description = "Bitbucket Client ID" -id = "bitbucket-client-id" -regex = '''(?i)(?:bitbucket)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "bitbucket", -] - -[[rules]] -description = "Bitbucket Client Secret" -id = "bitbucket-client-secret" -regex = '''(?i)(?:bitbucket)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "bitbucket", -] - -[[rules]] -description = "Bittrex Access Key" -id = "bittrex-access-key" -regex = '''(?i)(?:bittrex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "bittrex", -] - -[[rules]] -description = "Bittrex Secret Key" -id = "bittrex-secret-key" -regex = '''(?i)(?:bittrex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "bittrex", -] - -[[rules]] -description = "Clojars API token" -id = "clojars-api-token" -regex = '''(?i)(CLOJARS_)[a-z0-9]{60}''' -keywords = [ - "clojars", -] - -[[rules]] -description = "Codecov Access Token" -id = "codecov-access-token" -regex = '''(?i)(?:codecov)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "codecov", -] - -[[rules]] -description = "Coinbase Access Token" -id = "coinbase-access-token" -regex = '''(?i)(?:coinbase)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "coinbase", -] - -[[rules]] -description = "Confluent Access Token" -id = "confluent-access-token" -regex = '''(?i)(?:confluent)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "confluent", -] - -[[rules]] -description = "Confluent Secret Key" -id = "confluent-secret-key" -regex = '''(?i)(?:confluent)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "confluent", -] - -[[rules]] -description = "Contentful delivery API token" -id = "contentful-delivery-api-token" -regex = '''(?i)(?:contentful)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{43})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "contentful", -] - -[[rules]] -description = "Databricks API token" -id = "databricks-api-token" -regex = '''(?i)\b(dapi[a-h0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "dapi", -] - -[[rules]] -description = "Datadog Access Token" -id = "datadog-access-token" -regex = '''(?i)(?:datadog)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "datadog", -] - -[[rules]] -description = "Defined Networking API token" -id = "defined-networking-api-token" -regex = '''(?i)(?:dnkey)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(dnkey-[a-z0-9=_\-]{26}-[a-z0-9=_\-]{52})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "dnkey", -] - -[[rules]] -description = "DigitalOcean OAuth Access Token" -id = "digitalocean-access-token" -regex = '''(?i)\b(doo_v1_[a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "doo_v1_", -] - -[[rules]] -description = "DigitalOcean Personal Access Token" -id = "digitalocean-pat" -regex = '''(?i)\b(dop_v1_[a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "dop_v1_", -] - -[[rules]] -description = "DigitalOcean OAuth Refresh Token" -id = "digitalocean-refresh-token" -regex = '''(?i)\b(dor_v1_[a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "dor_v1_", -] - -[[rules]] -description = "Discord API key" -id = "discord-api-token" -regex = '''(?i)(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "discord", -] - -[[rules]] -description = "Discord client ID" -id = "discord-client-id" -regex = '''(?i)(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9]{18})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "discord", -] - -[[rules]] -description = "Discord client secret" -id = "discord-client-secret" -regex = '''(?i)(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "discord", -] - -[[rules]] -description = "Doppler API token" -id = "doppler-api-token" -regex = '''(dp\.pt\.)(?i)[a-z0-9]{43}''' -keywords = [ - "doppler", -] - -[[rules]] -description = "Droneci Access Token" -id = "droneci-access-token" -regex = '''(?i)(?:droneci)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "droneci", -] - -[[rules]] -description = "Dropbox API secret" -id = "dropbox-api-token" -regex = '''(?i)(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{15})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "dropbox", -] - -[[rules]] -description = "Dropbox long lived API token" -id = "dropbox-long-lived-api-token" -regex = '''(?i)(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\-_=]{43})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "dropbox", -] - -[[rules]] -description = "Dropbox short lived API token" -id = "dropbox-short-lived-api-token" -regex = '''(?i)(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(sl\.[a-z0-9\-=_]{135})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "dropbox", -] - -[[rules]] -description = "Duffel API token" -id = "duffel-api-token" -regex = '''duffel_(test|live)_(?i)[a-z0-9_\-=]{43}''' -keywords = [ - "duffel", -] - -[[rules]] -description = "Dynatrace API token" -id = "dynatrace-api-token" -regex = '''dt0c01\.(?i)[a-z0-9]{24}\.[a-z0-9]{64}''' -keywords = [ - "dynatrace", -] - -[[rules]] -description = "EasyPost API token" -id = "easypost-api-token" -regex = '''\bEZAK(?i)[a-z0-9]{54}''' -keywords = [ - "ezak", -] - -[[rules]] -description = "EasyPost test API token" -id = "easypost-test-api-token" -regex = '''\bEZTK(?i)[a-z0-9]{54}''' -keywords = [ - "eztk", -] - -[[rules]] -description = "Etsy Access Token" -id = "etsy-access-token" -regex = '''(?i)(?:etsy)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "etsy", -] - -[[rules]] -description = "Facebook Access Token" -id = "facebook" -regex = '''(?i)(?:facebook)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "facebook", -] - -[[rules]] -description = "Fastly API key" -id = "fastly-api-token" -regex = '''(?i)(?:fastly)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "fastly", -] - -[[rules]] -description = "Finicity API token" -id = "finicity-api-token" -regex = '''(?i)(?:finicity)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "finicity", -] - -[[rules]] -description = "Finicity Client Secret" -id = "finicity-client-secret" -regex = '''(?i)(?:finicity)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "finicity", -] - -[[rules]] -description = "Finnhub Access Token" -id = "finnhub-access-token" -regex = '''(?i)(?:finnhub)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "finnhub", -] - -[[rules]] -description = "Flickr Access Token" -id = "flickr-access-token" -regex = '''(?i)(?:flickr)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "flickr", -] - -[[rules]] -description = "Flutterwave Encryption Key" -id = "flutterwave-encryption-key" -regex = '''FLWSECK_TEST-(?i)[a-h0-9]{12}''' -keywords = [ - "flwseck_test", -] - -[[rules]] -description = "Finicity Public Key" -id = "flutterwave-public-key" -regex = '''FLWPUBK_TEST-(?i)[a-h0-9]{32}-X''' -keywords = [ - "flwpubk_test", -] - -[[rules]] -description = "Flutterwave Secret Key" -id = "flutterwave-secret-key" -regex = '''FLWSECK_TEST-(?i)[a-h0-9]{32}-X''' -keywords = [ - "flwseck_test", -] - -[[rules]] -description = "Frame.io API token" -id = "frameio-api-token" -regex = '''fio-u-(?i)[a-z0-9\-_=]{64}''' -keywords = [ - "fio-u-", -] - -[[rules]] -description = "Freshbooks Access Token" -id = "freshbooks-access-token" -regex = '''(?i)(?:freshbooks)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "freshbooks", -] - -[[rules]] -description = "GCP API key" -id = "gcp-api-key" -regex = '''(?i)\b(AIza[0-9A-Za-z\\-_]{35})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "aiza", -] - -[[rules]] -description = "Generic API Key" -id = "generic-api-key" -regex = '''(?i)(?:key|api|token|secret|client|passwd|password|auth|access)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-z\-_.=]{10,150})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -entropy = 3.5 -keywords = [ - "key","api","token","secret","client","passwd","password","auth","access", -] -[rules.allowlist] -stopwords= [ - "client", - "endpoint", - "vpn", - "_ec2_", - "aws_", - "authorize", - "author", - "define", - "config", - "credential", - "setting", - "sample", - "xxxxxx", - "000000", - "buffer", - "delete", - "aaaaaa", - "fewfwef", - "getenv", - "env_", - "system", - "example", - "ecdsa", - "sha256", - "sha1", - "sha2", - "md5", - "alert", - "wizard", - "target", - "onboard", - "welcome", - "page", - "exploit", - "experiment", - "expire", - "rabbitmq", - "scraper", - "widget", - "music", - "dns_", - "dns-", - "yahoo", - "want", - "json", - "action", - "script", - "fix_", - "fix-", - "develop", - "compas", - "stripe", - "service", - "master", - "metric", - "tech", - "gitignore", - "rich", - "open", - "stack", - "irc_", - "irc-", - "sublime", - "kohana", - "has_", - "has-", - "fabric", - "wordpres", - "role", - "osx_", - "osx-", - "boost", - "addres", - "queue", - "working", - "sandbox", - "internet", - "print", - "vision", - "tracking", - "being", - "generator", - "traffic", - "world", - "pull", - "rust", - "watcher", - "small", - "auth", - "full", - "hash", - "more", - "install", - "auto", - "complete", - "learn", - "paper", - "installer", - "research", - "acces", - "last", - "binding", - "spine", - "into", - "chat", - "algorithm", - "resource", - "uploader", - "video", - "maker", - "next", - "proc", - "lock", - "robot", - "snake", - "patch", - "matrix", - "drill", - "terminal", - "term", - "stuff", - "genetic", - "generic", - "identity", - "audit", - "pattern", - "audio", - "web_", - "web-", - "crud", - "problem", - "statu", - "cms-", - "cms_", - "arch", - "coffee", - "workflow", - "changelog", - "another", - "uiview", - "content", - "kitchen", - "gnu_", - "gnu-", - "gnu.", - "conf", - "couchdb", - "client", - "opencv", - "rendering", - "update", - "concept", - "varnish", - "gui_", - "gui-", - "gui.", - "version", - "shared", - "extra", - "product", - "still", - "not_", - "not-", - "not.", - "drop", - "ring", - "png_", - "png-", - "png.", - "actively", - "import", - "output", - "backup", - "start", - "embedded", - "registry", - "pool", - "semantic", - "instagram", - "bash", - "system", - "ninja", - "drupal", - "jquery", - "polyfill", - "physic", - "league", - "guide", - "pack", - "synopsi", - "sketch", - "injection", - "svg_", - "svg-", - "svg.", - "friendly", - "wave", - "convert", - "manage", - "camera", - "link", - "slide", - "timer", - "wrapper", - "gallery", - "url_", - "url-", - "url.", - "todomvc", - "requirej", - "party", - "http", - "payment", - "async", - "library", - "home", - "coco", - "gaia", - "display", - "universal", - "func", - "metadata", - "hipchat", - "under", - "room", - "config", - "personal", - "realtime", - "resume", - "database", - "testing", - "tiny", - "basic", - "forum", - "meetup", - "yet_", - "yet-", - "yet.", - "cento", - "dead", - "fluentd", - "editor", - "utilitie", - "run_", - "run-", - "run.", - "box_", - "box-", - "box.", - "bot_", - "bot-", - "bot.", - "making", - "sample", - "group", - "monitor", - "ajax", - "parallel", - "cassandra", - "ultimate", - "site", - "get_", - "get-", - "get.", - "gen_", - "gen-", - "gen.", - "gem_", - "gem-", - "gem.", - "extended", - "image", - "knife", - "asset", - "nested", - "zero", - "plugin", - "bracket", - "mule", - "mozilla", - "number", - "act_", - "act-", - "act.", - "map_", - "map-", - "map.", - "micro", - "debug", - "openshift", - "chart", - "expres", - "backend", - "task", - "source", - "translate", - "jbos", - "composer", - "sqlite", - "profile", - "mustache", - "mqtt", - "yeoman", - "have", - "builder", - "smart", - "like", - "oauth", - "school", - "guideline", - "captcha", - "filter", - "bitcoin", - "bridge", - "color", - "toolbox", - "discovery", - "new_", - "new-", - "new.", - "dashboard", - "when", - "setting", - "level", - "post", - "standard", - "port", - "platform", - "yui_", - "yui-", - "yui.", - "grunt", - "animation", - "haskell", - "icon", - "latex", - "cheat", - "lua_", - "lua-", - "lua.", - "gulp", - "case", - "author", - "without", - "simulator", - "wifi", - "directory", - "lisp", - "list", - "flat", - "adventure", - "story", - "storm", - "gpu_", - "gpu-", - "gpu.", - "store", - "caching", - "attention", - "solr", - "logger", - "demo", - "shortener", - "hadoop", - "finder", - "phone", - "pipeline", - "range", - "textmate", - "showcase", - "app_", - "app-", - "app.", - "idiomatic", - "edit", - "our_", - "our-", - "our.", - "out_", - "out-", - "out.", - "sentiment", - "linked", - "why_", - "why-", - "why.", - "local", - "cube", - "gmail", - "job_", - "job-", - "job.", - "rpc_", - "rpc-", - "rpc.", - "contest", - "tcp_", - "tcp-", - "tcp.", - "usage", - "buildout", - "weather", - "transfer", - "automated", - "sphinx", - "issue", - "sas_", - "sas-", - "sas.", - "parallax", - "jasmine", - "addon", - "machine", - "solution", - "dsl_", - "dsl-", - "dsl.", - "episode", - "menu", - "theme", - "best", - "adapter", - "debugger", - "chrome", - "tutorial", - "life", - "step", - "people", - "joomla", - "paypal", - "developer", - "solver", - "team", - "current", - "love", - "visual", - "date", - "data", - "canva", - "container", - "future", - "xml_", - "xml-", - "xml.", - "twig", - "nagio", - "spatial", - "original", - "sync", - "archived", - "refinery", - "science", - "mapping", - "gitlab", - "play", - "ext_", - "ext-", - "ext.", - "session", - "impact", - "set_", - "set-", - "set.", - "see_", - "see-", - "see.", - "migration", - "commit", - "community", - "shopify", - "what'", - "cucumber", - "statamic", - "mysql", - "location", - "tower", - "line", - "code", - "amqp", - "hello", - "send", - "index", - "high", - "notebook", - "alloy", - "python", - "field", - "document", - "soap", - "edition", - "email", - "php_", - "php-", - "php.", - "command", - "transport", - "official", - "upload", - "study", - "secure", - "angularj", - "akka", - "scalable", - "package", - "request", - "con_", - "con-", - "con.", - "flexible", - "security", - "comment", - "module", - "flask", - "graph", - "flash", - "apache", - "change", - "window", - "space", - "lambda", - "sheet", - "bookmark", - "carousel", - "friend", - "objective", - "jekyll", - "bootstrap", - "first", - "article", - "gwt_", - "gwt-", - "gwt.", - "classic", - "media", - "websocket", - "touch", - "desktop", - "real", - "read", - "recorder", - "moved", - "storage", - "validator", - "add-on", - "pusher", - "scs_", - "scs-", - "scs.", - "inline", - "asp_", - "asp-", - "asp.", - "timeline", - "base", - "encoding", - "ffmpeg", - "kindle", - "tinymce", - "pretty", - "jpa_", - "jpa-", - "jpa.", - "used", - "user", - "required", - "webhook", - "download", - "resque", - "espresso", - "cloud", - "mongo", - "benchmark", - "pure", - "cakephp", - "modx", - "mode", - "reactive", - "fuel", - "written", - "flickr", - "mail", - "brunch", - "meteor", - "dynamic", - "neo_", - "neo-", - "neo.", - "new_", - "new-", - "new.", - "net_", - "net-", - "net.", - "typo", - "type", - "keyboard", - "erlang", - "adobe", - "logging", - "ckeditor", - "message", - "iso_", - "iso-", - "iso.", - "hook", - "ldap", - "folder", - "reference", - "railscast", - "www_", - "www-", - "www.", - "tracker", - "azure", - "fork", - "form", - "digital", - "exporter", - "skin", - "string", - "template", - "designer", - "gollum", - "fluent", - "entity", - "language", - "alfred", - "summary", - "wiki", - "kernel", - "calendar", - "plupload", - "symfony", - "foundry", - "remote", - "talk", - "search", - "dev_", - "dev-", - "dev.", - "del_", - "del-", - "del.", - "token", - "idea", - "sencha", - "selector", - "interface", - "create", - "fun_", - "fun-", - "fun.", - "groovy", - "query", - "grail", - "red_", - "red-", - "red.", - "laravel", - "monkey", - "slack", - "supported", - "instant", - "value", - "center", - "latest", - "work", - "but_", - "but-", - "but.", - "bug_", - "bug-", - "bug.", - "virtual", - "tweet", - "statsd", - "studio", - "path", - "real-time", - "frontend", - "notifier", - "coding", - "tool", - "firmware", - "flow", - "random", - "mediawiki", - "bosh", - "been", - "beer", - "lightbox", - "theory", - "origin", - "redmine", - "hub_", - "hub-", - "hub.", - "require", - "pro_", - "pro-", - "pro.", - "ant_", - "ant-", - "ant.", - "any_", - "any-", - "any.", - "recipe", - "closure", - "mapper", - "event", - "todo", - "model", - "redi", - "provider", - "rvm_", - "rvm-", - "rvm.", - "program", - "memcached", - "rail", - "silex", - "foreman", - "activity", - "license", - "strategy", - "batch", - "streaming", - "fast", - "use_", - "use-", - "use.", - "usb_", - "usb-", - "usb.", - "impres", - "academy", - "slider", - "please", - "layer", - "cros", - "now_", - "now-", - "now.", - "miner", - "extension", - "own_", - "own-", - "own.", - "app_", - "app-", - "app.", - "debian", - "symphony", - "example", - "feature", - "serie", - "tree", - "project", - "runner", - "entry", - "leetcode", - "layout", - "webrtc", - "logic", - "login", - "worker", - "toolkit", - "mocha", - "support", - "back", - "inside", - "device", - "jenkin", - "contact", - "fake", - "awesome", - "ocaml", - "bit_", - "bit-", - "bit.", - "drive", - "screen", - "prototype", - "gist", - "binary", - "nosql", - "rest", - "overview", - "dart", - "dark", - "emac", - "mongoid", - "solarized", - "homepage", - "emulator", - "commander", - "django", - "yandex", - "gradle", - "xcode", - "writer", - "crm_", - "crm-", - "crm.", - "jade", - "startup", - "error", - "using", - "format", - "name", - "spring", - "parser", - "scratch", - "magic", - "try_", - "try-", - "try.", - "rack", - "directive", - "challenge", - "slim", - "counter", - "element", - "chosen", - "doc_", - "doc-", - "doc.", - "meta", - "should", - "button", - "packet", - "stream", - "hardware", - "android", - "infinite", - "password", - "software", - "ghost", - "xamarin", - "spec", - "chef", - "interview", - "hubot", - "mvc_", - "mvc-", - "mvc.", - "exercise", - "leaflet", - "launcher", - "air_", - "air-", - "air.", - "photo", - "board", - "boxen", - "way_", - "way-", - "way.", - "computing", - "welcome", - "notepad", - "portfolio", - "cat_", - "cat-", - "cat.", - "can_", - "can-", - "can.", - "magento", - "yaml", - "domain", - "card", - "yii_", - "yii-", - "yii.", - "checker", - "browser", - "upgrade", - "only", - "progres", - "aura", - "ruby_", - "ruby-", - "ruby.", - "polymer", - "util", - "lite", - "hackathon", - "rule", - "log_", - "log-", - "log.", - "opengl", - "stanford", - "skeleton", - "history", - "inspector", - "help", - "soon", - "selenium", - "lab_", - "lab-", - "lab.", - "scheme", - "schema", - "look", - "ready", - "leveldb", - "docker", - "game", - "minimal", - "logstash", - "messaging", - "within", - "heroku", - "mongodb", - "kata", - "suite", - "picker", - "win_", - "win-", - "win.", - "wip_", - "wip-", - "wip.", - "panel", - "started", - "starter", - "front-end", - "detector", - "deploy", - "editing", - "based", - "admin", - "capture", - "spree", - "page", - "bundle", - "goal", - "rpg_", - "rpg-", - "rpg.", - "setup", - "side", - "mean", - "reader", - "cookbook", - "mini", - "modern", - "seed", - "dom_", - "dom-", - "dom.", - "doc_", - "doc-", - "doc.", - "dot_", - "dot-", - "dot.", - "syntax", - "sugar", - "loader", - "website", - "make", - "kit_", - "kit-", - "kit.", - "protocol", - "human", - "daemon", - "golang", - "manager", - "countdown", - "connector", - "swagger", - "map_", - "map-", - "map.", - "mac_", - "mac-", - "mac.", - "man_", - "man-", - "man.", - "orm_", - "orm-", - "orm.", - "org_", - "org-", - "org.", - "little", - "zsh_", - "zsh-", - "zsh.", - "shop", - "show", - "workshop", - "money", - "grid", - "server", - "octopres", - "svn_", - "svn-", - "svn.", - "ember", - "embed", - "general", - "file", - "important", - "dropbox", - "portable", - "public", - "docpad", - "fish", - "sbt_", - "sbt-", - "sbt.", - "done", - "para", - "network", - "common", - "readme", - "popup", - "simple", - "purpose", - "mirror", - "single", - "cordova", - "exchange", - "object", - "design", - "gateway", - "account", - "lamp", - "intellij", - "math", - "mit_", - "mit-", - "mit.", - "control", - "enhanced", - "emitter", - "multi", - "add_", - "add-", - "add.", - "about", - "socket", - "preview", - "vagrant", - "cli_", - "cli-", - "cli.", - "powerful", - "top_", - "top-", - "top.", - "radio", - "watch", - "fluid", - "amazon", - "report", - "couchbase", - "automatic", - "detection", - "sprite", - "pyramid", - "portal", - "advanced", - "plu_", - "plu-", - "plu.", - "runtime", - "git_", - "git-", - "git.", - "uri_", - "uri-", - "uri.", - "haml", - "node", - "sql_", - "sql-", - "sql.", - "cool", - "core", - "obsolete", - "handler", - "iphone", - "extractor", - "array", - "copy", - "nlp_", - "nlp-", - "nlp.", - "reveal", - "pop_", - "pop-", - "pop.", - "engine", - "parse", - "check", - "html", - "nest", - "all_", - "all-", - "all.", - "chinese", - "buildpack", - "what", - "tag_", - "tag-", - "tag.", - "proxy", - "style", - "cookie", - "feed", - "restful", - "compiler", - "creating", - "prelude", - "context", - "java", - "rspec", - "mock", - "backbone", - "light", - "spotify", - "flex", - "related", - "shell", - "which", - "clas", - "webapp", - "swift", - "ansible", - "unity", - "console", - "tumblr", - "export", - "campfire", - "conway'", - "made", - "riak", - "hero", - "here", - "unix", - "unit", - "glas", - "smtp", - "how_", - "how-", - "how.", - "hot_", - "hot-", - "hot.", - "debug", - "release", - "diff", - "player", - "easy", - "right", - "old_", - "old-", - "old.", - "animate", - "time", - "push", - "explorer", - "course", - "training", - "nette", - "router", - "draft", - "structure", - "note", - "salt", - "where", - "spark", - "trello", - "power", - "method", - "social", - "via_", - "via-", - "via.", - "vim_", - "vim-", - "vim.", - "select", - "webkit", - "github", - "ftp_", - "ftp-", - "ftp.", - "creator", - "mongoose", - "led_", - "led-", - "led.", - "movie", - "currently", - "pdf_", - "pdf-", - "pdf.", - "load", - "markdown", - "phalcon", - "input", - "custom", - "atom", - "oracle", - "phonegap", - "ubuntu", - "great", - "rdf_", - "rdf-", - "rdf.", - "popcorn", - "firefox", - "zip_", - "zip-", - "zip.", - "cuda", - "dotfile", - "static", - "openwrt", - "viewer", - "powered", - "graphic", - "les_", - "les-", - "les.", - "doe_", - "doe-", - "doe.", - "maven", - "word", - "eclipse", - "lab_", - "lab-", - "lab.", - "hacking", - "steam", - "analytic", - "option", - "abstract", - "archive", - "reality", - "switcher", - "club", - "write", - "kafka", - "arduino", - "angular", - "online", - "title", - "don't", - "contao", - "notice", - "analyzer", - "learning", - "zend", - "external", - "staging", - "busines", - "tdd_", - "tdd-", - "tdd.", - "scanner", - "building", - "snippet", - "modular", - "bower", - "stm_", - "stm-", - "stm.", - "lib_", - "lib-", - "lib.", - "alpha", - "mobile", - "clean", - "linux", - "nginx", - "manifest", - "some", - "raspberry", - "gnome", - "ide_", - "ide-", - "ide.", - "block", - "statistic", - "info", - "drag", - "youtube", - "koan", - "facebook", - "paperclip", - "art_", - "art-", - "art.", - "quality", - "tab_", - "tab-", - "tab.", - "need", - "dojo", - "shield", - "computer", - "stat", - "state", - "twitter", - "utility", - "converter", - "hosting", - "devise", - "liferay", - "updated", - "force", - "tip_", - "tip-", - "tip.", - "behavior", - "active", - "call", - "answer", - "deck", - "better", - "principle", - "ches", - "bar_", - "bar-", - "bar.", - "reddit", - "three", - "haxe", - "just", - "plug-in", - "agile", - "manual", - "tetri", - "super", - "beta", - "parsing", - "doctrine", - "minecraft", - "useful", - "perl", - "sharing", - "agent", - "switch", - "view", - "dash", - "channel", - "repo", - "pebble", - "profiler", - "warning", - "cluster", - "running", - "markup", - "evented", - "mod_", - "mod-", - "mod.", - "share", - "csv_", - "csv-", - "csv.", - "response", - "good", - "house", - "connect", - "built", - "build", - "find", - "ipython", - "webgl", - "big_", - "big-", - "big.", - "google", - "scala", - "sdl_", - "sdl-", - "sdl.", - "sdk_", - "sdk-", - "sdk.", - "native", - "day_", - "day-", - "day.", - "puppet", - "text", - "routing", - "helper", - "linkedin", - "crawler", - "host", - "guard", - "merchant", - "poker", - "over", - "writing", - "free", - "classe", - "component", - "craft", - "nodej", - "phoenix", - "longer", - "quick", - "lazy", - "memory", - "clone", - "hacker", - "middleman", - "factory", - "motion", - "multiple", - "tornado", - "hack", - "ssh_", - "ssh-", - "ssh.", - "review", - "vimrc", - "driver", - "driven", - "blog", - "particle", - "table", - "intro", - "importer", - "thrift", - "xmpp", - "framework", - "refresh", - "react", - "font", - "librarie", - "variou", - "formatter", - "analysi", - "karma", - "scroll", - "tut_", - "tut-", - "tut.", - "apple", - "tag_", - "tag-", - "tag.", - "tab_", - "tab-", - "tab.", - "category", - "ionic", - "cache", - "homebrew", - "reverse", - "english", - "getting", - "shipping", - "clojure", - "boot", - "book", - "branch", - "combination", - "combo", -] -[[rules]] -description = "GitHub App Token" -id = "github-app-token" -regex = '''(ghu|ghs)_[0-9a-zA-Z]{36}''' -keywords = [ - "ghu_","ghs_", -] - -[[rules]] -description = "GitHub Fine-Grained Personal Access Token" -id = "github-fine-grained-pat" -regex = '''github_pat_[0-9a-zA-Z_]{82}''' -keywords = [ - "github_pat_", -] - -[[rules]] -description = "GitHub OAuth Access Token" -id = "github-oauth" -regex = '''gho_[0-9a-zA-Z]{36}''' -keywords = [ - "gho_", -] - -[[rules]] -description = "GitHub Personal Access Token" -id = "github-pat" -regex = '''ghp_[0-9a-zA-Z]{36}''' -keywords = [ - "ghp_", -] - -[[rules]] -description = "GitHub Refresh Token" -id = "github-refresh-token" -regex = '''ghr_[0-9a-zA-Z]{36}''' -keywords = [ - "ghr_", -] - -[[rules]] -description = "GitLab Personal Access Token" -id = "gitlab-pat" -regex = '''glpat-[0-9a-zA-Z\-\_]{20}''' -keywords = [ - "glpat-", -] - -[[rules]] -description = "GitLab Pipeline Trigger Token" -id = "gitlab-ptt" -regex = '''glptt-[0-9a-f]{40}''' -keywords = [ - "glptt-", -] - -[[rules]] -description = "GitLab Runner Registration Token" -id = "gitlab-rrt" -regex = '''GR1348941[0-9a-zA-Z\-\_]{20}''' -keywords = [ - "gr1348941", -] - -[[rules]] -description = "Gitter Access Token" -id = "gitter-access-token" -regex = '''(?i)(?:gitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "gitter", -] - -[[rules]] -description = "GoCardless API token" -id = "gocardless-api-token" -regex = '''(?i)(?:gocardless)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(live_(?i)[a-z0-9\-_=]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "live_","gocardless", -] - -[[rules]] -description = "Grafana api key (or Grafana cloud api key)" -id = "grafana-api-key" -regex = '''(?i)\b(eyJrIjoi[A-Za-z0-9]{70,400}={0,2})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "eyjrijoi", -] - -[[rules]] -description = "Grafana cloud api token" -id = "grafana-cloud-api-token" -regex = '''(?i)\b(glc_[A-Za-z0-9+/]{32,400}={0,2})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "glc_", -] - -[[rules]] -description = "Grafana service account token" -id = "grafana-service-account-token" -regex = '''(?i)\b(glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "glsa_", -] - -[[rules]] -description = "HashiCorp Terraform user/org API token" -id = "hashicorp-tf-api-token" -regex = '''(?i)[a-z0-9]{14}\.atlasv1\.[a-z0-9\-_=]{60,70}''' -keywords = [ - "atlasv1", -] - -[[rules]] -description = "Heroku API Key" -id = "heroku-api-key" -regex = '''(?i)(?:heroku)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "heroku", -] - -[[rules]] -description = "HubSpot API Token" -id = "hubspot-api-key" -regex = '''(?i)(?:hubspot)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "hubspot", -] - -[[rules]] -description = "Intercom API Token" -id = "intercom-api-key" -regex = '''(?i)(?:intercom)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{60})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "intercom", -] - -[[rules]] -description = "JSON Web Token" -id = "jwt" -regex = '''(?i)\b(ey[0-9a-z]{30,34}\.ey[0-9a-z-\/_]{30,500}\.[0-9a-zA-Z-\/_]{10,200}={0,2})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "ey", -] - -[[rules]] -description = "Kraken Access Token" -id = "kraken-access-token" -regex = '''(?i)(?:kraken)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9\/=_\+\-]{80,90})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "kraken", -] - -[[rules]] -description = "Kucoin Access Token" -id = "kucoin-access-token" -regex = '''(?i)(?:kucoin)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "kucoin", -] - -[[rules]] -description = "Kucoin Secret Key" -id = "kucoin-secret-key" -regex = '''(?i)(?:kucoin)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "kucoin", -] - -[[rules]] -description = "Launchdarkly Access Token" -id = "launchdarkly-access-token" -regex = '''(?i)(?:launchdarkly)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "launchdarkly", -] - -[[rules]] -description = "Linear API Token" -id = "linear-api-key" -regex = '''lin_api_(?i)[a-z0-9]{40}''' -keywords = [ - "lin_api_", -] - -[[rules]] -description = "Linear Client Secret" -id = "linear-client-secret" -regex = '''(?i)(?:linear)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "linear", -] - -[[rules]] -description = "LinkedIn Client ID" -id = "linkedin-client-id" -regex = '''(?i)(?:linkedin|linked-in)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{14})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "linkedin","linked-in", -] - -[[rules]] -description = "LinkedIn Client secret" -id = "linkedin-client-secret" -regex = '''(?i)(?:linkedin|linked-in)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "linkedin","linked-in", -] - -[[rules]] -description = "Lob API Key" -id = "lob-api-key" -regex = '''(?i)(?:lob)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}((live|test)_[a-f0-9]{35})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "test_","live_", -] - -[[rules]] -description = "Lob Publishable API Key" -id = "lob-pub-api-key" -regex = '''(?i)(?:lob)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}((test|live)_pub_[a-f0-9]{31})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "test_pub","live_pub","_pub", -] - -[[rules]] -description = "Mailchimp API key" -id = "mailchimp-api-key" -regex = '''(?i)(?:mailchimp)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32}-us20)(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "mailchimp", -] - -[[rules]] -description = "Mailgun private API token" -id = "mailgun-private-api-token" -regex = '''(?i)(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(key-[a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "mailgun", -] - -[[rules]] -description = "Mailgun public validation key" -id = "mailgun-pub-key" -regex = '''(?i)(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(pubkey-[a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "mailgun", -] - -[[rules]] -description = "Mailgun webhook signing key" -id = "mailgun-signing-key" -regex = '''(?i)(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "mailgun", -] - -[[rules]] -description = "MapBox API token" -id = "mapbox-api-token" -regex = '''(?i)(?:mapbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(pk\.[a-z0-9]{60}\.[a-z0-9]{22})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "mapbox", -] - -[[rules]] -description = "Mattermost Access Token" -id = "mattermost-access-token" -regex = '''(?i)(?:mattermost)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{26})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "mattermost", -] - -[[rules]] -description = "MessageBird API token" -id = "messagebird-api-token" -regex = '''(?i)(?:messagebird|message-bird|message_bird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{25})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "messagebird","message-bird","message_bird", -] - -[[rules]] -description = "MessageBird client ID" -id = "messagebird-client-id" -regex = '''(?i)(?:messagebird|message-bird|message_bird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "messagebird","message-bird","message_bird", -] - -[[rules]] -description = "Microsoft Teams Webhook" -id = "microsoft-teams-webhook" -regex = '''https:\/\/[a-z0-9]+\.webhook\.office\.com\/webhookb2\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}\/IncomingWebhook\/[a-z0-9]{32}\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}''' -keywords = [ - "webhook.office.com","webhookb2","incomingwebhook", -] - -[[rules]] -description = "Netlify Access Token" -id = "netlify-access-token" -regex = '''(?i)(?:netlify)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{40,46})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "netlify", -] - -[[rules]] -description = "New Relic ingest browser API token" -id = "new-relic-browser-api-token" -regex = '''(?i)(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(NRJS-[a-f0-9]{19})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "nrjs-", -] - -[[rules]] -description = "New Relic user API ID" -id = "new-relic-user-api-id" -regex = '''(?i)(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "new-relic","newrelic","new_relic", -] - -[[rules]] -description = "New Relic user API Key" -id = "new-relic-user-api-key" -regex = '''(?i)(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(NRAK-[a-z0-9]{27})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "nrak", -] - -[[rules]] -description = "npm access token" -id = "npm-access-token" -regex = '''(?i)\b(npm_[a-z0-9]{36})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "npm_", -] - -[[rules]] -description = "Nytimes Access Token" -id = "nytimes-access-token" -regex = '''(?i)(?:nytimes|new-york-times,|newyorktimes)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "nytimes","new-york-times","newyorktimes", -] - -[[rules]] -description = "Okta Access Token" -id = "okta-access-token" -regex = '''(?i)(?:okta)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{42})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "okta", -] - -[[rules]] -description = "OpenAI API Key" -id = "openai-api-key" -regex = '''(?i)\b(sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "t3blbkfj", -] - -[[rules]] -description = "Plaid API Token" -id = "plaid-api-token" -regex = '''(?i)(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(access-(?:sandbox|development|production)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "plaid", -] - -[[rules]] -description = "Plaid Client ID" -id = "plaid-client-id" -regex = '''(?i)(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "plaid", -] - -[[rules]] -description = "Plaid Secret key" -id = "plaid-secret-key" -regex = '''(?i)(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "plaid", -] - -[[rules]] -description = "PlanetScale API token" -id = "planetscale-api-token" -regex = '''(?i)\b(pscale_tkn_(?i)[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "pscale_tkn_", -] - -[[rules]] -description = "PlanetScale OAuth token" -id = "planetscale-oauth-token" -regex = '''(?i)\b(pscale_oauth_(?i)[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "pscale_oauth_", -] - -[[rules]] -description = "PlanetScale password" -id = "planetscale-password" -regex = '''(?i)\b(pscale_pw_(?i)[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "pscale_pw_", -] - -[[rules]] -description = "Postman API token" -id = "postman-api-token" -regex = '''(?i)\b(PMAK-(?i)[a-f0-9]{24}\-[a-f0-9]{34})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "pmak-", -] - -[[rules]] -description = "Prefect API token" -id = "prefect-api-token" -regex = '''(?i)\b(pnu_[a-z0-9]{36})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "pnu_", -] - -[[rules]] -description = "Private Key" -id = "private-key" -regex = '''(?i)-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY( BLOCK)?-----[\s\S-]*KEY( BLOCK)?----''' -keywords = [ - "-----begin", -] - -[[rules]] -description = "Pulumi API token" -id = "pulumi-api-token" -regex = '''(?i)\b(pul-[a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "pul-", -] - -[[rules]] -description = "PyPI upload token" -id = "pypi-upload-token" -regex = '''pypi-AgEIcHlwaS5vcmc[A-Za-z0-9\-_]{50,1000}''' -keywords = [ - "pypi-ageichlwas5vcmc", -] - -[[rules]] -description = "RapidAPI Access Token" -id = "rapidapi-access-token" -regex = '''(?i)(?:rapidapi)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{50})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "rapidapi", -] - -[[rules]] -description = "Readme API token" -id = "readme-api-token" -regex = '''(?i)\b(rdme_[a-z0-9]{70})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "rdme_", -] - -[[rules]] -description = "Rubygem API token" -id = "rubygems-api-token" -regex = '''(?i)\b(rubygems_[a-f0-9]{48})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "rubygems_", -] - -[[rules]] -description = "Sendbird Access ID" -id = "sendbird-access-id" -regex = '''(?i)(?:sendbird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "sendbird", -] - -[[rules]] -description = "Sendbird Access Token" -id = "sendbird-access-token" -regex = '''(?i)(?:sendbird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "sendbird", -] - -[[rules]] -description = "SendGrid API token" -id = "sendgrid-api-token" -regex = '''(?i)\b(SG\.(?i)[a-z0-9=_\-\.]{66})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "sg.", -] - -[[rules]] -description = "Sendinblue API token" -id = "sendinblue-api-token" -regex = '''(?i)\b(xkeysib-[a-f0-9]{64}\-(?i)[a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "xkeysib-", -] - -[[rules]] -description = "Sentry Access Token" -id = "sentry-access-token" -regex = '''(?i)(?:sentry)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "sentry", -] - -[[rules]] -description = "Shippo API token" -id = "shippo-api-token" -regex = '''(?i)\b(shippo_(live|test)_[a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "shippo_", -] - -[[rules]] -description = "Shopify access token" -id = "shopify-access-token" -regex = '''shpat_[a-fA-F0-9]{32}''' -keywords = [ - "shpat_", -] - -[[rules]] -description = "Shopify custom access token" -id = "shopify-custom-access-token" -regex = '''shpca_[a-fA-F0-9]{32}''' -keywords = [ - "shpca_", -] - -[[rules]] -description = "Shopify private app access token" -id = "shopify-private-app-access-token" -regex = '''shppa_[a-fA-F0-9]{32}''' -keywords = [ - "shppa_", -] - -[[rules]] -description = "Shopify shared secret" -id = "shopify-shared-secret" -regex = '''shpss_[a-fA-F0-9]{32}''' -keywords = [ - "shpss_", -] - -[[rules]] -description = "Sidekiq Secret" -id = "sidekiq-secret" -regex = '''(?i)(?:BUNDLE_ENTERPRISE__CONTRIBSYS__COM|BUNDLE_GEMS__CONTRIBSYS__COM)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{8}:[a-f0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "bundle_enterprise__contribsys__com","bundle_gems__contribsys__com", -] - -[[rules]] -description = "Sidekiq Sensitive URL" -id = "sidekiq-sensitive-url" -regex = '''(?i)\b(http(?:s??):\/\/)([a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\/|\#|\?|:]|$)''' -secretGroup = 2 -keywords = [ - "gems.contribsys.com","enterprise.contribsys.com", -] - -[[rules]] -description = "Slack App-level token" -id = "slack-app-token" -regex = '''(?i)(xapp-\d-[A-Z0-9]+-\d+-[a-z0-9]+)''' -keywords = [ - "xapp", -] - -[[rules]] -description = "Slack Bot token" -id = "slack-bot-token" -regex = '''(xoxb-[0-9]{10,13}\-[0-9]{10,13}[a-zA-Z0-9-]*)''' -keywords = [ - "xoxb", -] - -[[rules]] -description = "Slack Configuration access token" -id = "slack-config-access-token" -regex = '''(?i)(xoxe.xox[bp]-\d-[A-Z0-9]{163,166})''' -keywords = [ - "xoxe.xoxb-","xoxe.xoxp-", -] - -[[rules]] -description = "Slack Configuration refresh token" -id = "slack-config-refresh-token" -regex = '''(?i)(xoxe-\d-[A-Z0-9]{146})''' -keywords = [ - "xoxe-", -] - -[[rules]] -description = "Slack Legacy bot token" -id = "slack-legacy-bot-token" -regex = '''(xoxb-[0-9]{8,14}\-[a-zA-Z0-9]{18,26})''' -keywords = [ - "xoxb", -] - -[[rules]] -description = "Slack Legacy token" -id = "slack-legacy-token" -regex = '''(xox[os]-\d+-\d+-\d+-[a-fA-F\d]+)''' -keywords = [ - "xoxo","xoxs", -] - -[[rules]] -description = "Slack Legacy Workspace token" -id = "slack-legacy-workspace-token" -regex = '''(xox[ar]-(?:\d-)?[0-9a-zA-Z]{8,48})''' -keywords = [ - "xoxa","xoxr", -] - -[[rules]] -description = "Slack User" -id = "slack-user-token" -regex = '''(xox[pe](?:-[0-9]{10,13}){3}-[a-zA-Z0-9-]{28,34})''' -keywords = [ - "xoxp-","xoxe-", -] - -[[rules]] -description = "Slack Webhook" -id = "slack-webhook-url" -regex = '''(https?:\/\/)?hooks.slack.com\/(services|workflows)\/[A-Za-z0-9+\/]{43,46}''' -keywords = [ - "hooks.slack.com", -] - -[[rules]] -description = "Snyk API token" -id = "snyk-api-token" -regex = '''(?i)(?:snyk)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "snyk", -] - -[[rules]] -description = "Square Access Token" -id = "square-access-token" -regex = '''(?i)\b(sq0atp-[0-9A-Za-z\-_]{22})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "sq0atp-", -] - -[[rules]] -description = "Squarespace Access Token" -id = "squarespace-access-token" -regex = '''(?i)(?:squarespace)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "squarespace", -] - -[[rules]] -description = "Stripe Access Token" -id = "stripe-access-token" -regex = '''(?i)(sk|pk)_(test|live)_[0-9a-z]{10,32}''' -keywords = [ - "sk_test","pk_test","sk_live","pk_live", -] - -[[rules]] -description = "SumoLogic Access ID" -id = "sumologic-access-id" -regex = '''(?i)(?:sumo)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{14})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "sumo", -] - -[[rules]] -description = "SumoLogic Access Token" -id = "sumologic-access-token" -regex = '''(?i)(?:sumo)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "sumo", -] - -[[rules]] -description = "Telegram Bot API Token" -id = "telegram-bot-api-token" -regex = '''(?i)(?:^|[^0-9])([0-9]{5,16}:A[a-zA-Z0-9_\-]{34})(?:$|[^a-zA-Z0-9_\-])''' -secretGroup = 1 -keywords = [ - "telegram","api","bot","token","url", -] - -[[rules]] -description = "Travis CI Access Token" -id = "travisci-access-token" -regex = '''(?i)(?:travis)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{22})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "travis", -] - -[[rules]] -description = "Twilio API Key" -id = "twilio-api-key" -regex = '''SK[0-9a-fA-F]{32}''' -keywords = [ - "twilio", -] - -[[rules]] -description = "Twitch API token" -id = "twitch-api-token" -regex = '''(?i)(?:twitch)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "twitch", -] - -[[rules]] -description = "Twitter Access Secret" -id = "twitter-access-secret" -regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{45})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "twitter", -] - -[[rules]] -description = "Twitter Access Token" -id = "twitter-access-token" -regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9]{15,25}-[a-zA-Z0-9]{20,40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "twitter", -] - -[[rules]] -description = "Twitter API Key" -id = "twitter-api-key" -regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{25})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "twitter", -] - -[[rules]] -description = "Twitter API Secret" -id = "twitter-api-secret" -regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{50})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "twitter", -] - -[[rules]] -description = "Twitter Bearer Token" -id = "twitter-bearer-token" -regex = '''(?i)(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(A{22}[a-zA-Z0-9%]{80,100})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "twitter", -] - -[[rules]] -description = "Typeform API token" -id = "typeform-api-token" -regex = '''(?i)(?:typeform)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(tfp_[a-z0-9\-_\.=]{59})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "tfp_", -] - -[[rules]] -description = "Vault Batch Token" -id = "vault-batch-token" -regex = '''(?i)\b(hvb\.[a-z0-9_-]{138,212})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "hvb", -] - -[[rules]] -description = "Vault Service Token" -id = "vault-service-token" -regex = '''(?i)\b(hvs\.[a-z0-9_-]{90,100})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -keywords = [ - "hvs", -] - -[[rules]] -description = "Yandex Access Token" -id = "yandex-access-token" -regex = '''(?i)(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(t1\.[A-Z0-9a-z_-]+[=]{0,2}\.[A-Z0-9a-z_-]{86}[=]{0,2})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "yandex", -] - -[[rules]] -description = "Yandex API Key" -id = "yandex-api-key" -regex = '''(?i)(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(AQVN[A-Za-z0-9_\-]{35,38})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "yandex", -] - -[[rules]] -description = "Yandex AWS Access Token" -id = "yandex-aws-access-token" -regex = '''(?i)(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(YC[a-zA-Z0-9_\-]{38})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "yandex", -] - -[[rules]] -description = "Zendesk Secret Key" -id = "zendesk-secret-key" -regex = '''(?i)(?:zendesk)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)''' -secretGroup = 1 -keywords = [ - "zendesk", -] diff --git a/.markdown-link-check.json b/.markdown-link-check.json deleted file mode 100644 index 8418dbd93..000000000 --- a/.markdown-link-check.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "ignorePatterns": [ - { - "pattern": "https://github.com/input-output-hk/atala-prism-apollo/actions/workflows/pull-request.yml" - }, - { - "pattern": "https://github.com/input-output-hk/atala-prism-apollo/actions/workflows/Deployment.yml" - }, - { - "pattern": "https://github.com/input-output-hk/atala-prism-apollo/actions/workflows/pull-request.yml/badge.svg" - }, - { - "pattern": "https://github.com/input-output-hk/atala-prism-apollo/actions/workflows/Deployment.yml/badge.svg" - } - ], - "retryOn429": true, - "retryCount": 5, - "aliveStatusCodes": [ 200, 203 ] -} \ No newline at end of file diff --git a/.markdownlint.json b/.markdownlint.json deleted file mode 100644 index 73cb9808d..000000000 --- a/.markdownlint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "MD013": false -} \ No newline at end of file diff --git a/.mega-linter.yml b/.mega-linter.yml deleted file mode 100644 index 88f75f628..000000000 --- a/.mega-linter.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -APPLY_FIXES: none -FILTER_REGEX_EXCLUDE: (karma.config.js|polyfill.js|timeout.js) -VALIDATE_ALL_CODEBASE: true -REPOSITORY_DEVSKIM_DISABLE_ERRORS: true -MARKDOWN_MARKDOWN_LINK_CHECK_FILTER_REGEX_EXCLUDE: (pull-request.yml|release.yml|badge.svg) - -DISABLE_LINTERS: - - MARKDOWN_MARKDOWN_LINK_CHECK - - C_CPPLINT - - CPP_CPPLINT - - BASH_SHELLCHECK - - BASH_EXEC - - REPOSITORY_TRIVY - - REPOSITORY_TRUFFLEHOG - - REPOSITORY_KICS - -DISABLE_ERRORS_LINTERS: - - REPOSITORY_TRUFFLEHOG - - REPOSITORY_TRIVY - - REPOSITORY_KICS diff --git a/.releaserc.yml b/.releaserc.yml deleted file mode 100644 index 4b90e3800..000000000 --- a/.releaserc.yml +++ /dev/null @@ -1,44 +0,0 @@ -branches: - - name: "main" - - name: "release/*" - prerelease: "snapshot" - - name: "beta" - prerelease: true - -plugins: - - "@semantic-release/commit-analyzer" - - "@semantic-release/release-notes-generator" - - [ "@semantic-release/changelog", { changelogFile: "CHANGELOG.md" } ] - - [ '@semantic-release/exec', { - prepareCmd: './gradlew kotlinUpgradeYarnLock' } ] - - "gradle-semantic-release-plugin" - - [ '@semantic-release/exec', { - prepareCmd: './gradlew :apollo:publishJsPackageToNpmjsRegistry' } ] - - [ '@semantic-release/exec', { - prepareCmd: './gradlew :apollo:createSwiftPackage' } ] - - [ '@semantic-release/exec', { - prepareCmd: '(cd ./apollo/build/packages/ApolloSwift && zip -r "Apollo.xcframework.zip" Apollo.xcframework)' } ] - - [ '@semantic-release/exec', { - prepareCmd: 'sed -i.bak -e "s/checksum:.*/checksum: \"$(swift package compute-checksum ./apollo/build/packages/ApolloSwift/Apollo.xcframework.zip)\"/g;s/download\/.*\/Apollo.xcframework.zip/download\/v${nextRelease.version}\/Apollo.xcframework.zip/g" Package.swift' } ] - - [ - "@semantic-release/git", - { - assets: [ - "Package.swift", - "CHANGELOG.md", - "gradle.properties", - ], - message: "chore(release): cut apollo version ${nextRelease.version} - ${nextRelease.notes} - - Signed-off-by: Hyperledger Bot ", - }, - ] - - [ - "@semantic-release/github", - { - "assets": [ - { "path": "apollo/build/packages/ApolloSwift/Apollo.xcframework.zip", "label": "Apollo.xcframework.zip" }, - ] - } - ] diff --git a/.secretlintignore b/.secretlintignore deleted file mode 100644 index e69de29bb..000000000 diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a62..000000000 --- a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/ApolloLibrary.podspec b/ApolloLibrary.podspec index c9c2228bf..514f25f0c 100644 --- a/ApolloLibrary.podspec +++ b/ApolloLibrary.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |spec| spec.name = 'ApolloLibrary' - spec.version = '1.7.2' + spec.version = '2.1.0' spec.summary = 'Apollo XCFramework distributed as a CocoaPod.' spec.homepage = 'https://github.com/hyperledger-identus/apollo' spec.license = { :type => 'MIT', :file => 'LICENSE' } spec.author = 'Hyperledger Identus' - spec.source = { :http => 'https://github.com/hyperledger-identus/apollo/releases/download/v1.7.2/Apollo.xcframework.zip' } - spec.vendored_frameworks = 'Apollo.xcframework' + spec.source = { :http => 'https://github.com/hyperledger-identus/apollo/releases/download/v2.1.0/ApolloLibrary.xcframework.zip' } + spec.vendored_frameworks = 'ApolloLibrary.xcframework' spec.platform = :ios, '13.0' spec.ios.deployment_target = '13.0' spec.osx.deployment_target = '11.0' diff --git a/BUILDING.md b/BUILDING.md new file mode 100644 index 000000000..e70a81dca --- /dev/null +++ b/BUILDING.md @@ -0,0 +1,134 @@ + +## Bulding Apollo + +### Set Environment Variables + +Set variable `GITHUB_ACTOR` with your GitHub Username and set variable `GITHUB_TOKEN` with your GitHub Personal Access Token. + +As an example we will go with `Bash` + +1. Open CMD. +2. Run `sudo nano $HOME/.bash_profile`. +3. Insert `export GITHUB_ACTOR="YOUR GITHUB USERNAME"` +4. Insert `export GITHUB_TOKEN="YOUR GITHUB PERSONAL ACCESS TOKEN"` +5. Save profile and restart CMD to take effect. + +### Install Homebrew (Mac Only) + +```bash +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +``` + +### Install autoconf, automake & libtool (Mac Only) + +```bash +brew install autoconf automake libtool +``` + +### Install JDK 11 + +```bash +cs java --jvm adopt:1.11.0-11 --setup +``` + +after that `java -version` should yield something like that + +```text +openjdk version "11.0.11" 2021-04-20 +OpenJDK Runtime Environment (build 11.0.11+9) +OpenJDK 64-Bit Server VM (build 11.0.11+9, mixed mode) +``` + +In case of using macOS with M chip, make sure to install the arch64 version of Java + +### Install XCode (Mac Only) + +Install XCode from App Store. + +Then approve xcodebuild license in your terminal. Like so: +```bash +$ sudo xcodebuild -license +``` + +### Install Android SDK + +Install Android SDK from SDK Manager (via Android Studio). + +Then approve Android SDK license. Like so: +```bash +$ cd /Users/{{YOUR USER}}/Library/Android/sdk +$ tools/bin/sdkmanager --licenses +``` +While there are many ways to install Android SDK this has proven to be the most reliable way. Standard IntelliJ with Android plugin may work. However, we've had several issues. Your mileage may vary. + +For Ubuntu, +```bash +sudo apt update && sudo apt install android-sdk +``` +Leaving the SDK at `~/Android/Sdk` + +### Create local.properties file + +Create a file named `local.properties` in the root of Apollo. + +Add your android sdk path to `local.properties file`. Like so: +```properties +sdk.dir = /Users/{{YOUR USER}}/Library/Android/sdk +``` +This will indicate to your IDE which android SDK to use. + +Alternatively, you can add the following environment variable into your shell profile file: +```bash +$ export ANDROID_HOME='/Users/{{YOUR USER}}/Library/Android/sdk +``` + +### Building the project + +Install Rust packages: +```bash +$ ./scripts/install-rust-packages.sh +``` + +You should be able to import and build the project in IntelliJ IDEA now. + +#### Troubleshooting + +Here is a list of common issues you might face and its solutions. + +##### Environment Variables were added but not available + +If you already added the environment variable to your CMD profile and still not being available. + +**Solution** + +* Restart your Device. + +##### No binary for ChromeHeadless browser on your platform + +If you get error: +```log +No binary for ChromeHeadless browser on your platform. +Please, set "CHROME_BIN" env variable. +java.lang.IllegalStateException: Errors occurred during launch of browser for testing. +- ChromeHeadless +``` + +**Solution** + +* Install headless chrome or just Chrome browser + +##### In case IntelliJ was building but was still showing syntax error in Gradle Script + +**Solution** + +* Go to preference/settings and make sure to select the correct Java version 11. + +##### Could not find JNA native support + +if you get this error on macOS with M chip: +```log +Could not find JNA native support +``` +**Solution** + +* Make sure that you are using Java version that is arch64. diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 27c03165e..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,465 +0,0 @@ -# [1.7.0](https://github.com/hyperledger-identus/apollo/compare/v1.6.0...v1.7.0) (2025-07-07) - - -### Bug Fixes - -* npm publish plugin version update ([11da7df](https://github.com/hyperledger-identus/apollo/commit/11da7df3bec5ec685fbe15ee3e8018dc5c4b9adf)) - - -### Features - -* new project organization ([#206](https://github.com/hyperledger-identus/apollo/issues/206)) ([92d8c39](https://github.com/hyperledger-identus/apollo/commit/92d8c39dd8e8cc2cb597074bd84e918237727e24)) - -# [1.6.0](https://github.com/hyperledger-identus/apollo/compare/v1.5.0...v1.6.0) (2025-06-16) - - -### Features - -* add bip32 pub key derivation ([#204](https://github.com/hyperledger-identus/apollo/issues/204)) ([3fef8f9](https://github.com/hyperledger-identus/apollo/commit/3fef8f9652b20ae66dbd5d0cce7f1d3e4ca5be66)) - -# [1.5.0](https://github.com/hyperledger-identus/apollo/compare/v1.4.5...v1.5.0) (2025-06-09) - - -### Bug Fixes - -* CI secrets and renamed old links to new under the new organization hyperledger identus ([#201](https://github.com/hyperledger-identus/apollo/issues/201)) ([242b47c](https://github.com/hyperledger-identus/apollo/commit/242b47c607afa3acb82fbf765a5d35537bb98258)) - - -### Features - -* update kotlin version to 2.0.20 ([#203](https://github.com/hyperledger-identus/apollo/issues/203)) ([589bb48](https://github.com/hyperledger-identus/apollo/commit/589bb48a39ee7aabd00cf7d7e70ca5eee04806aa)) - -## [1.4.5](https://github.com/hyperledger-identus/apollo/compare/v1.4.4...v1.4.5) (2025-01-31) - - -### Bug Fixes - -* upgrade apollo to 6.6.1 ([#198](https://github.com/hyperledger-identus/apollo/issues/198)) ([9abc11d](https://github.com/hyperledger-identus/apollo/commit/9abc11df066181a787d94f02500c4b7475d00a87)) - -## [1.4.4](https://github.com/hyperledger-identus/apollo/compare/v1.4.3...v1.4.4) (2024-10-23) - - -### Bug Fixes - -* make fixes to ed25519 sign method + improve tests ([#195](https://github.com/hyperledger-identus/apollo/issues/195)) ([354c9bd](https://github.com/hyperledger-identus/apollo/commit/354c9bdd12027a16fe598dfab187153dd465cd23)) - -## [1.4.3](https://github.com/hyperledger-identus/apollo/compare/v1.4.2...v1.4.3) (2024-08-26) - - -### Bug Fixes - -* upgrade elliptic dependency ([#191](https://github.com/hyperledger-identus/apollo/issues/191)) ([9ecdbdd](https://github.com/hyperledger-identus/apollo/commit/9ecdbdd9b942ffbdb837c1ffc42ddb793b178461)) - -## [1.4.2](https://github.com/hyperledger-identus/apollo/compare/v1.4.1...v1.4.2) (2024-08-07) - - -### Bug Fixes - -* publish to OSSHR repository ([#188](https://github.com/hyperledger-identus/apollo/issues/188)) ([8f98b5a](https://github.com/hyperledger-identus/apollo/commit/8f98b5ae7d106ac7a977f3676492c7c2ee0e73e9)) - -## [1.4.1](https://github.com/hyperledger-identus/apollo/compare/v1.4.0...v1.4.1) (2024-08-05) - - -### Bug Fixes - -* change oss publishing url according to the documentation ([#187](https://github.com/hyperledger-identus/apollo/issues/187)) ([f1dea5b](https://github.com/hyperledger-identus/apollo/commit/f1dea5bc1c19e5eaa0d4aba560dd8c46ee4962e6)) - -# [1.4.0](https://github.com/hyperledger-identus/apollo/compare/v1.3.24...v1.4.0) (2024-08-02) - - -### Features - -* almost empty commit to test the release ([#186](https://github.com/hyperledger-identus/apollo/issues/186)) ([89b28a9](https://github.com/hyperledger-identus/apollo/commit/89b28a98e0fa82c5e935138c40024857101bbb4f)) - -## [1.3.24](https://github.com/hyperledger-identus/apollo/compare/v1.3.23...v1.3.24) (2024-07-19) - - -### Bug Fixes - -* apply github env vars ([a5f674a](https://github.com/hyperledger-identus/apollo/commit/a5f674ac365cdabd67abd144894cbbb32fc7ffa2)) - -## [1.3.21](https://github.com/hyperledger-identus/apollo/compare/v1.3.20...v1.3.21) (2024-07-12) - - -### Bug Fixes - -* force adding ossrh env vars for maven ([24683fc](https://github.com/hyperledger-identus/apollo/commit/24683fc064f6ef27944dac16a7326cb27ca731c8)) - -## [1.3.20](https://github.com/hyperledger-identus/apollo/compare/v1.3.19...v1.3.20) (2024-07-12) - - -### Bug Fixes - -* revert import action version ([c4bd736](https://github.com/hyperledger-identus/apollo/commit/c4bd7367c8c51c3266f298ef1c23cb99e05c296d)) -* Update to node20 actions ([#184](https://github.com/hyperledger-identus/apollo/issues/184)) ([0e38317](https://github.com/hyperledger-identus/apollo/commit/0e38317f22c239df10a87797895303f1f18019b1)) - -## [1.3.19](https://github.com/hyperledger-identus/apollo/compare/v1.3.18...v1.3.19) (2024-07-12) - - -### Bug Fixes - -* improve env vars for ci pipeline in hl ([9170629](https://github.com/hyperledger-identus/apollo/commit/91706297c20ffc6e9709add1a7da4cf4bd5474ad)) - -## [1.3.18](https://github.com/hyperledger-identus/apollo/compare/v1.3.17...v1.3.18) (2024-07-11) - - -### Bug Fixes - -* ossrh env variables on CI ([d324f12](https://github.com/hyperledger-identus/apollo/commit/d324f123ce82c708da778cd7f8b6e5219288057b)) - -## [1.3.17](https://github.com/hyperledger-identus/apollo/compare/v1.3.16...v1.3.17) (2024-07-11) - - -### Bug Fixes - -* sonatype configuration ([5c13b1d](https://github.com/hyperledger-identus/apollo/commit/5c13b1dc5456583d25f76a21119f1e11a437a6f5)) - -## [1.3.16](https://github.com/hyperledger-identus/apollo/compare/v1.3.15...v1.3.16) (2024-07-11) - - -### Bug Fixes - -* correct some typos in android build for apollo ([d8a0b0a](https://github.com/hyperledger-identus/apollo/commit/d8a0b0a2f8486b27468481e9790a606369d88a05)) - -## [1.3.15](https://github.com/hyperledger-identus/apollo/compare/v1.3.14...v1.3.15) (2024-07-11) - - -### Bug Fixes - -* add correct signing keys for maven package in HL ([d560f5a](https://github.com/hyperledger-identus/apollo/commit/d560f5a548a13e7882681b826db86e967c553b90)) - -## [1.3.14](https://github.com/hyperledger-identus/apollo/compare/v1.3.13...v1.3.14) (2024-07-11) - - -### Bug Fixes - -* set right sonatype authentication ([5183580](https://github.com/hyperledger-identus/apollo/commit/518358093ce69044b6855f2ab8cc9e3c17c7e6b3)) - -## [1.3.13](https://github.com/hyperledger-identus/apollo/compare/v1.3.12...v1.3.13) (2024-07-11) - - -### Bug Fixes - -* checkout also must use identus_ci token ([870b321](https://github.com/hyperledger-identus/apollo/commit/870b321bb9125d1f8878060f9c1fac65dc68b7c5)) - -## [1.3.5](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.3.4...v1.3.5) (2024-06-10) - - -### Bug Fixes - -* Removed references to Atala in docs and variables referred to by docs ([#172](https://github.com/input-output-hk/atala-prism-apollo/issues/172)) ([ef2ae86](https://github.com/input-output-hk/atala-prism-apollo/commit/ef2ae866a85afedd30fda2192bc4519bd403acfa)) -* update usage of the bip32ed25519 wrapper. ([#174](https://github.com/input-output-hk/atala-prism-apollo/issues/174)) ([d1ee804](https://github.com/input-output-hk/atala-prism-apollo/commit/d1ee804aa314861e879a576a05426bb98ee2752b)) - -## [1.3.4](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.3.3...v1.3.4) (2024-05-28) - - -### Bug Fixes - -* missing ed25519 file from published npm package ([#171](https://github.com/input-output-hk/atala-prism-apollo/issues/171)) ([ebef809](https://github.com/input-output-hk/atala-prism-apollo/commit/ebef809acc36768e0f81779eec917d2c7ed58495)) - -## [1.3.3](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.3.2...v1.3.3) (2024-05-27) - - -### Bug Fixes - -* ci docker ([#168](https://github.com/input-output-hk/atala-prism-apollo/issues/168)) ([61a9b5b](https://github.com/input-output-hk/atala-prism-apollo/commit/61a9b5b9dd0af91e70170571eb4bd9ec113d0efc)) - -## [1.3.2](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.3.1...v1.3.2) (2024-05-23) - - -### Bug Fixes - -* task dependency ([#165](https://github.com/input-output-hk/atala-prism-apollo/issues/165)) ([116cc60](https://github.com/input-output-hk/atala-prism-apollo/commit/116cc60f2f68b5ac4d7fa285aa52382c8e587ce2)) - -## [1.3.1](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.3.0...v1.3.1) (2024-05-23) - - -### Bug Fixes - -* revert PublishedMavenId ([#164](https://github.com/input-output-hk/atala-prism-apollo/issues/164)) ([1bbd5a0](https://github.com/input-output-hk/atala-prism-apollo/commit/1bbd5a083e633e0e1f3d0333fd3bcb095608a96d)) - -# [1.3.0](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.16...v1.3.0) (2024-05-23) - - -### Features - -* ed25519 derivation ([#161](https://github.com/input-output-hk/atala-prism-apollo/issues/161)) ([78814d8](https://github.com/input-output-hk/atala-prism-apollo/commit/78814d8b9f8894a3bf5724d3019d27c2b4cdbcc4)) - -## [1.2.16](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.15...v1.2.16) (2024-05-09) - - -### Bug Fixes - -* Invalid signature integer: negative on JS platform ([#158](https://github.com/input-output-hk/atala-prism-apollo/issues/158)) ([0b454e0](https://github.com/input-output-hk/atala-prism-apollo/commit/0b454e01829b181a5077ccb1f7d8725cd86f85b9)) - -## [1.2.15](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.14...v1.2.15) (2024-05-07) - - -### Bug Fixes - -* npm package not being published automatically on CI pipeline. ([#156](https://github.com/input-output-hk/atala-prism-apollo/issues/156)) ([aaa7a65](https://github.com/input-output-hk/atala-prism-apollo/commit/aaa7a65e2d2ccd2979e75f621786ea99be310bf8)) -* some platforms were missing the signature normalisation ([#155](https://github.com/input-output-hk/atala-prism-apollo/issues/155)) ([972255d](https://github.com/input-output-hk/atala-prism-apollo/commit/972255d2f0d1edc569265b73c8f05a6be57e4308)) - -## [1.2.14](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.13...v1.2.14) (2024-04-12) - - -### Bug Fixes - -* Allow Apollo to verify der signatures from bc and bitcoin seamlessly #ATL-6905 ([#154](https://github.com/input-output-hk/atala-prism-apollo/issues/154)) ([a26a559](https://github.com/input-output-hk/atala-prism-apollo/commit/a26a5597cd5df9d1875f28a664772a1d02168ec9)), closes [#ATL-6905](https://github.com/input-output-hk/atala-prism-apollo/issues/ATL-6905) - -## [1.2.13](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.12...v1.2.13) (2024-03-25) - - -### Bug Fixes - -* current bug when trying to publish an app on app store with apollo inside ([#150](https://github.com/input-output-hk/atala-prism-apollo/issues/150)) ([258fc08](https://github.com/input-output-hk/atala-prism-apollo/commit/258fc0841bc488aa659f027921e4517346e467ad)) - -## [1.2.12](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.11...v1.2.12) (2024-03-14) - - -### Bug Fixes - -* The need to publish another module to use Apollo ([#149](https://github.com/input-output-hk/atala-prism-apollo/issues/149)) ([91554d9](https://github.com/input-output-hk/atala-prism-apollo/commit/91554d92aef5ab0165cf7868f5c7808673a03af1)) - -## [1.2.11](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.10...v1.2.11) (2024-03-06) - - -### Bug Fixes - -* Apple crash when creating seed with empty string passphrase ([#146](https://github.com/input-output-hk/atala-prism-apollo/issues/146)) ([ce739dd](https://github.com/input-output-hk/atala-prism-apollo/commit/ce739ddc0477e239c213475b88653229b9781370)) -* upgrade gradle & libs ([#147](https://github.com/input-output-hk/atala-prism-apollo/issues/147)) ([b0906dd](https://github.com/input-output-hk/atala-prism-apollo/commit/b0906ddc938e8dec55848ec3157e85b18b252315)) - -## [1.2.10](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.9...v1.2.10) (2023-12-20) - - -### Bug Fixes - -* crypto is not defined ([#136](https://github.com/input-output-hk/atala-prism-apollo/issues/136)) ([3ef02fe](https://github.com/input-output-hk/atala-prism-apollo/commit/3ef02feaff43a5203a0b3a209cb8da88df6a54df)) -* Gradle publish script ([#134](https://github.com/input-output-hk/atala-prism-apollo/issues/134)) ([3f4cce5](https://github.com/input-output-hk/atala-prism-apollo/commit/3f4cce516cf5edd11dfbfefa4639772de996e997)) - -## [1.2.9](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.8...v1.2.9) (2023-12-14) - - -### Bug Fixes - -* ci pipelienes to use correct env vars ([7ee131f](https://github.com/input-output-hk/atala-prism-apollo/commit/7ee131f7dcab15820885904d264681f9860e8256)) - -## [1.2.8](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.7...v1.2.8) (2023-12-14) - - -### Bug Fixes - -* add documentation and release a new version ([#133](https://github.com/input-output-hk/atala-prism-apollo/issues/133)) ([4fd785a](https://github.com/input-output-hk/atala-prism-apollo/commit/4fd785a842d359d86e544f45c09a571981d61f8c)) -* x64 simulator needs to be built with this flags to work ([06bd937](https://github.com/input-output-hk/atala-prism-apollo/commit/06bd937e6584c179d2dbc96aa97c29348123b259)) - -## [1.2.8](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.7...v1.2.8) (2023-12-14) - - -### Bug Fixes - -* x64 simulator needs to be built with this flags to work ([06bd937](https://github.com/input-output-hk/atala-prism-apollo/commit/06bd937e6584c179d2dbc96aa97c29348123b259)) - -## [1.2.7](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.6...v1.2.7) (2023-12-12) - - -### Bug Fixes - -* ci xcode version needs to be updated ([#129](https://github.com/input-output-hk/atala-prism-apollo/issues/129)) ([c0cbf88](https://github.com/input-output-hk/atala-prism-apollo/commit/c0cbf881855d6cff60c8e5f4a451bedeb7dfe6bf)) - -## [1.2.6](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.5...v1.2.6) (2023-12-12) - - -### Bug Fixes - -* correct swift checksum generation during packaging ([#128](https://github.com/input-output-hk/atala-prism-apollo/issues/128)) ([d102216](https://github.com/input-output-hk/atala-prism-apollo/commit/d10221638ec5338b29d54fc006a1dc64fc5a5016)) - -## [1.2.5](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.4...v1.2.5) (2023-12-11) - - -### Bug Fixes - -* checksum third try ([#125](https://github.com/input-output-hk/atala-prism-apollo/issues/125)) ([f1eba66](https://github.com/input-output-hk/atala-prism-apollo/commit/f1eba66cf93cbbc10dcbbd4f3813858495c2fb93)) - -## [1.2.4](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.3...v1.2.4) (2023-12-11) - - -### Bug Fixes - -* checksum correctly updated ([#123](https://github.com/input-output-hk/atala-prism-apollo/issues/123)) ([6dd4d2e](https://github.com/input-output-hk/atala-prism-apollo/commit/6dd4d2edb2ad399641cb983f16ab3e970c9a5312)) -* checkum CI script second try ([#124](https://github.com/input-output-hk/atala-prism-apollo/issues/124)) ([fc6be41](https://github.com/input-output-hk/atala-prism-apollo/commit/fc6be416a254244764a086d33370052d22a14ba8)) - -## [1.2.3](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.2...v1.2.3) (2023-12-11) - - -### Bug Fixes - -* remove failing links to unblock dokka documentation generation ([#120](https://github.com/input-output-hk/atala-prism-apollo/issues/120)) ([0e18bef](https://github.com/input-output-hk/atala-prism-apollo/commit/0e18befc1b548cf261074d436e55ffbdc3512b3d)) - -## [1.2.2](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.1...v1.2.2) (2023-12-05) - - -### Bug Fixes - -* remove if since the xcframework is not building with all targets ([#121](https://github.com/input-output-hk/atala-prism-apollo/issues/121)) ([e728572](https://github.com/input-output-hk/atala-prism-apollo/commit/e72857278488abd8d4355f2636deadd90c2bd94d)) - -## [1.2.1](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.2.0...v1.2.1) (2023-12-01) - - -### Bug Fixes - -* release has a v in the name this will fix it ([#119](https://github.com/input-output-hk/atala-prism-apollo/issues/119)) ([a85f7ad](https://github.com/input-output-hk/atala-prism-apollo/commit/a85f7ad51b9cc26292e1936c7758da1667c275eb)) - -# [1.2.0](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.1.1...v1.2.0) (2023-11-30) - - -### Bug Fixes - -* ci swift package ([#118](https://github.com/input-output-hk/atala-prism-apollo/issues/118)) ([e13b9ca](https://github.com/input-output-hk/atala-prism-apollo/commit/e13b9caa9ee0c364bfa1c889e44b0561af55abb4)) - - -### Features - -* Reorganise Apollo ([#116](https://github.com/input-output-hk/atala-prism-apollo/issues/116)) ([6b8299b](https://github.com/input-output-hk/atala-prism-apollo/commit/6b8299bde9f653f261e103e4dc739d92482c9f08)) - -## [1.1.1](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.1.0...v1.1.1) (2023-11-21) - - -### Bug Fixes - -* add ec pub key validation checks ([#112](https://github.com/input-output-hk/atala-prism-apollo/issues/112)) ([023beb7](https://github.com/input-output-hk/atala-prism-apollo/commit/023beb78d6dba1bd70a9d60a711c86ef7c6a251a)) -* Base32 re-implemented as per RFC-4648 ([#111](https://github.com/input-output-hk/atala-prism-apollo/issues/111)) ([4170ac1](https://github.com/input-output-hk/atala-prism-apollo/commit/4170ac10def15fad8281777e285929bf3623517e)) -* Update npm configuration for npmjs repository ([#114](https://github.com/input-output-hk/atala-prism-apollo/issues/114)) ([c8a0ca4](https://github.com/input-output-hk/atala-prism-apollo/commit/c8a0ca4d0bd752ffb94e6300f3f72fa71ab29e32)) - -# [1.1.0](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.0.3...v1.1.0) (2023-11-13) - - -### Features - -* **mnemonic:** js doesnt handle List and swift doesnt handle Array this is the solution ([#105](https://github.com/input-output-hk/atala-prism-apollo/issues/105)) ([e65e0f0](https://github.com/input-output-hk/atala-prism-apollo/commit/e65e0f0b93169ef1cf0b08f73aa1f74ade525113)) - -# 1.0.0 (2023-11-13) - - -### Bug Fixes - -* Add all the required dependencies for Apollo to build with the native cinterops ios version of secp256k1 ec. ([1ca5b68](https://github.com/input-output-hk/atala-prism-apollo/commit/1ca5b687cad998ee5e9d2f163b0a13617cfe602a)) -* add new line at end of file ([a6ab13c](https://github.com/input-output-hk/atala-prism-apollo/commit/a6ab13c6ee1ff91d9a24a80bfd84271355f46ff2)) -* add new line to build.gradle.kts files ([f84b4e4](https://github.com/input-output-hk/atala-prism-apollo/commit/f84b4e4ea16211d39771162e4ab95514fd4384ae)) -* BigInteger has no corresponding exportable dataType in JS ([#88](https://github.com/input-output-hk/atala-prism-apollo/issues/88)) ([3e636be](https://github.com/input-output-hk/atala-prism-apollo/commit/3e636be1cae10c4897d19867cbfa4aa5e45e0b16)) -* bugs found while integrating apollo with KMP SDK ([#98](https://github.com/input-output-hk/atala-prism-apollo/issues/98)) ([de71265](https://github.com/input-output-hk/atala-prism-apollo/commit/de712657efd58c94c357367076549c4ae5037cfa)) -* CI nonsense error ([1963ad2](https://github.com/input-output-hk/atala-prism-apollo/commit/1963ad2eb0f83ec3796c07c2dce66bb81f7a7a55)) -* ci reported linting issues ([31aee01](https://github.com/input-output-hk/atala-prism-apollo/commit/31aee01b95db0368c3e123a69e2049c74c9e146d)) -* ci wrong reported issues by mega lint ([b6da47a](https://github.com/input-output-hk/atala-prism-apollo/commit/b6da47a25ad30a0a99dec4e51bd16d8500209564)) -* **CI:** Update GitHub Actions script ([#90](https://github.com/input-output-hk/atala-prism-apollo/issues/90)) ([e6f6d46](https://github.com/input-output-hk/atala-prism-apollo/commit/e6f6d461d09e237fc6c30a2d0ef5121fd14c46fc)) -* code linting ([94ededd](https://github.com/input-output-hk/atala-prism-apollo/commit/94ededd971170da50ed1a8d0c21dccc020ba85a4)) -* code linting errors ([69dfbd1](https://github.com/input-output-hk/atala-prism-apollo/commit/69dfbd1126853d4025125105f5b4030a4b49e1a2)) -* code linting errors ([9774cbc](https://github.com/input-output-hk/atala-prism-apollo/commit/9774cbca61789fc0dac461d2ad305dbae816a9d9)) -* constructor and access to some methods were missing in ios ([#93](https://github.com/input-output-hk/atala-prism-apollo/issues/93)) ([a64d707](https://github.com/input-output-hk/atala-prism-apollo/commit/a64d707a6efb0e7ad05fa0dff68a1cbd47724b55)) -* deployment script ([#101](https://github.com/input-output-hk/atala-prism-apollo/issues/101)) ([6435bf8](https://github.com/input-output-hk/atala-prism-apollo/commit/6435bf88d6594ff32a372bfe5c6e271ee429e040)) -* disable JS on windows platform ([6a2bfd4](https://github.com/input-output-hk/atala-prism-apollo/commit/6a2bfd431b9ec724b776f7d64bc45af0b49e2451)) -* enforce code format ([39f4474](https://github.com/input-output-hk/atala-prism-apollo/commit/39f4474e03898c9eb4737ca743406ade6ffc2a9e)) -* enforce code format ([9e946fc](https://github.com/input-output-hk/atala-prism-apollo/commit/9e946fc8a7e14aa109229a2ffb6280a050d4b69e)) -* enforce code format ([f034d69](https://github.com/input-output-hk/atala-prism-apollo/commit/f034d69927dad9e361ba6657beaa55d8f507609a)) -* enforce code quality ([3b060dd](https://github.com/input-output-hk/atala-prism-apollo/commit/3b060dd38c414a3a664b5e5e3d8a39962e949acf)) -* fix deployment CI script ([4583b2f](https://github.com/input-output-hk/atala-prism-apollo/commit/4583b2f80b0b8377b333df244513f2b3ce8e43d4)) -* fix error in git ([85d1965](https://github.com/input-output-hk/atala-prism-apollo/commit/85d1965655ee479699df3146689a82b01877b4c4)) -* fix for issue [#30](https://github.com/input-output-hk/atala-prism-apollo/issues/30) ([b1c1a4e](https://github.com/input-output-hk/atala-prism-apollo/commit/b1c1a4e9539762a134cebcdbd43ec1344e5b9553)) -* fix group id ([4a70cd6](https://github.com/input-output-hk/atala-prism-apollo/commit/4a70cd62953a34f098349e0b607a5b4e084b6339)) -* fixed wrong import in UUID ([622187b](https://github.com/input-output-hk/atala-prism-apollo/commit/622187bcabc78adae35d9217a2a5ec42ab1356b9)) -* gradle build script ([b191baa](https://github.com/input-output-hk/atala-prism-apollo/commit/b191baa5bc8e32c88819d6eaf0bfdfa1b64373a3)) -* HMAC for JS platform ([6ce142c](https://github.com/input-output-hk/atala-prism-apollo/commit/6ce142cf45fd06a02e7638b6e482dcf77e1f2070)) -* iOS import was removed by mistake ([9994889](https://github.com/input-output-hk/atala-prism-apollo/commit/9994889b3bfa88c1f161aaea01d73f3f383675fd)) -* js module name ([06e4310](https://github.com/input-output-hk/atala-prism-apollo/commit/06e4310a55c5777f7a930841de74c8b64225dbe7)) -* KMP Gradle bug ([#99](https://github.com/input-output-hk/atala-prism-apollo/issues/99)) ([648bcdd](https://github.com/input-output-hk/atala-prism-apollo/commit/648bcdd7c06aef12df5fb61ad496f9ef8b05ff05)) -* linting issue ([7918146](https://github.com/input-output-hk/atala-prism-apollo/commit/79181465195b2c6b1b5e8b517cbb8dc0d5269b49)) -* Publish npm package ([#103](https://github.com/input-output-hk/atala-prism-apollo/issues/103)) ([81ac735](https://github.com/input-output-hk/atala-prism-apollo/commit/81ac7359801f4a7a626f49e086cda7d8c932a0ed)) -* **secp256k1:** Exposing EC Secp256K1 ([#89](https://github.com/input-output-hk/atala-prism-apollo/issues/89)) ([90a578a](https://github.com/input-output-hk/atala-prism-apollo/commit/90a578aed037b17716951e2fe25d49ea5ab4085d)) -* suppress not needed warnings ([0b800c8](https://github.com/input-output-hk/atala-prism-apollo/commit/0b800c8e8124e2ab29a4a12d9bf264329dd0f46c)) - - -### Features - -* add mnemonic validation ([#94](https://github.com/input-output-hk/atala-prism-apollo/issues/94)) ([173ad94](https://github.com/input-output-hk/atala-prism-apollo/commit/173ad949385ae5733332a15b08245c7030b87a11)) -* add test dependency ([a6b7b25](https://github.com/input-output-hk/atala-prism-apollo/commit/a6b7b25249e432cdb9472a14e92c6c18234f7757)) -* add UnsupportedOperationException ([852644d](https://github.com/input-output-hk/atala-prism-apollo/commit/852644db32d48ea34b6f60a2176436ad672bd52c)) -* AES & fixes ([d60cafb](https://github.com/input-output-hk/atala-prism-apollo/commit/d60cafbe72e40eb1f78755c7e24b0374ae8a06af)) -* AES encryption & decryption ([e4af9ec](https://github.com/input-output-hk/atala-prism-apollo/commit/e4af9ecd78bc153d43e26c72a0fab2a51d8302cf)) -* Apollo to support all apple devices ([b4c22ed](https://github.com/input-output-hk/atala-prism-apollo/commit/b4c22edf5ca4688994c7d474abd2f319759eb95d)) -* Apollo to support all apple devices ([355970f](https://github.com/input-output-hk/atala-prism-apollo/commit/355970f771dbded699d81ac23694ed2e4987ed9c)) -* Apollo to support all apple devices ([de6fd03](https://github.com/input-output-hk/atala-prism-apollo/commit/de6fd03e6d963303201b3d62955d9c6c0a7404fb)) -* **BAE:** updating jsMain Ed25519 keys for use in TS ([#92](https://github.com/input-output-hk/atala-prism-apollo/issues/92)) ([c7d3bc1](https://github.com/input-output-hk/atala-prism-apollo/commit/c7d3bc13826336b1be36ecd0309ef3374f2ce237)) -* base symmetric key encryption module ([b7fb2a3](https://github.com/input-output-hk/atala-prism-apollo/commit/b7fb2a3d0a79c8719381edcc373534bc86cb22f0)) -* Base16 encoding & decoding ([a6be3b8](https://github.com/input-output-hk/atala-prism-apollo/commit/a6be3b8785d2fa91b9d04468e429a33aa4c4c804)) -* Base16 Upper ([85fbbef](https://github.com/input-output-hk/atala-prism-apollo/commit/85fbbefeaea4f5043dd4e058dfabecd297b2cc37)) -* Base32 ([c0ff1f7](https://github.com/input-output-hk/atala-prism-apollo/commit/c0ff1f7494d167dd839e8757c35bb8ce61efbd4d)) -* Base58 ([e4c9602](https://github.com/input-output-hk/atala-prism-apollo/commit/e4c960251cc990e11e5df42eaf0176c21c3747dd)) -* base64 ([f1ddaa3](https://github.com/input-output-hk/atala-prism-apollo/commit/f1ddaa357909a9db4dc387560fd381e813b19b15)) -* base64 module init ([f3311a0](https://github.com/input-output-hk/atala-prism-apollo/commit/f3311a068d96df37bc8e64d764dd1843ae14b121)) -* **bip32:** add hd derivation for jvm/android, ios/macos and js ([#84](https://github.com/input-output-hk/atala-prism-apollo/issues/84)) ([d564507](https://github.com/input-output-hk/atala-prism-apollo/commit/d564507a9a1d1021c2f589c82a1e0f702cd436c2)) -* **bip39:** Add Bip39 implementation for all platforms ([#78](https://github.com/input-output-hk/atala-prism-apollo/issues/78)) ([b695878](https://github.com/input-output-hk/atala-prism-apollo/commit/b69587840f688f068a1bd62bd2313f83ae4dc102)) -* char ext ([8a68df1](https://github.com/input-output-hk/atala-prism-apollo/commit/8a68df1db2fdaed6820be7d68e7180c9c262db9b)) -* compress and uncompress secp256k1 functionality for (macos,ios,js,android,jvm) ([#95](https://github.com/input-output-hk/atala-prism-apollo/issues/95)) ([21c33e4](https://github.com/input-output-hk/atala-prism-apollo/commit/21c33e453242dda0ddee9493386332b7ac725bcb)) -* Ed25519 ([eb7f52a](https://github.com/input-output-hk/atala-prism-apollo/commit/eb7f52a9986b7885f4ad8fd879f1dfdc2645475f)) -* **ed25519:** add jvm and android ed25519 implementation ([#85](https://github.com/input-output-hk/atala-prism-apollo/issues/85)) ([ee9757d](https://github.com/input-output-hk/atala-prism-apollo/commit/ee9757d0c19458dc604c5469e67970af4cecab42)) -* **ED25519:** ED25519 jsMain implementation ([#76](https://github.com/input-output-hk/atala-prism-apollo/issues/76)) ([e8945df](https://github.com/input-output-hk/atala-prism-apollo/commit/e8945df553f6fdd98bd3ff3be66f21619639b4c6)) -* **ed25519:** ios, macos implementation of ed25519 ([#79](https://github.com/input-output-hk/atala-prism-apollo/issues/79)) ([a25798c](https://github.com/input-output-hk/atala-prism-apollo/commit/a25798c66ebc97a6c3d727535806436edfacff54)) -* **Experience:** add data type helper methods ([c52cd79](https://github.com/input-output-hk/atala-prism-apollo/commit/c52cd794eaa74519410eb37f47183c6088a56386)) -* **Experience:** add transfer between iOS & KMM ([55ccca5](https://github.com/input-output-hk/atala-prism-apollo/commit/55ccca524cdc936e478192bee8e70eb406dd4f44)) -* **Experience:** platform os ([208a04f](https://github.com/input-output-hk/atala-prism-apollo/commit/208a04f3e384244645bfd8d48518dd38d387f0d8)) -* **Hashing:** add HashingBase for MD and SHA(1,2) ([859b62a](https://github.com/input-output-hk/atala-prism-apollo/commit/859b62a01cb5c81aa195b5125fe9cb3962cfba24)) -* **Hashing:** add MathHelper ([2e40af9](https://github.com/input-output-hk/atala-prism-apollo/commit/2e40af98c742d333c5c64140eec656ddcb2ac22b)) -* **Hashing:** BLAKE-family Unit tests ([f414634](https://github.com/input-output-hk/atala-prism-apollo/commit/f414634fcbfda989fd70cef0246d06d7c0eaa5b1)) -* **Hashing:** BLAKE224 ([f2d658e](https://github.com/input-output-hk/atala-prism-apollo/commit/f2d658e6b7e5540752270edb590fd3300d384448)) -* **Hashing:** BLAKE256 ([0b02aef](https://github.com/input-output-hk/atala-prism-apollo/commit/0b02aefe39c6bc77afbf6db23ba7ae1b380d91d0)) -* **Hashing:** BLAKE2B ([a6ed518](https://github.com/input-output-hk/atala-prism-apollo/commit/a6ed51804b3efaf6572244f3e93dafd793faea2c)) -* **Hashing:** BLAKE2B Unit tests ([45de7b6](https://github.com/input-output-hk/atala-prism-apollo/commit/45de7b6eca90a373b990ddfbd8326991a145046a)) -* **Hashing:** BLAKE2B-160 ([dacbb57](https://github.com/input-output-hk/atala-prism-apollo/commit/dacbb5749bab068314de7f43db50f4eb963332b6)) -* **Hashing:** BLAKE2B-256 ([0ed656d](https://github.com/input-output-hk/atala-prism-apollo/commit/0ed656dab443ceecde6fa616c40e5b6989b78fae)) -* **Hashing:** BLAKE2B-384 ([32d8ce6](https://github.com/input-output-hk/atala-prism-apollo/commit/32d8ce66fb27dc85dc297810e00bb0a186b677f1)) -* **Hashing:** BLAKE2B-512 ([f1d5043](https://github.com/input-output-hk/atala-prism-apollo/commit/f1d5043608de4983421ea7c7b3efa7f414224845)) -* **Hashing:** BLAKE2S ([50bb741](https://github.com/input-output-hk/atala-prism-apollo/commit/50bb741404705872866cfe381ee4c9e83beaff5c)) -* **Hashing:** BLAKE2S Unit tests ([1284bb3](https://github.com/input-output-hk/atala-prism-apollo/commit/1284bb35d5057c950ba71fc85ebbaccb3ec6d98f)) -* **Hashing:** BLAKE2S-128 ([fbf9ed2](https://github.com/input-output-hk/atala-prism-apollo/commit/fbf9ed2188ce1fa1fe2dadb63576470230dfb5c2)) -* **Hashing:** BLAKE2S-160 ([9a6e6a6](https://github.com/input-output-hk/atala-prism-apollo/commit/9a6e6a6fc5ff333c205579ec1893adc7cb6a66d8)) -* **Hashing:** BLAKE2S-224 ([dad2561](https://github.com/input-output-hk/atala-prism-apollo/commit/dad25619b26a983b8e5b99fd3f68288f4632add7)) -* **Hashing:** BLAKE2S-256 ([d2c0fc8](https://github.com/input-output-hk/atala-prism-apollo/commit/d2c0fc84a1406827d827b6d685293445f42ce089)) -* **Hashing:** BLAKE384 ([dc42633](https://github.com/input-output-hk/atala-prism-apollo/commit/dc426338a7beae5f09bce7a4b45630710e9d58fb)) -* **Hashing:** BLAKE512 ([2a4e1b5](https://github.com/input-output-hk/atala-prism-apollo/commit/2a4e1b564e73d8bcbca2e6420643005e03cec282)) -* **Hashing:** digest interface ([4548aa1](https://github.com/input-output-hk/atala-prism-apollo/commit/4548aa106718e0c384cdf22a2fcdd06ee4583706)) -* **Hashing:** KeccakDigest ([a10f5f2](https://github.com/input-output-hk/atala-prism-apollo/commit/a10f5f29a2252feb906f589ec3d3a91f4c631db1)) -* **Hashing:** MD2 ([803fc73](https://github.com/input-output-hk/atala-prism-apollo/commit/803fc739d13617cf430d1698aa2b223ea0fd54fb)) -* **Hashing:** MD4 ([859d26a](https://github.com/input-output-hk/atala-prism-apollo/commit/859d26ad6fb209f8498486345a83056e6ec8692d)) -* **Hashing:** MD5 ([9f57ce5](https://github.com/input-output-hk/atala-prism-apollo/commit/9f57ce557f4b0c702e0ab4e65e243ea5d119b015)) -* **Hashing:** SHA0 ([2469d1d](https://github.com/input-output-hk/atala-prism-apollo/commit/2469d1d377e3c39690a5c079b3b8bd89f0b6a355)) -* **Hashing:** SHA0 Unit tests ([482b3a9](https://github.com/input-output-hk/atala-prism-apollo/commit/482b3a9e03e797a089db174b216ff412bdd9f3b2)) -* **Hashing:** SHA1 ([f33d1d9](https://github.com/input-output-hk/atala-prism-apollo/commit/f33d1d98716fd44a0cfdfe3b1f0a3f82b43dcb4f)) -* **Hashing:** SHA1 Unit Tests ([b83af38](https://github.com/input-output-hk/atala-prism-apollo/commit/b83af3822f7102216b6aca119f25c19e281aba31)) -* **Hashing:** SHA224 ([47534f7](https://github.com/input-output-hk/atala-prism-apollo/commit/47534f797e4c99e6be35b93f17b7b62386d453fd)) -* **Hashing:** SHA224 Unit tests ([59d8751](https://github.com/input-output-hk/atala-prism-apollo/commit/59d8751790ad0d002906538ec1bb5405931db3a4)) -* **Hashing:** SHA256 ([a12af78](https://github.com/input-output-hk/atala-prism-apollo/commit/a12af780305531cc869fcfb8d783b9cd07ac4d11)) -* **Hashing:** SHA256 Unit tests ([c829aab](https://github.com/input-output-hk/atala-prism-apollo/commit/c829aab8f8e49aebaff7aeb6cd49a696796363ef)) -* **Hashing:** SHA3-224 ([372e5a9](https://github.com/input-output-hk/atala-prism-apollo/commit/372e5a94a1fb9d08ec8863662d9acb4d4775b162)) -* **Hashing:** SHA3-256 ([a885989](https://github.com/input-output-hk/atala-prism-apollo/commit/a8859894b22649e77e24adc0b6bb48b66b6e1a66)) -* **Hashing:** SHA3-384 ([2fa5b14](https://github.com/input-output-hk/atala-prism-apollo/commit/2fa5b14187b21d252ffb8e822c1b579ffb91ebd9)) -* **Hashing:** SHA3-512 ([e45543e](https://github.com/input-output-hk/atala-prism-apollo/commit/e45543e8669996ef4ba192b62d05a17e7902a46a)) -* **Hashing:** SHA3-family Unit tests ([ac535d2](https://github.com/input-output-hk/atala-prism-apollo/commit/ac535d2272d518fdaa20b463a91b7afb50cb2670)) -* **Hashing:** SHA384 ([207a58e](https://github.com/input-output-hk/atala-prism-apollo/commit/207a58e40d395bae2c6f37f2cf64e55d810c5564)) -* **Hashing:** SHA384 Unit tests ([09ec034](https://github.com/input-output-hk/atala-prism-apollo/commit/09ec034a42a654ff7026c0862bb0e68b6c7c75c7)) -* **Hashing:** SHA512 ([a9d10bf](https://github.com/input-output-hk/atala-prism-apollo/commit/a9d10bf6c03362a399d54a2b5c7145e54e123e03)) -* **Hashing:** SHA512 Unit tests ([c567ff7](https://github.com/input-output-hk/atala-prism-apollo/commit/c567ff771e33cdbebf540270e6110a27e03d85c6)) -* **Hashing:** SHA512/224 ([192b205](https://github.com/input-output-hk/atala-prism-apollo/commit/192b2057f69f5ad16e7872a3e6b59b80115f48df)) -* **Hashing:** SHA512/224 Unit test ([62a2ede](https://github.com/input-output-hk/atala-prism-apollo/commit/62a2eded842d17aaa041f7df7b6087abd11f2418)) -* **Hashing:** SHA512/256 ([6ddd004](https://github.com/input-output-hk/atala-prism-apollo/commit/6ddd004ef951a4e0486613cdc2705eedc2958852)) -* **Hashing:** SHA512/256 Unit test ([24450a4](https://github.com/input-output-hk/atala-prism-apollo/commit/24450a49e30b56219022ef4ef86236cdb09e48b0)) -* Long ext ([fe5e1cf](https://github.com/input-output-hk/atala-prism-apollo/commit/fe5e1cf911cce18aaac9ffc5a46b469ab11d6333)) -* **MAC:** HMAC implementation ([935d9c2](https://github.com/input-output-hk/atala-prism-apollo/commit/935d9c29079b042a4495998d6437d729673e66f5)) -* **mnemonic:** js doesnt handle List and swift doesnt handle Array this is the solution ([#105](https://github.com/input-output-hk/atala-prism-apollo/issues/105)) ([e65e0f0](https://github.com/input-output-hk/atala-prism-apollo/commit/e65e0f0b93169ef1cf0b08f73aa1f74ade525113)) -* multibase ([73a1e7b](https://github.com/input-output-hk/atala-prism-apollo/commit/73a1e7b742bb24868cf988eaa20faa662a2c6ee3)) -* NumberFormatException ext ([8955561](https://github.com/input-output-hk/atala-prism-apollo/commit/8955561a33956f5fdbad6e7872aa576a1a3144f8)) -* **secp256k1:** add library to be our dependency for secp256k1 in android, jvm, ios, macos, js ([3e41246](https://github.com/input-output-hk/atala-prism-apollo/commit/3e41246b8eb99f94a67ea567b52963b44ae0239e)) -* Secure Random ([e577736](https://github.com/input-output-hk/atala-prism-apollo/commit/e5777369ae047abf945ed5e19b3decc72def4033)) -* Utils module ([ba7eefb](https://github.com/input-output-hk/atala-prism-apollo/commit/ba7eefbef1d896ada64578a48e8674ab09f80d8a)) -* UUID ([85afcb8](https://github.com/input-output-hk/atala-prism-apollo/commit/85afcb86b4d98301fbf936bb9fae634bdc0950b1)) -* UUID init ([a1d9b65](https://github.com/input-output-hk/atala-prism-apollo/commit/a1d9b65e765d0c8acd321f305768d5ed1f20d9d4)) -* x25519 key pair generation ([4227c2c](https://github.com/input-output-hk/atala-prism-apollo/commit/4227c2c7612f2f209438746185751419f9e52efc)) -* **x25519:** add x25519 implementation for ios, macos ([#80](https://github.com/input-output-hk/atala-prism-apollo/issues/80)) ([c18c0eb](https://github.com/input-output-hk/atala-prism-apollo/commit/c18c0ebc6da674328b15a39d441c89dd0e35ea77)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 12c827ba4..1cb77b55d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,11 +13,11 @@ Built on a distributed ledger, it offers core infrastructure for issuing DIDs (D verifiable credentials, alongside tools and frameworks to help expand your ecosystem. The complete platform is separated in multiple repositories: -* [Apollo](https://github.com/input-output-hk/atala-prism-apollo) - Repo for the Apollo Building Block, this contains +* [Apollo](https://github.com/hyperledger-identus/apollo) - Repo for the Apollo Building Block, this contains the collection of the cryptographic methods used all around Identus platform. * [identus-cloud-agent](https://github.com/hyperledger/identus-cloud-agent) - Repo that contains the servers Building Blocks. -* [Edge Agent SDK KMP](https://github.com/input-output-hk/atala-prism-wallet-sdk-kmm/) - Repo that represents the Kotlin +* [Edge Agent SDK KMP](https://github.com/hyperledger-identus/sdk-kmp) - Repo that represents the Kotlin Multiplatform Edge Agent SDK. ### What is Apollo @@ -34,7 +34,7 @@ Future target might be supported in the future. ### Your First Code Contribution Unsure where to begin contributing to Apollo? You can start by looking through -the [Readme](https://github.com/input-output-hk/atala-prism-apollo/blob/main/README.md) that provides all the steps to +the [Readme](https://github.com/hyperledger-identus/apollo/blob/main/README.md) that provides all the steps to set up your environment. ### Pull Requests @@ -68,7 +68,7 @@ related reports :mag_right:. Before creating bug reports, please check [this list]() as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](). Fill -out [the required template](https://github.com/input-output-hk/atala-prism-apollo/blob/main/.github/ISSUE_TEMPLATE/bug_report.md), +out [the required template](https://github.com/hyperledger-identus/apollo/blob/main/.github/ISSUE_TEMPLATE/bug_report.md), the information it asks for helps us resolve issues faster. > **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new @@ -76,15 +76,15 @@ the information it asks for helps us resolve issues faster. * **You might be able to find the cause of the problem and fix things yourself by Debugging**. Most importantly, check if you can reproduce the problem in the latest version. -* **Check the [Readme](https://github.com/input-output-hk/atala-prism-apollo/blob/main/README.md) ** if you have - problems on the setup and the [discussions](https://github.com/input-output-hk/atala-prism-apollo/discussions)** for a +* **Check the [Readme](https://github.com/hyperledger-identus/apollo/blob/main/README.md) ** if you have + problems on the setup and the [discussions](https://github.com/hyperledger-identus/apollo/discussions)** for a list of common questions and problems. * **Perform a cursory search to see if the problem has already been reported**. If it has **and the issue is still open **, add a comment to the existing issue instead of opening a new one. Bugs are tracked as [GitHub issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/about-issues). Create an issue on that repository and provide the following information by filling -in [the template](https://github.com/input-output-hk/atala-prism-apollo/blob/main/.github/ISSUE_TEMPLATE/bug_report.md). +in [the template](https://github.com/hyperledger-identus/apollo/blob/main/.github/ISSUE_TEMPLATE/bug_report.md). Explain the problem and include additional details to help maintainers reproduce the problem: @@ -122,7 +122,7 @@ your suggestion :pencil: and find related suggestions :mag_right:. Before creating enhancement suggestions, please check [this list]() as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](). Fill -in [the template](https://github.com/input-output-hk/atala-prism-apollo/blob/main/.github/ISSUE_TEMPLATE/feature_request.md), +in [the template](https://github.com/hyperledger-identus/apollo/blob/main/.github/ISSUE_TEMPLATE/feature_request.md), including the steps that you imagine you would take if the feature you're requesting existed. * Most importantly, **check if you're using the latest version.** diff --git a/Package.swift b/Package.swift index b3bdce1f4..a70545975 100644 --- a/Package.swift +++ b/Package.swift @@ -18,14 +18,14 @@ let package = Package( // LOCAL // .binaryTarget( // name: "ApolloBinary", -// path: "./apollo/build/packages/ApolloSwift/Apollo.xcframework.zip" +// path: "./apollo/build/packages/ApolloSwift/ApolloBinary.xcframework.zip" // ), // RELEASE .binaryTarget( name: "ApolloBinary", - url: "https://github.com/hyperledger-identus/apollo/releases/download/v1.7.2/Apollo.xcframework.zip", - checksum: "e956cb7e32abdb0233d5351c87e0a4bc30a06c87d9c687ba197cd8d916454e49" + url: "https://github.com/hyperledger-identus/apollo/releases/download/v2.1.0/ApolloLibrary.xcframework.zip", + checksum: "475be7f961b47deee9323833c327f418170b3e1ddf363ed130fa00a96e3cb8f2" ) ] ) diff --git a/README.md b/README.md index 9ee29437f..aafabe953 100644 --- a/README.md +++ b/README.md @@ -1,158 +1,18 @@ -# Apollo - -[![Kotlin](https://img.shields.io/badge/kotlin-1.9.22-blue.svg?logo=kotlin)](http://kotlinlang.org) -![badge-license] -![badge-latest-release] -[![semantic-release-kotlin]](https://github.com/semantic-release/semantic-release) +![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue?logo=apache) +![Kotlin](https://img.shields.io/badge/kotlin-2.2.0-blue?logo=kotlin) +![Gradle](https://img.shields.io/badge/gradle-8.13-blue?logo=gradle) -![badge-platform-android] -![badge-platform-ios] -![badge-platform-jvm] -![badge-platform-js] -![badge-platform-js-node] +# Apollo A cryptography lib built with Kotlin Multiplatform with support for the following targets: -- JS -- iOS -- Android -- JVM - -## How to build Apollo - -### Set Environment Variables - -Set variable `GITHUB_ACTOR` with your GitHub Username and set variable `GITHUB_TOKEN` with your GitHub Personal Access Token. - -As an example we will go with `Bash` - -1. Open CMD. -2. Run `sudo nano $HOME/.bash_profile`. -3. Insert `export GITHUB_ACTOR="YOUR GITHUB USERNAME"` -4. Insert `export GITHUB_TOKEN="YOUR GITHUB PERSONAL ACCESS TOKEN"` -5. Save profile and restart CMD to take effect. - -### Install Homebrew (Mac Only) - -```bash -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -``` - -### Install autoconf, automake & libtool (Mac Only) - -```bash -brew install autoconf automake libtool -``` - -### Install JDK 11 - -```bash -cs java --jvm adopt:1.11.0-11 --setup -``` - -after that `java -version` should yield something like that - -```text -openjdk version "11.0.11" 2021-04-20 -OpenJDK Runtime Environment (build 11.0.11+9) -OpenJDK 64-Bit Server VM (build 11.0.11+9, mixed mode) -``` - -In case of using macOS with M chip, make sure to install the arch64 version of Java - -### Install XCode (Mac Only) - -Install XCode from App Store. - -Then approve xcodebuild license in your terminal. Like so: -```bash -$ sudo xcodebuild -license -``` - -### Install Android SDK - -Install Android SDK from SDK Manager (via Android Studio). - -Then approve Android SDK license. Like so: -```bash -$ cd /Users/{{YOUR USER}}/Library/Android/sdk -$ tools/bin/sdkmanager --licenses -``` -While there are many ways to install Android SDK this has proven to be the most reliable way. Standard IntelliJ with Android plugin may work. However, we've had several issues. Your mileage may vary. - -For Ubuntu, -```bash -sudo apt update && sudo apt install android-sdk -``` -Leaving the SDK at `~/Android/Sdk` - -### Create local.properties file - -Create a file named `local.properties` in the root of Apollo. - -Add your android sdk path to `local.properties file`. Like so: -```properties -sdk.dir = /Users/{{YOUR USER}}/Library/Android/sdk -``` -This will indicate to your IDE which android SDK to use. - -Alternatively, you can add the following environment variable into your shell profile file: -```bash -$ export ANDROID_HOME='/Users/{{YOUR USER}}/Library/Android/sdk -``` - -### Building the project - -Install Rust packages: -```bash -$ ./scripts/install-rust-packages.sh -``` - -You should be able to import and build the project in IntelliJ IDEA now. - -#### Troubleshooting - -Here is a list of common issues you might face and its solutions. +## Packages -##### Environment Variables were added but not available +[![Sonatype](https://img.shields.io/maven-central/v/org.hyperledger.identus/apollo?logo=sonatype&color=orange&label=maven&logoColor=1B1C30)](https://central.sonatype.com/artifact/org.hyperledger.identus/apollo) +[![NPM](https://img.shields.io/npm/v/%40hyperledger%2Fidentus-apollo?logo=npm&color=orange&label=npm&logoColor=CB3837)](https://www.npmjs.com/package/@hyperledger/identus-apollo) +[![Swift](https://img.shields.io/github/v/release/hyperledger-identus/apollo?logo=swift&color=orange&label=spm)](https://github.com/hyperledger-identus/apollo/releases) -If you already added the environment variable to your CMD profile and still not being available. - -**Solution** - -* Restart your Device. - -##### No binary for ChromeHeadless browser on your platform - -If you get error: -```log -No binary for ChromeHeadless browser on your platform. -Please, set "CHROME_BIN" env variable. -java.lang.IllegalStateException: Errors occurred during launch of browser for testing. -- ChromeHeadless -``` - -**Solution** - -* Install headless chrome or just Chrome browser - -##### In case IntelliJ was building but was still showing syntax error in Gradle Script - -**Solution** - -* Go to preference/settings and make sure to select the correct Java version 11. - -##### Could not find JNA native support - -if you get this error on macOS with M chip: -```log -Could not find JNA native support -``` -**Solution** - -* Make sure that you are using Java version that is arch64. - -## How to use for JVM/Android app +## JVM Usage In `build.gradle.kts` files include the dependency ```kotlin @@ -167,7 +27,7 @@ dependencies { } ``` -## How to use for Swift app +## Swift usage ### Using SPM @@ -183,11 +43,11 @@ dependencies: [ ### Using generated xcframework directly The following instruction using Xcode 15 -1. Go the [Release Page](https://github.com/hyperledger-identus/apollo/releases) and check the latest version and download the `Apollo.xcframework.zip` file. +1. Go the [Release Page](https://github.com/hyperledger-identus/apollo/releases) and check the latest version and download the `ApolloBinary.xcframework.zip` file. 2. Uncompress the downloaded file. -3. Add the `Apollo.xcframework` to your Xcode project. +3. Add the `ApolloBinary.xcframework` to your Xcode project. 4. When asked select Copy items if needed. -5. Then go to the project configuration page in Xcode and check the Frameworks and Libraries section and add the `Apollo.xcframework` if not found then choose `Embed & Sign`. +5. Then go to the project configuration page in Xcode and check the Frameworks and Libraries section and add the `ApolloBinary.xcframework` if not found then choose `Embed & Sign`. 6. Then go to the build phase page and mark the framework as required. [!WARNING] @@ -207,13 +67,13 @@ Package( ``` -## How to use for Node.js app +## Node.js usage Inside the `package.json` ```json { "dependencies": { - "@atala/apollo": "" + "@hyperledger/identus-apollo": "" } } ``` @@ -279,6 +139,13 @@ libraryDependencies += "org.hyperledger.identus" % "apollo-jvm" % " -[badge-latest-release]: https://img.shields.io/badge/latest--release-1.2.10-blue.svg?style=flat -[badge-license]: https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat -[semantic-release-kotlin]: https://img.shields.io/badge/semantic--release-kotlin-blue?logo=semantic-release - - -[badge-platform-android]: http://img.shields.io/badge/-android-6EDB8D.svg?style=flat -[badge-platform-ios]: http://img.shields.io/badge/-ios-CDCDCD.svg?style=flat -[badge-platform-jvm]: http://img.shields.io/badge/-jvm-DB413D.svg?style=flat -[badge-platform-js]: http://img.shields.io/badge/-js-F8DB5D.svg?style=flat -[badge-platform-js-node]: https://img.shields.io/badge/-nodejs-68a063.svg?style=flat diff --git a/apollo/build.gradle.kts b/apollo/build.gradle.kts index c42ecd13f..fbbbe201c 100644 --- a/apollo/build.gradle.kts +++ b/apollo/build.gradle.kts @@ -1,46 +1,37 @@ import dev.petuska.npm.publish.extension.domain.NpmAccess -import org.gradle.kotlin.dsl.invoke -import org.gradle.kotlin.dsl.withType +import dev.petuska.npm.publish.task.NpmPublishTask import org.jetbrains.dokka.gradle.DokkaTask -import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget -import java.io.ByteArrayOutputStream -import java.net.URL +import java.net.URI plugins { alias(libs.plugins.kotlin.multiplatform) - alias(libs.plugins.android.library) + alias(libs.plugins.android.kotlin.multiplatform.library) alias(libs.plugins.dokka) + alias(libs.plugins.maven.publish) alias(libs.plugins.npm.publish) alias(libs.plugins.swiftpackage) + alias(libs.plugins.kover) apply false // https://github.com/Kotlin/kotlinx-kover/issues/747 } -project.description = "Collection of cryptographic methods used across Identus platform." - -val currentModuleName = "Apollo" val appleBinaryName = "ApolloLibrary" val minimumIosVersion = "15.0" val minimumMacOSVersion = "13.0" kotlin { - withSourcesJar(publish = false) - jvm { - withSourcesJar(publish = true) - compilations.all { - compilerOptions.configure { - jvmTarget.set(JvmTarget.JVM_17) - } - } + applyDefaultHierarchyTemplate() + compilerOptions { + freeCompilerArgs.addAll("-Xexpect-actual-classes") } - - androidTarget { - publishLibraryVariants("release", "debug") + jvm() + androidLibrary { + namespace = "dev.allain" + compileSdk = libs.versions.android.compileSdk.get().toInt() + minSdk = libs.versions.android.minSdk.get().toInt() } - iosArm64 { swiftCinterop("IOHKSecureRandomGeneration", name) swiftCinterop("IOHKCryptoKit", name) - binaries.framework { baseName = appleBinaryName } @@ -48,7 +39,6 @@ kotlin { iosX64 { swiftCinterop("IOHKSecureRandomGeneration", name) swiftCinterop("IOHKCryptoKit", name) - binaries.framework { baseName = appleBinaryName } @@ -56,7 +46,6 @@ kotlin { iosSimulatorArm64 { swiftCinterop("IOHKSecureRandomGeneration", name) swiftCinterop("IOHKCryptoKit", name) - binaries.framework { baseName = appleBinaryName } @@ -64,121 +53,93 @@ kotlin { macosArm64 { swiftCinterop("IOHKSecureRandomGeneration", name) swiftCinterop("IOHKCryptoKit", name) - binaries.framework { baseName = appleBinaryName } } - + macosX64 { + swiftCinterop("IOHKSecureRandomGeneration", name) + swiftCinterop("IOHKCryptoKit", name) + binaries.framework { + baseName = appleBinaryName + } + } js(IR) { - outputModuleName = currentModuleName + outputModuleName = "apollo" binaries.library() useCommonJs() generateTypeScriptDefinitions() - this.compilations["main"].packageJson { - this.version = rootProject.version.toString() - } - this.compilations["test"].packageJson { - this.version = rootProject.version.toString() - } browser { webpackTask { - output.library = currentModuleName + output.library = "apollo" output.libraryTarget = org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackOutput.Target.VAR } testTask { - useKarma { useChromeHeadless() } + useKarma { + useChromeHeadless() + } } } nodejs { testTask { - useKarma { useChromeHeadless() } + useMocha { + timeout = "30s" + } } } } - - applyDefaultHierarchyTemplate() - sourceSets { - val commonMain by getting { - dependencies { - implementation(project(":bip32-ed25519")) - implementation(libs.serialization.json) - implementation(libs.bignum) - implementation(libs.okio) - implementation(libs.atomicfu) - implementation(libs.macs.hmac.sha2) - implementation(libs.hash.hmac.sha2) - } + commonMain.dependencies { + implementation(project(":bip32-ed25519")) + implementation(libs.serialization.json) + implementation(libs.bignum) + implementation(libs.okio) + implementation(libs.atomicfu) + implementation(libs.macs.hmac.sha2) + implementation(libs.hash.hmac.sha2) } - - val commonTest by getting { - dependencies { - implementation(kotlin("test")) - } + commonTest.dependencies { + implementation(kotlin("test")) } - - val androidMain by getting { - dependsOn(commonMain) - dependencies { - api(libs.secp256k1.kmp) - implementation(libs.secp256k1.kmp.jvm) - implementation(libs.secp256k1.kmp.android) - implementation(libs.guava) - implementation(libs.bouncycastle) - implementation(libs.bitcoinjcore) - implementation(libs.jna.android) - } + androidMain.dependencies { + api(libs.secp256k1.kmp) + implementation(libs.secp256k1.kmp.jvm) + implementation(libs.secp256k1.kmp.android) + implementation(libs.guava) + implementation(libs.bouncycastle) + implementation(libs.bitcoinjcore) + implementation(libs.jna.android) } - - val jvmMain by getting { - dependsOn(commonMain) - dependencies { - api(libs.secp256k1.kmp) - implementation(libs.secp256k1.kmp.jvm) - implementation(libs.guava) - implementation(libs.bouncycastle) - implementation(libs.bitcoinjcore) - implementation(libs.jna) - } + jvmMain.dependencies { + api(libs.secp256k1.kmp) + implementation(libs.secp256k1.kmp.jvm) + implementation(libs.guava) + implementation(libs.bouncycastle) + implementation(libs.bitcoinjcore) + implementation(libs.jna) } - - val jvmTest by getting { - dependsOn(commonTest) - dependencies { - implementation(libs.junit) - } + jvmTest.dependencies { + implementation(libs.junit) } - - val jsMain by getting { - dependencies { - implementation(npm("elliptic", "6.6.1")) - implementation(npm("@types/elliptic", "6.4.18")) - implementation(npm("@noble/curves", "1.2.0")) - implementation(npm("@stablelib/x25519", "1.0.3")) - implementation(npm("hash.js", "1.1.7")) - implementation(npm("@noble/hashes", "1.3.1")) - implementation(npm("stream-browserify", "3.0.0")) - implementation(npm("buffer", "6.0.3")) - implementation(libs.kotlin.web) - implementation(libs.kotlin.node) - } + jsMain.dependencies { + implementation(npm("elliptic", "6.6.1")) + implementation(npm("@types/elliptic", "6.4.18")) + implementation(npm("@noble/curves", "1.2.0")) + implementation(npm("@stablelib/x25519", "1.0.3")) + implementation(npm("hash.js", "1.1.7")) + implementation(npm("@noble/hashes", "1.3.1")) + implementation(npm("stream-browserify", "3.0.0")) + implementation(npm("buffer", "6.0.3")) + implementation(libs.kotlin.web) + implementation(libs.kotlin.node) } - - val jsTest by getting { - dependencies { - implementation(npm("url", "0.11.4")) - } + jsTest.dependencies { + implementation(npm("url", "0.11.4")) } - - val nativeMain by getting { - dependsOn(commonMain) - dependencies { - implementation(project(":bip32-ed25519")) - implementation(project(":secp256k1-kmp")) - } + nativeMain.dependencies { + implementation(project(":bip32-ed25519")) + implementation(project(":secp256k1-kmp")) } - all { languageSettings { optIn("kotlin.RequiresOptIn") @@ -186,9 +147,8 @@ kotlin { } } } - multiplatformSwiftPackage { - packageName("Apollo") + packageName(appleBinaryName) swiftToolsVersion("5.9") targetPlatforms { iOS { v(minimumIosVersion) } @@ -198,35 +158,8 @@ kotlin { } } -android { - namespace = "org.hyperledger.identus.apollo" - compileSdk = 34 - sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") - - defaultConfig { - minSdk = 21 - } - - kotlin { - jvmToolchain(17) - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - publishing { - multipleVariants { - withSourcesJar() - withJavadocJar() - allVariants() - } - } -} - tasks.withType().configureEach { - moduleName.set(currentModuleName) + moduleName.set("Apollo") moduleVersion.set(rootProject.version.toString()) description = "This is a Kotlin Multiplatform Library for cryptography" dokkaSourceSets { @@ -241,57 +174,27 @@ tasks.withType().configureEach { ) sourceLink { localDirectory.set(projectDir.resolve("src")) - remoteUrl.set(URL("https://github.com/hyperledger-identus/apollo/tree/main/src")) + remoteUrl.set(URI("https://github.com/hyperledger-identus/apollo/tree/main/src").toURL()) remoteLineSuffix.set("#L") } externalDocumentationLink { - url.set(URL("https://kotlinlang.org/api/latest/jvm/stdlib/")) + url.set(URI("https://kotlinlang.org/api/latest/jvm/stdlib/").toURL()) } externalDocumentationLink { - url.set(URL("https://kotlinlang.org/api/kotlinx.serialization/")) + url.set(URI("https://kotlinlang.org/api/kotlinx.serialization/").toURL()) } externalDocumentationLink { - url.set(URL("https://api.ktor.io/")) + url.set(URI("https://api.ktor.io/").toURL()) } externalDocumentationLink { - url.set(URL("https://kotlinlang.org/api/kotlinx-datetime/")) - packageListUrl.set(URL("https://kotlinlang.org/api/kotlinx-datetime/")) + url.set(URI("https://kotlinlang.org/api/kotlinx-datetime/").toURL()) + packageListUrl.set(URI("https://kotlinlang.org/api/kotlinx-datetime/").toURL()) } externalDocumentationLink { - url.set(URL("https://kotlinlang.org/api/kotlinx.coroutines/")) - } - } - } -} - -npmPublish { - organization.set("hyperledger") - version.set(rootProject.version.toString()) - access.set(NpmAccess.PUBLIC) - packages { - access.set(NpmAccess.PUBLIC) - named("js") { - scope.set("hyperledger") - packageName.set("identus-apollo") - readme.set(rootDir.resolve("README.md")) - packageJson { - author { - name.set("IOG") - } - repository { - type.set("git") - url.set("https://github.com/hyperledger-identus/apollo") - } + url.set(URI("https://kotlinlang.org/api/kotlinx.coroutines/").toURL()) } } } - registries { - access.set(NpmAccess.PUBLIC) - register("npmjs") { - uri.set("https://registry.npmjs.org") - authToken.set(System.getenv("NPM_TOKEN")) - } - } } /** @@ -304,19 +207,24 @@ fun KotlinNativeTarget.swiftCinterop(library: String, platform: String) { compilations.getByName("main") { cinterops.create(library) { extraOpts = listOf("-compiler-option", "-DNS_FORMAT_ARGUMENT(A)=") + val iosLibsDir = rootProject.layout.projectDirectory.dir("iOSLibs") + when (platform) { "iosX64", "iosSimulatorArm64" -> { - includeDirs.headerFilterOnly("$rootDir/iOSLibs/$library/build/Release-iphonesimulator/include/") + val includeDir = iosLibsDir.dir("$library/build/Release-iphonesimulator/include/") + includeDirs.headerFilterOnly(includeDir) tasks[interopProcessingTaskName].dependsOn(":iOSLibs:build${library.replaceFirstChar(Char::uppercase)}Iphonesimulator") } "iosArm64" -> { - includeDirs.headerFilterOnly("$rootDir/iOSLibs/$library/build/Release-iphoneos/include/") + val includeDir = iosLibsDir.dir("$library/build/Release-iphoneos/include/") + includeDirs.headerFilterOnly(includeDir) tasks[interopProcessingTaskName].dependsOn(":iOSLibs:build${library.replaceFirstChar(Char::uppercase)}Iphoneos") } "macosX64", "macosArm64" -> { - includeDirs.headerFilterOnly("$rootDir/iOSLibs/$library/build/Release/include/") + val includeDir = iosLibsDir.dir("$library/build/Release/include/") + includeDirs.headerFilterOnly(includeDir) tasks[interopProcessingTaskName].dependsOn(":iOSLibs:build${library.replaceFirstChar(Char::uppercase)}Macosx") } } @@ -324,59 +232,66 @@ fun KotlinNativeTarget.swiftCinterop(library: String, platform: String) { } } -// === Group: Resource and Test Task Dependencies === -val tasksRequiringRustLibs = - listOf( - "jvmProcessResources", - "jsBrowserTest", - "jsNodeTest" - ) +/* JS Wasm */ +tasks.register("copyBip32Wasm") { + group = "js-build" + description = "Copy ed25519_bip32_wasm.js to apollo js build directory." + val buildRustWasmTaskProvider = project(":bip32-ed25519").tasks.named("buildRustWasm") + dependsOn(buildRustWasmTaskProvider) + from(project(":bip32-ed25519").layout.projectDirectory.dir("rust-ed25519-bip32/wasm/build")) + into(rootProject.layout.buildDirectory.dir("js/packages/apollo/kotlin")) +} +tasks.named("jsBrowserProductionLibraryDistribution") { + dependsOn("copyBip32Wasm") +} +tasks.named("jsNodeProductionLibraryDistribution") { + dependsOn("copyBip32Wasm") +} -tasksRequiringRustLibs.forEach { - tasks.named(it).configure { - dependsOn(":bip32-ed25519:prepareRustLibs") - } +/* JS Wasm + Testing */ +tasks.register("copyBip32WasmTest") { + group = "js-build" + description = "Copy ed25519_bip32_wasm.js to apollo js test build directory." + val buildRustWasmTaskProvider = project(":bip32-ed25519").tasks.named("buildRustWasm") + dependsOn(buildRustWasmTaskProvider) + from(project(":bip32-ed25519").layout.projectDirectory.dir("rust-ed25519-bip32/wasm/build")) + into(rootProject.layout.buildDirectory.dir("js/packages/apollo-test/kotlin")) +} +tasks.named("jsBrowserTest") { + dependsOn("copyBip32WasmTest") +} +tasks.named("jsNodeTest") { + dependsOn("copyBip32WasmTest") } -val tasksPublishingDisabled = - listOf( - "publishIosX64PublicationToSonatypeRepository", - "publishIosArm64PublicationToSonatypeRepository", - "publishIosSimulatorArm64PublicationToSonatypeRepository", - "publishMacosArm64PublicationToSonatypeRepository", - "publishJsPublicationToSonatypeRepository", - "publishIosX64PublicationToMavenCentralRepository", - "publishIosArm64PublicationToMavenCentralRepository", - "publishIosSimulatorArm64PublicationToMavenCentralRepository", - "publishMacosArm64PublicationToMavenCentralRepository", - "publishJsPublicationToMavenCentralRepository", - "publishIosX64PublicationToMavenLocalRepository", - "publishIosArm64PublicationToMavenLocalRepository", - "publishIosSimulatorArm64PublicationToMavenLocalRepository", - "publishMacosArm64PublicationToMavenLocalRepository", - "publishJsPublicationToMavenLocalRepository" - ) -tasksPublishingDisabled.forEach { - if (tasks.findByName(it) != null) { - tasks.named(it).configure { - this.enabled = false - } - } +/* NPM Publication Wasm */ +val npmBip32Wasm by tasks.registering(Copy::class) { + group = "js-build" + description = "Copy ed25519_bip32_wasm.js to npm publication directory." + val buildRustWasmTaskProvider = project(":bip32-ed25519").tasks.named("buildRustWasm") + dependsOn(buildRustWasmTaskProvider) + from(project(":bip32-ed25519").layout.projectDirectory.dir("rust-ed25519-bip32/wasm/build")) + into(layout.buildDirectory.dir("packages/js")) +} +tasks.withType().configureEach { + dependsOn("npmBip32Wasm") } val swiftPackageUpdateMinOSVersion = tasks.register("updateMinOSVersion") { group = "multiplatform-swift-package" - description = "Updates the minimum OS version of the plists in the xcframework, known issue of the KMP SwiftPackage plugin" + description = + "Updates the minimum OS version of the plists in the xcframework, known issue of the KMP SwiftPackage plugin" dependsOn("createSwiftPackage") - val xcframeworkDir = layout.projectDirectory.file("build/packages/ApolloSwift/Apollo.xcframework").asFile + val xcframeworkDir = + layout.projectDirectory.file("build/packages/ApolloSwift/$appleBinaryName.xcframework").asFile doLast { val frameworkPaths = mapOf( - "ios-arm64/ApolloLibrary.framework" to "ios-arm64/ApolloLibrary.framework/ApolloLibrary", - "ios-arm64_x86_64-simulator/ApolloLibrary.framework" to "ios-arm64_x86_64-simulator/ApolloLibrary.framework/ApolloLibrary" + "ios-arm64/$appleBinaryName.framework" to "ios-arm64/$appleBinaryName.framework/$appleBinaryName", + "ios-arm64_x86_64-simulator/$appleBinaryName.framework" to "ios-arm64_x86_64-simulator/$appleBinaryName.framework/$appleBinaryName" ) frameworkPaths.forEach { (plistFolder, binaryRelativePath) -> @@ -384,23 +299,19 @@ val swiftPackageUpdateMinOSVersion = val plistFile = xcframeworkDir.resolve("$plistFolder/Info.plist") if (binaryFile.exists() && plistFile.exists()) { - val currentMinOS = - ByteArrayOutputStream().use { outputStream -> - exec { - commandLine("otool", "-l", binaryFile.absolutePath) - standardOutput = outputStream - } - outputStream - .toString() - .lines() - .firstOrNull { it.contains("minos") } - ?.trim() - ?.split(" ") - ?.lastOrNull() - ?: throw GradleException("Could not determine min OS version from binary") - } - - exec { + val otoolOutput = providers.exec { + isIgnoreExitValue = true + commandLine("otool", "-l", binaryFile.absolutePath) + } + val currentMinOS = otoolOutput.standardOutput.asText.get() + .lines() + .firstOrNull { it.contains("minos") } + ?.trim() + ?.split(" ") + ?.lastOrNull() + ?: throw GradleException("Could not determine min OS version from binary") + providers.exec { + isIgnoreExitValue = true commandLine( "/usr/libexec/PlistBuddy", "-c", @@ -408,7 +319,6 @@ val swiftPackageUpdateMinOSVersion = plistFile.absolutePath ) } - println("Updated $plistFile with MinimumOSVersion = $currentMinOS") } else { println("Required files not found: binary=$binaryFile, plist=$plistFile") @@ -425,13 +335,119 @@ afterEvaluate { } } -// Ensure copy tasks always include duplicates -tasks.withType().configureEach { - duplicatesStrategy = DuplicatesStrategy.INCLUDE +mavenPublishing { + val shouldAutoRelease = project.findProperty("autoRelease")?.toString()?.toBoolean() ?: false + publishToMavenCentral(automaticRelease = shouldAutoRelease) + signAllPublications() + coordinates(group.toString(), "apollo", rootProject.version.toString()) + pom { + name.set("Identus Apollo") + description.set("Collection of cryptographic methods used across Identus platform.") + url.set("https://hyperledger-identus.github.io/docs/") + organization { + name.set("Hyperledger") + url.set("https://www.hyperledger.org/") + } + licenses { + license { + name.set("The Apache License, Version 2.0") + url.set("https://www.apache.org/licenses/LICENSE-2.0.txt") + } + } + developers { + developer { + id.set("hamada147") + name.set("Ahmed Moussa") + email.set("ahmed.moussa@iohk.io") + organization.set("IOG") + roles.add("developer") + } + developer { + id.set("amagyar-iohk") + name.set("Allain Magyar") + email.set("allain.magyar@iohk.io") + organization.set("IOG") + roles.add("qc") + } + developer { + id.set("antonbaliasnikov") + name.set("Anton Baliasnikov") + email.set("anton.baliasnikov@iohk.io") + organization.set("IOG") + roles.add("qc") + } + developer { + id.set("elribonazo") + name.set("Javier Ribó") + email.set("javier.ribo@iohk.io") + organization.set("IOG") + roles.add("developer") + } + developer { + id.set("goncalo-frade-iohk") + name.set("Gonçalo Frade") + email.set("goncalo.frade@iohk.io") + organization.set("IOG") + roles.add("developer") + } + developer { + id.set("curtis-h") + name.set("Curtis Harding") + email.set("curtis.harding@iohk.io") + organization.set("IOG") + roles.add("developer") + } + developer { + id.set("cristianIOHK") + name.set("Cristian Gonzalez") + email.set("cristian.castro@iohk.io") + organization.set("IOG") + roles.add("developer") + } + developer { + id.set("yshyn-iohk") + name.set("Yurii Shynbuiev") + email.set("yurii.shynbuiev@iohk.io") + organization.set("IOG") + roles.add("developer") + } + } + + scm { + connection.set("scm:git:git://git@github.com/hyperledger/identus-apollo.git") + developerConnection.set("scm:git:ssh://git@github.com/hyperledger/identus-apollo.git") + url.set("https://github.com/hyperledger/identus-apollo") + } + } } -// Configure Dokka tasks uniformly -tasks.withType().configureEach { - moduleName.set(currentModuleName) - moduleVersion.set(rootProject.version.toString()) +npmPublish { + organization.set("amagyar-iohk") + version.set(rootProject.version.toString()) + access.set(NpmAccess.PUBLIC) + packages { + access.set(NpmAccess.PUBLIC) + named("js") { + scope.set("amagyar-iohk") + packageName.set("identus-apollo") + readme.set(rootProject.layout.projectDirectory.file("README.md")) + packageJson { + author { + name.set("IOG") + } + repository { + type.set("git") + url.set("https://github.com/hyperledger-identus/apollo") + } + license.set("Apache-2.0") + } + } + } + registries { + access.set(NpmAccess.PUBLIC) + register("npmjs") { + uri.set("https://registry.npmjs.org") + authToken.set(System.getenv("NPM_TOKEN")) + } + } } diff --git a/apollo/docs/Base64.md b/apollo/docs/Base64.md index f18c1e02e..3581094cc 100644 --- a/apollo/docs/Base64.md +++ b/apollo/docs/Base64.md @@ -4,17 +4,17 @@ Apollo Base64 is Kotlin Multiplatform library containing Standard & URL safe ## Supported Targets -| Platform | Supported | -|------------------------------------------|--------------------| -| iOS x86 64 | :heavy_check_mark: | -| iOS Arm 64 | :heavy_check_mark: | -| iOS Arm 32 | :heavy_check_mark: | -| iOS Simulator Arm 64 (Apple Silicon) | :heavy_check_mark: | -| JVM | :heavy_check_mark: | -| Android | :heavy_check_mark: | -| JS Browser | :heavy_check_mark: | -| NodeJS Browser | :heavy_check_mark: | -| macOS Arm 64 (Apple Silicon) | :heavy_check_mark: | +| Platform | Supported | +|--------------------------------------|-----------| +| iOS x86 64 | ✔ | +| iOS Arm 64 | ✔ | +| iOS Arm 32 | ✔ | +| iOS Simulator Arm 64 (Apple Silicon) | ✔ | +| JVM | ✔ | +| Android | ✔ | +| JS Browser | ✔ | +| NodeJS Browser | ✔ | +| macOS Arm 64 (Apple Silicon) | ✔ | ## Usage diff --git a/apollo/docs/SecureRandom.md b/apollo/docs/SecureRandom.md index 8f0458c1b..63465cb8e 100644 --- a/apollo/docs/SecureRandom.md +++ b/apollo/docs/SecureRandom.md @@ -4,17 +4,17 @@ Apollo Secure Random is Kotlin Multiplatform library to generate secure random b ## Supported Targets -| Platform | Supported | -|------------------------------------------|--------------------| -| iOS x86 64 | :heavy_check_mark: | -| iOS Arm 64 | :heavy_check_mark: | -| iOS Arm 32 | :heavy_check_mark: | -| iOS Simulator Arm 64 (Apple Silicon) | :heavy_check_mark: | -| JVM | :heavy_check_mark: | -| Android | :heavy_check_mark: | -| JS Browser | :heavy_check_mark: | -| NodeJS Browser | :heavy_check_mark: | -| macOS Arm 64 (Apple Silicon) | :heavy_check_mark: | +| Platform | Supported | +|--------------------------------------|-----------| +| iOS x86 64 | ✔ | +| iOS Arm 64 | ✔ | +| iOS Arm 32 | ✔ | +| iOS Simulator Arm 64 (Apple Silicon) | ✔ | +| JVM | ✔ | +| Android | ✔ | +| JS Browser | ✔ | +| NodeJS Browser | ✔ | +| macOS Arm 64 (Apple Silicon) | ✔ | ## Usage diff --git a/apollo/src/commonMain/kotlin/org/hyperledger/identus/apollo/base64/Base64.kt b/apollo/src/commonMain/kotlin/org/hyperledger/identus/apollo/base64/Base64.kt index eaef799ea..85a2e1a33 100644 --- a/apollo/src/commonMain/kotlin/org/hyperledger/identus/apollo/base64/Base64.kt +++ b/apollo/src/commonMain/kotlin/org/hyperledger/identus/apollo/base64/Base64.kt @@ -471,7 +471,7 @@ internal final object Base64 { val bits = src[sp0++].toInt() and 0xff shl 16 or ( src[sp0++].toInt() and 0xff shl 8 - ) or + ) or (src[sp0++].toInt() and 0xff) dst[dp0++] = base64[bits ushr 18 and 0x3f].code.toByte() dst[dp0++] = base64[bits ushr 12 and 0x3f].code.toByte() diff --git a/apollo/src/commonMain/kotlin/org/hyperledger/identus/apollo/securerandom/SecureRandom.kt b/apollo/src/commonMain/kotlin/org/hyperledger/identus/apollo/securerandom/SecureRandom.kt index c5de273f8..459549950 100644 --- a/apollo/src/commonMain/kotlin/org/hyperledger/identus/apollo/securerandom/SecureRandom.kt +++ b/apollo/src/commonMain/kotlin/org/hyperledger/identus/apollo/securerandom/SecureRandom.kt @@ -5,19 +5,19 @@ package org.hyperledger.identus.apollo.securerandom */ expect class SecureRandom /** - * The SecureRandom class provides a platform-specific implementation for generating secure random numbers. - * - * @constructor Creates an instance of SecureRandom with an optional seed value. - * @param seed The seed value used for initializing the random number generator. - */ - constructor( - seed: ByteArray = ByteArray(0) - ) : org.hyperledger.identus.apollo.securerandom.SecureRandomInterface { - val seed: ByteArray + * The SecureRandom class provides a platform-specific implementation for generating secure random numbers. + * + * @constructor Creates an instance of SecureRandom with an optional seed value. + * @param seed The seed value used for initializing the random number generator. + */ +constructor( + seed: ByteArray = ByteArray(0) +) : org.hyperledger.identus.apollo.securerandom.SecureRandomInterface { + val seed: ByteArray - override fun nextBytes(size: Int): ByteArray + override fun nextBytes(size: Int): ByteArray - companion object : SecureRandomStaticInterface { - override fun generateSeed(numBytes: Int): ByteArray - } + companion object : SecureRandomStaticInterface { + override fun generateSeed(numBytes: Int): ByteArray } +} diff --git a/apollo/src/nativeInterop/cinterop/IOHKCryptoKit.def b/apollo/src/nativeInterop/cinterop/IOHKCryptoKit.def index 6b85d1876..489a11633 100644 --- a/apollo/src/nativeInterop/cinterop/IOHKCryptoKit.def +++ b/apollo/src/nativeInterop/cinterop/IOHKCryptoKit.def @@ -12,8 +12,8 @@ libraryPaths.macos_x64 = ../iOSLibs/IOHKCryptoKit/build/Release/ libraryPaths.macos_arm64 = ../iOSLibs/IOHKCryptoKit/build/Release/ linkerOpts = -L/usr/lib/swift -linkerOpts.ios_x64 = -ld64 -ios_simulator_version_min 15.6.0 -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ -linkerOpts.ios_arm64 = -ios_version_min 15.6.0 -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/ +linkerOpts.ios_x64 = -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ +linkerOpts.ios_arm64 = -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/ linkerOpts.ios_simulator_arm64 = -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ -linkerOpts.macos_x64 = -macosx_version_min 13.5.0 -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/ -linkerOpts.macos_arm64 = -macosx_version_min 13.5.0 -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/ +linkerOpts.macos_x64 = -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/ +linkerOpts.macos_arm64 = -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/ diff --git a/apollo/src/nativeInterop/cinterop/IOHKSecureRandomGeneration.def b/apollo/src/nativeInterop/cinterop/IOHKSecureRandomGeneration.def index 980185931..75465b8b9 100644 --- a/apollo/src/nativeInterop/cinterop/IOHKSecureRandomGeneration.def +++ b/apollo/src/nativeInterop/cinterop/IOHKSecureRandomGeneration.def @@ -12,8 +12,8 @@ libraryPaths.macos_x64 = ../iOSLibs/IOHKSecureRandomGeneration/build/Release/ libraryPaths.macos_arm64 = ../iOSLibs/IOHKSecureRandomGeneration/build/Release/ linkerOpts = -L/usr/lib/swift -linkerOpts.ios_x64 = -ld64 -ios_simulator_version_min 15.6.0 -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ -linkerOpts.ios_arm64 = -ios_version_min 15.6.0 -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/ +linkerOpts.ios_x64 = -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ +linkerOpts.ios_arm64 = -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/ linkerOpts.ios_simulator_arm64 = -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ -linkerOpts.macos_x64 = -macosx_version_min 13.5.0 -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/ -linkerOpts.macos_arm64 = -macosx_version_min 13.5.0 -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/ +linkerOpts.macos_x64 = -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/ +linkerOpts.macos_arm64 = -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/ diff --git a/bip32-ed25519/build.gradle.kts b/bip32-ed25519/build.gradle.kts index a244bbb81..a507ad615 100644 --- a/bip32-ed25519/build.gradle.kts +++ b/bip32-ed25519/build.gradle.kts @@ -1,16 +1,14 @@ -import com.android.build.gradle.tasks.MergeSourceSetFolders import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.dsl.JvmTarget -import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackOutput -import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile plugins { alias(libs.plugins.kotlin.multiplatform) - alias(libs.plugins.android.library) + alias(libs.plugins.android.kotlin.multiplatform.library) + alias(libs.plugins.maven.publish) + alias(libs.plugins.kover) apply false // https://github.com/Kotlin/kotlinx-kover/issues/747 } -project.description = "Identus Bip32 HD Keys in Ed25519" val appleBinaryName = "ApolloLibrary" val rustModuleDir = layout.projectDirectory.dir("rust-ed25519-bip32") val wrapperDir = rustModuleDir.dir("wrapper") @@ -20,24 +18,65 @@ val wrapperOutputDir = wrapperDir.dir("build/generated") val wasmOutputDir = wasmDir.dir("build") val currentModuleName: String = "Bip32Ed25519" -val generatedResourcesDir = - project.layout.buildDirectory.asFile - .get() - .resolve("generatedResources") -val generatedJvmLibsDirs = - listOf( - generatedResourcesDir.resolve("jvmMain/libs/darwin-aarch64"), - generatedResourcesDir.resolve("jvmMain/libs/linux-aarch64"), - generatedResourcesDir.resolve("jvmMain/libs/darwin-x86-64"), - generatedResourcesDir.resolve("jvmMain/libs/linux-x86-64") +tasks.register("copyGeneratedKotlin") { + group = "rust" + description = "Copies Rust-generated Kotlin wrappers." + duplicatesStrategy = DuplicatesStrategy.INCLUDE + dependsOn("buildRustWrapper") + dependsOn("prepareAndroidMainArtProfile") + from(wrapperOutputDir) + into(layout.buildDirectory.dir("generated")) +} + +tasks.register("copyNativeLibs") { + group = "rust" + description = "Copies native Rust binaries into architecture-specific subdirectories." + dependsOn("buildRustWrapper") + + inputs.dir(wrapperDir.dir("target")) + outputs.dir(layout.buildDirectory.dir("generatedResources")) + + // Set the main destination directory for the whole task here + into(layout.buildDirectory.dir("generatedResources")) + + val archMapping = mapOf( + "x86_64-unknown-linux-gnu" to "linux-x86-64", + "aarch64-unknown-linux-gnu" to "linux-aarch64", + "aarch64-apple-darwin" to "darwin-aarch64", + "x86_64-apple-darwin" to "darwin-x86-64" + ) + val targetDirs = mapOf( + "jvmMain" to listOf("x86_64-apple-darwin", "aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu"), + "androidMain" to listOf("aarch64-linux-android", "x86_64-linux-android", "i686-linux-android", "armv7-linux-androideabi"), + "macosArm64Main" to listOf("aarch64-apple-darwin"), + "macosX64Main" to listOf("x86_64-apple-darwin"), + "iosX64Main" to listOf("x86_64-apple-ios"), + "iosSimulatorArm64Main" to listOf("aarch64-apple-ios-sim"), + "iosArm64Main" to listOf("aarch64-apple-ios") ) + targetDirs.forEach { (target, architectures) -> + architectures.forEach { archDir -> + val outputArchDir = archMapping[archDir] ?: archDir + from(wrapperDir.dir("target/$archDir/release")) { + include("*.so", "*.dylib", "*.a") + into("$target/libs/$outputArchDir") + } + } + } +} + +val copyGeneratedKotlinProvider = tasks.named("copyGeneratedKotlin") +val copyNativeLibsProvider = tasks.named("copyNativeLibs") + kotlin { jvm { withSourcesJar() compilations.all { - compilerOptions.configure { - jvmTarget.set(JvmTarget.JVM_17) + compileTaskProvider.configure { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) + } } } @@ -45,16 +84,15 @@ kotlin { useJUnitPlatform() systemProperty( "jna.library.path", - generatedJvmLibsDirs.joinToString(File.pathSeparator) { it.absolutePath } + copyNativeLibsProvider.map { it.outputs.files.asPath } ) - jvmArgs("-Djava.library.path=${generatedJvmLibsDirs.joinToString(File.pathSeparator) { it.absolutePath }}") } } - - androidTarget { - publishLibraryVariants("release", "debug") + androidLibrary { + namespace = "org.hyperledger.identus.apollo.bip32ed25519" + compileSdk = libs.versions.android.compileSdk.get().toInt() + minSdk = libs.versions.android.minSdk.get().toInt() } - iosArm64 { binaries.framework { baseName = appleBinaryName @@ -75,6 +113,11 @@ kotlin { baseName = appleBinaryName } } + macosX64 { + binaries.framework { + baseName = appleBinaryName + } + } js(IR) { this.binaries.library() this.useCommonJs() @@ -92,8 +135,9 @@ kotlin { } nodejs { testTask { - useKarma { - useChromeHeadless() + // Use Mocha for Node.js tests + useMocha { + timeout = "30s" } } } @@ -103,86 +147,65 @@ kotlin { compilerOptions { freeCompilerArgs.add("-opt-in=kotlin.js.ExperimentalJsExport") } - + applyDefaultHierarchyTemplate() sourceSets { - // Keep CommonMain without Uniffi-generated code val commonMain by getting { + // Keep CommonMain without Uniffi-generated code dependencies { implementation(libs.atomicfu) implementation(libs.serialization.json) implementation(libs.okio) } + resources.srcDir(copyGeneratedKotlinProvider.map { it.destinationDir.resolve("commonMain/baselineProfiles") }) } - val commonTest by getting { dependencies { implementation(kotlin("test")) } } - - // New sourceSet for Uniffi-enabled targets val uniffiMain by creating { + // New sourceSet for Uniffi-enabled targets dependsOn(commonMain) - kotlin.srcDir(layout.buildDirectory.dir("generated/commonMain/kotlin")) + kotlin.srcDir(copyGeneratedKotlinProvider.map { it.destinationDir.resolve("commonMain/kotlin") }) } - val uniffiTest by creating { dependsOn(commonTest) } - - // JVM, Android, Native all use Uniffi - val jvmMain by getting { + jvmMain { dependsOn(uniffiMain) kotlin.srcDir(layout.buildDirectory.dir("generated/jvmMain/kotlin")) - - val generatedResources = - project.layout.buildDirectory.asFile - .get() - .resolve("generatedResources") - .resolve("jvmMain") - .resolve("libs") - resources.srcDir(generatedResources) - + resources.srcDir(copyNativeLibsProvider.map { it.outputs.files.first().resolve("jvmMain/libs") }) dependencies { implementation(libs.jna) } } - - val jvmTest by getting { + jvmTest { dependsOn(uniffiTest) dependencies { implementation(libs.bignum) implementation(libs.junit) } } - - val androidMain by getting { + androidMain { dependsOn(uniffiMain) kotlin.srcDir(layout.buildDirectory.dir("generated/androidMain/kotlin")) + resources.srcDir(copyGeneratedKotlinProvider.map { it.destinationDir.resolve("androidMain/baselineProfiles") }) dependencies { - implementation("net.java.dev.jna:jna:5.13.0@aar") + implementation("net.java.dev.jna:jna:5.13.0") } } - - val nativeMain by creating { + nativeMain { dependsOn(uniffiMain) kotlin.srcDir(layout.buildDirectory.dir("generated/nativeMain/kotlin")) } - - val iosArm64Main by getting { dependsOn(nativeMain) } - val iosX64Main by getting { dependsOn(nativeMain) } - val iosSimulatorArm64Main by getting { dependsOn(nativeMain) } - val macosArm64Main by getting { dependsOn(nativeMain) } - - // JS Main is separate and does NOT depend on Uniffi code - val jsMain by getting { + jsMain { + // JS Main is separate and does NOT depend on Uniffi code dependencies { implementation(npm("@noble/hashes", "1.3.1")) implementation(libs.kotlin.web) implementation(libs.kotlin.node) } } - all { languageSettings { optIn("kotlin.RequiresOptIn") @@ -193,78 +216,26 @@ kotlin { targets.withType().configureEach { val currentTarget = this.name - // Mapping of Kotlin Native targets to their corresponding Rust architecture directories - val archMapping = - mapOf( - "macosArm64" to "darwin-aarch64", - "iosX64" to "x86_64-apple-ios", - "iosArm64" to "aarch64-apple-ios", - "iosSimulatorArm64" to "aarch64-apple-ios-sim" - ) - - val rustArch = - archMapping[currentTarget] - ?: error("Unsupported target $currentTarget for Rust arch mapping.") + val archMapping = mapOf( + "macosArm64" to "darwin-aarch64", + "iosX64" to "x86_64-apple-ios", + "iosArm64" to "aarch64-apple-ios", + "iosSimulatorArm64" to "aarch64-apple-ios-sim", + "macosX64" to "darwin-x86-64" + ) + val rustArch = archMapping[currentTarget] ?: error("Unsupported target $currentTarget for Rust arch mapping.") compilations["main"].cinterops.create("ed25519_bip32_wrapper") { - val interopDir = - layout.buildDirectory - .dir("generated/nativeInterop/cinterop/headers/ed25519_bip32_wrapper") - .get() - .asFile - - val nativeLibDir = - layout.buildDirectory - .dir("generatedResources/${currentTarget}Main/libs/$rustArch") - .get() - .asFile - + val interopDir = layout.buildDirectory.dir("generated/nativeInterop/cinterop/headers/ed25519_bip32_wrapper").get().asFile + val nativeLibDir = copyNativeLibsProvider.get().outputs.files.first().resolve("${currentTarget}Main/libs/$rustArch") packageName("ed25519_bip32_wrapper.cinterop") - header(interopDir.resolve("ed25519_bip32_wrapper.h")) - - defFile(project.file("src/nativeInterop/cinterop/ed25519_bip32_wrapper.def")) - + val defFileObject = layout.projectDirectory.file("src/nativeInterop/cinterop/ed25519_bip32_wrapper.def") + defFile(defFileObject.asFile) compilerOpts("-I${interopDir.absolutePath}") - - extraOpts( - "-libraryPath", - nativeLibDir.absolutePath, - "-staticLibrary", - "libuniffi_ed25519_bip32_wrapper.a" - ) - - tasks[interopProcessingTaskName].dependsOn("prepareRustLibs") - } - } -} - -// === Group: Android Setup === -android { - namespace = "org.hyperledger.identus.apollo.bip32ed25519" - compileSdk = 34 - - defaultConfig { - minSdk = 21 - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - lint { - disable += "NewApi" - checkGeneratedSources = false - abortOnError = false - } - - publishing { - multipleVariants { - withSourcesJar() - withJavadocJar() - allVariants() + extraOpts("-libraryPath", nativeLibDir.absolutePath, "-staticLibrary", "libuniffi_ed25519_bip32_wrapper.a") + tasks[interopProcessingTaskName].dependsOn("assembleRustLibs") } } } @@ -273,7 +244,7 @@ android { tasks.register("buildRustWrapper") { group = "build" description = "Builds Rust binaries for Kotlin multiplatform." - workingDir(wrapperDir) + workingDir = wrapperDir.asFile commandLine("bash", "./build-kotlin-library.sh") inputs.file(wrapperDir.file("build-kotlin-library.sh")) outputs.dirs(wrapperDir.dir("target"), wrapperOutputDir) @@ -285,234 +256,103 @@ tasks.register("buildRustWasm") { workingDir = wasmDir.asFile commandLine("./build_kotlin_library.sh") inputs.file(wasmDir.file("build_kotlin_library.sh")) + inputs.dir(wasmDir.dir("src")) + inputs.file(wasmDir.file("Cargo.toml")) outputs.dir(wasmOutputDir) } -tasks.register("copyGeneratedKotlin") { - group = "rust" - description = "Copies Rust-generated Kotlin wrappers." - duplicatesStrategy = DuplicatesStrategy.INCLUDE - dependsOn("buildRustWrapper") - from(wrapperOutputDir) - into(layout.buildDirectory.dir("generated")) -} - -tasks.register("copyWasmOutput") { - group = "rust" - description = "Copies Rust-generated Wasm." - dependsOn("buildRustWasm") - duplicatesStrategy = DuplicatesStrategy.INCLUDE - from(wasmOutputDir) - into( - rootDir - .resolve("build") - .resolve("js") - .resolve("packages") - .resolve("Apollo") - .resolve("kotlin") - ) -} - -tasks.register("copyWasmOutputTest") { - group = "rust" - description = "Copies Rust-generated Wasm for testing." - dependsOn("buildRustWasm") - duplicatesStrategy = DuplicatesStrategy.INCLUDE - from(wasmOutputDir) - into( - rootDir - .resolve("build") - .resolve("js") - .resolve("packages") - .resolve("Apollo-test") - .resolve("kotlin") - ) -} - -tasks.register("copyNativeLibs") { - group = "rust" - description = "Copies native Rust binaries into architecture-specific subdirectories." - dependsOn("buildRustWrapper") - - val archMapping = - mapOf( - "x86_64-unknown-linux-gnu" to "linux-x86-64", - "aarch64-unknown-linux-gnu" to "linux-aarch64", - "aarch64-apple-darwin" to "darwin-aarch64", - "x86_64-apple-darwin" to "darwin-x86-64" - ) - - val targetDirs = - mapOf( - "jvmMain" to - listOf( - "x86_64-apple-darwin", - "aarch64-apple-darwin", - "aarch64-unknown-linux-gnu", - "x86_64-unknown-linux-gnu" - ), - "androidMain" to - listOf( - "aarch64-linux-android", - "x86_64-linux-android", - "i686-linux-android", - "armv7-linux-androideabi" - ), - "macosArm64Main" to listOf("aarch64-apple-darwin"), - "macosX64Main" to listOf("x86_64-apple-darwin"), - "iosX64Main" to listOf("x86_64-apple-ios"), - "iosSimulatorArm64Main" to listOf("aarch64-apple-ios-sim"), - "iosArm64Main" to listOf("aarch64-apple-ios") - ) - - inputs.dir(wrapperDir.dir("target")) - outputs.dir(layout.buildDirectory.dir("generatedResources")) - - doLast { - targetDirs.forEach { (target, architectures) -> - architectures.forEach { archDir -> - val outputArchDir = archMapping[archDir] ?: archDir - val outputDir = layout.buildDirectory.dir("generatedResources/$target/libs/$outputArchDir") - copy { - from(wrapperDir.dir("target/$archDir/release")) - into(outputDir) - include("*.so", "*.dylib", "*.a") - } - } - } - } -} - -tasks.register("prepareRustLibs") { +tasks.register("assembleRustLibs") { group = "rust" description = "Aggregate task for building Rust wrappers and copying outputs." dependsOn( "buildRustWrapper", "buildRustWasm", "copyGeneratedKotlin", - "copyWasmOutput", - "copyWasmOutputTest", "copyNativeLibs" ) } -// === Group: Main Lifecycle Tasks === -listOf( - "assemble", - "build", - "prepareAndroidMainArtProfile", - "jvmProcessResources", - "jsProcessResources", - "iosArm64SourcesJar", - "iosSimulatorArm64SourcesJar", - "iosX64SourcesJar", - "jvmSourcesJar", - "macosArm64SourcesJar" -).forEach { - if (tasks.findByName(it) != null) { - tasks.named(it).configure { - dependsOn("prepareRustLibs", "copyGeneratedKotlin") +mavenPublishing { + val shouldAutoRelease = project.findProperty("autoRelease")?.toString()?.toBoolean() ?: false + publishToMavenCentral(automaticRelease = shouldAutoRelease) + signAllPublications() + coordinates(group.toString(), "bip32-ed25519", rootProject.version.toString()) + pom { + name.set("Identus bip32-ed25519") + description.set("Identus Bip32 HD Keys in Ed25519.") + url.set("https://hyperledger-identus.github.io/docs/") + organization { + name.set("Hyperledger") + url.set("https://www.hyperledger.org/") } - } -} - -// === Group: Kotlin Compilation Tasks === -tasks.withType().configureEach { - dependsOn("prepareRustLibs") -} - -tasks.withType().configureEach { - dependsOn("prepareRustLibs") -} - -tasks.withType().configureEach { - dependsOn("prepareRustLibs") - compilerOptions { - target = "es2015" - } -} - -tasks.withType().configureEach { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_17) - freeCompilerArgs.add("-opt-in=kotlin.ExperimentalStdlibApi") - } -} - -// === Group: Packaging and Assets Tasks === -tasks - .matching { - val name = it.name - name.startsWith("package") && - name.endsWith("Resources") || - name.startsWith("package") && - name.endsWith("Assets") || - name.startsWith("extractDeepLinksForAar") || - name.startsWith("packageDebugAssets") || - name.startsWith("mergeReleaseResources") - }.configureEach { - dependsOn("prepareRustLibs") - } - -tasks.withType().configureEach { - dependsOn("copyGeneratedKotlin") -} - -tasks.withType().configureEach { - dependsOn("copyGeneratedKotlin") -} - -tasks.matching { it.name.endsWith("SourcesJar") }.configureEach { - dependsOn("copyGeneratedKotlin") -} - -tasks.matching { it.name.endsWith("sourcesJar") }.configureEach { - dependsOn("copyGeneratedKotlin") -} -// === Group: KtLint Tasks === -tasks.withType().configureEach { - dependsOn("prepareRustLibs") -} - -val tasksPublishingDisabled = - listOf( - "publishIosX64PublicationToSonatypeRepository", - "publishIosArm64PublicationToSonatypeRepository", - "publishIosSimulatorArm64PublicationToSonatypeRepository", - "publishMacosArm64PublicationToSonatypeRepository", - "publishJsPublicationToSonatypeRepository", - "publishIosX64PublicationToMavenCentralRepository", - "publishIosArm64PublicationToMavenCentralRepository", - "publishIosSimulatorArm64PublicationToMavenCentralRepository", - "publishMacosArm64PublicationToMavenCentralRepository", - "publishJsPublicationToMavenCentralRepository", - "publishIosX64PublicationToMavenLocalRepository", - "publishIosArm64PublicationToMavenLocalRepository", - "publishIosSimulatorArm64PublicationToMavenLocalRepository", - "publishMacosArm64PublicationToMavenLocalRepository", - "publishJsPublicationToMavenLocalRepository" - ) - -tasksPublishingDisabled.forEach { - if (tasks.findByName(it) != null) { - tasks.named(it).configure { - this.enabled = false + licenses { + license { + name.set("The Apache License, Version 2.0") + url.set("https://www.apache.org/licenses/LICENSE-2.0.txt") + } } - } -} - -if (tasks.findByName("publishAndroidDebugPublicationToSonatypeRepository") != null) { - tasks.named("publishAndroidDebugPublicationToSonatypeRepository").configure { - listOf( - ":apollo:signJvmPublication", - ":apollo:signMacosArm64Publication", - ":apollo:signKotlinMultiplatformPublication", - ":apollo:signJsPublication", - ":apollo:signIosX64Publication" - ).forEach { - if (tasks.findByName(it) != null) { - dependsOn(it) + developers { + developer { + id.set("hamada147") + name.set("Ahmed Moussa") + email.set("ahmed.moussa@iohk.io") + organization.set("IOG") + roles.add("developer") + } + developer { + id.set("amagyar-iohk") + name.set("Allain Magyar") + email.set("allain.magyar@iohk.io") + organization.set("IOG") + roles.add("qc") + } + developer { + id.set("antonbaliasnikov") + name.set("Anton Baliasnikov") + email.set("anton.baliasnikov@iohk.io") + organization.set("IOG") + roles.add("qc") + } + developer { + id.set("elribonazo") + name.set("Javier Ribó") + email.set("javier.ribo@iohk.io") + organization.set("IOG") + roles.add("developer") + } + developer { + id.set("goncalo-frade-iohk") + name.set("Gonçalo Frade") + email.set("goncalo.frade@iohk.io") + organization.set("IOG") + roles.add("developer") } + developer { + id.set("curtis-h") + name.set("Curtis Harding") + email.set("curtis.harding@iohk.io") + organization.set("IOG") + roles.add("developer") + } + developer { + id.set("cristianIOHK") + name.set("Cristian Gonzalez") + email.set("cristian.castro@iohk.io") + organization.set("IOG") + roles.add("developer") + } + developer { + id.set("yshyn-iohk") + name.set("Yurii Shynbuiev") + email.set("yurii.shynbuiev@iohk.io") + organization.set("IOG") + roles.add("developer") + } + } + scm { + connection.set("scm:git:git://git@github.com/hyperledger/identus-apollo.git") + developerConnection.set("scm:git:ssh://git@github.com/hyperledger/identus-apollo.git") + url.set("https://github.com/hyperledger/identus-apollo") } } } diff --git a/build.gradle.kts b/build.gradle.kts index 2e9836582..070e1954a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,150 +1,17 @@ -import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension -import java.util.Locale - plugins { - alias(libs.plugins.dokka) - alias(libs.plugins.ktlint) - alias(libs.plugins.kover) - alias(libs.plugins.nexus.publish) - alias(libs.plugins.android.library) apply false alias(libs.plugins.kotlin.multiplatform) apply false + alias(libs.plugins.android.kotlin.multiplatform.library) apply false + alias(libs.plugins.maven.publish) apply false + alias(libs.plugins.kover) apply false + alias(libs.plugins.dokka) apply false + alias(libs.plugins.ktlint) } -group = "org.hyperledger.identus" - -allprojects { - group = rootProject.group - - repositories { - google() - mavenCentral() - } - - rootProject.plugins.withType { - rootProject.the().reportNewYarnLock = true - rootProject.the().yarnLockAutoReplace = true - } -} +group = "dev.allain" subprojects { - if (project.name == "apollo" || project.name == "bip32-ed25519") { - apply(plugin = "com.vanniktech.maven.publish") - - mavenPublishing { - publishToMavenCentral() - signAllPublications() - - val effectiveDescription = - when { - !project.description.isNullOrBlank() -> project.description - project.name == "apollo" -> "Collection of cryptographic methods used across Identus platform." - project.name == "bip32-ed25519" -> "Identus Bip32 HD Keys in Ed25519" - else -> "Identus Library" - } - - pom { - name.set( - "Identus " + - project - .name - .replaceFirstChar { - if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() - } - ) - description.set(effectiveDescription) - url.set("https://docs.atalaprism.io/") - - organization { - name.set("Hyperledger") - url.set("https://www.hyperledger.org/") - } - - licenses { - license { - name.set("The Apache License, Version 2.0") - url.set("https://www.apache.org/licenses/LICENSE-2.0.txt") - } - } - - developers { - developer { - id.set("hamada147") - name.set("Ahmed Moussa") - email.set("ahmed.moussa@iohk.io") - organization.set("IOG") - roles.add("developer") - } - developer { - id.set("amagyar-iohk") - name.set("Allain Magyar") - email.set("allain.magyar@iohk.io") - organization.set("IOG") - roles.add("qc") - } - developer { - id.set("antonbaliasnikov") - name.set("Anton Baliasnikov") - email.set("anton.baliasnikov@iohk.io") - organization.set("IOG") - roles.add("qc") - } - developer { - id.set("elribonazo") - name.set("Javier Ribó") - email.set("javier.ribo@iohk.io") - organization.set("IOG") - roles.add("developer") - } - developer { - id.set("goncalo-frade-iohk") - name.set("Gonçalo Frade") - email.set("goncalo.frade@iohk.io") - organization.set("IOG") - roles.add("developer") - } - developer { - id.set("curtis-h") - name.set("Curtis Harding") - email.set("curtis.harding@iohk.io") - organization.set("IOG") - roles.add("developer") - } - developer { - id.set("cristianIOHK") - name.set("Cristian Gonzalez") - email.set("cristian.castro@iohk.io") - organization.set("IOG") - roles.add("developer") - } - developer { - id.set("yshyn-iohk") - name.set("Yurii Shynbuiev") - email.set("yurii.shynbuiev@iohk.io") - organization.set("IOG") - roles.add("developer") - } - } - - scm { - connection.set("scm:git:git://git@github.com/hyperledger/identus-apollo.git") - developerConnection.set("scm:git:ssh://git@github.com/hyperledger/identus-apollo.git") - url.set("https://github.com/hyperledger/identus-apollo") - } - } - } - } else { - // Explicitly disable publishing tasks for other modules - tasks.withType().configureEach { - enabled = false - } - tasks.withType().configureEach { - enabled = false - } - } - + group = rootProject.group apply(plugin = "org.jlleitschuh.gradle.ktlint") - apply(plugin = "org.jetbrains.kotlinx.kover") - ktlint { verbose.set(true) outputToConsole.set(true) @@ -153,69 +20,6 @@ subprojects { exclude { it.file.path.contains("generated") } } } - - koverReport { - filters { - excludes { - classes("org.hyperledger.identus.apollo.utils.bip39.wordlists.*") - } - } - } -} - -/** - * The `javadocJar` variable is used to register a `Jar` task to generate a Javadoc JAR file. - * The Javadoc JAR file is created with the classifier "javadoc" and it includes the HTML documentation generated - * by the `dokkaHtml` task. - */ -val javadocJar by tasks.registering(Jar::class) { - archiveClassifier.set("javadoc") - from(tasks.dokkaHtml) -} - -if (tasks.findByName(":apollo:publishAndroidDebugPublicationToSonatypeRepository") != null) { - tasks.named(":apollo:publishAndroidDebugPublicationToSonatypeRepository").configure { - dependsOn(":apollo:signAndroidReleasePublication") - } -} - -listOf( - ":bip32-ed25519:androidDebugSourcesJar" -).forEach { - if (tasks.findByName(it) != null) { - tasks.named(it).configure { - dependsOn(":bip32-ed25519:copyGeneratedKotlin") - } - } -} - -if (tasks.findByName(":bip32-ed25519:publishAndroidDebugPublicationToSonatypeRepository") != null) { - tasks.named(":bip32-ed25519:publishAndroidDebugPublicationToSonatypeRepository").configure { - listOf( - ":apollo:signJvmPublication", - ":apollo:signMacosArm64Publication", - ":apollo:signKotlinMultiplatformPublication", - ":apollo:signJsPublication", - ":apollo:signIosX64Publication" - ).forEach { - if (tasks.findByName(it) != null) { - dependsOn(it) - } - } - } -} - -listOf( - ":apollo:signMacosArm64Publication", - ":apollo:signKotlinMultiplatformPublication", - ":apollo:signJsPublication", - ":apollo:signIosX64Publication", -).forEach { - if (tasks.findByName(it) != null) { - tasks.named(it).configure { - enabled = false - } - } } tasks.wrapper { diff --git a/gradle.properties b/gradle.properties index 833a90ba6..76bb40536 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,10 +1,21 @@ -version = 1.7.5 -org.gradle.jvmargs = -Xmx3072M -Dkotlin.daemon.jvm.options="-Xmx3072M" -kotlin.code.style = official -android.useAndroidX = true +version = 2.2.1 + +# Gradle +org.gradle.jvmargs=-Xmx4096M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx4096M" +org.gradle.caching=true +org.gradle.configuration-cache=true + +# Kotlin +kotlin.code.style=official kotlin.jvm.target = 17 -kotlin.mpp.enableCInteropCommonization = true kotlin.native.cacheKind.iosSimulatorArm64 = none kotlin.native.cacheKind.iosX64 = none kotlin.native.cacheKind.iosArm64 = none kotlin.native.cacheKind.macosArm64 = none + +# MPP +kotlin.mpp.enableCInteropCommonization=true + +# Android +android.useAndroidX=true +android.nonTransitiveRClass=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c947d117a..6dcf7967f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,13 +1,15 @@ [versions] kotlin = "2.2.0" -android-gradle-plugin = "8.10.0" +agp = "8.11.0" dokka = "1.9.20" ktlint = "12.3.0" -kover = "0.7.5" -nexus-publish = "0.33.0" +kover = "0.9.1" +vanniktech-maven-publish = "0.33.0" npm-publish = "3.5.3" swiftpackage = "2.2.4" secp256k1-kmp = "0.16.0" +android-minSdk = "24" +android-compileSdk = "34" [libraries] serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.6.3" } @@ -25,15 +27,16 @@ secp256k1-kmp = { module = "fr.acinq.secp256k1:secp256k1-kmp", version.ref = "se secp256k1-kmp-jvm = { module = "fr.acinq.secp256k1:secp256k1-kmp-jni-jvm", version.ref = "secp256k1-kmp"} guava = { module = "com.google.guava:guava", version = "30.1-jre" } jna = { module = "net.java.dev.jna:jna", version = "5.13.0"} -jna-android = { module = "net.java.dev.jna:jna", version = "5.13.0@aar"} +jna-android = { module = "net.java.dev.jna:jna", version = "5.13.0"} secp256k1-kmp-android = { module = "fr.acinq.secp256k1:secp256k1-kmp-jni-android", version.ref = "secp256k1-kmp"} +kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } [plugins] kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } -android-library = { id = "com.android.library", version.ref = "android-gradle-plugin" } +android-kotlin-multiplatform-library = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" } dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" } kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" } -nexus-publish = { id = "com.vanniktech.maven.publish", version.ref = "nexus-publish" } +maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktech-maven-publish" } npm-publish = { id = "dev.petuska.npm.publish", version.ref = "npm-publish" } -swiftpackage = { id = "io.github.luca992.multiplatform-swiftpackage", version.ref = "swiftpackage" } \ No newline at end of file +swiftpackage = { id = "io.github.luca992.multiplatform-swiftpackage", version.ref = "swiftpackage" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 9bbc975c742b298b441bfb90dbc124400a3751b9..1b33c55baabb587c669f562ae36f953de2481846 100644 GIT binary patch delta 642 zcmdmamFde>rVZJA^}0Q$xegf!xPEW^+5YDM%iT2bEgct9o+jH~+sJas#HZ=szO|** z=Pj=X_vx?W&DSwKck|WWn~hffsvnQ+42*W$b7b0$SCcOoZ`{W{^$^pk;4>8-A*-)$ z?n(Po`1$6Jn_u?t-L+tsPyZ2#X}8T6OS8pAU;kdgd+_Hw4z4TW0p9E!T+=f7-c&O% zFic^X{7^$?^Ho04eona9n#mGMxKhA=~8B%JN`M zMhm5wc-2v)$``sY$!Q`9xiU@DhI73ZxiGEKg>yIPs)NmWwMdF-ngLXpZSqV5ez36n zVkxF2rjrjWR+_xr6e6@_u@s~2uv{9vi*1pj2)BjFD+-%@&pRVP1f{O1glxTOp2-62Ph;v z`N1+vCd)9ea)af*Ol1*JCfnp$%Uu}%OuoN7g2}3C@`L5FlP#(sA=|h@iixuZC?qp^ z=L$=v$ZoI}|87Wh=&h7udff{aieKr*l+zDp?pf)_bbRvUf>kn;HCDMXNlgbbo!QRK I1x7am0No)LiU0rr delta 584 zcmexzm1*ZyrVZJAexH5Moc8h7)w{^+t*dqJ%=yhh23L$9JpFV=_k`zJ-?Q4DI*eSe z+ES)HSrVnWLtJ&)lO%hRkV9zl5qqWRt0e;bb zPPo`)y?HTAyZI&u&X<|2$FDHCf4;!v8}p=?Tm`^F0`u(|1ttf~&t$qP3KUSD>@TJQ zRwJ}Pim6NzEc8KA6)e;S6gs8=7IIL8sQL*MYEuRYO;Uj<%3UbMbV&^&!Zvx+LKmjT z8Zch6rYP7Tw?$Hn(UTJwWiS=$f{lB(C=e*%usDV})0AQIK~sat=ND@+Gg*Pyij!rR z*fa02W|%BsV++>4W{DKDGSIUEHd2$P+8ct!RF+CHDowUuTEZOZ%rJSQv*qOXOSPDN zT|sP-$p*_3ncsWB*qoD7JQcyZ9xan%cJP6Tb4-?AZpr*F6v98hoNaPJm@HV`yya5N z))6pqFXn@}P(3T0nEzM8*c_9KtE9o|_pFd&K35GBXP^9Kg(b6GH-z8S4GDzIl~T+b zdLd#meKKHu$5u))8cu$=GKINkGDPOUD)!0$C(BH(U!}!-e;Q0ok8Sc?V1zRO04>ts AA^-pY diff --git a/gradlew b/gradlew index faf93008b..23d15a936 100755 --- a/gradlew +++ b/gradlew @@ -114,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 9b42019c7..5eed7ee84 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,11 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/iOSLibs/IOHKAES/IOHKAES.podspec b/iOSLibs/IOHKAES/IOHKAES.podspec index 24b042350..931b805cd 100644 --- a/iOSLibs/IOHKAES/IOHKAES.podspec +++ b/iOSLibs/IOHKAES/IOHKAES.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| DESC s.license = 'MIT' - s.homepage = 'https://github.com/input-output-hk/atala-prism-apollo' + s.homepage = 'https://github.com/hyperledger-identus/apollo' s.author = { 'Ahmed Moussa' => 'moussa.ahmed95@gmail.com' } s.source = { :git => 'https://github.com/hyperledger/identus-apollo.git', :tag => s.version.to_s } s.swift_version = '5.9' diff --git a/iOSLibs/IOHKAES/IOHKAES.xcodeproj/project.pbxproj b/iOSLibs/IOHKAES/IOHKAES.xcodeproj/project.pbxproj index 8795b142e..1e915db51 100644 --- a/iOSLibs/IOHKAES/IOHKAES.xcodeproj/project.pbxproj +++ b/iOSLibs/IOHKAES/IOHKAES.xcodeproj/project.pbxproj @@ -456,7 +456,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = io.iohk.atala.prism.apollo.IOHKAES; + PRODUCT_BUNDLE_IDENTIFIER = org.hyperledger.identus.apollo.IOHKAES; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = auto; SKIP_INSTALL = YES; @@ -494,7 +494,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = io.iohk.atala.prism.apollo.IOHKAES; + PRODUCT_BUNDLE_IDENTIFIER = org.hyperledger.identus.apollo.IOHKAES; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = auto; SKIP_INSTALL = YES; @@ -525,7 +525,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = io.iohk.atala.prism.apollo.IOHKAESTests; + PRODUCT_BUNDLE_IDENTIFIER = org.hyperledger.identus.apollo.IOHKAESTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; @@ -553,7 +553,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = io.iohk.atala.prism.apollo.IOHKAESTests; + PRODUCT_BUNDLE_IDENTIFIER = org.hyperledger.identus.apollo.IOHKAESTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; diff --git a/iOSLibs/IOHKCryptoKit/IOHKCryptoKit.podspec b/iOSLibs/IOHKCryptoKit/IOHKCryptoKit.podspec index af48d06a0..f6425c9d1 100644 --- a/iOSLibs/IOHKCryptoKit/IOHKCryptoKit.podspec +++ b/iOSLibs/IOHKCryptoKit/IOHKCryptoKit.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| IOHKCryptoKit contains Ed25519, X25519 CryptoKit functionalities. DESC - s.homepage = 'https://github.com/input-output-hk/atala-prism-apollo' + s.homepage = 'https://github.com/hyperledger-identus/apollo' s.author = { 'Gonçalo Frade' => 'goncalo.frade@iohk.io' } s.source = { :git => 'https://github.com/hyperledger/identus-apollo.git', :tag => s.version.to_s } s.swift_version = '5.9' diff --git a/iOSLibs/IOHKRSA/IOHKRSA.podspec b/iOSLibs/IOHKRSA/IOHKRSA.podspec index fa839898f..d210657e2 100644 --- a/iOSLibs/IOHKRSA/IOHKRSA.podspec +++ b/iOSLibs/IOHKRSA/IOHKRSA.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| DESC s.license = 'MIT' - s.homepage = 'https://github.com/input-output-hk/atala-prism-apollo' + s.homepage = 'https://github.com/hyperledger-identus/apollo' s.author = { 'Ahmed Moussa' => 'moussa.ahmed95@gmail.com' } s.source = { :git => 'https://github.com/hyperledger/identus-apollo.git', :tag => s.version.to_s } s.swift_version = '5.7' diff --git a/iOSLibs/IOHKRSA/IOHKRSA.xcodeproj/project.pbxproj b/iOSLibs/IOHKRSA/IOHKRSA.xcodeproj/project.pbxproj index c33068c03..77c440fd6 100644 --- a/iOSLibs/IOHKRSA/IOHKRSA.xcodeproj/project.pbxproj +++ b/iOSLibs/IOHKRSA/IOHKRSA.xcodeproj/project.pbxproj @@ -436,7 +436,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = io.iohk.atala.prism.apollo.IOHKRSA; + PRODUCT_BUNDLE_IDENTIFIER = org.hyperledger.identus.apollo.IOHKRSA; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = auto; SKIP_INSTALL = YES; @@ -474,7 +474,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = io.iohk.atala.prism.apollo.IOHKRSA; + PRODUCT_BUNDLE_IDENTIFIER = org.hyperledger.identus.apollo.IOHKRSA; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = auto; SKIP_INSTALL = YES; @@ -505,7 +505,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = io.iohk.atala.prism.apollo.IOHKRSATests; + PRODUCT_BUNDLE_IDENTIFIER = org.hyperledger.identus.apollo.IOHKRSATests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; @@ -533,7 +533,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = io.iohk.atala.prism.apollo.IOHKRSATests; + PRODUCT_BUNDLE_IDENTIFIER = org.hyperledger.identus.apollo.IOHKRSATests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; diff --git a/iOSLibs/IOHKRSA/IOHKRSA/IOHKRSA.swift b/iOSLibs/IOHKRSA/IOHKRSA/IOHKRSA.swift index bc0101fa4..f4b1d310d 100644 --- a/iOSLibs/IOHKRSA/IOHKRSA/IOHKRSA.swift +++ b/iOSLibs/IOHKRSA/IOHKRSA/IOHKRSA.swift @@ -26,7 +26,7 @@ public class IOHKRSA: NSObject { @objc public class func generateKeyPair(keySize: RSAKeySize) -> KeyPair? { - let tag = "io.iohk.atala.prism.apollo.keys".data(using: .utf8)! + let tag = "org.hyperledger.identus.apollo.keys".data(using: .utf8)! let attributes: [String : Any] = [ kSecAttrKeyType as String: kSecAttrKeyTypeRSA, kSecAttrKeySizeInBits as String: keySize.rawValue as CFNumber, diff --git a/iOSLibs/IOHKRSA/IOHKRSATests/IOHKRSATests.swift b/iOSLibs/IOHKRSA/IOHKRSATests/IOHKRSATests.swift index 4e6b18ea7..44a9e60ae 100644 --- a/iOSLibs/IOHKRSA/IOHKRSATests/IOHKRSATests.swift +++ b/iOSLibs/IOHKRSA/IOHKRSATests/IOHKRSATests.swift @@ -76,7 +76,7 @@ class IOHKRSATests: XCTestCase { // MARK: - Helper methods private func generateKeyPair() throws -> (privateKey: SecKey, publicKey: SecKey) { - let tag = "io.iohk.atala.prism.apollo.keys".data(using: .utf8)! + let tag = "org.hyperledger.identus.apollo.keys".data(using: .utf8)! let attributes: [String: Any] = [ kSecAttrKeyType as String: kSecAttrKeyTypeRSA, kSecAttrKeySizeInBits as String: 2048 as CFNumber, diff --git a/iOSLibs/IOHKSecureRandomGeneration/IOHKSecureRandomGeneration.podspec b/iOSLibs/IOHKSecureRandomGeneration/IOHKSecureRandomGeneration.podspec index ecad679ab..e8e1b5b27 100644 --- a/iOSLibs/IOHKSecureRandomGeneration/IOHKSecureRandomGeneration.podspec +++ b/iOSLibs/IOHKSecureRandomGeneration/IOHKSecureRandomGeneration.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| IOHKSecureRandomGeneration contains Secure Random Generation for IV random generation. DESC - s.homepage = 'https://github.com/input-output-hk/atala-prism-apollo' + s.homepage = 'https://github.com/hyperledger-identus/apollo' s.author = { 'Ahmed Moussa' => 'moussa.ahmed95@gmail.com' } s.source = { :git => 'https://github.com/hyperledger/identus-apollo.git', :tag => s.version.to_s } s.swift_version = '5.9' diff --git a/iOSLibs/IOHKSecureRandomGeneration/IOHKSecureRandomGeneration.xcodeproj/project.pbxproj b/iOSLibs/IOHKSecureRandomGeneration/IOHKSecureRandomGeneration.xcodeproj/project.pbxproj index 02f8d982b..fa46138df 100644 --- a/iOSLibs/IOHKSecureRandomGeneration/IOHKSecureRandomGeneration.xcodeproj/project.pbxproj +++ b/iOSLibs/IOHKSecureRandomGeneration/IOHKSecureRandomGeneration.xcodeproj/project.pbxproj @@ -533,7 +533,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = io.iohk.atala.prism.apollo.IOHKSecureRandomGeneration; + PRODUCT_BUNDLE_IDENTIFIER = org.hyperledger.identus.apollo.IOHKSecureRandomGeneration; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = auto; SKIP_INSTALL = YES; @@ -571,7 +571,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = io.iohk.atala.prism.apollo.IOHKSecureRandomGeneration; + PRODUCT_BUNDLE_IDENTIFIER = org.hyperledger.identus.apollo.IOHKSecureRandomGeneration; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = auto; SKIP_INSTALL = YES; @@ -602,7 +602,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = io.iohk.atala.prism.apollo.IOHKSecureRandomGenerationTests; + PRODUCT_BUNDLE_IDENTIFIER = org.hyperledger.identus.apollo.IOHKSecureRandomGenerationTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; @@ -630,7 +630,7 @@ ); MACOSX_DEPLOYMENT_TARGET = 13.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = io.iohk.atala.prism.apollo.IOHKSecureRandomGenerationTests; + PRODUCT_BUNDLE_IDENTIFIER = org.hyperledger.identus.apollo.IOHKSecureRandomGenerationTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; diff --git a/iOSLibs/build.gradle.kts b/iOSLibs/build.gradle.kts index 664707198..2c3d9592a 100644 --- a/iOSLibs/build.gradle.kts +++ b/iOSLibs/build.gradle.kts @@ -2,7 +2,6 @@ plugins { base } -val os = org.gradle.internal.os.OperatingSystem.current() val libraries = listOf("IOHKSecureRandomGeneration", "IOHKCryptoKit") val sdks = listOf("iphoneos", "iphonesimulator", "macosx") @@ -12,7 +11,8 @@ libraries.forEach { library -> group = "build swift" description = "Build $library for $sdk." - workingDir(projectDir) + // FIX 1: Revert to direct assignment, which is what your Gradle version expects. + workingDir = layout.projectDirectory.asFile commandLine( "xcodebuild", @@ -29,20 +29,27 @@ libraries.forEach { library -> "Release" ) - onlyIf { os.isMacOsX } + onlyIf { + System.getProperty("os.name").contains("Mac OS X", ignoreCase = true) + } + // FIX 2: Use `project.fileTree` with a directory from the layout API. inputs.files( - fileTree("$projectDir/$library.xcodeproj") { exclude("**/xcuserdata") }, - fileTree("$projectDir/$library/$library") + project.fileTree(layout.projectDirectory.dir("$library/$library.xcodeproj")) { + exclude("**/xcuserdata") + }, + project.fileTree(layout.projectDirectory.dir("$library/$library")) ) outputs.dir( - when (sdk) { - "iphoneos" -> projectDir.resolve("$library/build/Release-iphoneos/") - "iphonesimulator" -> projectDir.resolve("$library/build/Release-iphonesimulator/") - "macosx" -> projectDir.resolve("$library/build/Release/") - else -> error("Unsupported SDK: $sdk") - } + layout.projectDirectory.dir( + when (sdk) { + "iphoneos" -> "$library/build/Release-iphoneos/" + "iphonesimulator" -> "$library/build/Release-iphonesimulator/" + "macosx" -> "$library/build/Release/" + else -> error("Unsupported SDK: $sdk") + } + ) ) } } @@ -50,20 +57,13 @@ libraries.forEach { library -> tasks.register("deleteBuildFolder") { group = "build" - delete(buildDir) - libraries.forEach { - delete("$projectDir/$it/build") + // FIX 3: Use `layout.buildDirectory` to avoid the deprecation warning. + delete(layout.buildDirectory) + libraries.forEach { library -> + delete(layout.projectDirectory.dir("$library/build")) } } tasks.named("clean") { dependsOn("deleteBuildFolder") } - -tasks.withType().configureEach { - enabled = false -} - -tasks.withType().configureEach { - enabled = false -} diff --git a/package.json b/package.json deleted file mode 100644 index 3b8362135..000000000 --- a/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "identus-apollo", - "version": "1.0.15", - "description": "identus-apollo", - "directories": { - "example": "examples" - }, - "repository": { - "type": "git", - "url": "https://github.com/hyperledger-identus/apollo.git" - }, - "author": "IOG", - "license": "ISC", - "bugs": { - "url": "https://github.com/hyperledger-identus/apollo/issues" - }, - "homepage": "https://github.com/hyperledger-identus/apollo#readme", - "devDependencies": { - "@semantic-release/changelog": "^6.0.2", - "@semantic-release/exec": "^6.0.3", - "@semantic-release/git": "^10.0.1", - "gradle-semantic-release-plugin": "1.9.2", - "semantic-release": "^24.0.0", - "semantic-release-slack-bot": "^4.0.2" - } -} diff --git a/scripts/install-rust-packages.sh b/scripts/install-rust-packages.sh index 40ccd0c1c..33c650c5e 100644 --- a/scripts/install-rust-packages.sh +++ b/scripts/install-rust-packages.sh @@ -5,4 +5,4 @@ rustup target add x86_64-linux-android rustup target add aarch64-apple-darwin rustup target add x86_64-apple-darwin rustup target add aarch64-unknown-linux-gnu -rustup target add x86_64-unknown-linux-gnu \ No newline at end of file +rustup target add x86_64-unknown-linux-gnu diff --git a/secp256k1-kmp/build.gradle.kts b/secp256k1-kmp/build.gradle.kts index d589103d1..250969879 100644 --- a/secp256k1-kmp/build.gradle.kts +++ b/secp256k1-kmp/build.gradle.kts @@ -1,129 +1,61 @@ plugins { alias(libs.plugins.kotlin.multiplatform) - alias(libs.plugins.dokka) } -val secp256k1Dir = rootDir.resolve("secp256k1-kmp") - kotlin { - iosX64 { - compilations["main"].compilerOptions.configure { - freeCompilerArgs.addAll( - "-include-binary", - secp256k1Dir - .resolve("native") - .resolve("build") - .resolve("ios") - .resolve("x86_x64-iphonesimulator") - .resolve("libsecp256k1.a") - .absolutePath - ) - } - } - iosArm64 { - compilations["main"].compilerOptions.configure { - freeCompilerArgs.addAll( - "-include-binary", - secp256k1Dir - .resolve("native") - .resolve("build") - .resolve("ios") - .resolve("arm64-iphoneos") - .resolve("libsecp256k1.a") - .absolutePath - ) - } - } - iosSimulatorArm64 { - compilations["main"].compilerOptions.configure { - freeCompilerArgs.addAll( - "-include-binary", - secp256k1Dir - .resolve("native") - .resolve("build") - .resolve("ios") - .resolve("arm64-iphonesimulator") - .resolve("libsecp256k1.a") - .absolutePath - ) - } - } - macosArm64 { - compilations["main"].compilerOptions.configure { - freeCompilerArgs.addAll( - "-include-binary", - secp256k1Dir - .resolve("native") - .resolve("build") - .resolve("ios") - .resolve("arm64-x86_x64-macosx") - .resolve("libsecp256k1.a") - .absolutePath - ) - } - } - + iosX64() + iosArm64() + iosSimulatorArm64() + macosArm64() + macosX64() + applyDefaultHierarchyTemplate() sourceSets { - val commonMain by getting { + commonMain { dependencies { api(libs.bignum) } } - - val nativeMain by creating { - dependsOn(commonMain) - } - - val iosArm64Main by getting { dependsOn(nativeMain) } - val iosX64Main by getting { dependsOn(nativeMain) } - val iosSimulatorArm64Main by getting { dependsOn(nativeMain) } - val macosArm64Main by getting { dependsOn(nativeMain) } - all { languageSettings.optIn("kotlin.RequiresOptIn") } } targets.withType().configureEach { - val currentTargetName = this.name + val targetName = this.name + compilations["main"].apply { cinterops.create("libsecp256k1") { - includeDirs.headerFilterOnly(project.file("native/secp256k1/include/")) - tasks[interopProcessingTaskName].dependsOn( - when (currentTargetName) { - "iosX64", "iosArm64" -> ":secp256k1-kmp:native:buildSecp256k1Ios" - "iosSimulatorArm64" -> ":secp256k1-kmp:native:buildSecp256k1IosSimulatorArm64" - "macosX64" -> ":secp256k1-kmp:native:buildSecp256k1MacosX64" - "macosArm64" -> ":secp256k1-kmp:native:buildSecp256k1MacosArm64" - else -> ":secp256k1-kmp:native:buildSecp256k1Host" - } - ) + // FIX 1: Use the safe 'layout' API instead of 'project.file()' + val includeDir = layout.projectDirectory.dir("native/secp256k1/include/") + includeDirs.headerFilterOnly(includeDir) + + val dependencyTaskName = when (targetName) { + "iosX64", "iosArm64", "iosSimulatorArm64" -> ":secp256k1-kmp:native:buildSecp256k1Ios" + "macosX64", "macosArm64" -> ":secp256k1-kmp:native:buildSecp256k1Macos" + else -> ":secp256k1-kmp:native:buildSecp256k1Host" + } + tasks[interopProcessingTaskName].dependsOn(dependencyTaskName) } - val binaryPath = - when (currentTargetName) { - "iosArm64" -> "ios/arm64-iphoneos/libsecp256k1.a" - "iosX64" -> "ios/x86_x64-iphonesimulator/libsecp256k1.a" - "iosSimulatorArm64" -> "ios/arm64-iphonesimulator/libsecp256k1.a" - "macosX64" -> "ios/x86_64-macosx/libsecp256k1.a" - "macosArm64" -> "ios/arm64-macosx/libsecp256k1.a" - else -> "host/libsecp256k1.a" - } + val binaryPathString = when (targetName) { + "iosArm64" -> "ios/arm64-iphoneos/libsecp256k1.a" + "iosX64" -> "ios/x86_x64-iphonesimulator/libsecp256k1.a" + "iosSimulatorArm64" -> "ios/arm64-iphonesimulator/libsecp256k1.a" + "macosX64" -> "ios/x86_x64-macosx/libsecp256k1.a" + "macosArm64" -> "ios/arm64-x86_x64-macosx/libsecp256k1.a" + else -> "host/libsecp256k1.a" + } - compilerOptions.configure { - freeCompilerArgs.addAll( - "-include-binary", - secp256k1Dir.resolve("native/build/$binaryPath").absolutePath - ) + val nativeBuildDir = project(":secp256k1-kmp:native").layout.buildDirectory + val binaryProvider = nativeBuildDir.file(binaryPathString) + + compileTaskProvider.configure { + compilerOptions { + freeCompilerArgs.addAll( + listOf("-include-binary", binaryProvider.get().asFile.absolutePath) + ) + } } } } } - -tasks.withType().configureEach { - enabled = false -} - -tasks.withType().configureEach { - enabled = false -} diff --git a/secp256k1-kmp/native/build-ios.sh b/secp256k1-kmp/native/build-ios.sh index 4e64424ab..e8fd4a1ac 100755 --- a/secp256k1-kmp/native/build-ios.sh +++ b/secp256k1-kmp/native/build-ios.sh @@ -12,7 +12,4 @@ cd secp256k1 TARGET_PLATFORMS="${TARGET_PLATFORMS}" sh xconfigure.sh --enable-experimental --enable-module_ecdh --enable-module-recovery --enable-module-schnorrsig --enable-benchmark=no --enable-shared=no --enable-exhaustive-tests=no --enable-tests=no mkdir -p ../build/ios -cp -R _build/universal/* ../build/ios/ - -rm -rf _build -make clean +cp -R _build/universal/* ../build/ios/ \ No newline at end of file diff --git a/secp256k1-kmp/native/build.gradle.kts b/secp256k1-kmp/native/build.gradle.kts index 074c7cb49..64ec12ae6 100644 --- a/secp256k1-kmp/native/build.gradle.kts +++ b/secp256k1-kmp/native/build.gradle.kts @@ -3,92 +3,43 @@ plugins { } val bash = "bash" - val currentOs = org.gradle.internal.os.OperatingSystem.current() -val buildDirPath = projectDir.resolve("build") - -val iosPlatforms = listOf("ios", "iossimulator") - -val macosArchitecture = listOf("macosX64", "macosArm64") - -fun outputMissing(dir: File) = !dir.exists() || dir.listFiles().isNullOrEmpty() - -// Host build task -tasks.register("buildSecp256k1Host") { - group = "native build" - workingDir = projectDir - environment( - "TARGET", - when { - currentOs.isLinux -> "linux" - currentOs.isMacOsX -> "darwin" - currentOs.isWindows -> "mingw" - else -> error("Unsupported OS $currentOs") - } - ) - commandLine(bash, "build.sh") - inputs.file("build.sh") - outputs.dir(buildDirPath) -} - -tasks.register( - "buildSecp256k1MacosArm64" -) { +// A single task for all macOS architectures +tasks.register("buildSecp256k1Macos") { group = "native build" - workingDir = projectDir + enabled = currentOs.isMacOsX + workingDir = layout.projectDirectory.asFile commandLine(bash, "build-ios.sh", "macosx") inputs.file("build-ios.sh") - outputs.dir(buildDirPath.resolve("ios")) - onlyIf { currentOs.isMacOsX } - onlyIf { outputMissing(buildDirPath.resolve("ios").resolve("arm64-x86_x64-macosx")) } + inputs.file("xconfigure.sh") + outputs.dir(layout.buildDirectory.dir("ios")) } +// A single task for all iOS architectures tasks.register("buildSecp256k1Ios") { group = "native build" - workingDir = projectDir - commandLine(bash, "build-ios.sh", *iosPlatforms.toTypedArray()) + enabled = currentOs.isMacOsX + workingDir = layout.projectDirectory.asFile + commandLine(bash, "build-ios.sh", "ios", "iossimulator") inputs.file("build-ios.sh") - outputs.dir(buildDirPath.resolve("ios")) - onlyIf { currentOs.isMacOsX } - onlyIf { outputMissing(buildDirPath.resolve("ios").resolve("arm64-iphoneos")) } + inputs.file("xconfigure.sh") + outputs.dir(layout.buildDirectory.dir("ios")) } -tasks.register("buildSecp256k1IosSimulatorArm64") { - group = "native build" - workingDir = projectDir - commandLine(bash, "build-ios.sh", "iossimulator") - inputs.file("build-ios.sh") - outputs.dir(buildDirPath.resolve("ios")) - onlyIf { currentOs.isMacOsX } -} - -// Aggregate all builds task +// Aggregate and Clean-up Tasks tasks.register("buildSecp256k1") { group = "native build" - dependsOn("buildSecp256k1Host") if (currentOs.isMacOsX) { - dependsOn("buildSecp256k1Ios") - dependsOn("buildSecp256k1IosSimulatorArm64") - dependsOn("buildSecp256k1MacosArm64") + dependsOn("buildSecp256k1Ios", "buildSecp256k1Macos") } } -// Proper clean-up tasks.register("deleteNativeBuild") { group = "build" - delete(buildDirPath) + delete(layout.buildDirectory) } -// Attach clean to Gradle's standard clean tasks.named("clean") { dependsOn("deleteNativeBuild") } - -// Disable publishing for this module -tasks.withType().configureEach { - enabled = false -} -tasks.withType().configureEach { - enabled = false -} diff --git a/secp256k1-kmp/native/xconfigure.sh b/secp256k1-kmp/native/xconfigure.sh index a0d21eb4a..3e46bf47b 100644 --- a/secp256k1-kmp/native/xconfigure.sh +++ b/secp256k1-kmp/native/xconfigure.sh @@ -22,20 +22,22 @@ Build() { export CXXFLAGS="${HOST_FLAGS} ${OPT_FLAGS}" export LDFLAGS="${HOST_FLAGS}" - EXEC_PREFIX="${PLATFORMS}/${PLATFORM}" - ./configure \ + # Create a unique, isolated build directory for this specific architecture + BUILD_DIR_ARCH="${PLATFORMS}/${PLATFORM}/build" + mkdir -p "${BUILD_DIR_ARCH}" + cd "${BUILD_DIR_ARCH}" # Enter the isolated directory + + ../../../../configure \ --host="${CHOST}" \ --prefix="${PREFIX}" \ - --exec-prefix="${EXEC_PREFIX}" \ + --exec-prefix="${PLATFORMS}/${PLATFORM}" \ --enable-static \ --disable-shared \ "$@" - # Avoid Xcode loading dylibs even when staticlibs exist - make clean - mkdir -p "${PLATFORMS}" &> /dev/null make -j"${MAKE_JOBS}" make install + cd ../../../.. } # Locations diff --git a/settings.gradle.kts b/settings.gradle.kts index df312b6b3..6396bdaad 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,9 +1,8 @@ pluginManagement { repositories { - gradlePluginPortal() google() mavenCentral() - maven("https://plugins.gradle.org/m2/") + gradlePluginPortal() } } @@ -11,12 +10,6 @@ dependencyResolutionManagement { repositories { google() mavenCentral() - gradlePluginPortal() - } - versionCatalogs { - create("libs") { -// from(files("gradle/libs.versions.toml")) - } } } From 03d4ab591c0e6d7f00962c2625086f8f75013451 Mon Sep 17 00:00:00 2001 From: Allain Magyar Date: Thu, 24 Jul 2025 12:10:28 -0300 Subject: [PATCH 2/4] chore: rollback group and scope changes Signed-off-by: Allain Magyar --- apollo/build.gradle.kts | 6 +++--- build.gradle.kts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apollo/build.gradle.kts b/apollo/build.gradle.kts index fbbbe201c..39712ac62 100644 --- a/apollo/build.gradle.kts +++ b/apollo/build.gradle.kts @@ -25,7 +25,7 @@ kotlin { } jvm() androidLibrary { - namespace = "dev.allain" + namespace = "org.hyperledger.identus.apollo" compileSdk = libs.versions.android.compileSdk.get().toInt() minSdk = libs.versions.android.minSdk.get().toInt() } @@ -422,13 +422,13 @@ mavenPublishing { } npmPublish { - organization.set("amagyar-iohk") + organization.set("hyperledger") version.set(rootProject.version.toString()) access.set(NpmAccess.PUBLIC) packages { access.set(NpmAccess.PUBLIC) named("js") { - scope.set("amagyar-iohk") + scope.set("hyperledger") packageName.set("identus-apollo") readme.set(rootProject.layout.projectDirectory.file("README.md")) packageJson { diff --git a/build.gradle.kts b/build.gradle.kts index 070e1954a..ecbe3b504 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { alias(libs.plugins.ktlint) } -group = "dev.allain" +group = "org.hyperledger.identus" subprojects { group = rootProject.group From 8858dc1fd495bdfcadeff472f3670b5798b2562d Mon Sep 17 00:00:00 2001 From: Allain Magyar Date: Thu, 24 Jul 2025 12:22:38 -0300 Subject: [PATCH 3/4] fix: add xcode setup in release workflow Signed-off-by: Allain Magyar --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca7c29824..50c9fec99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,10 +68,10 @@ jobs: aarch64-unknown-linux-gnu \ x86_64-unknown-linux-gnu - # - name: Setup Xcode - # uses: maxim-lobanov/setup-xcode@v1 - # with: - # xcode-version: '16.2' + - name: Setup Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '16.2' - name: Install wasm-pack run: cargo install wasm-pack From 3e2588771c164c98619adc0bd2fb1c809eede0d5 Mon Sep 17 00:00:00 2001 From: Allain Magyar Date: Thu, 24 Jul 2025 12:42:10 -0300 Subject: [PATCH 4/4] fix: removes kover from pull request due new android plugin Signed-off-by: Allain Magyar --- .github/workflows/pull-request.yml | 60 +++++++++++++++--------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 820416f03..9567c9423 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -75,7 +75,7 @@ jobs: if: matrix.os-type == 'macos' run: | brew tap messense/macos-cross-toolchains - + - name: "Install Linux GNU for x86_64" if: matrix.os-type == 'macos' run: | @@ -112,7 +112,7 @@ jobs: rustup target add x86_64-apple-darwin rustup target add aarch64-unknown-linux-gnu rustup target add x86_64-unknown-linux-gnu - + - uses: maxim-lobanov/setup-xcode@v1 if: matrix.os-type == 'macos' with: @@ -125,7 +125,7 @@ jobs: - name: "Install rust toolchain (Macos)" if: matrix.os-type == 'macos' run: brew install rustup - + - name: "Install wasm-pack" run: cargo install wasm-pack @@ -138,30 +138,30 @@ jobs: - name: "Build Check All tests" run: ./gradlew allTests - - name: "Generate kover coverage report" - run: ./gradlew koverHtmlReport koverXmlReport - - - name: "Upload coverage html" - uses: actions/upload-artifact@v4.0.0 - with: - name: coverage-results-${{ matrix.os-type }}.zip - path: apollo/build/reports/kover/html - - - name: "Add coverage report to PR" - id: kover - uses: mi-kas/kover-report@v1 - with: - path: ${{ github.workspace }}/apollo/build/reports/kover/report.xml - token: ${{ env.GITHUB_TOKEN }} - title: Code Coverage - update-comment: true - min-coverage-overall: 90 - min-coverage-changed-files: 90 - coverage-counter-type: LINE - - - name: "Upload the build report" - if: always() - uses: actions/upload-artifact@v4 - with: - path: "**/build/reports/" - name: report-${{ matrix.os-type }} +# - name: "Generate kover coverage report" +# run: ./gradlew koverHtmlReport koverXmlReport + +# - name: "Upload coverage html" +# uses: actions/upload-artifact@v4.0.0 +# with: +# name: coverage-results-${{ matrix.os-type }}.zip +# path: apollo/build/reports/kover/html + +# - name: "Add coverage report to PR" +# id: kover +# uses: mi-kas/kover-report@v1 +# with: +# path: ${{ github.workspace }}/apollo/build/reports/kover/report.xml +# token: ${{ env.GITHUB_TOKEN }} +# title: Code Coverage +# update-comment: true +# min-coverage-overall: 90 +# min-coverage-changed-files: 90 +# coverage-counter-type: LINE + +# - name: "Upload the build report" +# if: always() +# uses: actions/upload-artifact@v4 +# with: +# path: "**/build/reports/" +# name: report-${{ matrix.os-type }}