-
Notifications
You must be signed in to change notification settings - Fork 37
Description
It seems there could be benefit to have the ability to add auxilliary/associated/additional data/metadata to an issued credential. This could apply to a single credential but specifically also to each instance of Credential if multiple are issued using batch issuance with proofs and credentials.
This may be used for example key handles of ARKG or other advanced key derivation schemes, like described in #359 where each credential is using a public key that is derived by the issuer, so there is a need to pass a keyhandle for each credential instance. This could also be used for other features in the future, where there is data associated to a credential instance useful to the Wallet that should not be included into the credential itself.
I see some options:
Option 1:
Adding a credentials_metadata array in non-breaking way that includes all potential associated data, assuming same ordering as credentials array.
{
"credentials": [
"LUpixVCWJk0eOt4CXQe1NXK....WZwmhmn9OQp6YxX0a2L",
"YXNkZnNhZGZkamZqZGFza23....29tZTIzMjMyMzIzMjMy"
],
"credentials_metadata" : [
{
"keyhandle" : "..." //keyhandle for credential1,
"some-other-metadata" : ".."
},
{
"keyhandle" : "..." //keyhandle for credential2,
"some-other-metadata" : ".."
}
]
}
Option 2:
Enhance credentials array in breaking way that includes all potential associated data.
{
"credentials": [
{
"credential" : "LUpixVCWJk0eOt4CXQe1NXK....WZwmhmn9OQp6YxX0a2L",
"keyhandle" : "..." //keyhandle,
"some-other-metadata" : ".."
},
{
"credential" : "LUpixVCWJk0eOt4CXQe1NXK....WZwmhmn9OQp6YxX0a2L",
"keyhandle" : "..." //keyhandle,
"some-other-metadata" : ".."
}
]
}
Option 3:
Each feature that uses/requires associated data introduces its own parameter array. This means though there are proof type specific parameters.
{
"credentials": [
"LUpixVCWJk0eOt4CXQe1NXK....WZwmhmn9OQp6YxX0a2L",
"YXNkZnNhZGZkamZqZGFza23....29tZTIzMjMyMzIzMjMy"
],
"keyhandles" : [
//keyhandle for credential1,
//keyhandle for credential2
]
}