diff --git a/modules/block/src/main/kotlin/jp/co/soramitsu/iroha2/Genesis.kt b/modules/block/src/main/kotlin/jp/co/soramitsu/iroha2/Genesis.kt index 27f635a52..3c6c53a1b 100644 --- a/modules/block/src/main/kotlin/jp/co/soramitsu/iroha2/Genesis.kt +++ b/modules/block/src/main/kotlin/jp/co/soramitsu/iroha2/Genesis.kt @@ -1,5 +1,6 @@ package jp.co.soramitsu.iroha2 +import jp.co.soramitsu.iroha2.generated.ExecutorMode import jp.co.soramitsu.iroha2.generated.Expression import jp.co.soramitsu.iroha2.generated.IdentifiableBox import jp.co.soramitsu.iroha2.generated.InstructionExpr @@ -10,7 +11,6 @@ import jp.co.soramitsu.iroha2.generated.NewDomain import jp.co.soramitsu.iroha2.generated.RawGenesisBlock import jp.co.soramitsu.iroha2.generated.RegisterExpr import jp.co.soramitsu.iroha2.generated.RegistrableBox -import jp.co.soramitsu.iroha2.generated.ExecutorMode import jp.co.soramitsu.iroha2.generated.Value import java.nio.file.Files import java.nio.file.Path diff --git a/modules/block/src/main/kotlin/jp/co/soramitsu/iroha2/Serde.kt b/modules/block/src/main/kotlin/jp/co/soramitsu/iroha2/Serde.kt index 2187d10c4..c71c5df4d 100644 --- a/modules/block/src/main/kotlin/jp/co/soramitsu/iroha2/Serde.kt +++ b/modules/block/src/main/kotlin/jp/co/soramitsu/iroha2/Serde.kt @@ -28,6 +28,7 @@ import jp.co.soramitsu.iroha2.generated.BlockHeader import jp.co.soramitsu.iroha2.generated.BurnExpr import jp.co.soramitsu.iroha2.generated.DomainId import jp.co.soramitsu.iroha2.generated.EvaluatesTo +import jp.co.soramitsu.iroha2.generated.ExecutorMode import jp.co.soramitsu.iroha2.generated.Expression import jp.co.soramitsu.iroha2.generated.GrantExpr import jp.co.soramitsu.iroha2.generated.Hash @@ -61,16 +62,15 @@ import jp.co.soramitsu.iroha2.generated.RoleId import jp.co.soramitsu.iroha2.generated.SequenceExpr import jp.co.soramitsu.iroha2.generated.SetKeyValueExpr import jp.co.soramitsu.iroha2.generated.SignatureCheckCondition +import jp.co.soramitsu.iroha2.generated.SignedBlock import jp.co.soramitsu.iroha2.generated.SocketAddr import jp.co.soramitsu.iroha2.generated.StringWithJson import jp.co.soramitsu.iroha2.generated.TransactionLimits import jp.co.soramitsu.iroha2.generated.TransactionQueryOutput import jp.co.soramitsu.iroha2.generated.TransactionValue -import jp.co.soramitsu.iroha2.generated.TriggerOfTriggeringFilterBox import jp.co.soramitsu.iroha2.generated.TriggerId -import jp.co.soramitsu.iroha2.generated.ExecutorMode +import jp.co.soramitsu.iroha2.generated.TriggerOfTriggeringFilterBox import jp.co.soramitsu.iroha2.generated.Value -import jp.co.soramitsu.iroha2.generated.SignedBlock import java.io.ByteArrayOutputStream import kotlin.reflect.KClass import kotlin.reflect.full.createInstance diff --git a/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/Extensions.kt b/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/Extensions.kt index 304d3693a..cef877d96 100644 --- a/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/Extensions.kt +++ b/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/Extensions.kt @@ -7,6 +7,9 @@ import jp.co.soramitsu.iroha2.generated.Asset import jp.co.soramitsu.iroha2.generated.AssetDefinitionId import jp.co.soramitsu.iroha2.generated.AssetId import jp.co.soramitsu.iroha2.generated.AssetValue +import jp.co.soramitsu.iroha2.generated.BlockMessage +import jp.co.soramitsu.iroha2.generated.BlockPayload +import jp.co.soramitsu.iroha2.generated.BlockSubscriptionRequest import jp.co.soramitsu.iroha2.generated.DomainId import jp.co.soramitsu.iroha2.generated.EvaluatesTo import jp.co.soramitsu.iroha2.generated.Executable @@ -33,7 +36,10 @@ import jp.co.soramitsu.iroha2.generated.RoleId import jp.co.soramitsu.iroha2.generated.Signature import jp.co.soramitsu.iroha2.generated.SignatureOf import jp.co.soramitsu.iroha2.generated.SignaturesOfOfTransactionPayload +import jp.co.soramitsu.iroha2.generated.SignedBlock +import jp.co.soramitsu.iroha2.generated.SignedBlockV1 import jp.co.soramitsu.iroha2.generated.SignedTransaction +import jp.co.soramitsu.iroha2.generated.SignedTransactionV1 import jp.co.soramitsu.iroha2.generated.SocketAddr import jp.co.soramitsu.iroha2.generated.SocketAddrHost import jp.co.soramitsu.iroha2.generated.StringWithJson @@ -42,12 +48,6 @@ import jp.co.soramitsu.iroha2.generated.TriggerId import jp.co.soramitsu.iroha2.generated.TriggerOfTriggeringFilterBox import jp.co.soramitsu.iroha2.generated.TriggeringFilterBox import jp.co.soramitsu.iroha2.generated.Value -import jp.co.soramitsu.iroha2.generated.BlockMessage -import jp.co.soramitsu.iroha2.generated.BlockPayload -import jp.co.soramitsu.iroha2.generated.BlockSubscriptionRequest -import jp.co.soramitsu.iroha2.generated.SignedBlock -import jp.co.soramitsu.iroha2.generated.SignedBlockV1 -import jp.co.soramitsu.iroha2.generated.SignedTransactionV1 import jp.co.soramitsu.iroha2.transaction.TransactionBuilder import net.i2p.crypto.eddsa.EdDSAEngine import org.bouncycastle.jcajce.provider.digest.Blake2b diff --git a/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/Extractors.kt b/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/Extractors.kt index 2d7939839..c6fccefd4 100644 --- a/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/Extractors.kt +++ b/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/Extractors.kt @@ -3,10 +3,8 @@ package jp.co.soramitsu.iroha2 import jp.co.soramitsu.iroha2.generated.Account import jp.co.soramitsu.iroha2.generated.Asset import jp.co.soramitsu.iroha2.generated.AssetDefinition -import jp.co.soramitsu.iroha2.generated.BatchedResponseOfValue import jp.co.soramitsu.iroha2.generated.BatchedResponseV1OfValue import jp.co.soramitsu.iroha2.generated.BlockHeader -import jp.co.soramitsu.iroha2.generated.BlockPayload import jp.co.soramitsu.iroha2.generated.Domain import jp.co.soramitsu.iroha2.generated.IdBox import jp.co.soramitsu.iroha2.generated.IdentifiableBox @@ -20,7 +18,6 @@ import jp.co.soramitsu.iroha2.generated.SignedBlock import jp.co.soramitsu.iroha2.generated.TransactionQueryOutput import jp.co.soramitsu.iroha2.generated.TriggerId import jp.co.soramitsu.iroha2.generated.TriggerOfTriggeringFilterBox -import jp.co.soramitsu.iroha2.generated.TriggeringFilterBox import jp.co.soramitsu.iroha2.generated.Value import java.math.BigInteger @@ -134,8 +131,10 @@ object PeersExtractor : ResultExtractor> { */ object TriggerBoxExtractor : ResultExtractor { override fun extract(result: BatchedResponseV1OfValue): TriggerOfTriggeringFilterBox { - return extractIdentifiable(result.batch, - IdentifiableBox.Trigger::triggerOfTriggeringFilterBox) + return extractIdentifiable( + result.batch, + IdentifiableBox.Trigger::triggerOfTriggeringFilterBox, + ) } } diff --git a/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/client/Iroha2Client.kt b/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/client/Iroha2Client.kt index 7bcfd2a0b..df702c5dd 100644 --- a/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/client/Iroha2Client.kt +++ b/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/client/Iroha2Client.kt @@ -39,6 +39,7 @@ import jp.co.soramitsu.iroha2.extract import jp.co.soramitsu.iroha2.extractBlock import jp.co.soramitsu.iroha2.generated.BatchedResponseOfValue import jp.co.soramitsu.iroha2.generated.BatchedResponseV1OfValue +import jp.co.soramitsu.iroha2.generated.BlockMessage import jp.co.soramitsu.iroha2.generated.BlockRejectionReason import jp.co.soramitsu.iroha2.generated.Event import jp.co.soramitsu.iroha2.generated.EventMessage @@ -47,11 +48,10 @@ import jp.co.soramitsu.iroha2.generated.ForwardCursor import jp.co.soramitsu.iroha2.generated.PipelineEntityKind import jp.co.soramitsu.iroha2.generated.PipelineRejectionReason import jp.co.soramitsu.iroha2.generated.PipelineStatus -import jp.co.soramitsu.iroha2.generated.TransactionRejectionReason -import jp.co.soramitsu.iroha2.generated.Value -import jp.co.soramitsu.iroha2.generated.BlockMessage import jp.co.soramitsu.iroha2.generated.SignedQuery import jp.co.soramitsu.iroha2.generated.SignedTransaction +import jp.co.soramitsu.iroha2.generated.TransactionRejectionReason +import jp.co.soramitsu.iroha2.generated.Value import jp.co.soramitsu.iroha2.hash import jp.co.soramitsu.iroha2.height import jp.co.soramitsu.iroha2.model.IrohaUrls diff --git a/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/client/blockstream/BlockStreamSubscription.kt b/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/client/blockstream/BlockStreamSubscription.kt index ede9e2925..31054f26d 100644 --- a/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/client/blockstream/BlockStreamSubscription.kt +++ b/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/client/blockstream/BlockStreamSubscription.kt @@ -8,8 +8,8 @@ import jp.co.soramitsu.iroha2.SingletonHolder import jp.co.soramitsu.iroha2.cast import jp.co.soramitsu.iroha2.client.Iroha2Client import jp.co.soramitsu.iroha2.generated.BlockMessage -import jp.co.soramitsu.iroha2.generated.NonZeroOfu64 import jp.co.soramitsu.iroha2.generated.BlockSubscriptionRequest +import jp.co.soramitsu.iroha2.generated.NonZeroOfu64 import jp.co.soramitsu.iroha2.toFrame import kotlinx.coroutines.CancellationException import kotlinx.coroutines.CoroutineScope diff --git a/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/query/Queries.kt b/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/query/Queries.kt index cba198043..0e2122bea 100644 --- a/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/query/Queries.kt +++ b/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/query/Queries.kt @@ -51,8 +51,8 @@ import jp.co.soramitsu.iroha2.generated.Name import jp.co.soramitsu.iroha2.generated.QueryBox import jp.co.soramitsu.iroha2.generated.RoleId import jp.co.soramitsu.iroha2.generated.SignedBlock -import jp.co.soramitsu.iroha2.generated.TriggerId import jp.co.soramitsu.iroha2.generated.SignedTransaction +import jp.co.soramitsu.iroha2.generated.TriggerId /** * Queries are sent to an Iroha peer and prompt a response with details from the current world state view. diff --git a/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/transaction/TransactionBuilder.kt b/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/transaction/TransactionBuilder.kt index d12d842b1..b3890cc34 100644 --- a/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/transaction/TransactionBuilder.kt +++ b/modules/client/src/main/kotlin/jp/co/soramitsu/iroha2/transaction/TransactionBuilder.kt @@ -28,12 +28,12 @@ import jp.co.soramitsu.iroha2.generated.RoleId import jp.co.soramitsu.iroha2.generated.Signature import jp.co.soramitsu.iroha2.generated.SignaturesOfOfTransactionPayload import jp.co.soramitsu.iroha2.generated.SignedTransaction +import jp.co.soramitsu.iroha2.generated.SignedTransactionV1 import jp.co.soramitsu.iroha2.generated.TimeEventFilter import jp.co.soramitsu.iroha2.generated.TransactionPayload import jp.co.soramitsu.iroha2.generated.TriggerId import jp.co.soramitsu.iroha2.generated.TriggeringFilterBox import jp.co.soramitsu.iroha2.generated.Value -import jp.co.soramitsu.iroha2.generated.SignedTransactionV1 import jp.co.soramitsu.iroha2.sign import jp.co.soramitsu.iroha2.toIrohaPublicKey import java.math.BigDecimal diff --git a/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/BlockStreamTest.kt b/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/BlockStreamTest.kt index 21dd1edef..9c6ec44ac 100644 --- a/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/BlockStreamTest.kt +++ b/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/BlockStreamTest.kt @@ -9,12 +9,12 @@ import jp.co.soramitsu.iroha2.annotations.SdkTestId import jp.co.soramitsu.iroha2.client.Iroha2Client import jp.co.soramitsu.iroha2.client.blockstream.BlockStreamStorage import jp.co.soramitsu.iroha2.generated.AssetValueType -import jp.co.soramitsu.iroha2.generated.Executable -import jp.co.soramitsu.iroha2.generated.InstructionExpr -import jp.co.soramitsu.iroha2.generated.TransactionPayload import jp.co.soramitsu.iroha2.generated.BlockMessage import jp.co.soramitsu.iroha2.generated.BlockPayload +import jp.co.soramitsu.iroha2.generated.Executable +import jp.co.soramitsu.iroha2.generated.InstructionExpr import jp.co.soramitsu.iroha2.generated.SignedTransaction +import jp.co.soramitsu.iroha2.generated.TransactionPayload import jp.co.soramitsu.iroha2.testengine.ALICE_ACCOUNT_ID import jp.co.soramitsu.iroha2.testengine.BOB_ACCOUNT import jp.co.soramitsu.iroha2.testengine.BOB_ACCOUNT_ID diff --git a/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/InstructionsTest.kt b/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/InstructionsTest.kt index d9a4287bf..9b68da67a 100644 --- a/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/InstructionsTest.kt +++ b/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/InstructionsTest.kt @@ -18,8 +18,8 @@ import jp.co.soramitsu.iroha2.generated.Name import jp.co.soramitsu.iroha2.generated.PermissionToken import jp.co.soramitsu.iroha2.generated.PublicKey import jp.co.soramitsu.iroha2.generated.RoleId -import jp.co.soramitsu.iroha2.generated.Value import jp.co.soramitsu.iroha2.generated.SignedTransaction +import jp.co.soramitsu.iroha2.generated.Value import jp.co.soramitsu.iroha2.query.QueryBuilder import jp.co.soramitsu.iroha2.testengine.ALICE_ACCOUNT_ID import jp.co.soramitsu.iroha2.testengine.ALICE_ACCOUNT_ID_VALUE diff --git a/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/QueriesTest.kt b/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/QueriesTest.kt index fa993d374..250553208 100644 --- a/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/QueriesTest.kt +++ b/modules/client/src/test/kotlin/jp/co/soramitsu/iroha2/QueriesTest.kt @@ -16,12 +16,12 @@ import jp.co.soramitsu.iroha2.generated.GenericPredicateBox import jp.co.soramitsu.iroha2.generated.InstructionExpr import jp.co.soramitsu.iroha2.generated.Metadata import jp.co.soramitsu.iroha2.generated.Name +import jp.co.soramitsu.iroha2.generated.SignedTransaction import jp.co.soramitsu.iroha2.generated.StringPredicate import jp.co.soramitsu.iroha2.generated.TransactionValue import jp.co.soramitsu.iroha2.generated.Value import jp.co.soramitsu.iroha2.generated.ValueOfKey import jp.co.soramitsu.iroha2.generated.ValuePredicate -import jp.co.soramitsu.iroha2.generated.SignedTransaction import jp.co.soramitsu.iroha2.query.QueryBuilder import jp.co.soramitsu.iroha2.testengine.ALICE_ACCOUNT_ID import jp.co.soramitsu.iroha2.testengine.ALICE_ACCOUNT_NAME