mirror of
https://github.com/corda/corda.git
synced 2025-02-01 08:48:09 +00:00
Serialization changes required for Conclave integration
This commit is contained in:
parent
046c441cbe
commit
8fa7efd867
@ -239,7 +239,9 @@ interface MoveCommand : CommandData {
|
||||
/** A [Command] where the signing parties have been looked up if they have a well known/recognised institutional key. */
|
||||
@KeepForDJVM
|
||||
@CordaSerializable
|
||||
data class CommandWithParties<out T : CommandData>(
|
||||
data class CommandWithParties<out T : CommandData>
|
||||
@ConstructorForDeserialization
|
||||
constructor(
|
||||
val signers: List<PublicKey>,
|
||||
/** If any public keys were recognised, the looked up institutions are available here */
|
||||
@Deprecated("Should not be used in contract verification code as it is non-deterministic, will be disabled for some future target platform version onwards and will take effect only for CorDapps targeting those versions.")
|
||||
|
@ -1,6 +1,7 @@
|
||||
package net.corda.core.crypto
|
||||
|
||||
import net.corda.core.KeepForDJVM
|
||||
import net.corda.core.serialization.ConstructorForDeserialization
|
||||
import net.corda.core.serialization.CordaSerializable
|
||||
import java.security.InvalidKeyException
|
||||
import java.security.PublicKey
|
||||
@ -17,7 +18,9 @@ import java.util.*
|
||||
*/
|
||||
@CordaSerializable
|
||||
@KeepForDJVM
|
||||
class TransactionSignature(bytes: ByteArray, val by: PublicKey, val signatureMetadata: SignatureMetadata, val partialMerkleTree: PartialMerkleTree?) : DigitalSignature(bytes) {
|
||||
class TransactionSignature
|
||||
@ConstructorForDeserialization
|
||||
constructor(bytes: ByteArray, val by: PublicKey, val signatureMetadata: SignatureMetadata, val partialMerkleTree: PartialMerkleTree?) : DigitalSignature(bytes) {
|
||||
/**
|
||||
* Construct a [TransactionSignature] with [partialMerkleTree] set to null.
|
||||
* This is the recommended constructor when signing over a single transaction.
|
||||
|
@ -12,6 +12,7 @@ import net.corda.core.internal.TransactionVerifierServiceInternal
|
||||
import net.corda.core.internal.VisibleForTesting
|
||||
import net.corda.core.node.ServiceHub
|
||||
import net.corda.core.node.ServicesForResolution
|
||||
import net.corda.core.serialization.ConstructorForDeserialization
|
||||
import net.corda.core.serialization.CordaSerializable
|
||||
import net.corda.core.serialization.SerializedBytes
|
||||
import net.corda.core.serialization.deserialize
|
||||
@ -42,9 +43,9 @@ import java.util.function.Predicate
|
||||
// DOCSTART 1
|
||||
@KeepForDJVM
|
||||
@CordaSerializable
|
||||
data class SignedTransaction(val txBits: SerializedBytes<CoreTransaction>,
|
||||
override val sigs: List<TransactionSignature>
|
||||
) : TransactionWithSignatures {
|
||||
data class SignedTransaction
|
||||
@ConstructorForDeserialization
|
||||
constructor(val txBits: SerializedBytes<CoreTransaction>, override val sigs: List<TransactionSignature>) : TransactionWithSignatures {
|
||||
// DOCEND 1
|
||||
constructor(ctx: CoreTransaction, sigs: List<TransactionSignature>) : this(ctx.serialize(), sigs) {
|
||||
cachedTransaction = ctx
|
||||
|
Loading…
x
Reference in New Issue
Block a user