Skip to content

Instantly share code, notes, and snippets.

@lankydan lankydan/Flow.kt
Last active May 15, 2019

Embed
What would you like to do?
Verifying transactions with csv attachments - building a transaction
private fun transaction(): TransactionBuilder =
TransactionBuilder(notary()).apply {
val attachmentId = attachment()
addOutputState(message)
addCommand(Command(Send(attachmentId), message.participants.map(Party::owningKey)))
addAttachment(attachmentId)
}
private fun attachment(): AttachmentId {
return serviceHub.attachments.queryAttachments(
AttachmentQueryCriteria.AttachmentsQueryCriteria(
filenameCondition = Builder.equal(
attachmentName
)
)
).first()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.