@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.
- package/dist/document-models/index.d.ts +1 -0
- package/dist/document-models/index.d.ts.map +1 -0
- package/dist/document-models/index.js +1 -0
- package/dist/document-models/renown-credential/gen/actions.d.ts +1 -0
- package/dist/document-models/renown-credential/gen/actions.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/creators.d.ts +1 -0
- package/dist/document-models/renown-credential/gen/creators.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/document-model.d.ts +3 -2
- package/dist/document-models/renown-credential/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/document-model.js +3 -73
- package/dist/document-models/renown-credential/gen/index.d.ts +1 -2
- package/dist/document-models/renown-credential/gen/index.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/index.js +0 -1
- package/dist/document-models/renown-credential/gen/manager/actions.d.ts +3 -14
- package/dist/document-models/renown-credential/gen/manager/actions.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/manager/actions.js +1 -1
- package/dist/document-models/renown-credential/gen/manager/creators.d.ts +3 -5
- package/dist/document-models/renown-credential/gen/manager/creators.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/manager/creators.js +3 -5
- package/dist/document-models/renown-credential/gen/manager/error.d.ts +9 -23
- package/dist/document-models/renown-credential/gen/manager/error.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/manager/error.js +19 -38
- package/dist/document-models/renown-credential/gen/manager/operations.d.ts +2 -4
- package/dist/document-models/renown-credential/gen/manager/operations.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/manager/operations.js +3 -1
- package/dist/document-models/renown-credential/gen/ph-factories.d.ts +7 -10
- package/dist/document-models/renown-credential/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/ph-factories.js +23 -15
- package/dist/document-models/renown-credential/gen/reducer.d.ts +3 -2
- package/dist/document-models/renown-credential/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/reducer.js +1 -16
- package/dist/document-models/renown-credential/gen/schema/index.d.ts +1 -0
- package/dist/document-models/renown-credential/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/schema/types.d.ts +83 -117
- package/dist/document-models/renown-credential/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/schema/zod.d.ts +15 -4
- package/dist/document-models/renown-credential/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/schema/zod.js +129 -35
- package/dist/document-models/renown-credential/gen/types.d.ts +10 -6
- package/dist/document-models/renown-credential/gen/types.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/types.js +1 -0
- package/dist/document-models/renown-credential/gen/utils.d.ts +10 -19
- package/dist/document-models/renown-credential/gen/utils.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/utils.js +48 -47
- package/dist/document-models/renown-credential/index.d.ts +13 -9
- package/dist/document-models/renown-credential/index.d.ts.map +1 -0
- package/dist/document-models/renown-credential/index.js +4 -3
- package/dist/document-models/renown-credential/src/reducers/manager.d.ts +1 -0
- package/dist/document-models/renown-credential/src/reducers/manager.d.ts.map +1 -0
- package/dist/document-models/renown-credential/src/reducers/manager.js +46 -121
- package/dist/document-models/renown-credential/src/tests/document-model.test.d.ts +1 -0
- package/dist/document-models/renown-credential/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/renown-credential/src/tests/document-model.test.js +1 -1
- package/dist/document-models/renown-credential/src/tests/manager.test.d.ts +1 -0
- package/dist/document-models/renown-credential/src/tests/manager.test.d.ts.map +1 -0
- package/dist/document-models/renown-credential/src/utils.d.ts +1 -0
- package/dist/document-models/renown-credential/src/utils.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/actions.d.ts +1 -0
- package/dist/document-models/renown-user/gen/actions.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/creators.d.ts +1 -0
- package/dist/document-models/renown-user/gen/creators.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/document-model.d.ts +3 -2
- package/dist/document-models/renown-user/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/index.d.ts +1 -2
- package/dist/document-models/renown-user/gen/index.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/index.js +0 -1
- package/dist/document-models/renown-user/gen/ph-factories.d.ts +7 -10
- package/dist/document-models/renown-user/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/ph-factories.js +1 -4
- package/dist/document-models/renown-user/gen/profile/actions.d.ts +1 -0
- package/dist/document-models/renown-user/gen/profile/actions.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/profile/actions.js +1 -1
- package/dist/document-models/renown-user/gen/profile/creators.d.ts +1 -0
- package/dist/document-models/renown-user/gen/profile/creators.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/profile/creators.js +2 -1
- package/dist/document-models/renown-user/gen/profile/error.d.ts +1 -0
- package/dist/document-models/renown-user/gen/profile/error.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/profile/operations.d.ts +1 -0
- package/dist/document-models/renown-user/gen/profile/operations.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/profile/operations.js +3 -1
- package/dist/document-models/renown-user/gen/reducer.d.ts +3 -2
- package/dist/document-models/renown-user/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/reducer.js +1 -4
- package/dist/document-models/renown-user/gen/schema/index.d.ts +1 -0
- package/dist/document-models/renown-user/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/schema/types.d.ts +1 -0
- package/dist/document-models/renown-user/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/schema/zod.d.ts +1 -0
- package/dist/document-models/renown-user/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/types.d.ts +10 -6
- package/dist/document-models/renown-user/gen/types.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/types.js +1 -0
- package/dist/document-models/renown-user/gen/utils.d.ts +10 -19
- package/dist/document-models/renown-user/gen/utils.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/utils.js +26 -36
- package/dist/document-models/renown-user/index.d.ts +14 -7
- package/dist/document-models/renown-user/index.d.ts.map +1 -0
- package/dist/document-models/renown-user/index.js +4 -3
- package/dist/document-models/renown-user/src/reducers/profile.d.ts +1 -0
- package/dist/document-models/renown-user/src/reducers/profile.d.ts.map +1 -0
- package/dist/document-models/renown-user/src/tests/document-model.test.d.ts +1 -0
- package/dist/document-models/renown-user/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/renown-user/src/tests/document-model.test.js +1 -1
- package/dist/document-models/renown-user/src/tests/profile.test.d.ts +1 -0
- package/dist/document-models/renown-user/src/tests/profile.test.d.ts.map +1 -0
- package/dist/document-models/renown-user/src/utils.d.ts +1 -0
- package/dist/document-models/renown-user/src/utils.d.ts.map +1 -0
- package/dist/editors/hooks/useRenownCredentialDocument.d.ts +1 -0
- package/dist/editors/hooks/useRenownCredentialDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useRenownUserDocument.d.ts +1 -0
- package/dist/editors/hooks/useRenownUserDocument.d.ts.map +1 -0
- package/dist/editors/index.d.ts +1 -0
- package/dist/editors/index.d.ts.map +1 -0
- package/dist/editors/index.js +1 -0
- package/dist/editors/renown-credential-editor/editor.d.ts +1 -0
- package/dist/editors/renown-credential-editor/editor.d.ts.map +1 -0
- package/dist/editors/renown-credential-editor/editor.js +7 -71
- package/dist/editors/renown-credential-editor/index.d.ts +1 -0
- package/dist/editors/renown-credential-editor/index.d.ts.map +1 -0
- package/dist/editors/renown-credential-editor/index.js +1 -3
- package/dist/editors/renown-user-editor/editor.d.ts +1 -0
- package/dist/editors/renown-user-editor/editor.d.ts.map +1 -0
- package/dist/editors/renown-user-editor/editor.js +1 -1
- package/dist/editors/renown-user-editor/index.d.ts +1 -0
- package/dist/editors/renown-user-editor/index.d.ts.map +1 -0
- package/dist/editors/renown-user-editor/index.js +1 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/processors/factory.d.ts +4 -2
- package/dist/processors/factory.d.ts.map +1 -0
- package/dist/processors/factory.js +4 -0
- package/dist/processors/index.d.ts +2 -0
- package/dist/processors/index.d.ts.map +1 -0
- package/dist/processors/index.js +2 -0
- package/dist/processors/renown-credential/factory.d.ts +8 -0
- package/dist/processors/renown-credential/factory.d.ts.map +1 -0
- package/dist/processors/renown-credential/factory.js +25 -0
- package/dist/processors/renown-credential/index.d.ts +8 -2
- package/dist/processors/renown-credential/index.d.ts.map +1 -0
- package/dist/processors/renown-credential/index.js +77 -71
- package/dist/processors/renown-credential/migrations.d.ts +2 -1
- package/dist/processors/renown-credential/migrations.d.ts.map +1 -0
- package/dist/processors/renown-credential/migrations.js +53 -22
- package/dist/processors/renown-credential/schema.d.ts +19 -13
- package/dist/processors/renown-credential/schema.d.ts.map +1 -0
- package/dist/processors/renown-user/factory.d.ts +2 -1
- package/dist/processors/renown-user/factory.d.ts.map +1 -0
- package/dist/processors/renown-user/factory.js +4 -1
- package/dist/processors/renown-user/index.d.ts +3 -2
- package/dist/processors/renown-user/index.d.ts.map +1 -0
- package/dist/processors/renown-user/index.js +3 -1
- package/dist/processors/renown-user/migrations.d.ts +2 -1
- package/dist/processors/renown-user/migrations.d.ts.map +1 -0
- package/dist/processors/renown-user/migrations.js +1 -0
- package/dist/processors/renown-user/schema.d.ts +1 -0
- package/dist/processors/renown-user/schema.d.ts.map +1 -0
- package/dist/style.css +132 -17106
- package/dist/subgraphs/index.d.ts +1 -0
- package/dist/subgraphs/index.d.ts.map +1 -0
- package/dist/subgraphs/index.js +1 -0
- package/dist/subgraphs/renown-credential/index.d.ts +3 -2
- package/dist/subgraphs/renown-credential/index.d.ts.map +1 -0
- package/dist/subgraphs/renown-credential/index.js +2 -2
- package/dist/subgraphs/renown-credential/resolvers.d.ts +3 -2
- package/dist/subgraphs/renown-credential/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/renown-credential/resolvers.js +0 -36
- package/dist/subgraphs/renown-credential/schema.d.ts +1 -0
- package/dist/subgraphs/renown-credential/schema.d.ts.map +1 -0
- package/dist/subgraphs/renown-credential/schema.js +97 -50
- package/dist/subgraphs/renown-read-model/index.d.ts +3 -2
- package/dist/subgraphs/renown-read-model/index.d.ts.map +1 -0
- package/dist/subgraphs/renown-read-model/index.js +2 -2
- package/dist/subgraphs/renown-read-model/resolvers.d.ts +3 -2
- package/dist/subgraphs/renown-read-model/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/renown-read-model/resolvers.js +35 -36
- package/dist/subgraphs/renown-read-model/schema.d.ts +1 -0
- package/dist/subgraphs/renown-read-model/schema.d.ts.map +1 -0
- package/dist/subgraphs/renown-read-model/schema.js +20 -19
- package/dist/subgraphs/renown-user/index.d.ts +3 -2
- package/dist/subgraphs/renown-user/index.d.ts.map +1 -0
- package/dist/subgraphs/renown-user/index.js +2 -2
- package/dist/subgraphs/renown-user/resolvers.d.ts +3 -2
- package/dist/subgraphs/renown-user/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/renown-user/schema.d.ts +1 -0
- package/dist/subgraphs/renown-user/schema.d.ts.map +1 -0
- package/dist/vite.config.d.ts +3 -0
- package/dist/vite.config.d.ts.map +1 -0
- package/dist/vite.config.js +13 -0
- package/dist/vitest.config.d.ts +1 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/package.json +52 -39
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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 {
|
|
2
|
-
export declare const documentModel:
|
|
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:
|
|
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: '"{\\
|
|
162
|
-
schema: 'type
|
|
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
|
|
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
|
|
12
|
-
|
|
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
|
-
|
|
1
|
+
import {} from "document-model";
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { type InitInput, type RevokeInput
|
|
2
|
-
import { type InitAction, type RevokeAction
|
|
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
|
-
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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
|
|
21
|
+
export declare class MissingTypeError extends Error implements ReducerError {
|
|
30
22
|
errorCode: ErrorCode;
|
|
31
23
|
constructor(message?: string);
|
|
32
24
|
}
|
|
33
|
-
export declare class
|
|
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 =
|
|
3
|
-
constructor(message =
|
|
2
|
+
errorCode = "MissingContextError";
|
|
3
|
+
constructor(message = "MissingContextError") {
|
|
4
4
|
super(message);
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
export class
|
|
8
|
-
errorCode =
|
|
9
|
-
constructor(message =
|
|
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 =
|
|
21
|
-
constructor(message =
|
|
14
|
+
errorCode = "JwtVerificationError";
|
|
15
|
+
constructor(message = "JwtVerificationError") {
|
|
22
16
|
super(message);
|
|
23
17
|
}
|
|
24
18
|
}
|
|
25
|
-
export class
|
|
26
|
-
errorCode =
|
|
27
|
-
constructor(message =
|
|
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
|
|
38
|
-
errorCode =
|
|
39
|
-
constructor(message =
|
|
25
|
+
export class MissingTypeError extends Error {
|
|
26
|
+
errorCode = "MissingTypeError";
|
|
27
|
+
constructor(message = "MissingTypeError") {
|
|
40
28
|
super(message);
|
|
41
29
|
}
|
|
42
30
|
}
|
|
43
|
-
export class
|
|
44
|
-
errorCode =
|
|
45
|
-
constructor(message =
|
|
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
|
|
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,18 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Factory methods for creating RenownCredentialDocument instances
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import type { RenownCredentialDocument, RenownCredentialLocalState,
|
|
6
|
-
export
|
|
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<
|
|
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<
|
|
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<
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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 {
|
|
2
|
-
import {
|
|
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
|
-
|
|
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
|
}
|
|
@@ -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"}
|