veramo
veramo copied to clipboard
[bug] Unable to Create SDR With DID that Lacks Secp256k1 Key
async createSelectiveDisclosureRequest(
args: ICreateSelectiveDisclosureRequestArgs,
context: IAgentContext<IDIDManager & IKeyManager>,
): Promise<string> {
try {
const identifier = await context.agent.didManagerGet({ did: args.data.issuer })
const data: Partial<ISelectiveDisclosureRequest> = args.data
delete data.issuer
Debug('veramo:selective-disclosure:create-sdr')('Signing SDR with', identifier.did)
const key = identifier.keys.find((k) => k.type === 'Secp256k1')
if (!key) throw Error('Signing key not found')
Observed Behavior:
-
createSelectiveDisclosureRequest
throws an error if specified DID does not have an Secp256k1 Key
Expected Behavior:
- Should be able to create SDRs using any acceptable key type
Version: @veramo/selective-disclosure @3.1.4@next