aries-framework-go icon indicating copy to clipboard operation
aries-framework-go copied to clipboard

Proposal: issuecredential.GetAction (by piid)

Open borancar opened this issue 3 years ago • 0 comments

When handling issuecredential actions at the client level, it could be useful to have a get by piid as we have for connections. For basic cases that don't rely on processing the attachments, the current approach of just deciding and accepting is fine. However, if we need to process the attachments, we need the type-safe request/offer/proposal. The current approach I have is to manually construct an issuecredential.Action from service.DIDCommAction in the action handlers e.g.:

act <- issuecredentialActionsCh
props
action := issuecredential.Action{
    PIID: props.PIID(),
    MyDID: props.MyDID(),
    TheirDID: props.TheirDID(),
    Msg: act.Message.(service.DIDCommMsgMap),
}

By having the get by piid, we could simply signal the piid as a string and then

action := issuecredential.GetAction(piid)

borancar avatar Aug 15 '22 19:08 borancar