corda / net.corda.core.transactions / LedgerTransaction / getAttachment

getAttachment

fun getAttachment(index: Int): Attachment

Helper to simplify getting an indexed attachment.

Parameters

index - the position of the item in the attachments.

Return
The Attachment at the requested index.

fun getAttachment(id: SecureHash): Attachment

Helper to simplify getting an indexed attachment.

Parameters

id - the SecureHash of the desired attachment.

Exceptions

IllegalArgumentException - if no item matches the id.

Return
The Attachment with the matching id.