@procivis/react-native-one-core 1.133039.0 → 1.136613.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,10 @@ import kotlin.reflect.KClass
6
6
 
7
7
  object DeserializeSpecific {
8
8
  object Obj {
9
- private val CustomConversionTypes = arrayOf(OptionalString::class)
9
+ private val CustomConversionTypes = arrayOf(
10
+ OptionalString::class,
11
+ HandleInvitationRequestData::class
12
+ )
10
13
 
11
14
  fun isCustomConversionType(type: KClass<*>): Boolean {
12
15
  return CustomConversionTypes.contains(type)
@@ -22,6 +25,22 @@ object DeserializeSpecific {
22
25
  OptionalString.Some(value)
23
26
  }
24
27
  }
28
+
29
+ HandleInvitationRequestData::class -> {
30
+ val data = input.getMap(field)
31
+ ?: throw IllegalArgumentException("Missing HandleInvitationRequestData data")
32
+
33
+ val type = data.getString("type_")
34
+ ?: throw IllegalArgumentException("Missing HandleInvitationRequestData type")
35
+ if (type != "URL") {
36
+ throw IllegalArgumentException("Invalid HandleInvitationRequestData type: $type")
37
+ }
38
+
39
+ val url = data.getString("url")
40
+ ?: throw IllegalArgumentException("Missing HandleInvitationRequestData url")
41
+ HandleInvitationRequestData.Url(url = url)
42
+ }
43
+
25
44
  else -> {
26
45
  throw IllegalArgumentException("Invalid map conversion: $input")
27
46
  }
@@ -49,7 +49,7 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
49
49
  }
50
50
 
51
51
  @ReactMethod
52
- fun initialize(configJson: String, promise: Promise) {
52
+ fun initialize(configJson: String, dataDirPath: String?, promise: Promise) {
53
53
  syncCall(promise) {
54
54
  val context = this.reactApplicationContext
55
55
  ubiqu = ubiqu ?: UbiquKeyStorage(context)
@@ -63,8 +63,10 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
63
63
  bleCentral = AndroidBLECentral(context),
64
64
  blePeripheral = AndroidBLEPeripheral(context),
65
65
  nfcHce = nfcHce,
66
- nfcScanner = NfcScanner(context) { context.currentActivity }
67
- )
66
+ nfcScanner = NfcScanner(context) { context.currentActivity },
67
+ credentialManager = null
68
+ ),
69
+ dataDirPath = dataDirPath ?: context.filesDir.absolutePath,
68
70
  )
69
71
  return@syncCall null
70
72
  }
@@ -125,9 +127,9 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
125
127
  }
126
128
 
127
129
  @ReactMethod
128
- fun upsertOrganisation(request: ReadableMap, promise: Promise) {
130
+ fun updateOrganisation(request: ReadableMap, promise: Promise) {
129
131
  asyncCall(promise, scope) {
130
- getCore().upsertOrganisation(construct(request))
132
+ getCore().updateOrganisation(construct(request))
131
133
  return@asyncCall null
132
134
  }
133
135
  }
package/core-sdk.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "android": {
3
3
  "debug": {
4
- "url": "https://onesdk.blob.core.windows.net/core-sdk/133039/android/onecore-debug.aar",
5
- "sha1": "784656f7849f8ad2898a52815c4bad4a2285efab"
4
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/136613/android/onecore-debug.aar",
5
+ "sha1": "3436665418529a9ff8d70e5efe946be06ae8710d"
6
6
  },
7
7
  "release": {
8
- "url": "https://onesdk.blob.core.windows.net/core-sdk/133039/android/onecore-release.aar",
9
- "sha1": "d6d85c3b594dd214905f366bc80451e7b06c6601"
8
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/136613/android/onecore-release.aar",
9
+ "sha1": "6dccae0eabe767df217f317b891da0bdbc43d9c3"
10
10
  }
11
11
  },
12
12
  "ios": {
13
- "url": "https://onesdk.blob.core.windows.net/core-sdk/133039/ios/deploy.zip",
14
- "sha1": "b0a910facc05bdfa239b31a1c7f09c8c9feb0092"
13
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/136613/ios/deploy.zip",
14
+ "sha1": "55abee8b9c8447a23ccb010fbb975f26a1a35ed8"
15
15
  }
16
16
  }
package/dist/index.d.ts CHANGED
@@ -17,4 +17,4 @@ export declare namespace Ubiqu {
17
17
  * @param config one-core configuration
18
18
  * @returns ONE Core instance
19
19
  */
20
- export declare function initializeCore(config?: Record<string, unknown>): Promise<ONECore>;
20
+ export declare function initializeCore(config?: Record<string, unknown>, dataDirPath?: string): Promise<ONECore>;
package/dist/index.js CHANGED
@@ -28,8 +28,8 @@ if (originalGetConfig) {
28
28
  * @param config one-core configuration
29
29
  * @returns ONE Core instance
30
30
  */
31
- export async function initializeCore(config = {}) {
32
- await wrapFn(ONE.initialize, "initializeCore")(JSON.stringify(config));
31
+ export async function initializeCore(config = {}, dataDirPath) {
32
+ await wrapFn(ONE.initialize, "initializeCore")(JSON.stringify(config), dataDirPath);
33
33
  return wrapObj(ONE);
34
34
  }
35
35
  // UTILS
@@ -10,4 +10,4 @@ export interface ONECore extends Omit<OneCore, "version" | "getConfig"> {
10
10
  * @hidden
11
11
  * New Architecture bridgeless issue workaround: see https://github.com/facebook/react-native/issues/43221
12
12
  */
13
- export declare const interfaceMethodNames: readonly ["getVersion", "getConfig", "createOrganisation", "upsertOrganisation", "getOrganisation", "generateKey", "createDid", "listDids", "createIdentifier", "getIdentifier", "listIdentifiers", "deleteIdentifier", "handleInvitation", "holderAcceptCredential", "holderRejectCredential", "holderRefreshCredential", "initiateIssuance", "continueIssuance", "getPresentationDefinitionV2", "holderRejectProof", "holderSubmitProofV2", "listCredentials", "runTask", "deleteProofClaims", "getCredential", "getCredentialTrustInformation", "deleteCredential", "importCredentialSchema", "getCredentialSchema", "createCredentialSchema", "listCredentialSchemas", "deleteCredentialSchema", "createProof", "shareProof", "shareProofSchema", "shareCredentialSchema", "getProof", "getProofTrustInformation", "holderGetTransactionData", "listProofs", "deleteProof", "proposeProof", "qesAuthorize", "qesSign", "createProofSchema", "listProofSchemas", "getProofSchema", "deleteProofSchema", "importProofSchema", "checkRevocation", "listHistory", "getHistoryEntry", "createBackup", "backupInfo", "deleteCache", "unpackBackup", "finalizeImport", "rollbackImport", "resolveJsonldContext", "holderRegisterInstance", "holderActivateInstance", "holderInstanceStatus", "holderGetInstance", "nfcReadIsoMdlEngagement", "nfcStopIsoMdlEngagement", "uninitialize"];
13
+ export declare const interfaceMethodNames: readonly ["getVersion", "getConfig", "createOrganisation", "updateOrganisation", "getOrganisation", "generateKey", "createDid", "listDids", "createIdentifier", "getIdentifier", "listIdentifiers", "deleteIdentifier", "handleInvitation", "holderAcceptCredential", "holderRejectCredential", "holderRefreshCredential", "initiateIssuance", "continueIssuance", "getPresentationDefinitionV2", "holderRejectProof", "holderSubmitProofV2", "listCredentials", "runTask", "deleteProofClaims", "getCredential", "getCredentialTrustInformation", "deleteCredential", "importCredentialSchema", "getCredentialSchema", "createCredentialSchema", "listCredentialSchemas", "deleteCredentialSchema", "createProof", "shareProof", "shareProofSchema", "shareCredentialSchema", "getProof", "getProofTrustInformation", "holderGetTransactionData", "listProofs", "deleteProof", "proposeProof", "qesAuthorize", "qesSign", "createProofSchema", "listProofSchemas", "getProofSchema", "deleteProofSchema", "importProofSchema", "checkRevocation", "listHistory", "getHistoryEntry", "createBackup", "backupInfo", "deleteCache", "unpackBackup", "finalizeImport", "rollbackImport", "resolveJsonldContext", "holderRegisterInstance", "holderActivateInstance", "holderInstanceStatus", "holderGetInstance", "nfcReadIsoMdlEngagement", "nfcStopIsoMdlEngagement", "uninitialize"];
package/dist/src/core.js CHANGED
@@ -8,7 +8,7 @@ export const interfaceMethodNames = [
8
8
  "getVersion",
9
9
  "getConfig",
10
10
  "createOrganisation",
11
- "upsertOrganisation",
11
+ "updateOrganisation",
12
12
  "getOrganisation",
13
13
  "generateKey",
14
14
  "createDid",