Conversation
| function throws if it has multiple recipients. | ||
| */ | ||
|
|
||
| export function getIden3CommSingleRecipient(message: BasicMessage): DID | undefined { |
There was a problem hiding this comment.
you don't need to pass here the whole BasicMessage, just pass to
| id: request.id, | ||
| thid: request.thid, | ||
| type: PROTOCOL_MESSAGE_TYPE.CONTRACT_INVOKE_RESPONSE_MESSAGE_TYPE, | ||
| from: request.to, | ||
| to: request.from, | ||
| from: recipient ? recipient.string() : undefined, | ||
| to: target, |
There was a problem hiding this comment.
maybe it's make sense to create helper function createBasicMsg(..params)
that hides logic of multiple to passing thid, mediaTyp etc.
And when you creates concrete message you could do something like that
...createBasicMsg(thid, to, isMultipleRecipients..., typ),
body: {...}
type: ide3MsgType
}| @@ -99,7 +103,7 @@ export type AuthResponseHandlerOptions = StateVerificationOpts & | |||
| BasicHandlerOptions & { | |||
There was a problem hiding this comment.
Looks like we can extend BasicHandlerOptions with Iden3DIDcommCompatibilityOptions. Than it's automatically adds Iden3DIDcommCompatibilityOptions where we had BasicHandlerOptions.
| type: cred.type, | ||
| context: cred.context, | ||
| allowedIssuers: [proposalRequest.to] | ||
| allowedIssuers: [to?.string()] |
There was a problem hiding this comment.
allowedIssuers: [to.string()]
| signer: Signer, | ||
| payments: PaymentRailsInfo[] | ||
| payments: PaymentRailsInfo[], | ||
| ctx?: Iden3DIDcommCompatibilityOptions |
There was a problem hiding this comment.
should it be some options with ctx inside ? what if we need other option here ?
opt?: {
ctx?: Iden3DIDcommCompatibilityOptions
}
No description provided.