-
Notifications
You must be signed in to change notification settings - Fork 41
add to as string[]
#303
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
base: main
Are you sure you want to change the base?
add to as string[]
#303
Conversation
| function throws if it has multiple recipients. | ||
| */ | ||
|
|
||
| export function getIden3CommSingleRecipient(message: BasicMessage): DID | undefined { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
}| * @public | ||
| */ | ||
| export type AuthResponseHandlerOptions = StateVerificationOpts & | ||
| BasicHandlerOptions & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allowedIssuers: [to.string()]
| signer: Signer, | ||
| payments: PaymentRailsInfo[] | ||
| payments: PaymentRailsInfo[], | ||
| ctx?: Iden3DIDcommCompatibilityOptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be some options with ctx inside ? what if we need other option here ?
opt?: {
ctx?: Iden3DIDcommCompatibilityOptions
}
No description provided.