Add com.r3corda to all namespaces.

This commit is contained in:
Matthew Nesbit 2016-05-23 14:53:56 +01:00
parent 4eb4233584
commit 63a5fd1b9e
160 changed files with 1004 additions and 989 deletions

15
.idea/modules.xml generated
View File

@ -3,19 +3,34 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/contracts/contracts.iml" filepath="$PROJECT_DIR$/.idea/modules/contracts/contracts.iml" group="contracts" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/contracts/contracts.iml" filepath="$PROJECT_DIR$/.idea/modules/contracts/contracts.iml" group="contracts" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/contracts/contracts_main.iml" filepath="$PROJECT_DIR$/.idea/modules/contracts/contracts_main.iml" group="contracts" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/contracts/contracts_main.iml" filepath="$PROJECT_DIR$/.idea/modules/contracts/contracts_main.iml" group="contracts" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/contracts/contracts_test.iml" filepath="$PROJECT_DIR$/.idea/modules/contracts/contracts_test.iml" group="contracts" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/contracts/contracts_test.iml" filepath="$PROJECT_DIR$/.idea/modules/contracts/contracts_test.iml" group="contracts" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/core/core.iml" filepath="$PROJECT_DIR$/.idea/modules/core/core.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/core/core.iml" filepath="$PROJECT_DIR$/.idea/modules/core/core.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/core/core_main.iml" filepath="$PROJECT_DIR$/.idea/modules/core/core_main.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/core/core_main.iml" filepath="$PROJECT_DIR$/.idea/modules/core/core_main.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/core/core_test.iml" filepath="$PROJECT_DIR$/.idea/modules/core/core_test.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/core/core_test.iml" filepath="$PROJECT_DIR$/.idea/modules/core/core_test.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/contracts/isolated/isolated.iml" filepath="$PROJECT_DIR$/.idea/modules/contracts/isolated/isolated.iml" group="contracts/isolated" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/contracts/isolated/isolated.iml" filepath="$PROJECT_DIR$/.idea/modules/contracts/isolated/isolated.iml" group="contracts/isolated" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/contracts/isolated/isolated_main.iml" filepath="$PROJECT_DIR$/.idea/modules/contracts/isolated/isolated_main.iml" group="contracts/isolated" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/contracts/isolated/isolated_main.iml" filepath="$PROJECT_DIR$/.idea/modules/contracts/isolated/isolated_main.iml" group="contracts/isolated" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/contracts/isolated/isolated_test.iml" filepath="$PROJECT_DIR$/.idea/modules/contracts/isolated/isolated_test.iml" group="contracts/isolated" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/contracts/isolated/isolated_test.iml" filepath="$PROJECT_DIR$/.idea/modules/contracts/isolated/isolated_test.iml" group="contracts/isolated" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/node/node.iml" filepath="$PROJECT_DIR$/.idea/modules/node/node.iml" group="node" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/node/node.iml" filepath="$PROJECT_DIR$/.idea/modules/node/node.iml" group="node" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/node/node_main.iml" filepath="$PROJECT_DIR$/.idea/modules/node/node_main.iml" group="node" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/node/node_main.iml" filepath="$PROJECT_DIR$/.idea/modules/node/node_main.iml" group="node" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/node/node_test.iml" filepath="$PROJECT_DIR$/.idea/modules/node/node_test.iml" group="node" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/node/node_test.iml" filepath="$PROJECT_DIR$/.idea/modules/node/node_test.iml" group="node" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/r3prototyping.iml" filepath="$PROJECT_DIR$/.idea/modules/r3prototyping.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/r3prototyping.iml" filepath="$PROJECT_DIR$/.idea/modules/r3prototyping.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/r3prototyping_main.iml" filepath="$PROJECT_DIR$/.idea/modules/r3prototyping_main.iml" group="r3prototyping" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/r3prototyping_main.iml" filepath="$PROJECT_DIR$/.idea/modules/r3prototyping_main.iml" group="r3prototyping" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/r3prototyping_test.iml" filepath="$PROJECT_DIR$/.idea/modules/r3prototyping_test.iml" group="r3prototyping" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/r3prototyping_test.iml" filepath="$PROJECT_DIR$/.idea/modules/r3prototyping_test.iml" group="r3prototyping" />
</modules>
</component>

View File

@ -86,7 +86,7 @@ tasks.withType(JavaExec) {
// Package up the demo programs.
task getRateFixDemo(type: CreateStartScripts) {
mainClassName = "demos.RateFixDemoKt"
mainClassName = "com.r3corda.demos.RateFixDemoKt"
applicationName = "get-rate-fix"
defaultJvmOpts = ["-javaagent:${configurations.quasar.singleFile}"]
outputDir = new File(project.buildDir, 'scripts')
@ -94,7 +94,7 @@ task getRateFixDemo(type: CreateStartScripts) {
}
task getIRSDemo(type: CreateStartScripts) {
mainClassName = "demos.IRSDemoKt"
mainClassName = "com.r3corda.demos.IRSDemoKt"
applicationName = "irsdemo"
defaultJvmOpts = ["-javaagent:${configurations.quasar.singleFile}"]
outputDir = new File(project.buildDir, 'scripts')
@ -102,7 +102,7 @@ task getIRSDemo(type: CreateStartScripts) {
}
task getTraderDemo(type: CreateStartScripts) {
mainClassName = "demos.TraderDemoKt"
mainClassName = "com.r3corda.demos.TraderDemoKt"
applicationName = "trader-demo"
defaultJvmOpts = ["-javaagent:${configurations.quasar.singleFile}"]
outputDir = new File(project.buildDir, 'scripts')

View File

@ -6,18 +6,18 @@
* All other rights reserved.
*/
package contracts.isolated
package com.r3corda.contracts.isolated
import core.*
import core.contracts.*
import core.crypto.Party
import core.crypto.SecureHash
import com.r3corda.core.*
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.Party
import com.r3corda.core.crypto.SecureHash
// The dummy contract doesn't do anything useful. It exists for testing purposes.
val ANOTHER_DUMMY_PROGRAM_ID = AnotherDummyContract()
class AnotherDummyContract : Contract, core.node.DummyContractBackdoor {
class AnotherDummyContract : Contract, com.r3corda.core.node.DummyContractBackdoor {
class State(val magicNumber: Int = 0, override val notary: Party) : ContractState {
override val contract = ANOTHER_DUMMY_PROGRAM_ID
}

View File

@ -0,0 +1,12 @@
package com.r3corda.core.node
import com.r3corda.core.contracts.ContractState
import com.r3corda.core.crypto.Party
import com.r3corda.core.contracts.PartyAndReference
import com.r3corda.core.contracts.TransactionBuilder
interface DummyContractBackdoor {
fun generateInitial(owner: PartyAndReference, magicNumber: Int, notary: Party): TransactionBuilder
fun inspectState(state: ContractState): Int
}

View File

@ -1,12 +0,0 @@
package core.node
import core.contracts.ContractState
import core.crypto.Party
import core.contracts.PartyAndReference
import core.contracts.TransactionBuilder
interface DummyContractBackdoor {
fun generateInitial(owner: PartyAndReference, magicNumber: Int, notary: Party): TransactionBuilder
fun inspectState(state: ContractState): Int
}

View File

@ -1,8 +1,8 @@
package contracts;
package com.r3corda.contracts;
import core.contracts.Amount;
import core.contracts.ContractState;
import core.contracts.PartyAndReference;
import com.r3corda.core.contracts.Amount;
import com.r3corda.core.contracts.ContractState;
import com.r3corda.core.contracts.PartyAndReference;
import java.security.*;
import java.time.*;

View File

@ -1,10 +1,10 @@
package contracts;
package com.r3corda.contracts;
import core.contracts.TransactionForVerification.InOutGroup;
import core.contracts.*;
import core.crypto.NullPublicKey;
import core.crypto.Party;
import core.crypto.SecureHash;
import com.r3corda.core.contracts.TransactionForVerification.InOutGroup;
import com.r3corda.core.contracts.*;
import com.r3corda.core.crypto.NullPublicKey;
import com.r3corda.core.crypto.Party;
import com.r3corda.core.crypto.SecureHash;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@ -12,7 +12,7 @@ import java.security.PublicKey;
import java.time.Instant;
import java.util.List;
import static core.contracts.ContractsDSLKt.requireSingleCommand;
import static com.r3corda.core.contracts.ContractsDSLKt.requireSingleCommand;
import static kotlin.collections.CollectionsKt.single;

View File

@ -1,13 +1,13 @@
package contracts
package com.r3corda.contracts
import contracts.cash.CashIssuanceDefinition
import contracts.cash.CommonCashState
import core.*
import core.contracts.*
import core.crypto.Party
import core.crypto.SecureHash
import core.crypto.toStringShort
import core.utilities.Emoji
import com.r3corda.contracts.cash.CashIssuanceDefinition
import com.r3corda.contracts.cash.CommonCashState
import com.r3corda.core.*
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.utilities.Emoji
import java.security.PublicKey
import java.security.SecureRandom
import java.util.*

View File

@ -1,12 +1,12 @@
package contracts
package com.r3corda.contracts
import core.*
import core.contracts.*
import core.crypto.NullPublicKey
import core.crypto.Party
import core.crypto.SecureHash
import core.crypto.toStringShort
import core.utilities.Emoji
import com.r3corda.core.*
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.crypto.toStringShort
import com.r3corda.core.utilities.Emoji
import java.security.PublicKey
import java.time.Instant

View File

@ -1,9 +1,9 @@
package contracts
package com.r3corda.contracts
import core.*
import core.contracts.*
import core.crypto.Party
import core.crypto.SecureHash
import com.r3corda.core.*
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.Party
import com.r3corda.core.crypto.SecureHash
import java.security.PublicKey
import java.time.Instant
import java.util.*

View File

@ -1,9 +1,9 @@
package contracts
package com.r3corda.contracts
import core.*
import core.contracts.*
import core.crypto.Party
import core.crypto.SecureHash
import com.r3corda.core.*
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.Party
import com.r3corda.core.crypto.SecureHash
// The dummy contract doesn't do anything useful. It exists for testing purposes.

View File

@ -1,9 +1,9 @@
package contracts
package com.r3corda.contracts
import core.*
import core.contracts.*
import core.crypto.Party
import core.crypto.SecureHash
import com.r3corda.core.*
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.Party
import com.r3corda.core.crypto.SecureHash
import org.apache.commons.jexl3.JexlBuilder
import org.apache.commons.jexl3.MapContext
import java.math.BigDecimal

View File

@ -1,4 +1,4 @@
package contracts
package com.r3corda.contracts
fun InterestRateSwap.State.exportIRSToCSV(): String =
"Fixed Leg\n" + FixedRatePaymentEvent.CSVHeader + "\n" +

View File

@ -1,7 +1,7 @@
package contracts
package com.r3corda.contracts
import core.contracts.Amount
import core.contracts.Tenor
import com.r3corda.core.contracts.Amount
import com.r3corda.core.contracts.Tenor
import java.math.BigDecimal

View File

@ -1,7 +1,7 @@
package contracts.cash
package com.r3corda.contracts.cash
import core.contracts.IssuanceDefinition
import core.contracts.PartyAndReference
import com.r3corda.core.contracts.IssuanceDefinition
import com.r3corda.core.contracts.PartyAndReference
import java.util.*
/**

View File

@ -1,8 +1,8 @@
package contracts.cash
package com.r3corda.contracts.cash
import core.contracts.Amount
import core.contracts.OwnableState
import core.contracts.PartyAndReference
import com.r3corda.core.contracts.Amount
import com.r3corda.core.contracts.OwnableState
import com.r3corda.core.contracts.PartyAndReference
/**
* Common elements of cash contract states.

View File

@ -1,12 +1,12 @@
package contracts.testing
package com.r3corda.contracts.testing
import contracts.*
import core.contracts.Amount
import core.contracts.Contract
import core.crypto.NullPublicKey
import core.crypto.Party
import core.testing.DUMMY_NOTARY
import core.testing.MINI_CORP
import com.r3corda.contracts.*
import com.r3corda.core.contracts.Amount
import com.r3corda.core.contracts.Contract
import com.r3corda.core.crypto.NullPublicKey
import com.r3corda.core.crypto.Party
import com.r3corda.core.testing.DUMMY_NOTARY
import com.r3corda.core.testing.MINI_CORP
import java.security.PublicKey
import java.util.*

View File

@ -1,19 +1,19 @@
package protocols
package com.r3corda.protocols
import co.paralleluniverse.fibers.Suspendable
import contracts.Cash
import contracts.sumCashBy
import core.contracts.*
import core.crypto.DigitalSignature
import core.crypto.Party
import core.crypto.signWithECDSA
import core.messaging.SingleMessageRecipient
import core.node.NodeInfo
import core.protocols.ProtocolLogic
import core.random63BitValue
import core.seconds
import core.utilities.ProgressTracker
import core.utilities.trace
import com.r3corda.contracts.Cash
import com.r3corda.contracts.sumCashBy
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.DigitalSignature
import com.r3corda.core.crypto.Party
import com.r3corda.core.crypto.signWithECDSA
import com.r3corda.core.messaging.SingleMessageRecipient
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.utilities.ProgressTracker
import com.r3corda.core.utilities.trace
import java.security.KeyPair
import java.security.PublicKey
import java.security.SignatureException

View File

@ -1,13 +1,13 @@
import contracts.Cash
import contracts.DummyContract
import contracts.InsufficientBalanceException
import contracts.testing.`issued by`
import contracts.testing.`owned by`
import core.contracts.*
import core.crypto.Party
import core.crypto.SecureHash
import core.serialization.OpaqueBytes
import core.testing.*
import com.r3corda.contracts.Cash
import com.r3corda.contracts.DummyContract
import com.r3corda.contracts.InsufficientBalanceException
import com.r3corda.contracts.testing.`issued by`
import com.r3corda.contracts.testing.`owned by`
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.testing.*
import org.junit.Test
import java.security.PublicKey
import java.util.*
@ -40,7 +40,7 @@ class CashTests {
tweak {
output { outState }
// No command arguments
this `fails requirement` "required contracts.Cash.Commands.Move command"
this `fails requirement` "required com.r3corda.contracts.Cash.Commands.Move command"
}
tweak {
output { outState }
@ -277,7 +277,7 @@ class CashTests {
tweak {
arg(MEGA_CORP_PUBKEY) { Cash.Commands.Exit(200.DOLLARS) }
this `fails requirement` "required contracts.Cash.Commands.Move command"
this `fails requirement` "required com.r3corda.contracts.Cash.Commands.Move command"
tweak {
arg(DUMMY_PUBKEY_1) { Cash.Commands.Move() }

View File

@ -1,13 +1,13 @@
package contracts
package com.r3corda.contracts
import contracts.testing.CASH
import contracts.testing.`owned by`
import core.contracts.*
import core.crypto.SecureHash
import core.days
import core.node.services.testing.MockStorageService
import core.seconds
import core.testing.*
import com.r3corda.contracts.testing.CASH
import com.r3corda.contracts.testing.`owned by`
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.days
import com.r3corda.core.node.services.testing.MockStorageService
import com.r3corda.core.seconds
import com.r3corda.core.testing.*
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized

View File

@ -1,13 +1,13 @@
package contracts
package com.r3corda.contracts
import contracts.testing.CASH
import contracts.testing.`owned by`
import core.contracts.*
import core.crypto.SecureHash
import core.days
import core.node.services.testing.MockStorageService
import core.seconds
import core.testing.*
import com.r3corda.contracts.testing.CASH
import com.r3corda.contracts.testing.`owned by`
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.days
import com.r3corda.core.node.services.testing.MockStorageService
import com.r3corda.core.seconds
import com.r3corda.core.testing.*
import org.junit.Test
import java.time.Instant
import java.util.*

View File

@ -1,9 +1,9 @@
package contracts
package com.r3corda.contracts
import core.contracts.*
import core.node.services.testing.MockStorageService
import core.seconds
import core.testing.*
import com.r3corda.core.contracts.*
import com.r3corda.core.node.services.testing.MockStorageService
import com.r3corda.core.seconds
import com.r3corda.core.testing.*
import org.junit.Test
import java.math.BigDecimal
import java.time.LocalDate

View File

@ -1,4 +1,4 @@
package core.crypto;
package com.r3corda.core.crypto;
public class AddressFormatException extends IllegalArgumentException {
public AddressFormatException() {

View File

@ -1,4 +1,4 @@
package core.crypto;
package com.r3corda.core.crypto;
import java.math.*;
import java.util.*;

View File

@ -1,4 +1,4 @@
package core
package com.r3corda.core
import com.google.common.io.ByteStreams
import com.google.common.util.concurrent.ListenableFuture

View File

@ -1,7 +1,7 @@
package core.contracts
package com.r3corda.core.contracts
import core.*
import core.crypto.Party
import com.r3corda.core.*
import com.r3corda.core.crypto.Party
import java.security.PublicKey
import java.util.*

View File

@ -1,4 +1,4 @@
package core.contracts
package com.r3corda.core.contracts
import com.fasterxml.jackson.core.JsonGenerator
import com.fasterxml.jackson.core.JsonParser
@ -8,7 +8,7 @@ import com.fasterxml.jackson.databind.JsonSerializer
import com.fasterxml.jackson.databind.SerializerProvider
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.fasterxml.jackson.databind.annotation.JsonSerialize
import core.contracts.CommandData
import com.r3corda.core.contracts.CommandData
import java.math.BigDecimal
import java.time.DayOfWeek
import java.time.LocalDate

View File

@ -1,14 +1,14 @@
package core.contracts
package com.r3corda.core.contracts
import core.contracts.TransactionBuilder
import core.contracts.TransactionForVerification
import core.contracts.Fix
import core.contracts.FixOf
import core.crypto.Party
import core.crypto.SecureHash
import core.crypto.toStringShort
import core.serialization.OpaqueBytes
import core.serialization.serialize
import com.r3corda.core.contracts.TransactionBuilder
import com.r3corda.core.contracts.TransactionForVerification
import com.r3corda.core.contracts.Fix
import com.r3corda.core.contracts.FixOf
import com.r3corda.core.crypto.Party
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.crypto.toStringShort
import com.r3corda.core.serialization.OpaqueBytes
import com.r3corda.core.serialization.serialize
import java.io.FileNotFoundException
import java.io.InputStream
import java.io.OutputStream

View File

@ -1,13 +1,13 @@
package core.contracts
package com.r3corda.core.contracts
import core.contracts.SignedTransaction
import core.contracts.WireTransaction
import core.contracts.*
import core.crypto.DigitalSignature
import core.crypto.Party
import core.crypto.SecureHash
import core.crypto.signWithECDSA
import core.serialization.serialize
import com.r3corda.core.contracts.SignedTransaction
import com.r3corda.core.contracts.WireTransaction
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.DigitalSignature
import com.r3corda.core.crypto.Party
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.crypto.signWithECDSA
import com.r3corda.core.serialization.serialize
import java.security.KeyPair
import java.security.PublicKey
import java.time.Duration

View File

@ -1,9 +1,9 @@
package core.contracts
package com.r3corda.core.contracts
import core.contracts.SignedTransaction
import core.contracts.WireTransaction
import core.contracts.CommandData
import core.crypto.SecureHash
import com.r3corda.core.contracts.SignedTransaction
import com.r3corda.core.contracts.WireTransaction
import com.r3corda.core.contracts.CommandData
import com.r3corda.core.crypto.SecureHash
import java.util.*
import java.util.concurrent.Callable

View File

@ -1,11 +1,11 @@
package core.contracts
package com.r3corda.core.contracts
import core.contracts.AuthenticatedObject
import core.contracts.LedgerTransaction
import core.contracts.SignedTransaction
import core.contracts.WireTransaction
import core.node.services.AttachmentStorage
import core.node.services.IdentityService
import com.r3corda.core.contracts.AuthenticatedObject
import com.r3corda.core.contracts.LedgerTransaction
import com.r3corda.core.contracts.SignedTransaction
import com.r3corda.core.contracts.WireTransaction
import com.r3corda.core.node.services.AttachmentStorage
import com.r3corda.core.node.services.IdentityService
import java.io.FileNotFoundException
/**

View File

@ -1,8 +1,8 @@
package core.contracts
package com.r3corda.core.contracts
import core.contracts.*
import core.crypto.Party
import core.crypto.SecureHash
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.Party
import com.r3corda.core.crypto.SecureHash
import java.util.*
// TODO: Consider moving this out of the core module and providing a different way for unit tests to test contracts.

View File

@ -1,16 +1,16 @@
package core.contracts
package com.r3corda.core.contracts
import com.esotericsoftware.kryo.Kryo
import core.contracts.*
import core.crypto.DigitalSignature
import core.crypto.SecureHash
import core.crypto.toStringShort
import core.indexOfOrThrow
import core.serialization.SerializedBytes
import core.serialization.THREAD_LOCAL_KRYO
import core.serialization.deserialize
import core.serialization.serialize
import core.utilities.Emoji
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.DigitalSignature
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.crypto.toStringShort
import com.r3corda.core.indexOfOrThrow
import com.r3corda.core.serialization.SerializedBytes
import com.r3corda.core.serialization.THREAD_LOCAL_KRYO
import com.r3corda.core.serialization.deserialize
import com.r3corda.core.serialization.serialize
import com.r3corda.core.utilities.Emoji
import java.security.PublicKey
import java.security.SignatureException

View File

@ -1,10 +1,10 @@
package core.crypto
package com.r3corda.core.crypto
import com.google.common.io.BaseEncoding
import core.crypto.Party
import core.serialization.OpaqueBytes
import core.serialization.SerializedBytes
import core.serialization.deserialize
import com.r3corda.core.crypto.Party
import com.r3corda.core.serialization.OpaqueBytes
import com.r3corda.core.serialization.SerializedBytes
import com.r3corda.core.serialization.deserialize
import java.math.BigInteger
import java.security.*
import java.security.interfaces.ECPublicKey

View File

@ -1,7 +1,7 @@
package core.crypto
package com.r3corda.core.crypto
import core.contracts.PartyAndReference
import core.serialization.OpaqueBytes
import com.r3corda.core.contracts.PartyAndReference
import com.r3corda.core.serialization.OpaqueBytes
import java.security.PublicKey
/**

View File

@ -1,4 +1,4 @@
package core.math
package com.r3corda.core.math
import java.util.*

View File

@ -1,7 +1,7 @@
package core.messaging
package com.r3corda.core.messaging
import com.google.common.util.concurrent.ListenableFuture
import core.serialization.serialize
import com.r3corda.core.serialization.serialize
import java.time.Instant
import java.util.concurrent.Executor
import javax.annotation.concurrent.ThreadSafe

View File

@ -1,7 +1,7 @@
package core.node
package com.r3corda.core.node
import core.contracts.Attachment
import core.crypto.SecureHash
import com.r3corda.core.contracts.Attachment
import com.r3corda.core.crypto.SecureHash
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.FileNotFoundException

View File

@ -1,8 +1,8 @@
package core.node
package com.r3corda.core.node
import core.crypto.Party
import core.messaging.SingleMessageRecipient
import core.node.services.ServiceType
import com.r3corda.core.crypto.Party
import com.r3corda.core.messaging.SingleMessageRecipient
import com.r3corda.core.node.services.ServiceType
/**
* Info about a network node that acts on behalf of some form of contract party.

View File

@ -1,4 +1,4 @@
package core.node
package com.r3corda.core.node
import java.util.*

View File

@ -1,10 +1,10 @@
package core.node
package com.r3corda.core.node
import core.contracts.*
import core.crypto.SecureHash
import core.messaging.MessagingService
import core.node.services.*
import core.utilities.RecordingMap
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.messaging.MessagingService
import com.r3corda.core.node.services.*
import com.r3corda.core.utilities.RecordingMap
import java.time.Clock
/**

View File

@ -1,7 +1,7 @@
package core.node.services
package com.r3corda.core.node.services
import core.contracts.Attachment
import core.crypto.SecureHash
import com.r3corda.core.contracts.Attachment
import com.r3corda.core.crypto.SecureHash
import java.io.InputStream
/**

View File

@ -1,6 +1,6 @@
package core.node.services
package com.r3corda.core.node.services
import core.crypto.Party
import com.r3corda.core.crypto.Party
import java.security.PublicKey
/**

View File

@ -1,11 +1,11 @@
package core.node.services
package com.r3corda.core.node.services
import com.google.common.util.concurrent.ListenableFuture
import core.contracts.Contract
import core.crypto.Party
import core.messaging.MessagingService
import core.node.NodeInfo
import core.node.services.ServiceType
import com.r3corda.core.contracts.Contract
import com.r3corda.core.crypto.Party
import com.r3corda.core.messaging.MessagingService
import com.r3corda.core.node.NodeInfo
import com.r3corda.core.node.services.ServiceType
import org.slf4j.LoggerFactory
import java.security.PublicKey

View File

@ -6,7 +6,7 @@
* All other rights reserved.
*/
package core.node.services
package com.r3corda.core.node.services
/**
* Identifier for service types a node can expose over the network to other peers. These types are placed into network

View File

@ -1,9 +1,9 @@
package core.node.services
package com.r3corda.core.node.services
import core.contracts.*
import core.crypto.Party
import core.crypto.SecureHash
import core.node.services.AttachmentStorage
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.Party
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.node.services.AttachmentStorage
import java.security.KeyPair
import java.security.PrivateKey
import java.security.PublicKey

View File

@ -1,9 +1,9 @@
package core.node.services
package com.r3corda.core.node.services
import core.crypto.Party
import core.contracts.StateRef
import core.contracts.WireTransaction
import core.crypto.SecureHash
import com.r3corda.core.crypto.Party
import com.r3corda.core.contracts.StateRef
import com.r3corda.core.contracts.WireTransaction
import com.r3corda.core.crypto.SecureHash
/**
* A service that records input states of the given transaction and provides conflict information

View File

@ -1,16 +1,16 @@
package core.node.services.testing
package com.r3corda.core.node.services.testing
import core.contracts.Attachment
import core.contracts.SignedTransaction
import core.crypto.Party
import core.crypto.SecureHash
import core.crypto.generateKeyPair
import core.crypto.sha256
import core.node.services.AttachmentStorage
import core.node.services.IdentityService
import core.node.services.KeyManagementService
import core.node.services.StorageService
import core.utilities.RecordingMap
import com.r3corda.core.contracts.Attachment
import com.r3corda.core.contracts.SignedTransaction
import com.r3corda.core.crypto.Party
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.crypto.generateKeyPair
import com.r3corda.core.crypto.sha256
import com.r3corda.core.node.services.AttachmentStorage
import com.r3corda.core.node.services.IdentityService
import com.r3corda.core.node.services.KeyManagementService
import com.r3corda.core.node.services.StorageService
import com.r3corda.core.utilities.RecordingMap
import org.slf4j.LoggerFactory
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream

View File

@ -1,10 +1,10 @@
package core.protocols
package com.r3corda.core.protocols
import co.paralleluniverse.fibers.Suspendable
import core.messaging.MessageRecipients
import core.node.ServiceHub
import core.utilities.ProgressTracker
import core.utilities.UntrustworthyData
import com.r3corda.core.messaging.MessageRecipients
import com.r3corda.core.node.ServiceHub
import com.r3corda.core.utilities.ProgressTracker
import com.r3corda.core.utilities.UntrustworthyData
import org.slf4j.Logger
/**

View File

@ -1,9 +1,9 @@
package core.protocols
package com.r3corda.core.protocols
import co.paralleluniverse.fibers.Suspendable
import core.messaging.MessageRecipients
import core.node.ServiceHub
import core.utilities.UntrustworthyData
import com.r3corda.core.messaging.MessageRecipients
import com.r3corda.core.node.ServiceHub
import com.r3corda.core.utilities.UntrustworthyData
import org.slf4j.Logger

View File

@ -1,4 +1,4 @@
package core.serialization
package com.r3corda.core.serialization
import com.google.common.io.BaseEncoding
import java.util.*

View File

@ -1,4 +1,4 @@
package core.serialization
package com.r3corda.core.serialization
import co.paralleluniverse.fibers.Fiber
import co.paralleluniverse.io.serialization.kryo.KryoSerializer
@ -8,12 +8,12 @@ import com.esotericsoftware.kryo.Serializer
import com.esotericsoftware.kryo.io.Input
import com.esotericsoftware.kryo.io.Output
import com.esotericsoftware.kryo.serializers.JavaSerializer
import core.contracts.*
import core.crypto.SecureHash
import core.crypto.generateKeyPair
import core.crypto.sha256
import core.node.AttachmentsClassLoader
import core.node.services.AttachmentStorage
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.crypto.generateKeyPair
import com.r3corda.core.crypto.sha256
import com.r3corda.core.node.AttachmentsClassLoader
import com.r3corda.core.node.services.AttachmentStorage
import de.javakaffee.kryoserializers.ArraysAsListSerializer
import org.objenesis.strategy.StdInstantiatorStrategy
import java.io.ByteArrayOutputStream

View File

@ -1,4 +1,4 @@
package core.serialization
package com.r3corda.core.serialization
import com.esotericsoftware.kryo.DefaultSerializer
import com.esotericsoftware.kryo.Kryo

View File

@ -1,15 +1,15 @@
@file:Suppress("UNUSED_PARAMETER", "UNCHECKED_CAST")
package core.testing
package com.r3corda.core.testing
import com.google.common.base.Throwables
import com.google.common.net.HostAndPort
import core.*
import core.contracts.*
import core.crypto.*
import core.serialization.serialize
import core.node.services.testing.MockIdentityService
import core.node.services.testing.MockStorageService
import com.r3corda.core.*
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.*
import com.r3corda.core.serialization.serialize
import com.r3corda.core.node.services.testing.MockIdentityService
import com.r3corda.core.node.services.testing.MockStorageService
import java.net.ServerSocket
import java.security.KeyPair
import java.security.PublicKey

View File

@ -1,4 +1,4 @@
package core.utilities
package com.r3corda.core.utilities
/**
* A simple wrapper class that contains icons and support for printing them only when we're connected to a terminal.

View File

@ -1,4 +1,4 @@
package core.utilities
package com.r3corda.core.utilities
import org.slf4j.LoggerFactory
import java.io.PrintWriter

View File

@ -1,6 +1,6 @@
package core.utilities
package com.r3corda.core.utilities
import core.TransientProperty
import com.r3corda.core.TransientProperty
import rx.Observable
import rx.Subscription
import rx.subjects.BehaviorSubject

View File

@ -1,4 +1,4 @@
package core.utilities
package com.r3corda.core.utilities
import org.slf4j.Logger
import java.util.*

View File

@ -1,4 +1,4 @@
package core.utilities
package com.r3corda.core.utilities
/**
* A small utility to approximate taint tracking: if a method gives you back one of these, it means the data came from

View File

@ -1,6 +1,6 @@
package protocols
package com.r3corda.protocols
import core.messaging.MessageRecipients
import com.r3corda.core.messaging.MessageRecipients
/**
* Abstract superclass for request messages sent to services, which includes common

View File

@ -1,9 +1,9 @@
package protocols
package com.r3corda.protocols
import core.contracts.Attachment
import core.crypto.SecureHash
import core.crypto.sha256
import core.messaging.SingleMessageRecipient
import com.r3corda.core.contracts.Attachment
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.crypto.sha256
import com.r3corda.core.messaging.SingleMessageRecipient
import java.io.ByteArrayInputStream
import java.io.InputStream

View File

@ -1,12 +1,12 @@
package protocols
package com.r3corda.protocols
import co.paralleluniverse.fibers.Suspendable
import core.contracts.NamedByHash
import core.crypto.SecureHash
import core.messaging.SingleMessageRecipient
import core.protocols.ProtocolLogic
import core.random63BitValue
import core.utilities.UntrustworthyData
import com.r3corda.core.contracts.NamedByHash
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.messaging.SingleMessageRecipient
import com.r3corda.core.protocols.ProtocolLogic
import com.r3corda.core.random63BitValue
import com.r3corda.core.utilities.UntrustworthyData
import java.util.*
/**

View File

@ -1,8 +1,8 @@
package protocols
package com.r3corda.protocols
import core.contracts.SignedTransaction
import core.crypto.SecureHash
import core.messaging.SingleMessageRecipient
import com.r3corda.core.contracts.SignedTransaction
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.messaging.SingleMessageRecipient
/**
* Given a set of tx hashes (IDs), either loads them from local disk or asks the remote peer to provide them.

View File

@ -1,19 +1,19 @@
package protocols
package com.r3corda.protocols
import co.paralleluniverse.fibers.Suspendable
import core.crypto.Party
import core.contracts.TimestampCommand
import core.contracts.WireTransaction
import core.crypto.DigitalSignature
import core.crypto.SignedData
import core.messaging.SingleMessageRecipient
import core.node.NodeInfo
import core.node.services.UniquenessProvider
import core.protocols.ProtocolLogic
import core.random63BitValue
import core.serialization.SerializedBytes
import core.utilities.ProgressTracker
import core.utilities.UntrustworthyData
import com.r3corda.core.crypto.Party
import com.r3corda.core.contracts.TimestampCommand
import com.r3corda.core.contracts.WireTransaction
import com.r3corda.core.crypto.DigitalSignature
import com.r3corda.core.crypto.SignedData
import com.r3corda.core.messaging.SingleMessageRecipient
import com.r3corda.core.node.NodeInfo
import com.r3corda.core.node.services.UniquenessProvider
import com.r3corda.core.protocols.ProtocolLogic
import com.r3corda.core.random63BitValue
import com.r3corda.core.serialization.SerializedBytes
import com.r3corda.core.utilities.ProgressTracker
import com.r3corda.core.utilities.UntrustworthyData
import java.security.PublicKey
/**

View File

@ -1,16 +1,16 @@
package protocols
package com.r3corda.protocols
import co.paralleluniverse.fibers.Suspendable
import core.*
import core.contracts.Fix
import core.contracts.FixOf
import core.contracts.TransactionBuilder
import core.contracts.WireTransaction
import core.crypto.DigitalSignature
import core.messaging.SingleMessageRecipient
import core.node.NodeInfo
import core.protocols.ProtocolLogic
import core.utilities.ProgressTracker
import com.r3corda.core.*
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.crypto.DigitalSignature
import com.r3corda.core.messaging.SingleMessageRecipient
import com.r3corda.core.node.NodeInfo
import com.r3corda.core.protocols.ProtocolLogic
import com.r3corda.core.utilities.ProgressTracker
import java.math.BigDecimal
import java.util.*

View File

@ -1,11 +1,11 @@
package protocols
package com.r3corda.protocols
import co.paralleluniverse.fibers.Suspendable
import core.*
import core.contracts.*
import core.crypto.SecureHash
import core.messaging.SingleMessageRecipient
import core.protocols.ProtocolLogic
import com.r3corda.core.*
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.messaging.SingleMessageRecipient
import com.r3corda.core.protocols.ProtocolLogic
import java.util.*
// NB: This code is unit tested by TwoPartyTradeProtocolTests

View File

@ -1,18 +1,18 @@
package protocols
package com.r3corda.protocols
import co.paralleluniverse.fibers.Suspendable
import core.contracts.*
import core.crypto.DigitalSignature
import core.crypto.Party
import core.crypto.signWithECDSA
import core.messaging.SingleMessageRecipient
import core.node.NodeInfo
import core.protocols.ProtocolLogic
import core.random63BitValue
import core.seconds
import core.utilities.ProgressTracker
import core.utilities.UntrustworthyData
import core.utilities.trace
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.DigitalSignature
import com.r3corda.core.crypto.Party
import com.r3corda.core.crypto.signWithECDSA
import com.r3corda.core.messaging.SingleMessageRecipient
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.utilities.ProgressTracker
import com.r3corda.core.utilities.UntrustworthyData
import com.r3corda.core.utilities.trace
import java.math.BigDecimal
import java.security.KeyPair
import java.security.PublicKey

View File

@ -1,6 +1,6 @@
package core
package com.r3corda.core
import core.contracts.*
import com.r3corda.core.contracts.*
import org.junit.Test
import java.time.LocalDate
import java.util.*

View File

@ -1,9 +1,9 @@
package core.contracts
package com.r3corda.core.contracts
import core.crypto.Party
import core.crypto.SecureHash
import core.node.services.testing.MockStorageService
import core.testing.*
import com.r3corda.core.crypto.Party
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.node.services.testing.MockStorageService
import com.r3corda.core.testing.*
import org.junit.Test
import java.security.PublicKey
import java.security.SecureRandom

View File

@ -1,4 +1,4 @@
package core.crypto;
package com.r3corda.core.crypto;
import org.junit.*;

View File

@ -1,6 +1,6 @@
package core.crypto
package com.r3corda.core.crypto
import core.serialization.serialize
import com.r3corda.core.serialization.serialize
import org.junit.Test
import java.security.SignatureException
import kotlin.test.assertEquals

View File

@ -1,4 +1,4 @@
package core.math
package com.r3corda.core.math
import org.junit.Assert
import org.junit.Test
@ -66,7 +66,7 @@ class InterpolatorsTest {
val xs = doubleArrayOf(1.0, 2.0, 3.0, 4.0, 5.0)
val ys = doubleArrayOf(2.0, 4.0, 5.0, 11.0, 10.0)
val toInterpolate = doubleArrayOf(1.5, 2.5, 2.8, 3.3, 3.7, 4.3, 4.7)
// Expected values generated using R's splinefun (package stats v3.2.4), "natural" method
// Expected values generated using R's splinefun (package com.r3corda.stats v3.2.4), "natural" method
val expected = doubleArrayOf(3.28, 4.03, 4.37, 6.7, 9.46, 11.5, 10.91)
val interpolator = CubicSplineInterpolator(xs, ys)

View File

@ -1,13 +1,13 @@
package core.node
package com.r3corda.core.node
import core.contracts.*
import core.crypto.Party
import core.crypto.SecureHash
import core.node.services.AttachmentStorage
import core.node.services.testing.MockAttachmentStorage
import core.serialization.*
import core.testing.DUMMY_NOTARY
import core.testing.MEGA_CORP
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.Party
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.node.services.AttachmentStorage
import com.r3corda.core.node.services.testing.MockAttachmentStorage
import com.r3corda.core.serialization.*
import com.r3corda.core.testing.DUMMY_NOTARY
import com.r3corda.core.testing.MEGA_CORP
import org.apache.commons.io.IOUtils
import org.junit.Test
import java.io.ByteArrayInputStream
@ -75,7 +75,7 @@ class AttachmentClassLoaderTests {
fun `dynamically load AnotherDummyContract from isolated contracts jar`() {
val child = ClassLoaderForTests()
val contractClass = Class.forName("contracts.isolated.AnotherDummyContract", true, child)
val contractClass = Class.forName("com.r3corda.contracts.isolated.AnotherDummyContract", true, child)
val contract = contractClass.newInstance() as Contract
assertEquals(SecureHash.sha256("https://anotherdummy.org"), contract.legalContractReference)
@ -137,7 +137,7 @@ class AttachmentClassLoaderTests {
val att2 = storage.importAttachment(ByteArrayInputStream(fakeAttachment("file2.txt", "some other data")))
val cl = AttachmentsClassLoader(arrayOf(att0, att1, att2).map { storage.openAttachment(it)!! }, FilteringClassLoader)
val contractClass = Class.forName("contracts.isolated.AnotherDummyContract", true, cl)
val contractClass = Class.forName("com.r3corda.contracts.isolated.AnotherDummyContract", true, cl)
val contract = contractClass.newInstance() as Contract
assertEquals(cl, contract.javaClass.classLoader)
assertEquals(SecureHash.sha256("https://anotherdummy.org"), contract.legalContractReference)
@ -146,7 +146,7 @@ class AttachmentClassLoaderTests {
@Test
fun `verify that contract DummyContract is in classPath`() {
val contractClass = Class.forName("core.node.AttachmentClassLoaderTests\$AttachmentDummyContract")
val contractClass = Class.forName("com.r3corda.core.node.AttachmentClassLoaderTests\$AttachmentDummyContract")
val contract = contractClass.newInstance() as Contract
assertNotNull(contract)
@ -154,7 +154,7 @@ class AttachmentClassLoaderTests {
fun createContract2Cash(): Contract {
val cl = ClassLoaderForTests()
val contractClass = Class.forName("contracts.isolated.AnotherDummyContract", true, cl)
val contractClass = Class.forName("com.r3corda.contracts.isolated.AnotherDummyContract", true, cl)
return contractClass.newInstance() as Contract
}
@ -221,7 +221,7 @@ class AttachmentClassLoaderTests {
@Test
fun `test serialization of WireTransaction with dynamically loaded contract`() {
val child = ClassLoaderForTests()
val contractClass = Class.forName("contracts.isolated.AnotherDummyContract", true, child)
val contractClass = Class.forName("com.r3corda.contracts.isolated.AnotherDummyContract", true, child)
val contract = contractClass.newInstance() as DummyContractBackdoor
val tx = contract.generateInitial(MEGA_CORP.ref(0), 42, DUMMY_NOTARY)
val storage = MockAttachmentStorage()
@ -252,7 +252,7 @@ class AttachmentClassLoaderTests {
@Test
fun `test deserialize of WireTransaction where contract cannot be found`() {
val child = ClassLoaderForTests()
val contractClass = Class.forName("contracts.isolated.AnotherDummyContract", true, child)
val contractClass = Class.forName("com.r3corda.contracts.isolated.AnotherDummyContract", true, child)
val contract = contractClass.newInstance() as DummyContractBackdoor
val tx = contract.generateInitial(MEGA_CORP.ref(0), 42, DUMMY_NOTARY)
val storage = MockAttachmentStorage()

View File

@ -1,4 +1,4 @@
package core.serialization
package com.r3corda.core.serialization
import com.esotericsoftware.kryo.Kryo
import org.junit.Test

View File

@ -1,4 +1,4 @@
package core.serialization
package com.r3corda.core.serialization
import com.esotericsoftware.kryo.DefaultSerializer
import org.assertj.core.api.Assertions.assertThat

View File

@ -1,11 +1,11 @@
package core.serialization
package com.r3corda.core.serialization
import core.contracts.*
import core.crypto.Party
import core.crypto.SecureHash
import core.node.services.testing.MockStorageService
import core.seconds
import core.testing.*
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.Party
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.node.services.testing.MockStorageService
import com.r3corda.core.seconds
import com.r3corda.core.testing.*
import org.junit.Before
import org.junit.Test
import java.security.PublicKey

View File

@ -1,7 +1,7 @@
package core.utilities
package com.r3corda.core.utilities
import core.indexOfOrThrow
import core.noneOrSingle
import com.r3corda.core.indexOfOrThrow
import com.r3corda.core.noneOrSingle
import org.junit.Test
import kotlin.test.assertEquals
import kotlin.test.assertFailsWith

View File

@ -1,4 +1,4 @@
package core.utilities
package com.r3corda.core.utilities
import org.apache.commons.jexl3.JexlBuilder
import org.apache.commons.jexl3.MapContext

View File

@ -1,4 +1,4 @@
package core.utilities
package com.r3corda.core.utilities
import org.junit.Before
import org.junit.Test

View File

@ -1,13 +1,13 @@
package node.api
package com.r3corda.node.api
import node.api.StatesQuery
import core.contracts.ContractState
import core.contracts.SignedTransaction
import core.contracts.StateRef
import core.contracts.WireTransaction
import core.crypto.DigitalSignature
import core.crypto.SecureHash
import core.serialization.SerializedBytes
import com.r3corda.node.api.StatesQuery
import com.r3corda.core.contracts.ContractState
import com.r3corda.core.contracts.SignedTransaction
import com.r3corda.core.contracts.StateRef
import com.r3corda.core.contracts.WireTransaction
import com.r3corda.core.crypto.DigitalSignature
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.serialization.SerializedBytes
import java.time.Instant
import java.time.LocalDateTime
import javax.ws.rs.GET

View File

@ -1,4 +1,4 @@
package node.api
package com.r3corda.node.api
/**
* Extremely rudimentary query language which should most likely be replaced with a product

View File

@ -1,14 +1,14 @@
package node.internal
package com.r3corda.node.internal
import com.google.common.util.concurrent.ListenableFuture
import core.contracts.*
import core.crypto.DigitalSignature
import core.crypto.SecureHash
import core.node.services.linearHeadsOfType
import core.protocols.ProtocolLogic
import core.serialization.SerializedBytes
import node.api.*
import node.utilities.*
import com.r3corda.core.contracts.*
import com.r3corda.core.crypto.DigitalSignature
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.node.services.linearHeadsOfType
import com.r3corda.core.protocols.ProtocolLogic
import com.r3corda.core.serialization.SerializedBytes
import com.r3corda.node.api.*
import com.r3corda.node.utilities.*
import java.time.LocalDateTime
import java.util.*
import kotlin.reflect.KParameter

View File

@ -1,44 +1,44 @@
package node.internal
package com.r3corda.node.internal
import com.codahale.metrics.MetricRegistry
import com.google.common.util.concurrent.ListenableFuture
import com.google.common.util.concurrent.SettableFuture
import core.RunOnCallerThread
import core.crypto.Party
import core.messaging.MessagingService
import core.messaging.runOnNextMessage
import core.node.CityDatabase
import core.node.NodeInfo
import core.node.PhysicalLocation
import core.node.services.*
import core.random63BitValue
import core.seconds
import core.serialization.deserialize
import core.serialization.serialize
import node.api.APIServer
import node.services.api.AcceptsFileUpload
import node.services.api.CheckpointStorage
import node.services.api.MonitoringService
import node.services.api.ServiceHubInternal
import node.services.transactions.InMemoryUniquenessProvider
import node.services.transactions.NotaryService
import node.services.transactions.TimestampChecker
import node.services.clientapi.NodeInterestRates
import node.services.config.NodeConfiguration
import node.services.identity.InMemoryIdentityService
import node.services.keys.E2ETestKeyManagementService
import node.services.network.InMemoryNetworkMapCache
import node.services.network.InMemoryNetworkMapService
import node.services.network.NetworkMapService
import node.services.network.NodeRegistration
import node.services.persistence.DataVendingService
import node.services.persistence.NodeAttachmentService
import node.services.persistence.PerFileCheckpointStorage
import node.services.persistence.StorageServiceImpl
import node.services.statemachine.StateMachineManager
import node.services.wallet.NodeWalletService
import node.utilities.AddOrRemove
import node.utilities.AffinityExecutor
import com.r3corda.core.RunOnCallerThread
import com.r3corda.core.crypto.Party
import com.r3corda.core.messaging.MessagingService
import com.r3corda.core.messaging.runOnNextMessage
import com.r3corda.core.node.CityDatabase
import com.r3corda.core.node.NodeInfo
import com.r3corda.core.node.PhysicalLocation
import com.r3corda.core.node.services.*
import com.r3corda.core.random63BitValue
import com.r3corda.core.seconds
import com.r3corda.core.serialization.deserialize
import com.r3corda.core.serialization.serialize
import com.r3corda.node.api.APIServer
import com.r3corda.node.services.api.AcceptsFileUpload
import com.r3corda.node.services.api.CheckpointStorage
import com.r3corda.node.services.api.MonitoringService
import com.r3corda.node.services.api.ServiceHubInternal
import com.r3corda.node.services.transactions.InMemoryUniquenessProvider
import com.r3corda.node.services.transactions.NotaryService
import com.r3corda.node.services.transactions.TimestampChecker
import com.r3corda.node.services.clientapi.NodeInterestRates
import com.r3corda.node.services.config.NodeConfiguration
import com.r3corda.node.services.identity.InMemoryIdentityService
import com.r3corda.node.services.keys.E2ETestKeyManagementService
import com.r3corda.node.services.network.InMemoryNetworkMapCache
import com.r3corda.node.services.network.InMemoryNetworkMapService
import com.r3corda.node.services.network.NetworkMapService
import com.r3corda.node.services.network.NodeRegistration
import com.r3corda.node.services.persistence.DataVendingService
import com.r3corda.node.services.persistence.NodeAttachmentService
import com.r3corda.node.services.persistence.PerFileCheckpointStorage
import com.r3corda.node.services.persistence.StorageServiceImpl
import com.r3corda.node.services.statemachine.StateMachineManager
import com.r3corda.node.services.wallet.NodeWalletService
import com.r3corda.node.utilities.AddOrRemove
import com.r3corda.node.utilities.AffinityExecutor
import org.slf4j.Logger
import java.nio.file.FileAlreadyExistsException
import java.nio.file.Files
@ -281,7 +281,7 @@ abstract class AbstractNode(val dir: Path, val configuration: NodeConfiguration,
}
}
protected open fun generateKeyPair() = core.crypto.generateKeyPair()
protected open fun generateKeyPair() = com.r3corda.core.crypto.generateKeyPair()
protected fun makeAttachmentStorage(dir: Path): NodeAttachmentService {
val attachmentsDir = dir.resolve("attachments")

View File

@ -1,19 +1,19 @@
package node.internal
package com.r3corda.node.internal
import com.codahale.metrics.JmxReporter
import com.google.common.net.HostAndPort
import core.messaging.MessagingService
import core.node.NodeInfo
import core.node.services.ServiceType
import core.utilities.loggerFor
import node.api.APIServer
import node.services.config.NodeConfiguration
import node.services.messaging.ArtemisMessagingService
import node.servlets.AttachmentDownloadServlet
import node.servlets.Config
import node.servlets.DataUploadServlet
import node.servlets.ResponseFilter
import node.utilities.AffinityExecutor
import com.r3corda.core.messaging.MessagingService
import com.r3corda.core.node.NodeInfo
import com.r3corda.core.node.services.ServiceType
import com.r3corda.core.utilities.loggerFor
import com.r3corda.node.api.APIServer
import com.r3corda.node.services.config.NodeConfiguration
import com.r3corda.node.services.messaging.ArtemisMessagingService
import com.r3corda.node.servlets.AttachmentDownloadServlet
import com.r3corda.node.servlets.Config
import com.r3corda.node.servlets.DataUploadServlet
import com.r3corda.node.servlets.ResponseFilter
import com.r3corda.node.utilities.AffinityExecutor
import org.eclipse.jetty.server.Server
import org.eclipse.jetty.server.handler.HandlerCollection
import org.eclipse.jetty.servlet.ServletContextHandler

View File

@ -1,23 +1,23 @@
package node.internal.testing
package com.r3corda.node.internal.testing
import com.fasterxml.jackson.module.kotlin.readValue
import com.google.common.util.concurrent.FutureCallback
import com.google.common.util.concurrent.Futures
import com.google.common.util.concurrent.ListenableFuture
import com.google.common.util.concurrent.SettableFuture
import contracts.InterestRateSwap
import core.RunOnCallerThread
import core.contracts.SignedTransaction
import core.contracts.StateAndRef
import core.crypto.SecureHash
import core.failure
import core.node.services.linearHeadsOfType
import core.node.services.testing.MockIdentityService
import core.random63BitValue
import core.success
import node.services.network.InMemoryMessagingNetwork
import node.utilities.JsonSupport
import protocols.TwoPartyDealProtocol
import com.r3corda.contracts.InterestRateSwap
import com.r3corda.core.RunOnCallerThread
import com.r3corda.core.contracts.SignedTransaction
import com.r3corda.core.contracts.StateAndRef
import com.r3corda.core.crypto.SecureHash
import com.r3corda.core.failure
import com.r3corda.core.node.services.linearHeadsOfType
import com.r3corda.core.node.services.testing.MockIdentityService
import com.r3corda.core.random63BitValue
import com.r3corda.core.success
import com.r3corda.node.services.network.InMemoryMessagingNetwork
import com.r3corda.node.utilities.JsonSupport
import com.r3corda.protocols.TwoPartyDealProtocol
import java.security.KeyPair
import java.time.LocalDate
import java.util.*

View File

@ -1,22 +1,22 @@
package node.internal.testing
package com.r3corda.node.internal.testing
import com.google.common.jimfs.Configuration
import com.google.common.jimfs.Jimfs
import com.google.common.util.concurrent.Futures
import core.crypto.Party
import core.messaging.MessagingService
import core.messaging.SingleMessageRecipient
import core.node.NodeInfo
import core.node.PhysicalLocation
import core.node.services.ServiceType
import core.node.services.testing.MockIdentityService
import core.utilities.loggerFor
import node.internal.AbstractNode
import node.services.config.NodeConfiguration
import node.services.network.InMemoryMessagingNetwork
import node.services.network.NetworkMapService
import node.services.transactions.NotaryService
import node.utilities.AffinityExecutor
import com.r3corda.core.crypto.Party
import com.r3corda.core.messaging.MessagingService
import com.r3corda.core.messaging.SingleMessageRecipient
import com.r3corda.core.node.NodeInfo
import com.r3corda.core.node.PhysicalLocation
import com.r3corda.core.node.services.ServiceType
import com.r3corda.core.node.services.testing.MockIdentityService
import com.r3corda.core.utilities.loggerFor
import com.r3corda.node.internal.AbstractNode
import com.r3corda.node.services.config.NodeConfiguration
import com.r3corda.node.services.network.InMemoryMessagingNetwork
import com.r3corda.node.services.network.NetworkMapService
import com.r3corda.node.services.transactions.NotaryService
import com.r3corda.node.utilities.AffinityExecutor
import org.slf4j.Logger
import java.nio.file.Files
import java.nio.file.Path

View File

@ -1,19 +1,19 @@
package node.internal.testing
package com.r3corda.node.internal.testing
import com.google.common.util.concurrent.Futures
import com.google.common.util.concurrent.ListenableFuture
import core.node.CityDatabase
import core.node.NodeInfo
import core.node.PhysicalLocation
import core.node.services.ServiceType
import core.protocols.ProtocolLogic
import core.then
import core.utilities.ProgressTracker
import node.services.transactions.NotaryService
import node.services.clientapi.NodeInterestRates
import node.services.config.NodeConfiguration
import node.services.network.InMemoryMessagingNetwork
import node.services.network.NetworkMapService
import com.r3corda.core.node.CityDatabase
import com.r3corda.core.node.NodeInfo
import com.r3corda.core.node.PhysicalLocation
import com.r3corda.core.node.services.ServiceType
import com.r3corda.core.protocols.ProtocolLogic
import com.r3corda.core.then
import com.r3corda.core.utilities.ProgressTracker
import com.r3corda.node.services.transactions.NotaryService
import com.r3corda.node.services.clientapi.NodeInterestRates
import com.r3corda.node.services.config.NodeConfiguration
import com.r3corda.node.services.network.InMemoryMessagingNetwork
import com.r3corda.node.services.network.NetworkMapService
import rx.Observable
import rx.subjects.PublishSubject
import java.nio.file.Path

View File

@ -1,13 +1,13 @@
@file:Suppress("UNUSED_PARAMETER")
package node.testutils
package com.r3corda.node.testutils
import contracts.DummyContract
import core.contracts.StateRef
import core.crypto.Party
import core.testing.DUMMY_NOTARY
import core.testing.DUMMY_NOTARY_KEY
import node.internal.AbstractNode
import com.r3corda.contracts.DummyContract
import com.r3corda.core.contracts.StateRef
import com.r3corda.core.crypto.Party
import com.r3corda.core.testing.DUMMY_NOTARY
import com.r3corda.core.testing.DUMMY_NOTARY_KEY
import com.r3corda.node.internal.AbstractNode
import java.util.*
fun issueState(node: AbstractNode, notary: Party = DUMMY_NOTARY): StateRef {

View File

@ -1,16 +1,16 @@
package node.internal.testing
package com.r3corda.node.internal.testing
import com.google.common.util.concurrent.Futures
import com.google.common.util.concurrent.ListenableFuture
import contracts.CommercialPaper
import core.contracts.DOLLARS
import core.contracts.SignedTransaction
import core.days
import core.random63BitValue
import core.seconds
import node.services.network.InMemoryMessagingNetwork
import node.services.wallet.NodeWalletService
import protocols.TwoPartyTradeProtocol
import com.r3corda.contracts.CommercialPaper
import com.r3corda.core.contracts.DOLLARS
import com.r3corda.core.contracts.SignedTransaction
import com.r3corda.core.days
import com.r3corda.core.random63BitValue
import com.r3corda.core.seconds
import com.r3corda.node.services.network.InMemoryMessagingNetwork
import com.r3corda.node.services.wallet.NodeWalletService
import com.r3corda.protocols.TwoPartyTradeProtocol
import java.time.Instant
/**

View File

@ -1,11 +1,11 @@
package node.services.api
package com.r3corda.node.services.api
import core.messaging.Message
import core.messaging.MessagingService
import core.node.services.TOPIC_DEFAULT_POSTFIX
import core.serialization.deserialize
import core.serialization.serialize
import protocols.AbstractRequestMessage
import com.r3corda.core.messaging.Message
import com.r3corda.core.messaging.MessagingService
import com.r3corda.core.node.services.TOPIC_DEFAULT_POSTFIX
import com.r3corda.core.serialization.deserialize
import com.r3corda.core.serialization.serialize
import com.r3corda.protocols.AbstractRequestMessage
import javax.annotation.concurrent.ThreadSafe
/**

View File

@ -1,4 +1,4 @@
package node.services.api
package com.r3corda.node.services.api
import java.io.InputStream

View File

@ -1,8 +1,8 @@
package node.services.api
package com.r3corda.node.services.api
import core.crypto.sha256
import core.protocols.ProtocolStateMachine
import core.serialization.SerializedBytes
import com.r3corda.core.crypto.sha256
import com.r3corda.core.protocols.ProtocolStateMachine
import com.r3corda.core.serialization.SerializedBytes
/**
* Thread-safe storage of fiber checkpoints.

View File

@ -1,4 +1,4 @@
package node.services.api
package com.r3corda.node.services.api
import com.codahale.metrics.MetricRegistry

View File

@ -1,6 +1,6 @@
package node.services.api
package com.r3corda.node.services.api
import core.node.services.ServiceType
import com.r3corda.core.node.services.ServiceType
/**
* Placeholder interface for regulator services.

View File

@ -1,6 +1,6 @@
package node.services.api
package com.r3corda.node.services.api
import core.node.ServiceHub
import com.r3corda.core.node.ServiceHub
interface ServiceHubInternal : ServiceHub {
val monitoringService: MonitoringService

Some files were not shown because too many files have changed in this diff Show More