Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wallet interfaces for WACI - issuance flow #101

Open
sudeshrshetty opened this issue Nov 9, 2021 · 2 comments
Open

wallet interfaces for WACI - issuance flow #101

sudeshrshetty opened this issue Nov 9, 2021 · 2 comments

Comments

@sudeshrshetty
Copy link
Contributor

sudeshrshetty commented Nov 9, 2021

Based on recent progress in Wallet And Credential Interactions spec, I would like to propose few interfaces in universal wallet to support WACI issuance flow.

According to wallet and credential Interactions for issuance, flow between prover(wallet) & issuer looks like this,

WACI Issuance

From wallet's point of view above interactions can be grouped into 2 sections to accommodate user consent in between.

  • Step 1: Wallet accepting invitation from issuer, initiating credential issuance flow by sending propose credential message and receiving offer credential message from issuer. The offer credential message might include credential manifest, unsigned VC and optional presentation definition.
  • Step 2: Wallet displaying incoming credential to user using credential manifest and unsigned VC. Wallet can optionally show query result from presentation definition if sent by issuer.
  • Step 3: Once user gives consent, wallet can proceed with rest of the steps from issue credential protocol to conclude credential issuance interaction.

Proposed Interfaces in universal wallet: TBD

  • wallet to accept out-of-band invitation and initiate the issuance interaction (step#1 mentioned above).
 // accept the invitation, send propose credential message, wait and return response including threadID, credential manifest, unsigned vc and optional parameters(domain, challenge, presentation definition).
 let offer = await wallet.proposeCredential(invitation, from, timeout)
 
 //  Args 
 //  invitation: out-of-band invitation 
//   from: optional in case of DIDComm V1 and a wallet can choose a specific DID to send the message in case of DIDComm V2 
// timeout: optional timeout duration to wait for offer credential message from issuer.
  • wallet sends request credential message to issuer and waits for protocol to be completed (step#3 mentioned above).
 // sends credential application message to issuer, waits for credential fulfillment message and optionally sends acknowledgment. Response of this call contains credential fullfilment sent by issuer.
 let fulfillment = await wallet.requestCredential(thID, presentation, ack, timeout)
 
 //  Args 
 //  thID: thread ID of the intercation.
//   presentation: presentation to be submitted from wallet to issuer. Typically contains DIDAuth response or credentials if issuer has asked for presentation submissions.
//   ack: optional argument to wait for protocol status to be done before returning.
// timeout: optional timeout duration to wait for offer credential message from issuer.

Example of issuance flow:

// accept invitation and initiate issuance interaction.
let offer = await wallet.proposeCredential(invitation, from, timeout)

const {thID, manifest, vc, domain, challenge, presentationDefinition} = offer

let query
if (presentationDefinition) {
      query = {
              type: "PresentationExchange",
              credentialQuery: presentationDefinition
              }
} else if (domain || challenge) {
    query = {
        type: "DIDAuth"
      }
}

const presentation = await wallet.query([query], {domain, challenge})

/* 
 display incoming VC using manifest and unsigned VC to wallet user and get consent from user.
*/

// add proof to presentation (existing interface)
let vp = await wallet.prove(presentation, proofOptions)

// send request credential message and wait for ack.
let fullfilment = await wallet.requestCredential(thID, presentation, true, someTimeout)
@sudeshrshetty
Copy link
Contributor Author

@OR13 please have a look and let me know about your views.

@OR13
Copy link
Collaborator

OR13 commented Nov 22, 2021

These look good, I think we should pull some fo the comments int the code out into paragraphs.

sudeshrshetty added a commit to sudeshrshetty/universal-wallet-interop-spec that referenced this issue Nov 23, 2021
- added WACI issuance interfaces based on w3c-ccg#101
 - added examples for WACI share & issuance flows.

Signed-off-by: sudesh.shetty <sudesh.shetty@securekey.com>
sudeshrshetty added a commit to sudeshrshetty/aries-framework-go that referenced this issue Nov 26, 2021
based on [WACI Issuance in Universal
Wallet](w3c-ccg/universal-wallet-interop-spec#101)

- added propose credential interface
- added request credential interface
- added tests
- Closes hyperledger-archives#3073

Signed-off-by: sudesh.shetty <sudesh.shetty@securekey.com>
sudeshrshetty added a commit to sudeshrshetty/aries-framework-go that referenced this issue Nov 26, 2021
based on [WACI Issuance in Universal
Wallet](w3c-ccg/universal-wallet-interop-spec#101)

- added propose credential interface
- added request credential interface
- added tests
- Closes hyperledger-archives#3073

Signed-off-by: sudesh.shetty <sudesh.shetty@securekey.com>
sudeshrshetty added a commit to sudeshrshetty/aries-framework-go that referenced this issue Nov 26, 2021
based on [WACI Issuance in Universal
Wallet](w3c-ccg/universal-wallet-interop-spec#101)

- added propose credential interface
- added request credential interface
- added tests
- Closes hyperledger-archives#3073

Signed-off-by: sudesh.shetty <sudesh.shetty@securekey.com>
sudeshrshetty added a commit to sudeshrshetty/aries-framework-go that referenced this issue Nov 26, 2021
based on [WACI Issuance in Universal
Wallet](w3c-ccg/universal-wallet-interop-spec#101)

- added propose credential interface
- added request credential interface
- added tests
- Closes hyperledger-archives#3073

Signed-off-by: sudesh.shetty <sudesh.shetty@securekey.com>
sudeshrshetty added a commit to sudeshrshetty/aries-framework-go that referenced this issue Nov 26, 2021
based on [WACI Issuance in Universal
Wallet](w3c-ccg/universal-wallet-interop-spec#101)

- added propose credential interface
- added request credential interface
- added tests
- Closes hyperledger-archives#3073

Signed-off-by: sudesh.shetty <sudesh.shetty@securekey.com>
sudeshrshetty added a commit to sudeshrshetty/aries-framework-go that referenced this issue Nov 26, 2021
based on [WACI Issuance in Universal
Wallet](w3c-ccg/universal-wallet-interop-spec#101)

- added propose credential interface
- added request credential interface
- added tests
- Closes hyperledger-archives#3073

Signed-off-by: sudesh.shetty <sudesh.shetty@securekey.com>
sudeshrshetty added a commit to sudeshrshetty/aries-framework-go that referenced this issue Nov 26, 2021
based on [WACI Issuance in Universal
Wallet](w3c-ccg/universal-wallet-interop-spec#101)

- added propose credential interface
- added request credential interface
- added tests
- Closes hyperledger-archives#3073

Signed-off-by: sudesh.shetty <sudesh.shetty@securekey.com>
sudeshrshetty added a commit to sudeshrshetty/aries-framework-go that referenced this issue Nov 26, 2021
based on [WACI Issuance in Universal
Wallet](w3c-ccg/universal-wallet-interop-spec#101)

- added propose credential interface
- added request credential interface
- added tests
- Closes hyperledger-archives#3073

Signed-off-by: sudesh.shetty <sudesh.shetty@securekey.com>
sudeshrshetty added a commit to sudeshrshetty/aries-framework-go that referenced this issue Nov 26, 2021
based on [WACI Issuance in Universal
Wallet](w3c-ccg/universal-wallet-interop-spec#101)

- added propose credential interface
- added request credential interface
- added tests
- Closes hyperledger-archives#3073

Signed-off-by: sudesh.shetty <sudesh.shetty@securekey.com>
sudeshrshetty added a commit to sudeshrshetty/aries-framework-go that referenced this issue Nov 26, 2021
based on [WACI Issuance in Universal
Wallet](w3c-ccg/universal-wallet-interop-spec#101)

- added propose credential interface
- added request credential interface
- added tests
- Closes hyperledger-archives#3073

Signed-off-by: sudesh.shetty <sudesh.shetty@securekey.com>
sudeshrshetty added a commit to sudeshrshetty/aries-framework-go that referenced this issue Jan 22, 2022
based on [WACI Issuance in Universal
Wallet](w3c-ccg/universal-wallet-interop-spec#101)

- added propose credential interface
- added request credential interface
- added tests
- Closes hyperledger-archives#3073

Signed-off-by: sudesh.shetty <sudesh.shetty@securekey.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants