ns-auth-sdk 1.14.2 → 1.14.3

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.
@@ -0,0 +1,113 @@
1
+
2
+ //#region src/services/zkm.service.ts
3
+ let IdentityClass = null;
4
+ let GroupClass = null;
5
+ let generateProofFn = null;
6
+ let verifyProofFn = null;
7
+ async function loadSemaphore() {
8
+ if (IdentityClass) return;
9
+ try {
10
+ const semaphore = await import("@semaphore-protocol/proof");
11
+ IdentityClass = semaphore.Identity;
12
+ GroupClass = semaphore.Group;
13
+ generateProofFn = semaphore.generateProof;
14
+ verifyProofFn = semaphore.verifyProof;
15
+ } catch (error) {
16
+ throw new Error("Semaphore requires @semaphore-protocol/proof. Install with: npm install @semaphore-protocol/proof");
17
+ }
18
+ }
19
+ async function generateMembershipProof(identity, group, scope = "default") {
20
+ await loadSemaphore();
21
+ const semaphoreIdentity = new IdentityClass(BigInt("0x" + identity.privateKey));
22
+ const proof = await generateProofFn(semaphoreIdentity, group.group, BigInt(scope), group.group.root);
23
+ return {
24
+ groupId: group.id,
25
+ root: group.root,
26
+ proof: JSON.stringify(proof),
27
+ nullifier: proof.nullifier.toString(16),
28
+ scope,
29
+ merkleTreeDepth: group.group.depth,
30
+ issuedAt: (/* @__PURE__ */ new Date()).toISOString()
31
+ };
32
+ }
33
+ async function verifyMembershipProof(proof, knownRoot) {
34
+ await loadSemaphore();
35
+ try {
36
+ const proofObj = typeof proof.proof === "string" ? JSON.parse(proof.proof) : proof.proof;
37
+ return await verifyProofFn(proofObj, BigInt("0x" + knownRoot));
38
+ } catch (error) {
39
+ console.error("Proof verification failed:", error);
40
+ return false;
41
+ }
42
+ }
43
+ var ZKMService = class {
44
+ #config = null;
45
+ #connected = false;
46
+ #identity = null;
47
+ #group = null;
48
+ async connect(config) {
49
+ this.#config = config;
50
+ this.#connected = true;
51
+ }
52
+ async disconnect() {
53
+ this.#config = null;
54
+ this.#connected = false;
55
+ }
56
+ isConnected() {
57
+ return this.#connected;
58
+ }
59
+ async generateIdentity() {
60
+ await loadSemaphore();
61
+ const identity = new IdentityClass();
62
+ this.#identity = {
63
+ privateKey: identity.identityNullifier.toString(16),
64
+ commitment: identity.commitment.toString(16)
65
+ };
66
+ return this.#identity;
67
+ }
68
+ async createGroup(groupId) {
69
+ if (!this.#identity) throw new Error("No identity. Call generateIdentity() first.");
70
+ await loadSemaphore();
71
+ const identity = new IdentityClass(BigInt("0x" + this.#identity.privateKey));
72
+ const group = new GroupClass();
73
+ group.addMember(identity.commitment);
74
+ this.#group = {
75
+ id: groupId,
76
+ group,
77
+ root: group.root.toString(16),
78
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
79
+ };
80
+ return this.#group;
81
+ }
82
+ async addMember(identity) {
83
+ if (!this.#group) throw new Error("No group. Call createGroup() first.");
84
+ await loadSemaphore();
85
+ const semaphoreIdentity = new IdentityClass(BigInt("0x" + identity.privateKey));
86
+ this.#group.group.addMember(semaphoreIdentity.commitment);
87
+ this.#group = {
88
+ ...this.#group,
89
+ root: this.#group.group.root.toString(16)
90
+ };
91
+ return this.#group;
92
+ }
93
+ async generateProof(scope) {
94
+ if (!this.#identity || !this.#group) throw new Error("No identity or group. Call generateIdentity() and createGroup() first.");
95
+ return generateMembershipProof(this.#identity, this.#group, scope);
96
+ }
97
+ async verifyProof(proof, root) {
98
+ return verifyMembershipProof(proof, root);
99
+ }
100
+ getIdentity() {
101
+ return this.#identity;
102
+ }
103
+ getGroup() {
104
+ return this.#group;
105
+ }
106
+ getConfig() {
107
+ return this.#config;
108
+ }
109
+ };
110
+
111
+ //#endregion
112
+ exports.ZKMService = ZKMService;
113
+ //# sourceMappingURL=zkm.service-B1MBvBEu.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zkm.service-B1MBvBEu.cjs","names":["#config","#connected","#identity","#group"],"sources":["../src/services/zkm.service.ts"],"sourcesContent":["/**\n * ZK Membership Service - Using Semaphore library for anonymous group membership\n * @packageDocumentation\n */\n\nimport type { ZKMVerifierConfig } from '../types/zkm.js';\n\nexport interface ZKMIdentity {\n privateKey: string;\n commitment: string;\n}\n\nlet IdentityClass: any = null;\nlet GroupClass: any = null;\nlet generateProofFn: any = null;\nlet verifyProofFn: any = null;\n\nasync function loadSemaphore(): Promise<void> {\n if (IdentityClass) return;\n\n try {\n const semaphore = await import('@semaphore-protocol/proof');\n IdentityClass = semaphore.Identity;\n GroupClass = semaphore.Group;\n generateProofFn = semaphore.generateProof;\n verifyProofFn = semaphore.verifyProof;\n } catch (error) {\n throw new Error('Semaphore requires @semaphore-protocol/proof. Install with: npm install @semaphore-protocol/proof');\n }\n}\n\nexport function isZKMAvailable(): boolean {\n return true;\n}\n\nexport async function generateIdentity(): Promise<ZKMIdentity> {\n await loadSemaphore();\n const identity = new IdentityClass();\n return {\n privateKey: identity.identityNullifier.toString(16),\n commitment: identity.commitment.toString(16),\n };\n}\n\nexport async function createGroup(groupId: string, adminIdentity: ZKMIdentity): Promise<any> {\n await loadSemaphore();\n const identity = new IdentityClass(BigInt('0x' + adminIdentity.privateKey));\n const group = new GroupClass();\n group.addMember(identity.commitment);\n \n return {\n id: groupId,\n group,\n root: group.root.toString(16),\n createdAt: new Date().toISOString(),\n };\n}\n\nexport async function addMember(group: any, newIdentity: ZKMIdentity): Promise<any> {\n await loadSemaphore();\n const identity = new IdentityClass(BigInt('0x' + newIdentity.privateKey));\n group.group.addMember(identity.commitment);\n \n return {\n ...group,\n root: group.group.root.toString(16),\n };\n}\n\nexport async function generateMembershipProof(\n identity: ZKMIdentity,\n group: any,\n scope: string = 'default'\n): Promise<any> {\n await loadSemaphore();\n \n const semaphoreIdentity = new IdentityClass(BigInt('0x' + identity.privateKey));\n const proof = await generateProofFn(semaphoreIdentity, group.group, BigInt(scope), group.group.root);\n \n return {\n groupId: group.id,\n root: group.root,\n proof: JSON.stringify(proof),\n nullifier: proof.nullifier.toString(16),\n scope,\n merkleTreeDepth: group.group.depth,\n issuedAt: new Date().toISOString(),\n };\n}\n\nexport async function verifyMembershipProof(\n proof: any,\n knownRoot: string\n): Promise<boolean> {\n await loadSemaphore();\n \n try {\n const proofObj = typeof proof.proof === 'string' ? JSON.parse(proof.proof) : proof.proof;\n const isValid = await verifyProofFn(proofObj, BigInt('0x' + knownRoot));\n return isValid;\n } catch (error) {\n console.error('Proof verification failed:', error);\n return false;\n }\n}\n\nexport class ZKMService {\n #config: ZKMVerifierConfig | null = null;\n #connected = false;\n #identity: ZKMIdentity | null = null;\n #group: any = null;\n\n async connect(config: ZKMVerifierConfig): Promise<void> {\n this.#config = config;\n this.#connected = true;\n }\n\n async disconnect(): Promise<void> {\n this.#config = null;\n this.#connected = false;\n }\n\n isConnected(): boolean {\n return this.#connected;\n }\n\n async generateIdentity(): Promise<ZKMIdentity> {\n await loadSemaphore();\n const identity = new IdentityClass();\n this.#identity = {\n privateKey: identity.identityNullifier.toString(16),\n commitment: identity.commitment.toString(16),\n };\n return this.#identity;\n }\n\n async createGroup(groupId: string): Promise<any> {\n if (!this.#identity) {\n throw new Error('No identity. Call generateIdentity() first.');\n }\n \n await loadSemaphore();\n const identity = new IdentityClass(BigInt('0x' + this.#identity.privateKey));\n const group = new GroupClass();\n group.addMember(identity.commitment);\n \n this.#group = {\n id: groupId,\n group,\n root: group.root.toString(16),\n createdAt: new Date().toISOString(),\n };\n \n return this.#group;\n }\n\n async addMember(identity: ZKMIdentity): Promise<any> {\n if (!this.#group) {\n throw new Error('No group. Call createGroup() first.');\n }\n \n await loadSemaphore();\n const semaphoreIdentity = new IdentityClass(BigInt('0x' + identity.privateKey));\n this.#group.group.addMember(semaphoreIdentity.commitment);\n \n this.#group = {\n ...this.#group,\n root: this.#group.group.root.toString(16),\n };\n \n return this.#group;\n }\n\n async generateProof(scope?: string): Promise<any> {\n if (!this.#identity || !this.#group) {\n throw new Error('No identity or group. Call generateIdentity() and createGroup() first.');\n }\n \n return generateMembershipProof(this.#identity, this.#group, scope);\n }\n\n async verifyProof(proof: any, root: string): Promise<boolean> {\n return verifyMembershipProof(proof, root);\n }\n\n getIdentity(): ZKMIdentity | null {\n return this.#identity;\n }\n\n getGroup(): any | null {\n return this.#group;\n }\n\n getConfig(): ZKMVerifierConfig | null {\n return this.#config;\n }\n}"],"mappings":";;AAYA,IAAI,gBAAqB;AACzB,IAAI,aAAkB;AACtB,IAAI,kBAAuB;AAC3B,IAAI,gBAAqB;AAEzB,eAAe,gBAA+B;AAC5C,KAAI,cAAe;AAEnB,KAAI;EACF,MAAM,YAAY,MAAM,OAAO;AAC/B,kBAAgB,UAAU;AAC1B,eAAa,UAAU;AACvB,oBAAkB,UAAU;AAC5B,kBAAgB,UAAU;UACnB,OAAO;AACd,QAAM,IAAI,MAAM,oGAAoG;;;AA0CxH,eAAsB,wBACpB,UACA,OACA,QAAgB,WACF;AACd,OAAM,eAAe;CAErB,MAAM,oBAAoB,IAAI,cAAc,OAAO,OAAO,SAAS,WAAW,CAAC;CAC/E,MAAM,QAAQ,MAAM,gBAAgB,mBAAmB,MAAM,OAAO,OAAO,MAAM,EAAE,MAAM,MAAM,KAAK;AAEpG,QAAO;EACL,SAAS,MAAM;EACf,MAAM,MAAM;EACZ,OAAO,KAAK,UAAU,MAAM;EAC5B,WAAW,MAAM,UAAU,SAAS,GAAG;EACvC;EACA,iBAAiB,MAAM,MAAM;EAC7B,2BAAU,IAAI,MAAM,EAAC,aAAa;EACnC;;AAGH,eAAsB,sBACpB,OACA,WACkB;AAClB,OAAM,eAAe;AAErB,KAAI;EACF,MAAM,WAAW,OAAO,MAAM,UAAU,WAAW,KAAK,MAAM,MAAM,MAAM,GAAG,MAAM;AAEnF,SADgB,MAAM,cAAc,UAAU,OAAO,OAAO,UAAU,CAAC;UAEhE,OAAO;AACd,UAAQ,MAAM,8BAA8B,MAAM;AAClD,SAAO;;;AAIX,IAAa,aAAb,MAAwB;CACtB,UAAoC;CACpC,aAAa;CACb,YAAgC;CAChC,SAAc;CAEd,MAAM,QAAQ,QAA0C;AACtD,QAAKA,S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G3C,cAAkC;AAChC,SAAO,MAAKD;;CAGd,WAAuB;AACrB,SAAO,MAAKC;;CAGd,YAAsC;AACpC,SAAO,MAAKH"}
@@ -0,0 +1,112 @@
1
+ //#region src/services/zkm.service.ts
2
+ let IdentityClass = null;
3
+ let GroupClass = null;
4
+ let generateProofFn = null;
5
+ let verifyProofFn = null;
6
+ async function loadSemaphore() {
7
+ if (IdentityClass) return;
8
+ try {
9
+ const semaphore = await import("@semaphore-protocol/proof");
10
+ IdentityClass = semaphore.Identity;
11
+ GroupClass = semaphore.Group;
12
+ generateProofFn = semaphore.generateProof;
13
+ verifyProofFn = semaphore.verifyProof;
14
+ } catch (error) {
15
+ throw new Error("Semaphore requires @semaphore-protocol/proof. Install with: npm install @semaphore-protocol/proof");
16
+ }
17
+ }
18
+ async function generateMembershipProof(identity, group, scope = "default") {
19
+ await loadSemaphore();
20
+ const semaphoreIdentity = new IdentityClass(BigInt("0x" + identity.privateKey));
21
+ const proof = await generateProofFn(semaphoreIdentity, group.group, BigInt(scope), group.group.root);
22
+ return {
23
+ groupId: group.id,
24
+ root: group.root,
25
+ proof: JSON.stringify(proof),
26
+ nullifier: proof.nullifier.toString(16),
27
+ scope,
28
+ merkleTreeDepth: group.group.depth,
29
+ issuedAt: (/* @__PURE__ */ new Date()).toISOString()
30
+ };
31
+ }
32
+ async function verifyMembershipProof(proof, knownRoot) {
33
+ await loadSemaphore();
34
+ try {
35
+ const proofObj = typeof proof.proof === "string" ? JSON.parse(proof.proof) : proof.proof;
36
+ return await verifyProofFn(proofObj, BigInt("0x" + knownRoot));
37
+ } catch (error) {
38
+ console.error("Proof verification failed:", error);
39
+ return false;
40
+ }
41
+ }
42
+ var ZKMService = class {
43
+ #config = null;
44
+ #connected = false;
45
+ #identity = null;
46
+ #group = null;
47
+ async connect(config) {
48
+ this.#config = config;
49
+ this.#connected = true;
50
+ }
51
+ async disconnect() {
52
+ this.#config = null;
53
+ this.#connected = false;
54
+ }
55
+ isConnected() {
56
+ return this.#connected;
57
+ }
58
+ async generateIdentity() {
59
+ await loadSemaphore();
60
+ const identity = new IdentityClass();
61
+ this.#identity = {
62
+ privateKey: identity.identityNullifier.toString(16),
63
+ commitment: identity.commitment.toString(16)
64
+ };
65
+ return this.#identity;
66
+ }
67
+ async createGroup(groupId) {
68
+ if (!this.#identity) throw new Error("No identity. Call generateIdentity() first.");
69
+ await loadSemaphore();
70
+ const identity = new IdentityClass(BigInt("0x" + this.#identity.privateKey));
71
+ const group = new GroupClass();
72
+ group.addMember(identity.commitment);
73
+ this.#group = {
74
+ id: groupId,
75
+ group,
76
+ root: group.root.toString(16),
77
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
78
+ };
79
+ return this.#group;
80
+ }
81
+ async addMember(identity) {
82
+ if (!this.#group) throw new Error("No group. Call createGroup() first.");
83
+ await loadSemaphore();
84
+ const semaphoreIdentity = new IdentityClass(BigInt("0x" + identity.privateKey));
85
+ this.#group.group.addMember(semaphoreIdentity.commitment);
86
+ this.#group = {
87
+ ...this.#group,
88
+ root: this.#group.group.root.toString(16)
89
+ };
90
+ return this.#group;
91
+ }
92
+ async generateProof(scope) {
93
+ if (!this.#identity || !this.#group) throw new Error("No identity or group. Call generateIdentity() and createGroup() first.");
94
+ return generateMembershipProof(this.#identity, this.#group, scope);
95
+ }
96
+ async verifyProof(proof, root) {
97
+ return verifyMembershipProof(proof, root);
98
+ }
99
+ getIdentity() {
100
+ return this.#identity;
101
+ }
102
+ getGroup() {
103
+ return this.#group;
104
+ }
105
+ getConfig() {
106
+ return this.#config;
107
+ }
108
+ };
109
+
110
+ //#endregion
111
+ export { ZKMService };
112
+ //# sourceMappingURL=zkm.service-B32BMC7s.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zkm.service-B32BMC7s.mjs","names":["#config","#connected","#identity","#group"],"sources":["../src/services/zkm.service.ts"],"sourcesContent":["/**\n * ZK Membership Service - Using Semaphore library for anonymous group membership\n * @packageDocumentation\n */\n\nimport type { ZKMVerifierConfig } from '../types/zkm.js';\n\nexport interface ZKMIdentity {\n privateKey: string;\n commitment: string;\n}\n\nlet IdentityClass: any = null;\nlet GroupClass: any = null;\nlet generateProofFn: any = null;\nlet verifyProofFn: any = null;\n\nasync function loadSemaphore(): Promise<void> {\n if (IdentityClass) return;\n\n try {\n const semaphore = await import('@semaphore-protocol/proof');\n IdentityClass = semaphore.Identity;\n GroupClass = semaphore.Group;\n generateProofFn = semaphore.generateProof;\n verifyProofFn = semaphore.verifyProof;\n } catch (error) {\n throw new Error('Semaphore requires @semaphore-protocol/proof. Install with: npm install @semaphore-protocol/proof');\n }\n}\n\nexport function isZKMAvailable(): boolean {\n return true;\n}\n\nexport async function generateIdentity(): Promise<ZKMIdentity> {\n await loadSemaphore();\n const identity = new IdentityClass();\n return {\n privateKey: identity.identityNullifier.toString(16),\n commitment: identity.commitment.toString(16),\n };\n}\n\nexport async function createGroup(groupId: string, adminIdentity: ZKMIdentity): Promise<any> {\n await loadSemaphore();\n const identity = new IdentityClass(BigInt('0x' + adminIdentity.privateKey));\n const group = new GroupClass();\n group.addMember(identity.commitment);\n \n return {\n id: groupId,\n group,\n root: group.root.toString(16),\n createdAt: new Date().toISOString(),\n };\n}\n\nexport async function addMember(group: any, newIdentity: ZKMIdentity): Promise<any> {\n await loadSemaphore();\n const identity = new IdentityClass(BigInt('0x' + newIdentity.privateKey));\n group.group.addMember(identity.commitment);\n \n return {\n ...group,\n root: group.group.root.toString(16),\n };\n}\n\nexport async function generateMembershipProof(\n identity: ZKMIdentity,\n group: any,\n scope: string = 'default'\n): Promise<any> {\n await loadSemaphore();\n \n const semaphoreIdentity = new IdentityClass(BigInt('0x' + identity.privateKey));\n const proof = await generateProofFn(semaphoreIdentity, group.group, BigInt(scope), group.group.root);\n \n return {\n groupId: group.id,\n root: group.root,\n proof: JSON.stringify(proof),\n nullifier: proof.nullifier.toString(16),\n scope,\n merkleTreeDepth: group.group.depth,\n issuedAt: new Date().toISOString(),\n };\n}\n\nexport async function verifyMembershipProof(\n proof: any,\n knownRoot: string\n): Promise<boolean> {\n await loadSemaphore();\n \n try {\n const proofObj = typeof proof.proof === 'string' ? JSON.parse(proof.proof) : proof.proof;\n const isValid = await verifyProofFn(proofObj, BigInt('0x' + knownRoot));\n return isValid;\n } catch (error) {\n console.error('Proof verification failed:', error);\n return false;\n }\n}\n\nexport class ZKMService {\n #config: ZKMVerifierConfig | null = null;\n #connected = false;\n #identity: ZKMIdentity | null = null;\n #group: any = null;\n\n async connect(config: ZKMVerifierConfig): Promise<void> {\n this.#config = config;\n this.#connected = true;\n }\n\n async disconnect(): Promise<void> {\n this.#config = null;\n this.#connected = false;\n }\n\n isConnected(): boolean {\n return this.#connected;\n }\n\n async generateIdentity(): Promise<ZKMIdentity> {\n await loadSemaphore();\n const identity = new IdentityClass();\n this.#identity = {\n privateKey: identity.identityNullifier.toString(16),\n commitment: identity.commitment.toString(16),\n };\n return this.#identity;\n }\n\n async createGroup(groupId: string): Promise<any> {\n if (!this.#identity) {\n throw new Error('No identity. Call generateIdentity() first.');\n }\n \n await loadSemaphore();\n const identity = new IdentityClass(BigInt('0x' + this.#identity.privateKey));\n const group = new GroupClass();\n group.addMember(identity.commitment);\n \n this.#group = {\n id: groupId,\n group,\n root: group.root.toString(16),\n createdAt: new Date().toISOString(),\n };\n \n return this.#group;\n }\n\n async addMember(identity: ZKMIdentity): Promise<any> {\n if (!this.#group) {\n throw new Error('No group. Call createGroup() first.');\n }\n \n await loadSemaphore();\n const semaphoreIdentity = new IdentityClass(BigInt('0x' + identity.privateKey));\n this.#group.group.addMember(semaphoreIdentity.commitment);\n \n this.#group = {\n ...this.#group,\n root: this.#group.group.root.toString(16),\n };\n \n return this.#group;\n }\n\n async generateProof(scope?: string): Promise<any> {\n if (!this.#identity || !this.#group) {\n throw new Error('No identity or group. Call generateIdentity() and createGroup() first.');\n }\n \n return generateMembershipProof(this.#identity, this.#group, scope);\n }\n\n async verifyProof(proof: any, root: string): Promise<boolean> {\n return verifyMembershipProof(proof, root);\n }\n\n getIdentity(): ZKMIdentity | null {\n return this.#identity;\n }\n\n getGroup(): any | null {\n return this.#group;\n }\n\n getConfig(): ZKMVerifierConfig | null {\n return this.#config;\n }\n}"],"mappings":";AAYA,IAAI,gBAAqB;AACzB,IAAI,aAAkB;AACtB,IAAI,kBAAuB;AAC3B,IAAI,gBAAqB;AAEzB,eAAe,gBAA+B;AAC5C,KAAI,cAAe;AAEnB,KAAI;EACF,MAAM,YAAY,MAAM,OAAO;AAC/B,kBAAgB,UAAU;AAC1B,eAAa,UAAU;AACvB,oBAAkB,UAAU;AAC5B,kBAAgB,UAAU;UACnB,OAAO;AACd,QAAM,IAAI,MAAM,oGAAoG;;;AA0CxH,eAAsB,wBACpB,UACA,OACA,QAAgB,WACF;AACd,OAAM,eAAe;CAErB,MAAM,oBAAoB,IAAI,cAAc,OAAO,OAAO,SAAS,WAAW,CAAC;CAC/E,MAAM,QAAQ,MAAM,gBAAgB,mBAAmB,MAAM,OAAO,OAAO,MAAM,EAAE,MAAM,MAAM,KAAK;AAEpG,QAAO;EACL,SAAS,MAAM;EACf,MAAM,MAAM;EACZ,OAAO,KAAK,UAAU,MAAM;EAC5B,WAAW,MAAM,UAAU,SAAS,GAAG;EACvC;EACA,iBAAiB,MAAM,MAAM;EAC7B,2BAAU,IAAI,MAAM,EAAC,aAAa;EACnC;;AAGH,eAAsB,sBACpB,OACA,WACkB;AAClB,OAAM,eAAe;AAErB,KAAI;EACF,MAAM,WAAW,OAAO,MAAM,UAAU,WAAW,KAAK,MAAM,MAAM,MAAM,GAAG,MAAM;AAEnF,SADgB,MAAM,cAAc,UAAU,OAAO,OAAO,UAAU,CAAC;UAEhE,OAAO;AACd,UAAQ,MAAM,8BAA8B,MAAM;AAClD,SAAO;;;AAIX,IAAa,aAAb,MAAwB;CACtB,UAAoC;CACpC,aAAa;CACb,YAAgC;CAChC,SAAc;CAEd,MAAM,QAAQ,QAA0C;AACtD,QAAKA,SAAU;AACf,QAAKC,YAAa;;CAG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KD;;CAGd,WAAuB;AACrB,SAAO,MAAKC;;CAGd,YAAsC;AACpC,SAAO,MAAKH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ns-auth-sdk",
3
- "version": "1.14.2",
3
+ "version": "1.14.3",
4
4
  "description": "Decentralized SSO library - Authentication, membership, and profile management",
5
5
  "main": "./dist/browser-index.cjs",
6
6
  "module": "./dist/browser-index.mjs",