What's the method in libindy to create a credential proposal?

166 Views Asked by At

The following aries RFC #36 mentions an opional step "propose-credential" https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential/README.md#propose-credential

Unfortunately I cannot find the method in the rust library: https://github.com/hyperledger/indy-sdk/blob/f9eb2cf17b51584f875c4707094256a96656e7b8/wrappers/rust/indy-sys/src/anoncreds.rs

I was expecting to see something like: indy_issuer_create_credential_proposal in the same way there is a indy_issuer_create_credential_offer.

What's the best way to generate a credential proposal with lib-indy?

thanks for your help!

1

There are 1 best solutions below

0
On

The logic of the propose-credential is application-specific and, as of today, not yet part of the Hyperledger Indy library. You are right when you say that there is no function for it, as Indy only provides functions to offer a credential, request a credential, and issue a credential.

As one note in the doc says:

Note: In Hyperledger Indy, where the request-credential message can only be sent in response to an offer-credential message, the propose-credential message is the only way for a potential Holder to initiate the workflow.

So this means that you can implement the format specified in the credential proposal message, and handle it at the application layer, likely before the create_credential_offer function is called.