@powerhousedao/renown-package 0.0.7 → 0.0.32

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.
Files changed (191) hide show
  1. package/dist/document-models/index.d.ts +1 -0
  2. package/dist/document-models/index.d.ts.map +1 -0
  3. package/dist/document-models/index.js +1 -0
  4. package/dist/document-models/renown-credential/gen/actions.d.ts +1 -0
  5. package/dist/document-models/renown-credential/gen/actions.d.ts.map +1 -0
  6. package/dist/document-models/renown-credential/gen/creators.d.ts +1 -0
  7. package/dist/document-models/renown-credential/gen/creators.d.ts.map +1 -0
  8. package/dist/document-models/renown-credential/gen/document-model.d.ts +3 -2
  9. package/dist/document-models/renown-credential/gen/document-model.d.ts.map +1 -0
  10. package/dist/document-models/renown-credential/gen/document-model.js +3 -73
  11. package/dist/document-models/renown-credential/gen/index.d.ts +1 -2
  12. package/dist/document-models/renown-credential/gen/index.d.ts.map +1 -0
  13. package/dist/document-models/renown-credential/gen/index.js +0 -1
  14. package/dist/document-models/renown-credential/gen/manager/actions.d.ts +3 -14
  15. package/dist/document-models/renown-credential/gen/manager/actions.d.ts.map +1 -0
  16. package/dist/document-models/renown-credential/gen/manager/actions.js +1 -1
  17. package/dist/document-models/renown-credential/gen/manager/creators.d.ts +3 -5
  18. package/dist/document-models/renown-credential/gen/manager/creators.d.ts.map +1 -0
  19. package/dist/document-models/renown-credential/gen/manager/creators.js +3 -5
  20. package/dist/document-models/renown-credential/gen/manager/error.d.ts +9 -23
  21. package/dist/document-models/renown-credential/gen/manager/error.d.ts.map +1 -0
  22. package/dist/document-models/renown-credential/gen/manager/error.js +19 -38
  23. package/dist/document-models/renown-credential/gen/manager/operations.d.ts +2 -4
  24. package/dist/document-models/renown-credential/gen/manager/operations.d.ts.map +1 -0
  25. package/dist/document-models/renown-credential/gen/manager/operations.js +3 -1
  26. package/dist/document-models/renown-credential/gen/ph-factories.d.ts +7 -10
  27. package/dist/document-models/renown-credential/gen/ph-factories.d.ts.map +1 -0
  28. package/dist/document-models/renown-credential/gen/ph-factories.js +23 -15
  29. package/dist/document-models/renown-credential/gen/reducer.d.ts +3 -2
  30. package/dist/document-models/renown-credential/gen/reducer.d.ts.map +1 -0
  31. package/dist/document-models/renown-credential/gen/reducer.js +1 -16
  32. package/dist/document-models/renown-credential/gen/schema/index.d.ts +1 -0
  33. package/dist/document-models/renown-credential/gen/schema/index.d.ts.map +1 -0
  34. package/dist/document-models/renown-credential/gen/schema/types.d.ts +83 -117
  35. package/dist/document-models/renown-credential/gen/schema/types.d.ts.map +1 -0
  36. package/dist/document-models/renown-credential/gen/schema/zod.d.ts +15 -4
  37. package/dist/document-models/renown-credential/gen/schema/zod.d.ts.map +1 -0
  38. package/dist/document-models/renown-credential/gen/schema/zod.js +129 -35
  39. package/dist/document-models/renown-credential/gen/types.d.ts +10 -6
  40. package/dist/document-models/renown-credential/gen/types.d.ts.map +1 -0
  41. package/dist/document-models/renown-credential/gen/types.js +1 -0
  42. package/dist/document-models/renown-credential/gen/utils.d.ts +10 -19
  43. package/dist/document-models/renown-credential/gen/utils.d.ts.map +1 -0
  44. package/dist/document-models/renown-credential/gen/utils.js +48 -47
  45. package/dist/document-models/renown-credential/index.d.ts +13 -9
  46. package/dist/document-models/renown-credential/index.d.ts.map +1 -0
  47. package/dist/document-models/renown-credential/index.js +4 -3
  48. package/dist/document-models/renown-credential/src/reducers/manager.d.ts +1 -0
  49. package/dist/document-models/renown-credential/src/reducers/manager.d.ts.map +1 -0
  50. package/dist/document-models/renown-credential/src/reducers/manager.js +46 -121
  51. package/dist/document-models/renown-credential/src/tests/document-model.test.d.ts +1 -0
  52. package/dist/document-models/renown-credential/src/tests/document-model.test.d.ts.map +1 -0
  53. package/dist/document-models/renown-credential/src/tests/document-model.test.js +1 -1
  54. package/dist/document-models/renown-credential/src/tests/manager.test.d.ts +1 -0
  55. package/dist/document-models/renown-credential/src/tests/manager.test.d.ts.map +1 -0
  56. package/dist/document-models/renown-credential/src/utils.d.ts +1 -0
  57. package/dist/document-models/renown-credential/src/utils.d.ts.map +1 -0
  58. package/dist/document-models/renown-user/gen/actions.d.ts +1 -0
  59. package/dist/document-models/renown-user/gen/actions.d.ts.map +1 -0
  60. package/dist/document-models/renown-user/gen/creators.d.ts +1 -0
  61. package/dist/document-models/renown-user/gen/creators.d.ts.map +1 -0
  62. package/dist/document-models/renown-user/gen/document-model.d.ts +3 -2
  63. package/dist/document-models/renown-user/gen/document-model.d.ts.map +1 -0
  64. package/dist/document-models/renown-user/gen/index.d.ts +1 -2
  65. package/dist/document-models/renown-user/gen/index.d.ts.map +1 -0
  66. package/dist/document-models/renown-user/gen/index.js +0 -1
  67. package/dist/document-models/renown-user/gen/ph-factories.d.ts +7 -10
  68. package/dist/document-models/renown-user/gen/ph-factories.d.ts.map +1 -0
  69. package/dist/document-models/renown-user/gen/ph-factories.js +1 -4
  70. package/dist/document-models/renown-user/gen/profile/actions.d.ts +1 -0
  71. package/dist/document-models/renown-user/gen/profile/actions.d.ts.map +1 -0
  72. package/dist/document-models/renown-user/gen/profile/actions.js +1 -1
  73. package/dist/document-models/renown-user/gen/profile/creators.d.ts +1 -0
  74. package/dist/document-models/renown-user/gen/profile/creators.d.ts.map +1 -0
  75. package/dist/document-models/renown-user/gen/profile/creators.js +2 -1
  76. package/dist/document-models/renown-user/gen/profile/error.d.ts +1 -0
  77. package/dist/document-models/renown-user/gen/profile/error.d.ts.map +1 -0
  78. package/dist/document-models/renown-user/gen/profile/operations.d.ts +1 -0
  79. package/dist/document-models/renown-user/gen/profile/operations.d.ts.map +1 -0
  80. package/dist/document-models/renown-user/gen/profile/operations.js +3 -1
  81. package/dist/document-models/renown-user/gen/reducer.d.ts +3 -2
  82. package/dist/document-models/renown-user/gen/reducer.d.ts.map +1 -0
  83. package/dist/document-models/renown-user/gen/reducer.js +1 -4
  84. package/dist/document-models/renown-user/gen/schema/index.d.ts +1 -0
  85. package/dist/document-models/renown-user/gen/schema/index.d.ts.map +1 -0
  86. package/dist/document-models/renown-user/gen/schema/types.d.ts +1 -0
  87. package/dist/document-models/renown-user/gen/schema/types.d.ts.map +1 -0
  88. package/dist/document-models/renown-user/gen/schema/zod.d.ts +1 -0
  89. package/dist/document-models/renown-user/gen/schema/zod.d.ts.map +1 -0
  90. package/dist/document-models/renown-user/gen/types.d.ts +10 -6
  91. package/dist/document-models/renown-user/gen/types.d.ts.map +1 -0
  92. package/dist/document-models/renown-user/gen/types.js +1 -0
  93. package/dist/document-models/renown-user/gen/utils.d.ts +10 -19
  94. package/dist/document-models/renown-user/gen/utils.d.ts.map +1 -0
  95. package/dist/document-models/renown-user/gen/utils.js +26 -36
  96. package/dist/document-models/renown-user/index.d.ts +14 -7
  97. package/dist/document-models/renown-user/index.d.ts.map +1 -0
  98. package/dist/document-models/renown-user/index.js +4 -3
  99. package/dist/document-models/renown-user/src/reducers/profile.d.ts +1 -0
  100. package/dist/document-models/renown-user/src/reducers/profile.d.ts.map +1 -0
  101. package/dist/document-models/renown-user/src/tests/document-model.test.d.ts +1 -0
  102. package/dist/document-models/renown-user/src/tests/document-model.test.d.ts.map +1 -0
  103. package/dist/document-models/renown-user/src/tests/document-model.test.js +1 -1
  104. package/dist/document-models/renown-user/src/tests/profile.test.d.ts +1 -0
  105. package/dist/document-models/renown-user/src/tests/profile.test.d.ts.map +1 -0
  106. package/dist/document-models/renown-user/src/utils.d.ts +1 -0
  107. package/dist/document-models/renown-user/src/utils.d.ts.map +1 -0
  108. package/dist/editors/hooks/useRenownCredentialDocument.d.ts +1 -0
  109. package/dist/editors/hooks/useRenownCredentialDocument.d.ts.map +1 -0
  110. package/dist/editors/hooks/useRenownUserDocument.d.ts +1 -0
  111. package/dist/editors/hooks/useRenownUserDocument.d.ts.map +1 -0
  112. package/dist/editors/index.d.ts +1 -0
  113. package/dist/editors/index.d.ts.map +1 -0
  114. package/dist/editors/index.js +1 -0
  115. package/dist/editors/renown-credential-editor/editor.d.ts +1 -0
  116. package/dist/editors/renown-credential-editor/editor.d.ts.map +1 -0
  117. package/dist/editors/renown-credential-editor/editor.js +7 -71
  118. package/dist/editors/renown-credential-editor/index.d.ts +1 -0
  119. package/dist/editors/renown-credential-editor/index.d.ts.map +1 -0
  120. package/dist/editors/renown-credential-editor/index.js +1 -3
  121. package/dist/editors/renown-user-editor/editor.d.ts +1 -0
  122. package/dist/editors/renown-user-editor/editor.d.ts.map +1 -0
  123. package/dist/editors/renown-user-editor/editor.js +1 -1
  124. package/dist/editors/renown-user-editor/index.d.ts +1 -0
  125. package/dist/editors/renown-user-editor/index.d.ts.map +1 -0
  126. package/dist/editors/renown-user-editor/index.js +1 -3
  127. package/dist/index.d.ts +2 -1
  128. package/dist/index.d.ts.map +1 -0
  129. package/dist/processors/factory.d.ts +4 -2
  130. package/dist/processors/factory.d.ts.map +1 -0
  131. package/dist/processors/factory.js +4 -0
  132. package/dist/processors/index.d.ts +2 -0
  133. package/dist/processors/index.d.ts.map +1 -0
  134. package/dist/processors/index.js +2 -0
  135. package/dist/processors/renown-credential/factory.d.ts +8 -0
  136. package/dist/processors/renown-credential/factory.d.ts.map +1 -0
  137. package/dist/processors/renown-credential/factory.js +25 -0
  138. package/dist/processors/renown-credential/index.d.ts +8 -2
  139. package/dist/processors/renown-credential/index.d.ts.map +1 -0
  140. package/dist/processors/renown-credential/index.js +77 -71
  141. package/dist/processors/renown-credential/migrations.d.ts +2 -1
  142. package/dist/processors/renown-credential/migrations.d.ts.map +1 -0
  143. package/dist/processors/renown-credential/migrations.js +53 -22
  144. package/dist/processors/renown-credential/schema.d.ts +19 -13
  145. package/dist/processors/renown-credential/schema.d.ts.map +1 -0
  146. package/dist/processors/renown-user/factory.d.ts +2 -1
  147. package/dist/processors/renown-user/factory.d.ts.map +1 -0
  148. package/dist/processors/renown-user/factory.js +4 -1
  149. package/dist/processors/renown-user/index.d.ts +3 -2
  150. package/dist/processors/renown-user/index.d.ts.map +1 -0
  151. package/dist/processors/renown-user/index.js +3 -1
  152. package/dist/processors/renown-user/migrations.d.ts +2 -1
  153. package/dist/processors/renown-user/migrations.d.ts.map +1 -0
  154. package/dist/processors/renown-user/migrations.js +1 -0
  155. package/dist/processors/renown-user/schema.d.ts +1 -0
  156. package/dist/processors/renown-user/schema.d.ts.map +1 -0
  157. package/dist/style.css +132 -17106
  158. package/dist/subgraphs/index.d.ts +1 -0
  159. package/dist/subgraphs/index.d.ts.map +1 -0
  160. package/dist/subgraphs/index.js +1 -0
  161. package/dist/subgraphs/renown-credential/index.d.ts +3 -2
  162. package/dist/subgraphs/renown-credential/index.d.ts.map +1 -0
  163. package/dist/subgraphs/renown-credential/index.js +2 -2
  164. package/dist/subgraphs/renown-credential/resolvers.d.ts +3 -2
  165. package/dist/subgraphs/renown-credential/resolvers.d.ts.map +1 -0
  166. package/dist/subgraphs/renown-credential/resolvers.js +0 -36
  167. package/dist/subgraphs/renown-credential/schema.d.ts +1 -0
  168. package/dist/subgraphs/renown-credential/schema.d.ts.map +1 -0
  169. package/dist/subgraphs/renown-credential/schema.js +97 -50
  170. package/dist/subgraphs/renown-read-model/index.d.ts +3 -2
  171. package/dist/subgraphs/renown-read-model/index.d.ts.map +1 -0
  172. package/dist/subgraphs/renown-read-model/index.js +2 -2
  173. package/dist/subgraphs/renown-read-model/resolvers.d.ts +3 -2
  174. package/dist/subgraphs/renown-read-model/resolvers.d.ts.map +1 -0
  175. package/dist/subgraphs/renown-read-model/resolvers.js +35 -36
  176. package/dist/subgraphs/renown-read-model/schema.d.ts +1 -0
  177. package/dist/subgraphs/renown-read-model/schema.d.ts.map +1 -0
  178. package/dist/subgraphs/renown-read-model/schema.js +20 -19
  179. package/dist/subgraphs/renown-user/index.d.ts +3 -2
  180. package/dist/subgraphs/renown-user/index.d.ts.map +1 -0
  181. package/dist/subgraphs/renown-user/index.js +2 -2
  182. package/dist/subgraphs/renown-user/resolvers.d.ts +3 -2
  183. package/dist/subgraphs/renown-user/resolvers.d.ts.map +1 -0
  184. package/dist/subgraphs/renown-user/schema.d.ts +1 -0
  185. package/dist/subgraphs/renown-user/schema.d.ts.map +1 -0
  186. package/dist/vite.config.d.ts +3 -0
  187. package/dist/vite.config.d.ts.map +1 -0
  188. package/dist/vite.config.js +13 -0
  189. package/dist/vitest.config.d.ts +1 -0
  190. package/dist/vitest.config.d.ts.map +1 -0
  191. package/package.json +52 -39
@@ -1,3 +1,4 @@
1
1
  export {};
2
2
  export { module as RenownUser } from "./renown-user/index.js";
3
3
  export { module as RenownCredential } from "./renown-credential/index.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../document-models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AACV,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1,2 +1,3 @@
1
+ export {};
1
2
  export { module as RenownUser } from "./renown-user/index.js";
2
3
  export { module as RenownCredential } from "./renown-credential/index.js";
@@ -1,3 +1,4 @@
1
1
  import type { RenownCredentialManagerAction } from "./manager/actions.js";
2
2
  export * from "./manager/actions.js";
3
3
  export type RenownCredentialAction = RenownCredentialManagerAction;
4
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../document-models/renown-credential/gen/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAE1E,cAAc,sBAAsB,CAAC;AAErC,MAAM,MAAM,sBAAsB,GAAG,6BAA6B,CAAC"}
@@ -1 +1,2 @@
1
1
  export * from "./manager/creators.js";
2
+ //# sourceMappingURL=creators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../document-models/renown-credential/gen/creators.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -1,2 +1,3 @@
1
- import type { DocumentModelState } from "document-model";
2
- export declare const documentModel: DocumentModelState;
1
+ import type { DocumentModelGlobalState } from "document-model";
2
+ export declare const documentModel: DocumentModelGlobalState;
3
+ //# sourceMappingURL=document-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-model.d.ts","sourceRoot":"","sources":["../../../../document-models/renown-credential/gen/document-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,eAAO,MAAM,aAAa,EAAE,wBAgH3B,CAAC"}
@@ -26,13 +26,6 @@ export const documentModel = {
26
26
  name: "MissingContextError",
27
27
  template: "",
28
28
  },
29
- {
30
- code: "",
31
- description: "",
32
- id: "invalid-jwt-payload-error",
33
- name: "",
34
- template: "",
35
- },
36
29
  {
37
30
  code: "INVALID_JWT_PAYLOAD",
38
31
  description: "JWT payload does not contain valid W3C Verifiable Credential fields",
@@ -40,13 +33,6 @@ export const documentModel = {
40
33
  name: "InvalidJwtPayloadError",
41
34
  template: "",
42
35
  },
43
- {
44
- code: "",
45
- description: "",
46
- id: "jwt-verification-error",
47
- name: "",
48
- template: "",
49
- },
50
36
  {
51
37
  code: "JWT_VERIFICATION_FAILED",
52
38
  description: "Failed to verify the JWT signature or the JWT is malformed",
@@ -72,7 +58,7 @@ export const documentModel = {
72
58
  examples: [],
73
59
  id: "366dfd44-377f-42d7-949d-a8d82b6a909d",
74
60
  name: "INIT",
75
- reducer: '// Validate context\nconst context = action.input.context && action.input.context.length > 0 \n ? action.input.context \n : ["https://www.w3.org/2018/credentials/v1"];\n\nif (!context.includes("https://www.w3.org/2018/credentials/v1")) {\n throw new MissingContextError("Context must include https://www.w3.org/2018/credentials/v1");\n}\n\n// Validate type\nconst type = action.input.type && action.input.type.length > 0\n ? action.input.type\n : ["VerifiableCredential"];\n\nif (!type.includes("VerifiableCredential")) {\n throw new MissingTypeError("Type must include VerifiableCredential");\n}\n\n// Validate credentialSubject is valid JSON\ntry {\n JSON.parse(action.input.credentialSubject);\n} catch (e) {\n throw new InvalidClaimsError("Credential subject must be valid JSON");\n}\n\nstate.context = context;\nstate.id = action.input.id || null;\nstate.type = type;\nstate.issuer = action.input.issuer;\nstate.issuanceDate = action.input.issuanceDate;\nstate.credentialSubject = action.input.credentialSubject;\nstate.expirationDate = action.input.expirationDate || null;\nstate.credentialStatus = null;\nstate.jwt = null;\nstate.revoked = false;\nstate.revokedAt = null;\nstate.revocationReason = null;',
61
+ reducer: "// Store the EIP-712 signed verifiable credential fields\nstate.context = action.input.context;\nstate.id = action.input.id;\nstate.type = action.input.type;\n\n// Store issuer\nstate.issuer = {\n id: action.input.issuer.id,\n ethereumAddress: action.input.issuer.ethereumAddress,\n};\n\n// Store dates\nstate.issuanceDate = action.input.issuanceDate;\nstate.expirationDate = action.input.expirationDate || null;\n\n// Store credential subject\nstate.credentialSubject = {\n id: action.input.credentialSubject.id || null,\n app: action.input.credentialSubject.app,\n};\n\n// Store credential status (optional)\nif (action.input.credentialStatus) {\n state.credentialStatus = {\n id: action.input.credentialStatus.id,\n type: action.input.credentialStatus.type,\n };\n} else {\n state.credentialStatus = null;\n}\n\n// Store credential schema\nstate.credentialSchema = {\n id: action.input.credentialSchema.id,\n type: action.input.credentialSchema.type,\n};\n\n// Store proof (EIP-712 signature)\nstate.proof = {\n verificationMethod: action.input.proof.verificationMethod,\n ethereumAddress: action.input.proof.ethereumAddress,\n created: action.input.proof.created,\n proofPurpose: action.input.proof.proofPurpose,\n type: action.input.proof.type,\n proofValue: action.input.proof.proofValue,\n eip712: {\n domain: {\n version: action.input.proof.eip712.domain.version,\n chainId: action.input.proof.eip712.domain.chainId,\n },\n primaryType: action.input.proof.eip712.primaryType,\n },\n};\n\n// Initialize revocation tracking\nstate.revoked = false;\nstate.revokedAt = null;\nstate.revocationReason = null;",
76
62
  schema: "input InitInput {\n jwt: String!\n}",
77
63
  scope: "global",
78
64
  template: "",
@@ -96,70 +82,14 @@ export const documentModel = {
96
82
  scope: "global",
97
83
  template: "",
98
84
  },
99
- {
100
- description: "Updates the credential subject claims",
101
- errors: [
102
- {
103
- code: "INVALID_CLAIMS",
104
- description: "The subject claims must be valid JSON",
105
- id: "invalid-claims-error-2",
106
- name: "InvalidClaimsError",
107
- template: "",
108
- },
109
- {
110
- code: "CREDENTIAL_REVOKED",
111
- description: "Cannot update a revoked credential",
112
- id: "credential-revoked-error",
113
- name: "CredentialRevokedError",
114
- template: "",
115
- },
116
- ],
117
- examples: [],
118
- id: "update-credential-subject-op",
119
- name: "UPDATE_CREDENTIAL_SUBJECT",
120
- reducer: 'if (state.revoked) {\n throw new CredentialRevokedError("Cannot update a revoked credential");\n}\n\n// Validate credentialSubject is valid JSON\ntry {\n JSON.parse(action.input.credentialSubject);\n} catch (e) {\n throw new InvalidClaimsError("Credential subject must be valid JSON");\n}\n\nstate.credentialSubject = action.input.credentialSubject;\n\n// Clear JWT as credential content has changed\nstate.jwt = null;',
121
- schema: "input UpdateCredentialSubjectInput {\n credentialSubject: String!\n}",
122
- scope: "global",
123
- template: "Updates the credential subject claims",
124
- },
125
- {
126
- description: "Sets the signed JWT representation of the credential",
127
- errors: [],
128
- examples: [],
129
- id: "set-jwt-op",
130
- name: "SET_JWT",
131
- reducer: "state.jwt = action.input.jwt;",
132
- schema: "input SetJwtInput {\n jwt: String!\n}",
133
- scope: "global",
134
- template: "Sets the signed JWT representation of the credential",
135
- },
136
- {
137
- description: "Sets the credential status for revocation support (StatusList2021)",
138
- errors: [
139
- {
140
- code: "INVALID_STATUS_PURPOSE",
141
- description: "Status purpose must be either 'revocation' or 'suspension'",
142
- id: "invalid-status-purpose-error",
143
- name: "InvalidStatusPurposeError",
144
- template: "",
145
- },
146
- ],
147
- examples: [],
148
- id: "set-credential-status-op",
149
- name: "SET_CREDENTIAL_STATUS",
150
- reducer: '// Validate statusPurpose\nif (action.input.statusPurpose !== "revocation" && action.input.statusPurpose !== "suspension") {\n throw new InvalidStatusPurposeError("Status purpose must be \'revocation\' or \'suspension\'");\n}\n\nstate.credentialStatus = {\n id: action.input.statusId,\n type: action.input.statusType,\n statusPurpose: action.input.statusPurpose,\n statusListIndex: action.input.statusListIndex,\n statusListCredential: action.input.statusListCredential\n};',
151
- schema: "input SetCredentialStatusInput {\n statusId: String!\n statusType: String!\n statusPurpose: String!\n statusListIndex: String!\n statusListCredential: String!\n}",
152
- scope: "global",
153
- template: "Sets the credential status for revocation support (StatusList2021)",
154
- },
155
85
  ],
156
86
  },
157
87
  ],
158
88
  state: {
159
89
  global: {
160
90
  examples: [],
161
- initialValue: '"{\\n \\"vcPayload\\": null,\\n \\"context\\": null,\\n \\"id\\": null,\\n \\"type\\": null,\\n \\"issuer\\": null,\\n \\"issuanceDate\\": null,\\n \\"credentialSubject\\": null,\\n \\"expirationDate\\": null,\\n \\"credentialStatus\\": null,\\n \\"jwt\\": null,\\n \\"jwtVerified\\": false,\\n \\"jwtVerificationError\\": null,\\n \\"jwtPayload\\": null,\\n \\"revoked\\": false,\\n \\"revokedAt\\": null,\\n \\"revocationReason\\": null\\n}"',
162
- schema: 'type CredentialStatus {\n id: String!\n type: String!\n statusPurpose: String!\n statusListIndex: String!\n statusListCredential: String!\n}\n\ntype RenownCredentialState {\n "Complete VC Payload - stores the full verifiable credential object for maximum flexibility"\n vcPayload: String\n \n "W3C VC Common Fields - extracted for convenience, may be null for non-standard VCs"\n context: [String!]\n id: String\n type: [String!]\n issuer: String\n issuanceDate: DateTime\n credentialSubject: String\n \n "W3C VC Optional Fields"\n expirationDate: DateTime\n credentialStatus: CredentialStatus\n \n "JWT Representation"\n jwt: String\n jwtVerified: Boolean\n jwtVerificationError: String\n jwtPayload: String\n \n "Revocation tracking"\n revoked: Boolean\n revokedAt: DateTime\n revocationReason: String\n}',
91
+ initialValue: '"{\\"context\\": [], \\"id\\": \\"\\", \\"type\\": [], \\"issuer\\": {\\"id\\": \\"\\", \\"ethereumAddress\\": \\"0x0000000000000000000000000000000000000000\\"}, \\"issuanceDate\\": \\"\\", \\"expirationDate\\": null, \\"credentialSubject\\": {\\"id\\": null, \\"app\\": \\"\\"}, \\"credentialStatus\\": null, \\"credentialSchema\\": {\\"id\\": \\"\\", \\"type\\": \\"\\"}, \\"proof\\": {\\"verificationMethod\\": \\"\\", \\"ethereumAddress\\": \\"0x0000000000000000000000000000000000000000\\", \\"created\\": \\"\\", \\"proofPurpose\\": \\"\\", \\"type\\": \\"\\", \\"proofValue\\": \\"\\", \\"eip712\\": {\\"domain\\": {\\"version\\": \\"\\", \\"chainId\\": 0}, \\"primaryType\\": \\"VerifiableCredential\\"}}, \\"revoked\\": false, \\"revokedAt\\": null, \\"revocationReason\\": null}"',
92
+ schema: 'type Issuer {\n id: String!\n ethereumAddress: EthereumAddress!\n}\n\ntype CredentialSubject {\n id: String\n app: String!\n}\n\ntype CredentialStatus {\n id: String!\n type: String!\n}\n\ntype CredentialSchema {\n id: String!\n type: String!\n}\n\ntype EIP712Domain {\n version: String!\n chainId: Int!\n}\n\ntype EIP712 {\n domain: EIP712Domain!\n primaryType: String!\n}\n\ntype Proof {\n verificationMethod: String!\n ethereumAddress: EthereumAddress!\n created: DateTime!\n proofPurpose: String!\n type: String!\n proofValue: String!\n eip712: EIP712!\n}\n\ntype RenownCredentialState {\n "W3C VC Fields - EIP-712 Signed Verifiable Credential"\n context: [String!]!\n id: String!\n type: [String!]!\n issuer: Issuer!\n issuanceDate: DateTime!\n expirationDate: DateTime\n credentialSubject: CredentialSubject!\n credentialStatus: CredentialStatus\n credentialSchema: CredentialSchema!\n proof: Proof!\n\n "Revocation tracking"\n revoked: Boolean!\n revokedAt: DateTime\n revocationReason: String\n}\n\n\n\n# manager\n\ninput IssuerInput {\n id: String!\n ethereumAddress: EthereumAddress!\n}\n\ninput CredentialSubjectInput {\n id: String\n app: String!\n}\n\ninput CredentialStatusInput {\n id: String!\n type: String!\n}\n\ninput CredentialSchemaInput {\n id: String!\n type: String!\n}\n\ninput EIP712DomainInput {\n version: String!\n chainId: Int!\n}\n\ninput EIP712Input {\n domain: EIP712DomainInput!\n primaryType: String!\n}\n\ninput ProofInput {\n verificationMethod: String!\n ethereumAddress: EthereumAddress!\n created: DateTime!\n proofPurpose: String!\n type: String!\n proofValue: String!\n eip712: EIP712Input!\n}\n\ninput InitInput {\n context: [String!]!\n id: String!\n type: [String!]!\n issuer: IssuerInput!\n issuanceDate: DateTime!\n expirationDate: DateTime\n credentialSubject: CredentialSubjectInput!\n credentialStatus: CredentialStatusInput\n credentialSchema: CredentialSchemaInput!\n proof: ProofInput!\n}\n\ninput RevokeInput {\n revokedAt: DateTime!\n reason: String\n}',
163
93
  },
164
94
  local: {
165
95
  examples: [],
@@ -1,7 +1,6 @@
1
1
  export * from "./actions.js";
2
2
  export * from "./document-model.js";
3
- export * from "./object.js";
4
3
  export * from "./types.js";
5
4
  export * as actions from "./creators.js";
6
- export type { RenownCredentialPHState } from "./ph-factories.js";
7
5
  export { createRenownCredentialDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../document-models/renown-credential/gen/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,8BAA8B,EAC9B,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC"}
@@ -1,6 +1,5 @@
1
1
  export * from "./actions.js";
2
2
  export * from "./document-model.js";
3
- export * from "./object.js";
4
3
  export * from "./types.js";
5
4
  export * as actions from "./creators.js";
6
5
  export { createRenownCredentialDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
@@ -1,5 +1,5 @@
1
1
  import { type Action } from "document-model";
2
- import type { InitInput, RevokeInput, UpdateCredentialSubjectInput, SetJwtInput, SetCredentialStatusInput } from "../types.js";
2
+ import type { InitInput, RevokeInput } from "../types.js";
3
3
  export type InitAction = Action & {
4
4
  type: "INIT";
5
5
  input: InitInput;
@@ -8,16 +8,5 @@ export type RevokeAction = Action & {
8
8
  type: "REVOKE";
9
9
  input: RevokeInput;
10
10
  };
11
- export type UpdateCredentialSubjectAction = Action & {
12
- type: "UPDATE_CREDENTIAL_SUBJECT";
13
- input: UpdateCredentialSubjectInput;
14
- };
15
- export type SetJwtAction = Action & {
16
- type: "SET_JWT";
17
- input: SetJwtInput;
18
- };
19
- export type SetCredentialStatusAction = Action & {
20
- type: "SET_CREDENTIAL_STATUS";
21
- input: SetCredentialStatusInput;
22
- };
23
- export type RenownCredentialManagerAction = InitAction | RevokeAction | UpdateCredentialSubjectAction | SetJwtAction | SetCredentialStatusAction;
11
+ export type RenownCredentialManagerAction = InitAction | RevokeAction;
12
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../document-models/renown-credential/gen/manager/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AACrE,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,CAAC;AAE3E,MAAM,MAAM,6BAA6B,GAAG,UAAU,GAAG,YAAY,CAAC"}
@@ -1 +1 @@
1
- export {};
1
+ import {} from "document-model";
@@ -1,7 +1,5 @@
1
- import { type InitInput, type RevokeInput, type UpdateCredentialSubjectInput, type SetJwtInput, type SetCredentialStatusInput } from "../types.js";
2
- import { type InitAction, type RevokeAction, type UpdateCredentialSubjectAction, type SetJwtAction, type SetCredentialStatusAction } from "./actions.js";
1
+ import { type InitInput, type RevokeInput } from "../types.js";
2
+ import { type InitAction, type RevokeAction } from "./actions.js";
3
3
  export declare const init: (input: InitInput) => InitAction;
4
4
  export declare const revoke: (input: RevokeInput) => RevokeAction;
5
- export declare const updateCredentialSubject: (input: UpdateCredentialSubjectInput) => UpdateCredentialSubjectAction;
6
- export declare const setJwt: (input: SetJwtInput) => SetJwtAction;
7
- export declare const setCredentialStatus: (input: SetCredentialStatusInput) => SetCredentialStatusAction;
5
+ //# sourceMappingURL=creators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/renown-credential/gen/manager/creators.ts"],"names":[],"mappings":"AACA,OAAO,EAAK,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAElE,eAAO,MAAM,IAAI,GAAI,OAAO,SAAS,eAOlC,CAAC;AAEJ,eAAO,MAAM,MAAM,GAAI,OAAO,WAAW,iBAOtC,CAAC"}
@@ -1,7 +1,5 @@
1
- import { createAction } from "document-model";
2
- import { z, } from "../types.js";
1
+ import { createAction } from "document-model/core";
2
+ import { z } from "../types.js";
3
+ import {} from "./actions.js";
3
4
  export const init = (input) => createAction("INIT", { ...input }, undefined, z.InitInputSchema, "global");
4
5
  export const revoke = (input) => createAction("REVOKE", { ...input }, undefined, z.RevokeInputSchema, "global");
5
- export const updateCredentialSubject = (input) => createAction("UPDATE_CREDENTIAL_SUBJECT", { ...input }, undefined, z.UpdateCredentialSubjectInputSchema, "global");
6
- export const setJwt = (input) => createAction("SET_JWT", { ...input }, undefined, z.SetJwtInputSchema, "global");
7
- export const setCredentialStatus = (input) => createAction("SET_CREDENTIAL_STATUS", { ...input }, undefined, z.SetCredentialStatusInputSchema, "global");
@@ -1,4 +1,4 @@
1
- export type ErrorCode = 'MissingContextError' | 'MissingTypeError' | 'InvalidClaimsError' | 'JwtVerificationError' | 'InvalidJwtPayloadError' | 'AlreadyRevokedError' | 'CredentialRevokedError' | 'InvalidStatusPurposeError';
1
+ export type ErrorCode = "MissingContextError" | "InvalidJwtPayloadError" | "JwtVerificationError" | "InvalidClaimsError" | "MissingTypeError" | "AlreadyRevokedError";
2
2
  export interface ReducerError {
3
3
  errorCode: ErrorCode;
4
4
  }
@@ -6,11 +6,7 @@ export declare class MissingContextError extends Error implements ReducerError {
6
6
  errorCode: ErrorCode;
7
7
  constructor(message?: string);
8
8
  }
9
- export declare class MissingTypeError extends Error implements ReducerError {
10
- errorCode: ErrorCode;
11
- constructor(message?: string);
12
- }
13
- export declare class InvalidClaimsError extends Error implements ReducerError {
9
+ export declare class InvalidJwtPayloadError extends Error implements ReducerError {
14
10
  errorCode: ErrorCode;
15
11
  constructor(message?: string);
16
12
  }
@@ -18,38 +14,28 @@ export declare class JwtVerificationError extends Error implements ReducerError
18
14
  errorCode: ErrorCode;
19
15
  constructor(message?: string);
20
16
  }
21
- export declare class InvalidJwtPayloadError extends Error implements ReducerError {
22
- errorCode: ErrorCode;
23
- constructor(message?: string);
24
- }
25
- export declare class AlreadyRevokedError extends Error implements ReducerError {
17
+ export declare class InvalidClaimsError extends Error implements ReducerError {
26
18
  errorCode: ErrorCode;
27
19
  constructor(message?: string);
28
20
  }
29
- export declare class CredentialRevokedError extends Error implements ReducerError {
21
+ export declare class MissingTypeError extends Error implements ReducerError {
30
22
  errorCode: ErrorCode;
31
23
  constructor(message?: string);
32
24
  }
33
- export declare class InvalidStatusPurposeError extends Error implements ReducerError {
25
+ export declare class AlreadyRevokedError extends Error implements ReducerError {
34
26
  errorCode: ErrorCode;
35
27
  constructor(message?: string);
36
28
  }
37
29
  export declare const errors: {
38
30
  Init: {
39
31
  MissingContextError: typeof MissingContextError;
40
- MissingTypeError: typeof MissingTypeError;
41
- InvalidClaimsError: typeof InvalidClaimsError;
42
- JwtVerificationError: typeof JwtVerificationError;
43
32
  InvalidJwtPayloadError: typeof InvalidJwtPayloadError;
33
+ JwtVerificationError: typeof JwtVerificationError;
34
+ InvalidClaimsError: typeof InvalidClaimsError;
35
+ MissingTypeError: typeof MissingTypeError;
44
36
  };
45
37
  Revoke: {
46
38
  AlreadyRevokedError: typeof AlreadyRevokedError;
47
39
  };
48
- UpdateCredentialSubject: {
49
- InvalidClaimsError: typeof InvalidClaimsError;
50
- CredentialRevokedError: typeof CredentialRevokedError;
51
- };
52
- SetCredentialStatus: {
53
- InvalidStatusPurposeError: typeof InvalidStatusPurposeError;
54
- };
55
40
  };
41
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../document-models/renown-credential/gen/manager/error.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,qBAAqB,GACrB,wBAAwB,GACxB,sBAAsB,GACtB,oBAAoB,GACpB,kBAAkB,GAClB,qBAAqB,CAAC;AAE1B,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,qBAAa,mBAAoB,SAAQ,KAAM,YAAW,YAAY;IACpE,SAAS,EAA4B,SAAS,CAAC;gBACnC,OAAO,SAAwB;CAG5C;AAED,qBAAa,sBAAuB,SAAQ,KAAM,YAAW,YAAY;IACvE,SAAS,EAA+B,SAAS,CAAC;gBACtC,OAAO,SAA2B;CAG/C;AAED,qBAAa,oBAAqB,SAAQ,KAAM,YAAW,YAAY;IACrE,SAAS,EAA6B,SAAS,CAAC;gBACpC,OAAO,SAAyB;CAG7C;AAED,qBAAa,kBAAmB,SAAQ,KAAM,YAAW,YAAY;IACnE,SAAS,EAA2B,SAAS,CAAC;gBAClC,OAAO,SAAuB;CAG3C;AAED,qBAAa,gBAAiB,SAAQ,KAAM,YAAW,YAAY;IACjE,SAAS,EAAyB,SAAS,CAAC;gBAChC,OAAO,SAAqB;CAGzC;AAED,qBAAa,mBAAoB,SAAQ,KAAM,YAAW,YAAY;IACpE,SAAS,EAA4B,SAAS,CAAC;gBACnC,OAAO,SAAwB;CAG5C;AAED,eAAO,MAAM,MAAM;;;;;;;;;;;CAWlB,CAAC"}
@@ -1,67 +1,48 @@
1
1
  export class MissingContextError extends Error {
2
- errorCode = 'MissingContextError';
3
- constructor(message = 'MissingContextError') {
2
+ errorCode = "MissingContextError";
3
+ constructor(message = "MissingContextError") {
4
4
  super(message);
5
5
  }
6
6
  }
7
- export class MissingTypeError extends Error {
8
- errorCode = 'MissingTypeError';
9
- constructor(message = 'MissingTypeError') {
10
- super(message);
11
- }
12
- }
13
- export class InvalidClaimsError extends Error {
14
- errorCode = 'InvalidClaimsError';
15
- constructor(message = 'InvalidClaimsError') {
7
+ export class InvalidJwtPayloadError extends Error {
8
+ errorCode = "InvalidJwtPayloadError";
9
+ constructor(message = "InvalidJwtPayloadError") {
16
10
  super(message);
17
11
  }
18
12
  }
19
13
  export class JwtVerificationError extends Error {
20
- errorCode = 'JwtVerificationError';
21
- constructor(message = 'JwtVerificationError') {
14
+ errorCode = "JwtVerificationError";
15
+ constructor(message = "JwtVerificationError") {
22
16
  super(message);
23
17
  }
24
18
  }
25
- export class InvalidJwtPayloadError extends Error {
26
- errorCode = 'InvalidJwtPayloadError';
27
- constructor(message = 'InvalidJwtPayloadError') {
28
- super(message);
29
- }
30
- }
31
- export class AlreadyRevokedError extends Error {
32
- errorCode = 'AlreadyRevokedError';
33
- constructor(message = 'AlreadyRevokedError') {
19
+ export class InvalidClaimsError extends Error {
20
+ errorCode = "InvalidClaimsError";
21
+ constructor(message = "InvalidClaimsError") {
34
22
  super(message);
35
23
  }
36
24
  }
37
- export class CredentialRevokedError extends Error {
38
- errorCode = 'CredentialRevokedError';
39
- constructor(message = 'CredentialRevokedError') {
25
+ export class MissingTypeError extends Error {
26
+ errorCode = "MissingTypeError";
27
+ constructor(message = "MissingTypeError") {
40
28
  super(message);
41
29
  }
42
30
  }
43
- export class InvalidStatusPurposeError extends Error {
44
- errorCode = 'InvalidStatusPurposeError';
45
- constructor(message = 'InvalidStatusPurposeError') {
31
+ export class AlreadyRevokedError extends Error {
32
+ errorCode = "AlreadyRevokedError";
33
+ constructor(message = "AlreadyRevokedError") {
46
34
  super(message);
47
35
  }
48
36
  }
49
37
  export const errors = {
50
38
  Init: {
51
39
  MissingContextError,
52
- MissingTypeError,
53
- InvalidClaimsError,
54
- JwtVerificationError,
55
40
  InvalidJwtPayloadError,
41
+ JwtVerificationError,
42
+ InvalidClaimsError,
43
+ MissingTypeError,
56
44
  },
57
45
  Revoke: {
58
46
  AlreadyRevokedError,
59
47
  },
60
- UpdateCredentialSubject: {
61
- InvalidClaimsError,
62
- CredentialRevokedError,
63
- },
64
- SetCredentialStatus: {
65
- InvalidStatusPurposeError,
66
- },
67
48
  };
@@ -1,10 +1,8 @@
1
1
  import { type SignalDispatch } from "document-model";
2
- import { type InitAction, type RevokeAction, type UpdateCredentialSubjectAction, type SetJwtAction, type SetCredentialStatusAction } from "./actions.js";
2
+ import { type InitAction, type RevokeAction } from "./actions.js";
3
3
  import { type RenownCredentialState } from "../types.js";
4
4
  export interface RenownCredentialManagerOperations {
5
5
  initOperation: (state: RenownCredentialState, action: InitAction, dispatch?: SignalDispatch) => void;
6
6
  revokeOperation: (state: RenownCredentialState, action: RevokeAction, dispatch?: SignalDispatch) => void;
7
- updateCredentialSubjectOperation: (state: RenownCredentialState, action: UpdateCredentialSubjectAction, dispatch?: SignalDispatch) => void;
8
- setJwtOperation: (state: RenownCredentialState, action: SetJwtAction, dispatch?: SignalDispatch) => void;
9
- setCredentialStatusOperation: (state: RenownCredentialState, action: SetCredentialStatusAction, dispatch?: SignalDispatch) => void;
10
7
  }
8
+ //# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../../document-models/renown-credential/gen/manager/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,WAAW,iCAAiC;IAChD,aAAa,EAAE,CACb,KAAK,EAAE,qBAAqB,EAC5B,MAAM,EAAE,UAAU,EAClB,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;IACV,eAAe,EAAE,CACf,KAAK,EAAE,qBAAqB,EAC5B,MAAM,EAAE,YAAY,EACpB,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;CACX"}
@@ -1 +1,3 @@
1
- export {};
1
+ import {} from "document-model";
2
+ import {} from "./actions.js";
3
+ import {} from "../types.js";
@@ -1,18 +1,14 @@
1
1
  /**
2
2
  * Factory methods for creating RenownCredentialDocument instances
3
3
  */
4
- import { type PHAuthState, type PHDocumentState, type PHBaseState } from "document-model";
5
- import type { RenownCredentialDocument, RenownCredentialLocalState, RenownCredentialState } from "./types.js";
6
- export type RenownCredentialPHState = PHBaseState & {
7
- global: RenownCredentialState;
8
- local: RenownCredentialLocalState;
9
- };
10
- export declare function defaultGlobalState(): RenownCredentialState;
4
+ import type { PHAuthState, PHDocumentState, PHBaseState } from "document-model";
5
+ import type { RenownCredentialDocument, RenownCredentialLocalState, RenownCredentialGlobalState, RenownCredentialPHState } from "./types.js";
6
+ export declare function defaultGlobalState(): RenownCredentialGlobalState;
11
7
  export declare function defaultLocalState(): RenownCredentialLocalState;
12
8
  export declare function defaultPHState(): RenownCredentialPHState;
13
- export declare function createGlobalState(state?: Partial<RenownCredentialState>): RenownCredentialState;
9
+ export declare function createGlobalState(state?: Partial<RenownCredentialGlobalState>): RenownCredentialGlobalState;
14
10
  export declare function createLocalState(state?: Partial<RenownCredentialLocalState>): RenownCredentialLocalState;
15
- export declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<RenownCredentialState>, localState?: Partial<RenownCredentialLocalState>): RenownCredentialPHState;
11
+ export declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<RenownCredentialGlobalState>, localState?: Partial<RenownCredentialLocalState>): RenownCredentialPHState;
16
12
  /**
17
13
  * Creates a RenownCredentialDocument with custom global and local state
18
14
  * This properly handles the PHBaseState requirements while allowing
@@ -21,6 +17,7 @@ export declare function createState(baseState?: Partial<PHBaseState>, globalStat
21
17
  export declare function createRenownCredentialDocument(state?: Partial<{
22
18
  auth?: Partial<PHAuthState>;
23
19
  document?: Partial<PHDocumentState>;
24
- global?: Partial<RenownCredentialState>;
20
+ global?: Partial<RenownCredentialGlobalState>;
25
21
  local?: Partial<RenownCredentialLocalState>;
26
22
  }>): RenownCredentialDocument;
23
+ //# sourceMappingURL=ph-factories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ph-factories.d.ts","sourceRoot":"","sources":["../../../../document-models/renown-credential/gen/ph-factories.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEhF,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,YAAY,CAAC;AAGpB,wBAAgB,kBAAkB,IAAI,2BAA2B,CA8BhE;AAED,wBAAgB,iBAAiB,IAAI,0BAA0B,CAE9D;AAED,wBAAgB,cAAc,IAAI,uBAAuB,CAMxD;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,GAC3C,2BAA2B,CAK7B;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,GAC1C,0BAA0B,CAK5B;AAED,wBAAgB,WAAW,CACzB,SAAS,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,EAChC,WAAW,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,EAClD,UAAU,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,GAC/C,uBAAuB,CAMzB;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,CAAC;CAC7C,CAAC,GACD,wBAAwB,CAY1B"}
@@ -1,23 +1,31 @@
1
- /**
2
- * Factory methods for creating RenownCredentialDocument instances
3
- */
4
- import { createBaseState, defaultBaseState, } from "document-model";
1
+ import { createBaseState, defaultBaseState } from "document-model/core";
5
2
  import { createDocument } from "./utils.js";
6
3
  export function defaultGlobalState() {
7
4
  return {
8
- vcPayload: null,
9
- context: null,
10
- id: null,
11
- type: null,
12
- issuer: null,
13
- issuanceDate: null,
14
- credentialSubject: null,
5
+ context: [],
6
+ id: "",
7
+ type: [],
8
+ issuer: {
9
+ id: "",
10
+ ethereumAddress: "0x0000000000000000000000000000000000000000",
11
+ },
12
+ issuanceDate: "",
15
13
  expirationDate: null,
14
+ credentialSubject: { id: null, app: "" },
16
15
  credentialStatus: null,
17
- jwt: null,
18
- jwtVerified: false,
19
- jwtVerificationError: null,
20
- jwtPayload: null,
16
+ credentialSchema: { id: "", type: "" },
17
+ proof: {
18
+ verificationMethod: "",
19
+ ethereumAddress: "0x0000000000000000000000000000000000000000",
20
+ created: "",
21
+ proofPurpose: "",
22
+ type: "",
23
+ proofValue: "",
24
+ eip712: {
25
+ domain: { version: "", chainId: 0 },
26
+ primaryType: "VerifiableCredential",
27
+ },
28
+ },
21
29
  revoked: false,
22
30
  revokedAt: null,
23
31
  revocationReason: null,
@@ -1,4 +1,5 @@
1
- import { type StateReducer } from "document-model";
2
- import { type RenownCredentialPHState } from "./ph-factories.js";
1
+ import type { StateReducer } from "document-model";
2
+ import type { RenownCredentialPHState } from "./types.js";
3
3
  export declare const stateReducer: StateReducer<RenownCredentialPHState>;
4
4
  export declare const reducer: import("document-model").Reducer<RenownCredentialPHState>;
5
+ //# sourceMappingURL=reducer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../document-models/renown-credential/gen/reducer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAK1D,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,uBAAuB,CA+B9D,CAAC;AAEF,eAAO,MAAM,OAAO,2DAAuD,CAAC"}
@@ -1,7 +1,4 @@
1
- // TODO: remove eslint-disable rules once refactor is done
2
- /* eslint-disable @typescript-eslint/no-unsafe-member-access */
3
- /* eslint-disable @typescript-eslint/no-unsafe-argument */
4
- import { isDocumentAction, createReducer, } from "document-model";
1
+ import { isDocumentAction, createReducer } from "document-model/core";
5
2
  import { z } from "./types.js";
6
3
  import { reducer as ManagerReducer } from "../src/reducers/manager.js";
7
4
  export const stateReducer = (state, action, dispatch) => {
@@ -17,18 +14,6 @@ export const stateReducer = (state, action, dispatch) => {
17
14
  z.RevokeInputSchema().parse(action.input);
18
15
  ManagerReducer.revokeOperation(state[action.scope], action, dispatch);
19
16
  break;
20
- case "UPDATE_CREDENTIAL_SUBJECT":
21
- z.UpdateCredentialSubjectInputSchema().parse(action.input);
22
- ManagerReducer.updateCredentialSubjectOperation(state[action.scope], action, dispatch);
23
- break;
24
- case "SET_JWT":
25
- z.SetJwtInputSchema().parse(action.input);
26
- ManagerReducer.setJwtOperation(state[action.scope], action, dispatch);
27
- break;
28
- case "SET_CREDENTIAL_STATUS":
29
- z.SetCredentialStatusInputSchema().parse(action.input);
30
- ManagerReducer.setCredentialStatusOperation(state[action.scope], action, dispatch);
31
- break;
32
17
  default:
33
18
  return state;
34
19
  }
@@ -1,2 +1,3 @@
1
1
  export * from "./types.js";
2
2
  export * as z from "./zod.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../document-models/renown-credential/gen/schema/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC"}