Skip to content

Smarter pick key for credential management #4

Description

@jasny

When updating a credential status and keyRef is not specified, the first key of the identifier is picked to sign the transaction. This is allowed according to the LTO specs. However, it would be nicer to use the same key that was used to sign the credential by default.

const identifier = await this.getIdentifier(vc.issuer, context?.agent);
key = this.pickSigningKey(identifier, options?.keyRef);

If the preferred key is no longer available, use the first key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions