# Verifiable Credentials Issuing Testing

**URL:** <https://forum.dfinity.org/t/verifiable-credentials-issuing-testing/37662>\
**Category:** Rust\
**Created:** [November 22, 2024, 12:21pm UTC](https://forum.dfinity.org/t/verifiable-credentials-issuing-testing/37662 "2024-11-22T12:21:04Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Markduggy](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@Markduggy](https://forum.dfinity.org/u/Markduggy)\
**Post date:** [November 22, 2024, 12:21pm UTC](https://forum.dfinity.org/t/verifiable-credentials-issuing-testing/37662/1 "2024-11-22T12:21:04Z")

</div>

Hi everyone,

I have implemented the verifiable credentials rust canister and using the function below to test the issuing

requestVerifiablePresentation({  
onSuccess: async (verifiablePresentation) =\> {  
console.log(verifiablePresentation);  
},  
onError() {  
// Called when there is a technical error.  
},  
issuerData: {  
origin: “{front-end url}”, //DERIVATION ORIGIN GIVEN BY THE ISSUE (also our front end url)  
canisterId: Principal.fromText(“x74ag-daaaa-aaaal-qdisa-cai”), //ISSUER CANISTER  
},  
credentialData: {  
credentialSpec: {  
credentialType: ‘AttendenceRecord’,  
arguments: {  
“event\_id”: “167HQ73B72FQZR96G9MSNAVYFE”  
},  
},  
credentialSubject: p, //THE II PRINCIPAL WHEN USING THE RELAY PARTY  
},  
identityProvider: new URL(“https:// identity.ic0.app/”),  
});

I am getting this error: 1. Failed To Present Credential The derivation origin given for the issuer is not valid.  
I cannot post the script with the URLs but they are inputed correctly in my test function

The package used is @dfinity/verifiable-credentials

---

<div class="post-metadata">

**Author:** ![lmuntaner](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lmuntaner/32/5075_2.png) [@lmuntaner](https://forum.dfinity.org/u/lmuntaner)\
**Post date:** [November 26, 2024, 9:35am UTC](https://forum.dfinity.org/t/verifiable-credentials-issuing-testing/37662/2 "2024-11-26T09:35:42Z")

</div>

Hi!

If you are building an issue, you can try the [Dummy Relying Party](https://l7rua-raaaa-aaaap-ahh6a-cai.icp0.io/) to test with it. That might be easier than developing a whole relying party.

You can also download the [wasm from the Verifiable Credentials SDK](https://github.com/dfinity/verifiable-credentials-sdk/releases/tag/release-2024-09-10.2).

Apart from that, which Internet Identity release are you using to test that? And which `ic-verifiable-credentials` version in the issuer canister?

We’ll find the problem!

---

<div class="post-metadata">

**Author:** ![jed.blip](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@jed.blip](https://forum.dfinity.org/u/jed.blip)\
**Post date:** [November 28, 2024, 6:46am UTC](https://forum.dfinity.org/t/verifiable-credentials-issuing-testing/37662/4 "2024-11-28T06:46:15Z")

</div>

I’m one of the developers on this project. I tried using the dummy RP, but I don’t think its filling in the credential\_type as my canister is returning the error its supposed to when the credential\_type is incorrect.

---

<div class="post-metadata">

**Author:** ![lmuntaner](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lmuntaner/32/5075_2.png) [@lmuntaner](https://forum.dfinity.org/u/lmuntaner)\
**Post date:** [November 28, 2024, 8:20am UTC](https://forum.dfinity.org/t/verifiable-credentials-issuing-testing/37662/5 "2024-11-28T08:20:53Z")

</div>

Yes, in the Dummy Relying party you have to write the credential type and arguments as the Issuer expects them.

Is the problem solved?

I can help, but as I said I also need to know which Internet Identity release are you using and which `ic-verifiable-credentials` version.

---

<div class="post-metadata">

**Author:** ![jed.blip](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@jed.blip](https://forum.dfinity.org/u/jed.blip)\
**Post date:** [November 28, 2024, 8:41am UTC](https://forum.dfinity.org/t/verifiable-credentials-issuing-testing/37662/6 "2024-11-28T08:41:57Z")

</div>

I understand, I am filling in the correct credential type and arguments, but I am getting this response. Is there some way I can verify that the dummy relay party is sending the correct request?

I am using release version: b74c746ea5361af3da207a2c957be4a951f7a72c

---

<div class="post-metadata">

**Author:** ![jed.blip](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@jed.blip](https://forum.dfinity.org/u/jed.blip)\
**Post date:** [November 28, 2024, 8:53am UTC](https://forum.dfinity.org/t/verifiable-credentials-issuing-testing/37662/7 "2024-11-28T08:53:50Z")

</div>

After some playing around, the dummy RP was not filling in the credential type correctly. It now is and I am working through some issues on our issuer. I will send another reply if needed. It may be worth noting for others that the dummy RP doesn’t always work, it wasn’t filling in the credential type until I refreshed a couple of times.

---

<div class="post-metadata">

**Author:** ![lmuntaner](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lmuntaner/32/5075_2.png) [@lmuntaner](https://forum.dfinity.org/u/lmuntaner)\
**Post date:** [November 28, 2024, 9:02am UTC](https://forum.dfinity.org/t/verifiable-credentials-issuing-testing/37662/8 "2024-11-28T09:02:09Z")

</div>

Noted, thanks for the feedback!

Please let me know if you encounter other problems.

---

<div class="post-metadata">

**Author:** ![jed.blip](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@jed.blip](https://forum.dfinity.org/u/jed.blip)\
**Post date:** [November 28, 2024, 9:25am UTC](https://forum.dfinity.org/t/verifiable-credentials-issuing-testing/37662/9 "2024-11-28T09:25:58Z")

</div>

I’m having another issue, potentially irrelevant to the thread but still trying to implement an issuer so I thought I would add as a reply. For some reason, when the dummy RP/II goes to call the get\_credential method, my motoko canister suddenly can’t find my rust canister. Assuming II is calling the derivation\_origin and prepare\_credential functions (which also utilise an inter-canister call to my rust canister), this issue is isolated to my get\_credential method. The exact error is:  
“Code”: “CanisterReject”  
“Message”: “Canister bwyhz-maaaa-aaaao-a3vcq-cai not found”

which is strange, because bwyhz-maaaa-aaaao-a3vcq-cai is a live canister on the IC, viewable on the dashboard, and utilised via intercanister calls by both the derivation\_origin and the prepare\_credentials function. Any advice on how to debug this or what the issue could be would be much appreciated.

---

<div class="post-metadata">

**Author:** ![lmuntaner](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lmuntaner/32/5075_2.png) [@lmuntaner](https://forum.dfinity.org/u/lmuntaner)\
**Post date:** [November 28, 2024, 10:00am UTC](https://forum.dfinity.org/t/verifiable-credentials-issuing-testing/37662/10 "2024-11-28T10:00:42Z")

</div>

Unfortunately inter-canister calls are not available in query calls. And `get_credential` needs to be a query call to get the canister signature.

You could make the Rust canister your issuer which makes inter-canister calls to the Motoko canister to get the data in prepare\_credential and stores it in memory for the get\_credential.

I’ll take a look whether Internet Identity can use Composite Queries with get\_credential which would then allow inter-canister calls.

Even if that is possible, it won’t happen soon because I would need to change a few things and run quite a few tests.

I’ll keep you posted.

---

<div class="post-metadata">

**Author:** ![jed.blip](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@jed.blip](https://forum.dfinity.org/u/jed.blip)\
**Post date:** [November 28, 2024, 10:40am UTC](https://forum.dfinity.org/t/verifiable-credentials-issuing-testing/37662/11 "2024-11-28T10:40:43Z")

</div>

Thank you very much. I will refactor our solution to use the rust canister as the issuer.
