Skip to content

add to as string[]#303

Open
vmidyllic wants to merge 2 commits into
mainfrom
feat/didcomm-to-field
Open

add to as string[]#303
vmidyllic wants to merge 2 commits into
mainfrom
feat/didcomm-to-field

Conversation

@vmidyllic

Copy link
Copy Markdown
Collaborator

No description provided.

@Kolezhniuk Kolezhniuk self-requested a review March 18, 2025 17:11
function throws if it has multiple recipients.
*/

export function getIden3CommSingleRecipient(message: BasicMessage): DID | undefined {

Copy link
Copy Markdown
Collaborator

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

Comment on lines 208 to +212
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,

Copy link
Copy Markdown
Collaborator

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
}

@@ -99,7 +103,7 @@ export type AuthResponseHandlerOptions = StateVerificationOpts &
BasicHandlerOptions & {

@volodymyr-basiuk volodymyr-basiuk Mar 19, 2025

Copy link
Copy Markdown
Collaborator

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()]

Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Collaborator

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
}

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

Successfully merging this pull request may close these issues.

3 participants