Skip to content

Commit

Permalink
feat: return session transcript (#6)
Browse files Browse the repository at this point in the history
* fix(android): set correct data in plugin

Signed-off-by: Berend Sliedrecht <[email protected]>

* feat: return the mdoc session transcript

Signed-off-by: Berend Sliedrecht <[email protected]>

---------

Signed-off-by: Berend Sliedrecht <[email protected]>
  • Loading branch information
berendsliedrecht authored Nov 5, 2024
1 parent a1553aa commit 7488aa0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ class MdocDataTransfer(
is DeviceRequest -> {
sendEvent(
MdocDataTransferEvent.ON_REQUEST_RECEIVED,
mapOf(("deviceRequest" to request.deviceRequestBytes.asList()))
mapOf(
("deviceRequest" to request.deviceRequestBytes.asList()),
("sessionTranscript" tot request.sessionTranscriptBytes.asList())
)
)
}
}
Expand Down Expand Up @@ -85,4 +88,4 @@ class MdocDataTransfer(
fun shutdown() {
NfcEngagementService.disable(currentActivity as ComponentActivity)
}
}
}
1 change: 1 addition & 0 deletions src/MdocDataTransfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class MdocDataTransfer {
(payload) =>
cb({
deviceRequest: new Uint8Array(payload.deviceRequest),
sessionTranscript: new Uint8Array(payload.sessionTranscript),
})
)
}
Expand Down
1 change: 1 addition & 0 deletions src/MdocDataTransferEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export type OnResponseSendPayload = null

export type OnRequestReceivedEventPayload<T = Array<number>> = {
deviceRequest: T
sessionTranscript: T
}

0 comments on commit 7488aa0

Please sign in to comment.