@procivis/react-native-one-core 1.55153.0 → 1.58802.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 +0 -43
- package/android/src/main/java/ch/procivis/one/core/ProcivisOneCoreModule.kt +43 -7
- package/android/src/main/java/ch/procivis/one/core/SerializeSpecific.kt +7 -0
- package/core-sdk.json +6 -6
- package/dist/src/config.d.ts +2 -0
- package/dist/src/core.d.ts +21 -4
- package/dist/src/core.js +6 -0
- package/dist/src/credential.d.ts +51 -0
- package/dist/src/credentialSchema.d.ts +8 -0
- package/dist/src/history.d.ts +14 -6
- package/dist/src/history.js +2 -0
- package/dist/src/identifier.d.ts +8 -0
- package/dist/src/proof.d.ts +18 -2
- package/dist/src/proofSchema.d.ts +8 -0
- package/dist/src/trust.d.ts +16 -0
- package/dist/src/walletUnit.d.ts +33 -0
- package/dist/src/walletUnit.js +9 -0
- package/ios/Deserialize.swift +0 -46
- package/ios/ProcivisOneCoreModule.m +21 -3
- package/ios/ProcivisOneCoreModule.swift +64 -10
- package/ios/Serialize.swift +8 -0
- package/package.json +1 -1
|
@@ -51,49 +51,6 @@ object DeserializeSpecific {
|
|
|
51
51
|
return result
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
fun historyListQuery(query: ReadableMap): HistoryListQueryBindingDto {
|
|
55
|
-
return HistoryListQueryBindingDto(
|
|
56
|
-
page = query.getUInt("page")!!,
|
|
57
|
-
pageSize = query.getUInt("pageSize")!!,
|
|
58
|
-
organisationId = query.getString("organisationId").toString(),
|
|
59
|
-
entityId = query.getString("entityId"),
|
|
60
|
-
actions = opt(query.getArray("actions")) { types ->
|
|
61
|
-
enumList(types, HistoryActionBindingEnum::valueOf)
|
|
62
|
-
},
|
|
63
|
-
entityTypes = opt(query.getArray("entityTypes")) { types ->
|
|
64
|
-
enumList(types, HistoryEntityTypeBindingEnum::valueOf)
|
|
65
|
-
},
|
|
66
|
-
createdDateFrom = query.getString("createdDateFrom"),
|
|
67
|
-
createdDateTo = query.getString("createdDateTo"),
|
|
68
|
-
identifierId = query.getString("identifierId"),
|
|
69
|
-
credentialId = query.getString("credentialId"),
|
|
70
|
-
credentialSchemaId = query.getString("credentialSchemaId"),
|
|
71
|
-
search = historySearch(
|
|
72
|
-
query.getString("searchText"),
|
|
73
|
-
query.getString("searchType"),
|
|
74
|
-
),
|
|
75
|
-
proofSchemaId = query.getString("proofSchemaId"),
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
private fun historySearch(text: String?, type: String?): HistorySearchBindingDto? {
|
|
80
|
-
if (text == null) {
|
|
81
|
-
return null
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return HistorySearchBindingDto(
|
|
85
|
-
text = text,
|
|
86
|
-
type = opt(type, HistorySearchEnumBindingEnum::valueOf),
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
private fun <F, T> opt(input: F?, fn: (F) -> T): T? {
|
|
91
|
-
if (input == null) {
|
|
92
|
-
return null
|
|
93
|
-
}
|
|
94
|
-
return fn(input)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
54
|
fun <T> enumList(entries: ReadableArray, fn: (String) -> T): List<T> {
|
|
98
55
|
val result = mutableListOf<T>()
|
|
99
56
|
for (n in 0 until entries.size()) {
|
|
@@ -178,14 +178,11 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
178
178
|
|
|
179
179
|
@ReactMethod
|
|
180
180
|
fun handleInvitation(
|
|
181
|
-
|
|
182
|
-
organisationId: String,
|
|
183
|
-
transport: ReadableArray?,
|
|
181
|
+
request: ReadableMap,
|
|
184
182
|
promise: Promise
|
|
185
183
|
) {
|
|
186
184
|
asyncCall(promise, scope) {
|
|
187
|
-
val
|
|
188
|
-
val invitationResult = getCore().handleInvitation(url, organisationId, transportList)
|
|
185
|
+
val invitationResult = getCore().handleInvitation(construct(request))
|
|
189
186
|
return@asyncCall convertToRN(invitationResult)
|
|
190
187
|
}
|
|
191
188
|
}
|
|
@@ -213,6 +210,22 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
213
210
|
}
|
|
214
211
|
}
|
|
215
212
|
|
|
213
|
+
@ReactMethod
|
|
214
|
+
fun initiateIssuance(request: ReadableMap, promise: Promise) {
|
|
215
|
+
asyncCall(promise, scope) {
|
|
216
|
+
val response = getCore().initiateIssuance(construct(request))
|
|
217
|
+
return@asyncCall convertToRN(response)
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@ReactMethod
|
|
222
|
+
fun continueIssuance(url: String, promise: Promise) {
|
|
223
|
+
asyncCall(promise, scope) {
|
|
224
|
+
val response = getCore().continueIssuance(url)
|
|
225
|
+
return@asyncCall convertToRN(response)
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
216
229
|
@ReactMethod
|
|
217
230
|
fun getPresentationDefinition(proofId: String, promise: Promise) {
|
|
218
231
|
asyncCall(promise, scope) {
|
|
@@ -406,8 +419,7 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
406
419
|
@ReactMethod
|
|
407
420
|
fun getHistory(query: ReadableMap, promise: Promise) {
|
|
408
421
|
asyncCall(promise, scope) {
|
|
409
|
-
val
|
|
410
|
-
val history = getCore().getHistoryList(listQuery)
|
|
422
|
+
val history = getCore().getHistoryList(construct(query))
|
|
411
423
|
return@asyncCall convertToRN(history)
|
|
412
424
|
}
|
|
413
425
|
}
|
|
@@ -573,6 +585,30 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
|
|
|
573
585
|
}
|
|
574
586
|
}
|
|
575
587
|
|
|
588
|
+
@ReactMethod
|
|
589
|
+
fun holderRegisterWalletUnit(request: ReadableMap, promise: Promise) {
|
|
590
|
+
asyncCall(promise, scope) {
|
|
591
|
+
getCore().holderRegisterWalletUnit(construct(request))
|
|
592
|
+
return@asyncCall null
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
@ReactMethod
|
|
597
|
+
fun holderRefreshWalletUnit(request: ReadableMap, promise: Promise) {
|
|
598
|
+
asyncCall(promise, scope) {
|
|
599
|
+
getCore().holderRefreshWalletUnit(construct(request))
|
|
600
|
+
return@asyncCall null
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
@ReactMethod
|
|
605
|
+
fun holderGetWalletUnitAttestation(organisationId: String, promise: Promise) {
|
|
606
|
+
asyncCall(promise, scope) {
|
|
607
|
+
val result = getCore().holderGetWalletUnitAttestation(organisationId)
|
|
608
|
+
return@asyncCall convertToRN(result)
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
|
|
576
612
|
@ReactMethod
|
|
577
613
|
fun uninitialize(deleteData: Boolean, promise: Promise) {
|
|
578
614
|
asyncCall(promise, scope) {
|
|
@@ -43,6 +43,13 @@ object SerializeSpecific {
|
|
|
43
43
|
|
|
44
44
|
is HistoryMetadataBinding.ErrorMetadata ->
|
|
45
45
|
return convertToRN(metadata.value) as ReadableMap
|
|
46
|
+
|
|
47
|
+
is HistoryMetadataBinding.WalletUnitJwt -> {
|
|
48
|
+
val result = Arguments.createMap()
|
|
49
|
+
result.putString("jwt", metadata.v1)
|
|
50
|
+
return result
|
|
51
|
+
}
|
|
52
|
+
|
|
46
53
|
}
|
|
47
54
|
}
|
|
48
55
|
|
package/core-sdk.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"android": {
|
|
3
3
|
"debug": {
|
|
4
|
-
"url": "https://onetfstatestorage.blob.core.windows.net/core-sdk/android/
|
|
5
|
-
"sha1": "
|
|
4
|
+
"url": "https://onetfstatestorage.blob.core.windows.net/core-sdk/android/58802/onecore-debug.aar",
|
|
5
|
+
"sha1": "42ea4049778b8b3b842e51682291e1ef445ce695"
|
|
6
6
|
},
|
|
7
7
|
"release": {
|
|
8
|
-
"url": "https://onetfstatestorage.blob.core.windows.net/core-sdk/android/
|
|
9
|
-
"sha1": "
|
|
8
|
+
"url": "https://onetfstatestorage.blob.core.windows.net/core-sdk/android/58802/onecore-release.aar",
|
|
9
|
+
"sha1": "c7891e923cfe5501b278e80b3298ba901ae20825"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"ios": {
|
|
13
|
-
"url": "https://onetfstatestorage.blob.core.windows.net/core-sdk/ios/
|
|
14
|
-
"sha1": "
|
|
13
|
+
"url": "https://onetfstatestorage.blob.core.windows.net/core-sdk/ios/58802/deploy.zip",
|
|
14
|
+
"sha1": "a2b9e352b1960121eacf6345326e4ad75734675b"
|
|
15
15
|
}
|
|
16
16
|
}
|
package/dist/src/config.d.ts
CHANGED
|
@@ -144,5 +144,7 @@ export interface Config {
|
|
|
144
144
|
keyStorage: ConfigEntities<KeyStorageCapabilities>;
|
|
145
145
|
trustManagement: ConfigEntities<TrustCapabilities>;
|
|
146
146
|
cacheEntities: ConfigEntities;
|
|
147
|
+
task: ConfigEntities;
|
|
148
|
+
credentialIssuer: ConfigEntities<undefined, {}>;
|
|
147
149
|
}
|
|
148
150
|
export {};
|
package/dist/src/core.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BackupCreate, ImportBackupMetadata, UnexportableEntities } from "./backup";
|
|
2
2
|
import { Config } from "./config";
|
|
3
|
-
import { CredentialDetail, CredentialListItem, CredentialListQuery, CredentialRevocationCheckResponse, InvitationResultCredentialIssuance } from "./credential";
|
|
3
|
+
import { AuthorizationCodeFlow, ContinueIssuanceResponse, CredentialDetail, CredentialListItem, CredentialListQuery, CredentialRevocationCheckResponse, InitiateIssuanceRequest, InitiateIssuanceResponse, InvitationResultCredentialIssuance } from "./credential";
|
|
4
4
|
import { CredentialSchema, CredentialSchemaDetail, CredentialSchemaListQuery, ImportCredentialSchemaRequest, ShareCredentialSchemaResponse } from "./credentialSchema";
|
|
5
5
|
import { DidListItem, DidListQuery, DidRequest } from "./did";
|
|
6
6
|
import { HistoryListItem, HistoryListQuery } from "./history";
|
|
@@ -12,6 +12,7 @@ import { CreateRemoteTrustEntityRequest, CreateTrustAnchorRequest, CreateTrustEn
|
|
|
12
12
|
import { CacheType } from "./cache";
|
|
13
13
|
import { CreateOrganisationRequest, UpsertOrganisationRequest } from "./organisation";
|
|
14
14
|
import { CreateIdentifierRequest, IdentifierDetail, IdentifierListItem, IdentifierListQuery } from "./identifier";
|
|
15
|
+
import { HolderAttestationWalletUnitResponse, HolderRefreshWalletUnitRequest, HolderRegisterWalletUnitRequest } from "./walletUnit";
|
|
15
16
|
export * from "./backup";
|
|
16
17
|
export * from "./cache";
|
|
17
18
|
export * from "./config";
|
|
@@ -26,6 +27,7 @@ export * from "./organisation";
|
|
|
26
27
|
export * from "./proof";
|
|
27
28
|
export * from "./proofSchema";
|
|
28
29
|
export * from "./trust";
|
|
30
|
+
export * from "./walletUnit";
|
|
29
31
|
export interface Version {
|
|
30
32
|
target: string;
|
|
31
33
|
buildTime: string;
|
|
@@ -35,7 +37,13 @@ export interface Version {
|
|
|
35
37
|
rustVersion: string;
|
|
36
38
|
pipelineId: string;
|
|
37
39
|
}
|
|
38
|
-
export type InvitationResult = InvitationResultCredentialIssuance | InvitationResultProofRequest;
|
|
40
|
+
export type InvitationResult = InvitationResultCredentialIssuance | InvitationResultProofRequest | AuthorizationCodeFlow;
|
|
41
|
+
export interface HandleInvitationRequest {
|
|
42
|
+
url: string;
|
|
43
|
+
organisationId: string;
|
|
44
|
+
transport?: string[];
|
|
45
|
+
redirectUri?: string;
|
|
46
|
+
}
|
|
39
47
|
export interface ResolveJsonLdContextResponse {
|
|
40
48
|
context: string;
|
|
41
49
|
}
|
|
@@ -51,9 +59,15 @@ export interface ONECore {
|
|
|
51
59
|
getIdentifiers(query: IdentifierListQuery): Promise<ItemList<IdentifierListItem>>;
|
|
52
60
|
getIdentifier(identifierId: IdentifierListItem["id"]): Promise<IdentifierDetail>;
|
|
53
61
|
deleteIdentifier(identifierId: IdentifierListItem["id"]): Promise<void>;
|
|
54
|
-
handleInvitation(
|
|
62
|
+
handleInvitation(request: HandleInvitationRequest): Promise<InvitationResult>;
|
|
55
63
|
holderAcceptCredential(interactionId: InvitationResultCredentialIssuance["interactionId"], didId: DidListItem["id"] | undefined, identifierId: IdentifierListItem["id"] | undefined, keyId: string | undefined, txCode: string | undefined): Promise<void>;
|
|
56
64
|
holderRejectCredential(interactionId: InvitationResultCredentialIssuance["interactionId"]): Promise<void>;
|
|
65
|
+
/** For wallets, starts the OID4VCI Authorization Code Flow. */
|
|
66
|
+
initiateIssuance(request: InitiateIssuanceRequest): Promise<InitiateIssuanceResponse>;
|
|
67
|
+
/** For wallet-initiated flows, continues the OpenID4VCI issuance process
|
|
68
|
+
* after completing authorization.
|
|
69
|
+
*/
|
|
70
|
+
continueIssuance(url: string): Promise<ContinueIssuanceResponse>;
|
|
57
71
|
getPresentationDefinition(proofId: ProofDetail["id"]): Promise<PresentationDefinition>;
|
|
58
72
|
holderRejectProof(interactionId: InvitationResultProofRequest["interactionId"]): Promise<void>;
|
|
59
73
|
holderSubmitProof(interactionId: InvitationResultProofRequest["interactionId"], credentials: Record<PresentationDefinitionRequestedCredential["id"], PresentationSubmitCredentialRequest>, didId: DidListItem["id"] | undefined, identifierId: IdentifierListItem["id"] | undefined, keyId: string | undefined): Promise<void>;
|
|
@@ -119,6 +133,9 @@ export interface ONECore {
|
|
|
119
133
|
*/
|
|
120
134
|
rollbackImport(): Promise<void>;
|
|
121
135
|
resolveJsonldContext(url: string): Promise<ResolveJsonLdContextResponse>;
|
|
136
|
+
holderRegisterWalletUnit(request: HolderRegisterWalletUnitRequest): Promise<void>;
|
|
137
|
+
holderRefreshWalletUnit(request: HolderRefreshWalletUnitRequest): Promise<void>;
|
|
138
|
+
holderGetWalletUnitAttestation(organisationId: string): Promise<HolderAttestationWalletUnitResponse>;
|
|
122
139
|
/**
|
|
123
140
|
* Uninitialize the core instance
|
|
124
141
|
*
|
|
@@ -128,4 +145,4 @@ export interface ONECore {
|
|
|
128
145
|
*/
|
|
129
146
|
uninitialize(deleteData: boolean): Promise<void>;
|
|
130
147
|
}
|
|
131
|
-
export declare const interfaceMethodNames: readonly ["getVersion", "getConfig", "createOrganisation", "upsertOrganisation", "generateKey", "createDid", "getDids", "createIdentifier", "getIdentifier", "getIdentifiers", "deleteIdentifier", "handleInvitation", "holderAcceptCredential", "holderRejectCredential", "getPresentationDefinition", "holderRejectProof", "holderSubmitProof", "getCredentials", "runTask", "deleteProofClaims", "getCredential", "deleteCredential", "importCredentialSchema", "getCredentialSchema", "getCredentialSchemas", "deleteCredentialSchema", "createProof", "shareProof", "shareProofSchema", "shareCredentialSchema", "getProof", "getProofs", "deleteProof", "proposeProof", "createProofSchema", "getProofSchemas", "getProofSchema", "deleteProofSchema", "importProofSchema", "checkRevocation", "createTrustAnchor", "deleteTrustAnchor", "getTrustAnchor", "getTrustAnchors", "createTrustEntity", "getTrustEntity", "getTrustEntities", "getTrustEntityByDid", "resolveTrustEntityByIdentifier", "createRemoteTrustEntity", "getRemoteTrustEntity", "updateRemoteTrustEntity", "getHistory", "getHistoryEntry", "createBackup", "backupInfo", "deleteCache", "unpackBackup", "finalizeImport", "rollbackImport", "resolveJsonldContext", "uninitialize"];
|
|
148
|
+
export declare const interfaceMethodNames: readonly ["getVersion", "getConfig", "createOrganisation", "upsertOrganisation", "generateKey", "createDid", "getDids", "createIdentifier", "getIdentifier", "getIdentifiers", "deleteIdentifier", "handleInvitation", "holderAcceptCredential", "holderRejectCredential", "initiateIssuance", "continueIssuance", "getPresentationDefinition", "holderRejectProof", "holderSubmitProof", "getCredentials", "runTask", "deleteProofClaims", "getCredential", "deleteCredential", "importCredentialSchema", "getCredentialSchema", "getCredentialSchemas", "deleteCredentialSchema", "createProof", "shareProof", "shareProofSchema", "shareCredentialSchema", "getProof", "getProofs", "deleteProof", "proposeProof", "createProofSchema", "getProofSchemas", "getProofSchema", "deleteProofSchema", "importProofSchema", "checkRevocation", "createTrustAnchor", "deleteTrustAnchor", "getTrustAnchor", "getTrustAnchors", "createTrustEntity", "getTrustEntity", "getTrustEntities", "getTrustEntityByDid", "resolveTrustEntityByIdentifier", "createRemoteTrustEntity", "getRemoteTrustEntity", "updateRemoteTrustEntity", "getHistory", "getHistoryEntry", "createBackup", "backupInfo", "deleteCache", "unpackBackup", "finalizeImport", "rollbackImport", "resolveJsonldContext", "holderRegisterWalletUnit", "holderRefreshWalletUnit", "holderGetWalletUnitAttestation", "uninitialize"];
|
package/dist/src/core.js
CHANGED
|
@@ -12,6 +12,7 @@ export * from "./organisation";
|
|
|
12
12
|
export * from "./proof";
|
|
13
13
|
export * from "./proofSchema";
|
|
14
14
|
export * from "./trust";
|
|
15
|
+
export * from "./walletUnit";
|
|
15
16
|
// New Architecture bridgeless issue workaround: see https://github.com/facebook/react-native/issues/43221
|
|
16
17
|
export const interfaceMethodNames = [
|
|
17
18
|
"getVersion",
|
|
@@ -28,6 +29,8 @@ export const interfaceMethodNames = [
|
|
|
28
29
|
"handleInvitation",
|
|
29
30
|
"holderAcceptCredential",
|
|
30
31
|
"holderRejectCredential",
|
|
32
|
+
"initiateIssuance",
|
|
33
|
+
"continueIssuance",
|
|
31
34
|
"getPresentationDefinition",
|
|
32
35
|
"holderRejectProof",
|
|
33
36
|
"holderSubmitProof",
|
|
@@ -75,6 +78,9 @@ export const interfaceMethodNames = [
|
|
|
75
78
|
"finalizeImport",
|
|
76
79
|
"rollbackImport",
|
|
77
80
|
"resolveJsonldContext",
|
|
81
|
+
"holderRegisterWalletUnit",
|
|
82
|
+
"holderRefreshWalletUnit",
|
|
83
|
+
"holderGetWalletUnitAttestation",
|
|
78
84
|
"uninitialize",
|
|
79
85
|
];
|
|
80
86
|
// Typescript automatic assertions to keep ONECore and interfaceMethodNames in sync
|
package/dist/src/credential.d.ts
CHANGED
|
@@ -100,6 +100,22 @@ export type CredentialListQuery = ListQuery & {
|
|
|
100
100
|
status?: CredentialStateEnum[];
|
|
101
101
|
profile?: string;
|
|
102
102
|
include?: CredentialListIncludeEntityType[];
|
|
103
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
104
|
+
createdDateAfter?: string;
|
|
105
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
106
|
+
createdDateBefore?: string;
|
|
107
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
108
|
+
lastModifiedAfter?: string;
|
|
109
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
110
|
+
lastModifiedBefore?: string;
|
|
111
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
112
|
+
issuanceDateAfter?: string;
|
|
113
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
114
|
+
issuanceDateBefore?: string;
|
|
115
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
116
|
+
revocationDateAfter?: string;
|
|
117
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
118
|
+
revocationDateBefore?: string;
|
|
103
119
|
} & ({
|
|
104
120
|
name?: string;
|
|
105
121
|
searchType?: never;
|
|
@@ -119,6 +135,7 @@ export interface InvitationResultCredentialIssuance {
|
|
|
119
135
|
interactionId: string;
|
|
120
136
|
credentialIds: Array<CredentialListItem["id"]>;
|
|
121
137
|
txCode?: OpenID4VCITxCode;
|
|
138
|
+
credentialConfigurationsSupported: Record<CredentialListItem["id"], CredentialConfigurationSupported>;
|
|
122
139
|
}
|
|
123
140
|
export interface OpenID4VCITxCode {
|
|
124
141
|
inputMode?: OpenID4VCITxCodeInputMode;
|
|
@@ -129,3 +146,37 @@ export declare enum OpenID4VCITxCodeInputMode {
|
|
|
129
146
|
NUMERIC = "NUMERIC",
|
|
130
147
|
TEXT = "TEXT"
|
|
131
148
|
}
|
|
149
|
+
/** OID4VCI authorization request parameters. Use either `scope` or `authorizationDetails`. */
|
|
150
|
+
export interface InitiateIssuanceRequest {
|
|
151
|
+
organisationId: string;
|
|
152
|
+
protocol: string;
|
|
153
|
+
/** Issuer URL */
|
|
154
|
+
issuer: string;
|
|
155
|
+
clientId: string;
|
|
156
|
+
redirectUri?: string;
|
|
157
|
+
scope?: string[];
|
|
158
|
+
authorizationDetails?: InitiateIssuanceAuthorizationDetail[];
|
|
159
|
+
}
|
|
160
|
+
export interface InitiateIssuanceAuthorizationDetail {
|
|
161
|
+
type: string;
|
|
162
|
+
credentialConfigurationId: string;
|
|
163
|
+
}
|
|
164
|
+
export interface InitiateIssuanceResponse {
|
|
165
|
+
url: string;
|
|
166
|
+
}
|
|
167
|
+
export interface ContinueIssuanceResponse {
|
|
168
|
+
interactionId: string;
|
|
169
|
+
credentialIds: Array<CredentialListItem["id"]>;
|
|
170
|
+
/** Informs client of API about valid options for issuance including applicable signing algorithms. */
|
|
171
|
+
credentialConfigurationsSupported: Record<CredentialListItem["id"], CredentialConfigurationSupported>;
|
|
172
|
+
}
|
|
173
|
+
export interface CredentialConfigurationSupported {
|
|
174
|
+
proofTypesSupported: Record<string, OpenID4VCIProofTypeSupported>;
|
|
175
|
+
}
|
|
176
|
+
export interface OpenID4VCIProofTypeSupported {
|
|
177
|
+
proofSigningAlgValuesSupported: string[];
|
|
178
|
+
}
|
|
179
|
+
export interface AuthorizationCodeFlow {
|
|
180
|
+
interactionId: string;
|
|
181
|
+
authorizationCodeFlowUrl: string;
|
|
182
|
+
}
|
|
@@ -63,6 +63,14 @@ export interface CredentialSchemaListQuery extends ListQuery {
|
|
|
63
63
|
include?: CredentialSchemaListIncludeEntityType[];
|
|
64
64
|
schemaId?: string;
|
|
65
65
|
formats?: string[];
|
|
66
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
67
|
+
createdDateAfter?: string;
|
|
68
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
69
|
+
createdDateBefore?: string;
|
|
70
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
71
|
+
lastModifiedAfter?: string;
|
|
72
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
73
|
+
lastModifiedBefore?: string;
|
|
66
74
|
}
|
|
67
75
|
export declare enum WalletStorageType {
|
|
68
76
|
HARDWARE = "HARDWARE",
|
package/dist/src/history.d.ts
CHANGED
|
@@ -38,7 +38,9 @@ export declare enum HistoryEntityTypeEnum {
|
|
|
38
38
|
ORGANISATION = "ORGANISATION",
|
|
39
39
|
BACKUP = "BACKUP",
|
|
40
40
|
TRUST_ANCHOR = "TRUST_ANCHOR",
|
|
41
|
-
TRUST_ENTITY = "TRUST_ENTITY"
|
|
41
|
+
TRUST_ENTITY = "TRUST_ENTITY",
|
|
42
|
+
WALLET_UNIT = "WALLET_UNIT",
|
|
43
|
+
WALLET_UNIT_ATTESTATION = "WALLET_UNIT_ATTESTATION"
|
|
42
44
|
}
|
|
43
45
|
export declare enum HistorySearchTypeEnum {
|
|
44
46
|
CLAIM_NAME = "CLAIM_NAME",
|
|
@@ -55,21 +57,27 @@ export interface HistoryListQuery extends ListQuery {
|
|
|
55
57
|
actions?: HistoryActionEnum[];
|
|
56
58
|
entityTypes?: HistoryEntityTypeEnum[];
|
|
57
59
|
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
58
|
-
|
|
60
|
+
createdDateAfter?: string;
|
|
59
61
|
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
60
|
-
|
|
62
|
+
createdDateBefore?: string;
|
|
61
63
|
identifierId?: string;
|
|
62
64
|
credentialId?: string;
|
|
63
65
|
credentialSchemaId?: string;
|
|
64
66
|
proofSchemaId?: string;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
search?: HistoryListSearch;
|
|
68
|
+
}
|
|
69
|
+
export interface HistoryListSearch {
|
|
70
|
+
text: string;
|
|
71
|
+
type?: HistorySearchTypeEnum;
|
|
67
72
|
}
|
|
68
73
|
export interface HistoryErrorMetadata {
|
|
69
74
|
errorCode: string;
|
|
70
75
|
message: string;
|
|
71
76
|
}
|
|
72
|
-
export
|
|
77
|
+
export interface WalletUnitJWT {
|
|
78
|
+
jwt: string;
|
|
79
|
+
}
|
|
80
|
+
export type HistoryMetadata = UnexportableEntities | HistoryErrorMetadata | WalletUnitJWT;
|
|
73
81
|
export interface HistoryListItem {
|
|
74
82
|
id: string;
|
|
75
83
|
createdDate: string;
|
package/dist/src/history.js
CHANGED
|
@@ -39,6 +39,8 @@ export var HistoryEntityTypeEnum;
|
|
|
39
39
|
HistoryEntityTypeEnum["BACKUP"] = "BACKUP";
|
|
40
40
|
HistoryEntityTypeEnum["TRUST_ANCHOR"] = "TRUST_ANCHOR";
|
|
41
41
|
HistoryEntityTypeEnum["TRUST_ENTITY"] = "TRUST_ENTITY";
|
|
42
|
+
HistoryEntityTypeEnum["WALLET_UNIT"] = "WALLET_UNIT";
|
|
43
|
+
HistoryEntityTypeEnum["WALLET_UNIT_ATTESTATION"] = "WALLET_UNIT_ATTESTATION";
|
|
42
44
|
})(HistoryEntityTypeEnum || (HistoryEntityTypeEnum = {}));
|
|
43
45
|
export var HistorySearchTypeEnum;
|
|
44
46
|
(function (HistorySearchTypeEnum) {
|
package/dist/src/identifier.d.ts
CHANGED
|
@@ -122,4 +122,12 @@ export interface IdentifierListQuery extends ListQuery {
|
|
|
122
122
|
keyAlgorithms?: string[];
|
|
123
123
|
keyRoles?: KeyRoleEnum[];
|
|
124
124
|
keyStorages?: string[];
|
|
125
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
126
|
+
createdDateAfter?: string;
|
|
127
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
128
|
+
createdDateBefore?: string;
|
|
129
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
130
|
+
lastModifiedAfter?: string;
|
|
131
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
132
|
+
lastModifiedBefore?: string;
|
|
125
133
|
}
|
package/dist/src/proof.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CredentialDetail, CredentialListItem } from "./credential";
|
|
1
|
+
import { Claim, CredentialDetail, CredentialListItem } from "./credential";
|
|
2
2
|
import { CredentialSchema } from "./credentialSchema";
|
|
3
3
|
import { ListQuery, SortDirection } from "./list";
|
|
4
4
|
import { ProofInputClaimSchema, ProofSchemaListItem } from "./proofSchema";
|
|
@@ -120,7 +120,7 @@ export interface PresentationDefinitionField {
|
|
|
120
120
|
name?: string;
|
|
121
121
|
purpose?: string;
|
|
122
122
|
required: boolean;
|
|
123
|
-
keyMap: Record<
|
|
123
|
+
keyMap: Record<CredentialListItem["id"], Claim["key"]>;
|
|
124
124
|
}
|
|
125
125
|
export interface PresentationSubmitCredentialRequest {
|
|
126
126
|
credentialId: CredentialListItem["id"];
|
|
@@ -145,6 +145,22 @@ export interface ProofListQuery extends ListQuery {
|
|
|
145
145
|
proofSchemaIds?: string[];
|
|
146
146
|
exact?: ExactProofFilterColumnEnum[];
|
|
147
147
|
profile?: string;
|
|
148
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
149
|
+
createdDateAfter?: string;
|
|
150
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
151
|
+
createdDateBefore?: string;
|
|
152
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
153
|
+
lastModifiedAfter?: string;
|
|
154
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
155
|
+
lastModifiedBefore?: string;
|
|
156
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
157
|
+
requestedDateAfter?: string;
|
|
158
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
159
|
+
requestedDateBefore?: string;
|
|
160
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
161
|
+
completedDateAfter?: string;
|
|
162
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
163
|
+
completedDateBefore?: string;
|
|
148
164
|
}
|
|
149
165
|
export interface ProposeProofResponse {
|
|
150
166
|
proofId: string;
|
|
@@ -49,6 +49,14 @@ export interface ProofSchemaListQuery extends ListQuery {
|
|
|
49
49
|
exact?: ExactProofSchemaFilterColumnEnum[];
|
|
50
50
|
ids?: Array<ProofSchema["id"]>;
|
|
51
51
|
formats?: string[];
|
|
52
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
53
|
+
createdDateAfter?: string;
|
|
54
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
55
|
+
createdDateBefore?: string;
|
|
56
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
57
|
+
lastModifiedAfter?: string;
|
|
58
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
59
|
+
lastModifiedBefore?: string;
|
|
52
60
|
}
|
|
53
61
|
export interface ImportProofSchemaRequest {
|
|
54
62
|
organisationId: string;
|
package/dist/src/trust.d.ts
CHANGED
|
@@ -40,6 +40,14 @@ export interface TrustAnchorListQuery extends Omit<ListQuery, "organisationId">
|
|
|
40
40
|
exact?: ExactTrustAnchorFilterColumnEnum[];
|
|
41
41
|
type?: string;
|
|
42
42
|
isPublisher?: boolean;
|
|
43
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
44
|
+
createdDateAfter?: string;
|
|
45
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
46
|
+
createdDateBefore?: string;
|
|
47
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
48
|
+
lastModifiedAfter?: string;
|
|
49
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
50
|
+
lastModifiedBefore?: string;
|
|
43
51
|
}
|
|
44
52
|
export interface TrustEntityListItem {
|
|
45
53
|
id: string;
|
|
@@ -106,6 +114,14 @@ export interface TrustEntityListQuery {
|
|
|
106
114
|
exact?: ExactTrustEntityFilterColumnEnum[];
|
|
107
115
|
type?: string;
|
|
108
116
|
isPublisher?: boolean;
|
|
117
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
118
|
+
createdDateAfter?: string;
|
|
119
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
120
|
+
createdDateBefore?: string;
|
|
121
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
122
|
+
lastModifiedAfter?: string;
|
|
123
|
+
/** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
|
|
124
|
+
lastModifiedBefore?: string;
|
|
109
125
|
}
|
|
110
126
|
export declare enum SortableTrustEntityColumnEnum {
|
|
111
127
|
NAME = "NAME",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { KeyListItem } from "./key";
|
|
2
|
+
export declare enum WalletProviderTypeEnum {
|
|
3
|
+
PROCIVIS_ONE = "PROCIVIS_ONE"
|
|
4
|
+
}
|
|
5
|
+
export declare enum WalletUnitStatusEnum {
|
|
6
|
+
ACTIVE = "ACTIVE",
|
|
7
|
+
REVOKED = "REVOKED"
|
|
8
|
+
}
|
|
9
|
+
export interface WalletProvider {
|
|
10
|
+
url: string;
|
|
11
|
+
type: WalletProviderTypeEnum;
|
|
12
|
+
name: string;
|
|
13
|
+
}
|
|
14
|
+
export interface HolderRegisterWalletUnitRequest {
|
|
15
|
+
organisationId: string;
|
|
16
|
+
walletProvider: WalletProvider;
|
|
17
|
+
keyId: KeyListItem["id"];
|
|
18
|
+
}
|
|
19
|
+
export interface HolderRefreshWalletUnitRequest {
|
|
20
|
+
organisationId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface HolderAttestationWalletUnitResponse {
|
|
23
|
+
id: string;
|
|
24
|
+
createdDate: string;
|
|
25
|
+
lastModified: string;
|
|
26
|
+
expirationDate: string;
|
|
27
|
+
status: WalletUnitStatusEnum;
|
|
28
|
+
attestation: string;
|
|
29
|
+
walletUnitId: string;
|
|
30
|
+
walletProviderUrl: string;
|
|
31
|
+
walletProviderType: WalletProviderTypeEnum;
|
|
32
|
+
walletProviderName: string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var WalletProviderTypeEnum;
|
|
2
|
+
(function (WalletProviderTypeEnum) {
|
|
3
|
+
WalletProviderTypeEnum["PROCIVIS_ONE"] = "PROCIVIS_ONE";
|
|
4
|
+
})(WalletProviderTypeEnum || (WalletProviderTypeEnum = {}));
|
|
5
|
+
export var WalletUnitStatusEnum;
|
|
6
|
+
(function (WalletUnitStatusEnum) {
|
|
7
|
+
WalletUnitStatusEnum["ACTIVE"] = "ACTIVE";
|
|
8
|
+
WalletUnitStatusEnum["REVOKED"] = "REVOKED";
|
|
9
|
+
})(WalletUnitStatusEnum || (WalletUnitStatusEnum = {}));
|
package/ios/Deserialize.swift
CHANGED
|
@@ -79,17 +79,6 @@ private func deserializeSpecific(_ value: Any, _ type: Any.Type, _ codingPath: [
|
|
|
79
79
|
return deserializeCredentialSchemaTypeBindingEnum(data)
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
if type == HistoryListQueryBindingDto.self {
|
|
83
|
-
guard let data = value as? NSDictionary else {
|
|
84
|
-
let description = "Expected to decode \(type) but found '\(value)' instead."
|
|
85
|
-
throw DecodingError.typeMismatch(
|
|
86
|
-
type,
|
|
87
|
-
DecodingError.Context(codingPath: codingPath, debugDescription: description)
|
|
88
|
-
)
|
|
89
|
-
}
|
|
90
|
-
return try deserializeHistoryListQuery(data)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
82
|
if type == OptionalString.self {
|
|
94
83
|
if value is NSNull {
|
|
95
84
|
return OptionalString.none
|
|
@@ -124,38 +113,3 @@ private func deserializeCredentialSchemaTypeBindingEnum(_ credentialSchemaType:
|
|
|
124
113
|
return .other(value: other)
|
|
125
114
|
}
|
|
126
115
|
}
|
|
127
|
-
|
|
128
|
-
private func deserializeHistoryListQuery(_ query: NSDictionary) throws -> HistoryListQueryBindingDto
|
|
129
|
-
{
|
|
130
|
-
return HistoryListQueryBindingDto(
|
|
131
|
-
page: try safeCast(query.value(forKey: "page")),
|
|
132
|
-
pageSize: try safeCast(query.value(forKey: "pageSize")),
|
|
133
|
-
organisationId: try safeCast(query.value(forKey: "organisationId")),
|
|
134
|
-
entityId: query.value(forKey: "entityId") as? String,
|
|
135
|
-
entityTypes: try opt(query.value(forKey: "entityTypes") as? NSArray, enumList),
|
|
136
|
-
actions: try opt(query.value(forKey: "actions") as? NSArray, enumList),
|
|
137
|
-
createdDateFrom: query.value(forKey: "createdDateFrom") as? String,
|
|
138
|
-
createdDateTo: query.value(forKey: "createdDateTo") as? String,
|
|
139
|
-
identifierId: query.value(forKey: "identifierId") as? String,
|
|
140
|
-
credentialId: query.value(forKey: "credentialId") as? String,
|
|
141
|
-
credentialSchemaId: query.value(forKey: "credentialSchemaId") as? String,
|
|
142
|
-
proofSchemaId: query.value(forKey: "proofSchemaId") as? String,
|
|
143
|
-
search: try deserializeHistorySearch(
|
|
144
|
-
text: query.value(forKey: "searchText") as? String,
|
|
145
|
-
type: query.value(forKey: "searchType") as? String
|
|
146
|
-
)
|
|
147
|
-
)
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
private func deserializeHistorySearch(text: String?, type: String?) throws
|
|
151
|
-
-> HistorySearchBindingDto?
|
|
152
|
-
{
|
|
153
|
-
if text == nil {
|
|
154
|
-
return nil
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
return HistorySearchBindingDto(
|
|
158
|
-
text: text!,
|
|
159
|
-
type: try opt(type, deserializeEnum)
|
|
160
|
-
)
|
|
161
|
-
}
|
|
@@ -63,9 +63,7 @@ RCT_EXTERN_METHOD(deleteIdentifier:(NSString *)identifierId
|
|
|
63
63
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
64
64
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
65
65
|
|
|
66
|
-
RCT_EXTERN_METHOD(handleInvitation:(
|
|
67
|
-
organisationId:(NSString *)organisationId
|
|
68
|
-
transport:(NSArray *)transport
|
|
66
|
+
RCT_EXTERN_METHOD(handleInvitation:(NSDictionary *)request
|
|
69
67
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
70
68
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
71
69
|
|
|
@@ -81,6 +79,14 @@ RCT_EXTERN_METHOD(holderRejectCredential:(NSString *)interactionId
|
|
|
81
79
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
82
80
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
83
81
|
|
|
82
|
+
RCT_EXTERN_METHOD(initiateIssuance:(NSDictionary *)request
|
|
83
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
84
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
85
|
+
|
|
86
|
+
RCT_EXTERN_METHOD(continueIssuance:(NSString *)url
|
|
87
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
88
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
89
|
+
|
|
84
90
|
RCT_EXTERN_METHOD(getPresentationDefinition:(NSString *)proofId
|
|
85
91
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
86
92
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
@@ -271,6 +277,18 @@ RCT_EXTERN_METHOD(resolveJsonldContext:(NSString *)url
|
|
|
271
277
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
272
278
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
273
279
|
|
|
280
|
+
RCT_EXTERN_METHOD(holderRegisterWalletUnit:(NSDictionary *)request
|
|
281
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
282
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
283
|
+
|
|
284
|
+
RCT_EXTERN_METHOD(holderRefreshWalletUnit:(NSDictionary *)request
|
|
285
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
286
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
287
|
+
|
|
288
|
+
RCT_EXTERN_METHOD(holderGetWalletUnitAttestation:(NSString *)organisationId
|
|
289
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
290
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
291
|
+
|
|
274
292
|
RCT_EXTERN_METHOD(uninitialize:(BOOL *)deleteData
|
|
275
293
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
276
294
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
@@ -208,20 +208,14 @@ class ProcivisOneCoreModule: RCTEventEmitter {
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
@objc(handleInvitation:
|
|
211
|
+
@objc(handleInvitation:resolver:rejecter:)
|
|
212
212
|
func handleInvitation(
|
|
213
|
-
|
|
214
|
-
organisationId: String,
|
|
215
|
-
transport: NSArray?,
|
|
213
|
+
request: NSDictionary,
|
|
216
214
|
resolve: @escaping RCTPromiseResolveBlock,
|
|
217
215
|
reject: @escaping RCTPromiseRejectBlock
|
|
218
216
|
) {
|
|
219
217
|
asyncCall(resolve, reject) {
|
|
220
|
-
let result = try await self.getCore().handleInvitation(
|
|
221
|
-
url: url,
|
|
222
|
-
organisationId: organisationId,
|
|
223
|
-
transport: try deserializeOpt(transport)
|
|
224
|
-
)
|
|
218
|
+
let result = try await self.getCore().handleInvitation(request: try deserialize(request))
|
|
225
219
|
return try serializeAny(result)
|
|
226
220
|
}
|
|
227
221
|
}
|
|
@@ -260,6 +254,30 @@ class ProcivisOneCoreModule: RCTEventEmitter {
|
|
|
260
254
|
}
|
|
261
255
|
}
|
|
262
256
|
|
|
257
|
+
@objc(initiateIssuance:resolver:rejecter:)
|
|
258
|
+
func initiateIssuance(
|
|
259
|
+
request: NSDictionary,
|
|
260
|
+
resolve: @escaping RCTPromiseResolveBlock,
|
|
261
|
+
reject: @escaping RCTPromiseRejectBlock
|
|
262
|
+
) {
|
|
263
|
+
asyncCall(resolve, reject) {
|
|
264
|
+
let result = try await self.getCore().initiateIssuance(request: try deserialize(request))
|
|
265
|
+
return try serializeAny(result)
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
@objc(continueIssuance:resolver:rejecter:)
|
|
270
|
+
func continueIssuance(
|
|
271
|
+
url: String,
|
|
272
|
+
resolve: @escaping RCTPromiseResolveBlock,
|
|
273
|
+
reject: @escaping RCTPromiseRejectBlock
|
|
274
|
+
) {
|
|
275
|
+
asyncCall(resolve, reject) {
|
|
276
|
+
let result = try await self.getCore().continueIssuance(url: url)
|
|
277
|
+
return try serializeAny(result)
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
263
281
|
@objc(getPresentationDefinition:resolver:rejecter:)
|
|
264
282
|
func getPresentationDefinition(
|
|
265
283
|
proofId: String,
|
|
@@ -710,7 +728,7 @@ class ProcivisOneCoreModule: RCTEventEmitter {
|
|
|
710
728
|
return try serializeAny(trustEntity)
|
|
711
729
|
}
|
|
712
730
|
}
|
|
713
|
-
|
|
731
|
+
|
|
714
732
|
@objc(resolveTrustEntityByIdentifier:resolver:rejecter:)
|
|
715
733
|
func resolveTrustEntityByIdentifier(
|
|
716
734
|
request: NSDictionary,
|
|
@@ -840,6 +858,42 @@ class ProcivisOneCoreModule: RCTEventEmitter {
|
|
|
840
858
|
}
|
|
841
859
|
}
|
|
842
860
|
|
|
861
|
+
@objc(holderRegisterWalletUnit:resolver:rejecter:)
|
|
862
|
+
func holderRegisterWalletUnit(
|
|
863
|
+
request: NSDictionary,
|
|
864
|
+
resolve: @escaping RCTPromiseResolveBlock,
|
|
865
|
+
reject: @escaping RCTPromiseRejectBlock
|
|
866
|
+
) {
|
|
867
|
+
asyncCall(resolve, reject) {
|
|
868
|
+
try await self.getCore().holderRegisterWalletUnit(request: try deserialize(request))
|
|
869
|
+
return nil as NSDictionary?
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
@objc(holderRefreshWalletUnit:resolver:rejecter:)
|
|
874
|
+
func holderRefreshWalletUnit(
|
|
875
|
+
request: NSDictionary,
|
|
876
|
+
resolve: @escaping RCTPromiseResolveBlock,
|
|
877
|
+
reject: @escaping RCTPromiseRejectBlock
|
|
878
|
+
) {
|
|
879
|
+
asyncCall(resolve, reject) {
|
|
880
|
+
try await self.getCore().holderRefreshWalletUnit(request: try deserialize(request))
|
|
881
|
+
return nil as NSDictionary?
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
@objc(holderGetWalletUnitAttestation:resolver:rejecter:)
|
|
886
|
+
func holderGetWalletUnitAttestation(
|
|
887
|
+
organisationId: String,
|
|
888
|
+
resolve: @escaping RCTPromiseResolveBlock,
|
|
889
|
+
reject: @escaping RCTPromiseRejectBlock
|
|
890
|
+
) {
|
|
891
|
+
asyncCall(resolve, reject) {
|
|
892
|
+
let result = try await self.getCore().holderGetWalletUnitAttestation(organisationId: organisationId)
|
|
893
|
+
return try serializeAny(result)
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
|
|
843
897
|
@objc(uninitialize:resolver:rejecter:)
|
|
844
898
|
func uninitialize(
|
|
845
899
|
deleteData: Bool,
|
package/ios/Serialize.swift
CHANGED
|
@@ -51,6 +51,8 @@ private func serialize(historyMetadata: HistoryMetadataBinding) throws -> Any {
|
|
|
51
51
|
return try serializeAny(value);
|
|
52
52
|
case let .errorMetadata(value):
|
|
53
53
|
return try serializeAny(value);
|
|
54
|
+
case let .walletUnitJwt(value):
|
|
55
|
+
return ["jwt": value] as NSDictionary;
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
|
|
@@ -111,5 +113,11 @@ private func serialize(invitationResponse: HandleInvitationResponseBindingEnum)
|
|
|
111
113
|
"interactionId": interactionId,
|
|
112
114
|
"proofId": proofId
|
|
113
115
|
];
|
|
116
|
+
|
|
117
|
+
case let .authorizationCodeFlow(interactionId, authorizationCodeFlowUrl):
|
|
118
|
+
return [
|
|
119
|
+
"interactionId": interactionId,
|
|
120
|
+
"authorizationCodeFlowUrl": authorizationCodeFlowUrl
|
|
121
|
+
];
|
|
114
122
|
}
|
|
115
123
|
}
|