@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.
- package/android/src/main/java/ch/procivis/one/core/DeserializeSpecific.kt +20 -1
- package/android/src/main/java/ch/procivis/one/core/ProcivisOneCoreModule.kt +7 -5
- package/core-sdk.json +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/src/core.d.ts +1 -1
- package/dist/src/core.js +1 -1
- package/dist/src/one-core-uniffi-intf.d.ts +338 -288
- package/dist/src/one-core-uniffi-intf.js +53 -18
- package/ios/Deserialize.swift +60 -5
- package/ios/ProcivisOneCoreModule.m +2 -1
- package/ios/ProcivisOneCoreModule.swift +10 -7
- package/package.json +1 -1
|
@@ -6,7 +6,10 @@ import kotlin.reflect.KClass
|
|
|
6
6
|
|
|
7
7
|
object DeserializeSpecific {
|
|
8
8
|
object Obj {
|
|
9
|
-
private val CustomConversionTypes = arrayOf(
|
|
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
|
|
130
|
+
fun updateOrganisation(request: ReadableMap, promise: Promise) {
|
|
129
131
|
asyncCall(promise, scope) {
|
|
130
|
-
getCore().
|
|
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/
|
|
5
|
-
"sha1": "
|
|
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/
|
|
9
|
-
"sha1": "
|
|
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/
|
|
14
|
-
"sha1": "
|
|
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
|
|
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
|
package/dist/src/core.d.ts
CHANGED
|
@@ -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", "
|
|
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"];
|