@procivis/react-native-one-core 1.60807.0 → 1.73295.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.
@@ -22,6 +22,7 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
22
22
  override fun getName() = "ProcivisOneCoreModule"
23
23
 
24
24
  private var oneCore: OneCoreBindingInterface? = null
25
+ private var nfcHce: NfcHce = NfcHCE(reactContext)
25
26
  private val scope = CoroutineScope(EmptyCoroutineContext)
26
27
 
27
28
  private fun getCore(): OneCoreBindingInterface {
@@ -60,7 +61,7 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
60
61
  remoteSecureElement = ubiqu,
61
62
  bleCentral = AndroidBLECentral(context),
62
63
  blePeripheral = AndroidBLEPeripheral(context),
63
- nfcHce = NfcHCE(context),
64
+ nfcHce = nfcHce,
64
65
  nfcScanner = NfcScanner(context) { context.currentActivity }
65
66
  )
66
67
  )
@@ -196,16 +197,11 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
196
197
 
197
198
  @ReactMethod
198
199
  fun holderAcceptCredential(
199
- interactionId: String,
200
- didId: String?,
201
- identifierId: String?,
202
- keyId: String?,
203
- txCode: String?,
200
+ request: ReadableMap,
204
201
  promise: Promise
205
202
  ) {
206
203
  asyncCall(promise, scope) {
207
- getCore().holderAcceptCredential(interactionId, didId, identifierId, keyId, txCode)
208
- return@asyncCall null
204
+ return@asyncCall getCore().holderAcceptCredential(construct(request))
209
205
  }
210
206
  }
211
207
 
@@ -241,6 +237,14 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
241
237
  }
242
238
  }
243
239
 
240
+ @ReactMethod
241
+ fun getPresentationDefinitionV2(proofId: String, promise: Promise) {
242
+ asyncCall(promise, scope) {
243
+ val presentationDefinition = getCore().getPresentationDefinitionV2(proofId)
244
+ return@asyncCall convertToRN(presentationDefinition)
245
+ }
246
+ }
247
+
244
248
  @ReactMethod
245
249
  fun holderRejectProof(interactionId: String, promise: Promise) {
246
250
  asyncCall(promise, scope) {
@@ -253,9 +257,6 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
253
257
  fun holderSubmitProof(
254
258
  interactionId: String,
255
259
  credentials: ReadableMap,
256
- didId: String?,
257
- identifierId: String?,
258
- keyId: String?,
259
260
  promise: Promise
260
261
  ) {
261
262
  asyncCall(promise, scope) {
@@ -279,12 +280,49 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
279
280
  }
280
281
  submitCredentials[entry.key] = credentialList
281
282
  }
282
- getCore().holderSubmitProof(
283
+ getCore().holderSubmitProof(interactionId, submitCredentials)
284
+ return@asyncCall null
285
+ }
286
+ }
287
+
288
+ @ReactMethod
289
+ fun holderSubmitProofV2(
290
+ interactionId: String,
291
+ credentials: ReadableMap,
292
+ promise: Promise
293
+ ) {
294
+ asyncCall(promise, scope) {
295
+ val submission =
296
+ mutableMapOf<String, List<PresentationSubmitV2CredentialRequestBindingDto>>()
297
+ for (entry in credentials.entryIterator) {
298
+ val credentialList = when (val credentialValue = entry.value) {
299
+ is ReadableMap -> {
300
+ // Single credential object - convert to list
301
+ listOf(
302
+ construct<PresentationSubmitV2CredentialRequestBindingDto>(
303
+ credentialValue
304
+ )
305
+ )
306
+ }
307
+
308
+ is ReadableArray -> {
309
+ // Array of credentials - convert each one
310
+ (0 until credentialValue.size()).map { index ->
311
+ construct<PresentationSubmitV2CredentialRequestBindingDto>(
312
+ credentialValue.getMap(index)!!
313
+ )
314
+ }
315
+ }
316
+
317
+ else -> {
318
+ throw IllegalArgumentException("Credential value must be either a Map or Array")
319
+ }
320
+ }
321
+ submission[entry.key] = credentialList
322
+ }
323
+ getCore().holderSubmitProofV2(
283
324
  interactionId,
284
- submitCredentials,
285
- didId,
286
- identifierId,
287
- keyId
325
+ submission
288
326
  )
289
327
  return@asyncCall null
290
328
  }
@@ -385,10 +423,9 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
385
423
  }
386
424
 
387
425
  @ReactMethod
388
- fun proposeProof(exchange: String, organisationId: String, engagement: ReadableArray, promise: Promise) {
426
+ fun proposeProof(request: ReadableMap, promise: Promise) {
389
427
  asyncCall(promise, scope) {
390
- val engagement = DeserializeSpecific.ids(engagement)
391
- val result = getCore().proposeProof(exchange, organisationId, engagement)
428
+ val result = getCore().proposeProof(construct(request))
392
429
  return@asyncCall convertToRN(result)
393
430
  }
394
431
  }
@@ -616,23 +653,22 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
616
653
  @ReactMethod
617
654
  fun holderRegisterWalletUnit(request: ReadableMap, promise: Promise) {
618
655
  asyncCall(promise, scope) {
619
- val result = getCore().holderRegisterWalletUnit(construct(request))
620
- return@asyncCall convertToRN(result)
656
+ return@asyncCall getCore().holderRegisterWalletUnit(construct(request))
621
657
  }
622
658
  }
623
659
 
624
660
  @ReactMethod
625
- fun holderRefreshWalletUnit(request: ReadableMap, promise: Promise) {
661
+ fun holderWalletUnitStatus(walletUnitId: String, promise: Promise) {
626
662
  asyncCall(promise, scope) {
627
- getCore().holderRefreshWalletUnit(construct(request))
663
+ getCore().holderWalletUnitStatus(walletUnitId)
628
664
  return@asyncCall null
629
665
  }
630
666
  }
631
667
 
632
668
  @ReactMethod
633
- fun holderGetWalletUnitAttestation(organisationId: String, promise: Promise) {
669
+ fun holderGetWalletUnit(walletUnitId: String, promise: Promise) {
634
670
  asyncCall(promise, scope) {
635
- val result = getCore().holderGetWalletUnitAttestation(organisationId)
671
+ val result = getCore().holderGetWalletUnit(walletUnitId)
636
672
  return@asyncCall convertToRN(result)
637
673
  }
638
674
  }
@@ -664,6 +700,13 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
664
700
  }
665
701
  }
666
702
 
703
+ @ReactMethod
704
+ fun isNfcHceSupported(promise: Promise) {
705
+ asyncCall(promise, scope) {
706
+ return@asyncCall nfcHce.isSupported()
707
+ }
708
+ }
709
+
667
710
  // ===== Ubiqu specific methods
668
711
  @ReactMethod
669
712
  fun changeRSEPin(promise: Promise) {
@@ -12,6 +12,8 @@ object SerializeSpecific {
12
12
  HistoryMetadataBinding::class.java,
13
13
  ClaimBindingDto::class.java,
14
14
  ProofRequestClaimBindingDto::class.java,
15
+ CredentialQueryResponseBindingDto::class.java,
16
+ PresentationDefinitionV2ClaimBindingDto::class.java
15
17
  )
16
18
 
17
19
  fun isCustomConversionType(input: Any?): Boolean {
@@ -33,6 +35,12 @@ object SerializeSpecific {
33
35
  if (input is ProofRequestClaimBindingDto) {
34
36
  return proofClaim(input)
35
37
  }
38
+ if (input is CredentialQueryResponseBindingDto) {
39
+ return credentialQuery(input)
40
+ }
41
+ if (input is PresentationDefinitionV2ClaimBindingDto) {
42
+ return presentationDefinitionV2Claim(input)
43
+ }
36
44
  throw IllegalArgumentException("Invalid map conversion: $input")
37
45
  }
38
46
 
@@ -53,6 +61,22 @@ object SerializeSpecific {
53
61
  }
54
62
  }
55
63
 
64
+ private fun credentialQuery(dto: CredentialQueryResponseBindingDto): ReadableMap {
65
+ val result = Arguments.createMap()
66
+ result.putBoolean("multiple", dto.multiple)
67
+ when (val value = dto.credentialOrFailureHint) {
68
+ is ApplicableCredentialOrFailureHintBindingEnum.ApplicableCredentials -> result.putArray(
69
+ "applicableCredentials",
70
+ convertToRN(value.applicableCredentials) as ReadableArray
71
+ )
72
+
73
+ is ApplicableCredentialOrFailureHintBindingEnum.FailureHint -> {
74
+ result.putMap("failureHint", convertToRN(value.failureHint) as ReadableMap)
75
+ }
76
+ }
77
+ return result
78
+ }
79
+
56
80
  private fun claim(c: ClaimBindingDto): ReadableMap {
57
81
  val result = Arguments.createMap()
58
82
  result.putString("id", c.id)
@@ -70,6 +94,7 @@ object SerializeSpecific {
70
94
  result.putInt("value", value.value.toInt())
71
95
  }
72
96
  }
97
+
73
98
  is ClaimValueBindingDto.String -> result.putString("value", value.value)
74
99
  is ClaimValueBindingDto.Nested ->
75
100
  result.putArray("value", convertToRN(value.value) as ReadableArray)
@@ -94,6 +119,44 @@ object SerializeSpecific {
94
119
 
95
120
  return result
96
121
  }
122
+
123
+ private fun presentationDefinitionV2Claim(c: PresentationDefinitionV2ClaimBindingDto): ReadableMap {
124
+ val result = Arguments.createMap()
125
+ result.putString("path", c.path)
126
+ result.putMap("schema", convertToRN(c.schema) as ReadableMap)
127
+ result.putBoolean("userSelection", c.userSelection)
128
+ result.putBoolean("required", c.required)
129
+
130
+ when (val value = c.value) {
131
+ is PresentationDefinitionV2ClaimValueBindingDto.Boolean -> result.putBoolean(
132
+ "value",
133
+ value.value
134
+ )
135
+
136
+ is PresentationDefinitionV2ClaimValueBindingDto.Float -> result.putDouble(
137
+ "value",
138
+ value.value
139
+ )
140
+
141
+ is PresentationDefinitionV2ClaimValueBindingDto.Integer -> {
142
+ if (value.value < Int.MIN_VALUE || value.value > Int.MAX_VALUE) {
143
+ result.putDouble("value", value.value.toDouble())
144
+ } else {
145
+ result.putInt("value", value.value.toInt())
146
+ }
147
+ }
148
+
149
+ is PresentationDefinitionV2ClaimValueBindingDto.String -> result.putString(
150
+ "value",
151
+ value.value
152
+ )
153
+
154
+ is PresentationDefinitionV2ClaimValueBindingDto.Nested ->
155
+ result.putArray("value", convertToRN(value.value) as ReadableArray)
156
+ }
157
+
158
+ return result
159
+ }
97
160
  }
98
161
 
99
162
  object Str {
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/60807/android/onecore-debug.aar",
5
- "sha1": "164dfcb986d8f86596e69ceed8a470562d3b0b6f"
4
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/73295/android/onecore-debug.aar",
5
+ "sha1": "d3c6fd084ca2aa6b5ae413031ac29092a1dd86fe"
6
6
  },
7
7
  "release": {
8
- "url": "https://onesdk.blob.core.windows.net/core-sdk/60807/android/onecore-release.aar",
9
- "sha1": "da72ce7724c932b14b19df2911ec7c2586c31130"
8
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/73295/android/onecore-release.aar",
9
+ "sha1": "1507598dda415366737cf806132c8e5550eeb3c0"
10
10
  }
11
11
  },
12
12
  "ios": {
13
- "url": "https://onesdk.blob.core.windows.net/core-sdk/60807/ios/deploy.zip",
14
- "sha1": "7b5d19a6621d7e3eb0fcc492e70681001d5f3483"
13
+ "url": "https://onesdk.blob.core.windows.net/core-sdk/73295/ios/deploy.zip",
14
+ "sha1": "0d6ade39b50c670d553be0ca592747629d5d4114"
15
15
  }
16
16
  }
@@ -4,5 +4,8 @@ export declare enum CacheType {
4
4
  STATUS_LIST_CREDENTIAL = "STATUS_LIST_CREDENTIAL",
5
5
  VCT_METADATA = "VCT_METADATA",
6
6
  JSON_SCHEMA = "JSON_SCHEMA",
7
- TRUST_LIST = "TRUST_LIST"
7
+ TRUST_LIST = "TRUST_LIST",
8
+ X509_CRL = "X509_CRL",
9
+ ANDROID_ATTESTATION_CRL = "ANDROID_ATTESTATION_CRL",
10
+ OPEN_ID_METADATA = "OPEN_ID_METADATA"
8
11
  }
package/dist/src/cache.js CHANGED
@@ -6,4 +6,7 @@ export var CacheType;
6
6
  CacheType["VCT_METADATA"] = "VCT_METADATA";
7
7
  CacheType["JSON_SCHEMA"] = "JSON_SCHEMA";
8
8
  CacheType["TRUST_LIST"] = "TRUST_LIST";
9
+ CacheType["X509_CRL"] = "X509_CRL";
10
+ CacheType["ANDROID_ATTESTATION_CRL"] = "ANDROID_ATTESTATION_CRL";
11
+ CacheType["OPEN_ID_METADATA"] = "OPEN_ID_METADATA";
9
12
  })(CacheType || (CacheType = {}));
@@ -71,9 +71,11 @@ export declare enum DataTypeEnum {
71
71
  String = "STRING",
72
72
  Number = "NUMBER",
73
73
  Date = "DATE",
74
- File = "FILE",
74
+ Picture = "PICTURE",
75
+ SwiyuPicture = "SWIYU_PICTURE",
75
76
  Boolean = "BOOLEAN",
76
- Object = "OBJECT"
77
+ Object = "OBJECT",
78
+ Array = "ARRAY"
77
79
  }
78
80
  type DataTypeError = string | Record<string, string>;
79
81
  export interface StringDataTypeParams {
@@ -107,10 +109,10 @@ export type DataTypeParams = {
107
109
  type: DataTypeEnum.Date;
108
110
  params?: DateDataTypeParams;
109
111
  } | {
110
- type: DataTypeEnum.File;
112
+ type: DataTypeEnum.Picture | DataTypeEnum.SwiyuPicture;
111
113
  params?: FileDataTypeParams;
112
114
  } | {
113
- type: DataTypeEnum.Object;
115
+ type: DataTypeEnum.Object | DataTypeEnum.Array | DataTypeEnum.Boolean;
114
116
  params?: undefined;
115
117
  };
116
118
  export declare enum IssuanceProtocolFeatureEnum {
@@ -146,5 +148,6 @@ export interface Config {
146
148
  cacheEntities: ConfigEntities;
147
149
  task: ConfigEntities;
148
150
  credentialIssuer: ConfigEntities<undefined, {}>;
151
+ walletProvider: ConfigEntities;
149
152
  }
150
153
  export {};
@@ -38,9 +38,11 @@ export var DataTypeEnum;
38
38
  DataTypeEnum["String"] = "STRING";
39
39
  DataTypeEnum["Number"] = "NUMBER";
40
40
  DataTypeEnum["Date"] = "DATE";
41
- DataTypeEnum["File"] = "FILE";
41
+ DataTypeEnum["Picture"] = "PICTURE";
42
+ DataTypeEnum["SwiyuPicture"] = "SWIYU_PICTURE";
42
43
  DataTypeEnum["Boolean"] = "BOOLEAN";
43
44
  DataTypeEnum["Object"] = "OBJECT";
45
+ DataTypeEnum["Array"] = "ARRAY";
44
46
  })(DataTypeEnum || (DataTypeEnum = {}));
45
47
  export var IssuanceProtocolFeatureEnum;
46
48
  (function (IssuanceProtocolFeatureEnum) {
@@ -1,18 +1,18 @@
1
1
  import { BackupCreate, ImportBackupMetadata, UnexportableEntities } from "./backup";
2
2
  import { Config } from "./config";
3
- import { AuthorizationCodeFlow, ContinueIssuanceResponse, CredentialDetail, CredentialListItem, CredentialListQuery, CredentialRevocationCheckResponse, InitiateIssuanceRequest, InitiateIssuanceResponse, InvitationResultCredentialIssuance } from "./credential";
3
+ import { AuthorizationCodeFlow, ContinueIssuanceResponse, CredentialDetail, CredentialListItem, CredentialListQuery, CredentialRevocationCheckResponse, HolderAcceptCredentialRequest, 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";
7
7
  import { KeyRequest } from "./key";
8
8
  import { ItemList } from "./list";
9
- import { CreateProofRequest, InvitationResultProofRequest, PresentationDefinition, PresentationDefinitionRequestedCredential, PresentationSubmitCredentialRequest, ProofDetail, ProofListItem, ProofListQuery, ProposeProofResponse, ShareProofRequest, ShareProofResponse } from "./proof";
9
+ import { CreateProofRequest, InvitationResultProofRequest, PresentationDefinition, PresentationDefinitionRequestedCredential, PresentationDefinitionV2, PresentationSubmitCredentialRequest, PresentationSubmitV2CredentialRequest, ProofDetail, ProofListItem, ProofListQuery, ProposeProofRequest, ProposeProofResponse, ShareProofRequest, ShareProofResponse } from "./proof";
10
10
  import { CreateProofSchemaRequest, ImportProofSchemaRequest, ProofSchema, ProofSchemaListItem, ProofSchemaListQuery, ShareProofSchemaResponse } from "./proofSchema";
11
11
  import { CreateRemoteTrustEntityRequest, CreateTrustAnchorRequest, CreateTrustEntityRequest, RemoteTrustEntity, ResolvedIdentifierTrustEntity, ResolveTrustEntityByIdentifierRequest, TrustAnchor, TrustAnchorListItem, TrustAnchorListQuery, TrustEntity, TrustEntityListItem, TrustEntityListQuery, UpdateRemoteTrustEntityRequest } from "./trust";
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, HolderRegisterWalletUnitResponse } from "./walletUnit";
15
+ import { HolderRegisterWalletUnitRequest, HolderWalletUnitDetail } from "./walletUnit";
16
16
  import { NfcScanRequest } from "./nfc";
17
17
  export * from "./backup";
18
18
  export * from "./cache";
@@ -76,7 +76,7 @@ export interface ONECore {
76
76
  * request for proof).
77
77
  */
78
78
  handleInvitation(request: HandleInvitationRequest): Promise<InvitationResult>;
79
- holderAcceptCredential(interactionId: InvitationResultCredentialIssuance["interactionId"], didId: DidListItem["id"] | undefined, identifierId: IdentifierListItem["id"] | undefined, keyId: string | undefined, txCode: string | undefined): Promise<void>;
79
+ holderAcceptCredential(request: HolderAcceptCredentialRequest): Promise<CredentialDetail["id"]>;
80
80
  holderRejectCredential(interactionId: InvitationResultCredentialIssuance["interactionId"]): Promise<void>;
81
81
  /** For wallets, starts the OID4VCI Authorization Code Flow. */
82
82
  initiateIssuance(request: InitiateIssuanceRequest): Promise<InitiateIssuanceResponse>;
@@ -89,8 +89,10 @@ export interface ONECore {
89
89
  * "myapp://example/credential-offer?code=xxx&clientId=myWallet&..." */
90
90
  url: string): Promise<ContinueIssuanceResponse>;
91
91
  getPresentationDefinition(proofId: ProofDetail["id"]): Promise<PresentationDefinition>;
92
+ getPresentationDefinitionV2(proofId: ProofDetail["id"]): Promise<PresentationDefinitionV2>;
92
93
  holderRejectProof(interactionId: InvitationResultProofRequest["interactionId"]): Promise<void>;
93
- holderSubmitProof(interactionId: InvitationResultProofRequest["interactionId"], credentials: Record<PresentationDefinitionRequestedCredential["id"], PresentationSubmitCredentialRequest | PresentationSubmitCredentialRequest[]>, didId: DidListItem["id"] | undefined, identifierId: IdentifierListItem["id"] | undefined, keyId: string | undefined): Promise<void>;
94
+ holderSubmitProof(interactionId: InvitationResultProofRequest["interactionId"], credentials: Record<PresentationDefinitionRequestedCredential["id"], PresentationSubmitCredentialRequest | PresentationSubmitCredentialRequest[]>): Promise<void>;
95
+ holderSubmitProofV2(interactionId: InvitationResultProofRequest["interactionId"], credentials: Record<string, PresentationSubmitV2CredentialRequest | PresentationSubmitV2CredentialRequest[]>): Promise<void>;
94
96
  getCredentials(query: CredentialListQuery): Promise<ItemList<CredentialListItem>>;
95
97
  runTask(task: string): Promise<string>;
96
98
  deleteProofClaims(proofId: ProofDetail["id"]): Promise<void>;
@@ -112,7 +114,7 @@ export interface ONECore {
112
114
  * Reference the `verificationEngagement` entry of your configuration
113
115
  * for your options for `engagement`.
114
116
  */
115
- proposeProof(exchange: string, organisationId: string, engagement: string[]): Promise<ProposeProofResponse>;
117
+ proposeProof(request: ProposeProofRequest): Promise<ProposeProofResponse>;
116
118
  createProofSchema(request: CreateProofSchemaRequest): Promise<ProofSchema["id"]>;
117
119
  getProofSchemas(query: ProofSchemaListQuery): Promise<ItemList<ProofSchemaListItem>>;
118
120
  getProofSchema(proofSchemaId: ProofSchema["id"]): Promise<ProofSchema>;
@@ -158,9 +160,9 @@ export interface ONECore {
158
160
  */
159
161
  rollbackImport(): Promise<void>;
160
162
  resolveJsonldContext(url: string): Promise<ResolveJsonLdContextResponse>;
161
- holderRegisterWalletUnit(request: HolderRegisterWalletUnitRequest): Promise<HolderRegisterWalletUnitResponse>;
162
- holderRefreshWalletUnit(request: HolderRefreshWalletUnitRequest): Promise<void>;
163
- holderGetWalletUnitAttestation(organisationId: string): Promise<HolderAttestationWalletUnitResponse>;
163
+ holderRegisterWalletUnit(request: HolderRegisterWalletUnitRequest): Promise<HolderWalletUnitDetail["id"]>;
164
+ holderWalletUnitStatus(walletUnitId: HolderWalletUnitDetail["id"]): Promise<void>;
165
+ holderGetWalletUnit(walletUnitId: HolderWalletUnitDetail["id"]): Promise<HolderWalletUnitDetail>;
164
166
  /**
165
167
  * Start scanning for ISO 18013-5 NFC engagement
166
168
  *
@@ -181,4 +183,4 @@ export interface ONECore {
181
183
  */
182
184
  uninitialize(deleteData: boolean): Promise<void>;
183
185
  }
184
- 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", "nfcReadIsoMdlEngagement", "nfcStopIsoMdlEngagement", "uninitialize"];
186
+ export declare const interfaceMethodNames: readonly ["getVersion", "getConfig", "createOrganisation", "upsertOrganisation", "generateKey", "createDid", "getDids", "createIdentifier", "getIdentifier", "getIdentifiers", "deleteIdentifier", "handleInvitation", "holderAcceptCredential", "holderRejectCredential", "initiateIssuance", "continueIssuance", "getPresentationDefinition", "getPresentationDefinitionV2", "holderRejectProof", "holderSubmitProof", "holderSubmitProofV2", "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", "holderWalletUnitStatus", "holderGetWalletUnit", "nfcReadIsoMdlEngagement", "nfcStopIsoMdlEngagement", "uninitialize"];
package/dist/src/core.js CHANGED
@@ -33,8 +33,10 @@ export const interfaceMethodNames = [
33
33
  "initiateIssuance",
34
34
  "continueIssuance",
35
35
  "getPresentationDefinition",
36
+ "getPresentationDefinitionV2",
36
37
  "holderRejectProof",
37
38
  "holderSubmitProof",
39
+ "holderSubmitProofV2",
38
40
  "getCredentials",
39
41
  "runTask",
40
42
  "deleteProofClaims",
@@ -80,8 +82,8 @@ export const interfaceMethodNames = [
80
82
  "rollbackImport",
81
83
  "resolveJsonldContext",
82
84
  "holderRegisterWalletUnit",
83
- "holderRefreshWalletUnit",
84
- "holderGetWalletUnitAttestation",
85
+ "holderWalletUnitStatus",
86
+ "holderGetWalletUnit",
85
87
  "nfcReadIsoMdlEngagement",
86
88
  "nfcStopIsoMdlEngagement",
87
89
  "uninitialize",
@@ -1,5 +1,5 @@
1
1
  import { DataTypeEnum } from "./config";
2
- import { CredentialSchema } from "./credentialSchema";
2
+ import { CredentialSchema, KeyStorageSecurity } from "./credentialSchema";
3
3
  import { ListQuery, SortDirection } from "./list";
4
4
  import { IdentifierListItem } from "./identifier";
5
5
  export declare enum CredentialStateEnum {
@@ -13,7 +13,7 @@ export declare enum CredentialStateEnum {
13
13
  ERROR = "ERROR"
14
14
  }
15
15
  export type ClaimValue = {
16
- dataType: DataTypeEnum.String | DataTypeEnum.Date | DataTypeEnum.File;
16
+ dataType: DataTypeEnum.String | DataTypeEnum.Date | DataTypeEnum.Picture | DataTypeEnum.SwiyuPicture;
17
17
  value: string;
18
18
  array: false;
19
19
  } | {
@@ -95,10 +95,10 @@ export type CredentialListQuery = ListQuery & {
95
95
  sort?: SortableCredentialColumnEnum;
96
96
  sortDirection?: SortDirection;
97
97
  exact?: CredentialListQueryExactColumnEnum[];
98
- role?: CredentialRoleEnum;
98
+ roles?: CredentialRoleEnum[];
99
99
  ids?: Array<CredentialListItem["id"]>;
100
- status?: CredentialStateEnum[];
101
- profile?: string;
100
+ states?: CredentialStateEnum[];
101
+ profiles?: string[];
102
102
  credentialSchemaIds?: Array<CredentialSchema["id"]>;
103
103
  include?: CredentialListIncludeEntityType[];
104
104
  /** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
@@ -135,16 +135,16 @@ export interface CredentialRevocationCheckResponse {
135
135
  export interface InvitationResultCredentialIssuance {
136
136
  /** For reference. */
137
137
  interactionId: string;
138
- /** Offered credential. */
139
- credentialIds: Array<CredentialListItem["id"]>;
140
138
  /** Metadata for entering a transaction code.
141
139
  * If a pre-authorized code is issued with a transaction code object, the wallet
142
140
  * user must input a transaction code to receive the offered credential. This code
143
141
  * is typically sent through a separate channel such as SMS or email.
144
142
  */
145
143
  txCode?: OpenID4VCITxCode;
146
- /** Metadata for selecting an appropriate key. */
147
- credentialConfigurationsSupported: Record<CredentialListItem["id"], CredentialConfigurationSupported>;
144
+ /** Accepted storage security levels for holder binding key */
145
+ keyStorageSecurityLevels?: KeyStorageSecurity[];
146
+ /** Accepted algorithms for holder binding key */
147
+ keyAlgorithms?: string[];
148
148
  }
149
149
  export interface OpenID4VCITxCode {
150
150
  inputMode?: OpenID4VCITxCodeInputMode;
@@ -176,13 +176,10 @@ export interface InitiateIssuanceResponse {
176
176
  export interface ContinueIssuanceResponse {
177
177
  /** For reference. */
178
178
  interactionId: string;
179
- /** Offered credentials. */
180
- credentialIds: Array<CredentialListItem["id"]>;
181
- /** Metadata for selecting an appropriate key. */
182
- credentialConfigurationsSupported: Record<CredentialListItem["id"], CredentialConfigurationSupported>;
183
- }
184
- export interface CredentialConfigurationSupported {
185
- proofTypesSupported: Record<string, OpenID4VCIProofTypeSupported>;
179
+ /** Accepted storage security levels for holder binding key */
180
+ keyStorageSecurityLevels?: KeyStorageSecurity[];
181
+ /** Accepted algorithms for holder binding key */
182
+ keyAlgorithms?: string[];
186
183
  }
187
184
  export interface OpenID4VCIProofTypeSupported {
188
185
  proofSigningAlgValuesSupported: string[];
@@ -194,3 +191,11 @@ export interface AuthorizationCodeFlow {
194
191
  * the authorization process with the authorization server. */
195
192
  authorizationCodeFlowUrl: string;
196
193
  }
194
+ export interface HolderAcceptCredentialRequest {
195
+ interactionId: string;
196
+ didId?: string;
197
+ identifierId?: string;
198
+ keyId?: string;
199
+ txCode?: string;
200
+ holderWalletUnitId?: string;
201
+ }
@@ -13,13 +13,11 @@ export interface ImportCredentialSchemaRequestSchema {
13
13
  organisationId: string;
14
14
  importedSourceUrl: string;
15
15
  claims: ImportCredentialSchemaClaimSchema[];
16
- walletStorageType?: WalletStorageType;
16
+ keyStorageSecurity?: KeyStorageSecurity;
17
17
  schemaId: string;
18
- schemaType: CredentialSchemaType;
19
18
  layoutType?: LayoutType;
20
19
  layoutProperties?: ImportCredentialSchemaLayoutProperties;
21
20
  allowSuspension?: boolean;
22
- externalSchema: boolean;
23
21
  }
24
22
  export interface ImportCredentialSchemaClaimSchema {
25
23
  id: string;
@@ -72,18 +70,12 @@ export interface CredentialSchemaListQuery extends ListQuery {
72
70
  /** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
73
71
  lastModifiedBefore?: string;
74
72
  }
75
- export declare enum WalletStorageType {
76
- HARDWARE = "HARDWARE",
77
- SOFTWARE = "SOFTWARE",
78
- REMOTE_SECURE_ELEMENT = "REMOTE_SECURE_ELEMENT"
73
+ export declare enum KeyStorageSecurity {
74
+ HIGH = "HIGH",
75
+ MODERATE = "MODERATE",
76
+ ENHANCED_BASIC = "ENHANCED_BASIC",
77
+ BASIC = "BASIC"
79
78
  }
80
- export declare enum KnownCredentialSchemaType {
81
- PROCIVIS_ONE_SCHEMA2024 = "PROCIVIS_ONE_SCHEMA2024",
82
- FALLBACK_SCHEMA2024 = "FALLBACK_SCHEMA2024",
83
- MDOC = "MDOC",
84
- SD_JWT_VC = "SD_JWT_VC"
85
- }
86
- export type CredentialSchemaType = KnownCredentialSchemaType | string;
87
79
  export declare enum LayoutType {
88
80
  CARD = "CARD",
89
81
  DOCUMENT = "DOCUMENT",
@@ -96,10 +88,9 @@ export interface CredentialSchema {
96
88
  name: string;
97
89
  format: string;
98
90
  revocationMethod: string;
99
- walletStorageType?: WalletStorageType;
91
+ keyStorageSecurity?: KeyStorageSecurity;
100
92
  schemaId: string;
101
93
  importedSourceUrl: string;
102
- schemaType: CredentialSchemaType;
103
94
  layoutType?: LayoutType;
104
95
  layoutProperties?: CredentialSchemaLayoutProperties;
105
96
  }
@@ -13,19 +13,13 @@ export var ExactCredentialSchemaFilterColumnEnum;
13
13
  ExactCredentialSchemaFilterColumnEnum["NAME"] = "NAME";
14
14
  ExactCredentialSchemaFilterColumnEnum["SCHEMA_ID"] = "SCHEMA_ID";
15
15
  })(ExactCredentialSchemaFilterColumnEnum || (ExactCredentialSchemaFilterColumnEnum = {}));
16
- export var WalletStorageType;
17
- (function (WalletStorageType) {
18
- WalletStorageType["HARDWARE"] = "HARDWARE";
19
- WalletStorageType["SOFTWARE"] = "SOFTWARE";
20
- WalletStorageType["REMOTE_SECURE_ELEMENT"] = "REMOTE_SECURE_ELEMENT";
21
- })(WalletStorageType || (WalletStorageType = {}));
22
- export var KnownCredentialSchemaType;
23
- (function (KnownCredentialSchemaType) {
24
- KnownCredentialSchemaType["PROCIVIS_ONE_SCHEMA2024"] = "PROCIVIS_ONE_SCHEMA2024";
25
- KnownCredentialSchemaType["FALLBACK_SCHEMA2024"] = "FALLBACK_SCHEMA2024";
26
- KnownCredentialSchemaType["MDOC"] = "MDOC";
27
- KnownCredentialSchemaType["SD_JWT_VC"] = "SD_JWT_VC";
28
- })(KnownCredentialSchemaType || (KnownCredentialSchemaType = {}));
16
+ export var KeyStorageSecurity;
17
+ (function (KeyStorageSecurity) {
18
+ KeyStorageSecurity["HIGH"] = "HIGH";
19
+ KeyStorageSecurity["MODERATE"] = "MODERATE";
20
+ KeyStorageSecurity["ENHANCED_BASIC"] = "ENHANCED_BASIC";
21
+ KeyStorageSecurity["BASIC"] = "BASIC";
22
+ })(KeyStorageSecurity || (KeyStorageSecurity = {}));
29
23
  export var LayoutType;
30
24
  (function (LayoutType) {
31
25
  LayoutType["CARD"] = "CARD";
@@ -65,6 +65,7 @@ export interface HistoryListQuery extends ListQuery {
65
65
  credentialSchemaId?: string;
66
66
  proofSchemaId?: string;
67
67
  search?: HistoryListSearch;
68
+ user?: string;
68
69
  }
69
70
  export interface HistoryListSearch {
70
71
  text: string;
@@ -88,4 +89,5 @@ export interface HistoryListItem {
88
89
  entityType: HistoryEntityTypeEnum;
89
90
  organisationId: string;
90
91
  metadata?: HistoryMetadata;
92
+ user?: string;
91
93
  }
@@ -115,7 +115,7 @@ export interface IdentifierListQuery extends ListQuery {
115
115
  sortDirection?: SortDirection;
116
116
  name?: string;
117
117
  types?: IdentifierTypeEnum[];
118
- state?: IdentifierStateEnum;
118
+ states?: IdentifierStateEnum[];
119
119
  exact?: ExactIdentifierFilterColumnEnum[];
120
120
  didMethods?: string[];
121
121
  isRemote?: boolean;
package/dist/src/nfc.d.ts CHANGED
@@ -3,3 +3,4 @@ export interface NfcScanRequest {
3
3
  failureMessage?: string;
4
4
  successMessage?: string;
5
5
  }
6
+ export declare const isNfcHceSupported: () => Promise<boolean>;
package/dist/src/nfc.js CHANGED
@@ -1 +1,3 @@
1
- export {};
1
+ import { NativeModules } from "react-native";
2
+ const NativeModule = NativeModules.ProcivisOneCoreModule;
3
+ export const isNfcHceSupported = async () => NativeModule.isNfcHceSupported();