From 9d83a9b6d21b806f45f85670dd038462ca91eb11 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Tue, 6 Sep 2016 12:20:27 +0200 Subject: [PATCH] Minor: move transaction types out of the contracts package and into a new transactions package --- .../com/r3corda/contracts/AnotherDummyContract.kt | 1 + .../com/r3corda/core/node/DummyContractBackdoor.kt | 2 +- .../com/r3corda/contracts/JavaCommercialPaper.java | 1 + .../kotlin/com/r3corda/contracts/CommercialPaper.kt | 1 + .../com/r3corda/contracts/CommercialPaperLegacy.kt | 1 + .../src/main/kotlin/com/r3corda/contracts/IRS.kt | 1 + .../main/kotlin/com/r3corda/contracts/asset/Cash.kt | 1 + .../com/r3corda/contracts/asset/CommodityContract.kt | 1 + .../kotlin/com/r3corda/contracts/asset/Obligation.kt | 1 + .../com/r3corda/contracts/asset/OnLedgerAsset.kt | 1 + .../contracts/clause/AbstractConserveAmount.kt | 1 + .../com/r3corda/contracts/testing/WalletFiller.kt | 2 +- .../com/r3corda/protocols/TwoPartyTradeProtocol.kt | 3 +++ .../com/r3corda/contracts/CommercialPaperTests.kt | 2 ++ .../src/test/kotlin/com/r3corda/contracts/IRSTests.kt | 1 + .../kotlin/com/r3corda/contracts/asset/CashTests.kt | 1 + .../com/r3corda/core/contracts/DummyContract.kt | 1 + .../kotlin/com/r3corda/core/contracts/Structures.kt | 1 + .../r3corda/core/contracts/TransactionGraphSearch.kt | 2 ++ .../com/r3corda/core/contracts/TransactionTools.kt | 3 +++ .../com/r3corda/core/contracts/TransactionTypes.kt | 3 ++- .../r3corda/core/contracts/TransactionVerification.kt | 1 + .../main/kotlin/com/r3corda/core/node/ServiceHub.kt | 2 +- .../kotlin/com/r3corda/core/node/services/Services.kt | 1 + .../r3corda/core/node/services/TransactionStorage.kt | 2 +- .../kotlin/com/r3corda/core/serialization/Kryo.kt | 2 ++ .../com/r3corda/core/testing/InMemoryWalletService.kt | 1 + .../{contracts => transactions}/TransactionBuilder.kt | 5 ++++- .../core/{contracts => transactions}/Transactions.kt | 3 ++- .../protocols/AbstractStateReplacementProtocol.kt | 2 ++ .../r3corda/protocols/BroadcastTransactionProtocol.kt | 2 +- .../r3corda/protocols/FetchTransactionsProtocol.kt | 2 +- .../kotlin/com/r3corda/protocols/FinalityProtocol.kt | 6 +++--- .../com/r3corda/protocols/NotaryChangeProtocol.kt | 1 + .../kotlin/com/r3corda/protocols/NotaryProtocol.kt | 4 ++-- .../kotlin/com/r3corda/protocols/RatesFixProtocol.kt | 4 ++-- .../r3corda/protocols/ResolveTransactionsProtocol.kt | 6 +++--- .../com/r3corda/protocols/TwoPartyDealProtocol.kt | 3 +++ .../com/r3corda/protocols/ValidatingNotaryProtocol.kt | 4 ++-- .../core/contracts/TransactionGraphSearchTests.kt | 2 ++ .../r3corda/core/node/AttachmentClassLoaderTests.kt | 1 + .../core/protocols/ResolveTransactionsProtocolTest.kt | 2 +- .../serialization/TransactionSerializationTests.kt | 1 + .../kotlin/com/r3corda/contracts/AccountReceivable.kt | 1 + .../com/r3corda/contracts/BillOfLadingAgreement.kt | 1 + .../src/main/kotlin/com/r3corda/contracts/Invoice.kt | 1 + .../kotlin/com/r3corda/contracts/LCApplication.kt | 1 + .../src/main/kotlin/com/r3corda/contracts/LOC.kt | 1 + .../r3corda/contracts/universal/UniversalContract.kt | 1 + .../com/r3corda/contracts/AccountReceivableTests.kt | 2 +- .../r3corda/contracts/BillOfLadingAgreementTests.kt | 11 ++++++----- .../src/main/kotlin/com/r3corda/node/api/APIServer.kt | 2 ++ .../kotlin/com/r3corda/node/internal/APIServerImpl.kt | 2 ++ .../kotlin/com/r3corda/node/internal/AbstractNode.kt | 2 +- .../r3corda/node/services/api/ServiceHubInternal.kt | 2 +- .../node/services/clientapi/NodeInterestRates.kt | 1 + .../com/r3corda/node/services/monitor/Events.kt | 1 + .../node/services/monitor/WalletMonitorService.kt | 2 ++ .../node/services/persistence/DataVendingService.kt | 2 +- .../services/persistence/PerFileTransactionStorage.kt | 2 +- .../node/messaging/TwoPartyTradeProtocolTests.kt | 2 ++ .../r3corda/node/services/MockServiceHubInternal.kt | 2 +- .../r3corda/node/services/NodeWalletServiceTest.kt | 2 +- .../com/r3corda/node/services/WalletWithCashTest.kt | 1 + .../persistence/PerFileTransactionStorageTests.kt | 2 +- src/main/kotlin/com/r3corda/demos/TraderDemo.kt | 1 + .../com/r3corda/demos/api/InterestRateSwapAPI.kt | 2 +- .../com/r3corda/demos/protocols/AutoOfferProtocol.kt | 2 +- .../kotlin/com/r3corda/simulation/IRSSimulation.kt | 2 +- .../kotlin/com/r3corda/simulation/TradeSimulation.kt | 2 +- .../main/kotlin/com/r3corda/testing/CoreTestUtils.kt | 2 +- .../com/r3corda/testing/LedgerDSLInterpreter.kt | 2 ++ .../src/main/kotlin/com/r3corda/testing/TestDSL.kt | 3 +++ .../com/r3corda/testing/TransactionDSLInterpreter.kt | 1 + .../kotlin/com/r3corda/testing/node/MockServices.kt | 2 +- 75 files changed, 110 insertions(+), 41 deletions(-) rename core/src/main/kotlin/com/r3corda/core/{contracts => transactions}/TransactionBuilder.kt (97%) rename core/src/main/kotlin/com/r3corda/core/{contracts => transactions}/Transactions.kt (99%) diff --git a/contracts/isolated/src/main/kotlin/com/r3corda/contracts/AnotherDummyContract.kt b/contracts/isolated/src/main/kotlin/com/r3corda/contracts/AnotherDummyContract.kt index d2195e3b25..a827c4cc5c 100644 --- a/contracts/isolated/src/main/kotlin/com/r3corda/contracts/AnotherDummyContract.kt +++ b/contracts/isolated/src/main/kotlin/com/r3corda/contracts/AnotherDummyContract.kt @@ -11,6 +11,7 @@ package com.r3corda.contracts.isolated import com.r3corda.core.contracts.* import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash +import com.r3corda.core.transactions.TransactionBuilder import java.security.PublicKey // The dummy contract doesn't do anything useful. It exists for testing purposes. diff --git a/contracts/isolated/src/main/kotlin/com/r3corda/core/node/DummyContractBackdoor.kt b/contracts/isolated/src/main/kotlin/com/r3corda/core/node/DummyContractBackdoor.kt index b54b87eb64..440aec8e64 100644 --- a/contracts/isolated/src/main/kotlin/com/r3corda/core/node/DummyContractBackdoor.kt +++ b/contracts/isolated/src/main/kotlin/com/r3corda/core/node/DummyContractBackdoor.kt @@ -2,7 +2,7 @@ package com.r3corda.core.node import com.r3corda.core.contracts.ContractState import com.r3corda.core.contracts.PartyAndReference -import com.r3corda.core.contracts.TransactionBuilder +import com.r3corda.core.transactions.TransactionBuilder import com.r3corda.core.crypto.Party interface DummyContractBackdoor { diff --git a/contracts/src/main/java/com/r3corda/contracts/JavaCommercialPaper.java b/contracts/src/main/java/com/r3corda/contracts/JavaCommercialPaper.java index 3fe14944e0..6562fa99f9 100644 --- a/contracts/src/main/java/com/r3corda/contracts/JavaCommercialPaper.java +++ b/contracts/src/main/java/com/r3corda/contracts/JavaCommercialPaper.java @@ -7,6 +7,7 @@ import com.r3corda.core.contracts.Timestamp; import com.r3corda.core.contracts.TransactionForContract.*; import com.r3corda.core.contracts.clauses.*; import com.r3corda.core.crypto.*; +import com.r3corda.core.transactions.*; import kotlin.*; import org.jetbrains.annotations.*; diff --git a/contracts/src/main/kotlin/com/r3corda/contracts/CommercialPaper.kt b/contracts/src/main/kotlin/com/r3corda/contracts/CommercialPaper.kt index c2ebea1e02..3ee0ba540d 100644 --- a/contracts/src/main/kotlin/com/r3corda/contracts/CommercialPaper.kt +++ b/contracts/src/main/kotlin/com/r3corda/contracts/CommercialPaper.kt @@ -11,6 +11,7 @@ import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash import com.r3corda.core.crypto.toStringShort import com.r3corda.core.random63BitValue +import com.r3corda.core.transactions.TransactionBuilder import com.r3corda.core.utilities.Emoji import java.security.PublicKey import java.time.Instant diff --git a/contracts/src/main/kotlin/com/r3corda/contracts/CommercialPaperLegacy.kt b/contracts/src/main/kotlin/com/r3corda/contracts/CommercialPaperLegacy.kt index 4dadc3df27..9da1d59c97 100644 --- a/contracts/src/main/kotlin/com/r3corda/contracts/CommercialPaperLegacy.kt +++ b/contracts/src/main/kotlin/com/r3corda/contracts/CommercialPaperLegacy.kt @@ -9,6 +9,7 @@ import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash import com.r3corda.core.crypto.toStringShort import com.r3corda.core.node.services.Wallet +import com.r3corda.core.transactions.TransactionBuilder import com.r3corda.core.utilities.Emoji import java.security.PublicKey import java.time.Instant diff --git a/contracts/src/main/kotlin/com/r3corda/contracts/IRS.kt b/contracts/src/main/kotlin/com/r3corda/contracts/IRS.kt index eeac0c81ed..b88cda50f0 100644 --- a/contracts/src/main/kotlin/com/r3corda/contracts/IRS.kt +++ b/contracts/src/main/kotlin/com/r3corda/contracts/IRS.kt @@ -5,6 +5,7 @@ import com.r3corda.core.contracts.clauses.* import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash import com.r3corda.core.protocols.ProtocolLogicRefFactory +import com.r3corda.core.transactions.TransactionBuilder import com.r3corda.core.utilities.suggestInterestRateAnnouncementTimeWindow import com.r3corda.protocols.TwoPartyDealProtocol import org.apache.commons.jexl3.JexlBuilder diff --git a/contracts/src/main/kotlin/com/r3corda/contracts/asset/Cash.kt b/contracts/src/main/kotlin/com/r3corda/contracts/asset/Cash.kt index 891b6c829c..c0ec4a819d 100644 --- a/contracts/src/main/kotlin/com/r3corda/contracts/asset/Cash.kt +++ b/contracts/src/main/kotlin/com/r3corda/contracts/asset/Cash.kt @@ -7,6 +7,7 @@ import com.r3corda.core.contracts.* import com.r3corda.core.contracts.clauses.* import com.r3corda.core.crypto.* import com.r3corda.core.node.services.Wallet +import com.r3corda.core.transactions.TransactionBuilder import com.r3corda.core.utilities.Emoji import java.math.BigInteger import java.security.PublicKey diff --git a/contracts/src/main/kotlin/com/r3corda/contracts/asset/CommodityContract.kt b/contracts/src/main/kotlin/com/r3corda/contracts/asset/CommodityContract.kt index fcc83f18ef..ab6e394b73 100644 --- a/contracts/src/main/kotlin/com/r3corda/contracts/asset/CommodityContract.kt +++ b/contracts/src/main/kotlin/com/r3corda/contracts/asset/CommodityContract.kt @@ -11,6 +11,7 @@ import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash import com.r3corda.core.crypto.newSecureRandom import com.r3corda.core.crypto.toStringShort +import com.r3corda.core.transactions.TransactionBuilder import java.security.PublicKey import java.util.* diff --git a/contracts/src/main/kotlin/com/r3corda/contracts/asset/Obligation.kt b/contracts/src/main/kotlin/com/r3corda/contracts/asset/Obligation.kt index 56baa4fa34..3806ea7d5d 100644 --- a/contracts/src/main/kotlin/com/r3corda/contracts/asset/Obligation.kt +++ b/contracts/src/main/kotlin/com/r3corda/contracts/asset/Obligation.kt @@ -6,6 +6,7 @@ import com.r3corda.core.contracts.* import com.r3corda.core.contracts.clauses.* import com.r3corda.core.crypto.* import com.r3corda.core.random63BitValue +import com.r3corda.core.transactions.TransactionBuilder import com.r3corda.core.utilities.* import java.math.BigInteger import java.security.PublicKey diff --git a/contracts/src/main/kotlin/com/r3corda/contracts/asset/OnLedgerAsset.kt b/contracts/src/main/kotlin/com/r3corda/contracts/asset/OnLedgerAsset.kt index 9378cc7b7e..43709dd19c 100644 --- a/contracts/src/main/kotlin/com/r3corda/contracts/asset/OnLedgerAsset.kt +++ b/contracts/src/main/kotlin/com/r3corda/contracts/asset/OnLedgerAsset.kt @@ -3,6 +3,7 @@ package com.r3corda.contracts.asset import com.r3corda.contracts.clause.AbstractConserveAmount import com.r3corda.core.contracts.* import com.r3corda.core.crypto.Party +import com.r3corda.core.transactions.TransactionBuilder import java.security.PublicKey ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/contracts/src/main/kotlin/com/r3corda/contracts/clause/AbstractConserveAmount.kt b/contracts/src/main/kotlin/com/r3corda/contracts/clause/AbstractConserveAmount.kt index cd3bd528b2..5fba9851e3 100644 --- a/contracts/src/main/kotlin/com/r3corda/contracts/clause/AbstractConserveAmount.kt +++ b/contracts/src/main/kotlin/com/r3corda/contracts/clause/AbstractConserveAmount.kt @@ -7,6 +7,7 @@ import com.r3corda.contracts.asset.sumFungibleOrZero import com.r3corda.core.contracts.* import com.r3corda.core.contracts.clauses.Clause import com.r3corda.core.crypto.Party +import com.r3corda.core.transactions.TransactionBuilder import java.security.PublicKey import java.util.* diff --git a/contracts/src/main/kotlin/com/r3corda/contracts/testing/WalletFiller.kt b/contracts/src/main/kotlin/com/r3corda/contracts/testing/WalletFiller.kt index 203a8c37bc..cfab433c4d 100644 --- a/contracts/src/main/kotlin/com/r3corda/contracts/testing/WalletFiller.kt +++ b/contracts/src/main/kotlin/com/r3corda/contracts/testing/WalletFiller.kt @@ -6,7 +6,7 @@ import com.r3corda.contracts.asset.DUMMY_CASH_ISSUER import com.r3corda.contracts.asset.DUMMY_CASH_ISSUER_KEY import com.r3corda.core.contracts.Amount import com.r3corda.core.contracts.Issued -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.contracts.TransactionType import com.r3corda.core.crypto.Party import com.r3corda.core.node.ServiceHub diff --git a/contracts/src/main/kotlin/com/r3corda/protocols/TwoPartyTradeProtocol.kt b/contracts/src/main/kotlin/com/r3corda/protocols/TwoPartyTradeProtocol.kt index b8b42a80df..b2bbea59c1 100644 --- a/contracts/src/main/kotlin/com/r3corda/protocols/TwoPartyTradeProtocol.kt +++ b/contracts/src/main/kotlin/com/r3corda/protocols/TwoPartyTradeProtocol.kt @@ -12,6 +12,9 @@ import com.r3corda.core.node.NodeInfo import com.r3corda.core.protocols.ProtocolLogic import com.r3corda.core.random63BitValue import com.r3corda.core.seconds +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.TransactionBuilder +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.utilities.ProgressTracker import com.r3corda.core.utilities.trace import java.security.KeyPair diff --git a/contracts/src/test/kotlin/com/r3corda/contracts/CommercialPaperTests.kt b/contracts/src/test/kotlin/com/r3corda/contracts/CommercialPaperTests.kt index f952cecbe8..6a212fc15d 100644 --- a/contracts/src/test/kotlin/com/r3corda/contracts/CommercialPaperTests.kt +++ b/contracts/src/test/kotlin/com/r3corda/contracts/CommercialPaperTests.kt @@ -7,6 +7,8 @@ import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash import com.r3corda.core.days import com.r3corda.core.seconds +import com.r3corda.core.transactions.LedgerTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.utilities.DUMMY_NOTARY import com.r3corda.core.utilities.DUMMY_NOTARY_KEY import com.r3corda.core.utilities.DUMMY_PUBKEY_1 diff --git a/contracts/src/test/kotlin/com/r3corda/contracts/IRSTests.kt b/contracts/src/test/kotlin/com/r3corda/contracts/IRSTests.kt index 3ab0a27b16..43d2f7f069 100644 --- a/contracts/src/test/kotlin/com/r3corda/contracts/IRSTests.kt +++ b/contracts/src/test/kotlin/com/r3corda/contracts/IRSTests.kt @@ -2,6 +2,7 @@ package com.r3corda.contracts import com.r3corda.core.contracts.* import com.r3corda.core.seconds +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.utilities.DUMMY_NOTARY import com.r3corda.core.utilities.DUMMY_NOTARY_KEY import com.r3corda.core.utilities.TEST_TX_TIME diff --git a/contracts/src/test/kotlin/com/r3corda/contracts/asset/CashTests.kt b/contracts/src/test/kotlin/com/r3corda/contracts/asset/CashTests.kt index 331c2c537c..088439fb33 100644 --- a/contracts/src/test/kotlin/com/r3corda/contracts/asset/CashTests.kt +++ b/contracts/src/test/kotlin/com/r3corda/contracts/asset/CashTests.kt @@ -4,6 +4,7 @@ import com.r3corda.core.contracts.* import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash import com.r3corda.core.serialization.OpaqueBytes +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.utilities.DUMMY_NOTARY import com.r3corda.core.utilities.DUMMY_PUBKEY_1 import com.r3corda.core.utilities.DUMMY_PUBKEY_2 diff --git a/core/src/main/kotlin/com/r3corda/core/contracts/DummyContract.kt b/core/src/main/kotlin/com/r3corda/core/contracts/DummyContract.kt index 174a58f100..a1c437bd18 100644 --- a/core/src/main/kotlin/com/r3corda/core/contracts/DummyContract.kt +++ b/core/src/main/kotlin/com/r3corda/core/contracts/DummyContract.kt @@ -2,6 +2,7 @@ package com.r3corda.core.contracts import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash +import com.r3corda.core.transactions.TransactionBuilder import java.security.PublicKey // The dummy contract doesn't do anything useful. It exists for testing purposes. diff --git a/core/src/main/kotlin/com/r3corda/core/contracts/Structures.kt b/core/src/main/kotlin/com/r3corda/core/contracts/Structures.kt index b62d81cbd1..3322806ee1 100644 --- a/core/src/main/kotlin/com/r3corda/core/contracts/Structures.kt +++ b/core/src/main/kotlin/com/r3corda/core/contracts/Structures.kt @@ -8,6 +8,7 @@ import com.r3corda.core.protocols.ProtocolLogicRef import com.r3corda.core.protocols.ProtocolLogicRefFactory import com.r3corda.core.serialization.OpaqueBytes import com.r3corda.core.serialization.serialize +import com.r3corda.core.transactions.TransactionBuilder import java.io.FileNotFoundException import java.io.InputStream import java.io.OutputStream diff --git a/core/src/main/kotlin/com/r3corda/core/contracts/TransactionGraphSearch.kt b/core/src/main/kotlin/com/r3corda/core/contracts/TransactionGraphSearch.kt index 85aa052d22..a6db59ea4e 100644 --- a/core/src/main/kotlin/com/r3corda/core/contracts/TransactionGraphSearch.kt +++ b/core/src/main/kotlin/com/r3corda/core/contracts/TransactionGraphSearch.kt @@ -2,6 +2,8 @@ package com.r3corda.core.contracts import com.r3corda.core.crypto.SecureHash import com.r3corda.core.node.services.ReadOnlyTransactionStorage +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.WireTransaction import java.util.* import java.util.concurrent.Callable diff --git a/core/src/main/kotlin/com/r3corda/core/contracts/TransactionTools.kt b/core/src/main/kotlin/com/r3corda/core/contracts/TransactionTools.kt index c72e204625..ad4ff4f6cd 100644 --- a/core/src/main/kotlin/com/r3corda/core/contracts/TransactionTools.kt +++ b/core/src/main/kotlin/com/r3corda/core/contracts/TransactionTools.kt @@ -1,6 +1,9 @@ package com.r3corda.core.contracts import com.r3corda.core.node.ServiceHub +import com.r3corda.core.transactions.LedgerTransaction +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.WireTransaction import java.io.FileNotFoundException // TODO: Move these into the actual classes (i.e. where people would expect to find them) and split Transactions.kt into multiple files diff --git a/core/src/main/kotlin/com/r3corda/core/contracts/TransactionTypes.kt b/core/src/main/kotlin/com/r3corda/core/contracts/TransactionTypes.kt index 078009be88..e86e1edc89 100644 --- a/core/src/main/kotlin/com/r3corda/core/contracts/TransactionTypes.kt +++ b/core/src/main/kotlin/com/r3corda/core/contracts/TransactionTypes.kt @@ -1,7 +1,8 @@ package com.r3corda.core.contracts import com.r3corda.core.crypto.Party -import com.r3corda.core.noneOrSingle +import com.r3corda.core.transactions.LedgerTransaction +import com.r3corda.core.transactions.TransactionBuilder import java.security.PublicKey /** Defines transaction build & validation logic for a specific transaction type */ diff --git a/core/src/main/kotlin/com/r3corda/core/contracts/TransactionVerification.kt b/core/src/main/kotlin/com/r3corda/core/contracts/TransactionVerification.kt index 44ea14f1c7..dc9052ebf6 100644 --- a/core/src/main/kotlin/com/r3corda/core/contracts/TransactionVerification.kt +++ b/core/src/main/kotlin/com/r3corda/core/contracts/TransactionVerification.kt @@ -3,6 +3,7 @@ package com.r3corda.core.contracts import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash import com.r3corda.core.crypto.toStringShort +import com.r3corda.core.transactions.LedgerTransaction import java.security.PublicKey import java.util.* diff --git a/core/src/main/kotlin/com/r3corda/core/node/ServiceHub.kt b/core/src/main/kotlin/com/r3corda/core/node/ServiceHub.kt index 5a6349e954..b0691b2492 100644 --- a/core/src/main/kotlin/com/r3corda/core/node/ServiceHub.kt +++ b/core/src/main/kotlin/com/r3corda/core/node/ServiceHub.kt @@ -1,7 +1,7 @@ package com.r3corda.core.node import com.google.common.util.concurrent.ListenableFuture -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.contracts.StateRef import com.r3corda.core.contracts.TransactionResolutionException import com.r3corda.core.contracts.TransactionState diff --git a/core/src/main/kotlin/com/r3corda/core/node/services/Services.kt b/core/src/main/kotlin/com/r3corda/core/node/services/Services.kt index 802a8624b1..4063a330c5 100644 --- a/core/src/main/kotlin/com/r3corda/core/node/services/Services.kt +++ b/core/src/main/kotlin/com/r3corda/core/node/services/Services.kt @@ -5,6 +5,7 @@ import com.google.common.util.concurrent.SettableFuture import com.r3corda.core.contracts.* import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash +import com.r3corda.core.transactions.WireTransaction import java.security.KeyPair import java.security.PrivateKey import java.security.PublicKey diff --git a/core/src/main/kotlin/com/r3corda/core/node/services/TransactionStorage.kt b/core/src/main/kotlin/com/r3corda/core/node/services/TransactionStorage.kt index e3479e0cd9..5d55d6490f 100644 --- a/core/src/main/kotlin/com/r3corda/core/node/services/TransactionStorage.kt +++ b/core/src/main/kotlin/com/r3corda/core/node/services/TransactionStorage.kt @@ -1,6 +1,6 @@ package com.r3corda.core.node.services -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.crypto.SecureHash /** diff --git a/core/src/main/kotlin/com/r3corda/core/serialization/Kryo.kt b/core/src/main/kotlin/com/r3corda/core/serialization/Kryo.kt index e0d90e6a23..8fc69a35f8 100644 --- a/core/src/main/kotlin/com/r3corda/core/serialization/Kryo.kt +++ b/core/src/main/kotlin/com/r3corda/core/serialization/Kryo.kt @@ -13,6 +13,8 @@ import com.r3corda.core.contracts.* import com.r3corda.core.crypto.* import com.r3corda.core.node.AttachmentsClassLoader import com.r3corda.core.node.services.AttachmentStorage +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.utilities.NonEmptySet import com.r3corda.core.utilities.NonEmptySetSerializer import de.javakaffee.kryoserializers.ArraysAsListSerializer diff --git a/core/src/main/kotlin/com/r3corda/core/testing/InMemoryWalletService.kt b/core/src/main/kotlin/com/r3corda/core/testing/InMemoryWalletService.kt index 8306960bf5..200f1adb22 100644 --- a/core/src/main/kotlin/com/r3corda/core/testing/InMemoryWalletService.kt +++ b/core/src/main/kotlin/com/r3corda/core/testing/InMemoryWalletService.kt @@ -7,6 +7,7 @@ import com.r3corda.core.node.ServiceHub import com.r3corda.core.node.services.Wallet import com.r3corda.core.node.services.WalletService import com.r3corda.core.serialization.SingletonSerializeAsToken +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.utilities.loggerFor import com.r3corda.core.utilities.trace import rx.Observable diff --git a/core/src/main/kotlin/com/r3corda/core/contracts/TransactionBuilder.kt b/core/src/main/kotlin/com/r3corda/core/transactions/TransactionBuilder.kt similarity index 97% rename from core/src/main/kotlin/com/r3corda/core/contracts/TransactionBuilder.kt rename to core/src/main/kotlin/com/r3corda/core/transactions/TransactionBuilder.kt index 5e9b3ae9fb..34d5e0f623 100644 --- a/core/src/main/kotlin/com/r3corda/core/contracts/TransactionBuilder.kt +++ b/core/src/main/kotlin/com/r3corda/core/transactions/TransactionBuilder.kt @@ -1,7 +1,10 @@ -package com.r3corda.core.contracts +package com.r3corda.core.transactions +import com.r3corda.core.contracts.* import com.r3corda.core.crypto.* import com.r3corda.core.serialization.serialize +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.WireTransaction import java.security.KeyPair import java.security.PublicKey import java.time.Duration diff --git a/core/src/main/kotlin/com/r3corda/core/contracts/Transactions.kt b/core/src/main/kotlin/com/r3corda/core/transactions/Transactions.kt similarity index 99% rename from core/src/main/kotlin/com/r3corda/core/contracts/Transactions.kt rename to core/src/main/kotlin/com/r3corda/core/transactions/Transactions.kt index 03397d7542..205a8e8445 100644 --- a/core/src/main/kotlin/com/r3corda/core/contracts/Transactions.kt +++ b/core/src/main/kotlin/com/r3corda/core/transactions/Transactions.kt @@ -1,6 +1,7 @@ -package com.r3corda.core.contracts +package com.r3corda.core.transactions import com.esotericsoftware.kryo.Kryo +import com.r3corda.core.contracts.* import com.r3corda.core.crypto.DigitalSignature import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash diff --git a/core/src/main/kotlin/com/r3corda/protocols/AbstractStateReplacementProtocol.kt b/core/src/main/kotlin/com/r3corda/protocols/AbstractStateReplacementProtocol.kt index 275b884013..0a68e78895 100644 --- a/core/src/main/kotlin/com/r3corda/protocols/AbstractStateReplacementProtocol.kt +++ b/core/src/main/kotlin/com/r3corda/protocols/AbstractStateReplacementProtocol.kt @@ -9,6 +9,8 @@ import com.r3corda.core.messaging.Ack import com.r3corda.core.node.NodeInfo import com.r3corda.core.protocols.ProtocolLogic import com.r3corda.core.random63BitValue +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.utilities.ProgressTracker import com.r3corda.protocols.AbstractStateReplacementProtocol.Acceptor import com.r3corda.protocols.AbstractStateReplacementProtocol.Instigator diff --git a/core/src/main/kotlin/com/r3corda/protocols/BroadcastTransactionProtocol.kt b/core/src/main/kotlin/com/r3corda/protocols/BroadcastTransactionProtocol.kt index c95fdfe780..da4a813858 100644 --- a/core/src/main/kotlin/com/r3corda/protocols/BroadcastTransactionProtocol.kt +++ b/core/src/main/kotlin/com/r3corda/protocols/BroadcastTransactionProtocol.kt @@ -2,7 +2,7 @@ package com.r3corda.protocols import co.paralleluniverse.fibers.Suspendable import com.r3corda.core.contracts.ClientToServiceCommand -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.crypto.Party import com.r3corda.core.protocols.ProtocolLogic import com.r3corda.core.random63BitValue diff --git a/core/src/main/kotlin/com/r3corda/protocols/FetchTransactionsProtocol.kt b/core/src/main/kotlin/com/r3corda/protocols/FetchTransactionsProtocol.kt index 69d7535ea7..1ceacafd0b 100644 --- a/core/src/main/kotlin/com/r3corda/protocols/FetchTransactionsProtocol.kt +++ b/core/src/main/kotlin/com/r3corda/protocols/FetchTransactionsProtocol.kt @@ -1,6 +1,6 @@ package com.r3corda.protocols -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash diff --git a/core/src/main/kotlin/com/r3corda/protocols/FinalityProtocol.kt b/core/src/main/kotlin/com/r3corda/protocols/FinalityProtocol.kt index 4a8409a709..df657bee3c 100644 --- a/core/src/main/kotlin/com/r3corda/protocols/FinalityProtocol.kt +++ b/core/src/main/kotlin/com/r3corda/protocols/FinalityProtocol.kt @@ -3,9 +3,9 @@ package com.r3corda.protocols import co.paralleluniverse.fibers.Suspendable import com.google.common.util.concurrent.ListenableFuture import com.r3corda.core.contracts.ClientToServiceCommand -import com.r3corda.core.contracts.SignedTransaction -import com.r3corda.core.contracts.TransactionBuilder -import com.r3corda.core.contracts.WireTransaction +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.TransactionBuilder +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.crypto.Party import com.r3corda.core.node.ServiceHub import com.r3corda.core.protocols.ProtocolLogic diff --git a/core/src/main/kotlin/com/r3corda/protocols/NotaryChangeProtocol.kt b/core/src/main/kotlin/com/r3corda/protocols/NotaryChangeProtocol.kt index 9321d12df9..487d11d33f 100644 --- a/core/src/main/kotlin/com/r3corda/protocols/NotaryChangeProtocol.kt +++ b/core/src/main/kotlin/com/r3corda/protocols/NotaryChangeProtocol.kt @@ -3,6 +3,7 @@ package com.r3corda.protocols import co.paralleluniverse.fibers.Suspendable import com.r3corda.core.contracts.* import com.r3corda.core.crypto.Party +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.utilities.ProgressTracker import java.security.PublicKey diff --git a/core/src/main/kotlin/com/r3corda/protocols/NotaryProtocol.kt b/core/src/main/kotlin/com/r3corda/protocols/NotaryProtocol.kt index d7b8813a71..9de10521df 100644 --- a/core/src/main/kotlin/com/r3corda/protocols/NotaryProtocol.kt +++ b/core/src/main/kotlin/com/r3corda/protocols/NotaryProtocol.kt @@ -1,10 +1,10 @@ package com.r3corda.protocols import co.paralleluniverse.fibers.Suspendable -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.contracts.StateRef import com.r3corda.core.contracts.Timestamp -import com.r3corda.core.contracts.WireTransaction +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.crypto.DigitalSignature import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SignedData diff --git a/core/src/main/kotlin/com/r3corda/protocols/RatesFixProtocol.kt b/core/src/main/kotlin/com/r3corda/protocols/RatesFixProtocol.kt index 2bf0a459b1..106adcb50a 100644 --- a/core/src/main/kotlin/com/r3corda/protocols/RatesFixProtocol.kt +++ b/core/src/main/kotlin/com/r3corda/protocols/RatesFixProtocol.kt @@ -3,8 +3,8 @@ package com.r3corda.protocols import co.paralleluniverse.fibers.Suspendable import com.r3corda.core.contracts.Fix import com.r3corda.core.contracts.FixOf -import com.r3corda.core.contracts.TransactionBuilder -import com.r3corda.core.contracts.WireTransaction +import com.r3corda.core.transactions.TransactionBuilder +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.crypto.DigitalSignature import com.r3corda.core.crypto.Party import com.r3corda.core.protocols.ProtocolLogic diff --git a/core/src/main/kotlin/com/r3corda/protocols/ResolveTransactionsProtocol.kt b/core/src/main/kotlin/com/r3corda/protocols/ResolveTransactionsProtocol.kt index c8efaadc81..3ef021bbbe 100644 --- a/core/src/main/kotlin/com/r3corda/protocols/ResolveTransactionsProtocol.kt +++ b/core/src/main/kotlin/com/r3corda/protocols/ResolveTransactionsProtocol.kt @@ -2,9 +2,9 @@ package com.r3corda.protocols import co.paralleluniverse.fibers.Suspendable import com.r3corda.core.checkedAdd -import com.r3corda.core.contracts.LedgerTransaction -import com.r3corda.core.contracts.SignedTransaction -import com.r3corda.core.contracts.WireTransaction +import com.r3corda.core.transactions.LedgerTransaction +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.contracts.toLedgerTransaction import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash diff --git a/core/src/main/kotlin/com/r3corda/protocols/TwoPartyDealProtocol.kt b/core/src/main/kotlin/com/r3corda/protocols/TwoPartyDealProtocol.kt index a1b09a49cd..7ca2bb542f 100644 --- a/core/src/main/kotlin/com/r3corda/protocols/TwoPartyDealProtocol.kt +++ b/core/src/main/kotlin/com/r3corda/protocols/TwoPartyDealProtocol.kt @@ -11,6 +11,9 @@ import com.r3corda.core.node.services.DEFAULT_SESSION_ID import com.r3corda.core.protocols.ProtocolLogic import com.r3corda.core.random63BitValue import com.r3corda.core.seconds +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.TransactionBuilder +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.utilities.ProgressTracker import com.r3corda.core.utilities.UntrustworthyData import com.r3corda.core.utilities.trace diff --git a/core/src/main/kotlin/com/r3corda/protocols/ValidatingNotaryProtocol.kt b/core/src/main/kotlin/com/r3corda/protocols/ValidatingNotaryProtocol.kt index e38067a464..ac913a5fb5 100644 --- a/core/src/main/kotlin/com/r3corda/protocols/ValidatingNotaryProtocol.kt +++ b/core/src/main/kotlin/com/r3corda/protocols/ValidatingNotaryProtocol.kt @@ -1,9 +1,9 @@ package com.r3corda.protocols import co.paralleluniverse.fibers.Suspendable -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.contracts.TransactionVerificationException -import com.r3corda.core.contracts.WireTransaction +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.contracts.toLedgerTransaction import com.r3corda.core.crypto.Party import com.r3corda.core.node.services.TimestampChecker diff --git a/core/src/test/kotlin/com/r3corda/core/contracts/TransactionGraphSearchTests.kt b/core/src/test/kotlin/com/r3corda/core/contracts/TransactionGraphSearchTests.kt index 99e23bad6d..ec77c5b42f 100644 --- a/core/src/test/kotlin/com/r3corda/core/contracts/TransactionGraphSearchTests.kt +++ b/core/src/test/kotlin/com/r3corda/core/contracts/TransactionGraphSearchTests.kt @@ -1,6 +1,8 @@ package com.r3corda.core.contracts import com.r3corda.core.crypto.newSecureRandom +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.utilities.DUMMY_NOTARY import com.r3corda.core.utilities.DUMMY_NOTARY_KEY import com.r3corda.testing.node.MockTransactionStorage diff --git a/core/src/test/kotlin/com/r3corda/core/node/AttachmentClassLoaderTests.kt b/core/src/test/kotlin/com/r3corda/core/node/AttachmentClassLoaderTests.kt index 448d2b720a..e2ec13d161 100644 --- a/core/src/test/kotlin/com/r3corda/core/node/AttachmentClassLoaderTests.kt +++ b/core/src/test/kotlin/com/r3corda/core/node/AttachmentClassLoaderTests.kt @@ -5,6 +5,7 @@ import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash import com.r3corda.core.node.services.AttachmentStorage import com.r3corda.core.serialization.* +import com.r3corda.core.transactions.TransactionBuilder import com.r3corda.core.utilities.DUMMY_NOTARY import com.r3corda.testing.node.MockAttachmentStorage import com.r3corda.testing.MEGA_CORP diff --git a/core/src/test/kotlin/com/r3corda/core/protocols/ResolveTransactionsProtocolTest.kt b/core/src/test/kotlin/com/r3corda/core/protocols/ResolveTransactionsProtocolTest.kt index f77955bd8d..bf766a2998 100644 --- a/core/src/test/kotlin/com/r3corda/core/protocols/ResolveTransactionsProtocolTest.kt +++ b/core/src/test/kotlin/com/r3corda/core/protocols/ResolveTransactionsProtocolTest.kt @@ -1,7 +1,7 @@ package com.r3corda.core.protocols import com.r3corda.core.contracts.DummyContract -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.crypto.NullSignature import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash diff --git a/core/src/test/kotlin/com/r3corda/core/serialization/TransactionSerializationTests.kt b/core/src/test/kotlin/com/r3corda/core/serialization/TransactionSerializationTests.kt index e51030a932..631274d8c9 100644 --- a/core/src/test/kotlin/com/r3corda/core/serialization/TransactionSerializationTests.kt +++ b/core/src/test/kotlin/com/r3corda/core/serialization/TransactionSerializationTests.kt @@ -3,6 +3,7 @@ package com.r3corda.core.serialization import com.r3corda.core.contracts.* import com.r3corda.core.crypto.SecureHash import com.r3corda.core.seconds +import com.r3corda.core.transactions.TransactionBuilder import com.r3corda.core.utilities.* import com.r3corda.testing.* import org.junit.Before diff --git a/experimental/src/main/kotlin/com/r3corda/contracts/AccountReceivable.kt b/experimental/src/main/kotlin/com/r3corda/contracts/AccountReceivable.kt index da4c940651..b3f61c7519 100644 --- a/experimental/src/main/kotlin/com/r3corda/contracts/AccountReceivable.kt +++ b/experimental/src/main/kotlin/com/r3corda/contracts/AccountReceivable.kt @@ -4,6 +4,7 @@ import com.r3corda.core.contracts.* import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash import com.r3corda.core.crypto.toStringShort +import com.r3corda.core.transactions.TransactionBuilder import java.security.PublicKey import java.time.LocalDate import java.time.ZoneOffset diff --git a/experimental/src/main/kotlin/com/r3corda/contracts/BillOfLadingAgreement.kt b/experimental/src/main/kotlin/com/r3corda/contracts/BillOfLadingAgreement.kt index cb76d9e88f..907b53dacd 100644 --- a/experimental/src/main/kotlin/com/r3corda/contracts/BillOfLadingAgreement.kt +++ b/experimental/src/main/kotlin/com/r3corda/contracts/BillOfLadingAgreement.kt @@ -4,6 +4,7 @@ import com.r3corda.core.contracts.* import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash import com.r3corda.core.days +import com.r3corda.core.transactions.TransactionBuilder import java.security.PublicKey import java.time.Instant import java.time.LocalDate diff --git a/experimental/src/main/kotlin/com/r3corda/contracts/Invoice.kt b/experimental/src/main/kotlin/com/r3corda/contracts/Invoice.kt index 5e4fe803eb..11c7d01442 100644 --- a/experimental/src/main/kotlin/com/r3corda/contracts/Invoice.kt +++ b/experimental/src/main/kotlin/com/r3corda/contracts/Invoice.kt @@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.r3corda.core.contracts.* import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash +import com.r3corda.core.transactions.TransactionBuilder import java.security.PublicKey import java.time.LocalDate import java.time.ZoneOffset diff --git a/experimental/src/main/kotlin/com/r3corda/contracts/LCApplication.kt b/experimental/src/main/kotlin/com/r3corda/contracts/LCApplication.kt index 079f86c66c..c956ced697 100644 --- a/experimental/src/main/kotlin/com/r3corda/contracts/LCApplication.kt +++ b/experimental/src/main/kotlin/com/r3corda/contracts/LCApplication.kt @@ -4,6 +4,7 @@ import com.r3corda.core.contracts.* import com.r3corda.core.crypto.NullPublicKey import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash +import com.r3corda.core.transactions.TransactionBuilder import java.security.PublicKey import java.time.LocalDate import java.time.Period diff --git a/experimental/src/main/kotlin/com/r3corda/contracts/LOC.kt b/experimental/src/main/kotlin/com/r3corda/contracts/LOC.kt index 3d67ea990e..e820ffc2b4 100644 --- a/experimental/src/main/kotlin/com/r3corda/contracts/LOC.kt +++ b/experimental/src/main/kotlin/com/r3corda/contracts/LOC.kt @@ -5,6 +5,7 @@ import com.r3corda.core.contracts.* import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash import com.r3corda.core.days +import com.r3corda.core.transactions.TransactionBuilder import java.security.PublicKey import java.time.Instant import java.time.LocalDate diff --git a/experimental/src/main/kotlin/com/r3corda/contracts/universal/UniversalContract.kt b/experimental/src/main/kotlin/com/r3corda/contracts/universal/UniversalContract.kt index 941de73bdb..cb674359e0 100644 --- a/experimental/src/main/kotlin/com/r3corda/contracts/universal/UniversalContract.kt +++ b/experimental/src/main/kotlin/com/r3corda/contracts/universal/UniversalContract.kt @@ -3,6 +3,7 @@ package com.r3corda.contracts.universal import com.r3corda.core.contracts.* import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash +import com.r3corda.core.transactions.TransactionBuilder import java.math.BigDecimal import java.security.PublicKey diff --git a/experimental/src/test/kotlin/com/r3corda/contracts/AccountReceivableTests.kt b/experimental/src/test/kotlin/com/r3corda/contracts/AccountReceivableTests.kt index 4a85daf122..7b44c53295 100644 --- a/experimental/src/test/kotlin/com/r3corda/contracts/AccountReceivableTests.kt +++ b/experimental/src/test/kotlin/com/r3corda/contracts/AccountReceivableTests.kt @@ -1,7 +1,7 @@ package com.r3corda.contracts import com.r3corda.core.contracts.DOLLARS -import com.r3corda.core.contracts.LedgerTransaction +import com.r3corda.core.transactions.LedgerTransaction import com.r3corda.core.contracts.`issued by` import com.r3corda.core.contracts.toLedgerTransaction import com.r3corda.core.seconds diff --git a/experimental/src/test/kotlin/com/r3corda/contracts/BillOfLadingAgreementTests.kt b/experimental/src/test/kotlin/com/r3corda/contracts/BillOfLadingAgreementTests.kt index 098b62c695..01bfef2fa3 100644 --- a/experimental/src/test/kotlin/com/r3corda/contracts/BillOfLadingAgreementTests.kt +++ b/experimental/src/test/kotlin/com/r3corda/contracts/BillOfLadingAgreementTests.kt @@ -2,6 +2,7 @@ package com.r3corda.contracts import com.r3corda.core.contracts.* import com.r3corda.core.crypto.SecureHash +import com.r3corda.core.transactions.TransactionBuilder import com.r3corda.core.utilities.DUMMY_NOTARY import com.r3corda.core.utilities.DUMMY_NOTARY_KEY import com.r3corda.testing.node.MockServices @@ -81,7 +82,7 @@ class BillOfLadingAgreementTests { // @Test // TODO: Fix Test fun transferAndEndorseGenerationMethod() { - val ptx:TransactionBuilder = TransactionType.General.Builder(notary = DUMMY_NOTARY) + val ptx: TransactionBuilder = TransactionType.General.Builder(notary = DUMMY_NOTARY) val sr = StateAndRef( TransactionState(Bill, DUMMY_NOTARY), StateRef(SecureHash.randomSHA256(), Random().nextInt(32)) @@ -95,7 +96,7 @@ class BillOfLadingAgreementTests { @Test(expected = IllegalStateException::class) fun transferAndEndorseGenerationMethod_MissingBeneficiarySignature() { - val ptx:TransactionBuilder = TransactionType.General.Builder(notary = DUMMY_NOTARY) + val ptx: TransactionBuilder = TransactionType.General.Builder(notary = DUMMY_NOTARY) val sr = StateAndRef( TransactionState(Bill, DUMMY_NOTARY), StateRef(SecureHash.randomSHA256(), Random().nextInt(32)) @@ -107,7 +108,7 @@ class BillOfLadingAgreementTests { @Test(expected = IllegalStateException::class) fun transferAndEndorseGenerationMethod_MissingOwnerSignature() { - val ptx:TransactionBuilder = TransactionType.General.Builder(notary = DUMMY_NOTARY) + val ptx: TransactionBuilder = TransactionType.General.Builder(notary = DUMMY_NOTARY) val sr = StateAndRef( TransactionState(Bill, DUMMY_NOTARY), StateRef(SecureHash.randomSHA256(), Random().nextInt(32)) @@ -119,7 +120,7 @@ class BillOfLadingAgreementTests { // @Test // TODO Fix Test fun transferPossessionGenerationMethod() { - val ptx:TransactionBuilder = TransactionType.General.Builder(notary = DUMMY_NOTARY) + val ptx: TransactionBuilder = TransactionType.General.Builder(notary = DUMMY_NOTARY) val sr = StateAndRef( TransactionState(Bill, DUMMY_NOTARY), StateRef(SecureHash.randomSHA256(), Random().nextInt(32)) @@ -131,7 +132,7 @@ class BillOfLadingAgreementTests { @Test(expected = IllegalStateException::class) fun transferPossessionGenerationMethod_Unsigned() { - val ptx:TransactionBuilder = TransactionType.General.Builder(notary = DUMMY_NOTARY) + val ptx: TransactionBuilder = TransactionType.General.Builder(notary = DUMMY_NOTARY) val sr = StateAndRef( TransactionState(Bill, DUMMY_NOTARY), StateRef(SecureHash.randomSHA256(), Random().nextInt(32)) diff --git a/node/src/main/kotlin/com/r3corda/node/api/APIServer.kt b/node/src/main/kotlin/com/r3corda/node/api/APIServer.kt index 451532e3c2..ef87de66cf 100644 --- a/node/src/main/kotlin/com/r3corda/node/api/APIServer.kt +++ b/node/src/main/kotlin/com/r3corda/node/api/APIServer.kt @@ -5,6 +5,8 @@ import com.r3corda.node.api.StatesQuery import com.r3corda.core.crypto.DigitalSignature import com.r3corda.core.crypto.SecureHash import com.r3corda.core.serialization.SerializedBytes +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.WireTransaction import java.time.Instant import java.time.LocalDateTime import javax.ws.rs.GET diff --git a/node/src/main/kotlin/com/r3corda/node/internal/APIServerImpl.kt b/node/src/main/kotlin/com/r3corda/node/internal/APIServerImpl.kt index ebd134a56a..5f2a821d6a 100644 --- a/node/src/main/kotlin/com/r3corda/node/internal/APIServerImpl.kt +++ b/node/src/main/kotlin/com/r3corda/node/internal/APIServerImpl.kt @@ -6,6 +6,8 @@ import com.r3corda.core.crypto.DigitalSignature import com.r3corda.core.crypto.SecureHash import com.r3corda.core.node.services.linearHeadsOfType import com.r3corda.core.serialization.SerializedBytes +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.WireTransaction import com.r3corda.node.api.* import java.time.LocalDateTime import javax.ws.rs.core.Response diff --git a/node/src/main/kotlin/com/r3corda/node/internal/AbstractNode.kt b/node/src/main/kotlin/com/r3corda/node/internal/AbstractNode.kt index e2bc9f76cb..b3d69a93be 100644 --- a/node/src/main/kotlin/com/r3corda/node/internal/AbstractNode.kt +++ b/node/src/main/kotlin/com/r3corda/node/internal/AbstractNode.kt @@ -5,7 +5,7 @@ import com.google.common.util.concurrent.ListenableFuture import com.google.common.util.concurrent.MoreExecutors import com.google.common.util.concurrent.SettableFuture import com.r3corda.core.RunOnCallerThread -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.crypto.Party import com.r3corda.core.messaging.runOnNextMessage import com.r3corda.core.node.CityDatabase diff --git a/node/src/main/kotlin/com/r3corda/node/services/api/ServiceHubInternal.kt b/node/src/main/kotlin/com/r3corda/node/services/api/ServiceHubInternal.kt index 0937dc5130..6d03e975e1 100644 --- a/node/src/main/kotlin/com/r3corda/node/services/api/ServiceHubInternal.kt +++ b/node/src/main/kotlin/com/r3corda/node/services/api/ServiceHubInternal.kt @@ -1,7 +1,7 @@ package com.r3corda.node.services.api import com.google.common.util.concurrent.ListenableFuture -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.messaging.MessagingService import com.r3corda.core.node.ServiceHub import com.r3corda.core.node.services.TxWritableStorageService diff --git a/node/src/main/kotlin/com/r3corda/node/services/clientapi/NodeInterestRates.kt b/node/src/main/kotlin/com/r3corda/node/services/clientapi/NodeInterestRates.kt index 65e75071aa..a55aea4bd8 100644 --- a/node/src/main/kotlin/com/r3corda/node/services/clientapi/NodeInterestRates.kt +++ b/node/src/main/kotlin/com/r3corda/node/services/clientapi/NodeInterestRates.kt @@ -12,6 +12,7 @@ import com.r3corda.core.math.InterpolatorFactory import com.r3corda.core.node.CordaPluginRegistry import com.r3corda.core.node.services.ServiceType import com.r3corda.core.protocols.ProtocolLogic +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.utilities.ProgressTracker import com.r3corda.node.services.api.AbstractNodeService import com.r3corda.node.services.api.AcceptsFileUpload diff --git a/node/src/main/kotlin/com/r3corda/node/services/monitor/Events.kt b/node/src/main/kotlin/com/r3corda/node/services/monitor/Events.kt index 01a38b0dc8..4540bb398c 100644 --- a/node/src/main/kotlin/com/r3corda/node/services/monitor/Events.kt +++ b/node/src/main/kotlin/com/r3corda/node/services/monitor/Events.kt @@ -1,6 +1,7 @@ package com.r3corda.node.services.monitor import com.r3corda.core.contracts.* +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.node.utilities.AddOrRemove import java.time.Instant import java.util.* diff --git a/node/src/main/kotlin/com/r3corda/node/services/monitor/WalletMonitorService.kt b/node/src/main/kotlin/com/r3corda/node/services/monitor/WalletMonitorService.kt index ebefa7b7bf..f04bb27957 100644 --- a/node/src/main/kotlin/com/r3corda/node/services/monitor/WalletMonitorService.kt +++ b/node/src/main/kotlin/com/r3corda/node/services/monitor/WalletMonitorService.kt @@ -14,6 +14,8 @@ import com.r3corda.core.node.services.DEFAULT_SESSION_ID import com.r3corda.core.node.services.Wallet import com.r3corda.core.protocols.ProtocolLogic import com.r3corda.core.serialization.serialize +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.TransactionBuilder import com.r3corda.core.utilities.loggerFor import com.r3corda.node.services.api.AbstractNodeService import com.r3corda.node.services.statemachine.StateMachineManager diff --git a/node/src/main/kotlin/com/r3corda/node/services/persistence/DataVendingService.kt b/node/src/main/kotlin/com/r3corda/node/services/persistence/DataVendingService.kt index aad4f93234..9a644d8dcf 100644 --- a/node/src/main/kotlin/com/r3corda/node/services/persistence/DataVendingService.kt +++ b/node/src/main/kotlin/com/r3corda/node/services/persistence/DataVendingService.kt @@ -2,7 +2,7 @@ package com.r3corda.node.services.persistence import com.google.common.util.concurrent.ListenableFuture import com.google.common.util.concurrent.SettableFuture -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.crypto.Party import com.r3corda.core.failure import com.r3corda.core.messaging.MessagingService diff --git a/node/src/main/kotlin/com/r3corda/node/services/persistence/PerFileTransactionStorage.kt b/node/src/main/kotlin/com/r3corda/node/services/persistence/PerFileTransactionStorage.kt index 4437733992..8acb1ba197 100644 --- a/node/src/main/kotlin/com/r3corda/node/services/persistence/PerFileTransactionStorage.kt +++ b/node/src/main/kotlin/com/r3corda/node/services/persistence/PerFileTransactionStorage.kt @@ -1,6 +1,6 @@ package com.r3corda.node.services.persistence -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.crypto.SecureHash import com.r3corda.core.node.services.TransactionStorage import com.r3corda.core.serialization.deserialize diff --git a/node/src/test/kotlin/com/r3corda/node/messaging/TwoPartyTradeProtocolTests.kt b/node/src/test/kotlin/com/r3corda/node/messaging/TwoPartyTradeProtocolTests.kt index f7f0fbb996..ceff4daa5a 100644 --- a/node/src/test/kotlin/com/r3corda/node/messaging/TwoPartyTradeProtocolTests.kt +++ b/node/src/test/kotlin/com/r3corda/node/messaging/TwoPartyTradeProtocolTests.kt @@ -14,6 +14,8 @@ import com.r3corda.core.node.services.ServiceType import com.r3corda.core.node.services.TransactionStorage import com.r3corda.core.node.services.Wallet import com.r3corda.core.random63BitValue +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.utilities.DUMMY_NOTARY import com.r3corda.core.utilities.DUMMY_NOTARY_KEY import com.r3corda.core.utilities.LogHelper diff --git a/node/src/test/kotlin/com/r3corda/node/services/MockServiceHubInternal.kt b/node/src/test/kotlin/com/r3corda/node/services/MockServiceHubInternal.kt index 696a3644f3..091b58735e 100644 --- a/node/src/test/kotlin/com/r3corda/node/services/MockServiceHubInternal.kt +++ b/node/src/test/kotlin/com/r3corda/node/services/MockServiceHubInternal.kt @@ -2,7 +2,7 @@ package com.r3corda.node.services import com.codahale.metrics.MetricRegistry import com.google.common.util.concurrent.ListenableFuture -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.node.services.* import com.r3corda.core.protocols.ProtocolLogic import com.r3corda.core.protocols.ProtocolLogicRefFactory diff --git a/node/src/test/kotlin/com/r3corda/node/services/NodeWalletServiceTest.kt b/node/src/test/kotlin/com/r3corda/node/services/NodeWalletServiceTest.kt index 08d94a0ca1..779c5eb4df 100644 --- a/node/src/test/kotlin/com/r3corda/node/services/NodeWalletServiceTest.kt +++ b/node/src/test/kotlin/com/r3corda/node/services/NodeWalletServiceTest.kt @@ -2,7 +2,7 @@ package com.r3corda.node.services import com.r3corda.contracts.testing.fillWithSomeTestCash import com.r3corda.core.contracts.DOLLARS -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.node.services.TxWritableStorageService import com.r3corda.core.node.services.WalletService import com.r3corda.testing.node.MockServices diff --git a/node/src/test/kotlin/com/r3corda/node/services/WalletWithCashTest.kt b/node/src/test/kotlin/com/r3corda/node/services/WalletWithCashTest.kt index 3de820b9f8..5bafcd85e3 100644 --- a/node/src/test/kotlin/com/r3corda/node/services/WalletWithCashTest.kt +++ b/node/src/test/kotlin/com/r3corda/node/services/WalletWithCashTest.kt @@ -6,6 +6,7 @@ import com.r3corda.contracts.asset.cashBalances import com.r3corda.contracts.testing.fillWithSomeTestCash import com.r3corda.core.contracts.* import com.r3corda.core.node.services.WalletService +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.utilities.DUMMY_NOTARY import com.r3corda.core.utilities.DUMMY_NOTARY_KEY import com.r3corda.core.utilities.LogHelper diff --git a/node/src/test/kotlin/com/r3corda/node/services/persistence/PerFileTransactionStorageTests.kt b/node/src/test/kotlin/com/r3corda/node/services/persistence/PerFileTransactionStorageTests.kt index 94ac5a89ab..7dc38dbf0b 100644 --- a/node/src/test/kotlin/com/r3corda/node/services/persistence/PerFileTransactionStorageTests.kt +++ b/node/src/test/kotlin/com/r3corda/node/services/persistence/PerFileTransactionStorageTests.kt @@ -4,7 +4,7 @@ import co.paralleluniverse.strands.SettableFuture import com.google.common.jimfs.Configuration.unix import com.google.common.jimfs.Jimfs import com.google.common.primitives.Ints -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.crypto.DigitalSignature import com.r3corda.core.crypto.NullPublicKey import com.r3corda.core.serialization.SerializedBytes diff --git a/src/main/kotlin/com/r3corda/demos/TraderDemo.kt b/src/main/kotlin/com/r3corda/demos/TraderDemo.kt index 3b4ab79a40..4bf342cfd5 100644 --- a/src/main/kotlin/com/r3corda/demos/TraderDemo.kt +++ b/src/main/kotlin/com/r3corda/demos/TraderDemo.kt @@ -17,6 +17,7 @@ import com.r3corda.core.node.services.DEFAULT_SESSION_ID import com.r3corda.core.node.services.ServiceType import com.r3corda.core.protocols.ProtocolLogic import com.r3corda.core.serialization.deserialize +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.utilities.Emoji import com.r3corda.core.utilities.LogHelper import com.r3corda.core.utilities.ProgressTracker diff --git a/src/main/kotlin/com/r3corda/demos/api/InterestRateSwapAPI.kt b/src/main/kotlin/com/r3corda/demos/api/InterestRateSwapAPI.kt index 964c35136a..e20938ea47 100644 --- a/src/main/kotlin/com/r3corda/demos/api/InterestRateSwapAPI.kt +++ b/src/main/kotlin/com/r3corda/demos/api/InterestRateSwapAPI.kt @@ -1,7 +1,7 @@ package com.r3corda.demos.api import com.r3corda.contracts.InterestRateSwap -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.failure import com.r3corda.core.node.ServiceHub import com.r3corda.core.node.services.linearHeadsOfType diff --git a/src/main/kotlin/com/r3corda/demos/protocols/AutoOfferProtocol.kt b/src/main/kotlin/com/r3corda/demos/protocols/AutoOfferProtocol.kt index 11ff47d0ea..22e5590749 100644 --- a/src/main/kotlin/com/r3corda/demos/protocols/AutoOfferProtocol.kt +++ b/src/main/kotlin/com/r3corda/demos/protocols/AutoOfferProtocol.kt @@ -4,7 +4,7 @@ import co.paralleluniverse.fibers.Suspendable import com.google.common.util.concurrent.FutureCallback import com.google.common.util.concurrent.Futures import com.r3corda.core.contracts.DealState -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.crypto.Party import com.r3corda.core.node.CordaPluginRegistry import com.r3corda.core.node.services.DEFAULT_SESSION_ID diff --git a/src/main/kotlin/com/r3corda/simulation/IRSSimulation.kt b/src/main/kotlin/com/r3corda/simulation/IRSSimulation.kt index fa3252b79c..6b782d2c5f 100644 --- a/src/main/kotlin/com/r3corda/simulation/IRSSimulation.kt +++ b/src/main/kotlin/com/r3corda/simulation/IRSSimulation.kt @@ -7,7 +7,7 @@ import com.google.common.util.concurrent.ListenableFuture import com.google.common.util.concurrent.SettableFuture import com.r3corda.contracts.InterestRateSwap import com.r3corda.core.RunOnCallerThread -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.contracts.StateAndRef import com.r3corda.core.contracts.UniqueIdentifier import com.r3corda.core.failure diff --git a/src/main/kotlin/com/r3corda/simulation/TradeSimulation.kt b/src/main/kotlin/com/r3corda/simulation/TradeSimulation.kt index 8624747ba5..ca07725d99 100644 --- a/src/main/kotlin/com/r3corda/simulation/TradeSimulation.kt +++ b/src/main/kotlin/com/r3corda/simulation/TradeSimulation.kt @@ -7,7 +7,7 @@ import com.r3corda.contracts.asset.DUMMY_CASH_ISSUER import com.r3corda.contracts.testing.fillWithSomeTestCash import com.r3corda.core.contracts.DOLLARS import com.r3corda.core.contracts.OwnableState -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.contracts.`issued by` import com.r3corda.core.days import com.r3corda.core.random63BitValue diff --git a/test-utils/src/main/kotlin/com/r3corda/testing/CoreTestUtils.kt b/test-utils/src/main/kotlin/com/r3corda/testing/CoreTestUtils.kt index 4a8dfdd59a..0771b177cd 100644 --- a/test-utils/src/main/kotlin/com/r3corda/testing/CoreTestUtils.kt +++ b/test-utils/src/main/kotlin/com/r3corda/testing/CoreTestUtils.kt @@ -6,7 +6,7 @@ import com.google.common.base.Throwables import com.google.common.net.HostAndPort import com.r3corda.testing.* import com.r3corda.core.contracts.StateRef -import com.r3corda.core.contracts.TransactionBuilder +import com.r3corda.core.transactions.TransactionBuilder import com.r3corda.core.crypto.* import com.r3corda.core.node.ServiceHub import com.r3corda.testing.node.MockIdentityService diff --git a/test-utils/src/main/kotlin/com/r3corda/testing/LedgerDSLInterpreter.kt b/test-utils/src/main/kotlin/com/r3corda/testing/LedgerDSLInterpreter.kt index 417681a7ae..246d035abf 100644 --- a/test-utils/src/main/kotlin/com/r3corda/testing/LedgerDSLInterpreter.kt +++ b/test-utils/src/main/kotlin/com/r3corda/testing/LedgerDSLInterpreter.kt @@ -2,6 +2,8 @@ package com.r3corda.testing import com.r3corda.core.contracts.* import com.r3corda.core.crypto.SecureHash +import com.r3corda.core.transactions.TransactionBuilder +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.utilities.DUMMY_NOTARY import java.io.InputStream diff --git a/test-utils/src/main/kotlin/com/r3corda/testing/TestDSL.kt b/test-utils/src/main/kotlin/com/r3corda/testing/TestDSL.kt index 40fd227416..11348897ab 100644 --- a/test-utils/src/main/kotlin/com/r3corda/testing/TestDSL.kt +++ b/test-utils/src/main/kotlin/com/r3corda/testing/TestDSL.kt @@ -4,6 +4,9 @@ import com.r3corda.core.contracts.* import com.r3corda.core.crypto.* import com.r3corda.core.node.ServiceHub import com.r3corda.core.serialization.serialize +import com.r3corda.core.transactions.SignedTransaction +import com.r3corda.core.transactions.TransactionBuilder +import com.r3corda.core.transactions.WireTransaction import com.r3corda.core.utilities.DUMMY_NOTARY_KEY import java.io.InputStream import java.security.KeyPair diff --git a/test-utils/src/main/kotlin/com/r3corda/testing/TransactionDSLInterpreter.kt b/test-utils/src/main/kotlin/com/r3corda/testing/TransactionDSLInterpreter.kt index b28fa047dc..7a50095b6a 100644 --- a/test-utils/src/main/kotlin/com/r3corda/testing/TransactionDSLInterpreter.kt +++ b/test-utils/src/main/kotlin/com/r3corda/testing/TransactionDSLInterpreter.kt @@ -4,6 +4,7 @@ import com.r3corda.core.contracts.* import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash import com.r3corda.core.seconds +import com.r3corda.core.transactions.TransactionBuilder import com.r3corda.core.utilities.DUMMY_NOTARY import java.security.PublicKey import java.time.Duration diff --git a/test-utils/src/main/kotlin/com/r3corda/testing/node/MockServices.kt b/test-utils/src/main/kotlin/com/r3corda/testing/node/MockServices.kt index aaec66644b..8cb9bce274 100644 --- a/test-utils/src/main/kotlin/com/r3corda/testing/node/MockServices.kt +++ b/test-utils/src/main/kotlin/com/r3corda/testing/node/MockServices.kt @@ -2,7 +2,7 @@ package com.r3corda.testing.node import com.google.common.util.concurrent.ListenableFuture import com.r3corda.core.contracts.Attachment -import com.r3corda.core.contracts.SignedTransaction +import com.r3corda.core.transactions.SignedTransaction import com.r3corda.core.crypto.Party import com.r3corda.core.crypto.SecureHash import com.r3corda.core.crypto.generateKeyPair