CustomCordapp

data class CustomCordapp(val packages: Set<String> = emptySet(), val name: String = "custom-cordapp", val versionId: Int = 1, val targetPlatformVersion: Int = PLATFORM_VERSION, val classes: Set<Class<*>> = emptySet(), val fixups: List<<Error class: unknown class>> = emptyList(), val signingInfo: CustomCordapp.SigningInfo? = null, val config: Map<String, Any> = emptyMap()) : TestCordappInternal

Represents a completely custom CorDapp comprising of resources taken from packages on the existing classpath, even including individual disparate classes. The CorDapp metadata that's present in the MANIFEST can also be tailored.

Constructors

Link copied to clipboard
constructor(packages: Set<String> = emptySet(), name: String = "custom-cordapp", versionId: Int = 1, targetPlatformVersion: Int = PLATFORM_VERSION, classes: Set<Class<*>> = emptySet(), fixups: List<<Error class: unknown class>> = emptyList(), signingInfo: CustomCordapp.SigningInfo? = null, config: Map<String, Any> = emptyMap())

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class SigningInfo(val keyStorePath: Path?, val signatureCount: Int, val algorithm: String)

Properties

Link copied to clipboard
val classes: Set<Class<*>>
Link copied to clipboard
open override val config: Map<String, Any>

Returns the config for on this CorDapp, defaults to empty if not specified.

Link copied to clipboard
val fixups: List<<Error class: unknown class>>
Link copied to clipboard
open override val jarFile: Path

The jar file this CorDapp represents. Different CorDapps may point to the same file.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val versionId: Int = 1

Functions

Link copied to clipboard
open override fun asSigned(): CustomCordapp

Returns a copy of this TestCordapp signed with a development signing key. The same signing key will be used for all signed TestCordapps. If the CorDapp jar is already signed, then the new jar created will its signing key replaced by the development key.

Link copied to clipboard
fun signed(keyStorePath: Path? = null, numberOfSignatures: Int = 1, keyAlgorithm: String = "RSA"): CustomCordapp
Link copied to clipboard
open override fun withConfig(config: Map<String, Any>): CustomCordapp

Returns a copy of this TestCordapp but with the specified CorDapp config.

Link copied to clipboard
open override fun withOnlyJarContents(): CustomCordapp

Return a copy of this TestCordappInternal but without any metadata, such as configs and signing information.