public class ContractAttachment implements Attachment
An interface Attachment
which represents a contract JAR.
interface Attachment
public static net.corda.core.contracts.ContractAttachment.Companion Companion
@JvmOverloads public ContractAttachment(@NotNull Attachment attachment, @NotNull java.lang.String contract, @NotNull java.util.Set<java.lang.String> additionalContracts, @Nullable java.lang.String uploader)
@JvmOverloads public ContractAttachment(@NotNull Attachment attachment, @NotNull java.lang.String contract, @NotNull java.util.Set<java.lang.String> additionalContracts)
@JvmOverloads public ContractAttachment(@NotNull Attachment attachment, @NotNull java.lang.String contract)
@NotNull public java.util.Set<java.lang.String> getAllContracts()
public boolean isSigned()
@NotNull public java.lang.String toString()
@NotNull public Attachment getAttachment()
The attachment representing the contract JAR
@NotNull public java.lang.String getContract()
The contract name contained within the JAR.
A Contract attachment has to contain at least 1 contract.
@NotNull public java.util.Set<java.lang.String> getAdditionalContracts()
Additional contract names contained within the JAR.
@Nullable public java.lang.String getUploader()
@NotNull public java.util.List<java.security.PublicKey> getSignerKeys()
The keys that have correctly signed the whole attachment.
Can be empty, for example non-contract attachments won't be necessarily be signed.
public int getVersion()
@NotNull public SecureHash getId()
@NotNull public java.util.List<net.corda.core.identity.Party> getSigners()
The parties that have correctly signed the whole attachment. Even though this returns a list of party objects, it is not required that these parties exist on the network, but rather they are a mapping from the signing key to the X.500 name.
Note: Anyone can sign attachments, not only Corda parties. It's recommended to use signerKeys
.
signerKeys
public int getSize()
Attachment size in bytes.
@NotNull public java.io.InputStream open()