@idos-network/issuer 1.0.0-rc.1.1 → 1.1.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/src/index.ts CHANGED
@@ -1,28 +1,35 @@
1
- import { createNodeKwilClient, createServerKwilSigner } from "@idos-network/core";
2
1
  import type {
3
- EditCredentialAsIssuerParams,
2
+ AvailableIssuerType,
3
+ CredentialFields,
4
+ CredentialSubject,
5
+ CredentialSubjectFaceId,
6
+ idOSCredential,
7
+ } from "@idos-network/credentials/types";
8
+ import type {
9
+ EditPublicNotesAsIssuerInput,
10
+ idOSDelegatedWriteGrant,
4
11
  idOSGrant,
5
12
  idOSUser,
6
13
  idOSUserAttribute,
7
14
  idOSWallet,
8
- } from "@idos-network/core/kwil-actions";
9
- import type { PassportingPeer } from "@idos-network/core/types";
10
- import type { idOSCredential } from "@idos-network/credentials";
11
- import {
12
- type AvailableIssuerType,
13
- buildCredentials,
14
- type CredentialFields,
15
- type CredentialSubject,
16
- type Credentials,
17
- } from "@idos-network/credentials";
15
+ } from "@idos-network/kwil-infra/actions";
18
16
  import type { SignKeyPair } from "tweetnacl";
17
+
18
+ import {
19
+ buildCredential,
20
+ buildFaceIdCredential,
21
+ type Credential,
22
+ type FaceIdCredential,
23
+ } from "@idos-network/credentials/builder";
24
+ import { deriveLevel } from "@idos-network/credentials/utils";
25
+ import { createNodeKwilClient, createServerKwilSigner } from "@idos-network/kwil-infra";
26
+
19
27
  import {
20
28
  CredentialService,
21
29
  type DelegatedWriteGrantBaseParams,
22
30
  type DelegatedWriteGrantParams,
23
31
  } from "./services/credential.service";
24
32
  import { type CreateAccessGrantFromDAGParams, GrantService } from "./services/grant.service";
25
- import { PassportingService } from "./services/passporting.service";
26
33
  import {
27
34
  type CreateProfileReqParams,
28
35
  type CreateWalletReqParams,
@@ -41,7 +48,6 @@ export class idOSIssuer {
41
48
  readonly #credentialService: CredentialService;
42
49
  readonly #grantService: GrantService;
43
50
  readonly #userService: UserService;
44
- readonly #passportingService: PassportingService;
45
51
 
46
52
  static async init(params: CreateIssuerParams): Promise<idOSIssuer> {
47
53
  const kwilClient = await createNodeKwilClient({
@@ -49,7 +55,7 @@ export class idOSIssuer {
49
55
  chainId: params.chainId,
50
56
  });
51
57
 
52
- const [signer] = createServerKwilSigner(params.signingKeyPair);
58
+ const [signer] = await createServerKwilSigner(params.signingKeyPair);
53
59
  kwilClient.setSigner(signer);
54
60
 
55
61
  const credentialService = new CredentialService(
@@ -60,21 +66,18 @@ export class idOSIssuer {
60
66
 
61
67
  const grantService = new GrantService(kwilClient, params.encryptionSecretKey);
62
68
  const userService = new UserService(kwilClient);
63
- const passportingService = new PassportingService(kwilClient);
64
69
 
65
- return new idOSIssuer(credentialService, grantService, userService, passportingService);
70
+ return new idOSIssuer(credentialService, grantService, userService);
66
71
  }
67
72
 
68
73
  private constructor(
69
74
  credentialService: CredentialService,
70
75
  grantService: GrantService,
71
76
  userService: UserService,
72
- passportingService: PassportingService,
73
77
  ) {
74
78
  this.#credentialService = credentialService;
75
79
  this.#grantService = grantService;
76
80
  this.#userService = userService;
77
- this.#passportingService = passportingService;
78
81
  }
79
82
 
80
83
  // User Service facade methods
@@ -97,6 +100,14 @@ export class idOSIssuer {
97
100
  return this.#userService.createUser(user, wallet);
98
101
  }
99
102
 
103
+ async getUser(id: string): Promise<idOSUser> {
104
+ return this.#userService.getUser({ id });
105
+ }
106
+
107
+ async requestDelegatedWriteGrantMessage(params: idOSDelegatedWriteGrant): Promise<string> {
108
+ return this.#credentialService.requestDelegatedWriteGrantMessage(params);
109
+ }
110
+
100
111
  async createCredentialByDelegatedWriteGrant(
101
112
  credentialParams: DelegatedWriteGrantBaseParams,
102
113
  delegatedWriteGrant: DelegatedWriteGrantParams,
@@ -115,7 +126,7 @@ export class idOSIssuer {
115
126
  async editCredentialAsIssuer(
116
127
  publicNotesId: string,
117
128
  publicNotes: string,
118
- ): Promise<EditCredentialAsIssuerParams | null> {
129
+ ): Promise<EditPublicNotesAsIssuerInput | null> {
119
130
  return this.#credentialService.editCredentialAsIssuer(publicNotesId, publicNotes);
120
131
  }
121
132
 
@@ -123,8 +134,8 @@ export class idOSIssuer {
123
134
  return this.#credentialService.getCredentialIdByContentHash(contentHash);
124
135
  }
125
136
 
126
- async getSharedCredential(id: string): Promise<idOSCredential | null> {
127
- return this.#credentialService.getSharedCredential(id);
137
+ async getCredentialShared(id: string): Promise<idOSCredential | null> {
138
+ return this.#credentialService.getCredentialShared(id);
128
139
  }
129
140
 
130
141
  async createAccessGrantFromDAG(
@@ -133,21 +144,30 @@ export class idOSIssuer {
133
144
  return this.#grantService.createAccessGrantFromDAG(
134
145
  params,
135
146
  (contentHash: string) => this.getCredentialIdByContentHash(contentHash),
136
- (id: string) => this.getSharedCredential(id),
147
+ (id: string) => this.getCredentialShared(id),
137
148
  );
138
149
  }
139
150
 
140
- async buildCredentials(
151
+ async buildCredential(
141
152
  fields: CredentialFields,
142
153
  subject: CredentialSubject,
143
154
  issuer: AvailableIssuerType,
144
155
  validate = true,
145
- ): Promise<Credentials> {
146
- return buildCredentials(fields, subject, issuer, validate);
156
+ ): Promise<Credential> {
157
+ return buildCredential(fields, subject, issuer, validate);
147
158
  }
148
159
 
149
- async getPassportingPeers(): Promise<PassportingPeer[]> {
150
- return this.#passportingService.getPassportingPeers();
160
+ deriveCredentialLevel(subject: CredentialSubject): string {
161
+ return deriveLevel(subject);
162
+ }
163
+
164
+ async buildFaceIdCredential(
165
+ fields: CredentialFields,
166
+ subject: CredentialSubjectFaceId,
167
+ issuer: AvailableIssuerType,
168
+ validate = true,
169
+ ): Promise<FaceIdCredential> {
170
+ return buildFaceIdCredential(fields, subject, issuer, validate);
151
171
  }
152
172
  }
153
173
 
@@ -156,9 +176,12 @@ export type {
156
176
  idOSGrant,
157
177
  idOSUser,
158
178
  idOSUserAttribute,
179
+ idOSDelegatedWriteGrant,
159
180
  idOSWallet,
160
181
  CredentialFields,
161
182
  CredentialSubject,
162
183
  AvailableIssuerType,
163
- Credentials,
184
+ Credential,
185
+ CredentialSubjectFaceId,
186
+ FaceIdCredential,
164
187
  };
@@ -1,14 +1,16 @@
1
- import { encryptContent } from "@idos-network/core/cryptography";
1
+ import type { idOSCredential } from "@idos-network/credentials/types";
2
+ import type { KwilActionClient } from "@idos-network/kwil-infra";
3
+
2
4
  import {
3
- type CreateCredentialByDelegatedWriteGrantParams,
4
- createCredentialByDelegatedWriteGrant,
5
- type EditCredentialAsIssuerParams,
6
- editCredentialAsIssuer,
7
- getCredentialIdByContentHash,
8
- getSharedCredential,
9
- } from "@idos-network/core/kwil-actions";
10
- import type { KwilActionClient } from "@idos-network/core/kwil-infra";
11
- import type { idOSCredential } from "@idos-network/credentials";
5
+ type CreateCredentialsByDwgInput,
6
+ createCredentialsByDwg,
7
+ dwgMessage,
8
+ type EditPublicNotesAsIssuerInput,
9
+ editPublicNotesAsIssuer,
10
+ getCredentialShared,
11
+ getSiblingCredentialId,
12
+ type idOSDelegatedWriteGrant,
13
+ } from "@idos-network/kwil-infra/actions";
12
14
  import {
13
15
  base64Decode,
14
16
  base64Encode,
@@ -16,6 +18,7 @@ import {
16
18
  hexEncodeSha256Hash,
17
19
  utf8Encode,
18
20
  } from "@idos-network/utils/codecs";
21
+ import { encryptContent } from "@idos-network/utils/cryptography";
19
22
  import invariant from "tiny-invariant";
20
23
  import nacl from "tweetnacl";
21
24
 
@@ -69,12 +72,6 @@ export class CredentialService {
69
72
  this.#encryptionSecretKey = encryptionSecretKey;
70
73
  }
71
74
 
72
- #buildInsertableIDOSCredential(args: BuildInsertableIDOSCredentialArgs): InsertableIDOSCredential;
73
-
74
- #buildInsertableIDOSCredential(
75
- args: Omit<BuildInsertableIDOSCredentialArgs, "userId">,
76
- ): Omit<InsertableIDOSCredential, "user_id">;
77
-
78
75
  #buildInsertableIDOSCredential({
79
76
  userId,
80
77
  publicNotes,
@@ -119,6 +116,10 @@ export class CredentialService {
119
116
  return entity as T & { id: string };
120
117
  }
121
118
 
119
+ async requestDelegatedWriteGrantMessage(params: idOSDelegatedWriteGrant): Promise<string> {
120
+ return dwgMessage(this.#kwilClient, params).then((res) => res.message);
121
+ }
122
+
122
123
  async createCredentialByDelegatedWriteGrant(
123
124
  credentialParams: DelegatedWriteGrantBaseParams,
124
125
  delegatedWriteGrant: DelegatedWriteGrantParams,
@@ -148,7 +149,7 @@ export class CredentialService {
148
149
  }),
149
150
  );
150
151
 
151
- const payload: CreateCredentialByDelegatedWriteGrantParams = {
152
+ const payload: CreateCredentialsByDwgInput = {
152
153
  issuer_auth_public_key: originalCredential.issuer_auth_public_key,
153
154
  original_encryptor_public_key: originalCredential.encryptor_public_key,
154
155
  original_credential_id: originalCredential.id,
@@ -172,7 +173,7 @@ export class CredentialService {
172
173
  dwg_signature: delegatedWriteGrant.signature,
173
174
  };
174
175
 
175
- await createCredentialByDelegatedWriteGrant(this.#kwilClient, payload);
176
+ await createCredentialsByDwg(this.#kwilClient, payload);
176
177
 
177
178
  return { originalCredential, copyCredential };
178
179
  }
@@ -180,27 +181,29 @@ export class CredentialService {
180
181
  async editCredentialAsIssuer(
181
182
  publicNotesId: string,
182
183
  publicNotes: string,
183
- ): Promise<EditCredentialAsIssuerParams | null> {
184
+ ): Promise<EditPublicNotesAsIssuerInput | null> {
184
185
  const payload = {
185
186
  public_notes_id: publicNotesId,
186
187
  public_notes: publicNotes,
187
188
  };
188
189
 
189
- const result = await editCredentialAsIssuer(this.#kwilClient, payload);
190
+ await editPublicNotesAsIssuer(this.#kwilClient, payload);
190
191
 
191
- return result ?? null;
192
+ return payload;
192
193
  }
193
194
 
194
195
  async getCredentialIdByContentHash(contentHash: string): Promise<string | null> {
195
- const id = await getCredentialIdByContentHash(this.#kwilClient, contentHash);
196
+ const id = await getSiblingCredentialId(this.#kwilClient, { content_hash: contentHash }).then(
197
+ (res) => res.id,
198
+ );
196
199
 
197
200
  invariant(id, "Required `idOSCredential` id not found");
198
201
 
199
202
  return id;
200
203
  }
201
204
 
202
- async getSharedCredential(id: string): Promise<idOSCredential | null> {
203
- const result = await getSharedCredential(this.#kwilClient, id);
205
+ async getCredentialShared(id: string): Promise<idOSCredential | null> {
206
+ const result = await getCredentialShared(this.#kwilClient, { id }).then((res) => res[0]);
204
207
 
205
208
  return result ?? null;
206
209
  }
@@ -1,8 +1,9 @@
1
- import { NoncedBox } from "@idos-network/core/cryptography";
2
- import { createAccessGrantByDag as _createAccessGrantByDag } from "@idos-network/core/kwil-actions";
3
- import type { KwilActionClient } from "@idos-network/core/kwil-infra";
4
- import type { idOSCredential } from "@idos-network/credentials";
1
+ import type { idOSCredential } from "@idos-network/credentials/types";
2
+ import type { KwilActionClient } from "@idos-network/kwil-infra";
3
+
4
+ import { createAgByDagForCopy as _createAgByDagForCopy } from "@idos-network/kwil-infra/actions";
5
5
  import { base64Encode, hexEncodeSha256Hash, utf8Encode } from "@idos-network/utils/codecs";
6
+ import { NoncedBox } from "@idos-network/utils/cryptography";
6
7
  import invariant from "tiny-invariant";
7
8
 
8
9
  export type CreateAccessGrantFromDAGParams = {
@@ -26,13 +27,13 @@ export class GrantService {
26
27
  async createAccessGrantFromDAG(
27
28
  params: CreateAccessGrantFromDAGParams,
28
29
  getCredentialIdByContentHash: (contentHash: string) => Promise<string | null>,
29
- getSharedCredential: (id: string) => Promise<idOSCredential | null>,
30
+ getCredentialShared: (id: string) => Promise<idOSCredential | null>,
30
31
  ): Promise<CreateAccessGrantFromDAGParams | null> {
31
32
  const credentialId = await getCredentialIdByContentHash(params.dag_content_hash);
32
33
 
33
34
  invariant(credentialId, "Missing `idOSCredential` id");
34
35
 
35
- const credential = await getSharedCredential(credentialId);
36
+ const credential = await getCredentialShared(credentialId);
36
37
 
37
38
  invariant(credential, "`idOSCredential` with id `{credentialId}` not found");
38
39
 
@@ -48,7 +49,7 @@ export class GrantService {
48
49
  throw new Error("Hash mismatch between `DAG` and `idOSCredential` content");
49
50
  }
50
51
 
51
- const result = await _createAccessGrantByDag(this.#kwilClient, params);
52
+ const result = await _createAgByDagForCopy(this.#kwilClient, params);
52
53
 
53
54
  return result ?? null;
54
55
  }
@@ -1,11 +1,14 @@
1
- import type { KwilActionClient } from "@idos-network/core";
1
+ import type { KwilActionClient } from "@idos-network/kwil-infra";
2
+
2
3
  import {
3
- createUser as _createUser,
4
4
  hasProfile as _hasProfile,
5
5
  upsertWalletAsInserter as _upsertWalletAsInserter,
6
+ addUserAsInserter,
7
+ type GetUserAsInserterInput,
8
+ getUserAsInserter,
6
9
  type idOSUser,
7
10
  type idOSWallet,
8
- } from "@idos-network/core/kwil-actions";
11
+ } from "@idos-network/kwil-infra/actions";
9
12
 
10
13
  export type CreateProfileReqParams = Omit<idOSUser, "id"> & {
11
14
  id?: string;
@@ -33,13 +36,13 @@ export class UserService {
33
36
  return entity as T & { id: string };
34
37
  }
35
38
 
36
- async hasProfile(userAddress: string): Promise<boolean> {
37
- return _hasProfile(this.#kwilClient, userAddress);
39
+ async hasProfile(address: string): Promise<boolean> {
40
+ return _hasProfile(this.#kwilClient, { address }).then((res) => res.has_profile);
38
41
  }
39
42
 
40
43
  async createUserProfile(params: CreateProfileReqParams): Promise<idOSUser> {
41
44
  const payload = this.#ensureEntityId(params);
42
- await _createUser(this.#kwilClient, payload);
45
+ await addUserAsInserter(this.#kwilClient, payload);
43
46
  return payload;
44
47
  }
45
48
 
@@ -49,6 +52,11 @@ export class UserService {
49
52
  return payload;
50
53
  }
51
54
 
55
+ /// Useful to understand if a user id already exists.
56
+ async getUser(params: GetUserAsInserterInput): Promise<idOSUser> {
57
+ return getUserAsInserter(this.#kwilClient, this.#ensureEntityId(params));
58
+ }
59
+
52
60
  async createUser(
53
61
  user: CreateProfileReqParams,
54
62
  wallet: CreateWalletReqParams,
package/dist/index.d.ts DELETED
@@ -1,256 +0,0 @@
1
- import nacl, { SignKeyPair } from "tweetnacl";
2
- import { Utils } from "@idos-network/kwil-js";
3
- import { Ed25519VerificationKey2020, Ed25519VerificationKey2020Options } from "@digitalbazaar/ed25519-verification-key-2020";
4
- import * as z$1 from "zod";
5
- import * as z from "zod";
6
-
7
- //#region ../@credentials/src/utils/types.d.ts
8
- type idOSCredential = {
9
- id: string;
10
- user_id: string;
11
- issuer_auth_public_key: string;
12
- original_id?: string;
13
- public_notes: string;
14
- content: string;
15
- encryptor_public_key: string;
16
- };
17
- // https://github.com/colinhacks/zod/issues/3751
18
- declare const CredentialFieldsSchema: z$1.ZodObject<{
19
- id: z$1.ZodString;
20
- level: z$1.ZodString;
21
- issued: z$1.ZodOptional<z$1.ZodDate>;
22
- approvedAt: z$1.ZodOptional<z$1.ZodDate>;
23
- expirationDate: z$1.ZodOptional<z$1.ZodDate>;
24
- }>;
25
- type CredentialFields = z$1.infer<typeof CredentialFieldsSchema>;
26
- // https://github.com/colinhacks/zod/issues/3751
27
- declare const CredentialResidentialAddressSchema: z$1.ZodObject<{
28
- street: z$1.ZodString;
29
- houseNumber: z$1.ZodOptional<z$1.ZodString>;
30
- additionalAddressInfo: z$1.ZodOptional<z$1.ZodString>;
31
- region: z$1.ZodOptional<z$1.ZodString>;
32
- city: z$1.ZodString;
33
- postalCode: z$1.ZodString;
34
- country: z$1.ZodString;
35
- }>;
36
- declare const IDDocumentTypeSchema: z$1.ZodEnum<{
37
- PASSPORT: "PASSPORT";
38
- DRIVERS: "DRIVERS";
39
- ID_CARD: "ID_CARD";
40
- }>;
41
- declare const GenderSchema: z$1.ZodEnum<{
42
- M: "M";
43
- F: "F";
44
- OTHER: "OTHER";
45
- }>;
46
- // https://github.com/colinhacks/zod/issues/3751
47
- declare const CredentialSubjectSchema: z$1.ZodObject<{
48
- id: z$1.ZodString;
49
- applicantId: z$1.ZodOptional<z$1.ZodString>;
50
- inquiryId: z$1.ZodOptional<z$1.ZodString>;
51
- firstName: z$1.ZodString;
52
- middleName: z$1.ZodOptional<z$1.ZodString>;
53
- ssn: z$1.ZodOptional<z$1.ZodString>;
54
- gender: z$1.ZodOptional<typeof GenderSchema>;
55
- nationality: z$1.ZodOptional<z$1.ZodString>;
56
- familyName: z$1.ZodString;
57
- maidenName: z$1.ZodOptional<z$1.ZodString>;
58
- governmentId: z$1.ZodOptional<z$1.ZodString>;
59
- governmentIdType: z$1.ZodOptional<z$1.ZodString>;
60
- dateOfBirth: z$1.ZodDate;
61
- placeOfBirth: z$1.ZodOptional<z$1.ZodString>;
62
- email: z$1.ZodOptional<z$1.ZodEmail>;
63
- phoneNumber: z$1.ZodOptional<z$1.ZodString>;
64
- idDocumentCountry: z$1.ZodString;
65
- idDocumentNumber: z$1.ZodString;
66
- idDocumentType: typeof IDDocumentTypeSchema;
67
- idDocumentDateOfIssue: z$1.ZodOptional<z$1.ZodDate>;
68
- idDocumentDateOfExpiry: z$1.ZodOptional<z$1.ZodDate>;
69
- idDocumentFrontFile: z$1.ZodType<Buffer<ArrayBufferLike>>;
70
- idDocumentBackFile: z$1.ZodOptional<z$1.ZodType<Buffer<ArrayBufferLike>>>;
71
- selfieFile: z$1.ZodType<Buffer<ArrayBufferLike>>;
72
- residentialAddress: z$1.ZodOptional<typeof CredentialResidentialAddressSchema>;
73
- residentialAddressProofCategory: z$1.ZodOptional<z$1.ZodString>;
74
- residentialAddressProofDateOfIssue: z$1.ZodOptional<z$1.ZodDate>;
75
- residentialAddressProofFile: z$1.ZodOptional<z$1.ZodType<Buffer<ArrayBufferLike>>>;
76
- }>;
77
- type CredentialSubject = z$1.infer<typeof CredentialSubjectSchema>;
78
- interface VerifiableCredentialSubject extends Omit<CredentialSubject, "residentialAddress"> {
79
- "@context": string;
80
- residentialAddressStreet?: string;
81
- residentialAddressHouseNumber?: string;
82
- residentialAddressAdditionalAddressInfo?: string;
83
- residentialAddressRegion?: string;
84
- residentialAddressCity?: string;
85
- residentialAddressPostalCode?: string;
86
- residentialAddressCountry?: string;
87
- }
88
- // TODO: This is a stub of the types for @digitalbazaar/vc
89
- // when they introduce TypeScript support we should remove this
90
- // The copy is here because `types.d.ts` file is not bundled.
91
- interface VerifiedCredentialsProof {
92
- type: string;
93
- created: string;
94
- verificationMethod: string;
95
- proofValue: string;
96
- proofPurpose: string;
97
- }
98
- interface VerifiedCredentials<K> {
99
- "@context": string[];
100
- type: string[];
101
- issuer: string;
102
- id: string;
103
- level: string;
104
- issued: string;
105
- approvedAt: string;
106
- expirationDate: string;
107
- credentialSubject: K;
108
- issuanceDate: string;
109
- proof: VerifiedCredentialsProof;
110
- }
111
- type VerifiableCredential<K> = VerifiedCredentials<K>;
112
- //#endregion
113
- //#region ../@credentials/src/utils/index.d.ts
114
- interface CustomIssuerType {
115
- issuer: string;
116
- /* Multibase encoded public key */
117
- publicKeyMultibase: string;
118
- /* Multibase encoded private key */
119
- privateKeyMultibase?: string;
120
- }
121
- type AvailableIssuerType = Omit<Ed25519VerificationKey2020Options, "type"> | Ed25519VerificationKey2020 | CustomIssuerType;
122
- //#endregion
123
- //#region ../@credentials/src/builder.d.ts
124
- type Credentials = VerifiableCredential<VerifiableCredentialSubject>;
125
- //#endregion
126
- //#region ../@core/src/types/index.d.ts
127
- type PassportingPeer = {
128
- id: string;
129
- name: string;
130
- issuer_public_key: string;
131
- passporting_server_url_base: string;
132
- };
133
- //#endregion
134
- //#region ../@core/src/kwil-actions/actions.d.ts
135
- declare const idOSUserSchema: z.ZodObject<{
136
- id: z.ZodUUID;
137
- recipient_encryption_public_key: z.ZodString;
138
- encryption_password_store: z.ZodString;
139
- }>;
140
- type idOSUser = z.infer<typeof idOSUserSchema>;
141
- /** USER ACTIONS */
142
-
143
- declare const idOSWalletSchema: z.ZodObject<{
144
- id: z.ZodUUID;
145
- user_id: z.ZodUUID;
146
- address: z.ZodString;
147
- public_key: z.ZodString;
148
- wallet_type: z.ZodString;
149
- message: z.ZodString;
150
- signature: z.ZodString;
151
- }>;
152
- type idOSWallet = z.infer<typeof idOSWalletSchema>;
153
- /** WALLET ACTIONS */
154
-
155
- declare const EditCredentialAsIssuerParamsSchema: z.ZodObject<{
156
- public_notes_id: z.ZodString;
157
- public_notes: z.ZodString;
158
- }>;
159
- type EditCredentialAsIssuerParams = z.infer<typeof EditCredentialAsIssuerParamsSchema>;
160
- /**
161
- * Be aware that @caller here is ed25519 public key, hex encoded.
162
- * All other @caller in the schema are either secp256k1 or nep413
163
- * This action can't be called by kwil-cli (as kwil-cli uses secp256k1 only)
164
- */
165
-
166
- declare const idOSUserAttributeSchema: z.ZodObject<{
167
- id: z.ZodUUID;
168
- user_id: z.ZodUUID;
169
- attribute_key: z.ZodString;
170
- value: z.ZodString;
171
- original_id: z.ZodUUID;
172
- }>;
173
- type idOSUserAttribute = z.infer<typeof idOSUserAttributeSchema>;
174
- declare const idOSGrantSchema: z.ZodObject<{
175
- id: z.ZodUUID;
176
- ag_owner_user_id: z.ZodUUID;
177
- ag_grantee_wallet_identifier: z.ZodString;
178
- data_id: z.ZodUUID;
179
- locked_until: z.ZodNumber;
180
- content_hash: z.ZodString;
181
- inserter_type: z.ZodString;
182
- inserter_id: z.ZodString;
183
- }>;
184
- type idOSGrant = z.infer<typeof idOSGrantSchema>;
185
- //#endregion
186
- //#region src/services/credential.service.d.ts
187
- type BaseCredentialParams = {
188
- id?: string;
189
- userId: string;
190
- publicNotes: string;
191
- plaintextContent: Uint8Array;
192
- recipientEncryptionPublicKey: Uint8Array;
193
- };
194
- type DelegatedWriteGrantBaseParams = Omit<BaseCredentialParams, "userId">;
195
- type DelegatedWriteGrantParams = {
196
- id: string;
197
- ownerWalletIdentifier: string;
198
- consumerWalletIdentifier: string;
199
- issuerPublicKey: string;
200
- accessGrantTimelock: string;
201
- notUsableBefore: string;
202
- notUsableAfter: string;
203
- signature: string;
204
- };
205
- //#endregion
206
- //#region src/services/grant.service.d.ts
207
- type CreateAccessGrantFromDAGParams = {
208
- dag_data_id: string;
209
- dag_owner_wallet_identifier: string;
210
- dag_grantee_wallet_identifier: string;
211
- dag_signature: string;
212
- dag_locked_until: number;
213
- dag_content_hash: string;
214
- };
215
- //#endregion
216
- //#region src/services/user.service.d.ts
217
- type CreateProfileReqParams = Omit<idOSUser, "id"> & {
218
- id?: string;
219
- };
220
- type UpsertWalletReqParams = Omit<idOSWallet, "id"> & {
221
- id?: string;
222
- };
223
- type CreateWalletReqParams = Omit<UpsertWalletReqParams, "user_id"> & {
224
- id?: string;
225
- };
226
- //#endregion
227
- //#region src/index.d.ts
228
- type CreateIssuerParams = {
229
- chainId?: string;
230
- nodeUrl: string;
231
- signingKeyPair: SignKeyPair;
232
- encryptionSecretKey: Uint8Array;
233
- };
234
- declare class idOSIssuer {
235
- #private;
236
- static init(params: CreateIssuerParams): Promise<idOSIssuer>;
237
- private constructor();
238
- // User Service facade methods
239
- hasProfile(userAddress: string): Promise<boolean>;
240
- createUserProfile(params: CreateProfileReqParams): Promise<idOSUser>;
241
- upsertWalletAsInserter(params: UpsertWalletReqParams): Promise<idOSWallet>;
242
- createUser(user: CreateProfileReqParams, wallet: CreateWalletReqParams): Promise<[idOSUser, idOSWallet]>;
243
- createCredentialByDelegatedWriteGrant(credentialParams: DelegatedWriteGrantBaseParams, delegatedWriteGrant: DelegatedWriteGrantParams, consumerEncryptionPublicKey?: Uint8Array): Promise<{
244
- originalCredential: Omit<idOSCredential, "user_id">;
245
- copyCredential: Omit<idOSCredential, "user_id">;
246
- }>;
247
- editCredentialAsIssuer(publicNotesId: string, publicNotes: string): Promise<EditCredentialAsIssuerParams | null>;
248
- getCredentialIdByContentHash(contentHash: string): Promise<string | null>;
249
- getSharedCredential(id: string): Promise<idOSCredential | null>;
250
- createAccessGrantFromDAG(params: CreateAccessGrantFromDAGParams): Promise<CreateAccessGrantFromDAGParams | null>;
251
- buildCredentials(fields: CredentialFields, subject: CredentialSubject, issuer: AvailableIssuerType, validate?: boolean): Promise<Credentials>;
252
- getPassportingPeers(): Promise<PassportingPeer[]>;
253
- }
254
- //#endregion
255
- export { type AvailableIssuerType, type CredentialFields, type CredentialSubject, type Credentials, type idOSCredential, type idOSGrant, idOSIssuer, type idOSUser, type idOSUserAttribute, type idOSWallet };
256
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","names":["CredentialFieldsSchema: z.ZodObject<{\n id: z.ZodString;\n level: z.ZodString;\n issued: z.ZodOptional<z.ZodDate>;\n approvedAt: z.ZodOptional<z.ZodDate>;\n expirationDate: z.ZodOptional<z.ZodDate>;\n}>","CredentialResidentialAddressSchema: z.ZodObject<{\n street: z.ZodString;\n houseNumber: z.ZodOptional<z.ZodString>;\n additionalAddressInfo: z.ZodOptional<z.ZodString>;\n region: z.ZodOptional<z.ZodString>;\n city: z.ZodString;\n postalCode: z.ZodString;\n country: z.ZodString;\n}>","IDDocumentTypeSchema: z.ZodEnum<{\n PASSPORT: \"PASSPORT\";\n DRIVERS: \"DRIVERS\";\n ID_CARD: \"ID_CARD\";\n}>","GenderSchema: z.ZodEnum<{\n M: \"M\";\n F: \"F\";\n OTHER: \"OTHER\";\n}>","CredentialSubjectSchema: z.ZodObject<{\n id: z.ZodString;\n applicantId: z.ZodOptional<z.ZodString>;\n inquiryId: z.ZodOptional<z.ZodString>;\n firstName: z.ZodString;\n middleName: z.ZodOptional<z.ZodString>;\n ssn: z.ZodOptional<z.ZodString>;\n gender: z.ZodOptional<typeof GenderSchema>;\n nationality: z.ZodOptional<z.ZodString>;\n familyName: z.ZodString;\n maidenName: z.ZodOptional<z.ZodString>;\n governmentId: z.ZodOptional<z.ZodString>;\n governmentIdType: z.ZodOptional<z.ZodString>;\n dateOfBirth: z.ZodDate;\n placeOfBirth: z.ZodOptional<z.ZodString>;\n email: z.ZodOptional<z.ZodEmail>;\n phoneNumber: z.ZodOptional<z.ZodString>;\n idDocumentCountry: z.ZodString;\n idDocumentNumber: z.ZodString;\n idDocumentType: typeof IDDocumentTypeSchema;\n idDocumentDateOfIssue: z.ZodOptional<z.ZodDate>;\n idDocumentDateOfExpiry: z.ZodOptional<z.ZodDate>;\n idDocumentFrontFile: z.ZodType<Buffer<ArrayBufferLike>>;\n idDocumentBackFile: z.ZodOptional<z.ZodType<Buffer<ArrayBufferLike>>>;\n selfieFile: z.ZodType<Buffer<ArrayBufferLike>>;\n residentialAddress: z.ZodOptional<typeof CredentialResidentialAddressSchema>;\n residentialAddressProofCategory: z.ZodOptional<z.ZodString>;\n residentialAddressProofDateOfIssue: z.ZodOptional<z.ZodDate>;\n residentialAddressProofFile: z.ZodOptional<z.ZodType<Buffer<ArrayBufferLike>>>;\n}>","file: Buffer","data: string","str: string","issuer: AvailableIssuerType","fields: K","prefix?: string","fields: CredentialFields","subject: CredentialSubject","issuer: AvailableIssuerType","message: Extract<IsleNodeMessage, { type: T }>","DataType: typeof Utils.DataType","actionSchema: Record<string, ActionSchemaElement[]>","idOSUserSchema: z.ZodObject<{\n id: z.ZodUUID;\n recipient_encryption_public_key: z.ZodString;\n encryption_password_store: z.ZodString;\n}>","kwilClient: KwilActionClient","params: idOSUser","GetUserOutputSchema: z.ZodObject<{\n id: z.ZodUUID;\n recipient_encryption_public_key: z.ZodString;\n encryption_password_store: z.ZodString;\n}>","idOSWalletSchema: z.ZodObject<{\n id: z.ZodUUID;\n user_id: z.ZodUUID;\n address: z.ZodString;\n public_key: z.ZodString;\n wallet_type: z.ZodString;\n message: z.ZodString;\n signature: z.ZodString;\n}>","params: idOSWallet","AddWalletInputSchema: z.ZodObject<{\n id: z.ZodUUID;\n address: z.ZodString;\n public_key: z.ZodString;\n message: z.ZodString;\n signature: z.ZodString;\n}>","params: AddWalletInput","GetWalletsOutputSchema: z.ZodObject<{\n id: z.ZodUUID;\n user_id: z.ZodUUID;\n address: z.ZodString;\n public_key: z.ZodString;\n wallet_type: z.ZodString;\n message: z.ZodString;\n signature: z.ZodString;\n inserter: z.ZodString;\n}>","RemoveWalletInputSchema: z.ZodObject<{\n id: z.ZodUUID;\n}>","params: RemoveWalletInput","idOSCredentialListItemSchema: z.ZodObject<{\n id: z.ZodUUID;\n user_id: z.ZodUUID;\n public_notes: z.ZodString;\n issuer_auth_public_key: z.ZodString;\n inserter: z.ZodString;\n original_id: z.ZodUUID;\n}>","GetCredentialsSharedByUserInputSchema: z.ZodObject<{\n user_id: z.ZodUUID;\n issuer_auth_public_key: z.ZodNullable<z.ZodString>;\n}>","GetCredentialsSharedByUserOutputSchema: z.ZodObject<{\n id: z.ZodUUID;\n user_id: z.ZodUUID;\n public_notes: z.ZodString;\n encryptor_public_key: z.ZodString;\n issuer_auth_public_key: z.ZodString;\n inserter: z.ZodString;\n original_id: z.ZodUUID;\n}>","params: GetCredentialsSharedByUserInput","EditCredentialAsIssuerParamsSchema: z.ZodObject<{\n public_notes_id: z.ZodString;\n public_notes: z.ZodString;\n}>","params: EditCredentialAsIssuerParams","RemoveCredentialInputSchema: z.ZodObject<{\n id: z.ZodUUID;\n}>","params: RemoveCredentialInput","ShareCredentialInputSchema: z.ZodObject<{\n id: z.ZodUUID;\n original_credential_id: z.ZodUUID;\n public_notes: z.ZodString;\n public_notes_signature: z.ZodString;\n broader_signature: z.ZodString;\n content: z.ZodString;\n content_hash: z.ZodString;\n encryptor_public_key: z.ZodString;\n issuer_auth_public_key: z.ZodString;\n grantee_wallet_identifier: z.ZodString;\n locked_until: z.ZodNumber;\n}>","params: ShareCredentialInput","CreateCredentialCopyInputSchema: z.ZodObject<{\n id: z.ZodUUID;\n original_credential_id: z.ZodUUID;\n public_notes: z.ZodString;\n public_notes_signature: z.ZodString;\n broader_signature: z.ZodString;\n content: z.ZodString;\n encryptor_public_key: z.ZodString;\n issuer_auth_public_key: z.ZodString;\n}>","params: CreateCredentialCopyInput","CreateCredentialByDelegatedWriteGrantInputSchema: z.ZodObject<{\n issuer_auth_public_key: z.ZodString;\n original_encryptor_public_key: z.ZodString;\n original_credential_id: z.ZodUUID;\n original_content: z.ZodString;\n original_public_notes: z.ZodString;\n original_public_notes_signature: z.ZodString;\n original_broader_signature: z.ZodString;\n copy_encryptor_public_key: z.ZodString;\n copy_credential_id: z.ZodUUID;\n copy_content: z.ZodString;\n copy_public_notes_signature: z.ZodString;\n copy_broader_signature: z.ZodString;\n content_hash: z.ZodString;\n dwg_owner: z.ZodString;\n dwg_grantee: z.ZodString;\n dwg_issuer_public_key: z.ZodString;\n dwg_id: z.ZodUUID;\n dwg_access_grant_timelock: z.ZodString;\n dwg_not_before: z.ZodString;\n dwg_not_after: z.ZodString;\n dwg_signature: z.ZodString;\n}>","params: CreateCredentialByDelegatedWriteGrantInput","GetCredentialOwnedInputSchema: z.ZodObject<{\n id: z.ZodUUID;\n}>","idOSCredentialSchema: z.ZodObject<{\n id: z.ZodUUID;\n user_id: z.ZodUUID;\n public_notes: z.ZodString;\n content: z.ZodString;\n encryptor_public_key: z.ZodString;\n issuer_auth_public_key: z.ZodString;\n inserter: z.ZodString;\n}>","params: GetCredentialOwnedInput","GetSharedCredentialInputSchema: z.ZodObject<{\n id: z.ZodUUID;\n}>","params: GetSharedCredentialInput","GetCredentialIdByContentHashInputSchema: z.ZodObject<{\n content_hash: z.ZodString;\n}>","GetCredentialIdByContentHashOutputSchema: z.ZodObject<{\n id: z.ZodUUID;\n}>","params: GetCredentialIdByContentHashInput","AddAttributeInputSchema: z.ZodObject<{\n id: z.ZodUUID;\n attribute_key: z.ZodString;\n value: z.ZodString;\n}>","params: AddAttributeInput","idOSUserAttributeSchema: z.ZodObject<{\n id: z.ZodUUID;\n user_id: z.ZodUUID;\n attribute_key: z.ZodString;\n value: z.ZodString;\n original_id: z.ZodUUID;\n}>","idOSDelegatedWriteGrantSchema: z.ZodObject<{\n owner_wallet_identifier: z.ZodString;\n grantee_wallet_identifier: z.ZodString;\n issuer_public_key: z.ZodString;\n id: z.ZodUUID;\n access_grant_timelock: z.ZodString;\n not_usable_before: z.ZodString;\n not_usable_after: z.ZodString;\n}>","DwgMessageOutputSchema: z.ZodObject<{\n message: z.ZodString;\n}>","params: idOSDelegatedWriteGrant","RevokeAccessGrantInputSchema: z.ZodObject<{\n id: z.ZodUUID;\n}>","params: RevokeAccessGrantInput","idOSGrantSchema: z.ZodObject<{\n id: z.ZodUUID;\n ag_owner_user_id: z.ZodUUID;\n ag_grantee_wallet_identifier: z.ZodString;\n data_id: z.ZodUUID;\n locked_until: z.ZodNumber;\n content_hash: z.ZodString;\n inserter_type: z.ZodString;\n inserter_id: z.ZodString;\n}>","GetGrantsPaginatedInputSchema: z.ZodObject<{\n user_id: z.ZodNullable<z.ZodUUID>;\n page: z.ZodNumber;\n size: z.ZodNumber;\n}>","params: GetGrantsPaginatedInput","GetGrantsCountInputSchema: z.ZodObject<{\n user_id: z.ZodNullable<z.ZodUUID>;\n}>","GetGrantsCountOutputSchema: z.ZodObject<{\n count: z.ZodNumber;\n}>","params: GetGrantsCountInput","DagMessageInputSchema: z.ZodObject<{\n dag_owner_wallet_identifier: z.ZodString;\n dag_grantee_wallet_identifier: z.ZodString;\n dag_data_id: z.ZodUUID;\n dag_locked_until: z.ZodNumber;\n dag_content_hash: z.ZodString;\n}>","DagMessageOutputSchema: z.ZodObject<{\n message: z.ZodString;\n}>","params: DagMessageInput","CreateAccessGrantByDagInputSchema: z.ZodObject<{\n dag_owner_wallet_identifier: z.ZodString;\n dag_grantee_wallet_identifier: z.ZodString;\n dag_data_id: z.ZodUUID;\n dag_locked_until: z.ZodNumber;\n dag_content_hash: z.ZodString;\n dag_signature: z.ZodString;\n}>","params: CreateAccessGrantByDagInput","GetAccessGrantsForCredentialInputSchema: z.ZodObject<{\n credential_id: z.ZodUUID;\n}>","GetAccessGrantsForCredentialOutputSchema: z.ZodObject<{\n id: z.ZodUUID;\n ag_owner_user_id: z.ZodUUID;\n ag_grantee_wallet_identifier: z.ZodString;\n data_id: z.ZodUUID;\n locked_until: z.ZodNumber;\n content_hash: z.ZodString;\n inserter_type: z.ZodString;\n inserter_id: z.ZodString;\n}>","params: GetAccessGrantsForCredentialInput","HasProfileInputSchema: z.ZodObject<{\n address: z.ZodString;\n}>","HasProfileOutputSchema: z.ZodObject<{\n has_profile: z.ZodBoolean;\n}>","params: HasProfileInput","GetPassportingPeersOutputSchema: z.ZodObject<{\n id: z.ZodUUID;\n name: z.ZodString;\n issuer_public_key: z.ZodString;\n passporting_server_url_base: z.ZodString;\n club_id: z.ZodUUID;\n club_name: z.ZodString;\n}>","kwilClient: KwilActionClient","signingKeyPair: nacl.SignKeyPair","encryptionSecretKey: Uint8Array","credentialParams: DelegatedWriteGrantBaseParams","delegatedWriteGrant: DelegatedWriteGrantParams","consumerEncryptionPublicKey?: Uint8Array","publicNotesId: string","publicNotes: string","contentHash: string","id: string","kwilClient: KwilActionClient","encryptionSecretKey: Uint8Array","params: CreateAccessGrantFromDAGParams","getCredentialIdByContentHash: (contentHash: string) => Promise<string | null>","contentHash: string","getSharedCredential: (id: string) => Promise<idOSCredential | null>","id: string","kwilClient: KwilActionClient","userAddress: string","params: CreateProfileReqParams","params: UpsertWalletReqParams","user: CreateProfileReqParams","wallet: CreateWalletReqParams","params: CreateIssuerParams","userAddress: string","params: CreateProfileReqParams","params: UpsertWalletReqParams","user: CreateProfileReqParams","wallet: CreateWalletReqParams","credentialParams: DelegatedWriteGrantBaseParams","delegatedWriteGrant: DelegatedWriteGrantParams","consumerEncryptionPublicKey?: Uint8Array","publicNotesId: string","publicNotes: string","contentHash: string","id: string","params: CreateAccessGrantFromDAGParams","fields: CredentialFields","subject: CredentialSubject","issuer: AvailableIssuerType"],"sources":["../../@credentials/src/utils/types.ts","../../@credentials/src/utils/index.ts","../../@credentials/src/builder.ts","../../@core/src/types/index.ts","../../@core/src/kwil-actions/actions.ts","../src/services/credential.service.ts","../src/services/grant.service.ts","../src/services/user.service.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;KAEY,cAAA;;;;;;EAAZ,OAAY,EAAA,MAAA;EAkBZ,oBAAaA,EAAAA,MAMZ;CAAA;;AADiB,cALLA,sBAKO,EALiB,GAAA,CAAE,SAKnB,CAAA;EAAA,EAAA,EAJd,GAAA,CAAE,SAD+B;EAAA,KAAA,EAE9B,GAAA,CAAE,SAF4B;EAsBvC,MAAY,EAnBF,GAAA,CAAE,WAmBA,CAnBY,GAAA,CAAE,OAmBd,CAAA;EAAA,UAAA,EAlBE,GAAA,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