From f4e37e0d8f124dbfe5e23d7fbc563384d380a295 Mon Sep 17 00:00:00 2001 From: Oleg Koretsky Date: Thu, 1 Aug 2024 10:54:28 +0300 Subject: [PATCH] JAV-323 Support company ID attributes (#337) * Add company ID attribute types * Update Android build platform to 29 So it matches the one in concordium-base wallet lib. * Update version 7.2.0-SNAPSHOT * Gitignore Idea folder * Update concordium-base to 38cf687 --- .github/workflows/build-test.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- .gitignore | 1 + CHANGELOG.md | 1 + concordium-android-sdk/pom.xml | 4 ++-- concordium-base | 2 +- concordium-sdk-examples/pom.xml | 2 +- concordium-sdk/pom.xml | 2 +- .../accountinfo/credential/AttributeType.java | 11 ++++++++++- crypto-jni/Cargo.lock | 4 ++-- pom.xml | 2 +- 11 files changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f5e4e2ace..69395042a 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -94,7 +94,7 @@ jobs: run: | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager \ --sdk_root=$ANDROID_SDK_ROOT \ - "platform-tools" "platforms;android-27" "build-tools;27.0.3" + "platform-tools" "platforms;android-29" "build-tools;29.0.2" - name: Checkout uses: actions/checkout@v2 with: @@ -114,4 +114,4 @@ jobs: - name: Initialize root project run: mvn install -N - name: Build android sdk - run: cd concordium-android-sdk && mvn --batch-mode --update-snapshots install \ No newline at end of file + run: cd concordium-android-sdk && mvn --batch-mode --update-snapshots install diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d37811f3..054a62c72 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,7 +94,7 @@ jobs: run: | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager \ --sdk_root=$ANDROID_SDK_ROOT \ - "platform-tools" "platforms;android-27" "build-tools;27.0.3" + "platform-tools" "platforms;android-29" "build-tools;29.0.2" # Setup rust - name: Setup Rust uses: actions-rs/toolchain@v1 @@ -130,7 +130,7 @@ jobs: run: | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager \ --sdk_root=$ANDROID_SDK_ROOT \ - "platform-tools" "platforms;android-27" "build-tools;27.0.3" + "platform-tools" "platforms;android-29" "build-tools;29.0.2" - name: Setup JDK 8 uses: actions/setup-java@v4 with: diff --git a/.gitignore b/.gitignore index e39e4abee..495f51292 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.iml .flattened-pom.xml pom.xml.versionsBackup +.idea/ diff --git a/CHANGELOG.md b/CHANGELOG.md index b5942a124..4a161eaed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased - Added `MessageSigningDigest` class to generate digests for message signing +- Added support for company identity attributes ## 7.1.0 - Removed unnecessary `amount` parameter from `InvokeInstanceRequest`. diff --git a/concordium-android-sdk/pom.xml b/concordium-android-sdk/pom.xml index bb961ec36..18701bbed 100644 --- a/concordium-android-sdk/pom.xml +++ b/concordium-android-sdk/pom.xml @@ -5,7 +5,7 @@ com.concordium.sdk concordium-sdk-base - 7.1.0-SNAPSHOT + 7.2.0-SNAPSHOT concordium-android-sdk @@ -265,7 +265,7 @@ true - 27 + 29 ${project.basedir}/native diff --git a/concordium-base b/concordium-base index e6461db70..38cf687f1 160000 --- a/concordium-base +++ b/concordium-base @@ -1 +1 @@ -Subproject commit e6461db7032ea88157babc8ff09ea5bac4a39d68 +Subproject commit 38cf687f16074b9a2538093a40e2befa06cd104d diff --git a/concordium-sdk-examples/pom.xml b/concordium-sdk-examples/pom.xml index d8b3ea9e5..94c25f5de 100644 --- a/concordium-sdk-examples/pom.xml +++ b/concordium-sdk-examples/pom.xml @@ -23,7 +23,7 @@ com.concordium.sdk concordium-sdk - 7.1.0-SNAPSHOT + 7.2.0-SNAPSHOT compile diff --git a/concordium-sdk/pom.xml b/concordium-sdk/pom.xml index ef47d432e..28f6d3dff 100644 --- a/concordium-sdk/pom.xml +++ b/concordium-sdk/pom.xml @@ -7,7 +7,7 @@ com.concordium.sdk concordium-sdk-base - 7.1.0-SNAPSHOT + 7.2.0-SNAPSHOT com.concordium.sdk diff --git a/concordium-sdk/src/main/java/com/concordium/sdk/responses/accountinfo/credential/AttributeType.java b/concordium-sdk/src/main/java/com/concordium/sdk/responses/accountinfo/credential/AttributeType.java index 4ec565ba9..1b15193d0 100644 --- a/concordium-sdk/src/main/java/com/concordium/sdk/responses/accountinfo/credential/AttributeType.java +++ b/concordium-sdk/src/main/java/com/concordium/sdk/responses/accountinfo/credential/AttributeType.java @@ -39,7 +39,16 @@ public enum AttributeType { @JsonProperty("taxIdNo") TAX_ID_NO, @JsonProperty("lei") - LEI; + LEI, + @JsonProperty("legalName") + LEGAL_NAME, + @JsonProperty("legalCountry") + LEGAL_COUNTRY, + @JsonProperty("businessNumber") + BUSINESS_NUMBER, + @JsonProperty("registrationAuth") + REGISTRATION_AUTH, + ; public static AttributeType fromJSON(String jsonStr) throws JsonMappingException, JsonProcessingException { return JsonMapper.INSTANCE.readValue(String.format("\"%s\"", jsonStr), AttributeType.class); diff --git a/crypto-jni/Cargo.lock b/crypto-jni/Cargo.lock index aa63090e4..1c483980d 100644 --- a/crypto-jni/Cargo.lock +++ b/crypto-jni/Cargo.lock @@ -408,7 +408,7 @@ dependencies = [ [[package]] name = "concordium_base" -version = "4.1.0" +version = "5.0.0" dependencies = [ "anyhow", "ark-bls12-381", @@ -1943,7 +1943,7 @@ dependencies = [ [[package]] name = "wallet_library" -version = "0.3.0" +version = "0.4.0" dependencies = [ "anyhow", "chrono", diff --git a/pom.xml b/pom.xml index 01e94f061..5d6499860 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.concordium.sdk concordium-sdk-base - 7.1.0-SNAPSHOT + 7.2.0-SNAPSHOT pom https://github.com/Concordium/concordium-java-sdk