Skip to content

Commit

Permalink
docs(sdk): verifier acknowlegement (#804)
Browse files Browse the repository at this point in the history
docs(sdk): verifier acknowledgement

Signed-off-by: Rolson Quadras <[email protected]>
  • Loading branch information
rolsonquadras authored Aug 20, 2024
1 parent 4fe3b64 commit 2f0db70
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions cmd/wallet-sdk-gomobile/docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -1584,6 +1584,17 @@ interaction.presentCredential(selectedVCs)
// requirements, use this instead of presentCredential:
val preferredVC = savedCredentials.atIndex(0)
interaction.presentCredentialUnsafe(preferredVC)

// verifer Acknowledgment
interaction.acknowledgment() // get the Acknowledgment object

// use this API to get the opaque string, which needs to be submitted to the Acknowledgment APIs
val ackTkn = interaction.acknowledgment().serialize()

val ack = Acknowledgment(ackTkn)

ack.noConsent()() // user declines the share request
ack.noMatchingCredential()() // no matching credentials found
```

###### Read scope and add custom scope claims
Expand Down Expand Up @@ -1645,6 +1656,17 @@ let credentials = interaction.presentCredential(selectedVCs)
// requirements, use this instead of presentCredential:
let preferredVC = savedCredentials.atIndex(0)
interaction.presentCredentialUnsafe(preferredVC)

// verifier Acknowledgment
interaction.acknowledgment() // get the Acknowledgment object

// use this API to get the opaque string, which needs to be submitted to the Acknowledgment APIs
let ackTkn = interaction.Acknowledgment().Serialize()

let ack = Acknowledgment(ackTkn)

try ack.noConsent()() // user declines the share request
try ack.noMatchingCredential()() // no matching credentials found
```

##### SubmissionRequirements complex cases
Expand Down

0 comments on commit 2f0db70

Please sign in to comment.