SD-JWT issuer initialization

Procedure

  1. Write the issuer DID of the agent to a ledger or set the agents DID method to did:key.
  2. Create or retrieve a SD-JWT credential schema (schema).
    The schema field is a JSON schema object that describes each claim’s name, type, and whether they are selectively disclosable or not. If the claim’s name has a $allowSelectiveDisclosure attribute set to false, that claim will not be selectively disclosable by the holder. All other fields are selectively disclosable by default. For more information see SD-JWT selective disclosure.
    Following is an example POST body for creating an SD-JWT credential schema:
    {
        "name": "MySchema",
        "version": "1.0",
        "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
                "given_name": {
                    "type": "string"
                },
                "family_name": {
                    "type": "string"
                },
                "email": {
                    "type": "string"
                },
                "phone_number": {
                    "type": "string"
                },
                "address": {
                    "type": "object",
                    "properties": {
                        "street_address": {
                            "type": "string"
                        },
                        "locality": {
                            "type": "string"
                        },
                        "region": {
                            "type": "string"
                        },
                        "country": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "country"
                    ]
                }
            },
            "required": [
                "given_name",
                "family_name"
            ]
        }
    }
  3. Create a credential definition.
    Following is an example POST body for creating an SD-JWT credential definition:
    {
        "schema_id": "xxxxxx",
        "credential_document_type": [],
        "credential_format": "dc+sd-jwt",
        "cryptographic_binding_methods": [ 
            "jwk" 
        ],
        "key_proof_types": {
            "jwt": [ 
                "Ed25519"
            ]
        },
        "credential_signing_algorithm": "EdDSA"
    }
    • For ldp_vp, the value must be an array that contains Ed25519Signature2020 or eddsa-rdfc-2022.
    • The supported value for credential_signing_algorithm is EdDSA.
  4. Optional: To enable status information for credentials issued from this credential definition, add a credential status provider by including the following in the credential definition request body:
    {
        “credential_status_provider”: {
              “id”: “86a7c919-bb0c-4e77-92b1-a3bd33a69131”
              “enabled_status_purposes”: [“revocation”, “suspension”]
        }
    }

    For more information, see Enabling status information.

What to do next

After the issuer initialization is complete, issuer1 can issue a credential to user1.