diff --git a/client/jackson/src/main/kotlin/net/corda/jackson/JacksonSupport.kt b/client/jackson/src/main/kotlin/net/corda/jackson/JacksonSupport.kt index 1688010b11..361313dbe3 100644 --- a/client/jackson/src/main/kotlin/net/corda/jackson/JacksonSupport.kt +++ b/client/jackson/src/main/kotlin/net/corda/jackson/JacksonSupport.kt @@ -10,6 +10,8 @@ import com.fasterxml.jackson.module.kotlin.KotlinModule import net.corda.core.contracts.Amount import net.corda.core.contracts.BusinessCalendar import net.corda.core.crypto.* +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import net.corda.core.messaging.CordaRPCOps import net.corda.core.node.NodeInfo import net.corda.core.node.services.IdentityService diff --git a/client/mock/src/main/kotlin/net/corda/client/mock/EventGenerator.kt b/client/mock/src/main/kotlin/net/corda/client/mock/EventGenerator.kt index ef2a511be7..f8effdfa8e 100644 --- a/client/mock/src/main/kotlin/net/corda/client/mock/EventGenerator.kt +++ b/client/mock/src/main/kotlin/net/corda/client/mock/EventGenerator.kt @@ -1,7 +1,7 @@ package net.corda.client.mock import net.corda.core.contracts.Amount -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.serialization.OpaqueBytes import net.corda.flows.CashFlowCommand import java.util.* diff --git a/core/src/main/kotlin/net/corda/core/contracts/ContractsDSL.kt b/core/src/main/kotlin/net/corda/core/contracts/ContractsDSL.kt index f39e355090..5b62e342f9 100644 --- a/core/src/main/kotlin/net/corda/core/contracts/ContractsDSL.kt +++ b/core/src/main/kotlin/net/corda/core/contracts/ContractsDSL.kt @@ -2,7 +2,7 @@ package net.corda.core.contracts -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import java.security.PublicKey import java.math.BigDecimal import java.util.* diff --git a/core/src/main/kotlin/net/corda/core/contracts/DummyContract.kt b/core/src/main/kotlin/net/corda/core/contracts/DummyContract.kt index 9aca84bb5d..f7116222ac 100644 --- a/core/src/main/kotlin/net/corda/core/contracts/DummyContract.kt +++ b/core/src/main/kotlin/net/corda/core/contracts/DummyContract.kt @@ -1,7 +1,7 @@ package net.corda.core.contracts -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash +import net.corda.core.identity.Party import net.corda.core.transactions.TransactionBuilder import java.security.PublicKey diff --git a/core/src/main/kotlin/net/corda/core/contracts/FungibleAsset.kt b/core/src/main/kotlin/net/corda/core/contracts/FungibleAsset.kt index 1e65bea48c..da4dca8a32 100644 --- a/core/src/main/kotlin/net/corda/core/contracts/FungibleAsset.kt +++ b/core/src/main/kotlin/net/corda/core/contracts/FungibleAsset.kt @@ -1,6 +1,6 @@ package net.corda.core.contracts -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.flows.FlowException import net.corda.core.transactions.TransactionBuilder import net.corda.core.utilities.loggerFor diff --git a/core/src/main/kotlin/net/corda/core/contracts/Structures.kt b/core/src/main/kotlin/net/corda/core/contracts/Structures.kt index f2f4d1091a..6ea81ca9a5 100644 --- a/core/src/main/kotlin/net/corda/core/contracts/Structures.kt +++ b/core/src/main/kotlin/net/corda/core/contracts/Structures.kt @@ -1,11 +1,11 @@ package net.corda.core.contracts import net.corda.core.contracts.clauses.Clause -import net.corda.core.crypto.AnonymousParty -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.flows.FlowLogicRef import net.corda.core.flows.FlowLogicRefFactory +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import net.corda.core.node.services.ServiceType import net.corda.core.serialization.* import net.corda.core.transactions.TransactionBuilder diff --git a/core/src/main/kotlin/net/corda/core/contracts/TransactionTypes.kt b/core/src/main/kotlin/net/corda/core/contracts/TransactionTypes.kt index 7e3f42bdab..bac9fbde9d 100644 --- a/core/src/main/kotlin/net/corda/core/contracts/TransactionTypes.kt +++ b/core/src/main/kotlin/net/corda/core/contracts/TransactionTypes.kt @@ -1,6 +1,6 @@ package net.corda.core.contracts -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import net.corda.core.transactions.LedgerTransaction import net.corda.core.transactions.TransactionBuilder diff --git a/core/src/main/kotlin/net/corda/core/contracts/TransactionVerification.kt b/core/src/main/kotlin/net/corda/core/contracts/TransactionVerification.kt index 0a9ecd1edd..8ad833d7af 100644 --- a/core/src/main/kotlin/net/corda/core/contracts/TransactionVerification.kt +++ b/core/src/main/kotlin/net/corda/core/contracts/TransactionVerification.kt @@ -1,6 +1,6 @@ package net.corda.core.contracts -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.SecureHash import net.corda.core.flows.FlowException import net.corda.core.serialization.CordaSerializable diff --git a/core/src/main/kotlin/net/corda/core/crypto/CryptoUtils.kt b/core/src/main/kotlin/net/corda/core/crypto/CryptoUtils.kt index f8f3d6a384..69fe06fd43 100644 --- a/core/src/main/kotlin/net/corda/core/crypto/CryptoUtils.kt +++ b/core/src/main/kotlin/net/corda/core/crypto/CryptoUtils.kt @@ -2,6 +2,7 @@ package net.corda.core.crypto +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import net.corda.core.serialization.OpaqueBytes import net.i2p.crypto.eddsa.EdDSAPublicKey diff --git a/core/src/main/kotlin/net/corda/core/crypto/DigitalSignature.kt b/core/src/main/kotlin/net/corda/core/crypto/DigitalSignature.kt index f9967d103f..01c0a0d2be 100644 --- a/core/src/main/kotlin/net/corda/core/crypto/DigitalSignature.kt +++ b/core/src/main/kotlin/net/corda/core/crypto/DigitalSignature.kt @@ -1,5 +1,6 @@ package net.corda.core.crypto +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import net.corda.core.serialization.OpaqueBytes import java.security.InvalidKeyException diff --git a/core/src/main/kotlin/net/corda/core/crypto/Party.kt b/core/src/main/kotlin/net/corda/core/crypto/Party.kt index 97be9e9e24..883dff284c 100644 --- a/core/src/main/kotlin/net/corda/core/crypto/Party.kt +++ b/core/src/main/kotlin/net/corda/core/crypto/Party.kt @@ -1,33 +1,7 @@ package net.corda.core.crypto -import net.corda.core.contracts.PartyAndReference -import net.corda.core.serialization.OpaqueBytes import org.bouncycastle.asn1.x500.X500Name import java.security.PublicKey -/** - * The [Party] class represents an entity on the network, which is typically identified by a legal [name] and public key - * that it can sign transactions under. As parties may use multiple keys for signing and, for example, have offline backup - * keys, the "public key" of a party can be represented by a composite construct – a [CompositeKey], which combines multiple - * cryptographic public key primitives into a tree structure. - * - * For example: Alice has two key pairs (pub1/priv1 and pub2/priv2), and wants to be able to sign transactions with either of them. - * Her advertised [Party] then has a legal X.500 [name] "CN=Alice Corp,O=Alice Corp,L=London,C=UK" and an [owningKey] - * "pub1 or pub2". - * - * [Party] is also used for service identities. E.g. Alice may also be running an interest rate oracle on her Corda node, - * which requires a separate signing key (and an identifying name). Services can also be distributed – run by a coordinated - * cluster of Corda nodes. A [Party] representing a distributed service will use a composite key containing all - * individual cluster nodes' public keys. Each of the nodes in the cluster will advertise the same group [Party]. - * - * Note that equality is based solely on the owning key. - * - * @see CompositeKey - */ -class Party(val name: X500Name, owningKey: PublicKey) : AbstractParty(owningKey) { - override fun toAnonymous(): AnonymousParty = AnonymousParty(owningKey) - override fun toString() = "${owningKey.toBase58String()} ($name)" - override fun nameOrNull(): X500Name? = name - - override fun ref(bytes: OpaqueBytes): PartyAndReference = PartyAndReference(this.toAnonymous(), bytes) -} +@Deprecated("Party has moved to identity package", ReplaceWith("net.corda.core.identity.Party")) +class Party(name: X500Name, owningKey: PublicKey) : net.corda.core.identity.Party(name, owningKey) \ No newline at end of file diff --git a/core/src/main/kotlin/net/corda/core/flows/FlowLogic.kt b/core/src/main/kotlin/net/corda/core/flows/FlowLogic.kt index 2866a98c01..1fe15cd1f7 100644 --- a/core/src/main/kotlin/net/corda/core/flows/FlowLogic.kt +++ b/core/src/main/kotlin/net/corda/core/flows/FlowLogic.kt @@ -1,8 +1,8 @@ package net.corda.core.flows import co.paralleluniverse.fibers.Suspendable -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash +import net.corda.core.identity.Party import net.corda.core.node.ServiceHub import net.corda.core.transactions.SignedTransaction import net.corda.core.utilities.ProgressTracker diff --git a/core/src/main/kotlin/net/corda/core/flows/FlowStateMachine.kt b/core/src/main/kotlin/net/corda/core/flows/FlowStateMachine.kt index 398c46c7be..b4d2de2817 100644 --- a/core/src/main/kotlin/net/corda/core/flows/FlowStateMachine.kt +++ b/core/src/main/kotlin/net/corda/core/flows/FlowStateMachine.kt @@ -3,8 +3,8 @@ package net.corda.core.flows import co.paralleluniverse.fibers.Suspendable import com.google.common.util.concurrent.ListenableFuture import net.corda.core.contracts.ScheduledStateRef -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash +import net.corda.core.identity.Party import net.corda.core.node.ServiceHub import net.corda.core.serialization.CordaSerializable import net.corda.core.transactions.SignedTransaction diff --git a/core/src/main/kotlin/net/corda/core/crypto/AbstractParty.kt b/core/src/main/kotlin/net/corda/core/identity/AbstractParty.kt similarity index 96% rename from core/src/main/kotlin/net/corda/core/crypto/AbstractParty.kt rename to core/src/main/kotlin/net/corda/core/identity/AbstractParty.kt index 7a4249af62..9f90a5267a 100644 --- a/core/src/main/kotlin/net/corda/core/crypto/AbstractParty.kt +++ b/core/src/main/kotlin/net/corda/core/identity/AbstractParty.kt @@ -1,4 +1,4 @@ -package net.corda.core.crypto +package net.corda.core.identity import net.corda.core.contracts.PartyAndReference import net.corda.core.serialization.CordaSerializable diff --git a/core/src/main/kotlin/net/corda/core/crypto/AnonymousParty.kt b/core/src/main/kotlin/net/corda/core/identity/AnonymousParty.kt similarity index 91% rename from core/src/main/kotlin/net/corda/core/crypto/AnonymousParty.kt rename to core/src/main/kotlin/net/corda/core/identity/AnonymousParty.kt index 6b01951d2c..81c04846cc 100644 --- a/core/src/main/kotlin/net/corda/core/crypto/AnonymousParty.kt +++ b/core/src/main/kotlin/net/corda/core/identity/AnonymousParty.kt @@ -1,6 +1,7 @@ -package net.corda.core.crypto +package net.corda.core.identity import net.corda.core.contracts.PartyAndReference +import net.corda.core.crypto.toBase58String import net.corda.core.serialization.OpaqueBytes import org.bouncycastle.asn1.x500.X500Name import java.security.PublicKey diff --git a/core/src/main/kotlin/net/corda/core/identity/Party.kt b/core/src/main/kotlin/net/corda/core/identity/Party.kt new file mode 100644 index 0000000000..1016bb4352 --- /dev/null +++ b/core/src/main/kotlin/net/corda/core/identity/Party.kt @@ -0,0 +1,35 @@ +package net.corda.core.identity + +import net.corda.core.contracts.PartyAndReference +import net.corda.core.crypto.toBase58String +import net.corda.core.serialization.OpaqueBytes +import org.bouncycastle.asn1.x500.X500Name +import java.security.PublicKey + +/** + * The [Party] class represents an entity on the network, which is typically identified by a legal [name] and public key + * that it can sign transactions under. As parties may use multiple keys for signing and, for example, have offline backup + * keys, the "public key" of a party can be represented by a composite construct – a [CompositeKey], which combines multiple + * cryptographic public key primitives into a tree structure. + * + * For example: Alice has two key pairs (pub1/priv1 and pub2/priv2), and wants to be able to sign transactions with either of them. + * Her advertised [Party] then has a legal X.500 [name] "CN=Alice Corp,O=Alice Corp,L=London,C=UK" and an [owningKey] + * "pub1 or pub2". + * + * [Party] is also used for service identities. E.g. Alice may also be running an interest rate oracle on her Corda node, + * which requires a separate signing key (and an identifying name). Services can also be distributed – run by a coordinated + * cluster of Corda nodes. A [Party] representing a distributed service will use a composite key containing all + * individual cluster nodes' public keys. Each of the nodes in the cluster will advertise the same group [Party]. + * + * Note that equality is based solely on the owning key. + * + * @see CompositeKey + */ +// TODO: Remove "open" from [Party] once deprecated crypto.Party class is removed +open class Party(val name: X500Name, owningKey: PublicKey) : AbstractParty(owningKey) { + override fun toAnonymous(): AnonymousParty = AnonymousParty(owningKey) + override fun toString() = "${owningKey.toBase58String()} ($name)" + override fun nameOrNull(): X500Name? = name + + override fun ref(bytes: OpaqueBytes): PartyAndReference = PartyAndReference(this.toAnonymous(), bytes) +} diff --git a/core/src/main/kotlin/net/corda/core/messaging/CordaRPCOps.kt b/core/src/main/kotlin/net/corda/core/messaging/CordaRPCOps.kt index caa018cd6e..d5c4a02de3 100644 --- a/core/src/main/kotlin/net/corda/core/messaging/CordaRPCOps.kt +++ b/core/src/main/kotlin/net/corda/core/messaging/CordaRPCOps.kt @@ -6,11 +6,11 @@ import net.corda.core.contracts.Amount import net.corda.core.contracts.ContractState import net.corda.core.contracts.StateAndRef import net.corda.core.contracts.UpgradedContract -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.flows.FlowInitiator import net.corda.core.flows.FlowLogic import net.corda.core.flows.StateMachineRunId +import net.corda.core.identity.Party import net.corda.core.node.NodeInfo import net.corda.core.node.services.NetworkMapCache import net.corda.core.node.services.StateMachineTransactionMapping diff --git a/core/src/main/kotlin/net/corda/core/node/NodeInfo.kt b/core/src/main/kotlin/net/corda/core/node/NodeInfo.kt index 7c54fc8647..e7c542cdca 100644 --- a/core/src/main/kotlin/net/corda/core/node/NodeInfo.kt +++ b/core/src/main/kotlin/net/corda/core/node/NodeInfo.kt @@ -1,6 +1,6 @@ package net.corda.core.node -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.messaging.SingleMessageRecipient import net.corda.core.node.services.ServiceInfo import net.corda.core.node.services.ServiceType diff --git a/core/src/main/kotlin/net/corda/core/node/PluginServiceHub.kt b/core/src/main/kotlin/net/corda/core/node/PluginServiceHub.kt index 6f40e356fa..b6ead1d051 100644 --- a/core/src/main/kotlin/net/corda/core/node/PluginServiceHub.kt +++ b/core/src/main/kotlin/net/corda/core/node/PluginServiceHub.kt @@ -1,7 +1,7 @@ package net.corda.core.node -import net.corda.core.crypto.Party import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party /** * A service hub to be used by the [CordaPluginRegistry] diff --git a/core/src/main/kotlin/net/corda/core/node/services/IdentityService.kt b/core/src/main/kotlin/net/corda/core/node/services/IdentityService.kt index 5342b98006..61fb00b6b3 100644 --- a/core/src/main/kotlin/net/corda/core/node/services/IdentityService.kt +++ b/core/src/main/kotlin/net/corda/core/node/services/IdentityService.kt @@ -1,8 +1,8 @@ package net.corda.core.node.services import net.corda.core.contracts.PartyAndReference -import net.corda.core.crypto.AnonymousParty -import net.corda.core.crypto.Party +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import org.bouncycastle.asn1.x500.X500Name import java.security.PublicKey diff --git a/core/src/main/kotlin/net/corda/core/node/services/NetworkMapCache.kt b/core/src/main/kotlin/net/corda/core/node/services/NetworkMapCache.kt index 7cbcdbc0ec..027383031d 100644 --- a/core/src/main/kotlin/net/corda/core/node/services/NetworkMapCache.kt +++ b/core/src/main/kotlin/net/corda/core/node/services/NetworkMapCache.kt @@ -2,7 +2,7 @@ package net.corda.core.node.services import com.google.common.util.concurrent.ListenableFuture import net.corda.core.contracts.Contract -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.node.NodeInfo import net.corda.core.randomOrNull import net.corda.core.serialization.CordaSerializable diff --git a/core/src/main/kotlin/net/corda/core/node/services/PartyInfo.kt b/core/src/main/kotlin/net/corda/core/node/services/PartyInfo.kt index fc7cac1f05..e7ec60dd6f 100644 --- a/core/src/main/kotlin/net/corda/core/node/services/PartyInfo.kt +++ b/core/src/main/kotlin/net/corda/core/node/services/PartyInfo.kt @@ -1,6 +1,6 @@ package net.corda.core.node.services -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.node.NodeInfo import net.corda.core.node.ServiceEntry diff --git a/core/src/main/kotlin/net/corda/core/node/services/Services.kt b/core/src/main/kotlin/net/corda/core/node/services/Services.kt index 14c6e98c16..c29f534a2e 100644 --- a/core/src/main/kotlin/net/corda/core/node/services/Services.kt +++ b/core/src/main/kotlin/net/corda/core/node/services/Services.kt @@ -5,6 +5,8 @@ import com.google.common.util.concurrent.ListenableFuture import net.corda.core.contracts.* import net.corda.core.crypto.* import net.corda.core.flows.FlowException +import net.corda.core.identity.AbstractParty +import net.corda.core.identity.Party import net.corda.core.node.services.vault.PageSpecification import net.corda.core.node.services.vault.QueryCriteria import net.corda.core.node.services.vault.Sort diff --git a/core/src/main/kotlin/net/corda/core/node/services/UniquenessProvider.kt b/core/src/main/kotlin/net/corda/core/node/services/UniquenessProvider.kt index f0b512e166..53ca51ef12 100644 --- a/core/src/main/kotlin/net/corda/core/node/services/UniquenessProvider.kt +++ b/core/src/main/kotlin/net/corda/core/node/services/UniquenessProvider.kt @@ -1,8 +1,8 @@ package net.corda.core.node.services import net.corda.core.contracts.StateRef -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable /** diff --git a/core/src/main/kotlin/net/corda/core/serialization/Kryo.kt b/core/src/main/kotlin/net/corda/core/serialization/Kryo.kt index 8a9db4ea35..8eba57307d 100644 --- a/core/src/main/kotlin/net/corda/core/serialization/Kryo.kt +++ b/core/src/main/kotlin/net/corda/core/serialization/Kryo.kt @@ -9,6 +9,7 @@ import com.esotericsoftware.kryo.util.MapReferenceResolver import com.google.common.annotations.VisibleForTesting import net.corda.core.contracts.* import net.corda.core.crypto.* +import net.corda.core.identity.Party import net.corda.core.node.AttachmentsClassLoader import net.corda.core.transactions.WireTransaction import net.corda.core.utilities.LazyPool diff --git a/core/src/main/kotlin/net/corda/core/transactions/BaseTransaction.kt b/core/src/main/kotlin/net/corda/core/transactions/BaseTransaction.kt index 080c54ec42..61010282e8 100644 --- a/core/src/main/kotlin/net/corda/core/transactions/BaseTransaction.kt +++ b/core/src/main/kotlin/net/corda/core/transactions/BaseTransaction.kt @@ -1,7 +1,7 @@ package net.corda.core.transactions import net.corda.core.contracts.* -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import java.security.PublicKey import java.util.* diff --git a/core/src/main/kotlin/net/corda/core/transactions/LedgerTransaction.kt b/core/src/main/kotlin/net/corda/core/transactions/LedgerTransaction.kt index 60f09ec6f9..4665387c7d 100644 --- a/core/src/main/kotlin/net/corda/core/transactions/LedgerTransaction.kt +++ b/core/src/main/kotlin/net/corda/core/transactions/LedgerTransaction.kt @@ -1,8 +1,8 @@ package net.corda.core.transactions import net.corda.core.contracts.* -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import java.security.PublicKey diff --git a/core/src/main/kotlin/net/corda/core/transactions/MerkleTransaction.kt b/core/src/main/kotlin/net/corda/core/transactions/MerkleTransaction.kt index 9513f46f8d..952544be36 100644 --- a/core/src/main/kotlin/net/corda/core/transactions/MerkleTransaction.kt +++ b/core/src/main/kotlin/net/corda/core/transactions/MerkleTransaction.kt @@ -2,6 +2,7 @@ package net.corda.core.transactions import net.corda.core.contracts.* import net.corda.core.crypto.* +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import net.corda.core.serialization.p2PKryo import net.corda.core.serialization.serialize diff --git a/core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt b/core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt index dbbd0a4856..19396b1e01 100644 --- a/core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt +++ b/core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt @@ -4,6 +4,7 @@ import co.paralleluniverse.strands.Strand import net.corda.core.contracts.* import net.corda.core.crypto.* import net.corda.core.flows.FlowStateMachine +import net.corda.core.identity.Party import net.corda.core.serialization.serialize import java.security.KeyPair import java.security.PublicKey diff --git a/core/src/main/kotlin/net/corda/core/transactions/WireTransaction.kt b/core/src/main/kotlin/net/corda/core/transactions/WireTransaction.kt index 83c90b9e97..09e2b9218b 100644 --- a/core/src/main/kotlin/net/corda/core/transactions/WireTransaction.kt +++ b/core/src/main/kotlin/net/corda/core/transactions/WireTransaction.kt @@ -3,8 +3,8 @@ package net.corda.core.transactions import com.esotericsoftware.kryo.pool.KryoPool import net.corda.core.contracts.* import net.corda.core.crypto.MerkleTree -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash +import net.corda.core.identity.Party import net.corda.core.indexOfOrThrow import net.corda.core.node.ServicesForResolution import net.corda.core.serialization.SerializedBytes diff --git a/core/src/main/kotlin/net/corda/core/utilities/TestConstants.kt b/core/src/main/kotlin/net/corda/core/utilities/TestConstants.kt index 1b2fae92e2..1084808a4a 100644 --- a/core/src/main/kotlin/net/corda/core/utilities/TestConstants.kt +++ b/core/src/main/kotlin/net/corda/core/utilities/TestConstants.kt @@ -3,6 +3,7 @@ package net.corda.core.utilities import net.corda.core.crypto.* +import net.corda.core.identity.Party import org.bouncycastle.asn1.x500.X500Name import java.math.BigInteger import java.security.KeyPair diff --git a/core/src/main/kotlin/net/corda/flows/AbstractStateReplacementFlow.kt b/core/src/main/kotlin/net/corda/flows/AbstractStateReplacementFlow.kt index 601ff3df33..fccf706b97 100644 --- a/core/src/main/kotlin/net/corda/flows/AbstractStateReplacementFlow.kt +++ b/core/src/main/kotlin/net/corda/flows/AbstractStateReplacementFlow.kt @@ -7,6 +7,7 @@ import net.corda.core.contracts.StateRef import net.corda.core.crypto.* import net.corda.core.flows.FlowException import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import net.corda.core.transactions.SignedTransaction import net.corda.core.transactions.WireTransaction diff --git a/core/src/main/kotlin/net/corda/flows/BroadcastTransactionFlow.kt b/core/src/main/kotlin/net/corda/flows/BroadcastTransactionFlow.kt index 1bfd7a2b79..140da37489 100644 --- a/core/src/main/kotlin/net/corda/flows/BroadcastTransactionFlow.kt +++ b/core/src/main/kotlin/net/corda/flows/BroadcastTransactionFlow.kt @@ -1,9 +1,9 @@ package net.corda.flows import co.paralleluniverse.fibers.Suspendable -import net.corda.core.crypto.Party import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import net.corda.core.transactions.SignedTransaction diff --git a/core/src/main/kotlin/net/corda/flows/FetchAttachmentsFlow.kt b/core/src/main/kotlin/net/corda/flows/FetchAttachmentsFlow.kt index 096d5bc726..3ca8c8f695 100644 --- a/core/src/main/kotlin/net/corda/flows/FetchAttachmentsFlow.kt +++ b/core/src/main/kotlin/net/corda/flows/FetchAttachmentsFlow.kt @@ -2,10 +2,10 @@ package net.corda.flows import net.corda.core.contracts.AbstractAttachment import net.corda.core.contracts.Attachment -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.crypto.sha256 import net.corda.core.flows.InitiatingFlow +import net.corda.core.identity.Party import net.corda.core.serialization.SerializationToken import net.corda.core.serialization.SerializeAsToken import net.corda.core.serialization.SerializeAsTokenContext diff --git a/core/src/main/kotlin/net/corda/flows/FetchDataFlow.kt b/core/src/main/kotlin/net/corda/flows/FetchDataFlow.kt index 5655b14beb..efbe720210 100644 --- a/core/src/main/kotlin/net/corda/flows/FetchDataFlow.kt +++ b/core/src/main/kotlin/net/corda/flows/FetchDataFlow.kt @@ -2,10 +2,10 @@ package net.corda.flows import co.paralleluniverse.fibers.Suspendable import net.corda.core.contracts.NamedByHash -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.flows.FlowException import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import net.corda.core.utilities.UntrustworthyData import net.corda.core.utilities.unwrap diff --git a/core/src/main/kotlin/net/corda/flows/FetchTransactionsFlow.kt b/core/src/main/kotlin/net/corda/flows/FetchTransactionsFlow.kt index 96f04477e3..6e9c1055a8 100644 --- a/core/src/main/kotlin/net/corda/flows/FetchTransactionsFlow.kt +++ b/core/src/main/kotlin/net/corda/flows/FetchTransactionsFlow.kt @@ -1,8 +1,8 @@ package net.corda.flows -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.flows.InitiatingFlow +import net.corda.core.identity.Party import net.corda.core.transactions.SignedTransaction /** diff --git a/core/src/main/kotlin/net/corda/flows/FinalityFlow.kt b/core/src/main/kotlin/net/corda/flows/FinalityFlow.kt index 319274f10a..0d1168f42f 100644 --- a/core/src/main/kotlin/net/corda/flows/FinalityFlow.kt +++ b/core/src/main/kotlin/net/corda/flows/FinalityFlow.kt @@ -4,9 +4,9 @@ import co.paralleluniverse.fibers.Suspendable import net.corda.core.contracts.ContractState import net.corda.core.contracts.StateRef import net.corda.core.contracts.TransactionState -import net.corda.core.crypto.Party import net.corda.core.crypto.isFulfilledBy import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party import net.corda.core.node.ServiceHub import net.corda.core.transactions.LedgerTransaction import net.corda.core.transactions.SignedTransaction diff --git a/core/src/main/kotlin/net/corda/flows/NotaryChangeFlow.kt b/core/src/main/kotlin/net/corda/flows/NotaryChangeFlow.kt index ce2985d128..4a80599021 100644 --- a/core/src/main/kotlin/net/corda/flows/NotaryChangeFlow.kt +++ b/core/src/main/kotlin/net/corda/flows/NotaryChangeFlow.kt @@ -1,8 +1,8 @@ package net.corda.flows import net.corda.core.contracts.* -import net.corda.core.crypto.Party import net.corda.core.flows.InitiatingFlow +import net.corda.core.identity.Party import net.corda.core.transactions.SignedTransaction import net.corda.core.transactions.TransactionBuilder import net.corda.core.utilities.ProgressTracker diff --git a/core/src/main/kotlin/net/corda/flows/NotaryFlow.kt b/core/src/main/kotlin/net/corda/flows/NotaryFlow.kt index ca2c4e4024..58819c9c7b 100644 --- a/core/src/main/kotlin/net/corda/flows/NotaryFlow.kt +++ b/core/src/main/kotlin/net/corda/flows/NotaryFlow.kt @@ -7,6 +7,7 @@ import net.corda.core.crypto.* import net.corda.core.flows.FlowException import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow +import net.corda.core.identity.Party import net.corda.core.node.services.TimestampChecker import net.corda.core.node.services.UniquenessException import net.corda.core.node.services.UniquenessProvider diff --git a/core/src/main/kotlin/net/corda/flows/ResolveTransactionsFlow.kt b/core/src/main/kotlin/net/corda/flows/ResolveTransactionsFlow.kt index 69245c7186..1b6d3d4b91 100644 --- a/core/src/main/kotlin/net/corda/flows/ResolveTransactionsFlow.kt +++ b/core/src/main/kotlin/net/corda/flows/ResolveTransactionsFlow.kt @@ -2,10 +2,10 @@ package net.corda.flows import co.paralleluniverse.fibers.Suspendable import net.corda.core.checkedAdd -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.flows.FlowLogic import net.corda.core.getOrThrow +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import net.corda.core.transactions.LedgerTransaction import net.corda.core.transactions.SignedTransaction diff --git a/core/src/main/kotlin/net/corda/flows/TwoPartyDealFlow.kt b/core/src/main/kotlin/net/corda/flows/TwoPartyDealFlow.kt index a0e86838c2..6284955239 100644 --- a/core/src/main/kotlin/net/corda/flows/TwoPartyDealFlow.kt +++ b/core/src/main/kotlin/net/corda/flows/TwoPartyDealFlow.kt @@ -4,6 +4,8 @@ import co.paralleluniverse.fibers.Suspendable import net.corda.core.contracts.DealState import net.corda.core.crypto.* import net.corda.core.flows.FlowLogic +import net.corda.core.identity.AbstractParty +import net.corda.core.identity.Party import net.corda.core.node.NodeInfo import net.corda.core.seconds import net.corda.core.serialization.CordaSerializable diff --git a/core/src/main/kotlin/net/corda/flows/TxKeyFlowUtilities.kt b/core/src/main/kotlin/net/corda/flows/TxKeyFlowUtilities.kt index 33db142cc2..4fa07b2e44 100644 --- a/core/src/main/kotlin/net/corda/flows/TxKeyFlowUtilities.kt +++ b/core/src/main/kotlin/net/corda/flows/TxKeyFlowUtilities.kt @@ -1,8 +1,8 @@ package net.corda.flows import co.paralleluniverse.fibers.Suspendable -import net.corda.core.crypto.Party import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import net.corda.core.utilities.unwrap import java.security.PublicKey diff --git a/core/src/main/resources/net/corda/core/node/isolated.jar b/core/src/main/resources/net/corda/core/node/isolated.jar index 450d5f0cdc..1d6808b4b0 100644 Binary files a/core/src/main/resources/net/corda/core/node/isolated.jar and b/core/src/main/resources/net/corda/core/node/isolated.jar differ diff --git a/core/src/test/java/net/corda/core/flows/FlowsInJavaTest.java b/core/src/test/java/net/corda/core/flows/FlowsInJavaTest.java index 0bb4c9d770..7f2d31ccaa 100644 --- a/core/src/test/java/net/corda/core/flows/FlowsInJavaTest.java +++ b/core/src/test/java/net/corda/core/flows/FlowsInJavaTest.java @@ -1,7 +1,7 @@ package net.corda.core.flows; import co.paralleluniverse.fibers.*; -import net.corda.core.crypto.*; +import net.corda.core.identity.Party; import net.corda.testing.node.*; import org.junit.*; diff --git a/core/src/test/kotlin/net/corda/core/contracts/TransactionTests.kt b/core/src/test/kotlin/net/corda/core/contracts/TransactionTests.kt index a38c156ea2..c4a777948c 100644 --- a/core/src/test/kotlin/net/corda/core/contracts/TransactionTests.kt +++ b/core/src/test/kotlin/net/corda/core/contracts/TransactionTests.kt @@ -2,20 +2,15 @@ package net.corda.core.contracts import net.corda.contracts.asset.DUMMY_CASH_ISSUER_KEY import net.corda.core.crypto.CompositeKey -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.crypto.generateKeyPair import net.corda.core.crypto.sign +import net.corda.core.identity.Party import net.corda.core.serialization.SerializedBytes import net.corda.core.transactions.LedgerTransaction import net.corda.core.transactions.SignedTransaction import net.corda.core.transactions.WireTransaction -import net.corda.core.utilities.ALICE -import net.corda.core.utilities.BOB -import net.corda.core.utilities.DUMMY_KEY_1 -import net.corda.core.utilities.DUMMY_KEY_2 -import net.corda.core.utilities.DUMMY_NOTARY -import net.corda.core.utilities.DUMMY_NOTARY_KEY +import net.corda.core.utilities.* import net.corda.testing.ALICE_PUBKEY import org.junit.Test import java.security.KeyPair diff --git a/core/src/test/kotlin/net/corda/core/crypto/PartialMerkleTreeTest.kt b/core/src/test/kotlin/net/corda/core/crypto/PartialMerkleTreeTest.kt index 1200d3c8be..475bb65ee7 100644 --- a/core/src/test/kotlin/net/corda/core/crypto/PartialMerkleTreeTest.kt +++ b/core/src/test/kotlin/net/corda/core/crypto/PartialMerkleTreeTest.kt @@ -5,6 +5,7 @@ import com.esotericsoftware.kryo.KryoException import net.corda.contracts.asset.Cash import net.corda.core.contracts.* import net.corda.core.crypto.SecureHash.Companion.zeroHash +import net.corda.core.identity.Party import net.corda.core.serialization.p2PKryo import net.corda.core.serialization.serialize import net.corda.core.transactions.WireTransaction diff --git a/core/src/test/kotlin/net/corda/core/flows/ContractUpgradeFlowTest.kt b/core/src/test/kotlin/net/corda/core/flows/ContractUpgradeFlowTest.kt index 850d5d2efd..738802dbf2 100644 --- a/core/src/test/kotlin/net/corda/core/flows/ContractUpgradeFlowTest.kt +++ b/core/src/test/kotlin/net/corda/core/flows/ContractUpgradeFlowTest.kt @@ -2,9 +2,9 @@ package net.corda.core.flows import net.corda.contracts.asset.Cash import net.corda.core.contracts.* -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.getOrThrow +import net.corda.core.identity.Party import net.corda.core.messaging.CordaRPCOps import net.corda.core.messaging.startFlow import net.corda.core.node.services.unconsumedStates diff --git a/core/src/test/kotlin/net/corda/core/flows/ResolveTransactionsFlowTest.kt b/core/src/test/kotlin/net/corda/core/flows/ResolveTransactionsFlowTest.kt index 7408dd54a4..71eb351cbc 100644 --- a/core/src/test/kotlin/net/corda/core/flows/ResolveTransactionsFlowTest.kt +++ b/core/src/test/kotlin/net/corda/core/flows/ResolveTransactionsFlowTest.kt @@ -2,9 +2,9 @@ package net.corda.core.flows import net.corda.core.contracts.DummyContract import net.corda.core.crypto.NullSignature -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.getOrThrow +import net.corda.core.identity.Party import net.corda.core.serialization.opaque import net.corda.core.transactions.SignedTransaction import net.corda.core.utilities.DUMMY_NOTARY_KEY diff --git a/core/src/test/kotlin/net/corda/core/flows/TxKeyFlow.kt b/core/src/test/kotlin/net/corda/core/flows/TxKeyFlow.kt index f7bf170841..78f18c3171 100644 --- a/core/src/test/kotlin/net/corda/core/flows/TxKeyFlow.kt +++ b/core/src/test/kotlin/net/corda/core/flows/TxKeyFlow.kt @@ -1,7 +1,7 @@ package net.corda.core.flows import co.paralleluniverse.fibers.Suspendable -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.utilities.ProgressTracker import net.corda.flows.TxKeyFlowUtilities import java.security.PublicKey diff --git a/core/src/test/kotlin/net/corda/core/flows/TxKeyFlowUtilitiesTests.kt b/core/src/test/kotlin/net/corda/core/flows/TxKeyFlowUtilitiesTests.kt index 40595a0b55..88084bcb9e 100644 --- a/core/src/test/kotlin/net/corda/core/flows/TxKeyFlowUtilitiesTests.kt +++ b/core/src/test/kotlin/net/corda/core/flows/TxKeyFlowUtilitiesTests.kt @@ -1,6 +1,6 @@ package net.corda.core.flows -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.utilities.ALICE import net.corda.core.utilities.BOB import net.corda.core.utilities.DUMMY_NOTARY diff --git a/core/src/test/kotlin/net/corda/core/crypto/PartyTest.kt b/core/src/test/kotlin/net/corda/core/identity/PartyTest.kt similarity index 90% rename from core/src/test/kotlin/net/corda/core/crypto/PartyTest.kt rename to core/src/test/kotlin/net/corda/core/identity/PartyTest.kt index 6f121e2cec..37fe78f1ba 100644 --- a/core/src/test/kotlin/net/corda/core/crypto/PartyTest.kt +++ b/core/src/test/kotlin/net/corda/core/identity/PartyTest.kt @@ -1,5 +1,6 @@ -package net.corda.core.crypto +package net.corda.core.identity +import net.corda.core.crypto.entropyToKeyPair import net.corda.core.utilities.ALICE import org.junit.Test import java.math.BigInteger diff --git a/core/src/test/kotlin/net/corda/core/node/AttachmentClassLoaderTests.kt b/core/src/test/kotlin/net/corda/core/node/AttachmentClassLoaderTests.kt index cfa2752ad9..33db2d08e2 100644 --- a/core/src/test/kotlin/net/corda/core/node/AttachmentClassLoaderTests.kt +++ b/core/src/test/kotlin/net/corda/core/node/AttachmentClassLoaderTests.kt @@ -4,8 +4,8 @@ import com.esotericsoftware.kryo.Kryo import com.nhaarman.mockito_kotlin.mock import com.nhaarman.mockito_kotlin.whenever import net.corda.core.contracts.* -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash +import net.corda.core.identity.Party import net.corda.core.node.services.AttachmentStorage import net.corda.core.node.services.StorageService import net.corda.core.serialization.* @@ -24,7 +24,10 @@ import java.net.URLClassLoader import java.security.PublicKey import java.util.jar.JarOutputStream import java.util.zip.ZipEntry -import kotlin.test.* +import kotlin.test.assertEquals +import kotlin.test.assertFailsWith +import kotlin.test.assertNotNull +import kotlin.test.assertTrue interface DummyContractBackdoor { fun generateInitial(owner: PartyAndReference, magicNumber: Int, notary: Party): TransactionBuilder diff --git a/core/src/test/kotlin/net/corda/core/serialization/AttachmentSerializationTest.kt b/core/src/test/kotlin/net/corda/core/serialization/AttachmentSerializationTest.kt index 135f9a0704..dba3d63d17 100644 --- a/core/src/test/kotlin/net/corda/core/serialization/AttachmentSerializationTest.kt +++ b/core/src/test/kotlin/net/corda/core/serialization/AttachmentSerializationTest.kt @@ -2,11 +2,11 @@ package net.corda.core.serialization import co.paralleluniverse.fibers.Suspendable import net.corda.core.contracts.Attachment -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow import net.corda.core.getOrThrow +import net.corda.core.identity.Party import net.corda.core.messaging.RPCOps import net.corda.core.messaging.SingleMessageRecipient import net.corda.core.node.services.ServiceInfo diff --git a/core/src/test/kotlin/net/corda/core/testing/Generators.kt b/core/src/test/kotlin/net/corda/core/testing/Generators.kt index e346c33a8f..dabc585926 100644 --- a/core/src/test/kotlin/net/corda/core/testing/Generators.kt +++ b/core/src/test/kotlin/net/corda/core/testing/Generators.kt @@ -6,6 +6,8 @@ import com.pholser.junit.quickcheck.generator.java.util.ArrayListGenerator import com.pholser.junit.quickcheck.random.SourceOfRandomness import net.corda.core.contracts.* import net.corda.core.crypto.* +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import net.corda.core.serialization.OpaqueBytes import net.corda.testing.getTestX509Name import org.bouncycastle.asn1.x500.X500Name diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index f3a98c58f0..967834c1b1 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -29,6 +29,19 @@ UNRELEASED * ``FlowLogic.getCounterpartyMarker`` is no longer used and been deprecated for removal. If you were using this to manage multiple independent message streams with the same party in the same flow then use sub-flows instead. + + * There are major changes to the ``Party`` class as part of confidential identities: + + * ``Party`` has moved to the ``net.corda.core.identity`` package; there is a deprecated class in its place for + backwards compatibility, but it will be removed in a future release and developers should move to the new class as soon + as possible. + * There is a new ``AbstractParty`` superclass to ``Party``, which contains just the public key. A new class + ``AnonymousParty`` has been added, which is intended to be used in place of ``Party`` or ``PublicKey`` in contract + state objects. The exception to this is where the party in a contract state is intended to be well known, such as + issuer of a ``Cash`` state. + * Names of parties are now stored as a ``X500Name`` rather than a ``String``, to correctly enforce basic structure of the + name. As a result all node legal names must now be structured as X.500 distinguished names. + * The ``InitiatingFlow`` annotation also has an integer ``version`` property which assigns the initiating flow a version number, defaulting to 1 if it's specified. The flow version is included in the flow session request and the counterparty will only respond and start their own flow if the version number matches to the one they've registered with. At some diff --git a/docs/source/example-code/src/main/kotlin/net/corda/docs/FxTransactionBuildTutorial.kt b/docs/source/example-code/src/main/kotlin/net/corda/docs/FxTransactionBuildTutorial.kt index 59b8d07a47..e33319c094 100644 --- a/docs/source/example-code/src/main/kotlin/net/corda/docs/FxTransactionBuildTutorial.kt +++ b/docs/source/example-code/src/main/kotlin/net/corda/docs/FxTransactionBuildTutorial.kt @@ -7,11 +7,11 @@ import net.corda.core.contracts.Issued import net.corda.core.contracts.StateAndRef import net.corda.core.contracts.TransactionType import net.corda.core.crypto.DigitalSignature -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.crypto.sign import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow +import net.corda.core.identity.Party import net.corda.core.node.PluginServiceHub import net.corda.core.node.ServiceHub import net.corda.core.node.services.unconsumedStates diff --git a/docs/source/example-code/src/main/kotlin/net/corda/docs/WorkflowTransactionBuildTutorial.kt b/docs/source/example-code/src/main/kotlin/net/corda/docs/WorkflowTransactionBuildTutorial.kt index 158cf0b786..ccb6829894 100644 --- a/docs/source/example-code/src/main/kotlin/net/corda/docs/WorkflowTransactionBuildTutorial.kt +++ b/docs/source/example-code/src/main/kotlin/net/corda/docs/WorkflowTransactionBuildTutorial.kt @@ -5,6 +5,7 @@ import net.corda.core.contracts.* import net.corda.core.crypto.* import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow +import net.corda.core.identity.Party import net.corda.core.node.PluginServiceHub import net.corda.core.node.ServiceHub import net.corda.core.node.services.linearHeadsOfType diff --git a/docs/source/release-notes.rst b/docs/source/release-notes.rst index 44cbdb6345..47427afd40 100644 --- a/docs/source/release-notes.rst +++ b/docs/source/release-notes.rst @@ -10,6 +10,9 @@ We've added the ability for flows to be versioned by their CorDapp developers. T version of a flow and allows it to reject flow communication with a node which isn't using the same fact. In a future release we allow a node to have multiple versions of the same flow running to enable backwards compatibility. +There are major changes to the ``Party`` class as part of confidential identities. See :doc:`changelog` for full details. + + Milestone 11 ------------ diff --git a/experimental/src/main/kotlin/net/corda/contracts/universal/Arrangement.kt b/experimental/src/main/kotlin/net/corda/contracts/universal/Arrangement.kt index 3969736763..0d168828ce 100644 --- a/experimental/src/main/kotlin/net/corda/contracts/universal/Arrangement.kt +++ b/experimental/src/main/kotlin/net/corda/contracts/universal/Arrangement.kt @@ -1,7 +1,7 @@ package net.corda.contracts.universal import net.corda.core.contracts.Frequency -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import java.math.BigDecimal import java.time.LocalDate diff --git a/experimental/src/main/kotlin/net/corda/contracts/universal/ContractFunctions.kt b/experimental/src/main/kotlin/net/corda/contracts/universal/ContractFunctions.kt index 63b816c111..865240c09b 100644 --- a/experimental/src/main/kotlin/net/corda/contracts/universal/ContractFunctions.kt +++ b/experimental/src/main/kotlin/net/corda/contracts/universal/ContractFunctions.kt @@ -1,6 +1,6 @@ package net.corda.contracts.universal -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import java.math.BigDecimal import java.util.* diff --git a/experimental/src/main/kotlin/net/corda/contracts/universal/Literal.kt b/experimental/src/main/kotlin/net/corda/contracts/universal/Literal.kt index 81af567385..1e05ae571c 100644 --- a/experimental/src/main/kotlin/net/corda/contracts/universal/Literal.kt +++ b/experimental/src/main/kotlin/net/corda/contracts/universal/Literal.kt @@ -2,7 +2,7 @@ package net.corda.contracts.universal import net.corda.core.contracts.BusinessCalendar import net.corda.core.contracts.Frequency -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import java.math.BigDecimal import java.time.LocalDate import java.util.* diff --git a/experimental/src/main/kotlin/net/corda/contracts/universal/Perceivable.kt b/experimental/src/main/kotlin/net/corda/contracts/universal/Perceivable.kt index 1b850c23f3..e28831228d 100644 --- a/experimental/src/main/kotlin/net/corda/contracts/universal/Perceivable.kt +++ b/experimental/src/main/kotlin/net/corda/contracts/universal/Perceivable.kt @@ -2,7 +2,7 @@ package net.corda.contracts.universal import net.corda.core.contracts.BusinessCalendar import net.corda.core.contracts.Tenor -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import java.lang.reflect.Type import java.math.BigDecimal diff --git a/experimental/src/main/kotlin/net/corda/contracts/universal/PrettyPrint.kt b/experimental/src/main/kotlin/net/corda/contracts/universal/PrettyPrint.kt index 2bca789552..efb1e499e0 100644 --- a/experimental/src/main/kotlin/net/corda/contracts/universal/PrettyPrint.kt +++ b/experimental/src/main/kotlin/net/corda/contracts/universal/PrettyPrint.kt @@ -1,8 +1,8 @@ package net.corda.contracts.universal -import net.corda.core.crypto.Party import net.corda.core.crypto.commonName import net.corda.core.crypto.toStringShort +import net.corda.core.identity.Party import java.math.BigDecimal import java.security.PublicKey import java.time.Instant diff --git a/experimental/src/main/kotlin/net/corda/contracts/universal/UniversalContract.kt b/experimental/src/main/kotlin/net/corda/contracts/universal/UniversalContract.kt index 82a1385816..24f05f7ff3 100644 --- a/experimental/src/main/kotlin/net/corda/contracts/universal/UniversalContract.kt +++ b/experimental/src/main/kotlin/net/corda/contracts/universal/UniversalContract.kt @@ -1,8 +1,8 @@ package net.corda.contracts.universal import net.corda.core.contracts.* -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash +import net.corda.core.identity.Party import net.corda.core.transactions.TransactionBuilder import java.math.BigDecimal import java.security.PublicKey diff --git a/experimental/src/main/kotlin/net/corda/contracts/universal/Util.kt b/experimental/src/main/kotlin/net/corda/contracts/universal/Util.kt index 8b4ca6705f..a187c07d10 100644 --- a/experimental/src/main/kotlin/net/corda/contracts/universal/Util.kt +++ b/experimental/src/main/kotlin/net/corda/contracts/universal/Util.kt @@ -3,7 +3,7 @@ package net.corda.contracts.universal import com.google.common.collect.ImmutableSet import com.google.common.collect.Sets import net.corda.core.contracts.Frequency -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import java.security.PublicKey import java.time.Instant import java.time.LocalDate diff --git a/experimental/src/test/kotlin/net/corda/contracts/universal/ContractDefinition.kt b/experimental/src/test/kotlin/net/corda/contracts/universal/ContractDefinition.kt index 8e6ea94d41..057c867490 100644 --- a/experimental/src/test/kotlin/net/corda/contracts/universal/ContractDefinition.kt +++ b/experimental/src/test/kotlin/net/corda/contracts/universal/ContractDefinition.kt @@ -1,13 +1,14 @@ package net.corda.contracts.universal -import net.corda.core.crypto.Party import net.corda.core.crypto.generateKeyPair +import net.corda.core.identity.Party import net.corda.core.utilities.ALICE import net.corda.testing.MEGA_CORP import net.corda.testing.MINI_CORP import org.junit.Test import java.util.* -import kotlin.test.* +import kotlin.test.assertEquals +import kotlin.test.assertTrue // Test parties val acmeCorp = Party(ALICE.name, generateKeyPair().public) diff --git a/finance/isolated/src/main/kotlin/net/corda/contracts/AnotherDummyContract.kt b/finance/isolated/src/main/kotlin/net/corda/contracts/AnotherDummyContract.kt index 6a2a60e846..d61a903a38 100644 --- a/finance/isolated/src/main/kotlin/net/corda/contracts/AnotherDummyContract.kt +++ b/finance/isolated/src/main/kotlin/net/corda/contracts/AnotherDummyContract.kt @@ -1,7 +1,7 @@ package net.corda.contracts.isolated import net.corda.core.contracts.* -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.SecureHash import net.corda.core.transactions.TransactionBuilder import java.security.PublicKey diff --git a/finance/isolated/src/main/kotlin/net/corda/core/node/DummyContractBackdoor.kt b/finance/isolated/src/main/kotlin/net/corda/core/node/DummyContractBackdoor.kt index 9848e168c3..d965530bb2 100644 --- a/finance/isolated/src/main/kotlin/net/corda/core/node/DummyContractBackdoor.kt +++ b/finance/isolated/src/main/kotlin/net/corda/core/node/DummyContractBackdoor.kt @@ -2,7 +2,7 @@ package net.corda.core.node import net.corda.core.contracts.ContractState import net.corda.core.contracts.PartyAndReference -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.transactions.TransactionBuilder interface DummyContractBackdoor { diff --git a/finance/src/main/java/net/corda/contracts/JavaCommercialPaper.java b/finance/src/main/java/net/corda/contracts/JavaCommercialPaper.java index 25473367e2..a38251e24d 100644 --- a/finance/src/main/java/net/corda/contracts/JavaCommercialPaper.java +++ b/finance/src/main/java/net/corda/contracts/JavaCommercialPaper.java @@ -9,6 +9,7 @@ import net.corda.core.contracts.Contract; import net.corda.core.contracts.TransactionForContract.*; import net.corda.core.contracts.clauses.*; import net.corda.core.crypto.*; +import net.corda.core.identity.Party; import net.corda.core.node.services.*; import net.corda.core.transactions.*; import org.jetbrains.annotations.*; diff --git a/finance/src/main/kotlin/net/corda/contracts/CommercialPaper.kt b/finance/src/main/kotlin/net/corda/contracts/CommercialPaper.kt index e40c3a1e9a..5719c292d2 100644 --- a/finance/src/main/kotlin/net/corda/contracts/CommercialPaper.kt +++ b/finance/src/main/kotlin/net/corda/contracts/CommercialPaper.kt @@ -8,9 +8,9 @@ import net.corda.core.contracts.clauses.AnyOf import net.corda.core.contracts.clauses.Clause import net.corda.core.contracts.clauses.GroupClauseVerifier import net.corda.core.contracts.clauses.verifyClause -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.crypto.toBase58String +import net.corda.core.identity.Party import net.corda.core.node.services.VaultService import net.corda.core.random63BitValue import net.corda.core.schemas.MappedSchema diff --git a/finance/src/main/kotlin/net/corda/contracts/CommercialPaperLegacy.kt b/finance/src/main/kotlin/net/corda/contracts/CommercialPaperLegacy.kt index 827a1bc00e..f46d777b1d 100644 --- a/finance/src/main/kotlin/net/corda/contracts/CommercialPaperLegacy.kt +++ b/finance/src/main/kotlin/net/corda/contracts/CommercialPaperLegacy.kt @@ -4,8 +4,8 @@ import co.paralleluniverse.fibers.Suspendable import net.corda.contracts.asset.sumCashBy import net.corda.core.contracts.* import net.corda.core.crypto.NullPublicKey -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash +import net.corda.core.identity.Party import net.corda.core.node.services.VaultService import net.corda.core.transactions.TransactionBuilder import net.corda.core.utilities.Emoji diff --git a/finance/src/main/kotlin/net/corda/contracts/asset/Cash.kt b/finance/src/main/kotlin/net/corda/contracts/asset/Cash.kt index 06e148cfbf..3eb983e3d9 100644 --- a/finance/src/main/kotlin/net/corda/contracts/asset/Cash.kt +++ b/finance/src/main/kotlin/net/corda/contracts/asset/Cash.kt @@ -9,6 +9,8 @@ import net.corda.core.contracts.clauses.FirstOf import net.corda.core.contracts.clauses.GroupClauseVerifier import net.corda.core.contracts.clauses.verifyClause import net.corda.core.crypto.* +import net.corda.core.identity.AbstractParty +import net.corda.core.identity.Party import net.corda.core.schemas.MappedSchema import net.corda.core.schemas.PersistentState import net.corda.core.schemas.QueryableState diff --git a/finance/src/main/kotlin/net/corda/contracts/asset/CommodityContract.kt b/finance/src/main/kotlin/net/corda/contracts/asset/CommodityContract.kt index ca577de309..e47dd127c4 100644 --- a/finance/src/main/kotlin/net/corda/contracts/asset/CommodityContract.kt +++ b/finance/src/main/kotlin/net/corda/contracts/asset/CommodityContract.kt @@ -7,9 +7,9 @@ import net.corda.core.contracts.* import net.corda.core.contracts.clauses.AnyOf import net.corda.core.contracts.clauses.GroupClauseVerifier import net.corda.core.contracts.clauses.verifyClause -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.crypto.newSecureRandom +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import net.corda.core.transactions.TransactionBuilder import java.security.PublicKey diff --git a/finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt b/finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt index 43d5917701..ba154e2225 100644 --- a/finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt +++ b/finance/src/main/kotlin/net/corda/contracts/asset/Obligation.kt @@ -6,6 +6,9 @@ import net.corda.contracts.clause.* import net.corda.core.contracts.* import net.corda.core.contracts.clauses.* import net.corda.core.crypto.* +import net.corda.core.identity.AbstractParty +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import net.corda.core.random63BitValue import net.corda.core.serialization.CordaSerializable import net.corda.core.transactions.TransactionBuilder diff --git a/finance/src/main/kotlin/net/corda/contracts/testing/DummyDealContract.kt b/finance/src/main/kotlin/net/corda/contracts/testing/DummyDealContract.kt index 86e887b3ec..a32fe333f1 100644 --- a/finance/src/main/kotlin/net/corda/contracts/testing/DummyDealContract.kt +++ b/finance/src/main/kotlin/net/corda/contracts/testing/DummyDealContract.kt @@ -5,6 +5,8 @@ import net.corda.core.contracts.DealState import net.corda.core.contracts.TransactionForContract import net.corda.core.contracts.UniqueIdentifier import net.corda.core.crypto.* +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import net.corda.core.transactions.TransactionBuilder import java.security.PublicKey diff --git a/finance/src/main/kotlin/net/corda/contracts/testing/VaultFiller.kt b/finance/src/main/kotlin/net/corda/contracts/testing/VaultFiller.kt index 4cb790ba15..89efaa400d 100644 --- a/finance/src/main/kotlin/net/corda/contracts/testing/VaultFiller.kt +++ b/finance/src/main/kotlin/net/corda/contracts/testing/VaultFiller.kt @@ -7,7 +7,7 @@ import net.corda.contracts.asset.DUMMY_CASH_ISSUER import net.corda.contracts.asset.DUMMY_CASH_ISSUER_KEY import net.corda.core.contracts.* import net.corda.core.crypto.CompositeKey -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.node.ServiceHub import net.corda.core.node.services.Vault import net.corda.core.serialization.OpaqueBytes diff --git a/finance/src/main/kotlin/net/corda/flows/AbstractCashFlow.kt b/finance/src/main/kotlin/net/corda/flows/AbstractCashFlow.kt index 698b5fa188..7b32fd8afb 100644 --- a/finance/src/main/kotlin/net/corda/flows/AbstractCashFlow.kt +++ b/finance/src/main/kotlin/net/corda/flows/AbstractCashFlow.kt @@ -1,9 +1,9 @@ package net.corda.flows import co.paralleluniverse.fibers.Suspendable -import net.corda.core.crypto.Party import net.corda.core.flows.FlowException import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party import net.corda.core.transactions.SignedTransaction import net.corda.core.utilities.ProgressTracker diff --git a/finance/src/main/kotlin/net/corda/flows/CashExitFlow.kt b/finance/src/main/kotlin/net/corda/flows/CashExitFlow.kt index 8a42262ef6..5b5175bb8f 100644 --- a/finance/src/main/kotlin/net/corda/flows/CashExitFlow.kt +++ b/finance/src/main/kotlin/net/corda/flows/CashExitFlow.kt @@ -6,7 +6,7 @@ import net.corda.core.contracts.Amount import net.corda.core.contracts.InsufficientBalanceException import net.corda.core.contracts.TransactionType import net.corda.core.contracts.issuedBy -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.serialization.OpaqueBytes import net.corda.core.transactions.SignedTransaction import net.corda.core.transactions.TransactionBuilder diff --git a/finance/src/main/kotlin/net/corda/flows/CashFlowCommand.kt b/finance/src/main/kotlin/net/corda/flows/CashFlowCommand.kt index b79e222c8b..69fcdd91b9 100644 --- a/finance/src/main/kotlin/net/corda/flows/CashFlowCommand.kt +++ b/finance/src/main/kotlin/net/corda/flows/CashFlowCommand.kt @@ -1,7 +1,7 @@ package net.corda.flows import net.corda.core.contracts.Amount -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.messaging.CordaRPCOps import net.corda.core.messaging.FlowHandle import net.corda.core.messaging.startFlow diff --git a/finance/src/main/kotlin/net/corda/flows/CashIssueFlow.kt b/finance/src/main/kotlin/net/corda/flows/CashIssueFlow.kt index b96d0938f7..c44df1e20a 100644 --- a/finance/src/main/kotlin/net/corda/flows/CashIssueFlow.kt +++ b/finance/src/main/kotlin/net/corda/flows/CashIssueFlow.kt @@ -5,7 +5,7 @@ import net.corda.contracts.asset.Cash import net.corda.core.contracts.Amount import net.corda.core.contracts.TransactionType import net.corda.core.contracts.issuedBy -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.serialization.OpaqueBytes import net.corda.core.transactions.SignedTransaction import net.corda.core.transactions.TransactionBuilder diff --git a/finance/src/main/kotlin/net/corda/flows/CashPaymentFlow.kt b/finance/src/main/kotlin/net/corda/flows/CashPaymentFlow.kt index ca154d2fa7..ec212257ea 100644 --- a/finance/src/main/kotlin/net/corda/flows/CashPaymentFlow.kt +++ b/finance/src/main/kotlin/net/corda/flows/CashPaymentFlow.kt @@ -4,9 +4,9 @@ import co.paralleluniverse.fibers.Suspendable import net.corda.core.contracts.Amount import net.corda.core.contracts.InsufficientBalanceException import net.corda.core.contracts.TransactionType -import net.corda.core.crypto.Party import net.corda.core.crypto.expandedCompositeKeys import net.corda.core.crypto.toStringShort +import net.corda.core.identity.Party import net.corda.core.transactions.SignedTransaction import net.corda.core.transactions.TransactionBuilder import net.corda.core.utilities.ProgressTracker diff --git a/finance/src/main/kotlin/net/corda/flows/IssuerFlow.kt b/finance/src/main/kotlin/net/corda/flows/IssuerFlow.kt index 4d728eb6c7..3360bb5630 100644 --- a/finance/src/main/kotlin/net/corda/flows/IssuerFlow.kt +++ b/finance/src/main/kotlin/net/corda/flows/IssuerFlow.kt @@ -2,10 +2,10 @@ package net.corda.flows import co.paralleluniverse.fibers.Suspendable import net.corda.core.contracts.* -import net.corda.core.crypto.Party import net.corda.core.flows.FlowException import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow +import net.corda.core.identity.Party import net.corda.core.node.PluginServiceHub import net.corda.core.serialization.CordaSerializable import net.corda.core.serialization.OpaqueBytes diff --git a/finance/src/main/kotlin/net/corda/flows/TwoPartyTradeFlow.kt b/finance/src/main/kotlin/net/corda/flows/TwoPartyTradeFlow.kt index f5a0351646..068703060d 100644 --- a/finance/src/main/kotlin/net/corda/flows/TwoPartyTradeFlow.kt +++ b/finance/src/main/kotlin/net/corda/flows/TwoPartyTradeFlow.kt @@ -6,6 +6,7 @@ import net.corda.core.contracts.* import net.corda.core.crypto.* import net.corda.core.flows.FlowException import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party import net.corda.core.node.NodeInfo import net.corda.core.seconds import net.corda.core.serialization.CordaSerializable diff --git a/finance/src/test/java/net/corda/flows/AbstractStateReplacementFlowTest.java b/finance/src/test/java/net/corda/flows/AbstractStateReplacementFlowTest.java index 6b91b3b8eb..657f80059d 100644 --- a/finance/src/test/java/net/corda/flows/AbstractStateReplacementFlowTest.java +++ b/finance/src/test/java/net/corda/flows/AbstractStateReplacementFlowTest.java @@ -1,6 +1,6 @@ package net.corda.flows; -import net.corda.core.crypto.*; +import net.corda.core.identity.Party; import net.corda.core.utilities.*; import org.jetbrains.annotations.*; diff --git a/finance/src/test/kotlin/net/corda/contracts/CommercialPaperTests.kt b/finance/src/test/kotlin/net/corda/contracts/CommercialPaperTests.kt index b05ea0fa01..b68aaf0221 100644 --- a/finance/src/test/kotlin/net/corda/contracts/CommercialPaperTests.kt +++ b/finance/src/test/kotlin/net/corda/contracts/CommercialPaperTests.kt @@ -3,9 +3,8 @@ package net.corda.contracts import net.corda.contracts.asset.* import net.corda.contracts.testing.fillWithSomeTestCash import net.corda.core.contracts.* -import net.corda.core.crypto.Party -import net.corda.core.crypto.SecureHash import net.corda.core.days +import net.corda.core.identity.Party import net.corda.core.node.services.Vault import net.corda.core.node.services.VaultService import net.corda.core.seconds diff --git a/finance/src/test/kotlin/net/corda/contracts/asset/CashTests.kt b/finance/src/test/kotlin/net/corda/contracts/asset/CashTests.kt index f85860c545..8bbfd5d5fa 100644 --- a/finance/src/test/kotlin/net/corda/contracts/asset/CashTests.kt +++ b/finance/src/test/kotlin/net/corda/contracts/asset/CashTests.kt @@ -3,6 +3,8 @@ package net.corda.contracts.asset import net.corda.contracts.testing.fillWithSomeTestCash import net.corda.core.contracts.* import net.corda.core.crypto.* +import net.corda.core.identity.AbstractParty +import net.corda.core.identity.Party import net.corda.core.node.services.VaultService import net.corda.core.node.services.unconsumedStates import net.corda.core.serialization.OpaqueBytes diff --git a/finance/src/test/kotlin/net/corda/flows/CashExitFlowTests.kt b/finance/src/test/kotlin/net/corda/flows/CashExitFlowTests.kt index 7baac1e431..5754efd8a5 100644 --- a/finance/src/test/kotlin/net/corda/flows/CashExitFlowTests.kt +++ b/finance/src/test/kotlin/net/corda/flows/CashExitFlowTests.kt @@ -3,7 +3,7 @@ package net.corda.flows import net.corda.contracts.asset.Cash import net.corda.core.contracts.DOLLARS import net.corda.core.contracts.`issued by` -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.getOrThrow import net.corda.core.serialization.OpaqueBytes import net.corda.testing.node.InMemoryMessagingNetwork.ServicePeerAllocationStrategy.RoundRobin diff --git a/finance/src/test/kotlin/net/corda/flows/CashIssueFlowTests.kt b/finance/src/test/kotlin/net/corda/flows/CashIssueFlowTests.kt index f98ecfc1d3..add01685be 100644 --- a/finance/src/test/kotlin/net/corda/flows/CashIssueFlowTests.kt +++ b/finance/src/test/kotlin/net/corda/flows/CashIssueFlowTests.kt @@ -3,7 +3,7 @@ package net.corda.flows import net.corda.contracts.asset.Cash import net.corda.core.contracts.DOLLARS import net.corda.core.contracts.`issued by` -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.getOrThrow import net.corda.core.serialization.OpaqueBytes import net.corda.testing.node.InMemoryMessagingNetwork.ServicePeerAllocationStrategy.RoundRobin diff --git a/finance/src/test/kotlin/net/corda/flows/CashPaymentFlowTests.kt b/finance/src/test/kotlin/net/corda/flows/CashPaymentFlowTests.kt index 28c7774352..eb2c99c836 100644 --- a/finance/src/test/kotlin/net/corda/flows/CashPaymentFlowTests.kt +++ b/finance/src/test/kotlin/net/corda/flows/CashPaymentFlowTests.kt @@ -3,7 +3,7 @@ package net.corda.flows import net.corda.contracts.asset.Cash import net.corda.core.contracts.DOLLARS import net.corda.core.contracts.`issued by` -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.getOrThrow import net.corda.core.serialization.OpaqueBytes import net.corda.testing.node.InMemoryMessagingNetwork.ServicePeerAllocationStrategy.RoundRobin diff --git a/node-schemas/src/test/kotlin/net/corda/node/services/vault/schemas/VaultSchemaTest.kt b/node-schemas/src/test/kotlin/net/corda/node/services/vault/schemas/VaultSchemaTest.kt index 62acd83d78..f2899c2102 100644 --- a/node-schemas/src/test/kotlin/net/corda/node/services/vault/schemas/VaultSchemaTest.kt +++ b/node-schemas/src/test/kotlin/net/corda/node/services/vault/schemas/VaultSchemaTest.kt @@ -12,6 +12,7 @@ import io.requery.sql.* import io.requery.sql.platform.Generic import net.corda.core.contracts.* import net.corda.core.crypto.* +import net.corda.core.identity.Party import net.corda.core.node.services.Vault import net.corda.core.schemas.requery.converters.InstantConverter import net.corda.core.schemas.requery.converters.VaultStateStatusConverter diff --git a/node/src/integration-test/kotlin/net/corda/node/services/BFTNotaryServiceTests.kt b/node/src/integration-test/kotlin/net/corda/node/services/BFTNotaryServiceTests.kt index d6383b6d7b..6857a64543 100644 --- a/node/src/integration-test/kotlin/net/corda/node/services/BFTNotaryServiceTests.kt +++ b/node/src/integration-test/kotlin/net/corda/node/services/BFTNotaryServiceTests.kt @@ -4,11 +4,11 @@ import net.corda.core.contracts.DummyContract import net.corda.core.contracts.StateAndRef import net.corda.core.contracts.StateRef import net.corda.core.contracts.TransactionType -import net.corda.core.crypto.Party import net.corda.core.crypto.appendToCommonName import net.corda.core.crypto.commonName import net.corda.core.div import net.corda.core.getOrThrow +import net.corda.core.identity.Party import net.corda.core.node.services.ServiceInfo import net.corda.core.node.services.ServiceType import net.corda.core.utilities.ALICE diff --git a/node/src/integration-test/kotlin/net/corda/node/services/DistributedServiceTests.kt b/node/src/integration-test/kotlin/net/corda/node/services/DistributedServiceTests.kt index 61d983cbb4..0766ba08e0 100644 --- a/node/src/integration-test/kotlin/net/corda/node/services/DistributedServiceTests.kt +++ b/node/src/integration-test/kotlin/net/corda/node/services/DistributedServiceTests.kt @@ -3,7 +3,7 @@ package net.corda.node.services import net.corda.core.bufferUntilSubscribed import net.corda.core.contracts.Amount import net.corda.core.contracts.POUNDS -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.getOrThrow import net.corda.core.messaging.CordaRPCOps import net.corda.core.messaging.StateMachineUpdate diff --git a/node/src/integration-test/kotlin/net/corda/node/services/RaftNotaryServiceTests.kt b/node/src/integration-test/kotlin/net/corda/node/services/RaftNotaryServiceTests.kt index 421a74ae7c..3e5edba828 100644 --- a/node/src/integration-test/kotlin/net/corda/node/services/RaftNotaryServiceTests.kt +++ b/node/src/integration-test/kotlin/net/corda/node/services/RaftNotaryServiceTests.kt @@ -5,7 +5,7 @@ import net.corda.core.contracts.DummyContract import net.corda.core.contracts.StateAndRef import net.corda.core.contracts.StateRef import net.corda.core.contracts.TransactionType -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.getOrThrow import net.corda.core.map import net.corda.core.utilities.DUMMY_BANK_A diff --git a/node/src/integration-test/kotlin/net/corda/node/services/statemachine/FlowVersioningTest.kt b/node/src/integration-test/kotlin/net/corda/node/services/statemachine/FlowVersioningTest.kt index 4b81f86089..a2cedb2ee0 100644 --- a/node/src/integration-test/kotlin/net/corda/node/services/statemachine/FlowVersioningTest.kt +++ b/node/src/integration-test/kotlin/net/corda/node/services/statemachine/FlowVersioningTest.kt @@ -2,10 +2,10 @@ package net.corda.node.services.statemachine import co.paralleluniverse.fibers.Suspendable import com.google.common.util.concurrent.Futures -import net.corda.core.crypto.Party import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow import net.corda.core.getOrThrow +import net.corda.core.identity.Party import net.corda.core.utilities.ALICE import net.corda.core.utilities.BOB import net.corda.core.utilities.unwrap diff --git a/node/src/integration-test/kotlin/net/corda/services/messaging/MQSecurityTest.kt b/node/src/integration-test/kotlin/net/corda/services/messaging/MQSecurityTest.kt index a7492a1035..caf54da6da 100644 --- a/node/src/integration-test/kotlin/net/corda/services/messaging/MQSecurityTest.kt +++ b/node/src/integration-test/kotlin/net/corda/services/messaging/MQSecurityTest.kt @@ -3,12 +3,12 @@ package net.corda.services.messaging import co.paralleluniverse.fibers.Suspendable import com.google.common.net.HostAndPort import net.corda.client.rpc.CordaRPCClient -import net.corda.core.crypto.Party import net.corda.core.crypto.generateKeyPair import net.corda.core.crypto.toBase58String import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow import net.corda.core.getOrThrow +import net.corda.core.identity.Party import net.corda.core.messaging.CordaRPCOps import net.corda.core.random63BitValue import net.corda.core.utilities.ALICE diff --git a/node/src/integration-test/kotlin/net/corda/services/messaging/P2PSecurityTest.kt b/node/src/integration-test/kotlin/net/corda/services/messaging/P2PSecurityTest.kt index 2a7e75d9e6..649fbb5054 100644 --- a/node/src/integration-test/kotlin/net/corda/services/messaging/P2PSecurityTest.kt +++ b/node/src/integration-test/kotlin/net/corda/services/messaging/P2PSecurityTest.kt @@ -1,11 +1,11 @@ package net.corda.services.messaging import com.google.common.util.concurrent.ListenableFuture -import net.corda.core.crypto.Party import net.corda.core.crypto.X509Utilities import net.corda.core.crypto.commonName import net.corda.core.div import net.corda.core.getOrThrow +import net.corda.core.identity.Party import net.corda.core.node.NodeInfo import net.corda.core.random63BitValue import net.corda.core.seconds diff --git a/node/src/main/kotlin/net/corda/node/driver/Driver.kt b/node/src/main/kotlin/net/corda/node/driver/Driver.kt index 36fe98f1c1..4e4a8047ee 100644 --- a/node/src/main/kotlin/net/corda/node/driver/Driver.kt +++ b/node/src/main/kotlin/net/corda/node/driver/Driver.kt @@ -8,10 +8,10 @@ import com.typesafe.config.Config import com.typesafe.config.ConfigRenderOptions import net.corda.client.rpc.CordaRPCClient import net.corda.core.* -import net.corda.core.crypto.Party import net.corda.core.crypto.X509Utilities import net.corda.core.crypto.appendToCommonName import net.corda.core.crypto.commonName +import net.corda.core.identity.Party import net.corda.core.messaging.CordaRPCOps import net.corda.core.node.NodeInfo import net.corda.core.node.services.ServiceInfo diff --git a/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt b/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt index 641d568f26..b6a12c91b4 100644 --- a/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt +++ b/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt @@ -9,12 +9,12 @@ import net.corda.core.* import net.corda.core.contracts.Amount import net.corda.core.contracts.PartyAndReference import net.corda.core.crypto.KeyStoreUtilities -import net.corda.core.crypto.Party import net.corda.core.crypto.X509Utilities import net.corda.core.crypto.replaceCommonName import net.corda.core.flows.FlowInitiator import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow +import net.corda.core.identity.Party import net.corda.core.messaging.CordaRPCOps import net.corda.core.messaging.RPCOps import net.corda.core.messaging.SingleMessageRecipient diff --git a/node/src/main/kotlin/net/corda/node/services/CoreFlowHandlers.kt b/node/src/main/kotlin/net/corda/node/services/CoreFlowHandlers.kt index 8a8edec5af..354b97d438 100644 --- a/node/src/main/kotlin/net/corda/node/services/CoreFlowHandlers.kt +++ b/node/src/main/kotlin/net/corda/node/services/CoreFlowHandlers.kt @@ -5,7 +5,7 @@ import net.corda.core.contracts.ContractState import net.corda.core.contracts.TransactionType import net.corda.core.contracts.UpgradedContract import net.corda.core.contracts.requireThat -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.SecureHash import net.corda.core.flows.FlowException import net.corda.core.flows.FlowLogic diff --git a/node/src/main/kotlin/net/corda/node/services/identity/InMemoryIdentityService.kt b/node/src/main/kotlin/net/corda/node/services/identity/InMemoryIdentityService.kt index cdd6d2b648..9ff067b0cc 100644 --- a/node/src/main/kotlin/net/corda/node/services/identity/InMemoryIdentityService.kt +++ b/node/src/main/kotlin/net/corda/node/services/identity/InMemoryIdentityService.kt @@ -1,8 +1,8 @@ package net.corda.node.services.identity import net.corda.core.contracts.PartyAndReference -import net.corda.core.crypto.AnonymousParty -import net.corda.core.crypto.Party +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import net.corda.core.node.services.IdentityService import net.corda.core.serialization.SingletonSerializeAsToken import net.corda.core.utilities.loggerFor diff --git a/node/src/main/kotlin/net/corda/node/services/network/InMemoryNetworkMapCache.kt b/node/src/main/kotlin/net/corda/node/services/network/InMemoryNetworkMapCache.kt index 89761813a3..ced6e6b972 100644 --- a/node/src/main/kotlin/net/corda/node/services/network/InMemoryNetworkMapCache.kt +++ b/node/src/main/kotlin/net/corda/node/services/network/InMemoryNetworkMapCache.kt @@ -4,7 +4,7 @@ import com.google.common.annotations.VisibleForTesting import com.google.common.util.concurrent.ListenableFuture import com.google.common.util.concurrent.SettableFuture import net.corda.core.bufferUntilSubscribed -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.map import net.corda.core.messaging.SingleMessageRecipient import net.corda.core.node.NodeInfo diff --git a/node/src/main/kotlin/net/corda/node/services/network/NetworkMapService.kt b/node/src/main/kotlin/net/corda/node/services/network/NetworkMapService.kt index ba86a8b57a..bdc2162c7a 100644 --- a/node/src/main/kotlin/net/corda/node/services/network/NetworkMapService.kt +++ b/node/src/main/kotlin/net/corda/node/services/network/NetworkMapService.kt @@ -3,6 +3,7 @@ package net.corda.node.services.network import com.google.common.annotations.VisibleForTesting import net.corda.core.ThreadBox import net.corda.core.crypto.* +import net.corda.core.identity.Party import net.corda.core.messaging.MessageRecipients import net.corda.core.messaging.SingleMessageRecipient import net.corda.core.node.NodeInfo diff --git a/node/src/main/kotlin/net/corda/node/services/network/PersistentNetworkMapService.kt b/node/src/main/kotlin/net/corda/node/services/network/PersistentNetworkMapService.kt index 35e631e437..83a2dd12a1 100644 --- a/node/src/main/kotlin/net/corda/node/services/network/PersistentNetworkMapService.kt +++ b/node/src/main/kotlin/net/corda/node/services/network/PersistentNetworkMapService.kt @@ -1,7 +1,7 @@ package net.corda.node.services.network import net.corda.core.ThreadBox -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.messaging.SingleMessageRecipient import net.corda.node.services.api.ServiceHubInternal import net.corda.node.utilities.* diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/FlowSession.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/FlowSession.kt index b05b8a0f4f..de15e9ce68 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/FlowSession.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/FlowSession.kt @@ -1,6 +1,6 @@ package net.corda.node.services.statemachine -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.flows.FlowLogic import net.corda.node.services.statemachine.FlowSessionState.Initiated import net.corda.node.services.statemachine.FlowSessionState.Initiating diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/FlowStateMachineImpl.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/FlowStateMachineImpl.kt index 6b9693ed5f..3fd51666f8 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/FlowStateMachineImpl.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/FlowStateMachineImpl.kt @@ -8,7 +8,7 @@ import com.google.common.util.concurrent.ListenableFuture import com.google.common.util.concurrent.SettableFuture import net.corda.core.ErrorOr import net.corda.core.abbreviate -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.SecureHash import net.corda.core.flows.* import net.corda.core.random63BitValue diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/SessionMessage.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/SessionMessage.kt index 30af8a049f..dcfb5621b4 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/SessionMessage.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/SessionMessage.kt @@ -1,9 +1,9 @@ package net.corda.node.services.statemachine -import net.corda.core.crypto.Party import net.corda.core.flows.FlowException import net.corda.core.flows.FlowLogic import net.corda.core.flows.FlowSessionException +import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import net.corda.core.utilities.UntrustworthyData diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt index 26f36d3776..2d9e19cb82 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt @@ -15,7 +15,7 @@ import com.google.common.collect.HashMultimap import com.google.common.util.concurrent.ListenableFuture import io.requery.util.CloseableIterator import net.corda.core.* -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.SecureHash import net.corda.core.flows.* import net.corda.core.serialization.* diff --git a/node/src/main/kotlin/net/corda/node/services/transactions/BFTNonValidatingNotaryService.kt b/node/src/main/kotlin/net/corda/node/services/transactions/BFTNonValidatingNotaryService.kt index 4d9d58de8d..233b367b0b 100644 --- a/node/src/main/kotlin/net/corda/node/services/transactions/BFTNonValidatingNotaryService.kt +++ b/node/src/main/kotlin/net/corda/node/services/transactions/BFTNonValidatingNotaryService.kt @@ -2,7 +2,7 @@ package net.corda.node.services.transactions import co.paralleluniverse.fibers.Suspendable import net.corda.core.crypto.DigitalSignature -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.flows.FlowLogic import net.corda.core.node.services.TimestampChecker import net.corda.core.serialization.deserialize diff --git a/node/src/main/kotlin/net/corda/node/services/transactions/BFTSMaRt.kt b/node/src/main/kotlin/net/corda/node/services/transactions/BFTSMaRt.kt index d1219f5bfb..ca99b8a7bb 100644 --- a/node/src/main/kotlin/net/corda/node/services/transactions/BFTSMaRt.kt +++ b/node/src/main/kotlin/net/corda/node/services/transactions/BFTSMaRt.kt @@ -10,6 +10,7 @@ import bftsmart.tom.util.Extractor import net.corda.core.contracts.StateRef import net.corda.core.contracts.Timestamp import net.corda.core.crypto.* +import net.corda.core.identity.Party import net.corda.core.node.services.TimestampChecker import net.corda.core.node.services.UniquenessProvider import net.corda.core.serialization.CordaSerializable diff --git a/node/src/main/kotlin/net/corda/node/services/transactions/InMemoryUniquenessProvider.kt b/node/src/main/kotlin/net/corda/node/services/transactions/InMemoryUniquenessProvider.kt index 566043f9fe..17021d1c1b 100644 --- a/node/src/main/kotlin/net/corda/node/services/transactions/InMemoryUniquenessProvider.kt +++ b/node/src/main/kotlin/net/corda/node/services/transactions/InMemoryUniquenessProvider.kt @@ -2,7 +2,7 @@ package net.corda.node.services.transactions import net.corda.core.ThreadBox import net.corda.core.contracts.StateRef -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.SecureHash import net.corda.core.node.services.UniquenessException import net.corda.core.node.services.UniquenessProvider diff --git a/node/src/main/kotlin/net/corda/node/services/transactions/NonValidatingNotaryFlow.kt b/node/src/main/kotlin/net/corda/node/services/transactions/NonValidatingNotaryFlow.kt index bbf98c28fb..e8243e3a48 100644 --- a/node/src/main/kotlin/net/corda/node/services/transactions/NonValidatingNotaryFlow.kt +++ b/node/src/main/kotlin/net/corda/node/services/transactions/NonValidatingNotaryFlow.kt @@ -1,7 +1,7 @@ package net.corda.node.services.transactions import co.paralleluniverse.fibers.Suspendable -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.node.services.TimestampChecker import net.corda.core.node.services.UniquenessProvider import net.corda.core.transactions.FilteredTransaction diff --git a/node/src/main/kotlin/net/corda/node/services/transactions/NotaryService.kt b/node/src/main/kotlin/net/corda/node/services/transactions/NotaryService.kt index 941caff33d..9d6b13f7db 100644 --- a/node/src/main/kotlin/net/corda/node/services/transactions/NotaryService.kt +++ b/node/src/main/kotlin/net/corda/node/services/transactions/NotaryService.kt @@ -1,7 +1,7 @@ package net.corda.node.services.transactions -import net.corda.core.crypto.Party import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party interface NotaryService { diff --git a/node/src/main/kotlin/net/corda/node/services/transactions/PersistentUniquenessProvider.kt b/node/src/main/kotlin/net/corda/node/services/transactions/PersistentUniquenessProvider.kt index 643eec53c6..f6419d2c24 100644 --- a/node/src/main/kotlin/net/corda/node/services/transactions/PersistentUniquenessProvider.kt +++ b/node/src/main/kotlin/net/corda/node/services/transactions/PersistentUniquenessProvider.kt @@ -2,8 +2,8 @@ package net.corda.node.services.transactions import net.corda.core.ThreadBox import net.corda.core.contracts.StateRef -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash +import net.corda.core.identity.Party import net.corda.core.node.services.UniquenessException import net.corda.core.node.services.UniquenessProvider import net.corda.core.serialization.SingletonSerializeAsToken diff --git a/node/src/main/kotlin/net/corda/node/services/transactions/RaftNonValidatingNotaryService.kt b/node/src/main/kotlin/net/corda/node/services/transactions/RaftNonValidatingNotaryService.kt index 8e56c79185..fee9df8674 100644 --- a/node/src/main/kotlin/net/corda/node/services/transactions/RaftNonValidatingNotaryService.kt +++ b/node/src/main/kotlin/net/corda/node/services/transactions/RaftNonValidatingNotaryService.kt @@ -1,7 +1,7 @@ package net.corda.node.services.transactions -import net.corda.core.crypto.Party import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party import net.corda.core.node.services.TimestampChecker /** A non-validating notary service operated by a group of mutually trusting parties, uses the Raft algorithm to achieve consensus. */ diff --git a/node/src/main/kotlin/net/corda/node/services/transactions/RaftUniquenessProvider.kt b/node/src/main/kotlin/net/corda/node/services/transactions/RaftUniquenessProvider.kt index 2b087966df..67fab935ce 100644 --- a/node/src/main/kotlin/net/corda/node/services/transactions/RaftUniquenessProvider.kt +++ b/node/src/main/kotlin/net/corda/node/services/transactions/RaftUniquenessProvider.kt @@ -15,8 +15,8 @@ import io.atomix.copycat.server.CopycatServer import io.atomix.copycat.server.storage.Storage import io.atomix.copycat.server.storage.StorageLevel import net.corda.core.contracts.StateRef -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash +import net.corda.core.identity.Party import net.corda.core.node.services.UniquenessException import net.corda.core.node.services.UniquenessProvider import net.corda.core.serialization.SingletonSerializeAsToken diff --git a/node/src/main/kotlin/net/corda/node/services/transactions/RaftValidatingNotaryService.kt b/node/src/main/kotlin/net/corda/node/services/transactions/RaftValidatingNotaryService.kt index d1e7225e60..624df8db65 100644 --- a/node/src/main/kotlin/net/corda/node/services/transactions/RaftValidatingNotaryService.kt +++ b/node/src/main/kotlin/net/corda/node/services/transactions/RaftValidatingNotaryService.kt @@ -1,7 +1,7 @@ package net.corda.node.services.transactions -import net.corda.core.crypto.Party import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party import net.corda.core.node.services.TimestampChecker /** A validating notary service operated by a group of mutually trusting parties, uses the Raft algorithm to achieve consensus. */ diff --git a/node/src/main/kotlin/net/corda/node/services/transactions/SimpleNotaryService.kt b/node/src/main/kotlin/net/corda/node/services/transactions/SimpleNotaryService.kt index 54c30ab1be..4e5731d64c 100644 --- a/node/src/main/kotlin/net/corda/node/services/transactions/SimpleNotaryService.kt +++ b/node/src/main/kotlin/net/corda/node/services/transactions/SimpleNotaryService.kt @@ -1,7 +1,7 @@ package net.corda.node.services.transactions -import net.corda.core.crypto.Party import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party import net.corda.core.node.services.ServiceType import net.corda.core.node.services.TimestampChecker import net.corda.core.node.services.UniquenessProvider diff --git a/node/src/main/kotlin/net/corda/node/services/transactions/ValidatingNotaryFlow.kt b/node/src/main/kotlin/net/corda/node/services/transactions/ValidatingNotaryFlow.kt index 14bfad2a18..61aa033940 100644 --- a/node/src/main/kotlin/net/corda/node/services/transactions/ValidatingNotaryFlow.kt +++ b/node/src/main/kotlin/net/corda/node/services/transactions/ValidatingNotaryFlow.kt @@ -2,7 +2,7 @@ package net.corda.node.services.transactions import co.paralleluniverse.fibers.Suspendable import net.corda.core.contracts.TransactionVerificationException -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.node.services.TimestampChecker import net.corda.core.node.services.UniquenessProvider import net.corda.core.transactions.SignedTransaction diff --git a/node/src/main/kotlin/net/corda/node/services/transactions/ValidatingNotaryService.kt b/node/src/main/kotlin/net/corda/node/services/transactions/ValidatingNotaryService.kt index 38193ba708..60766b085a 100644 --- a/node/src/main/kotlin/net/corda/node/services/transactions/ValidatingNotaryService.kt +++ b/node/src/main/kotlin/net/corda/node/services/transactions/ValidatingNotaryService.kt @@ -1,7 +1,7 @@ package net.corda.node.services.transactions -import net.corda.core.crypto.Party import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party import net.corda.core.node.services.ServiceType import net.corda.core.node.services.TimestampChecker import net.corda.core.node.services.UniquenessProvider diff --git a/node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt b/node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt index b5ea64b16e..d86b8c7ce0 100644 --- a/node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt +++ b/node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt @@ -16,6 +16,8 @@ import net.corda.core.ThreadBox import net.corda.core.bufferUntilSubscribed import net.corda.core.contracts.* import net.corda.core.crypto.* +import net.corda.core.identity.AbstractParty +import net.corda.core.identity.Party import net.corda.core.node.ServiceHub import net.corda.core.node.services.StatesNotAvailableException import net.corda.core.node.services.Vault diff --git a/node/src/main/kotlin/net/corda/node/utilities/ServiceIdentityGenerator.kt b/node/src/main/kotlin/net/corda/node/utilities/ServiceIdentityGenerator.kt index 521be0dc0b..304aa3db68 100644 --- a/node/src/main/kotlin/net/corda/node/utilities/ServiceIdentityGenerator.kt +++ b/node/src/main/kotlin/net/corda/node/utilities/ServiceIdentityGenerator.kt @@ -1,7 +1,7 @@ package net.corda.node.utilities import net.corda.core.crypto.CompositeKey -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.generateKeyPair import net.corda.core.serialization.serialize import net.corda.core.utilities.loggerFor diff --git a/node/src/test/kotlin/net/corda/node/InteractiveShellTest.kt b/node/src/test/kotlin/net/corda/node/InteractiveShellTest.kt index 64bfb50cd6..ea16f4dcf5 100644 --- a/node/src/test/kotlin/net/corda/node/InteractiveShellTest.kt +++ b/node/src/test/kotlin/net/corda/node/InteractiveShellTest.kt @@ -3,12 +3,12 @@ package net.corda.node import com.fasterxml.jackson.dataformat.yaml.YAMLFactory import com.google.common.util.concurrent.ListenableFuture import net.corda.core.contracts.Amount -import net.corda.core.crypto.Party import net.corda.core.crypto.SecureHash import net.corda.core.flows.FlowInitiator import net.corda.core.flows.FlowLogic import net.corda.core.flows.FlowStateMachine import net.corda.core.flows.StateMachineRunId +import net.corda.core.identity.Party import net.corda.core.node.ServiceHub import net.corda.core.transactions.SignedTransaction import net.corda.core.utilities.DUMMY_PUBKEY_1 diff --git a/node/src/test/kotlin/net/corda/node/messaging/TwoPartyTradeFlowTests.kt b/node/src/test/kotlin/net/corda/node/messaging/TwoPartyTradeFlowTests.kt index 9c8d5e0a0f..ab5663be20 100644 --- a/node/src/test/kotlin/net/corda/node/messaging/TwoPartyTradeFlowTests.kt +++ b/node/src/test/kotlin/net/corda/node/messaging/TwoPartyTradeFlowTests.kt @@ -5,8 +5,8 @@ import net.corda.contracts.CommercialPaper import net.corda.contracts.asset.* import net.corda.contracts.testing.fillWithSomeTestCash import net.corda.core.contracts.* -import net.corda.core.crypto.AnonymousParty -import net.corda.core.crypto.Party +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import net.corda.core.crypto.SecureHash import net.corda.core.days import net.corda.core.flows.FlowLogic diff --git a/node/src/test/kotlin/net/corda/node/services/MockServiceHubInternal.kt b/node/src/test/kotlin/net/corda/node/services/MockServiceHubInternal.kt index ffa3df6d9c..7ac3f7038e 100644 --- a/node/src/test/kotlin/net/corda/node/services/MockServiceHubInternal.kt +++ b/node/src/test/kotlin/net/corda/node/services/MockServiceHubInternal.kt @@ -1,9 +1,9 @@ package net.corda.node.services import com.codahale.metrics.MetricRegistry -import net.corda.core.crypto.Party import net.corda.core.flows.FlowInitiator import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party import net.corda.core.node.NodeInfo import net.corda.core.node.services.* import net.corda.core.transactions.SignedTransaction diff --git a/node/src/test/kotlin/net/corda/node/services/NotaryChangeTests.kt b/node/src/test/kotlin/net/corda/node/services/NotaryChangeTests.kt index 173f188ef2..2581b99266 100644 --- a/node/src/test/kotlin/net/corda/node/services/NotaryChangeTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/NotaryChangeTests.kt @@ -1,9 +1,9 @@ package net.corda.node.services import net.corda.core.contracts.* -import net.corda.core.crypto.Party import net.corda.core.crypto.generateKeyPair import net.corda.core.getOrThrow +import net.corda.core.identity.Party import net.corda.core.node.services.ServiceInfo import net.corda.core.seconds import net.corda.core.transactions.WireTransaction diff --git a/node/src/test/kotlin/net/corda/node/services/events/ScheduledFlowTests.kt b/node/src/test/kotlin/net/corda/node/services/events/ScheduledFlowTests.kt index 86bfa72216..fdbee20bdd 100644 --- a/node/src/test/kotlin/net/corda/node/services/events/ScheduledFlowTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/events/ScheduledFlowTests.kt @@ -2,7 +2,7 @@ package net.corda.node.services.events import co.paralleluniverse.fibers.Suspendable import net.corda.core.contracts.* -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.containsAny import net.corda.core.flows.FlowInitiator import net.corda.core.flows.FlowLogic diff --git a/node/src/test/kotlin/net/corda/node/services/network/InMemoryIdentityServiceTests.kt b/node/src/test/kotlin/net/corda/node/services/network/InMemoryIdentityServiceTests.kt index 1e351296a5..90c88bb727 100644 --- a/node/src/test/kotlin/net/corda/node/services/network/InMemoryIdentityServiceTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/network/InMemoryIdentityServiceTests.kt @@ -1,6 +1,6 @@ package net.corda.node.services.network -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.X509Utilities import net.corda.core.crypto.generateKeyPair import net.corda.node.services.identity.InMemoryIdentityService diff --git a/node/src/test/kotlin/net/corda/node/services/persistence/DataVendingServiceTests.kt b/node/src/test/kotlin/net/corda/node/services/persistence/DataVendingServiceTests.kt index 8a6f4fd6b8..9064db174e 100644 --- a/node/src/test/kotlin/net/corda/node/services/persistence/DataVendingServiceTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/persistence/DataVendingServiceTests.kt @@ -6,7 +6,7 @@ import net.corda.core.contracts.Amount import net.corda.core.contracts.Issued import net.corda.core.contracts.TransactionType import net.corda.core.contracts.USD -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow import net.corda.core.node.services.unconsumedStates diff --git a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt index a9c0760b35..1cebf39987 100644 --- a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt @@ -7,7 +7,7 @@ import net.corda.contracts.asset.Cash import net.corda.core.* import net.corda.core.contracts.DOLLARS import net.corda.core.contracts.DummyState -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.SecureHash import net.corda.core.crypto.generateKeyPair import net.corda.core.flows.FlowException diff --git a/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryTests.kt b/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryTests.kt index 2dccb67a94..7ee8bcf34d 100644 --- a/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryTests.kt @@ -7,7 +7,7 @@ import net.corda.contracts.testing.fillWithSomeTestCash import net.corda.contracts.testing.fillWithSomeTestDeals import net.corda.contracts.testing.fillWithSomeTestLinearStates import net.corda.core.contracts.* -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.entropyToKeyPair import net.corda.core.days import net.corda.core.node.services.Vault diff --git a/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/AttachmentDemo.kt b/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/AttachmentDemo.kt index ef3941ff87..ee24480e6d 100644 --- a/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/AttachmentDemo.kt +++ b/samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/AttachmentDemo.kt @@ -7,7 +7,7 @@ import net.corda.core.contracts.Contract import net.corda.core.contracts.ContractState import net.corda.core.contracts.TransactionForContract import net.corda.core.contracts.TransactionType -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.SecureHash import net.corda.core.getOrThrow import net.corda.core.messaging.CordaRPCOps diff --git a/samples/bank-of-corda-demo/src/main/kotlin/net/corda/bank/plugin/BankOfCordaPlugin.kt b/samples/bank-of-corda-demo/src/main/kotlin/net/corda/bank/plugin/BankOfCordaPlugin.kt index 2d73716388..e0d12385c3 100644 --- a/samples/bank-of-corda-demo/src/main/kotlin/net/corda/bank/plugin/BankOfCordaPlugin.kt +++ b/samples/bank-of-corda-demo/src/main/kotlin/net/corda/bank/plugin/BankOfCordaPlugin.kt @@ -2,7 +2,7 @@ package net.corda.bank.plugin import net.corda.bank.api.BankOfCordaWebApi import net.corda.core.contracts.Amount -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.node.CordaPluginRegistry import net.corda.core.serialization.OpaqueBytes import net.corda.flows.IssuerFlow diff --git a/samples/irs-demo/src/main/kotlin/net/corda/irs/api/InterestRateSwapAPI.kt b/samples/irs-demo/src/main/kotlin/net/corda/irs/api/InterestRateSwapAPI.kt index efd843b956..4c6bc8b864 100644 --- a/samples/irs-demo/src/main/kotlin/net/corda/irs/api/InterestRateSwapAPI.kt +++ b/samples/irs-demo/src/main/kotlin/net/corda/irs/api/InterestRateSwapAPI.kt @@ -2,7 +2,7 @@ package net.corda.irs.api import net.corda.client.rpc.notUsed import net.corda.core.contracts.filterStatesOfType -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.getOrThrow import net.corda.core.messaging.CordaRPCOps import net.corda.core.messaging.startFlow diff --git a/samples/irs-demo/src/main/kotlin/net/corda/irs/api/NodeInterestRates.kt b/samples/irs-demo/src/main/kotlin/net/corda/irs/api/NodeInterestRates.kt index fb07a2db9c..7ba75b4a64 100644 --- a/samples/irs-demo/src/main/kotlin/net/corda/irs/api/NodeInterestRates.kt +++ b/samples/irs-demo/src/main/kotlin/net/corda/irs/api/NodeInterestRates.kt @@ -5,7 +5,7 @@ import net.corda.core.RetryableException import net.corda.core.contracts.* import net.corda.core.crypto.DigitalSignature import net.corda.core.crypto.MerkleTreeException -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.keys import net.corda.core.crypto.sign import net.corda.core.flows.FlowLogic diff --git a/samples/irs-demo/src/main/kotlin/net/corda/irs/contract/IRS.kt b/samples/irs-demo/src/main/kotlin/net/corda/irs/contract/IRS.kt index a4ce020e25..2379573e8a 100644 --- a/samples/irs-demo/src/main/kotlin/net/corda/irs/contract/IRS.kt +++ b/samples/irs-demo/src/main/kotlin/net/corda/irs/contract/IRS.kt @@ -4,6 +4,9 @@ import net.corda.core.contracts.* import net.corda.core.contracts.clauses.* import net.corda.core.crypto.* import net.corda.core.flows.FlowLogicRefFactory +import net.corda.core.identity.AbstractParty +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import net.corda.core.node.services.ServiceType import net.corda.core.serialization.CordaSerializable import net.corda.core.transactions.TransactionBuilder diff --git a/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/AutoOfferFlow.kt b/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/AutoOfferFlow.kt index d258aa951f..402a4f89c8 100644 --- a/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/AutoOfferFlow.kt +++ b/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/AutoOfferFlow.kt @@ -2,7 +2,7 @@ package net.corda.irs.flows import co.paralleluniverse.fibers.Suspendable import net.corda.core.contracts.DealState -import net.corda.core.crypto.AbstractParty +import net.corda.core.identity.AbstractParty import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow import net.corda.core.node.CordaPluginRegistry diff --git a/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/FixingFlow.kt b/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/FixingFlow.kt index fb5270e682..e962181798 100644 --- a/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/FixingFlow.kt +++ b/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/FixingFlow.kt @@ -3,7 +3,7 @@ package net.corda.irs.flows import co.paralleluniverse.fibers.Suspendable import net.corda.core.TransientProperty import net.corda.core.contracts.* -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.keys import net.corda.core.crypto.toBase58String import net.corda.core.flows.FlowLogic diff --git a/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/RatesFixFlow.kt b/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/RatesFixFlow.kt index df7b3bb6bb..2f2ec0641b 100644 --- a/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/RatesFixFlow.kt +++ b/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/RatesFixFlow.kt @@ -4,7 +4,7 @@ import co.paralleluniverse.fibers.Suspendable import net.corda.core.contracts.Fix import net.corda.core.contracts.FixOf import net.corda.core.crypto.DigitalSignature -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow import net.corda.core.serialization.CordaSerializable diff --git a/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/UpdateBusinessDayFlow.kt b/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/UpdateBusinessDayFlow.kt index e5aeae94db..47812e4ba8 100644 --- a/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/UpdateBusinessDayFlow.kt +++ b/samples/irs-demo/src/main/kotlin/net/corda/irs/flows/UpdateBusinessDayFlow.kt @@ -1,7 +1,7 @@ package net.corda.irs.flows import co.paralleluniverse.fibers.Suspendable -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow import net.corda.core.node.CordaPluginRegistry diff --git a/samples/irs-demo/src/main/kotlin/net/corda/irs/plugin/IRSPlugin.kt b/samples/irs-demo/src/main/kotlin/net/corda/irs/plugin/IRSPlugin.kt index d87bbcd93c..fc607ef272 100644 --- a/samples/irs-demo/src/main/kotlin/net/corda/irs/plugin/IRSPlugin.kt +++ b/samples/irs-demo/src/main/kotlin/net/corda/irs/plugin/IRSPlugin.kt @@ -1,7 +1,7 @@ package net.corda.irs.plugin import net.corda.core.contracts.StateRef -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.node.CordaPluginRegistry import net.corda.irs.api.InterestRateSwapAPI import net.corda.irs.contract.InterestRateSwap diff --git a/samples/irs-demo/src/main/kotlin/net/corda/simulation/IRSSimulation.kt b/samples/irs-demo/src/main/kotlin/net/corda/simulation/IRSSimulation.kt index edc4cb51d0..7ae55b7a83 100644 --- a/samples/irs-demo/src/main/kotlin/net/corda/simulation/IRSSimulation.kt +++ b/samples/irs-demo/src/main/kotlin/net/corda/simulation/IRSSimulation.kt @@ -9,8 +9,8 @@ import com.google.common.util.concurrent.SettableFuture import net.corda.core.RunOnCallerThread import net.corda.core.contracts.StateAndRef import net.corda.core.contracts.UniqueIdentifier -import net.corda.core.crypto.AnonymousParty -import net.corda.core.crypto.Party +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import net.corda.core.flatMap import net.corda.core.flows.FlowLogic import net.corda.core.flows.FlowStateMachine diff --git a/samples/irs-demo/src/test/kotlin/net/corda/irs/testing/IRSTests.kt b/samples/irs-demo/src/test/kotlin/net/corda/irs/testing/IRSTests.kt index 662b46a70d..205f2d707d 100644 --- a/samples/irs-demo/src/test/kotlin/net/corda/irs/testing/IRSTests.kt +++ b/samples/irs-demo/src/test/kotlin/net/corda/irs/testing/IRSTests.kt @@ -1,7 +1,7 @@ package net.corda.irs.testing import net.corda.core.contracts.* -import net.corda.core.crypto.AnonymousParty +import net.corda.core.identity.AnonymousParty import net.corda.core.seconds import net.corda.core.transactions.SignedTransaction import net.corda.core.utilities.DUMMY_NOTARY diff --git a/samples/irs-demo/src/test/kotlin/net/corda/irs/testing/NodeInterestRatesTest.kt b/samples/irs-demo/src/test/kotlin/net/corda/irs/testing/NodeInterestRatesTest.kt index 85a56f60da..1cc89d4376 100644 --- a/samples/irs-demo/src/test/kotlin/net/corda/irs/testing/NodeInterestRatesTest.kt +++ b/samples/irs-demo/src/test/kotlin/net/corda/irs/testing/NodeInterestRatesTest.kt @@ -7,7 +7,7 @@ import net.corda.contracts.asset.`owned by` import net.corda.core.bd import net.corda.core.contracts.* import net.corda.core.crypto.MerkleTreeException -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.X509Utilities import net.corda.core.crypto.generateKeyPair import net.corda.core.getOrThrow diff --git a/samples/raft-notary-demo/src/main/kotlin/net/corda/notarydemo/flows/DummyIssueAndMove.kt b/samples/raft-notary-demo/src/main/kotlin/net/corda/notarydemo/flows/DummyIssueAndMove.kt index bba9ae1442..103d2fe57c 100644 --- a/samples/raft-notary-demo/src/main/kotlin/net/corda/notarydemo/flows/DummyIssueAndMove.kt +++ b/samples/raft-notary-demo/src/main/kotlin/net/corda/notarydemo/flows/DummyIssueAndMove.kt @@ -2,7 +2,7 @@ package net.corda.notarydemo.flows import co.paralleluniverse.fibers.Suspendable import net.corda.core.contracts.DummyContract -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.flows.FlowLogic import net.corda.core.transactions.SignedTransaction import java.util.* diff --git a/samples/raft-notary-demo/src/main/kotlin/net/corda/notarydemo/plugin/NotaryDemoPlugin.kt b/samples/raft-notary-demo/src/main/kotlin/net/corda/notarydemo/plugin/NotaryDemoPlugin.kt index 5af02c6563..816faa655a 100644 --- a/samples/raft-notary-demo/src/main/kotlin/net/corda/notarydemo/plugin/NotaryDemoPlugin.kt +++ b/samples/raft-notary-demo/src/main/kotlin/net/corda/notarydemo/plugin/NotaryDemoPlugin.kt @@ -1,6 +1,6 @@ package net.corda.notarydemo.plugin -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.node.CordaPluginRegistry import net.corda.core.transactions.SignedTransaction import net.corda.flows.NotaryFlow diff --git a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/PortfolioApi.kt b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/PortfolioApi.kt index cd7b92ad26..58349e9309 100644 --- a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/PortfolioApi.kt +++ b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/PortfolioApi.kt @@ -7,6 +7,8 @@ import net.corda.core.contracts.StateAndRef import net.corda.core.contracts.filterStatesOfType import net.corda.core.crypto.* import net.corda.core.getOrThrow +import net.corda.core.identity.AbstractParty +import net.corda.core.identity.Party import net.corda.core.messaging.CordaRPCOps import net.corda.core.messaging.startFlow import net.corda.core.utilities.DUMMY_MAP diff --git a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/PortfolioApiUtils.kt b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/PortfolioApiUtils.kt index 49b3322655..82498b71ea 100644 --- a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/PortfolioApiUtils.kt +++ b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/PortfolioApiUtils.kt @@ -5,8 +5,8 @@ import com.opengamma.strata.product.swap.IborRateCalculation import com.opengamma.strata.product.swap.RateCalculationSwapLeg import com.opengamma.strata.product.swap.SwapLegType import net.corda.core.contracts.hash -import net.corda.core.crypto.AbstractParty -import net.corda.core.crypto.Party +import net.corda.core.identity.AbstractParty +import net.corda.core.identity.Party import net.corda.core.crypto.toBase58String import net.corda.vega.contracts.IRSState import net.corda.vega.contracts.PortfolioState diff --git a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/SwapDataModel.kt b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/SwapDataModel.kt index a428de20d3..d401990439 100644 --- a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/SwapDataModel.kt +++ b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/SwapDataModel.kt @@ -1,7 +1,7 @@ package net.corda.vega.api import com.opengamma.strata.product.common.BuySell -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.vega.contracts.SwapData import java.math.BigDecimal import java.time.LocalDate diff --git a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/SwapDataView.kt b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/SwapDataView.kt index 9a694293ee..34f7593671 100644 --- a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/SwapDataView.kt +++ b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/SwapDataView.kt @@ -2,7 +2,7 @@ package net.corda.vega.api import com.opengamma.strata.basics.currency.MultiCurrencyAmount import com.opengamma.strata.product.common.BuySell -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.vega.analytics.InitialMarginTriple import net.corda.vega.contracts.SwapData import net.corda.vega.portfolio.Portfolio diff --git a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/IRSState.kt b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/IRSState.kt index e9d24870d6..05f4b8075d 100644 --- a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/IRSState.kt +++ b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/IRSState.kt @@ -4,8 +4,8 @@ import net.corda.core.contracts.Command import net.corda.core.contracts.DealState import net.corda.core.contracts.TransactionType import net.corda.core.contracts.UniqueIdentifier -import net.corda.core.crypto.AnonymousParty -import net.corda.core.crypto.Party +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import net.corda.core.crypto.keys import net.corda.core.transactions.TransactionBuilder import java.security.PublicKey diff --git a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/PortfolioState.kt b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/PortfolioState.kt index 81296c8a74..6677ebd882 100644 --- a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/PortfolioState.kt +++ b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/PortfolioState.kt @@ -1,8 +1,8 @@ package net.corda.vega.contracts import net.corda.core.contracts.* -import net.corda.core.crypto.AnonymousParty -import net.corda.core.crypto.Party +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import net.corda.core.crypto.keys import net.corda.core.flows.FlowLogicRefFactory import net.corda.core.serialization.CordaSerializable diff --git a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/RevisionedState.kt b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/RevisionedState.kt index ee606147c7..8b4f152429 100644 --- a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/RevisionedState.kt +++ b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/RevisionedState.kt @@ -2,7 +2,7 @@ package net.corda.vega.contracts import net.corda.core.contracts.ContractState import net.corda.core.contracts.StateAndRef -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.transactions.TransactionBuilder /** diff --git a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/SwapData.kt b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/SwapData.kt index d2aad3935e..09e5d9cbf4 100644 --- a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/SwapData.kt +++ b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/contracts/SwapData.kt @@ -9,7 +9,7 @@ import com.opengamma.strata.product.common.BuySell import com.opengamma.strata.product.swap.SwapTrade import com.opengamma.strata.product.swap.type.FixedIborSwapConvention import com.opengamma.strata.product.swap.type.FixedIborSwapConventions -import net.corda.core.crypto.AbstractParty +import net.corda.core.identity.AbstractParty import net.corda.core.crypto.toBase58String import net.corda.core.serialization.CordaSerializable import java.math.BigDecimal diff --git a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/flows/IRSTradeFlow.kt b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/flows/IRSTradeFlow.kt index 807912cede..3959dcb127 100644 --- a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/flows/IRSTradeFlow.kt +++ b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/flows/IRSTradeFlow.kt @@ -1,7 +1,7 @@ package net.corda.vega.flows import co.paralleluniverse.fibers.Suspendable -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow import net.corda.core.node.PluginServiceHub diff --git a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/flows/SimmFlow.kt b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/flows/SimmFlow.kt index 611bcbd21a..c2c764013f 100644 --- a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/flows/SimmFlow.kt +++ b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/flows/SimmFlow.kt @@ -10,8 +10,8 @@ import com.opengamma.strata.pricer.rate.ImmutableRatesProvider import com.opengamma.strata.pricer.swap.DiscountingSwapProductPricer import net.corda.core.contracts.StateAndRef import net.corda.core.contracts.StateRef -import net.corda.core.crypto.AnonymousParty -import net.corda.core.crypto.Party +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow import net.corda.core.node.PluginServiceHub diff --git a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/flows/StateRevisionFlow.kt b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/flows/StateRevisionFlow.kt index 7f4591a923..f4e3108fcf 100644 --- a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/flows/StateRevisionFlow.kt +++ b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/flows/StateRevisionFlow.kt @@ -1,7 +1,7 @@ package net.corda.vega.flows import net.corda.core.contracts.StateAndRef -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.seconds import net.corda.core.transactions.SignedTransaction import net.corda.flows.AbstractStateReplacementFlow diff --git a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/portfolio/Portfolio.kt b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/portfolio/Portfolio.kt index 41e1876ab4..b91186362e 100644 --- a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/portfolio/Portfolio.kt +++ b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/portfolio/Portfolio.kt @@ -2,7 +2,7 @@ package net.corda.vega.portfolio import net.corda.client.rpc.notUsed import net.corda.core.contracts.* -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.messaging.CordaRPCOps import net.corda.core.node.ServiceHub import net.corda.core.sum diff --git a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/services/SimmService.kt b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/services/SimmService.kt index 5a34a0fad7..d6d9aef072 100644 --- a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/services/SimmService.kt +++ b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/services/SimmService.kt @@ -11,7 +11,7 @@ import com.opengamma.strata.market.param.CurrencyParameterSensitivities import com.opengamma.strata.market.param.CurrencyParameterSensitivity import com.opengamma.strata.market.param.TenorDateParameterMetadata import net.corda.core.contracts.StateRef -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.node.CordaPluginRegistry import net.corda.core.serialization.SerializationCustomization import net.corda.vega.analytics.CordaMarketData diff --git a/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/flow/BuyerFlow.kt b/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/flow/BuyerFlow.kt index 23af219e8e..6d01fdd3a7 100644 --- a/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/flow/BuyerFlow.kt +++ b/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/flow/BuyerFlow.kt @@ -4,7 +4,7 @@ import co.paralleluniverse.fibers.Suspendable import net.corda.contracts.CommercialPaper import net.corda.core.contracts.Amount import net.corda.core.contracts.TransactionGraphSearch -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.flows.FlowLogic import net.corda.core.node.NodeInfo import net.corda.core.node.PluginServiceHub diff --git a/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/flow/SellerFlow.kt b/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/flow/SellerFlow.kt index 7a7a850460..d2bee38d56 100644 --- a/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/flow/SellerFlow.kt +++ b/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/flow/SellerFlow.kt @@ -4,7 +4,7 @@ import co.paralleluniverse.fibers.Suspendable import net.corda.contracts.CommercialPaper import net.corda.contracts.asset.DUMMY_CASH_ISSUER import net.corda.core.contracts.* -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.SecureHash import net.corda.core.crypto.generateKeyPair import net.corda.core.days diff --git a/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/plugin/TraderDemoPlugin.kt b/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/plugin/TraderDemoPlugin.kt index 382a2ef75a..8fa30e3e10 100644 --- a/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/plugin/TraderDemoPlugin.kt +++ b/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/plugin/TraderDemoPlugin.kt @@ -1,7 +1,7 @@ package net.corda.traderdemo.plugin import net.corda.core.contracts.Amount -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.node.CordaPluginRegistry import net.corda.traderdemo.flow.BuyerFlow import net.corda.traderdemo.flow.SellerFlow diff --git a/test-utils/src/main/kotlin/net/corda/testing/CoreTestUtils.kt b/test-utils/src/main/kotlin/net/corda/testing/CoreTestUtils.kt index 8c37e92045..a86f941765 100644 --- a/test-utils/src/main/kotlin/net/corda/testing/CoreTestUtils.kt +++ b/test-utils/src/main/kotlin/net/corda/testing/CoreTestUtils.kt @@ -8,6 +8,7 @@ import com.google.common.util.concurrent.ListenableFuture import net.corda.core.contracts.StateRef import net.corda.core.crypto.* import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party import net.corda.core.node.ServiceHub import net.corda.core.node.VersionInfo import net.corda.core.serialization.OpaqueBytes diff --git a/test-utils/src/main/kotlin/net/corda/testing/TestDSL.kt b/test-utils/src/main/kotlin/net/corda/testing/TestDSL.kt index ce64f8a97d..8566851baa 100644 --- a/test-utils/src/main/kotlin/net/corda/testing/TestDSL.kt +++ b/test-utils/src/main/kotlin/net/corda/testing/TestDSL.kt @@ -2,6 +2,7 @@ package net.corda.testing import net.corda.core.contracts.* import net.corda.core.crypto.* +import net.corda.core.identity.Party import net.corda.core.node.ServiceHub import net.corda.core.serialization.serialize import net.corda.core.transactions.SignedTransaction diff --git a/test-utils/src/main/kotlin/net/corda/testing/TransactionDSLInterpreter.kt b/test-utils/src/main/kotlin/net/corda/testing/TransactionDSLInterpreter.kt index c84ec37447..0dd8cda938 100644 --- a/test-utils/src/main/kotlin/net/corda/testing/TransactionDSLInterpreter.kt +++ b/test-utils/src/main/kotlin/net/corda/testing/TransactionDSLInterpreter.kt @@ -1,7 +1,7 @@ package net.corda.testing import net.corda.core.contracts.* -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.SecureHash import net.corda.core.seconds import net.corda.core.transactions.TransactionBuilder diff --git a/test-utils/src/main/kotlin/net/corda/testing/node/MockNetworkMapCache.kt b/test-utils/src/main/kotlin/net/corda/testing/node/MockNetworkMapCache.kt index 03ef9f0665..76790b851b 100644 --- a/test-utils/src/main/kotlin/net/corda/testing/node/MockNetworkMapCache.kt +++ b/test-utils/src/main/kotlin/net/corda/testing/node/MockNetworkMapCache.kt @@ -2,15 +2,13 @@ package net.corda.testing.node import co.paralleluniverse.common.util.VisibleForTesting import net.corda.core.crypto.DummyPublicKey -import net.corda.core.crypto.Party -import net.corda.core.crypto.X509Utilities +import net.corda.core.identity.Party import net.corda.core.messaging.SingleMessageRecipient import net.corda.core.node.NodeInfo import net.corda.core.node.services.NetworkMapCache import net.corda.node.services.network.InMemoryNetworkMapCache import net.corda.testing.MOCK_VERSION_INFO import net.corda.testing.getTestX509Name -import org.bouncycastle.asn1.x500.X500Name import rx.Observable import rx.subjects.PublishSubject diff --git a/test-utils/src/main/kotlin/net/corda/testing/node/MockNode.kt b/test-utils/src/main/kotlin/net/corda/testing/node/MockNode.kt index a283edbd0b..3a549fad6c 100644 --- a/test-utils/src/main/kotlin/net/corda/testing/node/MockNode.kt +++ b/test-utils/src/main/kotlin/net/corda/testing/node/MockNode.kt @@ -6,11 +6,9 @@ import com.google.common.jimfs.Jimfs import com.google.common.util.concurrent.Futures import com.google.common.util.concurrent.ListenableFuture import net.corda.core.* -import net.corda.core.crypto.Party -import net.corda.core.crypto.X509Utilities -import net.corda.core.crypto.commonName import net.corda.core.crypto.entropyToKeyPair import net.corda.core.flows.FlowLogic +import net.corda.core.identity.Party import net.corda.core.messaging.RPCOps import net.corda.core.messaging.SingleMessageRecipient import net.corda.core.node.CordaPluginRegistry diff --git a/test-utils/src/main/kotlin/net/corda/testing/node/MockServices.kt b/test-utils/src/main/kotlin/net/corda/testing/node/MockServices.kt index ce0b612662..c9e8eb5e55 100644 --- a/test-utils/src/main/kotlin/net/corda/testing/node/MockServices.kt +++ b/test-utils/src/main/kotlin/net/corda/testing/node/MockServices.kt @@ -4,6 +4,8 @@ import net.corda.core.contracts.Attachment import net.corda.core.contracts.PartyAndReference import net.corda.core.crypto.* import net.corda.core.flows.StateMachineRunId +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import net.corda.core.messaging.SingleMessageRecipient import net.corda.core.node.NodeInfo import net.corda.core.node.ServiceHub diff --git a/tools/explorer/src/main/kotlin/net/corda/explorer/formatters/PartyNameFormatter.kt b/tools/explorer/src/main/kotlin/net/corda/explorer/formatters/PartyNameFormatter.kt index 5dc1b81467..0347e9924f 100644 --- a/tools/explorer/src/main/kotlin/net/corda/explorer/formatters/PartyNameFormatter.kt +++ b/tools/explorer/src/main/kotlin/net/corda/explorer/formatters/PartyNameFormatter.kt @@ -1,6 +1,5 @@ package net.corda.explorer.formatters -import net.corda.core.crypto.Party import net.corda.core.crypto.commonName import org.bouncycastle.asn1.x500.X500Name diff --git a/tools/explorer/src/main/kotlin/net/corda/explorer/plugin/ExplorerPlugin.kt b/tools/explorer/src/main/kotlin/net/corda/explorer/plugin/ExplorerPlugin.kt index 04be60c10d..a956b864a4 100644 --- a/tools/explorer/src/main/kotlin/net/corda/explorer/plugin/ExplorerPlugin.kt +++ b/tools/explorer/src/main/kotlin/net/corda/explorer/plugin/ExplorerPlugin.kt @@ -1,7 +1,7 @@ package net.corda.explorer.plugin import net.corda.core.contracts.Amount -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.node.CordaPluginRegistry import net.corda.core.serialization.OpaqueBytes import net.corda.flows.IssuerFlow diff --git a/tools/explorer/src/main/kotlin/net/corda/explorer/views/GuiUtilities.kt b/tools/explorer/src/main/kotlin/net/corda/explorer/views/GuiUtilities.kt index 663b4dffc1..876e217e7c 100644 --- a/tools/explorer/src/main/kotlin/net/corda/explorer/views/GuiUtilities.kt +++ b/tools/explorer/src/main/kotlin/net/corda/explorer/views/GuiUtilities.kt @@ -15,8 +15,8 @@ import net.corda.client.jfx.model.NetworkIdentityModel import net.corda.client.jfx.utils.map import net.corda.contracts.asset.Cash import net.corda.core.contracts.StateAndRef -import net.corda.core.crypto.AnonymousParty -import net.corda.core.crypto.Party +import net.corda.core.identity.AnonymousParty +import net.corda.core.identity.Party import tornadofx.* /** diff --git a/tools/explorer/src/main/kotlin/net/corda/explorer/views/Network.kt b/tools/explorer/src/main/kotlin/net/corda/explorer/views/Network.kt index 72dcb0dae8..9c705e79ff 100644 --- a/tools/explorer/src/main/kotlin/net/corda/explorer/views/Network.kt +++ b/tools/explorer/src/main/kotlin/net/corda/explorer/views/Network.kt @@ -26,7 +26,7 @@ import javafx.util.Duration import net.corda.client.jfx.model.* import net.corda.client.jfx.utils.* import net.corda.core.contracts.ContractState -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.crypto.toBase58String import net.corda.core.node.NodeInfo import net.corda.explorer.formatters.PartyNameFormatter diff --git a/tools/explorer/src/main/kotlin/net/corda/explorer/views/TransactionViewer.kt b/tools/explorer/src/main/kotlin/net/corda/explorer/views/TransactionViewer.kt index d227a21d9d..4eb6acb584 100644 --- a/tools/explorer/src/main/kotlin/net/corda/explorer/views/TransactionViewer.kt +++ b/tools/explorer/src/main/kotlin/net/corda/explorer/views/TransactionViewer.kt @@ -23,6 +23,8 @@ import net.corda.client.jfx.utils.sequence import net.corda.contracts.asset.Cash import net.corda.core.contracts.* import net.corda.core.crypto.* +import net.corda.core.identity.AbstractParty +import net.corda.core.identity.AnonymousParty import net.corda.core.node.NodeInfo import net.corda.explorer.AmountDiff import net.corda.explorer.formatters.AmountFormatter diff --git a/tools/explorer/src/main/kotlin/net/corda/explorer/views/cordapps/cash/CashViewer.kt b/tools/explorer/src/main/kotlin/net/corda/explorer/views/cordapps/cash/CashViewer.kt index e0b443becc..48b9b2a696 100644 --- a/tools/explorer/src/main/kotlin/net/corda/explorer/views/cordapps/cash/CashViewer.kt +++ b/tools/explorer/src/main/kotlin/net/corda/explorer/views/cordapps/cash/CashViewer.kt @@ -23,7 +23,7 @@ import net.corda.contracts.asset.Cash import net.corda.core.contracts.Amount import net.corda.core.contracts.StateAndRef import net.corda.core.contracts.withoutIssuer -import net.corda.core.crypto.AbstractParty +import net.corda.core.identity.AbstractParty import net.corda.core.crypto.commonName import net.corda.explorer.formatters.AmountFormatter import net.corda.explorer.formatters.PartyNameFormatter diff --git a/tools/explorer/src/main/kotlin/net/corda/explorer/views/cordapps/cash/NewTransaction.kt b/tools/explorer/src/main/kotlin/net/corda/explorer/views/cordapps/cash/NewTransaction.kt index bbe0bd9c52..81251c9891 100644 --- a/tools/explorer/src/main/kotlin/net/corda/explorer/views/cordapps/cash/NewTransaction.kt +++ b/tools/explorer/src/main/kotlin/net/corda/explorer/views/cordapps/cash/NewTransaction.kt @@ -20,8 +20,8 @@ import net.corda.client.jfx.utils.unique import net.corda.core.contracts.Amount import net.corda.core.contracts.sumOrNull import net.corda.core.contracts.withoutIssuer -import net.corda.core.crypto.AbstractParty -import net.corda.core.crypto.Party +import net.corda.core.identity.AbstractParty +import net.corda.core.identity.Party import net.corda.core.crypto.commonName import net.corda.core.flows.FlowException import net.corda.core.getOrThrow diff --git a/tools/loadtest/src/main/kotlin/net/corda/loadtest/tests/CrossCashTest.kt b/tools/loadtest/src/main/kotlin/net/corda/loadtest/tests/CrossCashTest.kt index 8bd8965406..f188407b13 100644 --- a/tools/loadtest/src/main/kotlin/net/corda/loadtest/tests/CrossCashTest.kt +++ b/tools/loadtest/src/main/kotlin/net/corda/loadtest/tests/CrossCashTest.kt @@ -7,7 +7,7 @@ import net.corda.contracts.asset.Cash import net.corda.core.contracts.Issued import net.corda.core.contracts.PartyAndReference import net.corda.core.contracts.USD -import net.corda.core.crypto.AbstractParty +import net.corda.core.identity.AbstractParty import net.corda.core.failure import net.corda.core.serialization.OpaqueBytes import net.corda.core.success diff --git a/tools/loadtest/src/main/kotlin/net/corda/loadtest/tests/GenerateHelpers.kt b/tools/loadtest/src/main/kotlin/net/corda/loadtest/tests/GenerateHelpers.kt index ae2fae3401..9794ddb9b9 100644 --- a/tools/loadtest/src/main/kotlin/net/corda/loadtest/tests/GenerateHelpers.kt +++ b/tools/loadtest/src/main/kotlin/net/corda/loadtest/tests/GenerateHelpers.kt @@ -6,7 +6,7 @@ import net.corda.client.mock.pickOne import net.corda.core.contracts.Issued import net.corda.core.contracts.PartyAndReference import net.corda.core.contracts.withoutIssuer -import net.corda.core.crypto.Party +import net.corda.core.identity.Party import net.corda.core.serialization.OpaqueBytes import net.corda.flows.CashFlowCommand import java.util.* diff --git a/tools/loadtest/src/main/kotlin/net/corda/loadtest/tests/SelfIssueTest.kt b/tools/loadtest/src/main/kotlin/net/corda/loadtest/tests/SelfIssueTest.kt index 8698a7a8f2..62c4753449 100644 --- a/tools/loadtest/src/main/kotlin/net/corda/loadtest/tests/SelfIssueTest.kt +++ b/tools/loadtest/src/main/kotlin/net/corda/loadtest/tests/SelfIssueTest.kt @@ -7,7 +7,7 @@ import net.corda.client.mock.replicatePoisson import net.corda.client.rpc.notUsed import net.corda.contracts.asset.Cash import net.corda.core.contracts.USD -import net.corda.core.crypto.AbstractParty +import net.corda.core.identity.AbstractParty import net.corda.core.flows.FlowException import net.corda.core.getOrThrow import net.corda.flows.CashFlowCommand diff --git a/verifier/src/integration-test/kotlin/net/corda/verifier/GeneratedLedger.kt b/verifier/src/integration-test/kotlin/net/corda/verifier/GeneratedLedger.kt index f6bdc61f43..42aa9c5488 100644 --- a/verifier/src/integration-test/kotlin/net/corda/verifier/GeneratedLedger.kt +++ b/verifier/src/integration-test/kotlin/net/corda/verifier/GeneratedLedger.kt @@ -3,6 +3,7 @@ package net.corda.verifier import net.corda.client.mock.* import net.corda.core.contracts.* import net.corda.core.crypto.* +import net.corda.core.identity.Party import net.corda.core.transactions.LedgerTransaction import net.corda.core.transactions.WireTransaction import java.io.ByteArrayInputStream