decentralized-identity / decentralized-identity/veramo

[BUG] Domain and Challenge are not used when generating a VP with EIP712

Open
#961 1 comment 1 reaction 0 assignees View on GitHub
bug pinned triage
Dominant language
TypeScript
Stars
543
Forks
137
Avg merge
12m
Merged PRs (30d)
2

Description

**Bug severity**
2

**Describe the bug**
Creating a Verifiable Presentation using EIP712 signature with challenge and domain returns a VP without nonce and verifier (challenge and domain are not passed to agent.createVerifiablePresentationEIP712).

**To Reproduce**
Steps to reproduce the behaviour:
1. call agent.createVerifiablePresentation with type set to Custom and proofFormat set to 'EthereumEip712Signature2021'
```
const vp = await agent.createVerifiablePresentation({
presentation: {
holder: identifier,
type: ["VerifiablePresentation", "Custom"],
verifiableCredential: [vc.vc],
},
challenge: challenge,
domain: domain,
proofFormat: "EthereumEip712Signature2021",
save: false,
});
```

**Observed behaviour**
Function returns Verifiable Presentation that does not include verifier and a nonce (same result as if challenge and domain were not provided). Challenge and Domain are not passed to the agent.createVerifiablePresentationEIP712(args) in createVerifiablePresentation function in [credential-w3c](https://github.com/uport-project/veramo/blob/next/packages/credential-w3c/src/action-handler.ts).

**Expected behaviour**
A VP with nonce and verifier should be generated.

**Versions (please complete the following information):**
- Veramo: 3.1.6-next.146
- Node Version: 16.15.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.