@procivis/react-native-one-core 1.43299.1 → 1.52682.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.
@@ -57,7 +57,9 @@ object DeserializeSpecific {
57
57
  pageSize = query.getUInt("pageSize")!!,
58
58
  organisationId = query.getString("organisationId").toString(),
59
59
  entityId = query.getString("entityId"),
60
- action = opt(query.getString("action"), HistoryActionBindingEnum::valueOf),
60
+ actions = opt(query.getArray("actions")) { types ->
61
+ enumList(types, HistoryActionBindingEnum::valueOf)
62
+ },
61
63
  entityTypes = opt(query.getArray("entityTypes")) { types ->
62
64
  enumList(types, HistoryEntityTypeBindingEnum::valueOf)
63
65
  },
@@ -92,14 +92,6 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
92
92
  }
93
93
  }
94
94
 
95
- @ReactMethod
96
- fun checkCertificate(keyId: String, certificate: ReadableMap, promise: Promise) {
97
- asyncCall(promise, scope) {
98
- getCore().checkCertificate(keyId, construct(certificate))
99
- return@asyncCall null
100
- }
101
- }
102
-
103
95
  @ReactMethod
104
96
  fun shareCredentialSchema(credentialSchemaId: String, promise: Promise) {
105
97
  asyncCall(promise, scope) {
@@ -490,6 +482,14 @@ class ProcivisOneCoreModule(reactContext: ReactApplicationContext) :
490
482
  }
491
483
  }
492
484
 
485
+ @ReactMethod
486
+ fun resolveTrustEntityByIdentifier(request: ReadableMap, promise: Promise) {
487
+ asyncCall(promise, scope) {
488
+ val trustEntities = getCore().resolveTrustEntityByIdentifier(construct(request))
489
+ return@asyncCall convertToRN(trustEntities)
490
+ }
491
+ }
492
+
493
493
  @ReactMethod
494
494
  fun createRemoteTrustEntity(request: ReadableMap, promise: Promise) {
495
495
  asyncCall(promise, scope) {
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/43299/onecore-debug.aar",
5
- "sha1": "e91d8516dc481aeed056e959cc400da77f4e219a"
4
+ "url": "https://onetfstatestorage.blob.core.windows.net/core-sdk/android/52682/onecore-debug.aar",
5
+ "sha1": "6b72910470386a1547cb3a821f036bb1b7cb7260"
6
6
  },
7
7
  "release": {
8
- "url": "https://onetfstatestorage.blob.core.windows.net/core-sdk/android/43299/onecore-release.aar",
9
- "sha1": "1bc346d9dbead545aab319eb44da27b4ea193d12"
8
+ "url": "https://onetfstatestorage.blob.core.windows.net/core-sdk/android/52682/onecore-release.aar",
9
+ "sha1": "69e39d3831b9f0092d6641e75a2d996897492314"
10
10
  }
11
11
  },
12
12
  "ios": {
13
- "url": "https://onetfstatestorage.blob.core.windows.net/core-sdk/ios/43299/deploy.zip",
14
- "sha1": "6514bce639ad35a283e59fd64d99ad4cd59dbb89"
13
+ "url": "https://onetfstatestorage.blob.core.windows.net/core-sdk/ios/52682/deploy.zip",
14
+ "sha1": "d54a48819dddf9800dacfc6fe3d4cc3d2c9696cd"
15
15
  }
16
16
  }
@@ -1,3 +1,4 @@
1
+ import { TrustEntityTypeEnum } from "./trust";
1
2
  export declare enum KeyAlgorithmFeatureEnum {
2
3
  GENERATE_CSR = "GENERATE_CSR"
3
4
  }
@@ -112,13 +113,25 @@ export type DataTypeParams = {
112
113
  type: DataTypeEnum.Object;
113
114
  params?: undefined;
114
115
  };
116
+ export declare enum IssuanceProtocolFeatureEnum {
117
+ SupportsRejection = "SUPPORTS_REJECTION"
118
+ }
115
119
  export interface IssuanceProtocolCapabilities {
116
120
  didMethods: string[];
121
+ features: IssuanceProtocolFeatureEnum[];
117
122
  }
118
123
  export interface VerificationProtocolCapabilities {
119
124
  didMethods: string[];
120
125
  supportedTransports: string[];
121
126
  }
127
+ export declare enum TrustOperation {
128
+ Publish = "PUBLISH",
129
+ Lookup = "LOOKUP"
130
+ }
131
+ export interface TrustCapabilities {
132
+ operations: TrustOperation[];
133
+ supportedTypes: TrustEntityTypeEnum[];
134
+ }
122
135
  export interface Config {
123
136
  format: ConfigEntities<FormatCapabilities>;
124
137
  issuanceProtocol: ConfigEntities<IssuanceProtocolCapabilities>;
@@ -129,7 +142,7 @@ export interface Config {
129
142
  datatype: ConfigEntities<undefined, DataTypeParams>;
130
143
  keyAlgorithm: ConfigEntities<KeyAlgorithmCapabilities, {}>;
131
144
  keyStorage: ConfigEntities<KeyStorageCapabilities>;
132
- trustManagement: ConfigEntities;
145
+ trustManagement: ConfigEntities<TrustCapabilities>;
133
146
  cacheEntities: ConfigEntities;
134
147
  }
135
148
  export {};
@@ -42,3 +42,12 @@ export var DataTypeEnum;
42
42
  DataTypeEnum["Boolean"] = "BOOLEAN";
43
43
  DataTypeEnum["Object"] = "OBJECT";
44
44
  })(DataTypeEnum || (DataTypeEnum = {}));
45
+ export var IssuanceProtocolFeatureEnum;
46
+ (function (IssuanceProtocolFeatureEnum) {
47
+ IssuanceProtocolFeatureEnum["SupportsRejection"] = "SUPPORTS_REJECTION";
48
+ })(IssuanceProtocolFeatureEnum || (IssuanceProtocolFeatureEnum = {}));
49
+ export var TrustOperation;
50
+ (function (TrustOperation) {
51
+ TrustOperation["Publish"] = "PUBLISH";
52
+ TrustOperation["Lookup"] = "LOOKUP";
53
+ })(TrustOperation || (TrustOperation = {}));
@@ -4,11 +4,11 @@ import { CredentialDetail, CredentialListItem, CredentialListQuery, CredentialRe
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
- import { KeyCheckCertificateRequestBindingDto, KeyListItem, KeyRequest } from "./key";
7
+ import { KeyRequest } from "./key";
8
8
  import { ItemList } from "./list";
9
9
  import { CreateProofRequest, InvitationResultProofRequest, PresentationDefinition, PresentationDefinitionRequestedCredential, PresentationSubmitCredentialRequest, ProofDetail, ProofListItem, ProofListQuery, ProposeProofResponse, ShareProofRequest, ShareProofResponse } from "./proof";
10
10
  import { CreateProofSchemaRequest, ImportProofSchemaRequest, ProofSchema, ProofSchemaListItem, ProofSchemaListQuery, ShareProofSchemaResponse } from "./proofSchema";
11
- import { CreateRemoteTrustEntityRequest, CreateTrustAnchorRequest, CreateTrustEntityRequest, TrustAnchor, TrustAnchorListItem, TrustAnchorListQuery, TrustEntity, TrustEntityListItem, TrustEntityListQuery, UpdateRemoteTrustEntityRequest } from "./trust";
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";
@@ -59,7 +59,6 @@ export interface ONECore {
59
59
  holderSubmitProof(interactionId: InvitationResultProofRequest["interactionId"], credentials: Record<PresentationDefinitionRequestedCredential["id"], PresentationSubmitCredentialRequest>, didId: DidListItem["id"] | undefined, identifierId: IdentifierListItem["id"] | undefined, keyId: string | undefined): Promise<void>;
60
60
  getCredentials(query: CredentialListQuery): Promise<ItemList<CredentialListItem>>;
61
61
  runTask(task: string): Promise<string>;
62
- checkCertificate(keyId: KeyListItem["id"], certificate: KeyCheckCertificateRequestBindingDto): Promise<void>;
63
62
  deleteProofClaims(proofId: ProofDetail["id"]): Promise<void>;
64
63
  getCredential(credentialId: CredentialListItem["id"]): Promise<CredentialDetail>;
65
64
  deleteCredential(credentialId: CredentialListItem["id"]): Promise<void>;
@@ -86,11 +85,12 @@ export interface ONECore {
86
85
  getTrustAnchor(trustAnchorId: TrustAnchor["id"]): Promise<TrustAnchor>;
87
86
  getTrustAnchors(query: TrustAnchorListQuery): Promise<ItemList<TrustAnchorListItem>>;
88
87
  createTrustEntity(request: CreateTrustEntityRequest): Promise<TrustEntity["id"]>;
89
- getTrustEntity(trustEntityId: TrustEntity["id"]): Promise<TrustEntity>;
88
+ getTrustEntity(trustEntityId: TrustEntityListItem["id"]): Promise<TrustEntity>;
90
89
  getTrustEntities(query: TrustEntityListQuery): Promise<ItemList<TrustEntityListItem>>;
91
90
  getTrustEntityByDid(didId: DidListItem["id"]): Promise<TrustEntity>;
92
- createRemoteTrustEntity(request: CreateRemoteTrustEntityRequest): Promise<TrustEntity["id"]>;
93
- getRemoteTrustEntity(didId: DidListItem["id"]): Promise<TrustEntity>;
91
+ resolveTrustEntityByIdentifier(request: ResolveTrustEntityByIdentifierRequest): Promise<Record<IdentifierListItem["id"], ResolvedIdentifierTrustEntity[]>>;
92
+ createRemoteTrustEntity(request: CreateRemoteTrustEntityRequest): Promise<RemoteTrustEntity["id"]>;
93
+ getRemoteTrustEntity(didId: DidListItem["id"]): Promise<RemoteTrustEntity>;
94
94
  updateRemoteTrustEntity(request: UpdateRemoteTrustEntityRequest): Promise<void>;
95
95
  getHistory(query: HistoryListQuery): Promise<ItemList<HistoryListItem>>;
96
96
  getHistoryEntry(historyId: HistoryListItem["id"]): Promise<HistoryListItem>;
@@ -128,4 +128,4 @@ export interface ONECore {
128
128
  */
129
129
  uninitialize(deleteData: boolean): Promise<void>;
130
130
  }
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", "checkCertificate", "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", "createRemoteTrustEntity", "getRemoteTrustEntity", "updateRemoteTrustEntity", "getHistory", "getHistoryEntry", "createBackup", "backupInfo", "deleteCache", "unpackBackup", "finalizeImport", "rollbackImport", "resolveJsonldContext", "uninitialize"];
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"];
package/dist/src/core.js CHANGED
@@ -33,7 +33,6 @@ export const interfaceMethodNames = [
33
33
  "holderSubmitProof",
34
34
  "getCredentials",
35
35
  "runTask",
36
- "checkCertificate",
37
36
  "deleteProofClaims",
38
37
  "getCredential",
39
38
  "deleteCredential",
@@ -63,6 +62,7 @@ export const interfaceMethodNames = [
63
62
  "getTrustEntity",
64
63
  "getTrustEntities",
65
64
  "getTrustEntityByDid",
65
+ "resolveTrustEntityByIdentifier",
66
66
  "createRemoteTrustEntity",
67
67
  "getRemoteTrustEntity",
68
68
  "updateRemoteTrustEntity",
@@ -1,7 +1,6 @@
1
1
  import { DataTypeEnum } from "./config";
2
2
  import { CredentialSchema } from "./credentialSchema";
3
3
  import { ListQuery, SortDirection } from "./list";
4
- import { DidListItem } from "./did";
5
4
  import { IdentifierListItem } from "./identifier";
6
5
  export declare enum CredentialStateEnum {
7
6
  CREATED = "CREATED",
@@ -48,22 +47,19 @@ export interface CredentialListItem {
48
47
  issuanceDate: string;
49
48
  lastModified: string;
50
49
  revocationDate?: string;
51
- issuerDid?: DidListItem["id"];
52
50
  issuer?: IdentifierListItem["id"];
53
51
  state: CredentialStateEnum;
54
52
  schema: CredentialSchema;
55
53
  role: CredentialRoleEnum;
56
54
  suspendEndDate?: string;
57
- exchange: string;
55
+ protocol: string;
58
56
  }
59
57
  export interface CredentialDetail extends Omit<CredentialListItem, "issuerDid" | "issuer"> {
60
58
  claims: Claim[];
61
59
  redirectUri?: string;
62
60
  lvvcIssuanceDate?: string;
63
61
  mdocMsoValidity?: MdocMsoValidity;
64
- issuerDid?: DidListItem;
65
62
  issuer?: IdentifierListItem;
66
- holderDid?: DidListItem;
67
63
  holder?: IdentifierListItem;
68
64
  }
69
65
  export interface MdocMsoValidity {
@@ -52,7 +52,7 @@ export declare enum HistorySearchTypeEnum {
52
52
  }
53
53
  export interface HistoryListQuery extends ListQuery {
54
54
  entityId?: string;
55
- action?: HistoryActionEnum;
55
+ actions?: HistoryActionEnum[];
56
56
  entityTypes?: HistoryEntityTypeEnum[];
57
57
  /** accepts the RFC3339 format, e.g. use the {@link Date.toISOString} */
58
58
  createdDateFrom?: string;
@@ -28,15 +28,17 @@ export interface CreateIdentifierCertificateRequest {
28
28
  chain: string;
29
29
  keyId: string;
30
30
  }
31
- export interface IdentifierDetail {
31
+ export interface IdentifierListItem {
32
32
  id: string;
33
33
  createdDate: string;
34
34
  lastModified: string;
35
35
  name: string;
36
- organisationId: string;
37
36
  type: IdentifierTypeEnum;
38
37
  isRemote: boolean;
39
38
  state: IdentifierStateEnum;
39
+ organisationId?: string;
40
+ }
41
+ export interface IdentifierDetail extends IdentifierListItem {
40
42
  did?: IdentifierDidDetail;
41
43
  key?: IdentifierKeyDetail;
42
44
  certificates?: IdentifierCertificateDetail[];
@@ -99,15 +101,6 @@ export interface X509Extension {
99
101
  value: string;
100
102
  critical: boolean;
101
103
  }
102
- export interface IdentifierListItem {
103
- id: string;
104
- createdDate: string;
105
- lastModified: string;
106
- name: string;
107
- type: IdentifierTypeEnum;
108
- isRemote: boolean;
109
- state: IdentifierStateEnum;
110
- }
111
104
  export declare enum SortableIdentifierColumnEnum {
112
105
  NAME = "NAME",
113
106
  CREATED_DATE = "CREATED_DATE",
@@ -121,7 +114,7 @@ export interface IdentifierListQuery extends ListQuery {
121
114
  sort?: SortableIdentifierColumnEnum;
122
115
  sortDirection?: SortDirection;
123
116
  name?: string;
124
- type?: IdentifierTypeEnum;
117
+ types?: IdentifierTypeEnum[];
125
118
  state?: IdentifierStateEnum;
126
119
  exact?: ExactIdentifierFilterColumnEnum[];
127
120
  didMethods?: string[];
package/dist/src/key.d.ts CHANGED
@@ -15,6 +15,3 @@ export interface KeyListItem {
15
15
  keyType: string;
16
16
  storageType: string;
17
17
  }
18
- export interface KeyCheckCertificateRequestBindingDto {
19
- certificate: string;
20
- }
@@ -4,5 +4,6 @@ export interface CreateOrganisationRequest {
4
4
  }
5
5
  export interface UpsertOrganisationRequest {
6
6
  id: string;
7
- name: string;
7
+ name?: string;
8
+ deactivate?: boolean;
8
9
  }
@@ -35,11 +35,9 @@ export interface ProofDetail {
35
35
  state: ProofStateEnum;
36
36
  role: ProofRoleEnum;
37
37
  proofSchema?: ProofSchemaListItem;
38
- verifierDid?: DidListItem;
39
38
  verifier?: IdentifierListItem;
40
- holderDid?: DidListItem;
41
39
  holder?: IdentifierListItem;
42
- exchange: string;
40
+ protocol: string;
43
41
  transport: string;
44
42
  redirectUri?: string;
45
43
  retainUntilDate?: string;
@@ -54,9 +52,8 @@ export interface ProofListItem {
54
52
  issuanceDate: string;
55
53
  requestedDate?: string;
56
54
  completedDate?: string;
57
- verifierDid?: DidListItem["id"];
58
55
  verifier?: IdentifierListItem["id"];
59
- exchange: string;
56
+ protocol: string;
60
57
  transport: string;
61
58
  state: ProofStateEnum;
62
59
  role: ProofRoleEnum;
@@ -67,7 +64,7 @@ export interface CreateProofRequest {
67
64
  proofSchemaId: ProofSchemaListItem["id"];
68
65
  verifierDidId?: DidListItem["id"];
69
66
  verifierIdentifierId?: IdentifierListItem["id"];
70
- exchange: string;
67
+ protocol: string;
71
68
  redirectUri?: string;
72
69
  verifierKey?: string;
73
70
  scanToVerify?: ScanToVerifyRequest;
@@ -1,5 +1,7 @@
1
1
  import { ListQuery, SortDirection } from "./list";
2
2
  import { DidListItem } from "./did";
3
+ import { CertificateStateEnum, IdentifierCertificateDetail, IdentifierListItem, X509Attributes } from "./identifier";
4
+ import { UpsertOrganisationRequest } from "./organisation";
3
5
  export type CreateTrustAnchorRequest = {
4
6
  name: string;
5
7
  type: string;
@@ -50,12 +52,24 @@ export interface TrustEntityListItem {
50
52
  privacyUrl?: string;
51
53
  role: TrustEntityRoleEnum;
52
54
  state: TrustEntityStateEnum;
53
- did: DidListItem;
55
+ did?: DidListItem;
54
56
  trustAnchor: TrustAnchor;
55
57
  }
56
- export interface TrustEntity extends TrustEntityListItem {
58
+ export interface RemoteTrustEntity extends TrustEntityListItem {
57
59
  organisationId?: string;
58
60
  }
61
+ export interface TrustEntity extends RemoteTrustEntity {
62
+ entityKey: string;
63
+ type: TrustEntityTypeEnum;
64
+ identifier?: IdentifierListItem;
65
+ content?: string;
66
+ ca?: TrustEntityCertificate;
67
+ }
68
+ export interface TrustEntityCertificate extends X509Attributes {
69
+ state: CertificateStateEnum;
70
+ publicKey: string;
71
+ commonName?: string;
72
+ }
59
73
  export declare enum TrustEntityRoleEnum {
60
74
  ISSUER = "ISSUER",
61
75
  VERIFIER = "VERIFIER",
@@ -67,6 +81,10 @@ export declare enum TrustEntityStateEnum {
67
81
  WITHDRAWN = "WITHDRAWN",
68
82
  REMOVED_AND_WITHDRAWN = "REMOVED_AND_WITHDRAWN"
69
83
  }
84
+ export declare enum TrustEntityTypeEnum {
85
+ Did = "DID",
86
+ CertificateAuthority = "CA"
87
+ }
70
88
  export interface CreateTrustEntityRequest {
71
89
  name: string;
72
90
  logo?: string;
@@ -75,7 +93,11 @@ export interface CreateTrustEntityRequest {
75
93
  privacyUrl?: string;
76
94
  role: TrustEntityRoleEnum;
77
95
  trustAnchorId: TrustAnchor["id"];
78
- didId: DidListItem["id"];
96
+ didId?: DidListItem["id"];
97
+ type: TrustEntityTypeEnum;
98
+ identifierId?: IdentifierListItem["id"];
99
+ content?: string;
100
+ organisationId: UpsertOrganisationRequest["id"];
79
101
  }
80
102
  export interface TrustEntityListQuery {
81
103
  sort?: SortableTrustEntityColumnEnum;
@@ -92,8 +114,15 @@ export declare enum SortableTrustEntityColumnEnum {
92
114
  export declare enum ExactTrustEntityFilterColumnEnum {
93
115
  NAME = "NAME"
94
116
  }
95
- export interface CreateRemoteTrustEntityRequest extends Omit<CreateTrustEntityRequest, "trustAnchorId"> {
117
+ export interface CreateRemoteTrustEntityRequest {
118
+ name: string;
119
+ logo?: string;
120
+ website?: string;
121
+ termsUrl?: string;
122
+ privacyUrl?: string;
123
+ role: TrustEntityRoleEnum;
96
124
  trustAnchorId?: TrustAnchor["id"];
125
+ didId: DidListItem["id"];
97
126
  }
98
127
  export interface UpdateRemoteTrustEntityRequest {
99
128
  didId: DidListItem["id"];
@@ -104,9 +133,20 @@ export interface UpdateRemoteTrustEntityRequest {
104
133
  termsUrl?: string | null;
105
134
  privacyUrl?: string | null;
106
135
  role?: TrustEntityRoleEnum;
136
+ content?: string;
107
137
  }
108
138
  export declare enum TrustEntityUpdateActionEnum {
109
139
  ACTIVATE = "ACTIVATE",
110
140
  WITHDRAW = "WITHDRAW",
111
141
  REMOVE = "REMOVE"
112
142
  }
143
+ export interface ResolveTrustEntityByIdentifierRequest {
144
+ identifiers: Array<{
145
+ id: IdentifierListItem["id"];
146
+ certificateId?: IdentifierCertificateDetail["id"];
147
+ }>;
148
+ }
149
+ export interface ResolvedIdentifierTrustEntity {
150
+ trustEntity: TrustEntity;
151
+ certificateIds?: Array<IdentifierCertificateDetail["id"]>;
152
+ }
package/dist/src/trust.js CHANGED
@@ -22,6 +22,11 @@ export var TrustEntityStateEnum;
22
22
  TrustEntityStateEnum["WITHDRAWN"] = "WITHDRAWN";
23
23
  TrustEntityStateEnum["REMOVED_AND_WITHDRAWN"] = "REMOVED_AND_WITHDRAWN";
24
24
  })(TrustEntityStateEnum || (TrustEntityStateEnum = {}));
25
+ export var TrustEntityTypeEnum;
26
+ (function (TrustEntityTypeEnum) {
27
+ TrustEntityTypeEnum["Did"] = "DID";
28
+ TrustEntityTypeEnum["CertificateAuthority"] = "CA";
29
+ })(TrustEntityTypeEnum || (TrustEntityTypeEnum = {}));
25
30
  export var SortableTrustEntityColumnEnum;
26
31
  (function (SortableTrustEntityColumnEnum) {
27
32
  SortableTrustEntityColumnEnum["NAME"] = "NAME";
@@ -133,7 +133,7 @@ private func deserializeHistoryListQuery(_ query: NSDictionary) throws -> Histor
133
133
  organisationId: try safeCast(query.value(forKey: "organisationId")),
134
134
  entityId: query.value(forKey: "entityId") as? String,
135
135
  entityTypes: try opt(query.value(forKey: "entityTypes") as? NSArray, enumList),
136
- action: try opt(query.value(forKey: "action") as? String, deserializeEnum),
136
+ actions: try opt(query.value(forKey: "actions") as? NSArray, enumList),
137
137
  createdDateFrom: query.value(forKey: "createdDateFrom") as? String,
138
138
  createdDateTo: query.value(forKey: "createdDateTo") as? String,
139
139
  identifierId: query.value(forKey: "identifierId") as? String,
@@ -157,11 +157,6 @@ RCT_EXTERN_METHOD(deleteProofClaims:(NSString *)proofId
157
157
  resolver:(RCTPromiseResolveBlock)resolve
158
158
  rejecter:(RCTPromiseRejectBlock)reject)
159
159
 
160
- RCT_EXTERN_METHOD(checkCertificate:(NSString *)keyId
161
- certificate:(NSDictionary *)certificate
162
- resolver:(RCTPromiseResolveBlock)resolve
163
- rejecter:(RCTPromiseRejectBlock)reject)
164
-
165
160
  RCT_EXTERN_METHOD(shareProof:(NSString *)proofId
166
161
  request:(NSDictionary *)request
167
162
  resolver:(RCTPromiseResolveBlock)resolve
@@ -237,6 +232,10 @@ RCT_EXTERN_METHOD(getTrustEntityByDid:(NSString *)didId
237
232
  resolver:(RCTPromiseResolveBlock)resolve
238
233
  rejecter:(RCTPromiseRejectBlock)reject)
239
234
 
235
+ RCT_EXTERN_METHOD(resolveTrustEntityByIdentifier:(NSDictionary *)request
236
+ resolver:(RCTPromiseResolveBlock)resolve
237
+ rejecter:(RCTPromiseRejectBlock)reject)
238
+
240
239
  RCT_EXTERN_METHOD(createRemoteTrustEntity:(NSDictionary *)request
241
240
  resolver:(RCTPromiseResolveBlock)resolve
242
241
  rejecter:(RCTPromiseRejectBlock)reject)
@@ -483,22 +483,6 @@ class ProcivisOneCoreModule: RCTEventEmitter {
483
483
  }
484
484
  }
485
485
 
486
- @objc(checkCertificate:certificate:resolver:rejecter:)
487
- func checkCertificate(
488
- keyId: String,
489
- certificate: NSDictionary,
490
- resolve: @escaping RCTPromiseResolveBlock,
491
- reject: @escaping RCTPromiseRejectBlock
492
- ) {
493
- asyncCall(resolve, reject) {
494
- try await self.getCore().checkCertificate(
495
- keyId: keyId,
496
- certificate: try deserialize(certificate)
497
- )
498
- return nil as NSDictionary?
499
- }
500
- }
501
-
502
486
  @objc(shareCredentialSchema:resolver:rejecter:)
503
487
  func shareCredentialSchema(
504
488
  credentialSchemaId: String,
@@ -726,6 +710,18 @@ class ProcivisOneCoreModule: RCTEventEmitter {
726
710
  return try serializeAny(trustEntity)
727
711
  }
728
712
  }
713
+
714
+ @objc(resolveTrustEntityByIdentifier:resolver:rejecter:)
715
+ func resolveTrustEntityByIdentifier(
716
+ request: NSDictionary,
717
+ resolve: @escaping RCTPromiseResolveBlock,
718
+ reject: @escaping RCTPromiseRejectBlock
719
+ ) {
720
+ asyncCall(resolve, reject) {
721
+ let trustEntities = try await self.getCore().resolveTrustEntityByIdentifier(request: try deserialize(request))
722
+ return try serializeAny(trustEntities)
723
+ }
724
+ }
729
725
 
730
726
  @objc(createRemoteTrustEntity:resolver:rejecter:)
731
727
  func createRemoteTrustEntity(
@@ -95,10 +95,11 @@ private func serialize(proofRequestClaimValue: ProofRequestClaimValueBindingDto)
95
95
 
96
96
  private func serialize(invitationResponse: HandleInvitationResponseBindingEnum) throws -> NSDictionary {
97
97
  switch (invitationResponse) {
98
- case let .credentialIssuance(interactionId, credentialIds, txCode):
98
+ case let .credentialIssuance(interactionId, credentialIds, txCode, credentialConfigurationsSupported):
99
99
  var result: [String: Any] = [
100
100
  "interactionId": interactionId,
101
- "credentialIds": credentialIds
101
+ "credentialIds": credentialIds,
102
+ "credentialConfigurationsSupported": try serializeAny(credentialConfigurationsSupported)
102
103
  ];
103
104
  if let txCode = txCode {
104
105
  result["txCode"] = try serializeAny(txCode)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procivis/react-native-one-core",
3
- "version": "1.43299.1",
3
+ "version": "1.52682.0",
4
4
  "author": "Procivis AG (https://procivis.ch)",
5
5
  "license": "Apache-2.0",
6
6
  "description": "ONE core bindings for React Native",
@@ -22,6 +22,7 @@
22
22
  ],
23
23
  "scripts": {
24
24
  "compile": "tsc",
25
+ "documentation": "typedoc",
25
26
  "postinstall": "node ./bin/postinstall",
26
27
  "test": "jest"
27
28
  },
@@ -35,6 +36,7 @@
35
36
  "husky": "^7.0.4",
36
37
  "jest": "^29.5.0",
37
38
  "react-native": "0.72.17",
39
+ "typedoc": "^0.28.6",
38
40
  "typescript": "^5.1.6"
39
41
  },
40
42
  "packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72"