Skip to content

Change how credentials are hidden #33

@macterra

Description

@macterra

When a credential is revealed in the manifest it might look like this:


        "manifest": {
            "did:cid:bagaaierafxnhssg7k5btq3zgf4mq2e6i525bl3di2nid7niqrgxiainzhava": {
                "@context": [
                    "https://www.w3.org/ns/credentials/v2",
                    "https://www.w3.org/ns/credentials/examples/v2"
                ],
                "type": [
                    "VerifiableCredential",
                    "DTGCredential",
                    "EndorsementCredential"
                ],
                "issuer": "did:cid:bagaaierawu66r6ra4rz2g4cfrb5tdqp7zexwyv3si5xvjemcbs4o7436243a",
                "validFrom": "2026-01-27T21:01:01.687Z",
                "credentialSubject": {
                    "id": "did:cid:bagaaieraegjzknjvewbdpmpscp4lbw3tjr5czkgedemhzp6znlcbfmh3iumq",
                    "endorsementType": "SkillEndorsement",
                    "endorsementName": "Ranged Attack",
                    "competencyLevel": "lethal-9"
                },
                "credentialSchema": {
                    "id": "did:cid:bagaaierahc3bb2umhdru6t735hkbrgpdie5nfowozzminoz5a5cneqghhy6a",
                    "type": "JsonSchema"
                },
                "proof": {
                    "type": "EcdsaSecp256k1Signature2019",
                    "created": "2026-01-27T21:01:45.817Z",
                    "verificationMethod": "did:cid:bagaaierawu66r6ra4rz2g4cfrb5tdqp7zexwyv3si5xvjemcbs4o7436243a#key-1",
                    "proofPurpose": "assertionMethod",
                    "proofValue": "jaeiqtYtac5zry_bmat146bthv53vKO0AFrGL-BuQM4Vcf9B3jrOFehvSc7YSm8e9qJ9PnR3b6ufyu-219rT5w"
                }
            }
        }

When the same credential is published, the details are removed from credentialSubject:


        "manifest": {
            "did:cid:bagaaierafxnhssg7k5btq3zgf4mq2e6i525bl3di2nid7niqrgxiainzhava": {
                "@context": [
                    "https://www.w3.org/ns/credentials/v2",
                    "https://www.w3.org/ns/credentials/examples/v2"
                ],
                "type": [
                    "VerifiableCredential",
                    "DTGCredential",
                    "EndorsementCredential"
                ],
                "issuer": "did:cid:bagaaierawu66r6ra4rz2g4cfrb5tdqp7zexwyv3si5xvjemcbs4o7436243a",
                "validFrom": "2026-01-27T21:01:01.687Z",
                "credentialSubject": {
                    "id": "did:cid:bagaaieraegjzknjvewbdpmpscp4lbw3tjr5czkgedemhzp6znlcbfmh3iumq"
                },
                "credentialSchema": {
                    "id": "did:cid:bagaaierahc3bb2umhdru6t735hkbrgpdie5nfowozzminoz5a5cneqghhy6a",
                    "type": "JsonSchema"
                },
                "proof": {
                    "type": "EcdsaSecp256k1Signature2019",
                    "created": "2026-01-27T21:01:45.817Z",
                    "verificationMethod": "did:cid:bagaaierawu66r6ra4rz2g4cfrb5tdqp7zexwyv3si5xvjemcbs4o7436243a#key-1",
                    "proofPurpose": "assertionMethod",
                    "proofValue": "jaeiqtYtac5zry_bmat146bthv53vKO0AFrGL-BuQM4Vcf9B3jrOFehvSc7YSm8e9qJ9PnR3b6ufyu-219rT5w"
                }
            }
        }

Maybe instead of removing the fields, we should just remove the values?


        "manifest": {
            "did:cid:bagaaierafxnhssg7k5btq3zgf4mq2e6i525bl3di2nid7niqrgxiainzhava": {
                "@context": [
                    "https://www.w3.org/ns/credentials/v2",
                    "https://www.w3.org/ns/credentials/examples/v2"
                ],
                "type": [
                    "VerifiableCredential",
                    "DTGCredential",
                    "EndorsementCredential"
                ],
                "issuer": "did:cid:bagaaierawu66r6ra4rz2g4cfrb5tdqp7zexwyv3si5xvjemcbs4o7436243a",
                "validFrom": "2026-01-27T21:01:01.687Z",
                "credentialSubject": {
                    "id": "did:cid:bagaaieraegjzknjvewbdpmpscp4lbw3tjr5czkgedemhzp6znlcbfmh3iumq",
                    "endorsementType": "[hidden]",
                    "endorsementName": "[hidden]",
                    "competencyLevel": "[hidden]"
                },
                "credentialSchema": {
                    "id": "did:cid:bagaaierahc3bb2umhdru6t735hkbrgpdie5nfowozzminoz5a5cneqghhy6a",
                    "type": "JsonSchema"
                },
                "proof": {
                    "type": "EcdsaSecp256k1Signature2019",
                    "created": "2026-01-27T21:01:45.817Z",
                    "verificationMethod": "did:cid:bagaaierawu66r6ra4rz2g4cfrb5tdqp7zexwyv3si5xvjemcbs4o7436243a#key-1",
                    "proofPurpose": "assertionMethod",
                    "proofValue": "jaeiqtYtac5zry_bmat146bthv53vKO0AFrGL-BuQM4Vcf9B3jrOFehvSc7YSm8e9qJ9PnR3b6ufyu-219rT5w"
                }
            }
        }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions