diff --git a/packages/kms-musap-rn/package.json b/packages/kms-musap-rn/package.json index 9e452aab..938f1ead 100644 --- a/packages/kms-musap-rn/package.json +++ b/packages/kms-musap-rn/package.json @@ -10,7 +10,7 @@ "build:clean": "tsc --build --clean && tsc --build" }, "dependencies": { - "@sphereon/musap-react-native": "0.2.1-unstable.161", + "@sphereon/musap-react-native": "0.2.1-next.164", "@sphereon/ssi-sdk-ext.key-utils": "workspace:*", "@sphereon/ssi-sdk-ext.x509-utils": "workspace:*", "@sphereon/ssi-types": "0.30.2-feature.SDK.41.oidf.support.286", diff --git a/packages/kms-musap-rn/src/MusapKeyManagerSystem.ts b/packages/kms-musap-rn/src/MusapKeyManagerSystem.ts index c1f1fc61..450d69e7 100644 --- a/packages/kms-musap-rn/src/MusapKeyManagerSystem.ts +++ b/packages/kms-musap-rn/src/MusapKeyManagerSystem.ts @@ -137,8 +137,12 @@ export class MusapKeyManagementSystem extends AbstractKeyManagementSystem { } async deleteKey({ kid }: { kid: string }): Promise { - try { - void this.musapClient.removeKey(kid) + try { + const key: MusapKey = this.musapClient.getKeyById(kid) as MusapKey + if (key.sscdType as string === 'External Signature') { + return true // FIXME we can't remove a eSim key for now because this would mean onboarding again + } + void this.musapClient.removeKey(kid) return true } catch (error) { console.warn('Failed to delete key:', error) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 984c0e1f..421501f5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -224,7 +224,7 @@ importers: version: link:../key-utils '@transmute/did-key-bls12381': specifier: 0.3.0-unstable.10 - version: 0.3.0-unstable.10(encoding@0.1.13)(web-streams-polyfill@3.3.3) + version: 0.3.0-unstable.10(encoding@0.1.13)(expo@51.0.38(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(encoding@0.1.13))(react-native@0.76.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(encoding@0.1.13)(react@18.3.1))(web-streams-polyfill@3.3.3) '@veramo/core': specifier: 4.2.0 version: 4.2.0(patch_hash=c5oempznsz4br5w3tcuk2i2mau) @@ -815,8 +815,8 @@ importers: packages/kms-musap-rn: dependencies: '@sphereon/musap-react-native': - specifier: 0.2.1-unstable.161 - version: 0.2.1-unstable.161(react-native@0.76.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(encoding@0.1.13)(react@18.3.1))(react@18.3.1) + specifier: 0.2.1-next.164 + version: 0.2.1-next.164(react-native@0.76.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(encoding@0.1.13)(react@18.3.1))(react@18.3.1) '@sphereon/ssi-sdk-ext.key-utils': specifier: workspace:* version: link:../key-utils @@ -2848,11 +2848,11 @@ packages: resolution: {integrity: sha512-uAZZExVy+ug9JLircejWa5eLtAZ7bnBP6xb7DO2+86LRsHNLh2k2jMWJYxp+iWtGHTsh6RYsZl14ScQLvjiQ/A==} bundledDependencies: [] - '@sphereon/musap-native@0.2.1-unstable.161': - resolution: {integrity: sha512-i9XW+LdZcc+hVGjM4Dnntwe53BMzhde4Wihe1Ufgxoi7NL/TK5xnlucKFp6dWt4MR4wbttga44ar6sEkv8mV9w==} + '@sphereon/musap-native@0.2.1-next.164': + resolution: {integrity: sha512-rZGdwCSV/Hvy0GyMra7h9ie7Ru2g4I5m8mCsymqyrCozPyyyVuGsff/mJJmwBt69zTxJmb5bnR25Sdh8E2fdlA==} - '@sphereon/musap-react-native@0.2.1-unstable.161': - resolution: {integrity: sha512-c5ERKr4XOqojr9chqxJ76NZtgneuYJgYl0AZPdi1Nl9b8jq6KpHKorpWK+2iKWsyYnVUaXXbdu2c3v829gyNJg==} + '@sphereon/musap-react-native@0.2.1-next.164': + resolution: {integrity: sha512-qtgE5ctEpEc7ArEaJNYv51n89+NF1xTvcYA9Ck+qZ/UO6nr13bc8fFCVrynWaMbE6C/aB/SLCGfY/raGymZXkQ==} peerDependencies: react: '*' react-native: '*' @@ -12454,11 +12454,11 @@ snapshots: '@js-joda/timezone': 2.3.0(@js-joda/core@5.6.3) format-util: 1.0.5 - '@sphereon/musap-native@0.2.1-unstable.161': {} + '@sphereon/musap-native@0.2.1-next.164': {} - '@sphereon/musap-react-native@0.2.1-unstable.161(react-native@0.76.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(encoding@0.1.13)(react@18.3.1))(react@18.3.1)': + '@sphereon/musap-react-native@0.2.1-next.164(react-native@0.76.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(encoding@0.1.13)(react@18.3.1))(react@18.3.1)': dependencies: - '@sphereon/musap-native': 0.2.1-unstable.161 + '@sphereon/musap-native': 0.2.1-next.164 react: 18.3.1 react-native: 0.76.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(encoding@0.1.13)(react@18.3.1) @@ -12942,7 +12942,7 @@ snapshots: '@transmute/did-context@0.6.1-unstable.37': {} - '@transmute/did-key-bls12381@0.3.0-unstable.10(encoding@0.1.13)(web-streams-polyfill@3.3.3)': + '@transmute/did-key-bls12381@0.3.0-unstable.10(encoding@0.1.13)(expo@51.0.38(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(encoding@0.1.13))(react-native@0.76.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(encoding@0.1.13)(react@18.3.1))(web-streams-polyfill@3.3.3)': dependencies: '@transmute/bls12381-key-pair': 0.7.0-unstable.81(encoding@0.1.13) '@transmute/did-key-common': 0.3.0-unstable.10(encoding@0.1.13)(expo@51.0.38(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(encoding@0.1.13))(react-native@0.76.0(@babel/core@7.26.0)(@babel/preset-env@7.26.0(@babel/core@7.26.0))(encoding@0.1.13)(react@18.3.1))(web-streams-polyfill@3.3.3)