corda / net.corda.core.contracts / ContractAttachment

ContractAttachment

class ContractAttachment : Attachment

An Attachment which represents a contract JAR.

Constructors

<init>

ContractAttachment(attachment: Attachment, contract: ContractClassName, additionalContracts: Set<ContractClassName> = emptySet(), uploader: String? = null)

Properties

additionalContracts

val additionalContracts: Set<ContractClassName>

Additional contract names contained within the JAR.

allContracts

val allContracts: Set<ContractClassName>

attachment

val attachment: Attachment

The attachment representing the contract JAR

contract

val contract: ContractClassName

The contract name contained within the JAR. A Contract attachment has to contain at least 1 contract.

isSigned

val isSigned: Boolean

signerKeys

val signerKeys: List<PublicKey>

The keys that have correctly signed the whole attachment. Can be empty, for example non-contract attachments won't be necessarily be signed.

uploader

val uploader: String?

version

val version: Int

Functions

toString

fun toString(): String

Companion Object Functions

create

fun create(attachment: Attachment, contract: ContractClassName, additionalContracts: Set<ContractClassName> = emptySet(), uploader: String? = null, signerKeys: List<PublicKey> = emptyList(), version: Int = DEFAULT_CORDAPP_VERSION): ContractAttachment

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

When called from a companion object, returns the logger for the enclosing class.